@luigi-project/core-modular 0.0.1-dev.20260250047 → 0.0.2-dev.20260260044
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/core-api/luigi.d.ts +6 -0
- package/core-api/navigation.d.ts +2 -2
- package/luigi-engine.d.ts +2 -2
- package/luigi.js +12 -38
- package/luigi.js.map +1 -1
- package/modules/routing-module.d.ts +1 -1
- package/modules/ui-module.d.ts +1 -1
- package/package.json +1 -1
- package/services/navigation.service.d.ts +17 -7
- package/services/node-data-management.service.d.ts +3 -3
- package/services/routing.service.d.ts +3 -1
- package/utilities/helpers/routing-helpers.d.ts +11 -0
package/luigi.js
CHANGED
|
@@ -1,53 +1,27 @@
|
|
|
1
|
-
var Rm=Object.defineProperty;var qu=s=>{throw TypeError(s)};var bm=(s,n,r)=>n in s?Rm(s,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):s[n]=r;var we=(s,n,r)=>bm(s,typeof n!="symbol"?n+"":n,r),zu=(s,n,r)=>n.has(s)||qu("Cannot "+r);var ct=(s,n,r)=>(zu(s,n,"read from private field"),r?r.call(s):n.get(s)),js=(s,n,r)=>n.has(s)?qu("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(s):n.set(s,r),eo=(s,n,r,o)=>(zu(s,n,"write to private field"),o?o.call(s,r):n.set(s,r),r);class Im{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 hl(s){return s.$value}function Ti(s){return new Im(s)}const B={getRandomId:()=>window.crypto.getRandomValues(new Uint32Array(1))[0],isPromise:s=>s&&B.isFunction(s.then),isFunction:s=>s&&{}.toString.call(s)==="[object Function]",isAsyncFunction:s=>s&&{}.toString.call(s)==="[object AsyncFunction]",isString:s=>typeof s=="string"||s instanceof String,isObject:s=>!!(s&&typeof s=="object"&&!Array.isArray(s)),trimLeadingSlash:s=>B.isString(s)?s.replace(/^\/+/g,""):"",trimTrailingSlash:s=>B.isString(s)?s.replace(/\/+$/,""):"",isElementVisible:s=>s?window.getComputedStyle(s).getPropertyValue("display")!=="none":!1,getNodeList:(s,n=!1)=>{const r=[];return s&&Array.from(document.querySelectorAll(s)).forEach(u=>{n?B.isElementVisible(u)&&r.push(u):r.push(u)}),r},prependOrigin:s=>{if(!s||s.startsWith("http"))return s;const n=s.startsWith("/");return s.length?window.location.origin+(n?"":"/")+s:window.location.origin},getConfigValueFromObject:(s,n)=>{let r=0,o=s;const u=n.split(".");for(;o&&r<u.length;)o=o[u[r++]];return o},getConfigBooleanValue:(s,n)=>{const r=B.getConfigValueFromObject(s,n);return r===!0||r==="true"},getUrlParameter:s=>new URLSearchParams(window.location.search).get(s)},_r={wrapAsPromise:s=>new Promise(n=>{n(s)}),applyFunctionPromisified:(s,n)=>(s=s.apply(void 0,n),B.isPromise(s)?s:_r.wrapAsPromise(s)),getConfigValueFromObjectAsync:(s,n,...r)=>{const o=B.getConfigValueFromObject(s,n);return B.isFunction(o)?_r.applyFunctionPromisified(o,r):_r.wrapAsPromise(o)}};class Pm{setErrorMessage(n){var r,o;(o=(r=this.getLuigi().getEngine())==null?void 0:r._connector)==null||o.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,...o){const u=this.getConfigValue(n);if(B.isFunction(u))try{return await _r.applyFunctionPromisified(u,o)}catch(c){if(r)return Promise.reject(c)}return Promise.resolve(void 0)}}const Ke=new Pm;class Lm{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=Ke.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 Et=new Lm;class xm{isAuthorizationEnabled(){return!!Ke.getConfigValue("auth.use")}login(){this.isAuthorizationEnabled()&&Fn.startAuthorization()}logout(){this.isAuthorizationEnabled()&&Fn.logout()}async handleAuthEvent(n,r,o,u){const c=await Ke.executeConfigFnAsync("auth.events."+n,!1,r,o),h=c===void 0||!!c;if(h&&u){window.location.href=u;return}return h}get store(){var n;return(n=Ke.getLuigi())!=null&&n.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:()=>Et.getStorageKey(),getStorageType:()=>Et.getStorageType(),getAuthData:()=>Et.getAuthData(),setAuthData:r=>Et.setAuthData(r),removeAuthData:()=>Et.removeAuthData(),setNewlyAuthorized:()=>{Et.setNewlyAuthorized(),Fn.resetExpirationChecks()}}}}const Dn=new xm;class $m{getStoredAuthData(){return Et.getAuthData()}isLoggedIn(){const n=this.getStoredAuthData();return!!(n&&n.accessTokenExpirationDate>Number(new Date))}parseUrlAuthErrors(){const n=B.getUrlParameter("error"),r=B.getUrlParameter("errorDescription");if(n)return{error:n,errorDescription:r}}async handleUrlAuthErrors(n,r,o){return r?await Dn.handleAuthEvent("onAuthError",n,{error:r,errorDescription:o},n.logoutUrl+"?post_logout_redirect_uri="+n.post_logout_redirect_uri+"&error="+r+"&errorDescription="+o):!0}}const fn=new $m;class Om{constructor(){this._userInfoStore=Ti({}),this._loggedInStore=Ti(!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=Ke.getConfigValue("auth.use");if(!n)return Promise.resolve(!0);const r=Ke.getConfigValue(`auth.${n}`),o=fn.parseUrlAuthErrors()||{};if(await fn.handleUrlAuthErrors(r,o.error,o.errorDescription))return this.idpProviderInstance=this.getIdpProviderInstance(n,r),B.isPromise(this.idpProviderInstance)?this.idpProviderInstance.then(c=>(this.idpProviderInstance=c,this.checkAuth(r))).catch(c=>{const h=`Error: ${c.message||c}`;console.error(h,c.message&&c),Ke.setErrorMessage(h)}):this.checkAuth(r)}async checkAuth(n){const r=fn.getStoredAuthData();if(!r||!fn.isLoggedIn()){if(Ke.getConfigValue("auth.disableAutoLogin"))return;let u=!0;return r&&(u=await Dn.handleAuthEvent("onAuthExpired",n)),u?this.startAuthorization():void 0}this.idpProviderInstance.settings&&B.isFunction(this.idpProviderInstance.settings.userInfoFn)?this.idpProviderInstance.settings.userInfoFn(this.idpProviderInstance.settings,r).then(u=>{this.setUserInfo(u),this.setLoggedIn(!0)}):B.isFunction(this.idpProviderInstance.userInfo)?this.idpProviderInstance.userInfo(n).then(u=>{this.setUserInfo(u),this.setLoggedIn(!0)}):(this.setLoggedIn(!0),this.setUserInfo(hl(this._userInfoStore))),B.isFunction(Ke.getConfigValue("auth.events.onAuthSuccessful"))&&Et.isNewlyAuthorized()&&await Dn.handleAuthEvent("onAuthSuccessful",n,r),Et.removeNewlyAuthorized(),B.isFunction(this.idpProviderInstance.setTokenExpirationAction)&&this.idpProviderInstance.setTokenExpirationAction(),B.isFunction(this.idpProviderInstance.setTokenExpireSoonAction)&&this.idpProviderInstance.setTokenExpireSoonAction()}async startAuthorization(){if(this.idpProviderInstance)return this.idpProviderInstance.login().then(n=>{Et.setNewlyAuthorized(),n&&console.error(n)})}logout(){const n=fn.getStoredAuthData(),r=async c=>{await Dn.handleAuthEvent("onLogout",this.idpProviderInstance.settings,void 0,c),Et.removeAuthData()},o=Ke.getConfigValue(`auth.${Ke.getConfigValue("auth.use")}.logoutFn`),u=Ke.getConfigValueAsync("navigation.profile.logout.customLogoutFn");B.isFunction(o)?o(this.idpProviderInstance.settings,n,r):B.isFunction(this.idpProviderInstance.logout)?this.idpProviderInstance.logout(n,r):u&&B.isFunction(u)?u(n,r):r(this.idpProviderInstance.settings.logoutUrl)}createIdpProviderException(n){return{message:n,name:"IdpProviderException"}}async getIdpProviderInstance(n,r){const o=B.getConfigValueFromObject(r,"idpProvider");if(o){const c=await new o(r);return["login"].forEach(h=>{if(!B.isFunction(c[h]))throw this.createIdpProviderException(`${h} function does not exist in custom IDP Provider ${n}`)}),c}if(B.isFunction(Ke.getConfigValue("auth.events.onAuthConfigError")))await Dn.handleAuthEvent("onAuthConfigError",{idpProviderName:n,type:"IdpProviderException"});else throw this.createIdpProviderException(`IDP Provider ${n} does not exist.`)}unload(){this.idpProviderInstance&&B.isFunction(this.idpProviderInstance.unload)&&this.idpProviderInstance.unload()}resetExpirationChecks(){this.idpProviderInstance&&B.isFunction(this.idpProviderInstance.resetExpirationChecks)&&this.idpProviderInstance.resetExpirationChecks()}}const Fn=new Om,Um={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"}}},Nm=Um,yi={sanitizeHtml(s=""){return s.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'").replace(/javascript:/g,"")},restoreSanitizedBrs(s=""){return s.replace(/<br\/>/g,"<br>").replace(/<br \/>/g,"<br>").replace(/<br>/g,"<br>").replace(/<br >/g,"<br>")},restoreSanitizedElements(s=""){let n=s;const r=["i","b","br","mark","strong","em","small","del","ins","sub","sup"];for(let o=0;o<r.length;o++){const u=new RegExp(`<${r[o]}/>`,"g"),c=new RegExp(`<${r[o]} />`,"g"),h=new RegExp(`<${r[o]}>`,"g"),d=new RegExp(`<${r[o]} >`,"g"),_=new RegExp(`</${r[o]}[/]>`,"g"),v=new RegExp(`</${r[o]} [/]>`,"g"),x=new RegExp(`<[/]${r[o]}>`,"g"),C=new RegExp(`<[/]${r[o]} >`,"g");n=n.replace(u,`<${r[o]}>`).replace(c,`<${r[o]}>`).replace(h,`<${r[o]}>`).replace(d,`<${r[o]}>`).replace(_,`</${r[o]}>`).replace(v,`</${r[o]}>`).replace(x,`</${r[o]}>`).replace(C,`</${r[o]}>`)}return n},sanatizeHtmlExceptTextFormatting(s=""){return this.restoreSanitizedElements(this.sanitizeHtml(s))},sanitizeParam(s=""){return String(s).replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'").replace(/\//g,"/")},escapeKeyForRegexp(s=""){return s.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")},processTextAndLinks(s="",n,r){const u={sanitizedText:this.restoreSanitizedBrs(this.sanitizeHtml(s)),links:[]};return n?Object.entries(n).reduce((c,[h,d])=>{const _=`_luigi_alert_${r}_link_${this.sanitizeParam(h)}`,v=this.restoreSanitizedBrs(this.sanitizeHtml(d.text)),x=`<a id="${_}">${v}</a>`,C=this.escapeKeyForRegexp(h),y=new RegExp(`({${C}})`,"g");return{sanitizedText:c.sanitizedText.replace(y,x),links:c.links.concat({elemId:_,url:d.url?encodeURI(this.sanitizeHtml(d.url)):void 0,dismissKey:d.dismissKey?encodeURI(this.sanitizeHtml(d.dismissKey)):void 0})}},u):u}};class Dm{constructor(n){this.luigi=n,this.currentLocaleStorageKey="luigi.currentLocale",this.defaultLocale="en",this.listeners={},this.translationTable=Nm}_init(){this._initCustomImplementation(),this.addCurrentLocaleChangeListener(n=>{this.broadcastLocaleToAllContainers(n)})}getCurrentLocale(){return sessionStorage.getItem(this.currentLocaleStorageKey)||this.defaultLocale}setCurrentLocale(n,r){var o,u;if(!((o=r==null?void 0:r.clientPermissions)!=null&&o.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)),(u=this.luigi.getEngine()._connector)==null||u.setCurrentLocale(n)}addCurrentLocaleChangeListener(n){let r=null;return B.isFunction(n)?(r=B.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,o=void 0){if(!n)return"";if(this.translationImpl){const c=this.translationImpl.getTranslation(n,r,o);if(c!==n)return c}const u=this.findTranslation(n,this.translationTable,r);return u||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"),B.isFunction(this.translationImpl)&&(this.translationImpl=this.translationImpl())}broadcastLocaleToAllContainers(n){const r=B.getNodeList("luigi-container[lui_container]");r!=null&&r.length&&n&&r.forEach(o=>{o.locale=n,o.updateContext({locale:n})})}findTranslation(n,r,o){const u=n.split(".");for(let c=0;c<u.length;c++){const h=u[c];if(Object.prototype.hasOwnProperty.call(r,h)&&typeof r[h]=="object")r=r[h];else return o?this.findInterpolations(r[h],o):r[h]}}findInterpolations(n,r){return typeof n!="string"||!n.trim()||Object.keys(r).forEach(o=>{n=n.replace(new RegExp("{"+yi.escapeKeyForRegexp(o)+"}","gi"),r[o])}),n}}const Mm={luigiAfterInit:async s=>{B.getConfigBooleanValue(s.getConfig(),"settings.appLoadingIndicator.hideAutomatically")&&setTimeout(()=>{s.ux().hideAppLoadingIndicator()},0),await Ke.executeConfigFnAsync("lifecycleHooks.luigiAfterInit")}};class Fm{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 B.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 pn{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(o){console.warn("onInternalClose threw an error",o)}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(){this._modalStack.pop()}}var Si=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},pr={exports:{}};/**
|
|
2
|
-
* @license
|
|
3
|
-
* Lodash <https://lodash.com/>
|
|
4
|
-
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
|
5
|
-
* Released under MIT license <https://lodash.com/license>
|
|
6
|
-
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|
7
|
-
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
8
|
-
*/var km=pr.exports,Ku;function Wm(){return Ku||(Ku=1,(function(s,n){(function(){var r,o="4.17.23",u=200,c="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",h="Expected a function",d="Invalid `variable` option passed into `_.template`",_="__lodash_hash_undefined__",v=500,x="__lodash_placeholder__",C=1,y=2,I=4,L=1,D=2,F=1,te=2,de=4,oe=8,Oe=16,pe=32,Ue=64,Ce=128,Pe=256,Te=512,_e=30,me="...",$=800,ft=16,ke=1,Re=2,wt=3,b=1/0,Ne=9007199254740991,ee=17976931348623157e292,ve=NaN,Le=4294967295,Ar=Le-1,Rr=Le>>>1,br=[["ary",Ce],["bind",F],["bindKey",te],["curry",oe],["curryRight",Oe],["flip",Te],["partial",pe],["partialRight",Ue],["rearg",Pe]],ae="[object Arguments]",Ct="[object Array]",_n="[object AsyncFunction]",Lt="[object Boolean]",Kn="[object Date]",Hl="[object DOMException]",Ir="[object Error]",Pr="[object Function]",po="[object GeneratorFunction]",gt="[object Map]",Yn="[object Number]",Bl="[object Null]",xt="[object Object]",_o="[object Promise]",Vl="[object Proxy]",Xn="[object RegExp]",dt="[object Set]",Jn="[object String]",Lr="[object Symbol]",Ql="[object Undefined]",Zn="[object WeakMap]",Gl="[object WeakSet]",jn="[object ArrayBuffer]",mn="[object DataView]",$i="[object Float32Array]",Oi="[object Float64Array]",Ui="[object Int8Array]",Ni="[object Int16Array]",Di="[object Int32Array]",Mi="[object Uint8Array]",Fi="[object Uint8ClampedArray]",ki="[object Uint16Array]",Wi="[object Uint32Array]",ql=/\b__p \+= '';/g,zl=/\b(__p \+=) '' \+/g,Kl=/(__e\(.*?\)|\b__t\)) \+\n'';/g,mo=/&(?:amp|lt|gt|quot|#39);/g,vo=/[&<>"']/g,Yl=RegExp(mo.source),Xl=RegExp(vo.source),Jl=/<%-([\s\S]+?)%>/g,Zl=/<%([\s\S]+?)%>/g,So=/<%=([\s\S]+?)%>/g,jl=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ec=/^\w*$/,tc=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Hi=/[\\^$.*+?()[\]{}|]/g,nc=RegExp(Hi.source),Bi=/^\s+/,rc=/\s/,ic=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,sc=/\{\n\/\* \[wrapped with (.+)\] \*/,oc=/,? & /,ac=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,uc=/[()=,{}\[\]\/\s]/,lc=/\\(\\)?/g,cc=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Eo=/\w*$/,hc=/^[-+]0x[0-9a-f]+$/i,fc=/^0b[01]+$/i,gc=/^\[object .+?Constructor\]$/,dc=/^0o[0-7]+$/i,pc=/^(?:0|[1-9]\d*)$/,_c=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,xr=/($^)/,mc=/['\n\r\u2028\u2029\\]/g,$r="\\ud800-\\udfff",vc="\\u0300-\\u036f",Sc="\\ufe20-\\ufe2f",Ec="\\u20d0-\\u20ff",wo=vc+Sc+Ec,Co="\\u2700-\\u27bf",To="a-z\\xdf-\\xf6\\xf8-\\xff",wc="\\xac\\xb1\\xd7\\xf7",Cc="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Tc="\\u2000-\\u206f",yc=" \\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",yo="A-Z\\xc0-\\xd6\\xd8-\\xde",Ao="\\ufe0e\\ufe0f",Ro=wc+Cc+Tc+yc,Vi="['’]",Ac="["+$r+"]",bo="["+Ro+"]",Or="["+wo+"]",Io="\\d+",Rc="["+Co+"]",Po="["+To+"]",Lo="[^"+$r+Ro+Io+Co+To+yo+"]",Qi="\\ud83c[\\udffb-\\udfff]",bc="(?:"+Or+"|"+Qi+")",xo="[^"+$r+"]",Gi="(?:\\ud83c[\\udde6-\\uddff]){2}",qi="[\\ud800-\\udbff][\\udc00-\\udfff]",vn="["+yo+"]",$o="\\u200d",Oo="(?:"+Po+"|"+Lo+")",Ic="(?:"+vn+"|"+Lo+")",Uo="(?:"+Vi+"(?:d|ll|m|re|s|t|ve))?",No="(?:"+Vi+"(?:D|LL|M|RE|S|T|VE))?",Do=bc+"?",Mo="["+Ao+"]?",Pc="(?:"+$o+"(?:"+[xo,Gi,qi].join("|")+")"+Mo+Do+")*",Lc="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",xc="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Fo=Mo+Do+Pc,$c="(?:"+[Rc,Gi,qi].join("|")+")"+Fo,Oc="(?:"+[xo+Or+"?",Or,Gi,qi,Ac].join("|")+")",Uc=RegExp(Vi,"g"),Nc=RegExp(Or,"g"),zi=RegExp(Qi+"(?="+Qi+")|"+Oc+Fo,"g"),Dc=RegExp([vn+"?"+Po+"+"+Uo+"(?="+[bo,vn,"$"].join("|")+")",Ic+"+"+No+"(?="+[bo,vn+Oo,"$"].join("|")+")",vn+"?"+Oo+"+"+Uo,vn+"+"+No,xc,Lc,Io,$c].join("|"),"g"),Mc=RegExp("["+$o+$r+wo+Ao+"]"),Fc=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,kc=["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"],Wc=-1,ce={};ce[$i]=ce[Oi]=ce[Ui]=ce[Ni]=ce[Di]=ce[Mi]=ce[Fi]=ce[ki]=ce[Wi]=!0,ce[ae]=ce[Ct]=ce[jn]=ce[Lt]=ce[mn]=ce[Kn]=ce[Ir]=ce[Pr]=ce[gt]=ce[Yn]=ce[xt]=ce[Xn]=ce[dt]=ce[Jn]=ce[Zn]=!1;var le={};le[ae]=le[Ct]=le[jn]=le[mn]=le[Lt]=le[Kn]=le[$i]=le[Oi]=le[Ui]=le[Ni]=le[Di]=le[gt]=le[Yn]=le[xt]=le[Xn]=le[dt]=le[Jn]=le[Lr]=le[Mi]=le[Fi]=le[ki]=le[Wi]=!0,le[Ir]=le[Pr]=le[Zn]=!1;var Hc={À:"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"},Bc={"&":"&","<":"<",">":">",'"':""","'":"'"},Vc={"&":"&","<":"<",">":">",""":'"',"'":"'"},Qc={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Gc=parseFloat,qc=parseInt,ko=typeof Si=="object"&&Si&&Si.Object===Object&&Si,zc=typeof self=="object"&&self&&self.Object===Object&&self,xe=ko||zc||Function("return this")(),Ki=n&&!n.nodeType&&n,nn=Ki&&!0&&s&&!s.nodeType&&s,Wo=nn&&nn.exports===Ki,Yi=Wo&&ko.process,nt=(function(){try{var S=nn&&nn.require&&nn.require("util").types;return S||Yi&&Yi.binding&&Yi.binding("util")}catch{}})(),Ho=nt&&nt.isArrayBuffer,Bo=nt&&nt.isDate,Vo=nt&&nt.isMap,Qo=nt&&nt.isRegExp,Go=nt&&nt.isSet,qo=nt&&nt.isTypedArray;function Ye(S,T,w){switch(w.length){case 0:return S.call(T);case 1:return S.call(T,w[0]);case 2:return S.call(T,w[0],w[1]);case 3:return S.call(T,w[0],w[1],w[2])}return S.apply(T,w)}function Kc(S,T,w,N){for(var V=-1,ne=S==null?0:S.length;++V<ne;){var ye=S[V];T(N,ye,w(ye),S)}return N}function rt(S,T){for(var w=-1,N=S==null?0:S.length;++w<N&&T(S[w],w,S)!==!1;);return S}function Yc(S,T){for(var w=S==null?0:S.length;w--&&T(S[w],w,S)!==!1;);return S}function zo(S,T){for(var w=-1,N=S==null?0:S.length;++w<N;)if(!T(S[w],w,S))return!1;return!0}function Vt(S,T){for(var w=-1,N=S==null?0:S.length,V=0,ne=[];++w<N;){var ye=S[w];T(ye,w,S)&&(ne[V++]=ye)}return ne}function Ur(S,T){var w=S==null?0:S.length;return!!w&&Sn(S,T,0)>-1}function Xi(S,T,w){for(var N=-1,V=S==null?0:S.length;++N<V;)if(w(T,S[N]))return!0;return!1}function he(S,T){for(var w=-1,N=S==null?0:S.length,V=Array(N);++w<N;)V[w]=T(S[w],w,S);return V}function Qt(S,T){for(var w=-1,N=T.length,V=S.length;++w<N;)S[V+w]=T[w];return S}function Ji(S,T,w,N){var V=-1,ne=S==null?0:S.length;for(N&&ne&&(w=S[++V]);++V<ne;)w=T(w,S[V],V,S);return w}function Xc(S,T,w,N){var V=S==null?0:S.length;for(N&&V&&(w=S[--V]);V--;)w=T(w,S[V],V,S);return w}function Zi(S,T){for(var w=-1,N=S==null?0:S.length;++w<N;)if(T(S[w],w,S))return!0;return!1}var Jc=ji("length");function Zc(S){return S.split("")}function jc(S){return S.match(ac)||[]}function Ko(S,T,w){var N;return w(S,function(V,ne,ye){if(T(V,ne,ye))return N=ne,!1}),N}function Nr(S,T,w,N){for(var V=S.length,ne=w+(N?1:-1);N?ne--:++ne<V;)if(T(S[ne],ne,S))return ne;return-1}function Sn(S,T,w){return T===T?hh(S,T,w):Nr(S,Yo,w)}function eh(S,T,w,N){for(var V=w-1,ne=S.length;++V<ne;)if(N(S[V],T))return V;return-1}function Yo(S){return S!==S}function Xo(S,T){var w=S==null?0:S.length;return w?ts(S,T)/w:ve}function ji(S){return function(T){return T==null?r:T[S]}}function es(S){return function(T){return S==null?r:S[T]}}function Jo(S,T,w,N,V){return V(S,function(ne,ye,ue){w=N?(N=!1,ne):T(w,ne,ye,ue)}),w}function th(S,T){var w=S.length;for(S.sort(T);w--;)S[w]=S[w].value;return S}function ts(S,T){for(var w,N=-1,V=S.length;++N<V;){var ne=T(S[N]);ne!==r&&(w=w===r?ne:w+ne)}return w}function ns(S,T){for(var w=-1,N=Array(S);++w<S;)N[w]=T(w);return N}function nh(S,T){return he(T,function(w){return[w,S[w]]})}function Zo(S){return S&&S.slice(0,na(S)+1).replace(Bi,"")}function Xe(S){return function(T){return S(T)}}function rs(S,T){return he(T,function(w){return S[w]})}function er(S,T){return S.has(T)}function jo(S,T){for(var w=-1,N=S.length;++w<N&&Sn(T,S[w],0)>-1;);return w}function ea(S,T){for(var w=S.length;w--&&Sn(T,S[w],0)>-1;);return w}function rh(S,T){for(var w=S.length,N=0;w--;)S[w]===T&&++N;return N}var ih=es(Hc),sh=es(Bc);function oh(S){return"\\"+Qc[S]}function ah(S,T){return S==null?r:S[T]}function En(S){return Mc.test(S)}function uh(S){return Fc.test(S)}function lh(S){for(var T,w=[];!(T=S.next()).done;)w.push(T.value);return w}function is(S){var T=-1,w=Array(S.size);return S.forEach(function(N,V){w[++T]=[V,N]}),w}function ta(S,T){return function(w){return S(T(w))}}function Gt(S,T){for(var w=-1,N=S.length,V=0,ne=[];++w<N;){var ye=S[w];(ye===T||ye===x)&&(S[w]=x,ne[V++]=w)}return ne}function Dr(S){var T=-1,w=Array(S.size);return S.forEach(function(N){w[++T]=N}),w}function ch(S){var T=-1,w=Array(S.size);return S.forEach(function(N){w[++T]=[N,N]}),w}function hh(S,T,w){for(var N=w-1,V=S.length;++N<V;)if(S[N]===T)return N;return-1}function fh(S,T,w){for(var N=w+1;N--;)if(S[N]===T)return N;return N}function wn(S){return En(S)?dh(S):Jc(S)}function pt(S){return En(S)?ph(S):Zc(S)}function na(S){for(var T=S.length;T--&&rc.test(S.charAt(T)););return T}var gh=es(Vc);function dh(S){for(var T=zi.lastIndex=0;zi.test(S);)++T;return T}function ph(S){return S.match(zi)||[]}function _h(S){return S.match(Dc)||[]}var mh=(function S(T){T=T==null?xe:Cn.defaults(xe.Object(),T,Cn.pick(xe,kc));var w=T.Array,N=T.Date,V=T.Error,ne=T.Function,ye=T.Math,ue=T.Object,ss=T.RegExp,vh=T.String,it=T.TypeError,Mr=w.prototype,Sh=ne.prototype,Tn=ue.prototype,Fr=T["__core-js_shared__"],kr=Sh.toString,re=Tn.hasOwnProperty,Eh=0,ra=(function(){var e=/[^.]+$/.exec(Fr&&Fr.keys&&Fr.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})(),Wr=Tn.toString,wh=kr.call(ue),Ch=xe._,Th=ss("^"+kr.call(re).replace(Hi,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Hr=Wo?T.Buffer:r,qt=T.Symbol,Br=T.Uint8Array,ia=Hr?Hr.allocUnsafe:r,Vr=ta(ue.getPrototypeOf,ue),sa=ue.create,oa=Tn.propertyIsEnumerable,Qr=Mr.splice,aa=qt?qt.isConcatSpreadable:r,tr=qt?qt.iterator:r,rn=qt?qt.toStringTag:r,Gr=(function(){try{var e=ln(ue,"defineProperty");return e({},"",{}),e}catch{}})(),yh=T.clearTimeout!==xe.clearTimeout&&T.clearTimeout,Ah=N&&N.now!==xe.Date.now&&N.now,Rh=T.setTimeout!==xe.setTimeout&&T.setTimeout,qr=ye.ceil,zr=ye.floor,os=ue.getOwnPropertySymbols,bh=Hr?Hr.isBuffer:r,ua=T.isFinite,Ih=Mr.join,Ph=ta(ue.keys,ue),Ae=ye.max,De=ye.min,Lh=N.now,xh=T.parseInt,la=ye.random,$h=Mr.reverse,as=ln(T,"DataView"),nr=ln(T,"Map"),us=ln(T,"Promise"),yn=ln(T,"Set"),rr=ln(T,"WeakMap"),ir=ln(ue,"create"),Kr=rr&&new rr,An={},Oh=cn(as),Uh=cn(nr),Nh=cn(us),Dh=cn(yn),Mh=cn(rr),Yr=qt?qt.prototype:r,sr=Yr?Yr.valueOf:r,ca=Yr?Yr.toString:r;function f(e){if(ge(e)&&!G(e)&&!(e instanceof Z)){if(e instanceof st)return e;if(re.call(e,"__wrapped__"))return hu(e)}return new st(e)}var Rn=(function(){function e(){}return function(t){if(!fe(t))return{};if(sa)return sa(t);e.prototype=t;var i=new e;return e.prototype=r,i}})();function Xr(){}function st(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=r}f.templateSettings={escape:Jl,evaluate:Zl,interpolate:So,variable:"",imports:{_:f}},f.prototype=Xr.prototype,f.prototype.constructor=f,st.prototype=Rn(Xr.prototype),st.prototype.constructor=st;function Z(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Le,this.__views__=[]}function Fh(){var e=new Z(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 kh(){if(this.__filtered__){var e=new Z(this);e.__dir__=-1,e.__filtered__=!0}else e=this.clone(),e.__dir__*=-1;return e}function Wh(){var e=this.__wrapped__.value(),t=this.__dir__,i=G(e),a=t<0,l=i?e.length:0,g=jf(0,l,this.__views__),p=g.start,m=g.end,E=m-p,A=a?m:p-1,R=this.__iteratees__,P=R.length,U=0,M=De(E,this.__takeCount__);if(!i||!a&&l==E&&M==E)return Ua(e,this.__actions__);var W=[];e:for(;E--&&U<M;){A+=t;for(var K=-1,H=e[A];++K<P;){var X=R[K],j=X.iteratee,je=X.type,Be=j(H);if(je==Re)H=Be;else if(!Be){if(je==ke)continue e;break e}}W[U++]=H}return W}Z.prototype=Rn(Xr.prototype),Z.prototype.constructor=Z;function sn(e){var t=-1,i=e==null?0:e.length;for(this.clear();++t<i;){var a=e[t];this.set(a[0],a[1])}}function Hh(){this.__data__=ir?ir(null):{},this.size=0}function Bh(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}function Vh(e){var t=this.__data__;if(ir){var i=t[e];return i===_?r:i}return re.call(t,e)?t[e]:r}function Qh(e){var t=this.__data__;return ir?t[e]!==r:re.call(t,e)}function Gh(e,t){var i=this.__data__;return this.size+=this.has(e)?0:1,i[e]=ir&&t===r?_:t,this}sn.prototype.clear=Hh,sn.prototype.delete=Bh,sn.prototype.get=Vh,sn.prototype.has=Qh,sn.prototype.set=Gh;function $t(e){var t=-1,i=e==null?0:e.length;for(this.clear();++t<i;){var a=e[t];this.set(a[0],a[1])}}function qh(){this.__data__=[],this.size=0}function zh(e){var t=this.__data__,i=Jr(t,e);if(i<0)return!1;var a=t.length-1;return i==a?t.pop():Qr.call(t,i,1),--this.size,!0}function Kh(e){var t=this.__data__,i=Jr(t,e);return i<0?r:t[i][1]}function Yh(e){return Jr(this.__data__,e)>-1}function Xh(e,t){var i=this.__data__,a=Jr(i,e);return a<0?(++this.size,i.push([e,t])):i[a][1]=t,this}$t.prototype.clear=qh,$t.prototype.delete=zh,$t.prototype.get=Kh,$t.prototype.has=Yh,$t.prototype.set=Xh;function Ot(e){var t=-1,i=e==null?0:e.length;for(this.clear();++t<i;){var a=e[t];this.set(a[0],a[1])}}function Jh(){this.size=0,this.__data__={hash:new sn,map:new(nr||$t),string:new sn}}function Zh(e){var t=li(this,e).delete(e);return this.size-=t?1:0,t}function jh(e){return li(this,e).get(e)}function ef(e){return li(this,e).has(e)}function tf(e,t){var i=li(this,e),a=i.size;return i.set(e,t),this.size+=i.size==a?0:1,this}Ot.prototype.clear=Jh,Ot.prototype.delete=Zh,Ot.prototype.get=jh,Ot.prototype.has=ef,Ot.prototype.set=tf;function on(e){var t=-1,i=e==null?0:e.length;for(this.__data__=new Ot;++t<i;)this.add(e[t])}function nf(e){return this.__data__.set(e,_),this}function rf(e){return this.__data__.has(e)}on.prototype.add=on.prototype.push=nf,on.prototype.has=rf;function _t(e){var t=this.__data__=new $t(e);this.size=t.size}function sf(){this.__data__=new $t,this.size=0}function of(e){var t=this.__data__,i=t.delete(e);return this.size=t.size,i}function af(e){return this.__data__.get(e)}function uf(e){return this.__data__.has(e)}function lf(e,t){var i=this.__data__;if(i instanceof $t){var a=i.__data__;if(!nr||a.length<u-1)return a.push([e,t]),this.size=++i.size,this;i=this.__data__=new Ot(a)}return i.set(e,t),this.size=i.size,this}_t.prototype.clear=sf,_t.prototype.delete=of,_t.prototype.get=af,_t.prototype.has=uf,_t.prototype.set=lf;function ha(e,t){var i=G(e),a=!i&&hn(e),l=!i&&!a&&Jt(e),g=!i&&!a&&!l&&Ln(e),p=i||a||l||g,m=p?ns(e.length,vh):[],E=m.length;for(var A in e)(t||re.call(e,A))&&!(p&&(A=="length"||l&&(A=="offset"||A=="parent")||g&&(A=="buffer"||A=="byteLength"||A=="byteOffset")||Mt(A,E)))&&m.push(A);return m}function fa(e){var t=e.length;return t?e[Ss(0,t-1)]:r}function cf(e,t){return ci(Qe(e),an(t,0,e.length))}function hf(e){return ci(Qe(e))}function ls(e,t,i){(i!==r&&!mt(e[t],i)||i===r&&!(t in e))&&Ut(e,t,i)}function or(e,t,i){var a=e[t];(!(re.call(e,t)&&mt(a,i))||i===r&&!(t in e))&&Ut(e,t,i)}function Jr(e,t){for(var i=e.length;i--;)if(mt(e[i][0],t))return i;return-1}function ff(e,t,i,a){return zt(e,function(l,g,p){t(a,l,i(l),p)}),a}function ga(e,t){return e&&yt(t,be(t),e)}function gf(e,t){return e&&yt(t,qe(t),e)}function Ut(e,t,i){t=="__proto__"&&Gr?Gr(e,t,{configurable:!0,enumerable:!0,value:i,writable:!0}):e[t]=i}function cs(e,t){for(var i=-1,a=t.length,l=w(a),g=e==null;++i<a;)l[i]=g?r:Qs(e,t[i]);return l}function an(e,t,i){return e===e&&(i!==r&&(e=e<=i?e:i),t!==r&&(e=e>=t?e:t)),e}function ot(e,t,i,a,l,g){var p,m=t&C,E=t&y,A=t&I;if(i&&(p=l?i(e,a,l,g):i(e)),p!==r)return p;if(!fe(e))return e;var R=G(e);if(R){if(p=tg(e),!m)return Qe(e,p)}else{var P=Me(e),U=P==Pr||P==po;if(Jt(e))return Ma(e,m);if(P==xt||P==ae||U&&!l){if(p=E||U?{}:nu(e),!m)return E?Qf(e,gf(p,e)):Vf(e,ga(p,e))}else{if(!le[P])return l?e:{};p=ng(e,P,m)}}g||(g=new _t);var M=g.get(e);if(M)return M;g.set(e,p),xu(e)?e.forEach(function(H){p.add(ot(H,t,i,H,e,g))}):Pu(e)&&e.forEach(function(H,X){p.set(X,ot(H,t,i,X,e,g))});var W=A?E?Ls:Ps:E?qe:be,K=R?r:W(e);return rt(K||e,function(H,X){K&&(X=H,H=e[X]),or(p,X,ot(H,t,i,X,e,g))}),p}function df(e){var t=be(e);return function(i){return da(i,e,t)}}function da(e,t,i){var a=i.length;if(e==null)return!a;for(e=ue(e);a--;){var l=i[a],g=t[l],p=e[l];if(p===r&&!(l in e)||!g(p))return!1}return!0}function pa(e,t,i){if(typeof e!="function")throw new it(h);return gr(function(){e.apply(r,i)},t)}function ar(e,t,i,a){var l=-1,g=Ur,p=!0,m=e.length,E=[],A=t.length;if(!m)return E;i&&(t=he(t,Xe(i))),a?(g=Xi,p=!1):t.length>=u&&(g=er,p=!1,t=new on(t));e:for(;++l<m;){var R=e[l],P=i==null?R:i(R);if(R=a||R!==0?R:0,p&&P===P){for(var U=A;U--;)if(t[U]===P)continue e;E.push(R)}else g(t,P,a)||E.push(R)}return E}var zt=Ba(Tt),_a=Ba(fs,!0);function pf(e,t){var i=!0;return zt(e,function(a,l,g){return i=!!t(a,l,g),i}),i}function Zr(e,t,i){for(var a=-1,l=e.length;++a<l;){var g=e[a],p=t(g);if(p!=null&&(m===r?p===p&&!Ze(p):i(p,m)))var m=p,E=g}return E}function _f(e,t,i,a){var l=e.length;for(i=z(i),i<0&&(i=-i>l?0:l+i),a=a===r||a>l?l:z(a),a<0&&(a+=l),a=i>a?0:Ou(a);i<a;)e[i++]=t;return e}function ma(e,t){var i=[];return zt(e,function(a,l,g){t(a,l,g)&&i.push(a)}),i}function $e(e,t,i,a,l){var g=-1,p=e.length;for(i||(i=ig),l||(l=[]);++g<p;){var m=e[g];t>0&&i(m)?t>1?$e(m,t-1,i,a,l):Qt(l,m):a||(l[l.length]=m)}return l}var hs=Va(),va=Va(!0);function Tt(e,t){return e&&hs(e,t,be)}function fs(e,t){return e&&va(e,t,be)}function jr(e,t){return Vt(t,function(i){return Ft(e[i])})}function un(e,t){t=Yt(t,e);for(var i=0,a=t.length;e!=null&&i<a;)e=e[At(t[i++])];return i&&i==a?e:r}function Sa(e,t,i){var a=t(e);return G(e)?a:Qt(a,i(e))}function We(e){return e==null?e===r?Ql:Bl:rn&&rn in ue(e)?Zf(e):hg(e)}function gs(e,t){return e>t}function mf(e,t){return e!=null&&re.call(e,t)}function vf(e,t){return e!=null&&t in ue(e)}function Sf(e,t,i){return e>=De(t,i)&&e<Ae(t,i)}function ds(e,t,i){for(var a=i?Xi:Ur,l=e[0].length,g=e.length,p=g,m=w(g),E=1/0,A=[];p--;){var R=e[p];p&&t&&(R=he(R,Xe(t))),E=De(R.length,E),m[p]=!i&&(t||l>=120&&R.length>=120)?new on(p&&R):r}R=e[0];var P=-1,U=m[0];e:for(;++P<l&&A.length<E;){var M=R[P],W=t?t(M):M;if(M=i||M!==0?M:0,!(U?er(U,W):a(A,W,i))){for(p=g;--p;){var K=m[p];if(!(K?er(K,W):a(e[p],W,i)))continue e}U&&U.push(W),A.push(M)}}return A}function Ef(e,t,i,a){return Tt(e,function(l,g,p){t(a,i(l),g,p)}),a}function ur(e,t,i){t=Yt(t,e),e=ou(e,t);var a=e==null?e:e[At(ut(t))];return a==null?r:Ye(a,e,i)}function Ea(e){return ge(e)&&We(e)==ae}function wf(e){return ge(e)&&We(e)==jn}function Cf(e){return ge(e)&&We(e)==Kn}function lr(e,t,i,a,l){return e===t?!0:e==null||t==null||!ge(e)&&!ge(t)?e!==e&&t!==t:Tf(e,t,i,a,lr,l)}function Tf(e,t,i,a,l,g){var p=G(e),m=G(t),E=p?Ct:Me(e),A=m?Ct:Me(t);E=E==ae?xt:E,A=A==ae?xt:A;var R=E==xt,P=A==xt,U=E==A;if(U&&Jt(e)){if(!Jt(t))return!1;p=!0,R=!1}if(U&&!R)return g||(g=new _t),p||Ln(e)?ja(e,t,i,a,l,g):Xf(e,t,E,i,a,l,g);if(!(i&L)){var M=R&&re.call(e,"__wrapped__"),W=P&&re.call(t,"__wrapped__");if(M||W){var K=M?e.value():e,H=W?t.value():t;return g||(g=new _t),l(K,H,i,a,g)}}return U?(g||(g=new _t),Jf(e,t,i,a,l,g)):!1}function yf(e){return ge(e)&&Me(e)==gt}function ps(e,t,i,a){var l=i.length,g=l,p=!a;if(e==null)return!g;for(e=ue(e);l--;){var m=i[l];if(p&&m[2]?m[1]!==e[m[0]]:!(m[0]in e))return!1}for(;++l<g;){m=i[l];var E=m[0],A=e[E],R=m[1];if(p&&m[2]){if(A===r&&!(E in e))return!1}else{var P=new _t;if(a)var U=a(A,R,E,e,t,P);if(!(U===r?lr(R,A,L|D,a,P):U))return!1}}return!0}function wa(e){if(!fe(e)||og(e))return!1;var t=Ft(e)?Th:gc;return t.test(cn(e))}function Af(e){return ge(e)&&We(e)==Xn}function Rf(e){return ge(e)&&Me(e)==dt}function bf(e){return ge(e)&&_i(e.length)&&!!ce[We(e)]}function Ca(e){return typeof e=="function"?e:e==null?ze:typeof e=="object"?G(e)?Aa(e[0],e[1]):ya(e):Qu(e)}function _s(e){if(!fr(e))return Ph(e);var t=[];for(var i in ue(e))re.call(e,i)&&i!="constructor"&&t.push(i);return t}function If(e){if(!fe(e))return cg(e);var t=fr(e),i=[];for(var a in e)a=="constructor"&&(t||!re.call(e,a))||i.push(a);return i}function ms(e,t){return e<t}function Ta(e,t){var i=-1,a=Ge(e)?w(e.length):[];return zt(e,function(l,g,p){a[++i]=t(l,g,p)}),a}function ya(e){var t=$s(e);return t.length==1&&t[0][2]?iu(t[0][0],t[0][1]):function(i){return i===e||ps(i,e,t)}}function Aa(e,t){return Us(e)&&ru(t)?iu(At(e),t):function(i){var a=Qs(i,e);return a===r&&a===t?Gs(i,e):lr(t,a,L|D)}}function ei(e,t,i,a,l){e!==t&&hs(t,function(g,p){if(l||(l=new _t),fe(g))Pf(e,t,p,i,ei,a,l);else{var m=a?a(Ds(e,p),g,p+"",e,t,l):r;m===r&&(m=g),ls(e,p,m)}},qe)}function Pf(e,t,i,a,l,g,p){var m=Ds(e,i),E=Ds(t,i),A=p.get(E);if(A){ls(e,i,A);return}var R=g?g(m,E,i+"",e,t,p):r,P=R===r;if(P){var U=G(E),M=!U&&Jt(E),W=!U&&!M&&Ln(E);R=E,U||M||W?G(m)?R=m:Se(m)?R=Qe(m):M?(P=!1,R=Ma(E,!0)):W?(P=!1,R=Fa(E,!0)):R=[]:dr(E)||hn(E)?(R=m,hn(m)?R=Uu(m):(!fe(m)||Ft(m))&&(R=nu(E))):P=!1}P&&(p.set(E,R),l(R,E,a,g,p),p.delete(E)),ls(e,i,R)}function Ra(e,t){var i=e.length;if(i)return t+=t<0?i:0,Mt(t,i)?e[t]:r}function ba(e,t,i){t.length?t=he(t,function(g){return G(g)?function(p){return un(p,g.length===1?g[0]:g)}:g}):t=[ze];var a=-1;t=he(t,Xe(k()));var l=Ta(e,function(g,p,m){var E=he(t,function(A){return A(g)});return{criteria:E,index:++a,value:g}});return th(l,function(g,p){return Bf(g,p,i)})}function Lf(e,t){return Ia(e,t,function(i,a){return Gs(e,a)})}function Ia(e,t,i){for(var a=-1,l=t.length,g={};++a<l;){var p=t[a],m=un(e,p);i(m,p)&&cr(g,Yt(p,e),m)}return g}function xf(e){return function(t){return un(t,e)}}function vs(e,t,i,a){var l=a?eh:Sn,g=-1,p=t.length,m=e;for(e===t&&(t=Qe(t)),i&&(m=he(e,Xe(i)));++g<p;)for(var E=0,A=t[g],R=i?i(A):A;(E=l(m,R,E,a))>-1;)m!==e&&Qr.call(m,E,1),Qr.call(e,E,1);return e}function Pa(e,t){for(var i=e?t.length:0,a=i-1;i--;){var l=t[i];if(i==a||l!==g){var g=l;Mt(l)?Qr.call(e,l,1):Cs(e,l)}}return e}function Ss(e,t){return e+zr(la()*(t-e+1))}function $f(e,t,i,a){for(var l=-1,g=Ae(qr((t-e)/(i||1)),0),p=w(g);g--;)p[a?g:++l]=e,e+=i;return p}function Es(e,t){var i="";if(!e||t<1||t>Ne)return i;do t%2&&(i+=e),t=zr(t/2),t&&(e+=e);while(t);return i}function Y(e,t){return Ms(su(e,t,ze),e+"")}function Of(e){return fa(xn(e))}function Uf(e,t){var i=xn(e);return ci(i,an(t,0,i.length))}function cr(e,t,i,a){if(!fe(e))return e;t=Yt(t,e);for(var l=-1,g=t.length,p=g-1,m=e;m!=null&&++l<g;){var E=At(t[l]),A=i;if(E==="__proto__"||E==="constructor"||E==="prototype")return e;if(l!=p){var R=m[E];A=a?a(R,E,m):r,A===r&&(A=fe(R)?R:Mt(t[l+1])?[]:{})}or(m,E,A),m=m[E]}return e}var La=Kr?function(e,t){return Kr.set(e,t),e}:ze,Nf=Gr?function(e,t){return Gr(e,"toString",{configurable:!0,enumerable:!1,value:zs(t),writable:!0})}:ze;function Df(e){return ci(xn(e))}function at(e,t,i){var a=-1,l=e.length;t<0&&(t=-t>l?0:l+t),i=i>l?l:i,i<0&&(i+=l),l=t>i?0:i-t>>>0,t>>>=0;for(var g=w(l);++a<l;)g[a]=e[a+t];return g}function Mf(e,t){var i;return zt(e,function(a,l,g){return i=t(a,l,g),!i}),!!i}function ti(e,t,i){var a=0,l=e==null?a:e.length;if(typeof t=="number"&&t===t&&l<=Rr){for(;a<l;){var g=a+l>>>1,p=e[g];p!==null&&!Ze(p)&&(i?p<=t:p<t)?a=g+1:l=g}return l}return ws(e,t,ze,i)}function ws(e,t,i,a){var l=0,g=e==null?0:e.length;if(g===0)return 0;t=i(t);for(var p=t!==t,m=t===null,E=Ze(t),A=t===r;l<g;){var R=zr((l+g)/2),P=i(e[R]),U=P!==r,M=P===null,W=P===P,K=Ze(P);if(p)var H=a||W;else A?H=W&&(a||U):m?H=W&&U&&(a||!M):E?H=W&&U&&!M&&(a||!K):M||K?H=!1:H=a?P<=t:P<t;H?l=R+1:g=R}return De(g,Ar)}function xa(e,t){for(var i=-1,a=e.length,l=0,g=[];++i<a;){var p=e[i],m=t?t(p):p;if(!i||!mt(m,E)){var E=m;g[l++]=p===0?0:p}}return g}function $a(e){return typeof e=="number"?e:Ze(e)?ve:+e}function Je(e){if(typeof e=="string")return e;if(G(e))return he(e,Je)+"";if(Ze(e))return ca?ca.call(e):"";var t=e+"";return t=="0"&&1/e==-b?"-0":t}function Kt(e,t,i){var a=-1,l=Ur,g=e.length,p=!0,m=[],E=m;if(i)p=!1,l=Xi;else if(g>=u){var A=t?null:Kf(e);if(A)return Dr(A);p=!1,l=er,E=new on}else E=t?[]:m;e:for(;++a<g;){var R=e[a],P=t?t(R):R;if(R=i||R!==0?R:0,p&&P===P){for(var U=E.length;U--;)if(E[U]===P)continue e;t&&E.push(P),m.push(R)}else l(E,P,i)||(E!==m&&E.push(P),m.push(R))}return m}function Cs(e,t){t=Yt(t,e);var i=-1,a=t.length;if(!a)return!0;for(var l=e==null||typeof e!="object"&&typeof e!="function";++i<a;){var g=t[i];if(typeof g=="string"){if(g==="__proto__"&&!re.call(e,"__proto__"))return!1;if(g==="constructor"&&i+1<a&&typeof t[i+1]=="string"&&t[i+1]==="prototype"){if(l&&i===0)continue;return!1}}}var p=ou(e,t);return p==null||delete p[At(ut(t))]}function Oa(e,t,i,a){return cr(e,t,i(un(e,t)),a)}function ni(e,t,i,a){for(var l=e.length,g=a?l:-1;(a?g--:++g<l)&&t(e[g],g,e););return i?at(e,a?0:g,a?g+1:l):at(e,a?g+1:0,a?l:g)}function Ua(e,t){var i=e;return i instanceof Z&&(i=i.value()),Ji(t,function(a,l){return l.func.apply(l.thisArg,Qt([a],l.args))},i)}function Ts(e,t,i){var a=e.length;if(a<2)return a?Kt(e[0]):[];for(var l=-1,g=w(a);++l<a;)for(var p=e[l],m=-1;++m<a;)m!=l&&(g[l]=ar(g[l]||p,e[m],t,i));return Kt($e(g,1),t,i)}function Na(e,t,i){for(var a=-1,l=e.length,g=t.length,p={};++a<l;){var m=a<g?t[a]:r;i(p,e[a],m)}return p}function ys(e){return Se(e)?e:[]}function As(e){return typeof e=="function"?e:ze}function Yt(e,t){return G(e)?e:Us(e,t)?[e]:cu(ie(e))}var Ff=Y;function Xt(e,t,i){var a=e.length;return i=i===r?a:i,!t&&i>=a?e:at(e,t,i)}var Da=yh||function(e){return xe.clearTimeout(e)};function Ma(e,t){if(t)return e.slice();var i=e.length,a=ia?ia(i):new e.constructor(i);return e.copy(a),a}function Rs(e){var t=new e.constructor(e.byteLength);return new Br(t).set(new Br(e)),t}function kf(e,t){var i=t?Rs(e.buffer):e.buffer;return new e.constructor(i,e.byteOffset,e.byteLength)}function Wf(e){var t=new e.constructor(e.source,Eo.exec(e));return t.lastIndex=e.lastIndex,t}function Hf(e){return sr?ue(sr.call(e)):{}}function Fa(e,t){var i=t?Rs(e.buffer):e.buffer;return new e.constructor(i,e.byteOffset,e.length)}function ka(e,t){if(e!==t){var i=e!==r,a=e===null,l=e===e,g=Ze(e),p=t!==r,m=t===null,E=t===t,A=Ze(t);if(!m&&!A&&!g&&e>t||g&&p&&E&&!m&&!A||a&&p&&E||!i&&E||!l)return 1;if(!a&&!g&&!A&&e<t||A&&i&&l&&!a&&!g||m&&i&&l||!p&&l||!E)return-1}return 0}function Bf(e,t,i){for(var a=-1,l=e.criteria,g=t.criteria,p=l.length,m=i.length;++a<p;){var E=ka(l[a],g[a]);if(E){if(a>=m)return E;var A=i[a];return E*(A=="desc"?-1:1)}}return e.index-t.index}function Wa(e,t,i,a){for(var l=-1,g=e.length,p=i.length,m=-1,E=t.length,A=Ae(g-p,0),R=w(E+A),P=!a;++m<E;)R[m]=t[m];for(;++l<p;)(P||l<g)&&(R[i[l]]=e[l]);for(;A--;)R[m++]=e[l++];return R}function Ha(e,t,i,a){for(var l=-1,g=e.length,p=-1,m=i.length,E=-1,A=t.length,R=Ae(g-m,0),P=w(R+A),U=!a;++l<R;)P[l]=e[l];for(var M=l;++E<A;)P[M+E]=t[E];for(;++p<m;)(U||l<g)&&(P[M+i[p]]=e[l++]);return P}function Qe(e,t){var i=-1,a=e.length;for(t||(t=w(a));++i<a;)t[i]=e[i];return t}function yt(e,t,i,a){var l=!i;i||(i={});for(var g=-1,p=t.length;++g<p;){var m=t[g],E=a?a(i[m],e[m],m,i,e):r;E===r&&(E=e[m]),l?Ut(i,m,E):or(i,m,E)}return i}function Vf(e,t){return yt(e,Os(e),t)}function Qf(e,t){return yt(e,eu(e),t)}function ri(e,t){return function(i,a){var l=G(i)?Kc:ff,g=t?t():{};return l(i,e,k(a,2),g)}}function bn(e){return Y(function(t,i){var a=-1,l=i.length,g=l>1?i[l-1]:r,p=l>2?i[2]:r;for(g=e.length>3&&typeof g=="function"?(l--,g):r,p&&He(i[0],i[1],p)&&(g=l<3?r:g,l=1),t=ue(t);++a<l;){var m=i[a];m&&e(t,m,a,g)}return t})}function Ba(e,t){return function(i,a){if(i==null)return i;if(!Ge(i))return e(i,a);for(var l=i.length,g=t?l:-1,p=ue(i);(t?g--:++g<l)&&a(p[g],g,p)!==!1;);return i}}function Va(e){return function(t,i,a){for(var l=-1,g=ue(t),p=a(t),m=p.length;m--;){var E=p[e?m:++l];if(i(g[E],E,g)===!1)break}return t}}function Gf(e,t,i){var a=t&F,l=hr(e);function g(){var p=this&&this!==xe&&this instanceof g?l:e;return p.apply(a?i:this,arguments)}return g}function Qa(e){return function(t){t=ie(t);var i=En(t)?pt(t):r,a=i?i[0]:t.charAt(0),l=i?Xt(i,1).join(""):t.slice(1);return a[e]()+l}}function In(e){return function(t){return Ji(Bu(Hu(t).replace(Uc,"")),e,"")}}function hr(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 i=Rn(e.prototype),a=e.apply(i,t);return fe(a)?a:i}}function qf(e,t,i){var a=hr(e);function l(){for(var g=arguments.length,p=w(g),m=g,E=Pn(l);m--;)p[m]=arguments[m];var A=g<3&&p[0]!==E&&p[g-1]!==E?[]:Gt(p,E);if(g-=A.length,g<i)return Ya(e,t,ii,l.placeholder,r,p,A,r,r,i-g);var R=this&&this!==xe&&this instanceof l?a:e;return Ye(R,this,p)}return l}function Ga(e){return function(t,i,a){var l=ue(t);if(!Ge(t)){var g=k(i,3);t=be(t),i=function(m){return g(l[m],m,l)}}var p=e(t,i,a);return p>-1?l[g?t[p]:p]:r}}function qa(e){return Dt(function(t){var i=t.length,a=i,l=st.prototype.thru;for(e&&t.reverse();a--;){var g=t[a];if(typeof g!="function")throw new it(h);if(l&&!p&&ui(g)=="wrapper")var p=new st([],!0)}for(a=p?a:i;++a<i;){g=t[a];var m=ui(g),E=m=="wrapper"?xs(g):r;E&&Ns(E[0])&&E[1]==(Ce|oe|pe|Pe)&&!E[4].length&&E[9]==1?p=p[ui(E[0])].apply(p,E[3]):p=g.length==1&&Ns(g)?p[m]():p.thru(g)}return function(){var A=arguments,R=A[0];if(p&&A.length==1&&G(R))return p.plant(R).value();for(var P=0,U=i?t[P].apply(this,A):R;++P<i;)U=t[P].call(this,U);return U}})}function ii(e,t,i,a,l,g,p,m,E,A){var R=t&Ce,P=t&F,U=t&te,M=t&(oe|Oe),W=t&Te,K=U?r:hr(e);function H(){for(var X=arguments.length,j=w(X),je=X;je--;)j[je]=arguments[je];if(M)var Be=Pn(H),et=rh(j,Be);if(a&&(j=Wa(j,a,l,M)),g&&(j=Ha(j,g,p,M)),X-=et,M&&X<A){var Ee=Gt(j,Be);return Ya(e,t,ii,H.placeholder,i,j,Ee,m,E,A-X)}var vt=P?i:this,Wt=U?vt[e]:e;return X=j.length,m?j=fg(j,m):W&&X>1&&j.reverse(),R&&E<X&&(j.length=E),this&&this!==xe&&this instanceof H&&(Wt=K||hr(Wt)),Wt.apply(vt,j)}return H}function za(e,t){return function(i,a){return Ef(i,e,t(a),{})}}function si(e,t){return function(i,a){var l;if(i===r&&a===r)return t;if(i!==r&&(l=i),a!==r){if(l===r)return a;typeof i=="string"||typeof a=="string"?(i=Je(i),a=Je(a)):(i=$a(i),a=$a(a)),l=e(i,a)}return l}}function bs(e){return Dt(function(t){return t=he(t,Xe(k())),Y(function(i){var a=this;return e(t,function(l){return Ye(l,a,i)})})})}function oi(e,t){t=t===r?" ":Je(t);var i=t.length;if(i<2)return i?Es(t,e):t;var a=Es(t,qr(e/wn(t)));return En(t)?Xt(pt(a),0,e).join(""):a.slice(0,e)}function zf(e,t,i,a){var l=t&F,g=hr(e);function p(){for(var m=-1,E=arguments.length,A=-1,R=a.length,P=w(R+E),U=this&&this!==xe&&this instanceof p?g:e;++A<R;)P[A]=a[A];for(;E--;)P[A++]=arguments[++m];return Ye(U,l?i:this,P)}return p}function Ka(e){return function(t,i,a){return a&&typeof a!="number"&&He(t,i,a)&&(i=a=r),t=kt(t),i===r?(i=t,t=0):i=kt(i),a=a===r?t<i?1:-1:kt(a),$f(t,i,a,e)}}function ai(e){return function(t,i){return typeof t=="string"&&typeof i=="string"||(t=lt(t),i=lt(i)),e(t,i)}}function Ya(e,t,i,a,l,g,p,m,E,A){var R=t&oe,P=R?p:r,U=R?r:p,M=R?g:r,W=R?r:g;t|=R?pe:Ue,t&=~(R?Ue:pe),t&de||(t&=-4);var K=[e,t,l,M,P,W,U,m,E,A],H=i.apply(r,K);return Ns(e)&&au(H,K),H.placeholder=a,uu(H,e,t)}function Is(e){var t=ye[e];return function(i,a){if(i=lt(i),a=a==null?0:De(z(a),292),a&&ua(i)){var l=(ie(i)+"e").split("e"),g=t(l[0]+"e"+(+l[1]+a));return l=(ie(g)+"e").split("e"),+(l[0]+"e"+(+l[1]-a))}return t(i)}}var Kf=yn&&1/Dr(new yn([,-0]))[1]==b?function(e){return new yn(e)}:Xs;function Xa(e){return function(t){var i=Me(t);return i==gt?is(t):i==dt?ch(t):nh(t,e(t))}}function Nt(e,t,i,a,l,g,p,m){var E=t&te;if(!E&&typeof e!="function")throw new it(h);var A=a?a.length:0;if(A||(t&=-97,a=l=r),p=p===r?p:Ae(z(p),0),m=m===r?m:z(m),A-=l?l.length:0,t&Ue){var R=a,P=l;a=l=r}var U=E?r:xs(e),M=[e,t,i,a,l,R,P,g,p,m];if(U&&lg(M,U),e=M[0],t=M[1],i=M[2],a=M[3],l=M[4],m=M[9]=M[9]===r?E?0:e.length:Ae(M[9]-A,0),!m&&t&(oe|Oe)&&(t&=-25),!t||t==F)var W=Gf(e,t,i);else t==oe||t==Oe?W=qf(e,t,m):(t==pe||t==(F|pe))&&!l.length?W=zf(e,t,i,a):W=ii.apply(r,M);var K=U?La:au;return uu(K(W,M),e,t)}function Ja(e,t,i,a){return e===r||mt(e,Tn[i])&&!re.call(a,i)?t:e}function Za(e,t,i,a,l,g){return fe(e)&&fe(t)&&(g.set(t,e),ei(e,t,r,Za,g),g.delete(t)),e}function Yf(e){return dr(e)?r:e}function ja(e,t,i,a,l,g){var p=i&L,m=e.length,E=t.length;if(m!=E&&!(p&&E>m))return!1;var A=g.get(e),R=g.get(t);if(A&&R)return A==t&&R==e;var P=-1,U=!0,M=i&D?new on:r;for(g.set(e,t),g.set(t,e);++P<m;){var W=e[P],K=t[P];if(a)var H=p?a(K,W,P,t,e,g):a(W,K,P,e,t,g);if(H!==r){if(H)continue;U=!1;break}if(M){if(!Zi(t,function(X,j){if(!er(M,j)&&(W===X||l(W,X,i,a,g)))return M.push(j)})){U=!1;break}}else if(!(W===K||l(W,K,i,a,g))){U=!1;break}}return g.delete(e),g.delete(t),U}function Xf(e,t,i,a,l,g,p){switch(i){case mn:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case jn:return!(e.byteLength!=t.byteLength||!g(new Br(e),new Br(t)));case Lt:case Kn:case Yn:return mt(+e,+t);case Ir:return e.name==t.name&&e.message==t.message;case Xn:case Jn:return e==t+"";case gt:var m=is;case dt:var E=a&L;if(m||(m=Dr),e.size!=t.size&&!E)return!1;var A=p.get(e);if(A)return A==t;a|=D,p.set(e,t);var R=ja(m(e),m(t),a,l,g,p);return p.delete(e),R;case Lr:if(sr)return sr.call(e)==sr.call(t)}return!1}function Jf(e,t,i,a,l,g){var p=i&L,m=Ps(e),E=m.length,A=Ps(t),R=A.length;if(E!=R&&!p)return!1;for(var P=E;P--;){var U=m[P];if(!(p?U in t:re.call(t,U)))return!1}var M=g.get(e),W=g.get(t);if(M&&W)return M==t&&W==e;var K=!0;g.set(e,t),g.set(t,e);for(var H=p;++P<E;){U=m[P];var X=e[U],j=t[U];if(a)var je=p?a(j,X,U,t,e,g):a(X,j,U,e,t,g);if(!(je===r?X===j||l(X,j,i,a,g):je)){K=!1;break}H||(H=U=="constructor")}if(K&&!H){var Be=e.constructor,et=t.constructor;Be!=et&&"constructor"in e&&"constructor"in t&&!(typeof Be=="function"&&Be instanceof Be&&typeof et=="function"&&et instanceof et)&&(K=!1)}return g.delete(e),g.delete(t),K}function Dt(e){return Ms(su(e,r,du),e+"")}function Ps(e){return Sa(e,be,Os)}function Ls(e){return Sa(e,qe,eu)}var xs=Kr?function(e){return Kr.get(e)}:Xs;function ui(e){for(var t=e.name+"",i=An[t],a=re.call(An,t)?i.length:0;a--;){var l=i[a],g=l.func;if(g==null||g==e)return l.name}return t}function Pn(e){var t=re.call(f,"placeholder")?f:e;return t.placeholder}function k(){var e=f.iteratee||Ks;return e=e===Ks?Ca:e,arguments.length?e(arguments[0],arguments[1]):e}function li(e,t){var i=e.__data__;return sg(t)?i[typeof t=="string"?"string":"hash"]:i.map}function $s(e){for(var t=be(e),i=t.length;i--;){var a=t[i],l=e[a];t[i]=[a,l,ru(l)]}return t}function ln(e,t){var i=ah(e,t);return wa(i)?i:r}function Zf(e){var t=re.call(e,rn),i=e[rn];try{e[rn]=r;var a=!0}catch{}var l=Wr.call(e);return a&&(t?e[rn]=i:delete e[rn]),l}var Os=os?function(e){return e==null?[]:(e=ue(e),Vt(os(e),function(t){return oa.call(e,t)}))}:Js,eu=os?function(e){for(var t=[];e;)Qt(t,Os(e)),e=Vr(e);return t}:Js,Me=We;(as&&Me(new as(new ArrayBuffer(1)))!=mn||nr&&Me(new nr)!=gt||us&&Me(us.resolve())!=_o||yn&&Me(new yn)!=dt||rr&&Me(new rr)!=Zn)&&(Me=function(e){var t=We(e),i=t==xt?e.constructor:r,a=i?cn(i):"";if(a)switch(a){case Oh:return mn;case Uh:return gt;case Nh:return _o;case Dh:return dt;case Mh:return Zn}return t});function jf(e,t,i){for(var a=-1,l=i.length;++a<l;){var g=i[a],p=g.size;switch(g.type){case"drop":e+=p;break;case"dropRight":t-=p;break;case"take":t=De(t,e+p);break;case"takeRight":e=Ae(e,t-p);break}}return{start:e,end:t}}function eg(e){var t=e.match(sc);return t?t[1].split(oc):[]}function tu(e,t,i){t=Yt(t,e);for(var a=-1,l=t.length,g=!1;++a<l;){var p=At(t[a]);if(!(g=e!=null&&i(e,p)))break;e=e[p]}return g||++a!=l?g:(l=e==null?0:e.length,!!l&&_i(l)&&Mt(p,l)&&(G(e)||hn(e)))}function tg(e){var t=e.length,i=new e.constructor(t);return t&&typeof e[0]=="string"&&re.call(e,"index")&&(i.index=e.index,i.input=e.input),i}function nu(e){return typeof e.constructor=="function"&&!fr(e)?Rn(Vr(e)):{}}function ng(e,t,i){var a=e.constructor;switch(t){case jn:return Rs(e);case Lt:case Kn:return new a(+e);case mn:return kf(e,i);case $i:case Oi:case Ui:case Ni:case Di:case Mi:case Fi:case ki:case Wi:return Fa(e,i);case gt:return new a;case Yn:case Jn:return new a(e);case Xn:return Wf(e);case dt:return new a;case Lr:return Hf(e)}}function rg(e,t){var i=t.length;if(!i)return e;var a=i-1;return t[a]=(i>1?"& ":"")+t[a],t=t.join(i>2?", ":" "),e.replace(ic,`{
|
|
9
|
-
/* [wrapped with `+t+`] */
|
|
10
|
-
`)}function ig(e){return G(e)||hn(e)||!!(aa&&e&&e[aa])}function Mt(e,t){var i=typeof e;return t=t??Ne,!!t&&(i=="number"||i!="symbol"&&pc.test(e))&&e>-1&&e%1==0&&e<t}function He(e,t,i){if(!fe(i))return!1;var a=typeof t;return(a=="number"?Ge(i)&&Mt(t,i.length):a=="string"&&t in i)?mt(i[t],e):!1}function Us(e,t){if(G(e))return!1;var i=typeof e;return i=="number"||i=="symbol"||i=="boolean"||e==null||Ze(e)?!0:ec.test(e)||!jl.test(e)||t!=null&&e in ue(t)}function sg(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Ns(e){var t=ui(e),i=f[t];if(typeof i!="function"||!(t in Z.prototype))return!1;if(e===i)return!0;var a=xs(i);return!!a&&e===a[0]}function og(e){return!!ra&&ra in e}var ag=Fr?Ft:Zs;function fr(e){var t=e&&e.constructor,i=typeof t=="function"&&t.prototype||Tn;return e===i}function ru(e){return e===e&&!fe(e)}function iu(e,t){return function(i){return i==null?!1:i[e]===t&&(t!==r||e in ue(i))}}function ug(e){var t=di(e,function(a){return i.size===v&&i.clear(),a}),i=t.cache;return t}function lg(e,t){var i=e[1],a=t[1],l=i|a,g=l<(F|te|Ce),p=a==Ce&&i==oe||a==Ce&&i==Pe&&e[7].length<=t[8]||a==(Ce|Pe)&&t[7].length<=t[8]&&i==oe;if(!(g||p))return e;a&F&&(e[2]=t[2],l|=i&F?0:de);var m=t[3];if(m){var E=e[3];e[3]=E?Wa(E,m,t[4]):m,e[4]=E?Gt(e[3],x):t[4]}return m=t[5],m&&(E=e[5],e[5]=E?Ha(E,m,t[6]):m,e[6]=E?Gt(e[5],x):t[6]),m=t[7],m&&(e[7]=m),a&Ce&&(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]=l,e}function cg(e){var t=[];if(e!=null)for(var i in ue(e))t.push(i);return t}function hg(e){return Wr.call(e)}function su(e,t,i){return t=Ae(t===r?e.length-1:t,0),function(){for(var a=arguments,l=-1,g=Ae(a.length-t,0),p=w(g);++l<g;)p[l]=a[t+l];l=-1;for(var m=w(t+1);++l<t;)m[l]=a[l];return m[t]=i(p),Ye(e,this,m)}}function ou(e,t){return t.length<2?e:un(e,at(t,0,-1))}function fg(e,t){for(var i=e.length,a=De(t.length,i),l=Qe(e);a--;){var g=t[a];e[a]=Mt(g,i)?l[g]:r}return e}function Ds(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var au=lu(La),gr=Rh||function(e,t){return xe.setTimeout(e,t)},Ms=lu(Nf);function uu(e,t,i){var a=t+"";return Ms(e,rg(a,gg(eg(a),i)))}function lu(e){var t=0,i=0;return function(){var a=Lh(),l=ft-(a-i);if(i=a,l>0){if(++t>=$)return arguments[0]}else t=0;return e.apply(r,arguments)}}function ci(e,t){var i=-1,a=e.length,l=a-1;for(t=t===r?a:t;++i<t;){var g=Ss(i,l),p=e[g];e[g]=e[i],e[i]=p}return e.length=t,e}var cu=ug(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(tc,function(i,a,l,g){t.push(l?g.replace(lc,"$1"):a||i)}),t});function At(e){if(typeof e=="string"||Ze(e))return e;var t=e+"";return t=="0"&&1/e==-b?"-0":t}function cn(e){if(e!=null){try{return kr.call(e)}catch{}try{return e+""}catch{}}return""}function gg(e,t){return rt(br,function(i){var a="_."+i[0];t&i[1]&&!Ur(e,a)&&e.push(a)}),e.sort()}function hu(e){if(e instanceof Z)return e.clone();var t=new st(e.__wrapped__,e.__chain__);return t.__actions__=Qe(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}function dg(e,t,i){(i?He(e,t,i):t===r)?t=1:t=Ae(z(t),0);var a=e==null?0:e.length;if(!a||t<1)return[];for(var l=0,g=0,p=w(qr(a/t));l<a;)p[g++]=at(e,l,l+=t);return p}function pg(e){for(var t=-1,i=e==null?0:e.length,a=0,l=[];++t<i;){var g=e[t];g&&(l[a++]=g)}return l}function _g(){var e=arguments.length;if(!e)return[];for(var t=w(e-1),i=arguments[0],a=e;a--;)t[a-1]=arguments[a];return Qt(G(i)?Qe(i):[i],$e(t,1))}var mg=Y(function(e,t){return Se(e)?ar(e,$e(t,1,Se,!0)):[]}),vg=Y(function(e,t){var i=ut(t);return Se(i)&&(i=r),Se(e)?ar(e,$e(t,1,Se,!0),k(i,2)):[]}),Sg=Y(function(e,t){var i=ut(t);return Se(i)&&(i=r),Se(e)?ar(e,$e(t,1,Se,!0),r,i):[]});function Eg(e,t,i){var a=e==null?0:e.length;return a?(t=i||t===r?1:z(t),at(e,t<0?0:t,a)):[]}function wg(e,t,i){var a=e==null?0:e.length;return a?(t=i||t===r?1:z(t),t=a-t,at(e,0,t<0?0:t)):[]}function Cg(e,t){return e&&e.length?ni(e,k(t,3),!0,!0):[]}function Tg(e,t){return e&&e.length?ni(e,k(t,3),!0):[]}function yg(e,t,i,a){var l=e==null?0:e.length;return l?(i&&typeof i!="number"&&He(e,t,i)&&(i=0,a=l),_f(e,t,i,a)):[]}function fu(e,t,i){var a=e==null?0:e.length;if(!a)return-1;var l=i==null?0:z(i);return l<0&&(l=Ae(a+l,0)),Nr(e,k(t,3),l)}function gu(e,t,i){var a=e==null?0:e.length;if(!a)return-1;var l=a-1;return i!==r&&(l=z(i),l=i<0?Ae(a+l,0):De(l,a-1)),Nr(e,k(t,3),l,!0)}function du(e){var t=e==null?0:e.length;return t?$e(e,1):[]}function Ag(e){var t=e==null?0:e.length;return t?$e(e,b):[]}function Rg(e,t){var i=e==null?0:e.length;return i?(t=t===r?1:z(t),$e(e,t)):[]}function bg(e){for(var t=-1,i=e==null?0:e.length,a={};++t<i;){var l=e[t];a[l[0]]=l[1]}return a}function pu(e){return e&&e.length?e[0]:r}function Ig(e,t,i){var a=e==null?0:e.length;if(!a)return-1;var l=i==null?0:z(i);return l<0&&(l=Ae(a+l,0)),Sn(e,t,l)}function Pg(e){var t=e==null?0:e.length;return t?at(e,0,-1):[]}var Lg=Y(function(e){var t=he(e,ys);return t.length&&t[0]===e[0]?ds(t):[]}),xg=Y(function(e){var t=ut(e),i=he(e,ys);return t===ut(i)?t=r:i.pop(),i.length&&i[0]===e[0]?ds(i,k(t,2)):[]}),$g=Y(function(e){var t=ut(e),i=he(e,ys);return t=typeof t=="function"?t:r,t&&i.pop(),i.length&&i[0]===e[0]?ds(i,r,t):[]});function Og(e,t){return e==null?"":Ih.call(e,t)}function ut(e){var t=e==null?0:e.length;return t?e[t-1]:r}function Ug(e,t,i){var a=e==null?0:e.length;if(!a)return-1;var l=a;return i!==r&&(l=z(i),l=l<0?Ae(a+l,0):De(l,a-1)),t===t?fh(e,t,l):Nr(e,Yo,l,!0)}function Ng(e,t){return e&&e.length?Ra(e,z(t)):r}var Dg=Y(_u);function _u(e,t){return e&&e.length&&t&&t.length?vs(e,t):e}function Mg(e,t,i){return e&&e.length&&t&&t.length?vs(e,t,k(i,2)):e}function Fg(e,t,i){return e&&e.length&&t&&t.length?vs(e,t,r,i):e}var kg=Dt(function(e,t){var i=e==null?0:e.length,a=cs(e,t);return Pa(e,he(t,function(l){return Mt(l,i)?+l:l}).sort(ka)),a});function Wg(e,t){var i=[];if(!(e&&e.length))return i;var a=-1,l=[],g=e.length;for(t=k(t,3);++a<g;){var p=e[a];t(p,a,e)&&(i.push(p),l.push(a))}return Pa(e,l),i}function Fs(e){return e==null?e:$h.call(e)}function Hg(e,t,i){var a=e==null?0:e.length;return a?(i&&typeof i!="number"&&He(e,t,i)?(t=0,i=a):(t=t==null?0:z(t),i=i===r?a:z(i)),at(e,t,i)):[]}function Bg(e,t){return ti(e,t)}function Vg(e,t,i){return ws(e,t,k(i,2))}function Qg(e,t){var i=e==null?0:e.length;if(i){var a=ti(e,t);if(a<i&&mt(e[a],t))return a}return-1}function Gg(e,t){return ti(e,t,!0)}function qg(e,t,i){return ws(e,t,k(i,2),!0)}function zg(e,t){var i=e==null?0:e.length;if(i){var a=ti(e,t,!0)-1;if(mt(e[a],t))return a}return-1}function Kg(e){return e&&e.length?xa(e):[]}function Yg(e,t){return e&&e.length?xa(e,k(t,2)):[]}function Xg(e){var t=e==null?0:e.length;return t?at(e,1,t):[]}function Jg(e,t,i){return e&&e.length?(t=i||t===r?1:z(t),at(e,0,t<0?0:t)):[]}function Zg(e,t,i){var a=e==null?0:e.length;return a?(t=i||t===r?1:z(t),t=a-t,at(e,t<0?0:t,a)):[]}function jg(e,t){return e&&e.length?ni(e,k(t,3),!1,!0):[]}function ed(e,t){return e&&e.length?ni(e,k(t,3)):[]}var td=Y(function(e){return Kt($e(e,1,Se,!0))}),nd=Y(function(e){var t=ut(e);return Se(t)&&(t=r),Kt($e(e,1,Se,!0),k(t,2))}),rd=Y(function(e){var t=ut(e);return t=typeof t=="function"?t:r,Kt($e(e,1,Se,!0),r,t)});function id(e){return e&&e.length?Kt(e):[]}function sd(e,t){return e&&e.length?Kt(e,k(t,2)):[]}function od(e,t){return t=typeof t=="function"?t:r,e&&e.length?Kt(e,r,t):[]}function ks(e){if(!(e&&e.length))return[];var t=0;return e=Vt(e,function(i){if(Se(i))return t=Ae(i.length,t),!0}),ns(t,function(i){return he(e,ji(i))})}function mu(e,t){if(!(e&&e.length))return[];var i=ks(e);return t==null?i:he(i,function(a){return Ye(t,r,a)})}var ad=Y(function(e,t){return Se(e)?ar(e,t):[]}),ud=Y(function(e){return Ts(Vt(e,Se))}),ld=Y(function(e){var t=ut(e);return Se(t)&&(t=r),Ts(Vt(e,Se),k(t,2))}),cd=Y(function(e){var t=ut(e);return t=typeof t=="function"?t:r,Ts(Vt(e,Se),r,t)}),hd=Y(ks);function fd(e,t){return Na(e||[],t||[],or)}function gd(e,t){return Na(e||[],t||[],cr)}var dd=Y(function(e){var t=e.length,i=t>1?e[t-1]:r;return i=typeof i=="function"?(e.pop(),i):r,mu(e,i)});function vu(e){var t=f(e);return t.__chain__=!0,t}function pd(e,t){return t(e),e}function hi(e,t){return t(e)}var _d=Dt(function(e){var t=e.length,i=t?e[0]:0,a=this.__wrapped__,l=function(g){return cs(g,e)};return t>1||this.__actions__.length||!(a instanceof Z)||!Mt(i)?this.thru(l):(a=a.slice(i,+i+(t?1:0)),a.__actions__.push({func:hi,args:[l],thisArg:r}),new st(a,this.__chain__).thru(function(g){return t&&!g.length&&g.push(r),g}))});function md(){return vu(this)}function vd(){return new st(this.value(),this.__chain__)}function Sd(){this.__values__===r&&(this.__values__=$u(this.value()));var e=this.__index__>=this.__values__.length,t=e?r:this.__values__[this.__index__++];return{done:e,value:t}}function Ed(){return this}function wd(e){for(var t,i=this;i instanceof Xr;){var a=hu(i);a.__index__=0,a.__values__=r,t?l.__wrapped__=a:t=a;var l=a;i=i.__wrapped__}return l.__wrapped__=e,t}function Cd(){var e=this.__wrapped__;if(e instanceof Z){var t=e;return this.__actions__.length&&(t=new Z(this)),t=t.reverse(),t.__actions__.push({func:hi,args:[Fs],thisArg:r}),new st(t,this.__chain__)}return this.thru(Fs)}function Td(){return Ua(this.__wrapped__,this.__actions__)}var yd=ri(function(e,t,i){re.call(e,i)?++e[i]:Ut(e,i,1)});function Ad(e,t,i){var a=G(e)?zo:pf;return i&&He(e,t,i)&&(t=r),a(e,k(t,3))}function Rd(e,t){var i=G(e)?Vt:ma;return i(e,k(t,3))}var bd=Ga(fu),Id=Ga(gu);function Pd(e,t){return $e(fi(e,t),1)}function Ld(e,t){return $e(fi(e,t),b)}function xd(e,t,i){return i=i===r?1:z(i),$e(fi(e,t),i)}function Su(e,t){var i=G(e)?rt:zt;return i(e,k(t,3))}function Eu(e,t){var i=G(e)?Yc:_a;return i(e,k(t,3))}var $d=ri(function(e,t,i){re.call(e,i)?e[i].push(t):Ut(e,i,[t])});function Od(e,t,i,a){e=Ge(e)?e:xn(e),i=i&&!a?z(i):0;var l=e.length;return i<0&&(i=Ae(l+i,0)),mi(e)?i<=l&&e.indexOf(t,i)>-1:!!l&&Sn(e,t,i)>-1}var Ud=Y(function(e,t,i){var a=-1,l=typeof t=="function",g=Ge(e)?w(e.length):[];return zt(e,function(p){g[++a]=l?Ye(t,p,i):ur(p,t,i)}),g}),Nd=ri(function(e,t,i){Ut(e,i,t)});function fi(e,t){var i=G(e)?he:Ta;return i(e,k(t,3))}function Dd(e,t,i,a){return e==null?[]:(G(t)||(t=t==null?[]:[t]),i=a?r:i,G(i)||(i=i==null?[]:[i]),ba(e,t,i))}var Md=ri(function(e,t,i){e[i?0:1].push(t)},function(){return[[],[]]});function Fd(e,t,i){var a=G(e)?Ji:Jo,l=arguments.length<3;return a(e,k(t,4),i,l,zt)}function kd(e,t,i){var a=G(e)?Xc:Jo,l=arguments.length<3;return a(e,k(t,4),i,l,_a)}function Wd(e,t){var i=G(e)?Vt:ma;return i(e,pi(k(t,3)))}function Hd(e){var t=G(e)?fa:Of;return t(e)}function Bd(e,t,i){(i?He(e,t,i):t===r)?t=1:t=z(t);var a=G(e)?cf:Uf;return a(e,t)}function Vd(e){var t=G(e)?hf:Df;return t(e)}function Qd(e){if(e==null)return 0;if(Ge(e))return mi(e)?wn(e):e.length;var t=Me(e);return t==gt||t==dt?e.size:_s(e).length}function Gd(e,t,i){var a=G(e)?Zi:Mf;return i&&He(e,t,i)&&(t=r),a(e,k(t,3))}var qd=Y(function(e,t){if(e==null)return[];var i=t.length;return i>1&&He(e,t[0],t[1])?t=[]:i>2&&He(t[0],t[1],t[2])&&(t=[t[0]]),ba(e,$e(t,1),[])}),gi=Ah||function(){return xe.Date.now()};function zd(e,t){if(typeof t!="function")throw new it(h);return e=z(e),function(){if(--e<1)return t.apply(this,arguments)}}function wu(e,t,i){return t=i?r:t,t=e&&t==null?e.length:t,Nt(e,Ce,r,r,r,r,t)}function Cu(e,t){var i;if(typeof t!="function")throw new it(h);return e=z(e),function(){return--e>0&&(i=t.apply(this,arguments)),e<=1&&(t=r),i}}var Ws=Y(function(e,t,i){var a=F;if(i.length){var l=Gt(i,Pn(Ws));a|=pe}return Nt(e,a,t,i,l)}),Tu=Y(function(e,t,i){var a=F|te;if(i.length){var l=Gt(i,Pn(Tu));a|=pe}return Nt(t,a,e,i,l)});function yu(e,t,i){t=i?r:t;var a=Nt(e,oe,r,r,r,r,r,t);return a.placeholder=yu.placeholder,a}function Au(e,t,i){t=i?r:t;var a=Nt(e,Oe,r,r,r,r,r,t);return a.placeholder=Au.placeholder,a}function Ru(e,t,i){var a,l,g,p,m,E,A=0,R=!1,P=!1,U=!0;if(typeof e!="function")throw new it(h);t=lt(t)||0,fe(i)&&(R=!!i.leading,P="maxWait"in i,g=P?Ae(lt(i.maxWait)||0,t):g,U="trailing"in i?!!i.trailing:U);function M(Ee){var vt=a,Wt=l;return a=l=r,A=Ee,p=e.apply(Wt,vt),p}function W(Ee){return A=Ee,m=gr(X,t),R?M(Ee):p}function K(Ee){var vt=Ee-E,Wt=Ee-A,Gu=t-vt;return P?De(Gu,g-Wt):Gu}function H(Ee){var vt=Ee-E,Wt=Ee-A;return E===r||vt>=t||vt<0||P&&Wt>=g}function X(){var Ee=gi();if(H(Ee))return j(Ee);m=gr(X,K(Ee))}function j(Ee){return m=r,U&&a?M(Ee):(a=l=r,p)}function je(){m!==r&&Da(m),A=0,a=E=l=m=r}function Be(){return m===r?p:j(gi())}function et(){var Ee=gi(),vt=H(Ee);if(a=arguments,l=this,E=Ee,vt){if(m===r)return W(E);if(P)return Da(m),m=gr(X,t),M(E)}return m===r&&(m=gr(X,t)),p}return et.cancel=je,et.flush=Be,et}var Kd=Y(function(e,t){return pa(e,1,t)}),Yd=Y(function(e,t,i){return pa(e,lt(t)||0,i)});function Xd(e){return Nt(e,Te)}function di(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new it(h);var i=function(){var a=arguments,l=t?t.apply(this,a):a[0],g=i.cache;if(g.has(l))return g.get(l);var p=e.apply(this,a);return i.cache=g.set(l,p)||g,p};return i.cache=new(di.Cache||Ot),i}di.Cache=Ot;function pi(e){if(typeof e!="function")throw new it(h);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 Jd(e){return Cu(2,e)}var Zd=Ff(function(e,t){t=t.length==1&&G(t[0])?he(t[0],Xe(k())):he($e(t,1),Xe(k()));var i=t.length;return Y(function(a){for(var l=-1,g=De(a.length,i);++l<g;)a[l]=t[l].call(this,a[l]);return Ye(e,this,a)})}),Hs=Y(function(e,t){var i=Gt(t,Pn(Hs));return Nt(e,pe,r,t,i)}),bu=Y(function(e,t){var i=Gt(t,Pn(bu));return Nt(e,Ue,r,t,i)}),jd=Dt(function(e,t){return Nt(e,Pe,r,r,r,t)});function ep(e,t){if(typeof e!="function")throw new it(h);return t=t===r?t:z(t),Y(e,t)}function tp(e,t){if(typeof e!="function")throw new it(h);return t=t==null?0:Ae(z(t),0),Y(function(i){var a=i[t],l=Xt(i,0,t);return a&&Qt(l,a),Ye(e,this,l)})}function np(e,t,i){var a=!0,l=!0;if(typeof e!="function")throw new it(h);return fe(i)&&(a="leading"in i?!!i.leading:a,l="trailing"in i?!!i.trailing:l),Ru(e,t,{leading:a,maxWait:t,trailing:l})}function rp(e){return wu(e,1)}function ip(e,t){return Hs(As(t),e)}function sp(){if(!arguments.length)return[];var e=arguments[0];return G(e)?e:[e]}function op(e){return ot(e,I)}function ap(e,t){return t=typeof t=="function"?t:r,ot(e,I,t)}function up(e){return ot(e,C|I)}function lp(e,t){return t=typeof t=="function"?t:r,ot(e,C|I,t)}function cp(e,t){return t==null||da(e,t,be(t))}function mt(e,t){return e===t||e!==e&&t!==t}var hp=ai(gs),fp=ai(function(e,t){return e>=t}),hn=Ea((function(){return arguments})())?Ea:function(e){return ge(e)&&re.call(e,"callee")&&!oa.call(e,"callee")},G=w.isArray,gp=Ho?Xe(Ho):wf;function Ge(e){return e!=null&&_i(e.length)&&!Ft(e)}function Se(e){return ge(e)&&Ge(e)}function dp(e){return e===!0||e===!1||ge(e)&&We(e)==Lt}var Jt=bh||Zs,pp=Bo?Xe(Bo):Cf;function _p(e){return ge(e)&&e.nodeType===1&&!dr(e)}function mp(e){if(e==null)return!0;if(Ge(e)&&(G(e)||typeof e=="string"||typeof e.splice=="function"||Jt(e)||Ln(e)||hn(e)))return!e.length;var t=Me(e);if(t==gt||t==dt)return!e.size;if(fr(e))return!_s(e).length;for(var i in e)if(re.call(e,i))return!1;return!0}function vp(e,t){return lr(e,t)}function Sp(e,t,i){i=typeof i=="function"?i:r;var a=i?i(e,t):r;return a===r?lr(e,t,r,i):!!a}function Bs(e){if(!ge(e))return!1;var t=We(e);return t==Ir||t==Hl||typeof e.message=="string"&&typeof e.name=="string"&&!dr(e)}function Ep(e){return typeof e=="number"&&ua(e)}function Ft(e){if(!fe(e))return!1;var t=We(e);return t==Pr||t==po||t==_n||t==Vl}function Iu(e){return typeof e=="number"&&e==z(e)}function _i(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Ne}function fe(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}function ge(e){return e!=null&&typeof e=="object"}var Pu=Vo?Xe(Vo):yf;function wp(e,t){return e===t||ps(e,t,$s(t))}function Cp(e,t,i){return i=typeof i=="function"?i:r,ps(e,t,$s(t),i)}function Tp(e){return Lu(e)&&e!=+e}function yp(e){if(ag(e))throw new V(c);return wa(e)}function Ap(e){return e===null}function Rp(e){return e==null}function Lu(e){return typeof e=="number"||ge(e)&&We(e)==Yn}function dr(e){if(!ge(e)||We(e)!=xt)return!1;var t=Vr(e);if(t===null)return!0;var i=re.call(t,"constructor")&&t.constructor;return typeof i=="function"&&i instanceof i&&kr.call(i)==wh}var Vs=Qo?Xe(Qo):Af;function bp(e){return Iu(e)&&e>=-Ne&&e<=Ne}var xu=Go?Xe(Go):Rf;function mi(e){return typeof e=="string"||!G(e)&&ge(e)&&We(e)==Jn}function Ze(e){return typeof e=="symbol"||ge(e)&&We(e)==Lr}var Ln=qo?Xe(qo):bf;function Ip(e){return e===r}function Pp(e){return ge(e)&&Me(e)==Zn}function Lp(e){return ge(e)&&We(e)==Gl}var xp=ai(ms),$p=ai(function(e,t){return e<=t});function $u(e){if(!e)return[];if(Ge(e))return mi(e)?pt(e):Qe(e);if(tr&&e[tr])return lh(e[tr]());var t=Me(e),i=t==gt?is:t==dt?Dr:xn;return i(e)}function kt(e){if(!e)return e===0?e:0;if(e=lt(e),e===b||e===-b){var t=e<0?-1:1;return t*ee}return e===e?e:0}function z(e){var t=kt(e),i=t%1;return t===t?i?t-i:t:0}function Ou(e){return e?an(z(e),0,Le):0}function lt(e){if(typeof e=="number")return e;if(Ze(e))return ve;if(fe(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=fe(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=Zo(e);var i=fc.test(e);return i||dc.test(e)?qc(e.slice(2),i?2:8):hc.test(e)?ve:+e}function Uu(e){return yt(e,qe(e))}function Op(e){return e?an(z(e),-Ne,Ne):e===0?e:0}function ie(e){return e==null?"":Je(e)}var Up=bn(function(e,t){if(fr(t)||Ge(t)){yt(t,be(t),e);return}for(var i in t)re.call(t,i)&&or(e,i,t[i])}),Nu=bn(function(e,t){yt(t,qe(t),e)}),vi=bn(function(e,t,i,a){yt(t,qe(t),e,a)}),Np=bn(function(e,t,i,a){yt(t,be(t),e,a)}),Dp=Dt(cs);function Mp(e,t){var i=Rn(e);return t==null?i:ga(i,t)}var Fp=Y(function(e,t){e=ue(e);var i=-1,a=t.length,l=a>2?t[2]:r;for(l&&He(t[0],t[1],l)&&(a=1);++i<a;)for(var g=t[i],p=qe(g),m=-1,E=p.length;++m<E;){var A=p[m],R=e[A];(R===r||mt(R,Tn[A])&&!re.call(e,A))&&(e[A]=g[A])}return e}),kp=Y(function(e){return e.push(r,Za),Ye(Du,r,e)});function Wp(e,t){return Ko(e,k(t,3),Tt)}function Hp(e,t){return Ko(e,k(t,3),fs)}function Bp(e,t){return e==null?e:hs(e,k(t,3),qe)}function Vp(e,t){return e==null?e:va(e,k(t,3),qe)}function Qp(e,t){return e&&Tt(e,k(t,3))}function Gp(e,t){return e&&fs(e,k(t,3))}function qp(e){return e==null?[]:jr(e,be(e))}function zp(e){return e==null?[]:jr(e,qe(e))}function Qs(e,t,i){var a=e==null?r:un(e,t);return a===r?i:a}function Kp(e,t){return e!=null&&tu(e,t,mf)}function Gs(e,t){return e!=null&&tu(e,t,vf)}var Yp=za(function(e,t,i){t!=null&&typeof t.toString!="function"&&(t=Wr.call(t)),e[t]=i},zs(ze)),Xp=za(function(e,t,i){t!=null&&typeof t.toString!="function"&&(t=Wr.call(t)),re.call(e,t)?e[t].push(i):e[t]=[i]},k),Jp=Y(ur);function be(e){return Ge(e)?ha(e):_s(e)}function qe(e){return Ge(e)?ha(e,!0):If(e)}function Zp(e,t){var i={};return t=k(t,3),Tt(e,function(a,l,g){Ut(i,t(a,l,g),a)}),i}function jp(e,t){var i={};return t=k(t,3),Tt(e,function(a,l,g){Ut(i,l,t(a,l,g))}),i}var e_=bn(function(e,t,i){ei(e,t,i)}),Du=bn(function(e,t,i,a){ei(e,t,i,a)}),t_=Dt(function(e,t){var i={};if(e==null)return i;var a=!1;t=he(t,function(g){return g=Yt(g,e),a||(a=g.length>1),g}),yt(e,Ls(e),i),a&&(i=ot(i,C|y|I,Yf));for(var l=t.length;l--;)Cs(i,t[l]);return i});function n_(e,t){return Mu(e,pi(k(t)))}var r_=Dt(function(e,t){return e==null?{}:Lf(e,t)});function Mu(e,t){if(e==null)return{};var i=he(Ls(e),function(a){return[a]});return t=k(t),Ia(e,i,function(a,l){return t(a,l[0])})}function i_(e,t,i){t=Yt(t,e);var a=-1,l=t.length;for(l||(l=1,e=r);++a<l;){var g=e==null?r:e[At(t[a])];g===r&&(a=l,g=i),e=Ft(g)?g.call(e):g}return e}function s_(e,t,i){return e==null?e:cr(e,t,i)}function o_(e,t,i,a){return a=typeof a=="function"?a:r,e==null?e:cr(e,t,i,a)}var Fu=Xa(be),ku=Xa(qe);function a_(e,t,i){var a=G(e),l=a||Jt(e)||Ln(e);if(t=k(t,4),i==null){var g=e&&e.constructor;l?i=a?new g:[]:fe(e)?i=Ft(g)?Rn(Vr(e)):{}:i={}}return(l?rt:Tt)(e,function(p,m,E){return t(i,p,m,E)}),i}function u_(e,t){return e==null?!0:Cs(e,t)}function l_(e,t,i){return e==null?e:Oa(e,t,As(i))}function c_(e,t,i,a){return a=typeof a=="function"?a:r,e==null?e:Oa(e,t,As(i),a)}function xn(e){return e==null?[]:rs(e,be(e))}function h_(e){return e==null?[]:rs(e,qe(e))}function f_(e,t,i){return i===r&&(i=t,t=r),i!==r&&(i=lt(i),i=i===i?i:0),t!==r&&(t=lt(t),t=t===t?t:0),an(lt(e),t,i)}function g_(e,t,i){return t=kt(t),i===r?(i=t,t=0):i=kt(i),e=lt(e),Sf(e,t,i)}function d_(e,t,i){if(i&&typeof i!="boolean"&&He(e,t,i)&&(t=i=r),i===r&&(typeof t=="boolean"?(i=t,t=r):typeof e=="boolean"&&(i=e,e=r)),e===r&&t===r?(e=0,t=1):(e=kt(e),t===r?(t=e,e=0):t=kt(t)),e>t){var a=e;e=t,t=a}if(i||e%1||t%1){var l=la();return De(e+l*(t-e+Gc("1e-"+((l+"").length-1))),t)}return Ss(e,t)}var p_=In(function(e,t,i){return t=t.toLowerCase(),e+(i?Wu(t):t)});function Wu(e){return qs(ie(e).toLowerCase())}function Hu(e){return e=ie(e),e&&e.replace(_c,ih).replace(Nc,"")}function __(e,t,i){e=ie(e),t=Je(t);var a=e.length;i=i===r?a:an(z(i),0,a);var l=i;return i-=t.length,i>=0&&e.slice(i,l)==t}function m_(e){return e=ie(e),e&&Xl.test(e)?e.replace(vo,sh):e}function v_(e){return e=ie(e),e&&nc.test(e)?e.replace(Hi,"\\$&"):e}var S_=In(function(e,t,i){return e+(i?"-":"")+t.toLowerCase()}),E_=In(function(e,t,i){return e+(i?" ":"")+t.toLowerCase()}),w_=Qa("toLowerCase");function C_(e,t,i){e=ie(e),t=z(t);var a=t?wn(e):0;if(!t||a>=t)return e;var l=(t-a)/2;return oi(zr(l),i)+e+oi(qr(l),i)}function T_(e,t,i){e=ie(e),t=z(t);var a=t?wn(e):0;return t&&a<t?e+oi(t-a,i):e}function y_(e,t,i){e=ie(e),t=z(t);var a=t?wn(e):0;return t&&a<t?oi(t-a,i)+e:e}function A_(e,t,i){return i||t==null?t=0:t&&(t=+t),xh(ie(e).replace(Bi,""),t||0)}function R_(e,t,i){return(i?He(e,t,i):t===r)?t=1:t=z(t),Es(ie(e),t)}function b_(){var e=arguments,t=ie(e[0]);return e.length<3?t:t.replace(e[1],e[2])}var I_=In(function(e,t,i){return e+(i?"_":"")+t.toLowerCase()});function P_(e,t,i){return i&&typeof i!="number"&&He(e,t,i)&&(t=i=r),i=i===r?Le:i>>>0,i?(e=ie(e),e&&(typeof t=="string"||t!=null&&!Vs(t))&&(t=Je(t),!t&&En(e))?Xt(pt(e),0,i):e.split(t,i)):[]}var L_=In(function(e,t,i){return e+(i?" ":"")+qs(t)});function x_(e,t,i){return e=ie(e),i=i==null?0:an(z(i),0,e.length),t=Je(t),e.slice(i,i+t.length)==t}function $_(e,t,i){var a=f.templateSettings;i&&He(e,t,i)&&(t=r),e=ie(e),t=vi({},t,a,Ja);var l=vi({},t.imports,a.imports,Ja),g=be(l),p=rs(l,g),m,E,A=0,R=t.interpolate||xr,P="__p += '",U=ss((t.escape||xr).source+"|"+R.source+"|"+(R===So?cc:xr).source+"|"+(t.evaluate||xr).source+"|$","g"),M="//# sourceURL="+(re.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Wc+"]")+`
|
|
11
|
-
`;e.replace(U,function(H,X,j,je,Be,et){return j||(j=je),P+=e.slice(A,et).replace(mc,oh),X&&(m=!0,P+=`' +
|
|
12
|
-
__e(`+X+`) +
|
|
13
|
-
'`),Be&&(E=!0,P+=`';
|
|
14
|
-
`+Be+`;
|
|
15
|
-
__p += '`),j&&(P+=`' +
|
|
16
|
-
((__t = (`+j+`)) == null ? '' : __t) +
|
|
17
|
-
'`),A=et+H.length,H}),P+=`';
|
|
18
|
-
`;var W=re.call(t,"variable")&&t.variable;if(!W)P=`with (obj) {
|
|
19
|
-
`+P+`
|
|
20
|
-
}
|
|
21
|
-
`;else if(uc.test(W))throw new V(d);P=(E?P.replace(ql,""):P).replace(zl,"$1").replace(Kl,"$1;"),P="function("+(W||"obj")+`) {
|
|
22
|
-
`+(W?"":`obj || (obj = {});
|
|
23
|
-
`)+"var __t, __p = ''"+(m?", __e = _.escape":"")+(E?`, __j = Array.prototype.join;
|
|
24
|
-
function print() { __p += __j.call(arguments, '') }
|
|
25
|
-
`:`;
|
|
26
|
-
`)+P+`return __p
|
|
27
|
-
}`;var K=Vu(function(){return ne(g,M+"return "+P).apply(r,p)});if(K.source=P,Bs(K))throw K;return K}function O_(e){return ie(e).toLowerCase()}function U_(e){return ie(e).toUpperCase()}function N_(e,t,i){if(e=ie(e),e&&(i||t===r))return Zo(e);if(!e||!(t=Je(t)))return e;var a=pt(e),l=pt(t),g=jo(a,l),p=ea(a,l)+1;return Xt(a,g,p).join("")}function D_(e,t,i){if(e=ie(e),e&&(i||t===r))return e.slice(0,na(e)+1);if(!e||!(t=Je(t)))return e;var a=pt(e),l=ea(a,pt(t))+1;return Xt(a,0,l).join("")}function M_(e,t,i){if(e=ie(e),e&&(i||t===r))return e.replace(Bi,"");if(!e||!(t=Je(t)))return e;var a=pt(e),l=jo(a,pt(t));return Xt(a,l).join("")}function F_(e,t){var i=_e,a=me;if(fe(t)){var l="separator"in t?t.separator:l;i="length"in t?z(t.length):i,a="omission"in t?Je(t.omission):a}e=ie(e);var g=e.length;if(En(e)){var p=pt(e);g=p.length}if(i>=g)return e;var m=i-wn(a);if(m<1)return a;var E=p?Xt(p,0,m).join(""):e.slice(0,m);if(l===r)return E+a;if(p&&(m+=E.length-m),Vs(l)){if(e.slice(m).search(l)){var A,R=E;for(l.global||(l=ss(l.source,ie(Eo.exec(l))+"g")),l.lastIndex=0;A=l.exec(R);)var P=A.index;E=E.slice(0,P===r?m:P)}}else if(e.indexOf(Je(l),m)!=m){var U=E.lastIndexOf(l);U>-1&&(E=E.slice(0,U))}return E+a}function k_(e){return e=ie(e),e&&Yl.test(e)?e.replace(mo,gh):e}var W_=In(function(e,t,i){return e+(i?" ":"")+t.toUpperCase()}),qs=Qa("toUpperCase");function Bu(e,t,i){return e=ie(e),t=i?r:t,t===r?uh(e)?_h(e):jc(e):e.match(t)||[]}var Vu=Y(function(e,t){try{return Ye(e,r,t)}catch(i){return Bs(i)?i:new V(i)}}),H_=Dt(function(e,t){return rt(t,function(i){i=At(i),Ut(e,i,Ws(e[i],e))}),e});function B_(e){var t=e==null?0:e.length,i=k();return e=t?he(e,function(a){if(typeof a[1]!="function")throw new it(h);return[i(a[0]),a[1]]}):[],Y(function(a){for(var l=-1;++l<t;){var g=e[l];if(Ye(g[0],this,a))return Ye(g[1],this,a)}})}function V_(e){return df(ot(e,C))}function zs(e){return function(){return e}}function Q_(e,t){return e==null||e!==e?t:e}var G_=qa(),q_=qa(!0);function ze(e){return e}function Ks(e){return Ca(typeof e=="function"?e:ot(e,C))}function z_(e){return ya(ot(e,C))}function K_(e,t){return Aa(e,ot(t,C))}var Y_=Y(function(e,t){return function(i){return ur(i,e,t)}}),X_=Y(function(e,t){return function(i){return ur(e,i,t)}});function Ys(e,t,i){var a=be(t),l=jr(t,a);i==null&&!(fe(t)&&(l.length||!a.length))&&(i=t,t=e,e=this,l=jr(t,be(t)));var g=!(fe(i)&&"chain"in i)||!!i.chain,p=Ft(e);return rt(l,function(m){var E=t[m];e[m]=E,p&&(e.prototype[m]=function(){var A=this.__chain__;if(g||A){var R=e(this.__wrapped__),P=R.__actions__=Qe(this.__actions__);return P.push({func:E,args:arguments,thisArg:e}),R.__chain__=A,R}return E.apply(e,Qt([this.value()],arguments))})}),e}function J_(){return xe._===this&&(xe._=Ch),this}function Xs(){}function Z_(e){return e=z(e),Y(function(t){return Ra(t,e)})}var j_=bs(he),em=bs(zo),tm=bs(Zi);function Qu(e){return Us(e)?ji(At(e)):xf(e)}function nm(e){return function(t){return e==null?r:un(e,t)}}var rm=Ka(),im=Ka(!0);function Js(){return[]}function Zs(){return!1}function sm(){return{}}function om(){return""}function am(){return!0}function um(e,t){if(e=z(e),e<1||e>Ne)return[];var i=Le,a=De(e,Le);t=k(t),e-=Le;for(var l=ns(a,t);++i<e;)t(i);return l}function lm(e){return G(e)?he(e,At):Ze(e)?[e]:Qe(cu(ie(e)))}function cm(e){var t=++Eh;return ie(e)+t}var hm=si(function(e,t){return e+t},0),fm=Is("ceil"),gm=si(function(e,t){return e/t},1),dm=Is("floor");function pm(e){return e&&e.length?Zr(e,ze,gs):r}function _m(e,t){return e&&e.length?Zr(e,k(t,2),gs):r}function mm(e){return Xo(e,ze)}function vm(e,t){return Xo(e,k(t,2))}function Sm(e){return e&&e.length?Zr(e,ze,ms):r}function Em(e,t){return e&&e.length?Zr(e,k(t,2),ms):r}var wm=si(function(e,t){return e*t},1),Cm=Is("round"),Tm=si(function(e,t){return e-t},0);function ym(e){return e&&e.length?ts(e,ze):0}function Am(e,t){return e&&e.length?ts(e,k(t,2)):0}return f.after=zd,f.ary=wu,f.assign=Up,f.assignIn=Nu,f.assignInWith=vi,f.assignWith=Np,f.at=Dp,f.before=Cu,f.bind=Ws,f.bindAll=H_,f.bindKey=Tu,f.castArray=sp,f.chain=vu,f.chunk=dg,f.compact=pg,f.concat=_g,f.cond=B_,f.conforms=V_,f.constant=zs,f.countBy=yd,f.create=Mp,f.curry=yu,f.curryRight=Au,f.debounce=Ru,f.defaults=Fp,f.defaultsDeep=kp,f.defer=Kd,f.delay=Yd,f.difference=mg,f.differenceBy=vg,f.differenceWith=Sg,f.drop=Eg,f.dropRight=wg,f.dropRightWhile=Cg,f.dropWhile=Tg,f.fill=yg,f.filter=Rd,f.flatMap=Pd,f.flatMapDeep=Ld,f.flatMapDepth=xd,f.flatten=du,f.flattenDeep=Ag,f.flattenDepth=Rg,f.flip=Xd,f.flow=G_,f.flowRight=q_,f.fromPairs=bg,f.functions=qp,f.functionsIn=zp,f.groupBy=$d,f.initial=Pg,f.intersection=Lg,f.intersectionBy=xg,f.intersectionWith=$g,f.invert=Yp,f.invertBy=Xp,f.invokeMap=Ud,f.iteratee=Ks,f.keyBy=Nd,f.keys=be,f.keysIn=qe,f.map=fi,f.mapKeys=Zp,f.mapValues=jp,f.matches=z_,f.matchesProperty=K_,f.memoize=di,f.merge=e_,f.mergeWith=Du,f.method=Y_,f.methodOf=X_,f.mixin=Ys,f.negate=pi,f.nthArg=Z_,f.omit=t_,f.omitBy=n_,f.once=Jd,f.orderBy=Dd,f.over=j_,f.overArgs=Zd,f.overEvery=em,f.overSome=tm,f.partial=Hs,f.partialRight=bu,f.partition=Md,f.pick=r_,f.pickBy=Mu,f.property=Qu,f.propertyOf=nm,f.pull=Dg,f.pullAll=_u,f.pullAllBy=Mg,f.pullAllWith=Fg,f.pullAt=kg,f.range=rm,f.rangeRight=im,f.rearg=jd,f.reject=Wd,f.remove=Wg,f.rest=ep,f.reverse=Fs,f.sampleSize=Bd,f.set=s_,f.setWith=o_,f.shuffle=Vd,f.slice=Hg,f.sortBy=qd,f.sortedUniq=Kg,f.sortedUniqBy=Yg,f.split=P_,f.spread=tp,f.tail=Xg,f.take=Jg,f.takeRight=Zg,f.takeRightWhile=jg,f.takeWhile=ed,f.tap=pd,f.throttle=np,f.thru=hi,f.toArray=$u,f.toPairs=Fu,f.toPairsIn=ku,f.toPath=lm,f.toPlainObject=Uu,f.transform=a_,f.unary=rp,f.union=td,f.unionBy=nd,f.unionWith=rd,f.uniq=id,f.uniqBy=sd,f.uniqWith=od,f.unset=u_,f.unzip=ks,f.unzipWith=mu,f.update=l_,f.updateWith=c_,f.values=xn,f.valuesIn=h_,f.without=ad,f.words=Bu,f.wrap=ip,f.xor=ud,f.xorBy=ld,f.xorWith=cd,f.zip=hd,f.zipObject=fd,f.zipObjectDeep=gd,f.zipWith=dd,f.entries=Fu,f.entriesIn=ku,f.extend=Nu,f.extendWith=vi,Ys(f,f),f.add=hm,f.attempt=Vu,f.camelCase=p_,f.capitalize=Wu,f.ceil=fm,f.clamp=f_,f.clone=op,f.cloneDeep=up,f.cloneDeepWith=lp,f.cloneWith=ap,f.conformsTo=cp,f.deburr=Hu,f.defaultTo=Q_,f.divide=gm,f.endsWith=__,f.eq=mt,f.escape=m_,f.escapeRegExp=v_,f.every=Ad,f.find=bd,f.findIndex=fu,f.findKey=Wp,f.findLast=Id,f.findLastIndex=gu,f.findLastKey=Hp,f.floor=dm,f.forEach=Su,f.forEachRight=Eu,f.forIn=Bp,f.forInRight=Vp,f.forOwn=Qp,f.forOwnRight=Gp,f.get=Qs,f.gt=hp,f.gte=fp,f.has=Kp,f.hasIn=Gs,f.head=pu,f.identity=ze,f.includes=Od,f.indexOf=Ig,f.inRange=g_,f.invoke=Jp,f.isArguments=hn,f.isArray=G,f.isArrayBuffer=gp,f.isArrayLike=Ge,f.isArrayLikeObject=Se,f.isBoolean=dp,f.isBuffer=Jt,f.isDate=pp,f.isElement=_p,f.isEmpty=mp,f.isEqual=vp,f.isEqualWith=Sp,f.isError=Bs,f.isFinite=Ep,f.isFunction=Ft,f.isInteger=Iu,f.isLength=_i,f.isMap=Pu,f.isMatch=wp,f.isMatchWith=Cp,f.isNaN=Tp,f.isNative=yp,f.isNil=Rp,f.isNull=Ap,f.isNumber=Lu,f.isObject=fe,f.isObjectLike=ge,f.isPlainObject=dr,f.isRegExp=Vs,f.isSafeInteger=bp,f.isSet=xu,f.isString=mi,f.isSymbol=Ze,f.isTypedArray=Ln,f.isUndefined=Ip,f.isWeakMap=Pp,f.isWeakSet=Lp,f.join=Og,f.kebabCase=S_,f.last=ut,f.lastIndexOf=Ug,f.lowerCase=E_,f.lowerFirst=w_,f.lt=xp,f.lte=$p,f.max=pm,f.maxBy=_m,f.mean=mm,f.meanBy=vm,f.min=Sm,f.minBy=Em,f.stubArray=Js,f.stubFalse=Zs,f.stubObject=sm,f.stubString=om,f.stubTrue=am,f.multiply=wm,f.nth=Ng,f.noConflict=J_,f.noop=Xs,f.now=gi,f.pad=C_,f.padEnd=T_,f.padStart=y_,f.parseInt=A_,f.random=d_,f.reduce=Fd,f.reduceRight=kd,f.repeat=R_,f.replace=b_,f.result=i_,f.round=Cm,f.runInContext=S,f.sample=Hd,f.size=Qd,f.snakeCase=I_,f.some=Gd,f.sortedIndex=Bg,f.sortedIndexBy=Vg,f.sortedIndexOf=Qg,f.sortedLastIndex=Gg,f.sortedLastIndexBy=qg,f.sortedLastIndexOf=zg,f.startCase=L_,f.startsWith=x_,f.subtract=Tm,f.sum=ym,f.sumBy=Am,f.template=$_,f.times=um,f.toFinite=kt,f.toInteger=z,f.toLength=Ou,f.toLower=O_,f.toNumber=lt,f.toSafeInteger=Op,f.toString=ie,f.toUpper=U_,f.trim=N_,f.trimEnd=D_,f.trimStart=M_,f.truncate=F_,f.unescape=k_,f.uniqueId=cm,f.upperCase=W_,f.upperFirst=qs,f.each=Su,f.eachRight=Eu,f.first=pu,Ys(f,(function(){var e={};return Tt(f,function(t,i){re.call(f.prototype,i)||(e[i]=t)}),e})(),{chain:!1}),f.VERSION=o,rt(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){f[e].placeholder=f}),rt(["drop","take"],function(e,t){Z.prototype[e]=function(i){i=i===r?1:Ae(z(i),0);var a=this.__filtered__&&!t?new Z(this):this.clone();return a.__filtered__?a.__takeCount__=De(i,a.__takeCount__):a.__views__.push({size:De(i,Le),type:e+(a.__dir__<0?"Right":"")}),a},Z.prototype[e+"Right"]=function(i){return this.reverse()[e](i).reverse()}}),rt(["filter","map","takeWhile"],function(e,t){var i=t+1,a=i==ke||i==wt;Z.prototype[e]=function(l){var g=this.clone();return g.__iteratees__.push({iteratee:k(l,3),type:i}),g.__filtered__=g.__filtered__||a,g}}),rt(["head","last"],function(e,t){var i="take"+(t?"Right":"");Z.prototype[e]=function(){return this[i](1).value()[0]}}),rt(["initial","tail"],function(e,t){var i="drop"+(t?"":"Right");Z.prototype[e]=function(){return this.__filtered__?new Z(this):this[i](1)}}),Z.prototype.compact=function(){return this.filter(ze)},Z.prototype.find=function(e){return this.filter(e).head()},Z.prototype.findLast=function(e){return this.reverse().find(e)},Z.prototype.invokeMap=Y(function(e,t){return typeof e=="function"?new Z(this):this.map(function(i){return ur(i,e,t)})}),Z.prototype.reject=function(e){return this.filter(pi(k(e)))},Z.prototype.slice=function(e,t){e=z(e);var i=this;return i.__filtered__&&(e>0||t<0)?new Z(i):(e<0?i=i.takeRight(-e):e&&(i=i.drop(e)),t!==r&&(t=z(t),i=t<0?i.dropRight(-t):i.take(t-e)),i)},Z.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Z.prototype.toArray=function(){return this.take(Le)},Tt(Z.prototype,function(e,t){var i=/^(?:filter|find|map|reject)|While$/.test(t),a=/^(?:head|last)$/.test(t),l=f[a?"take"+(t=="last"?"Right":""):t],g=a||/^find/.test(t);l&&(f.prototype[t]=function(){var p=this.__wrapped__,m=a?[1]:arguments,E=p instanceof Z,A=m[0],R=E||G(p),P=function(X){var j=l.apply(f,Qt([X],m));return a&&U?j[0]:j};R&&i&&typeof A=="function"&&A.length!=1&&(E=R=!1);var U=this.__chain__,M=!!this.__actions__.length,W=g&&!U,K=E&&!M;if(!g&&R){p=K?p:new Z(this);var H=e.apply(p,m);return H.__actions__.push({func:hi,args:[P],thisArg:r}),new st(H,U)}return W&&K?e.apply(this,m):(H=this.thru(P),W?a?H.value()[0]:H.value():H)})}),rt(["pop","push","shift","sort","splice","unshift"],function(e){var t=Mr[e],i=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",a=/^(?:pop|shift)$/.test(e);f.prototype[e]=function(){var l=arguments;if(a&&!this.__chain__){var g=this.value();return t.apply(G(g)?g:[],l)}return this[i](function(p){return t.apply(G(p)?p:[],l)})}}),Tt(Z.prototype,function(e,t){var i=f[t];if(i){var a=i.name+"";re.call(An,a)||(An[a]=[]),An[a].push({name:t,func:i})}}),An[ii(r,te).name]=[{name:"wrapper",func:r}],Z.prototype.clone=Fh,Z.prototype.reverse=kh,Z.prototype.value=Wh,f.prototype.at=_d,f.prototype.chain=md,f.prototype.commit=vd,f.prototype.next=Sd,f.prototype.plant=wd,f.prototype.reverse=Cd,f.prototype.toJSON=f.prototype.valueOf=f.prototype.value=Td,f.prototype.first=f.prototype.head,tr&&(f.prototype[tr]=Ed),f}),Cn=mh();nn?((nn.exports=Cn)._=Cn,Ki._=Cn):xe._=Cn}).call(km)})(pr,pr.exports)),pr.exports}var Hm=Wm();const Ve={normalizePath:s=>{if(!s||s.length<=0)return s;let n=s;return n.startsWith("#")&&(n=n.substring(1)),n.startsWith("/")&&(n=n.substring(1)),n},segmentMatches:(s,n,r)=>!!(s===n||n.startsWith(":")&&r&&r[n.substr(1)]===s),checkMatch:(s,n,r)=>{let o=!0;return B.trimTrailingSlash(B.trimLeadingSlash(s)).split("/").forEach((u,c)=>{var h,d;o&&(c+1>=n.length||!((h=n[c+1])!=null&&h.pathSegment)||!Ve.segmentMatches(u,((d=n[c+1])==null?void 0:d.pathSegment)??"",r??{}))&&(o=!1)}),o},checkVisibleForFeatureToggles:(s,n)=>{if(s!=null&&s.visibleForFeatureToggles){const r=(n==null?void 0:n.getActiveFeatureToggleList())||[];for(const o of s.visibleForFeatureToggles)if(o.startsWith("!")){if(r.includes(o.slice(1)))return!1}else if(!r.includes(o))return!1}return!0},generateTooltipText:(s,n,r)=>{let o=s==null?void 0:s.tooltipText;switch(o===void 0&&(o=r.getConfigValue("navigation.defaults.tooltipText")),o){case void 0:return n;case!1:return"";default:return r.i18n().getTranslation(o)}},isNodeAccessPermitted:(s,n,r,o)=>{if(o.auth().isAuthorizationEnabled()){const h=fn.isLoggedIn(),d=s.anonymousAccess;if(h&&d==="exclusive"||!h&&d!=="exclusive"&&d!==!0)return!1}const u=o.featureToggles();if(!Ve.checkVisibleForFeatureToggles(s,u))return!1;const c=o.getConfigValue("navigation.nodeAccessibilityResolver");return typeof c!="function"?!0:c(s,n,r)},updateHeaderTitle:(s,n)=>{const r=s==null?void 0:s.items;if(r&&n){let o="";return[...r].sort((u,c)=>(c.link||"").localeCompare(u.link||"")).some(u=>{let c=!1;if(c=Ve.checkMatch(u.link||"",n.nodesInPath??[]),!c&&u.selectionConditions&&u.selectionConditions.route&&(c=Ve.checkMatch(u.selectionConditions.route,n.nodesInPath??[]),c&&(u.selectionConditions.contextCriteria||[]).forEach(h=>{var d,_;c=c&&((_=(d=n==null?void 0:n.selectedNode)==null?void 0:d.context)==null?void 0:_[h.key])===h.value})),c)return o=u.title||"",!0}),o}},buildPath(s,n){return s.map(o=>{var c;const u=o.pathSegment;if(u!=null&&u.startsWith(":")){const h=u.slice(1),d=(c=n==null?void 0:n.pathParams)==null?void 0:c[h];if(d!=null)return encodeURIComponent(String(d))}return u}).join("/")},mergeContext(...s){return Object.assign({},...s)},prepareForTests(...s){let n="";return s.forEach(r=>{r&&(n+=(n?"_":"")+encodeURIComponent(r.toLowerCase().split(" ").join("")))}),n}},q={defaultContentViewParamPrefix:"~",defaultQueryParamSeparator:"?",defaultModalViewParamName:"modal",addParamsOnHashRouting(s,n,r){let o=n;const[u,c]=o.split("?"),h=new URLSearchParams(c);return this.modifySearchParams(s,h,r),o=u,h.toString()!==""&&(o+=`?${h.toString()}`),o},modifySearchParams(s,n,r){for(const[o,u]of Object.entries(s)){const c=r?`${r}${o}`:o;n.set(c,u),u===void 0&&n.delete(c)}},filterNodeParams(s,n){const r={},o=this.getContentViewParamPrefix(n);return s&&Object.entries(s).forEach(u=>{if(u[0].startsWith(o)){const c=u[0].substr(o.length);r[c]=u[1]}}),this.sanitizeParamsMap(r)},getContentViewParamPrefix(s){let n=s==null?void 0:s.getConfigValue("routing.nodeParamPrefix");return n===!1?n="":n||(n=this.defaultContentViewParamPrefix),n},sanitizeParamsMap(s){return Object.entries(s).reduce((n,r)=>(n[yi.sanitizeParam(r[0])]=yi.sanitizeParam(r[1]),n),{})},prepareSearchParamsForClient(s,n){const r={};return s&&s.clientPermissions&&s.clientPermissions.urlParameters&&Object.keys(s.clientPermissions.urlParameters).forEach(o=>{var u,c;o in n.routing().getSearchParams()&&((u=s.clientPermissions)!=null&&u.urlParameters)&&((c=s.clientPermissions.urlParameters[o])==null?void 0:c.read)===!0&&(r[o]=n.routing().getSearchParams()[o])}),r},getCurrentPath(s){if(s){const n=Ve.normalizePath(location.hash),[r,o]=n.split("?");return{path:r,query:o}}else return{path:Ve.normalizePath(location.pathname),query:location.search}},getModalPathFromPath(s){return this.getQueryParam(this.getModalViewParamName(s),s)},getQueryParam(s,n){return this.getQueryParams(n)[s]},getQueryParams(s){return s.getConfigValue("routing.useHashRouting")?this.getLocationHashQueryParams():this.getLocationSearchQueryParams()},getLocationSearchQueryParams(){return q.getLocation().search?q.parseParams(q.getLocation().search.slice(1)):{}},getLocation(){return location},getLocationHashQueryParams(){const s=q.getLocation().hash.indexOf(this.defaultQueryParamSeparator);return s!==-1?q.parseParams(q.getLocation().hash.slice(s+1)):{}},getModalViewParamName(s){let n=s.getConfigValue("routing.modalPathParam");return n||(n=this.defaultModalViewParamName),n},parseParams(s){const n=new URLSearchParams(s),r=new Map;for(const[o,u]of n.entries())r.set(o,u);return Object.fromEntries(r)},getModalParamsFromPath(s){const n=this.getQueryParam(`${this.getModalViewParamName(s)}Params`,s);return n&&JSON.parse(n)},getHashQueryParamSeparator(){return this.defaultQueryParamSeparator},getURLWithoutModalData(s,n){const r=new URLSearchParams(s);return r.delete(n),r.delete(`${n}Params`),r.toString()},handleHistoryState(s,n){return s&&s.modalHistoryLength?s.modalHistoryLength+=1:s={modalHistoryLength:1,historygap:history.length,pathBeforeHistory:n},s},encodeParams(s){const n=[];for(const r in s)n.push(encodeURIComponent(r)+"="+encodeURIComponent(s[r]));return n.join("&")},getLastNodeObject(s){return(s.nodesInPath?[...s.nodesInPath].pop():{})||{}},checkWCUrl(s,n){if(s.indexOf("://")>0||s.trim().indexOf("//")===0){if(new URL(s).host===window.location.host)return!0;const o=n.getConfigValue("navigation.validWebcomponentUrls");if((o==null?void 0:o.length)>0)for(const u of o)try{if(new RegExp(u).test(s))return!0}catch(c){console.error(c)}return!1}return!0},setFeatureToggles(s,n,r){const o=this.sanitizeParamsMap(this.parseParams(n.split("?")[1]));let u;if(o[s]&&(u=o[s]),!u)return;const c=u.split(",");c.length>0&&c[0]!==""&&c.forEach(h=>r==null?void 0:r.setFeatureToggle(h,!0))},substituteDynamicParamsInObject(s,n,r=":",o=!1){return Object.entries(s).map(([u,c])=>{const h=o?Object.keys(n).find(d=>c&&c.indexOf(r+d)>=0):Object.keys(n).find(d=>c===r+d);return[u,h?o?c.replace(r+h,n[h]):n[h]:c]}).reduce((u,[c,h])=>Object.assign(u,{[c]:h}),{})}},to={logout:{label:"Sign Out",icon:"log"}};class Bm{constructor(){this.services=new Map}register(n,r,o=!0){this.services.set(n,{factory:r,singleton:o})}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 se=new Bm;class tn{constructor(n){this.luigi=n}getPathData(n){var v;const r=this.luigi.getConfig();let o=n.split("/");(o==null?void 0:o.length)>0&&o[0]===""&&(o=o.slice(1));let c=r.navigation.globalContext||{};const h=this.prepareRootNodes((v=r.navigation)==null?void 0:v.nodes,c);let d={};const _={selectedNodeChildren:h,nodesInPath:[{children:h}],rootNodes:h,pathParams:d};return o.forEach(x=>{var C,y,I;if(_.selectedNodeChildren){const L=this.findMatchingNode(x,_.selectedNodeChildren||[]);if(!L){console.log("No matching node found for segment:",x,"in children:",_.selectedNodeChildren);return}const D=L.context||{},F=Ve.mergeContext(c,D);let te=F;_.selectedNodeChildren=this.getAccessibleNodes(L,L.children||[],F),(C=L.pathSegment)!=null&&C.startsWith(":")&&(d[L.pathSegment.replace(":","")]=yi.sanitizeParam(x),te=q.substituteDynamicParamsInObject(F,d)),c=te,L.context=te,_.selectedNode=L,_.selectedNodeChildren=(y=_.selectedNode)!=null&&y.children?this.getAccessibleNodes(_.selectedNode,_.selectedNode.children,c):void 0,_.selectedNode&&((I=_.nodesInPath)==null||I.push(_.selectedNode))}}),_}findMatchingNode(n,r){let o;const u=r.filter(h=>!!h.pathSegment).length,c=r.filter(h=>h.pathSegment&&h.pathSegment.startsWith(":")).length;if(u>1&&(c===1&&(console.warn(`Invalid node setup detected.
|
|
1
|
+
var ui=Object.defineProperty;var St=i=>{throw TypeError(i)};var hi=(i,e,t)=>e in i?ui(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t;var A=(i,e,t)=>hi(i,typeof e!="symbol"?e+"":e,t),_t=(i,e,t)=>e.has(i)||St("Cannot "+t);var Q=(i,e,t)=>(_t(i,e,"read from private field"),t?t.call(i):e.get(i)),it=(i,e,t)=>e.has(i)?St("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),nt=(i,e,t,n)=>(_t(i,e,"write to private field"),n?n.call(i,t):e.set(i,t),t);class di{constructor(e){this.$subscribers=new Set,this.$value=e}set(e){this.$value=e,this.$subscribers.forEach(t=>{t(e)})}update(e){this.set(e(this.$value))}subscribe(e){return this.$subscribers.add(e),e(this.$value),()=>{this.$subscribers.delete(e)}}}function Ot(i){return i.$value}function Be(i){return new di(i)}const v={getRandomId:()=>window.crypto.getRandomValues(new Uint32Array(1))[0],isPromise:i=>i&&v.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)),trimLeadingSlash:i=>v.isString(i)?i.replace(/^\/+/g,""):"",trimTrailingSlash:i=>v.isString(i)?i.replace(/\/+$/,""):"",isElementVisible:i=>i?window.getComputedStyle(i).getPropertyValue("display")!=="none":!1,getNodeList:(i,e=!1)=>{const t=[];return i&&Array.from(document.querySelectorAll(i)).forEach(r=>{e?v.isElementVisible(r)&&t.push(r):t.push(r)}),t},prependOrigin:i=>{if(!i||i.startsWith("http"))return i;const e=i.startsWith("/");return i.length?window.location.origin+(e?"":"/")+i:window.location.origin},getConfigValueFromObject:(i,e)=>{let t=0,n=i;const r=e.split(".");for(;n&&t<r.length;)n=n[r[t++]];return n},getConfigBooleanValue:(i,e)=>{const t=v.getConfigValueFromObject(i,e);return t===!0||t==="true"},getUrlParameter:i=>new URLSearchParams(window.location.search).get(i)},we={wrapAsPromise:i=>new Promise(e=>{e(i)}),applyFunctionPromisified:(i,e)=>(i=i.apply(void 0,e),v.isPromise(i)?i:we.wrapAsPromise(i)),getConfigValueFromObjectAsync:(i,e,...t)=>{const n=v.getConfigValueFromObject(i,e);return v.isFunction(n)?we.applyFunctionPromisified(n,t):we.wrapAsPromise(n)}};class gi{setErrorMessage(e){var t,n;(n=(t=this.getLuigi().getEngine())==null?void 0:t._connector)==null||n.showFatalError(e)}getLuigi(){return window.Luigi}getConfigValue(e){return this.getLuigi().getConfigValue(e)}getConfigValueAsync(e){return this.getLuigi().getConfigValueAsync(e)}async executeConfigFnAsync(e,t=!1,...n){const r=this.getConfigValue(e);if(v.isFunction(r))try{return await we.applyFunctionPromisified(r,n)}catch(s){if(t)return Promise.reject(s)}return Promise.resolve(void 0)}}const F=new gi;class fi{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=F.getConfigValue("auth.storage")||this._defaultStorage),this._storageType}getAuthData(){return this._getStore(this.getStorageKey())}setAuthData(e){this._setStore(this.getStorageKey(),e)}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(e){return window[e]}_setStore(e,t){switch(this.getStorageType()){case"localStorage":case"sessionStorage":t!==void 0?this._getWebStorage(this.getStorageType()).setItem(e,JSON.stringify(t)):this._getWebStorage(this.getStorageType()).removeItem(e);break;case"none":this._internalStorage[e]=t;break;default:console.error(this._invalidStorageMsg)}}_getStore(e){try{switch(this.getStorageType()){case"localStorage":case"sessionStorage":return JSON.parse(this._getWebStorage(this.getStorageType()).getItem(e));case"none":return this._internalStorage[e];default:console.error(this._invalidStorageMsg)}}catch{console.warn("Error parsing authorization data. Auto-logout might not work!")}}}const q=new fi;class pi{isAuthorizationEnabled(){return!!F.getConfigValue("auth.use")}login(){this.isAuthorizationEnabled()&&Te.startAuthorization()}logout(){this.isAuthorizationEnabled()&&Te.logout()}async handleAuthEvent(e,t,n,r){const s=await F.executeConfigFnAsync("auth.events."+e,!1,t,n),a=s===void 0||!!s;if(a&&r){window.location.href=r;return}return a}get store(){var e;return(e=F.getLuigi())!=null&&e.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:()=>q.getStorageKey(),getStorageType:()=>q.getStorageType(),getAuthData:()=>q.getAuthData(),setAuthData:t=>q.setAuthData(t),removeAuthData:()=>q.removeAuthData(),setNewlyAuthorized:()=>{q.setNewlyAuthorized(),Te.resetExpirationChecks()}}}}const ve=new pi;class mi{getStoredAuthData(){return q.getAuthData()}isLoggedIn(){const e=this.getStoredAuthData();return!!(e&&e.accessTokenExpirationDate>Number(new Date))}parseUrlAuthErrors(){const e=v.getUrlParameter("error"),t=v.getUrlParameter("errorDescription");if(e)return{error:e,errorDescription:t}}async handleUrlAuthErrors(e,t,n){return t?await ve.handleAuthEvent("onAuthError",e,{error:t,errorDescription:n},e.logoutUrl+"?post_logout_redirect_uri="+e.post_logout_redirect_uri+"&error="+t+"&errorDescription="+n):!0}}const he=new mi;class Si{constructor(){this._userInfoStore=Be({}),this._loggedInStore=Be(!1)}setUserInfo(e){this._userInfoStore.set(e)}setLoggedIn(e){this._loggedInStore.set(e)}getUserInfoStore(){return this._userInfoStore}getLoggedInStore(){return this._loggedInStore}async init(){const e=F.getConfigValue("auth.use");if(!e)return Promise.resolve(!0);const t=F.getConfigValue(`auth.${e}`),n=he.parseUrlAuthErrors()||{};if(await he.handleUrlAuthErrors(t,n.error,n.errorDescription))return this.idpProviderInstance=this.getIdpProviderInstance(e,t),v.isPromise(this.idpProviderInstance)?this.idpProviderInstance.then(s=>(this.idpProviderInstance=s,this.checkAuth(t))).catch(s=>{const a=`Error: ${s.message||s}`;console.error(a,s.message&&s),F.setErrorMessage(a)}):this.checkAuth(t)}async checkAuth(e){const t=he.getStoredAuthData();if(!t||!he.isLoggedIn()){if(F.getConfigValue("auth.disableAutoLogin"))return;let r=!0;return t&&(r=await ve.handleAuthEvent("onAuthExpired",e)),r?this.startAuthorization():void 0}this.idpProviderInstance.settings&&v.isFunction(this.idpProviderInstance.settings.userInfoFn)?this.idpProviderInstance.settings.userInfoFn(this.idpProviderInstance.settings,t).then(r=>{this.setUserInfo(r),this.setLoggedIn(!0)}):v.isFunction(this.idpProviderInstance.userInfo)?this.idpProviderInstance.userInfo(e).then(r=>{this.setUserInfo(r),this.setLoggedIn(!0)}):(this.setLoggedIn(!0),this.setUserInfo(Ot(this._userInfoStore))),v.isFunction(F.getConfigValue("auth.events.onAuthSuccessful"))&&q.isNewlyAuthorized()&&await ve.handleAuthEvent("onAuthSuccessful",e,t),q.removeNewlyAuthorized(),v.isFunction(this.idpProviderInstance.setTokenExpirationAction)&&this.idpProviderInstance.setTokenExpirationAction(),v.isFunction(this.idpProviderInstance.setTokenExpireSoonAction)&&this.idpProviderInstance.setTokenExpireSoonAction()}async startAuthorization(){if(this.idpProviderInstance)return this.idpProviderInstance.login().then(e=>{q.setNewlyAuthorized(),e&&console.error(e)})}logout(){const e=he.getStoredAuthData(),t=async s=>{await ve.handleAuthEvent("onLogout",this.idpProviderInstance.settings,void 0,s),q.removeAuthData()},n=F.getConfigValue(`auth.${F.getConfigValue("auth.use")}.logoutFn`),r=F.getConfigValueAsync("navigation.profile.logout.customLogoutFn");v.isFunction(n)?n(this.idpProviderInstance.settings,e,t):v.isFunction(this.idpProviderInstance.logout)?this.idpProviderInstance.logout(e,t):r&&v.isFunction(r)?r(e,t):t(this.idpProviderInstance.settings.logoutUrl)}createIdpProviderException(e){return{message:e,name:"IdpProviderException"}}async getIdpProviderInstance(e,t){const n=v.getConfigValueFromObject(t,"idpProvider");if(n){const s=await new n(t);return["login"].forEach(a=>{if(!v.isFunction(s[a]))throw this.createIdpProviderException(`${a} function does not exist in custom IDP Provider ${e}`)}),s}if(v.isFunction(F.getConfigValue("auth.events.onAuthConfigError")))await ve.handleAuthEvent("onAuthConfigError",{idpProviderName:e,type:"IdpProviderException"});else throw this.createIdpProviderException(`IDP Provider ${e} does not exist.`)}unload(){this.idpProviderInstance&&v.isFunction(this.idpProviderInstance.unload)&&this.idpProviderInstance.unload()}resetExpirationChecks(){this.idpProviderInstance&&v.isFunction(this.idpProviderInstance.resetExpirationChecks)&&this.idpProviderInstance.resetExpirationChecks()}}const Te=new Si,_i={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"}}},Ei=_i,qe={sanitizeHtml(i=""){return i.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'").replace(/javascript:/g,"")},restoreSanitizedBrs(i=""){return i.replace(/<br\/>/g,"<br>").replace(/<br \/>/g,"<br>").replace(/<br>/g,"<br>").replace(/<br >/g,"<br>")},restoreSanitizedElements(i=""){let e=i;const t=["i","b","br","mark","strong","em","small","del","ins","sub","sup"];for(let n=0;n<t.length;n++){const r=new RegExp(`<${t[n]}/>`,"g"),s=new RegExp(`<${t[n]} />`,"g"),a=new RegExp(`<${t[n]}>`,"g"),o=new RegExp(`<${t[n]} >`,"g"),l=new RegExp(`</${t[n]}[/]>`,"g"),c=new RegExp(`</${t[n]} [/]>`,"g"),f=new RegExp(`<[/]${t[n]}>`,"g"),h=new RegExp(`<[/]${t[n]} >`,"g");e=e.replace(r,`<${t[n]}>`).replace(s,`<${t[n]}>`).replace(a,`<${t[n]}>`).replace(o,`<${t[n]}>`).replace(l,`</${t[n]}>`).replace(c,`</${t[n]}>`).replace(f,`</${t[n]}>`).replace(h,`</${t[n]}>`)}return e},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="",e,t){const r={sanitizedText:this.restoreSanitizedBrs(this.sanitizeHtml(i)),links:[]};return e?Object.entries(e).reduce((s,[a,o])=>{const l=`_luigi_alert_${t}_link_${this.sanitizeParam(a)}`,c=this.restoreSanitizedBrs(this.sanitizeHtml(o.text)),f=`<a id="${l}">${c}</a>`,h=this.escapeKeyForRegexp(a),u=new RegExp(`({${h}})`,"g");return{sanitizedText:s.sanitizedText.replace(u,f),links:s.links.concat({elemId:l,url:o.url?encodeURI(this.sanitizeHtml(o.url)):void 0,dismissKey:o.dismissKey?encodeURI(this.sanitizeHtml(o.dismissKey)):void 0})}},r):r}};class vi{constructor(e){this.luigi=e,this.currentLocaleStorageKey="luigi.currentLocale",this.defaultLocale="en",this.listeners={},this.translationTable=Ei}_init(){this._initCustomImplementation(),this.addCurrentLocaleChangeListener(e=>{this.broadcastLocaleToAllContainers(e)})}getCurrentLocale(){return sessionStorage.getItem(this.currentLocaleStorageKey)||this.defaultLocale}setCurrentLocale(e,t){var n,r;if(!((n=t==null?void 0:t.clientPermissions)!=null&&n.changeCurrentLocale)){console.error('Current locale change declined from client, as client permission "changeCurrentLocale" is not set for this view.');return}e&&(t&&(t.locale=e),sessionStorage.setItem(this.currentLocaleStorageKey,e),this._notifyLocaleChange(e)),(r=this.luigi.getEngine()._connector)==null||r.setCurrentLocale(e)}addCurrentLocaleChangeListener(e){let t=null;return v.isFunction(e)?(t=v.getRandomId(),this.listeners[t]=e):console.error("Provided locale change listener is not a function."),t}removeCurrentLocaleChangeListener(e){e&&this.listeners[e]?delete this.listeners[e]:console.error("Unable to remove locale change listener - no listener registered for given ID.")}getTranslation(e,t=void 0,n=void 0){if(!e)return"";if(this.translationImpl){const s=this.translationImpl.getTranslation(e,t,n);if(s!==e)return s}const r=this.findTranslation(e,this.translationTable,t);return r||e}_notifyLocaleChange(e){Object.getOwnPropertyNames(this.listeners).forEach(t=>{this.listeners[Number(t)](e)}),this.luigi.configChanged()}_initCustomImplementation(){this.translationImpl=this.luigi.getConfigValue("settings.customTranslationImplementation"),v.isFunction(this.translationImpl)&&(this.translationImpl=this.translationImpl())}broadcastLocaleToAllContainers(e){const t=v.getNodeList("luigi-container[lui_container]");t!=null&&t.length&&e&&t.forEach(n=>{n.locale=e,n.updateContext({locale:e})})}findTranslation(e,t,n){const r=e.split(".");for(let s=0;s<r.length;s++){const a=r[s];if(Object.prototype.hasOwnProperty.call(t,a)&&typeof t[a]=="object")t=t[a];else return n?this.findInterpolations(t[a],n):t[a]}}findInterpolations(e,t){return typeof e!="string"||!e.trim()||Object.keys(t).forEach(n=>{e=e.replace(new RegExp("{"+qe.escapeKeyForRegexp(n)+"}","gi"),t[n])}),e}}const Ci={luigiAfterInit:async i=>{v.getConfigBooleanValue(i.getConfig(),"settings.appLoadingIndicator.hideAutomatically")&&setTimeout(()=>{i.ux().hideAppLoadingIndicator()},0),await F.executeConfigFnAsync("lifecycleHooks.luigiAfterInit")}};class wi{constructor(){this.featureToggleList=new Set}setFeatureToggle(e,t=!1){this.isValid(e)&&(e.startsWith("!")&&!t||this.isDuplicatedOrDisabled(e)||this.featureToggleList.add(e))}unsetFeatureToggle(e){if(this.isValid(e)){if(!this.featureToggleList.has(e)){console.warn("Feature toggle name is not in the list.");return}this.featureToggleList.delete(e)}}getActiveFeatureToggleList(){return[...Array.from(this.featureToggleList)].filter(t=>!t.startsWith("!"))}isValid(e){return v.isString(e)?!0:(console.warn("Feature toggle name is not valid or not of type 'string'"),!1)}isDuplicatedOrDisabled(e){return this.featureToggleList.has(e)?(console.warn("Feature toggle name already exists"),!0):this.featureToggleList.has(`!${e}`)?(console.warn("Disabled feature toggle can not be activated"),!0):!1}}class fe{constructor(e){this.luigi=e,this._modalStack=[],this.modalSettings={}}async closeModals(){if(this._modalStack.length===0)return;const e=[...this._modalStack];for(const{onInternalClose:t}of e)try{typeof t=="function"&&t()}catch(n){console.warn("onInternalClose threw an error",n)}this.clearModalStack()}registerModal(e){e&&this._modalStack.push(e)}getModalSettings(){return this._modalStack.length>0?this._modalStack[0].modalsettings||{}:{}}getModalStackLength(){return this._modalStack.length}updateFirstModalSettings(e){if(this._modalStack.length>0){const t=this._modalStack[0];t.modalsettings={...t.modalsettings,...e}}}clearModalStack(){this._modalStack=[]}removeLastModalFromStack(){this._modalStack.pop()}}const M={normalizePath:i=>{if(!i||i.length<=0)return i;let e=i;return e.startsWith("#")&&(e=e.substring(1)),e.startsWith("/")&&(e=e.substring(1)),e},segmentMatches:(i,e,t)=>!!(i===e||e.startsWith(":")&&t&&t[e.substr(1)]===i),checkMatch:(i,e,t)=>{let n=!0;return v.trimTrailingSlash(v.trimLeadingSlash(i)).split("/").forEach((r,s)=>{var a,o;n&&(s+1>=e.length||!((a=e[s+1])!=null&&a.pathSegment)||!M.segmentMatches(r,((o=e[s+1])==null?void 0:o.pathSegment)??"",t??{}))&&(n=!1)}),n},checkVisibleForFeatureToggles:(i,e)=>{if(i!=null&&i.visibleForFeatureToggles){const t=(e==null?void 0:e.getActiveFeatureToggleList())||[];for(const n of i.visibleForFeatureToggles)if(n.startsWith("!")){if(t.includes(n.slice(1)))return!1}else if(!t.includes(n))return!1}return!0},generateTooltipText:(i,e,t)=>{let n=i==null?void 0:i.tooltipText;switch(n===void 0&&(n=t.getConfigValue("navigation.defaults.tooltipText")),n){case void 0:return e;case!1:return"";default:return t.i18n().getTranslation(n)}},isNodeAccessPermitted:(i,e,t,n)=>{if(n.auth().isAuthorizationEnabled()){const a=he.isLoggedIn(),o=i.anonymousAccess;if(a&&o==="exclusive"||!a&&o!=="exclusive"&&o!==!0)return!1}const r=n.featureToggles();if(!M.checkVisibleForFeatureToggles(i,r))return!1;const s=n.getConfigValue("navigation.nodeAccessibilityResolver");return typeof s!="function"?!0:s(i,e,t)},updateHeaderTitle:(i,e)=>{const t=i==null?void 0:i.items;if(t&&e){let n="";return[...t].sort((r,s)=>(s.link||"").localeCompare(r.link||"")).some(r=>{let s=!1;if(s=M.checkMatch(r.link||"",e.nodesInPath??[]),!s&&r.selectionConditions&&r.selectionConditions.route&&(s=M.checkMatch(r.selectionConditions.route,e.nodesInPath??[]),s&&(r.selectionConditions.contextCriteria||[]).forEach(a=>{var o,l;s=s&&((l=(o=e==null?void 0:e.selectedNode)==null?void 0:o.context)==null?void 0:l[a.key])===a.value})),s)return n=r.title||"",!0}),n}},buildPath(i,e){return i.map(n=>{var s;const r=n.pathSegment;if(r!=null&&r.startsWith(":")){const a=r.slice(1),o=(s=e==null?void 0:e.pathParams)==null?void 0:s[a];if(o!=null)return encodeURIComponent(String(o))}return r}).join("/")},mergeContext(...i){return Object.assign({},...i)},prepareForTests(...i){let e="";return i.forEach(t=>{t&&(e+=(e?"_":"")+encodeURIComponent(t.toLowerCase().split(" ").join("")))}),e}};class le{constructor(){this.dataManagement=new Map}setChildren(e,t){this.dataManagement.set(e,t),this.navPath=""}getChildren(e){return e?this.dataManagement.get(e):{}}hasChildren(e){const t=this.getChildren(e);return!!(t&&Object.prototype.hasOwnProperty.call(t,"children"))}setRootNode(e){this.dataManagement.set("_luigiRootNode",{node:e})}getRootNode(){return this.dataManagement.get("_luigiRootNode")}hasRootNode(){return!!this.getRootNode()}deleteCache(){this.dataManagement.clear()}deleteNodesRecursively(e){if(this.hasChildren(e)){const t=this.getChildren(e).children;for(let n=0;n<t.length;n++)this.deleteNodesRecursively(t[n])}this.dataManagement.delete(e)}}const C={defaultContentViewParamPrefix:"~",defaultQueryParamSeparator:"?",defaultModalViewParamName:"modal",addParamsOnHashRouting(i,e,t){let n=e;const[r,s]=n.split("?"),a=new URLSearchParams(s);return this.modifySearchParams(i,a,t),n=r,a.toString()!==""&&(n+=`?${a.toString()}`),n},modifySearchParams(i,e,t){for(const[n,r]of Object.entries(i)){const s=t?`${t}${n}`:n;e.set(s,r),r===void 0&&e.delete(s)}},filterNodeParams(i,e){const t={},n=this.getContentViewParamPrefix(e);return i&&Object.entries(i).forEach(r=>{if(r[0].startsWith(n)){const s=r[0].substr(n.length);t[s]=r[1]}}),this.sanitizeParamsMap(t)},getContentViewParamPrefix(i){let e=i==null?void 0:i.getConfigValue("routing.nodeParamPrefix");return e===!1?e="":e||(e=this.defaultContentViewParamPrefix),e},sanitizeParamsMap(i){return Object.entries(i).reduce((e,t)=>(e[qe.sanitizeParam(t[0])]=qe.sanitizeParam(t[1]),e),{})},prepareSearchParamsForClient(i,e){const t={};return i&&i.clientPermissions&&i.clientPermissions.urlParameters&&Object.keys(i.clientPermissions.urlParameters).forEach(n=>{var r,s;n in e.routing().getSearchParams()&&((r=i.clientPermissions)!=null&&r.urlParameters)&&((s=i.clientPermissions.urlParameters[n])==null?void 0:s.read)===!0&&(t[n]=e.routing().getSearchParams()[n])}),t},getCurrentPath(i){if(i){const e=M.normalizePath(location.hash),[t,n]=e.split("?");return{path:t,query:n}}else return{path:M.normalizePath(location.pathname),query:location.search}},getModalPathFromPath(i){return this.getQueryParam(this.getModalViewParamName(i),i)},getQueryParam(i,e){return this.getQueryParams(e)[i]},getQueryParams(i){return i.getConfigValue("routing.useHashRouting")?this.getLocationHashQueryParams():this.getLocationSearchQueryParams()},getLocationSearchQueryParams(){return C.getLocation().search?C.parseParams(C.getLocation().search.slice(1)):{}},getLocation(){return location},getLocationHashQueryParams(){const i=C.getLocation().hash.indexOf(this.defaultQueryParamSeparator);return i!==-1?C.parseParams(C.getLocation().hash.slice(i+1)):{}},getModalViewParamName(i){let e=i.getConfigValue("routing.modalPathParam");return e||(e=this.defaultModalViewParamName),e},parseParams(i){const e=new URLSearchParams(i),t=new Map;for(const[n,r]of e.entries())t.set(n,r);return Object.fromEntries(t)},getModalParamsFromPath(i){const e=this.getQueryParam(`${this.getModalViewParamName(i)}Params`,i);return e&&JSON.parse(e)},getHashQueryParamSeparator(){return this.defaultQueryParamSeparator},getURLWithoutModalData(i,e){const t=new URLSearchParams(i);return t.delete(e),t.delete(`${e}Params`),t.toString()},handleHistoryState(i,e){return i&&i.modalHistoryLength?i.modalHistoryLength+=1:i={modalHistoryLength:1,historygap:history.length,pathBeforeHistory:e},i},encodeParams(i){const e=[];for(const t in i)e.push(encodeURIComponent(t)+"="+encodeURIComponent(i[t]));return e.join("&")},getLastNodeObject(i){return(i.nodesInPath?[...i.nodesInPath].pop():{})||{}},checkWCUrl(i,e){if(i.indexOf("://")>0||i.trim().indexOf("//")===0){if(new URL(i).host===window.location.host)return!0;const n=e.getConfigValue("navigation.validWebcomponentUrls");if((n==null?void 0:n.length)>0)for(const r of n)try{if(new RegExp(r).test(i))return!0}catch(s){console.error(s)}return!1}return!0},setFeatureToggles(i,e,t){const n=this.sanitizeParamsMap(this.parseParams(e.split("?")[1]));let r;if(n[i]&&(r=n[i]),!r)return;const s=r.split(",");s.length>0&&s[0]!==""&&s.forEach(a=>t==null?void 0:t.setFeatureToggle(a,!0))},substituteDynamicParamsInObject(i,e,t=":",n=!1){return Object.entries(i).map(([r,s])=>{const a=n?Object.keys(e).find(o=>s&&s.indexOf(t+o)>=0):Object.keys(e).find(o=>s===t+o);return[r,a?n?s.replace(t+a,e[a]):e[a]:s]}).reduce((r,[s,a])=>Object.assign(r,{[s]:a}),{})},isDynamicNode(i){return typeof i.pathSegment=="string"&&i.pathSegment.length>0&&i.pathSegment[0]===":"},getDynamicNodeValue(i,e){return this.isDynamicNode(i)&&i.pathSegment?e[i.pathSegment.substring(1)]:void 0}},rt={logout:{label:"Sign Out",icon:"log"}};class Ti{constructor(){this.services=new Map}register(e,t,n=!0){this.services.set(e,{factory:t,singleton:n})}get(e){const t=this.services.get(e);if(!t)throw new Error(`Service '${e}' is not registered.`);return t.singleton?(t.instance||(t.instance=t.factory()),t.instance):t.factory()}}const y=new Ti;class ce{constructor(e){this.luigi=e}getNodeDataManagementService(){return this.nodeDataManagementService||(this.nodeDataManagementService=y.get(le)),this.nodeDataManagementService}async getPathData(e){var c,f,h;const t=this.luigi.getConfig();let n=e.split("/");(n==null?void 0:n.length)>0&&n[0]===""&&(n=n.slice(1));let s=((c=t.navigation)==null?void 0:c.globalContext)||{},a;if(this.getNodeDataManagementService().hasRootNode())a=this.getNodeDataManagementService().getRootNode().node;else{let u=await this.luigi.getConfigValueAsync("navigation.nodes");typeof u=="object"&&!Array.isArray(u)?(a=u,a.pathSegment&&(a.pathSegment="",console.warn("Root node must have an empty path segment. Provided path segment will be ignored."))):a={children:u},a.children=await this.getChildren(a,s),a.children=this.prepareRootNodes(a.children||[],s),this.getNodeDataManagementService().setRootNode(a)}let o={};const l={selectedNodeChildren:a.children,nodesInPath:[a],rootNodes:a.children,pathParams:o};for(const u of n)if(l.selectedNodeChildren){const d=this.findMatchingNode(u,l.selectedNodeChildren||[]);if(!d){console.warn("No matching node found for segment:",u);break}const S=d.context||{},_=M.mergeContext(s,S);let E=_;l.selectedNodeChildren=this.getAccessibleNodes(d,d.children||[],_),(f=d.pathSegment)!=null&&f.startsWith(":")&&(o[d.pathSegment.replace(":","")]=qe.sanitizeParam(u),E=C.substituteDynamicParamsInObject(_,o)),s=E,d.context=E,l.selectedNode=d,l.selectedNode&&((h=l.nodesInPath)==null||h.push(l.selectedNode));let R=await this.getChildren(d,s);l.selectedNodeChildren=R?this.getAccessibleNodes(l.selectedNode,R,s):void 0}return l}findMatchingNode(e,t){let n;const r=t.filter(a=>!!a.pathSegment).length,s=t.filter(a=>a.pathSegment&&a.pathSegment.startsWith(":")).length;if(r>1&&(s===1&&(console.warn(`Invalid node setup detected.
|
|
28
2
|
Static and dynamic nodes cannot be used together on the same level. Static node gets cleaned up.
|
|
29
3
|
Remove the static node from the configuration to resolve this warning.
|
|
30
|
-
Affected pathSegment:`,
|
|
4
|
+
Affected pathSegment:`,e,"Children:",t),t=t.filter(a=>a.pathSegment&&a.pathSegment.startsWith(":"))),s>1)){console.error(`Invalid node setup detected.
|
|
31
5
|
Multiple dynamic nodes are not allowed on the same level. Stopped navigation.
|
|
32
|
-
Invalid Children:`,r);return}return r.some(h=>{if(h.pathSegment===n||h.pathSegment&&h.pathSegment.startsWith(":"))return o=h,!0}),o}buildNavItems(n,r,o){const u={},c=[];return n==null||n.forEach(h=>{var d,_,v;if(Ve.isNodeAccessPermitted(h,this.getParentNode(o.selectedNode,o),((d=o==null?void 0:o.selectedNode)==null?void 0:d.context)||{},this.luigi))if(h.category){const x=h.category.id||h.category.label||h.category,C=this.luigi.i18n().getTranslation(h.category.label||h.category.id||h.category);let y=u[x];y||(y={category:{altText:h.category.altText||"",icon:h.category.icon,id:x,label:C,nodes:[],tooltip:this.resolveTooltipText(h.category,C)}},u[x]=y,c.push(y)),(v=(_=y.category)==null?void 0:_.nodes)==null||v.push({node:h,selected:h===r,label:h.label?this.luigi.i18n().getTranslation(h.label):void 0,tooltip:h.label?this.resolveTooltipText(h,h.label):void 0,altText:h.altText,icon:h.icon})}else c.push({altText:h.altText,icon:h.icon,label:h.label?this.luigi.i18n().getTranslation(h.label):void 0,tooltip:h.label?this.resolveTooltipText(h,h.label):void 0,node:h,selected:h===r})}),c}shouldRedirect(n,r){var u;const o=r??this.getPathData(n);if(n=="")return o.rootNodes[0].pathSegment;if(o.selectedNode&&!o.selectedNode.viewUrl&&((u=o.selectedNode.children)!=null&&u.length))return n+"/"+o.selectedNode.children[0].pathSegment}getCurrentNode(n){var u;const r=this.getPathData(n),o=r.selectedNode;if(!(!o||!Ve.isNodeAccessPermitted(o,this.getParentNode(r.selectedNode,r),((u=r==null?void 0:r.selectedNode)==null?void 0:u.context)||{},this.luigi)))return o}getPathParams(n){return this.getPathData(n).pathParams}getTruncatedChildren(n){let r=!1,o=!1,u=[];return n.slice().reverse().forEach(c=>{(!r||c.tabNav)&&(c.tabNav===!1&&(o=!0),c.keepSelectedForChildren===!1?r=!0:(c.keepSelectedForChildren||c.tabNav&&!o)&&(r=!0,u=[])),u.push(c)}),u.reverse()}applyNavGroups(n){const r={},o=[],c=[];return n.forEach(h=>{if(h.node)c.push(h);else if(h.category){const d=h.category.id;d&&d.indexOf("::")>0?o.push(h):(h.category.isGroup,r[d]=h,c.push(h))}}),o.forEach(h=>{var v;const d=((v=h.category)==null?void 0:v.id.split("::")[0])||"",_=r[d];_&&_.category&&(_.category.isGroup||(_.category.isGroup=!0),_.category.nodes||(_.category.nodes=[]),_.category.nodes.push(h))}),c.filter(h=>{var d,_,v,x,C,y;if((d=h.category)!=null&&d.isGroup&&((_=h.category)!=null&&_.nodes)&&((v=h.category)==null?void 0:v.nodes.length)>0){for(let I=0;I<((x=h.category)==null?void 0:x.nodes.length);I++){const L=(C=h.category)==null?void 0:C.nodes[I];if(L.node&&!L.node.hideFromNav&&L.node.label||(y=L.category)!=null&&y.nodes&&L.category.nodes.filter(D=>{var F,te;return!((F=D.node)!=null&&F.hideFromNav)&&((te=D.node)==null?void 0:te.label)}).length>0)return!0}return!1}return!0})}getLeftNavData(n,r){var C,y,I;const o=r??this.getPathData(n);let u=[];const c=[];let h="";(C=o.nodesInPath)==null||C.forEach(L=>{L.children&&(L.tabNav||(h+="/"+(L.pathSegment||"")),c.push(L))});const d=this.getTruncatedChildren(o.nodesInPath);let _=[...d].pop(),v=o.selectedNode;(_!=null&&_.keepSelectedForChildren||_!=null&&_.tabNav)&&(v=_,d.pop(),_=[...d].pop()),v&&v.children&&o.rootNodes.includes(v)?u=this.buildNavItems(v.children,void 0,o):v&&v.tabNav?u=_!=null&&_.children?this.buildNavItems(_.children,v,o):[]:u=this.buildNavItems(((y=[...c].pop())==null?void 0:y.children)||[],v,o);const x=Ve.buildPath(c,o);return u=this.applyNavGroups(u),{selectedNode:v,items:u,basePath:h.replace(/\/\/+/g,"/"),sideNavFooterText:(I=this.luigi.getConfig().settings)==null?void 0:I.sideNavFooterText,navClick:L=>L.node&&this.navItemClick(L.node,x)}}navItemClick(n,r){if(!n.pathSegment){console.error("Navigation error: pathSegment is not defined for the node.");return}let o="/";if(r.trim()!=="")o+=r+"/";else if(!n.isRootNode){console.error("Navigation error: parentPath is empty while the node is not a root node");return}o+=n.pathSegment,this.luigi.navigation().navigate(o)}getTopNavData(n,r){var y,I,L,D,F,te,de,oe,Oe,pe,Ue,Ce,Pe,Te,_e,me,$,ft,ke,Re,wt,b,Ne,ee,ve,Le,Ar,Rr,br;const o=this.luigi.getConfig(),u=r??this.getPathData(n),c=this.prepareRootNodes((y=o.navigation)==null?void 0:y.nodes,((I=o.navigation)==null?void 0:I.globalContext)||{}),h=(F=(D=(L=o.navigation)==null?void 0:L.profile)==null?void 0:D.items)!=null&&F.length?JSON.parse(JSON.stringify(o.navigation.profile.items)):[],d=((te=o.navigation)==null?void 0:te.appSwitcher)&&this.getAppSwitcherData((de=o.navigation)==null?void 0:de.appSwitcher,(oe=o.settings)==null?void 0:oe.header),_=Ve.updateHeaderTitle(d,u);h!=null&&h.length&&h.map(ae=>({...ae,label:this.luigi.i18n().getTranslation(ae.label||"")}));const v=this.luigi.i18n().getTranslation((Ue=(pe=(Oe=o.navigation)==null?void 0:Oe.profile)==null?void 0:pe.logout)==null?void 0:Ue.label)||to.logout.label,x=ae=>{var Ct,_n;if(ae.openNodeInModal&&!((Ct=ae.externalLink)!=null&&Ct.url))this.luigi.navigation().openAsModal(ae.link||"",ae.openNodeInModal===!0?{}:ae.openNodeInModal);else if(ae.link)this.luigi.navigation().navigate(ae.link);else if((_n=ae.externalLink)!=null&&_n.url)if(ae.externalLink.sameWindow)window.location.href=ae.externalLink.url;else{const Lt=window.open(ae.externalLink.url,"_blank","noopener noreferrer");Lt&&(Lt.opener=null,Lt.focus())}},C={authEnabled:this.luigi.auth().isAuthorizationEnabled(),signedIn:this.luigi.auth().isAuthorizationEnabled()&&fn.isLoggedIn(),items:h,itemClick:x,logout:{altText:this.luigi.i18n().getTranslation((Te=(Pe=(Ce=o.navigation)==null?void 0:Ce.profile)==null?void 0:Pe.logout)==null?void 0:Te.altText)||to.logout.label,label:v,icon:(($=(me=(_e=o.navigation)==null?void 0:_e.profile)==null?void 0:me.logout)==null?void 0:$.icon)||to.logout.icon,testId:((Re=(ke=(ft=o.navigation)==null?void 0:ft.profile)==null?void 0:ke.logout)==null?void 0:Re.testId)||Ve.prepareForTests(v),doLogout:()=>{Fn.logout()}},onUserInfoUpdate:ae=>{this.luigi.getConfigValueAsync("navigation.profile.staticUserInfoFn").then(Ct=>{Ct?ae(Ct):Fn.getUserInfoStore().subscribe(_n=>{ae(_n)})})}};return{appTitle:_||((b=(wt=o.settings)==null?void 0:wt.header)==null?void 0:b.title),logo:(ee=(Ne=o.settings)==null?void 0:Ne.header)==null?void 0:ee.logo,topNodes:this.buildNavItems(c,void 0,u),productSwitcher:(ve=o.navigation)==null?void 0:ve.productSwitcher,profile:this.luigi.auth().isAuthorizationEnabled()||(Le=o.navigation)!=null&&Le.profile?C:void 0,appSwitcher:((Ar=o.navigation)==null?void 0:Ar.appSwitcher)&&this.getAppSwitcherData((Rr=o.navigation)==null?void 0:Rr.appSwitcher,(br=o.settings)==null?void 0:br.header),navClick:ae=>ae.node&&this.navItemClick(ae.node,"")}}getParentNode(n,r){var o;if(n&&n===((o=r.nodesInPath)==null?void 0:o[r.nodesInPath.length-1]))return r.nodesInPath[r.nodesInPath.length-2]}getAppSwitcherData(n,r){var c;const o=n,u=o==null?void 0:o.showMainAppEntry;if(o&&o.items&&u){const h={title:this.luigi.i18n().getTranslation(r.title||""),subTitle:r.subTitle,link:"/"};if((c=o.items)==null||c.map(d=>({...d,title:this.luigi.i18n().getTranslation(d.title||"")})),o.items.some(d=>d.link===h.link))return o;o.items.unshift(h)}return o}getTabNavData(n,r){var x;const o=r??this.getPathData(n),u=o==null?void 0:o.selectedNode;let c;if(!u)return{};if(!u.tabNav&&(c=this.getParentNode(u,o),c&&!c.tabNav))return{};let h="";(x=o.nodesInPath)==null||x.forEach(C=>{C.children&&(h+="/"+(C.pathSegment||""))});const d=c?this.getTruncatedChildren(c.children):this.getTruncatedChildren(u.children),_=this.buildNavItems(d,u,o),v=Ve.buildPath(o.nodesInPath||[],o);return{selectedNode:u,items:_,basePath:h.replace(/\/\/+/g,"/"),navClick:C=>C.node&&this.navItemClick(C.node,v)}}onNodeChange(n,r){const o=this.luigi.getConfigValue("navigation.nodeChangeHook");B.isFunction(o)?o(n,r):o!==void 0&&console.warn("nodeChangeHook is not a function!")}async extractDataFromPath(n){const r=this.getPathData(n);return{nodeObject:q.getLastNodeObject(r),pathData:r}}async shouldPreventNavigation(n){return!!(n!=null&&n.onNodeActivation&&(B.isFunction(n.onNodeActivation)||B.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),window.open(n,"_blank","noopener,noreferrer")}resolveTooltipText(n,r){return Ve.generateTooltipText(n,r,this.luigi)}prepareRootNodes(n,r){const o=Hm.cloneDeep(n)||[];return o.length?(o.forEach(u=>{u.isRootNode=!0}),this.getAccessibleNodes(void 0,o,r)):o}getAccessibleNodes(n,r,o){return r?r.filter(u=>Ve.isNodeAccessPermitted(u,n,o,this.luigi)):[]}async handleNavigationRequest(n,r,o,u,c,h){var v;const d=n.replace(/\/\/+/g,"/"),_=!1;if(o)this.luigi.navigation().openAsModal(n,o,h);else{const x={detail:{preventContextUpdate:_,withoutSync:!!c}};if(await se.get(pn).closeModals(),u){await this.openViewInNewTab(n);return}if((v=this.luigi.getConfig().routing)!=null&&v.useHashRouting)if(!c)location.hash=d;else{const C=new CustomEvent("hashchange",x);window.history.pushState({path:"/#"+d},"","/#"+d),window.dispatchEvent(C)}else{const C=new CustomEvent("popstate",x);window.history.pushState({path:d},"",d),window.dispatchEvent(C)}}}}function jt(){}function fl(s){return s()}function Yu(){return Object.create(null)}function Ai(s){s.forEach(fl)}function gl(s){return typeof s=="function"}function dl(s,n){return s!=s?n==n:s!==n||s&&typeof s=="object"||typeof s=="function"}let Ei,Er;function Xu(s,n){return s===n||(Ei||(Ei=document.createElement("a")),Ei.href=n,s===Ei.href)}function Vm(s,n,r){const o=(function(u){if(!u)return document;const c=u.getRootNode?u.getRootNode():u.ownerDocument;return c&&c.host?c:u.ownerDocument})(s);if(!o.getElementById(n)){const u=Bn("style");u.id=n,u.textContent=r,(function(c,h){(function(d,_){d.appendChild(_)})(c.head||c,h),h.sheet})(o,u)}}function gn(s,n,r){s.insertBefore(n,r||null)}function en(s){s.parentNode&&s.parentNode.removeChild(s)}function Bn(s){return document.createElement(s)}function pl(s){return document.createTextNode(s)}function ht(s,n,r){r==null?s.removeAttribute(n):s.getAttribute(n)!==r&&s.setAttribute(n,r)}function mr(s){Er=s}function _l(){if(!Er)throw new Error("Function called outside component initialization");return Er}function ml(s){_l().$$.on_mount.push(s)}const Un=[],wr=[];let kn=[];const Ju=[],Qm=Promise.resolve();let io=!1;function so(s){kn.push(s)}const no=new Set;let $n=0;function Q(){if($n!==0)return;const s=Er;do{try{for(;$n<Un.length;){const n=Un[$n];$n++,mr(n),Gm(n.$$)}}catch(n){throw Un.length=0,$n=0,n}for(mr(null),Un.length=0,$n=0;wr.length;)wr.pop()();for(let n=0;n<kn.length;n+=1){const r=kn[n];no.has(r)||(no.add(r),r())}kn.length=0}while(Un.length);for(;Ju.length;)Ju.pop()();io=!1,no.clear(),mr(s)}function Gm(s){if(s.fragment!==null){s.update(),Ai(s.before_update);const n=s.dirty;s.dirty=[-1],s.fragment&&s.fragment.p(s.ctx,n),s.after_update.forEach(so)}}const qm=new Set;function zm(s,n){const r=s.$$;r.fragment!==null&&((function(o){const u=[],c=[];kn.forEach((h=>o.indexOf(h)===-1?u.push(h):c.push(h))),c.forEach((h=>h())),kn=u})(r.after_update),Ai(r.on_destroy),r.fragment&&r.fragment.d(n),r.on_destroy=r.fragment=null,r.ctx=[])}function Km(s,n){s.$$.dirty[0]===-1&&(Un.push(s),io||(io=!0,Qm.then(Q)),s.$$.dirty.fill(0)),s.$$.dirty[n/31|0]|=1<<n%31}function vl(s,n,r,o,u,c,h=null,d=[-1]){const _=Er;mr(s);const v=s.$$={fragment:null,ctx:[],props:c,update:jt,not_equal:u,bound:Yu(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(n.context||(_?_.$$.context:[])),callbacks:Yu(),dirty:d,skip_bound:!1,root:n.target||_.$$.root};h&&h(v.root);let x=!1;if(v.ctx=r?r(s,n.props||{},((I,L,...D)=>{const F=D.length?D[0]:L;return v.ctx&&u(v.ctx[I],v.ctx[I]=F)&&(!v.skip_bound&&v.bound[I]&&v.bound[I](F),x&&Km(s,I)),L})):[],v.update(),x=!0,Ai(v.before_update),v.fragment=!!o&&o(v.ctx),n.target){if(n.hydrate){const I=(function(L){return Array.from(L.childNodes)})(n.target);v.fragment&&v.fragment.l(I),I.forEach(en)}else v.fragment&&v.fragment.c();n.intro&&(C=s.$$.fragment)&&C.i&&(qm.delete(C),C.i(y)),(function(I,L,D){const{fragment:F,after_update:te}=I.$$;F&&F.m(L,D),so((()=>{const de=I.$$.on_mount.map(fl).filter(gl);I.$$.on_destroy?I.$$.on_destroy.push(...de):Ai(de),I.$$.on_mount=[]})),te.forEach(so)})(s,n.target,n.anchor),Q()}var C,y;mr(_)}let Sl;function Ci(s,n,r,o){var c;const u=(c=r[s])==null?void 0:c.type;if(n=u==="Boolean"&&typeof n!="boolean"?n!=null:n,!o||!r[s])return n;if(o==="toAttribute")switch(u){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(u){case"Object":case"Array":return n&&JSON.parse(n);case"Boolean":default:return n;case"Number":return n!=null?+n:n}}function El(s,n,r,o,u,c){let h=class extends Sl{constructor(){super(s,r,u),this.$$p_d=n}static get observedAttributes(){return Object.keys(n).map((d=>(n[d].attribute||d).toLowerCase()))}};return Object.keys(n).forEach((d=>{Object.defineProperty(h.prototype,d,{get(){return this.$$c&&d in this.$$c?this.$$c[d]:this.$$d[d]},set(_){var v;_=Ci(d,_,n),this.$$d[d]=_,(v=this.$$c)==null||v.$set({[d]:_})}})})),o.forEach((d=>{Object.defineProperty(h.prototype,d,{get(){var _;return(_=this.$$c)==null?void 0:_[d]}})})),c&&(h=c(h)),s.element=h,h}typeof HTMLElement=="function"&&(Sl=class extends HTMLElement{constructor(n,r,o){super();we(this,"$$ctor");we(this,"$$s");we(this,"$$c");we(this,"$$cn",!1);we(this,"$$d",{});we(this,"$$r",!1);we(this,"$$p_d",{});we(this,"$$l",{});we(this,"$$l_u",new Map);this.$$ctor=n,this.$$s=r,o&&this.attachShadow({mode:"open"})}addEventListener(n,r,o){if(this.$$l[n]=this.$$l[n]||[],this.$$l[n].push(r),this.$$c){const u=this.$$c.$on(n,r);this.$$l_u.set(r,u)}super.addEventListener(n,r,o)}removeEventListener(n,r,o){if(super.removeEventListener(n,r,o),this.$$c){const u=this.$$l_u.get(r);u&&(u(),this.$$l_u.delete(r))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let r=function(h){return()=>{let d;return{c:function(){d=Bn("slot"),h!=="default"&&ht(d,"name",h)},m:function(_,v){gn(_,d,v)},d:function(_){_&&en(d)}}}};var n=r;if(await Promise.resolve(),!this.$$cn||this.$$c)return;const o={},u=(function(h){const d={};return h.childNodes.forEach((_=>{d[_.slot||"default"]=!0})),d})(this);for(const h of this.$$s)h in u&&(o[h]=[r(h)]);for(const h of this.attributes){const d=this.$$g_p(h.name);d in this.$$d||(this.$$d[d]=Ci(d,h.value,this.$$p_d,"toProp"))}for(const h in this.$$p_d)h in this.$$d||this[h]===void 0||(this.$$d[h]=this[h],delete this[h]);this.$$c=new this.$$ctor({target:this.shadowRoot||this,props:{...this.$$d,$$slots:o,$$scope:{ctx:[]}}});const c=()=>{this.$$r=!0;for(const h in this.$$p_d)if(this.$$d[h]=this.$$c.$$.ctx[this.$$c.$$.props[h]],this.$$p_d[h].reflect){const d=Ci(h,this.$$d[h],this.$$p_d,"toAttribute");d==null?this.removeAttribute(this.$$p_d[h].attribute||h):this.setAttribute(this.$$p_d[h].attribute||h,d)}this.$$r=!1};this.$$c.$$.after_update.push(c),c();for(const h in this.$$l)for(const d of this.$$l[h]){const _=this.$$c.$on(h,d);this.$$l_u.set(d,_)}this.$$l={}}}attributeChangedCallback(n,r,o){var u;this.$$r||(n=this.$$g_p(n),this.$$d[n]=Ci(n,o,this.$$p_d,"toProp"),(u=this.$$c)==null||u.$set({[n]:this.$$d[n]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then((()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$c=void 0)}))}$$g_p(n){return Object.keys(this.$$p_d).find((r=>this.$$p_d[r].attribute===n||!this.$$p_d[r].attribute&&r.toLowerCase()===n))||n}});class wl{constructor(){we(this,"$$");we(this,"$$set")}$destroy(){zm(this,1),this.$destroy=jt}$on(n,r){if(!gl(r))return jt;const o=this.$$.callbacks[n]||(this.$$.callbacks[n]=[]);return o.push(r),()=>{const u=o.indexOf(r);u!==-1&&o.splice(u,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(s){s.CUSTOM_MESSAGE="custom",s.GET_CONTEXT="luigi.get-context",s.SEND_CONTEXT_HANDSHAKE="luigi.init",s.CONTEXT_RECEIVED="luigi.init.ok",s.NAVIGATION_REQUEST="luigi.navigation.open",s.ALERT_REQUEST="luigi.ux.alert.show",s.ALERT_CLOSED="luigi.ux.alert.hide",s.INITIALIZED="luigi.init.ok",s.ADD_SEARCH_PARAMS_REQUEST="luigi.addSearchParams",s.ADD_NODE_PARAMS_REQUEST="luigi.addNodeParams",s.SHOW_CONFIRMATION_MODAL_REQUEST="luigi.ux.confirmationModal.show",s.CONFIRMATION_MODAL_CLOSED="luigi.ux.confirmationModal.hide",s.SHOW_LOADING_INDICATOR_REQUEST="luigi.show-loading-indicator",s.HIDE_LOADING_INDICATOR_REQUEST="luigi.hide-loading-indicator",s.SET_CURRENT_LOCALE_REQUEST="luigi.ux.set-current-locale",s.LOCAL_STORAGE_SET_REQUEST="storage",s.RUNTIME_ERROR_HANDLING_REQUEST="luigi-runtime-error-handling",s.SET_ANCHOR_LINK_REQUEST="luigi.setAnchor",s.SET_THIRD_PARTY_COOKIES_REQUEST="luigi.third-party-cookie",s.BACK_NAVIGATION_REQUEST="luigi.navigation.back",s.GET_CURRENT_ROUTE_REQUEST="luigi.navigation.currentRoute",s.SEND_CURRENT_ROUTE_ANSWER="luigi.navigation.currentRoute.answer",s.SEND_CONTEXT_OBJECT="luigi.navigate",s.NAVIGATION_COMPLETED_REPORT="luigi.navigate.ok",s.CLOSE_MODAL_ANSWER="luigi.navigation.modal.close",s.UPDATE_MODAL_PATH_DATA_REQUEST="luigi.navigation.updateModalDataPath",s.UPDATE_MODAL_SETTINGS="luigi.navigation.updateModalSettings",s.CHECK_PATH_EXISTS_REQUEST="luigi.navigation.pathExists",s.SEND_PATH_EXISTS_ANSWER="luigi.navigation.pathExists.answer",s.SET_DIRTY_STATUS_REQUEST="luigi.set-page-dirty",s.AUTH_SET_TOKEN="luigi.auth.tokenIssued",s.ADD_BACKDROP_REQUEST="luigi.add-backdrop",s.REMOVE_BACKDROP_REQUEST="luigi.remove-backdrop",s.SET_VIEW_GROUP_DATA_REQUEST="luigi.setVGData",s.CLOSE_CURRENT_MODAL_REQUEST="luigi.close-modal"})(J||(J={}));class Ym extends Event{constructor(n,r,o,u){super(n),this.detail=r,this.payload=o||r||{},this.callbackFn=u}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 uo{isVisible(n){return!!(n.offsetWidth||n.offsetHeight||n.getClientRects().length)}sendCustomMessageToIframe(n,r,o){var c;const u=o||"custom";if((c=n==null?void 0:n.iframe)!=null&&c.contentWindow){const h=new URL(n.iframe.src);u==="custom"?n.iframe.contentWindow.postMessage({msg:u,data:r},h.origin):n.iframe.contentWindow.postMessage({msg:u,...r},h.origin)}else console.error("Message target could not be resolved")}dispatchWithPayload(n,r,o,u,c){this.dispatch(n,r,o,c,u)}dispatch(n,r,o,u,c){const h=new Ym(n,o,c,u);r.dispatchEvent(h)}getTargetContainer(n){let r;return globalThis.__luigi_container_manager.container.forEach((o=>{var u;(u=o.iframeHandle)!=null&&u.iframe&&o.iframeHandle.iframe.contentWindow===n.source&&(r=o)})),r}getContainerManager(){return globalThis.__luigi_container_manager||(globalThis.__luigi_container_manager={container:[],messageListener:n=>{var u,c,h,d,_,v,x,C;const r=this.getTargetContainer(n),o=(c=(u=r==null?void 0:r.iframeHandle)==null?void 0:u.iframe)==null?void 0:c.contentWindow;if(o&&o===n.source)switch(n.data.msg){case J.CUSTOM_MESSAGE:{const y=n.data.data,I=y.id;delete y.id,this.dispatch(O.CUSTOM_MESSAGE,r,{id:I,_metaData:{},data:y})}break;case J.GET_CONTEXT:o.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,(y=>{o.postMessage({msg:J.CLOSE_MODAL_ANSWER,data:y},n.origin)}));break;case J.ALERT_REQUEST:this.dispatchWithPayload(O.ALERT_REQUEST,r,n,(d=(h=n.data)==null?void 0:h.data)==null?void 0:d.settings,(y=>{var I,L,D;r.notifyAlertClosed((D=(L=(I=n.data)==null?void 0:I.data)==null?void 0:L.settings)==null?void 0:D.id,y)}));break;case J.INITIALIZED:this.dispatch(O.INITIALIZED,r,((_=n.data)==null?void 0:_.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,(v=n.data.data)==null?void 0:v.settings,(y=>{r.notifyConfirmationModalClosed(y)}));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,(x=n.data.data)==null?void 0:x.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 y=((C=n.data)==null?void 0:C.goBackContext)||{};if(typeof y=="string")try{y=JSON.parse(y)}catch(I){console.warn(I)}this.dispatch(O.GO_BACK_REQUEST,r,y),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,(y=>{var I,L;o.postMessage({msg:J.SEND_CURRENT_ROUTE_ANSWER,data:{correlationId:(L=(I=n.data)==null?void 0:I.data)==null?void 0:L.id,route:y}},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,(y=>{var I,L;o.postMessage({msg:J.SEND_PATH_EXISTS_ANSWER,data:{correlationId:(L=(I=n.data)==null?void 0:I.data)==null?void 0:L.id,pathExists:y}},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 Zt=new uo,Nn=new class{constructor(){this.updateContext=(s,n,r,o,u,c)=>{if(r){const h=n||{};Zt.sendCustomMessageToIframe(r,{context:s,nodeParams:o||{},pathParams:u||{},searchParams:c||{},internal:h,withoutSync:!0},J.SEND_CONTEXT_OBJECT)}else console.warn("Attempting to update context on inexisting iframe")},this.updateViewUrl=(s,n,r,o)=>{if(o){const u=r||{};Zt.sendCustomMessageToIframe(o,{context:n,internal:u,withoutSync:!1,viewUrl:s},J.SEND_CONTEXT_OBJECT)}else console.warn("Attempting to update route on inexisting iframe")},this.updateAuthData=(s,n)=>{s&&n?Zt.sendCustomMessageToIframe(s,{authData:n},J.AUTH_SET_TOKEN):console.warn("Attempting to update auth data on inexisting iframe or authData")},this.sendCustomMessage=(s,n,r,o,u)=>{if(r&&n._luigi_mfe_webcomponent)Zt.dispatch(s,n._luigi_mfe_webcomponent,u);else{const c={...u};c.id&&console.warn('Property "id" is reserved and can not be used in custom message data'),c.id=s,Zt.sendCustomMessageToIframe(o,c)}},this.notifyConfirmationModalClosed=(s,n)=>{const r={data:{confirmed:s}};Zt.sendCustomMessageToIframe(n,r,J.CONFIRMATION_MODAL_CLOSED)}}notifyAlertClosed(s,n,r){const o=n?{id:s,dismissKey:n}:{id:s};Zt.sendCustomMessageToIframe(r,o,J.ALERT_CLOSED)}},Zu=s=>{if(!s)return;const n=s;return n.forEach(((r,o)=>{n[o]=r+(r.indexOf(";")!=-1?"":";"),n[o]=s[o].replaceAll('"',"'")})),n.join(" ")};class Vn{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 Xm extends Vn{constructor(n){super(n||{use:{}}),n&&n.use&&n.use.extends&&(this.superRenderer=Cl({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 Jm extends Vn{createCompoundContainer(){const n="__lui_compound_"+new Date().getTime(),r=document.createElement("div");r.classList.add(n);let o="";return this.config.layouts&&this.config.layouts.forEach((u=>{if(u.minWidth||u.maxWidth){let c="@media only screen ";u.minWidth!=null&&(c+=`and (min-width: ${u.minWidth}px) `),u.maxWidth!=null&&(c+=`and (max-width: ${u.maxWidth}px) `),c+=`{
|
|
33
|
-
.${
|
|
34
|
-
grid-template-columns: ${
|
|
35
|
-
grid-template-rows: ${
|
|
36
|
-
grid-gap: ${
|
|
6
|
+
Invalid Children:`,t);return}return t.some(a=>{if(a.pathSegment===e||a.pathSegment&&a.pathSegment.startsWith(":"))return n=a,!0}),n}buildNavItems(e,t,n){const r={},s=[];return e==null||e.forEach(a=>{var o,l,c;if(M.isNodeAccessPermitted(a,this.getParentNode(n.selectedNode,n),((o=n==null?void 0:n.selectedNode)==null?void 0:o.context)||{},this.luigi))if(a.category){const f=a.category.id||a.category.label||a.category,h=this.luigi.i18n().getTranslation(a.category.label||a.category.id||a.category);let u=r[f];u||(u={category:{altText:a.category.altText||"",icon:a.category.icon,id:f,label:h,nodes:[],tooltip:this.resolveTooltipText(a.category,h)}},r[f]=u,s.push(u)),(c=(l=u.category)==null?void 0:l.nodes)==null||c.push({node:a,selected:a===t,label:a.label?this.luigi.i18n().getTranslation(a.label):void 0,tooltip:a.label?this.resolveTooltipText(a,a.label):void 0,altText:a.altText,icon:a.icon})}else s.push({altText:a.altText,icon:a.icon,label:a.label?this.luigi.i18n().getTranslation(a.label):void 0,tooltip:a.label?this.resolveTooltipText(a,a.label):void 0,node:a,selected:a===t})}),s}async shouldRedirect(e,t){var r;const n=t??await this.getPathData(e);if(e=="")return n.rootNodes[0].pathSegment;if(n.selectedNode&&!n.selectedNode.viewUrl&&((r=n.selectedNode.children)!=null&&r.length))return e+"/"+n.selectedNode.children[0].pathSegment}async getCurrentNode(e){var r;const t=await this.getPathData(e),n=t.selectedNode;if(!(!n||!M.isNodeAccessPermitted(n,this.getParentNode(t.selectedNode,t),((r=t==null?void 0:t.selectedNode)==null?void 0:r.context)||{},this.luigi)))return n}async getPathParams(e){return(await this.getPathData(e)).pathParams}getTruncatedChildren(e){let t=!1,n=!1,r=[];return e.slice().reverse().forEach(s=>{(!t||s.tabNav)&&(s.tabNav===!1&&(n=!0),s.keepSelectedForChildren===!1?t=!0:(s.keepSelectedForChildren||s.tabNav&&!n)&&(t=!0,r=[])),r.push(s)}),r.reverse()}applyNavGroups(e){const t={},n=[],s=[];return e.forEach(a=>{if(a.node)s.push(a);else if(a.category){const o=a.category.id;o&&o.indexOf("::")>0?n.push(a):(a.category.isGroup,t[o]=a,s.push(a))}}),n.forEach(a=>{var c;const o=((c=a.category)==null?void 0:c.id.split("::")[0])||"",l=t[o];l&&l.category&&(l.category.isGroup||(l.category.isGroup=!0),l.category.nodes||(l.category.nodes=[]),l.category.nodes.push(a))}),s.filter(a=>{var o,l,c,f,h,u;if((o=a.category)!=null&&o.isGroup&&((l=a.category)!=null&&l.nodes)&&((c=a.category)==null?void 0:c.nodes.length)>0){for(let d=0;d<((f=a.category)==null?void 0:f.nodes.length);d++){const S=(h=a.category)==null?void 0:h.nodes[d];if(S.node&&!S.node.hideFromNav&&S.node.label||(u=S.category)!=null&&u.nodes&&S.category.nodes.filter(_=>{var E,R;return!((E=_.node)!=null&&E.hideFromNav)&&((R=_.node)==null?void 0:R.label)}).length>0)return!0}return!1}return!0})}async getLeftNavData(e,t){var S,_;const n=t??await this.getPathData(e);let r=[];const s=[];let a="";(S=n.nodesInPath)==null||S.forEach(E=>{E.children&&(E.tabNav||(a+="/"+(E.pathSegment||"")),s.push(E))});const o=this.getTruncatedChildren(n.nodesInPath);let l=[...o].pop(),c=n.selectedNode;(l!=null&&l.keepSelectedForChildren||l!=null&&l.tabNav)&&(c=l,o.pop(),l=[...o].pop());let f,h=c;c?n.rootNodes.includes(c)?(f=c,h=void 0):c.tabNav?f=l:f=[...s].pop():(f=[...s].pop(),h=void 0);let u=await this.getChildren(f,(f==null?void 0:f.context)||{})||[];r=this.buildNavItems(u,h,n);const d=M.buildPath(s,n);return r=this.applyNavGroups(r),{selectedNode:c,items:r,basePath:a.replace(/\/\/+/g,"/"),sideNavFooterText:(_=this.luigi.getConfig().settings)==null?void 0:_.sideNavFooterText,navClick:E=>E.node&&this.navItemClick(E.node,d)}}navItemClick(e,t){if(!e.pathSegment){console.error("Navigation error: pathSegment is not defined for the node.");return}let n="/";if(t.trim()!=="")n+=t+"/";else if(!e.isRootNode){console.error("Navigation error: parentPath is empty while the node is not a root node");return}n+=e.pathSegment,this.luigi.navigation().navigate(n)}async getTopNavData(e,t){var h,u,d,S,_,E,R,L,U,z,G,K,J,j,k,I,$,m,te,H,O,re,g,ue,b,D,pe;const n=this.luigi.getConfig(),r=t??await this.getPathData(e),s=(d=(u=(h=n.navigation)==null?void 0:h.profile)==null?void 0:u.items)!=null&&d.length?JSON.parse(JSON.stringify(n.navigation.profile.items)):[],a=((S=n.navigation)==null?void 0:S.appSwitcher)&&this.getAppSwitcherData((_=n.navigation)==null?void 0:_.appSwitcher,(E=n.settings)==null?void 0:E.header),o=M.updateHeaderTitle(a,r);s!=null&&s.length&&s.map(P=>({...P,label:this.luigi.i18n().getTranslation(P.label||"")}));const l=this.luigi.i18n().getTranslation((U=(L=(R=n.navigation)==null?void 0:R.profile)==null?void 0:L.logout)==null?void 0:U.label)||rt.logout.label,c=P=>{var Ue,Qe;if(P.openNodeInModal&&!((Ue=P.externalLink)!=null&&Ue.url))this.luigi.navigation().openAsModal(P.link||"",P.openNodeInModal===!0?{}:P.openNodeInModal);else if(P.link)this.luigi.navigation().navigate(P.link);else if((Qe=P.externalLink)!=null&&Qe.url)if(P.externalLink.sameWindow)window.location.href=P.externalLink.url;else{const tt=window.open(P.externalLink.url,"_blank","noopener noreferrer");tt&&(tt.opener=null,tt.focus())}},f={authEnabled:this.luigi.auth().isAuthorizationEnabled(),signedIn:this.luigi.auth().isAuthorizationEnabled()&&he.isLoggedIn(),items:s,itemClick:c,logout:{altText:this.luigi.i18n().getTranslation((K=(G=(z=n.navigation)==null?void 0:z.profile)==null?void 0:G.logout)==null?void 0:K.altText)||rt.logout.label,label:l,icon:((k=(j=(J=n.navigation)==null?void 0:J.profile)==null?void 0:j.logout)==null?void 0:k.icon)||rt.logout.icon,testId:((m=($=(I=n.navigation)==null?void 0:I.profile)==null?void 0:$.logout)==null?void 0:m.testId)||M.prepareForTests(l),doLogout:()=>{Te.logout()}},onUserInfoUpdate:P=>{this.luigi.getConfigValueAsync("navigation.profile.staticUserInfoFn").then(Ue=>{Ue?P(Ue):Te.getUserInfoStore().subscribe(Qe=>{P(Qe)})})}};return{appTitle:o||((H=(te=n.settings)==null?void 0:te.header)==null?void 0:H.title),logo:(re=(O=n.settings)==null?void 0:O.header)==null?void 0:re.logo,topNodes:this.buildNavItems(r.rootNodes,void 0,r),productSwitcher:(g=n.navigation)==null?void 0:g.productSwitcher,profile:this.luigi.auth().isAuthorizationEnabled()||(ue=n.navigation)!=null&&ue.profile?f:void 0,appSwitcher:((b=n.navigation)==null?void 0:b.appSwitcher)&&this.getAppSwitcherData((D=n.navigation)==null?void 0:D.appSwitcher,(pe=n.settings)==null?void 0:pe.header),navClick:P=>P.node&&this.navItemClick(P.node,"")}}getParentNode(e,t){var n;if(e&&e===((n=t.nodesInPath)==null?void 0:n[t.nodesInPath.length-1]))return t.nodesInPath[t.nodesInPath.length-2]}getAppSwitcherData(e,t){var s;const n=e,r=n==null?void 0:n.showMainAppEntry;if(n&&n.items&&r){const a={title:this.luigi.i18n().getTranslation(t.title||""),subTitle:t.subTitle,link:"/"};if((s=n.items)==null||s.map(o=>({...o,title:this.luigi.i18n().getTranslation(o.title||"")})),n.items.some(o=>o.link===a.link))return n;n.items.unshift(a)}return n}async getTabNavData(e,t){var f;const n=t??await this.getPathData(e),r=n==null?void 0:n.selectedNode;let s;if(!r)return{};if(!r.tabNav&&(s=this.getParentNode(r,n),s&&!s.tabNav))return{};let a="";(f=n.nodesInPath)==null||f.forEach(h=>{h.children&&(a+="/"+(h.pathSegment||""))});const o=s?this.getTruncatedChildren(s.children):this.getTruncatedChildren(r.children),l=this.buildNavItems(o,r,n),c=M.buildPath(n.nodesInPath||[],n);return{selectedNode:r,items:l,basePath:a.replace(/\/\/+/g,"/"),navClick:h=>h.node&&this.navItemClick(h.node,c)}}onNodeChange(e,t){const n=this.luigi.getConfigValue("navigation.nodeChangeHook");v.isFunction(n)?n(e,t):n!==void 0&&console.warn("nodeChangeHook is not a function!")}async extractDataFromPath(e){const t=await this.getPathData(e);return{nodeObject:C.getLastNodeObject(t),pathData:t}}async shouldPreventNavigation(e){return!!(e!=null&&e.onNodeActivation&&(v.isFunction(e.onNodeActivation)||v.isAsyncFunction(e.onNodeActivation))&&await e.onNodeActivation(e)===!1)}async shouldPreventNavigationForPath(e){const{nodeObject:t}=await this.extractDataFromPath(e);return!!await this.shouldPreventNavigation(t)}async openViewInNewTab(e){if(await this.shouldPreventNavigationForPath(e))return;this.luigi.getConfigValue("routing.useHashRouting")&&(e="#"+e),window.open(e,"_blank","noopener,noreferrer")}resolveTooltipText(e,t){return M.generateTooltipText(e,t,this.luigi)}prepareRootNodes(e,t){const n=e;return n.length&&n.forEach(r=>{r.isRootNode=!0}),n}getAccessibleNodes(e,t,n){return t?t.filter(r=>M.isNodeAccessPermitted(r,e,n,this.luigi)):[]}async handleNavigationRequest(e,t,n,r,s,a){var c;const o=e.replace(/\/\/+/g,"/"),l=!1;if(n)this.luigi.navigation().openAsModal(e,n,a);else{const f={detail:{preventContextUpdate:l,withoutSync:!!s}};if(await y.get(fe).closeModals(),r){await this.openViewInNewTab(e);return}if((c=this.luigi.getConfig().routing)!=null&&c.useHashRouting)if(!s)location.hash=o;else{const h=new CustomEvent("hashchange",f);window.history.pushState({path:"/#"+o},"","/#"+o),window.dispatchEvent(h)}else{const h=new CustomEvent("popstate",f);window.history.pushState({path:o},"",o),window.dispatchEvent(h)}}}async getChildren(e,t={}){const n=y.get(le);if(!e)return[];let r=[];if(n.hasChildren(e)){let a=n.getChildren(e);a&&(r=a.children)}else try{r=await we.getConfigValueFromObjectAsync(e,"children",t||e.context),r==null&&(r=[]),r=r.map(a=>this.getExpandStructuralPathSegment(a)).map(a=>this.bindChildToParent(a,e))||[]}catch(a){console.error("Could not lazy-load children for node",a)}let s=this.getAccessibleNodes(e,r,t);return n.setChildren(e,{children:r,filteredChildren:s}),s}getExpandStructuralPathSegment(e){if(e&&e.pathSegment&&e.pathSegment.indexOf("/")!==-1){const t=e.pathSegment.split("/"),n={...e},r=(s,a)=>{const o=s.shift();let l={};return s.length?(l.pathSegment=o,a.hideFromNav&&(l.hideFromNav=a.hideFromNav),l.children=[r(s,a)]):(l=n,l.pathSegment=o),l};return r(t,e)}return e}bindChildToParent(e,t){return t&&t.pathSegment&&(e.parent=t),e}}function ae(){}function Dt(i){return i()}function Et(){return Object.create(null)}function ze(i){i.forEach(Dt)}function xt(i){return typeof i=="function"}function kt(i,e){return i!=i?e==e:i!==e||i&&typeof i=="object"||typeof i=="function"}let We,ke;function vt(i,e){return i===e||(We||(We=document.createElement("a")),We.href=e,i===We.href)}function yi(i,e,t){const n=(function(r){if(!r)return document;const s=r.getRootNode?r.getRootNode():r.ownerDocument;return s&&s.host?s:r.ownerDocument})(i);if(!n.getElementById(e)){const r=Ae("style");r.id=e,r.textContent=t,(function(s,a){(function(o,l){o.appendChild(l)})(s.head||s,a),a.sheet})(n,r)}}function de(i,e,t){i.insertBefore(e,t||null)}function oe(i){i.parentNode&&i.parentNode.removeChild(i)}function Ae(i){return document.createElement(i)}function Mt(i){return document.createTextNode(i)}function W(i,e,t){t==null?i.removeAttribute(e):i.getAttribute(e)!==t&&i.setAttribute(e,t)}function Oe(i){ke=i}function Ft(){if(!ke)throw new Error("Function called outside component initialization");return ke}function Vt(i){Ft().$$.on_mount.push(i)}const _e=[],Me=[];let ye=[];const Ct=[],bi=Promise.resolve();let ot=!1;function lt(i){ye.push(i)}const st=new Set;let me=0;function w(){if(me!==0)return;const i=ke;do{try{for(;me<_e.length;){const e=_e[me];me++,Oe(e),Ri(e.$$)}}catch(e){throw _e.length=0,me=0,e}for(Oe(null),_e.length=0,me=0;Me.length;)Me.pop()();for(let e=0;e<ye.length;e+=1){const t=ye[e];st.has(t)||(st.add(t),t())}ye.length=0}while(_e.length);for(;Ct.length;)Ct.pop()();ot=!1,st.clear(),Oe(i)}function Ri(i){if(i.fragment!==null){i.update(),ze(i.before_update);const e=i.dirty;i.dirty=[-1],i.fragment&&i.fragment.p(i.ctx,e),i.after_update.forEach(lt)}}const Ai=new Set;function Pi(i,e){const t=i.$$;t.fragment!==null&&((function(n){const r=[],s=[];ye.forEach((a=>n.indexOf(a)===-1?r.push(a):s.push(a))),s.forEach((a=>a())),ye=r})(t.after_update),ze(t.on_destroy),t.fragment&&t.fragment.d(e),t.on_destroy=t.fragment=null,t.ctx=[])}function Ii(i,e){i.$$.dirty[0]===-1&&(_e.push(i),ot||(ot=!0,bi.then(w)),i.$$.dirty.fill(0)),i.$$.dirty[e/31|0]|=1<<e%31}function Ht(i,e,t,n,r,s,a=null,o=[-1]){const l=ke;Oe(i);const c=i.$$={fragment:null,ctx:[],props:s,update:ae,not_equal:r,bound:Et(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(e.context||(l?l.$$.context:[])),callbacks:Et(),dirty:o,skip_bound:!1,root:e.target||l.$$.root};a&&a(c.root);let f=!1;if(c.ctx=t?t(i,e.props||{},((d,S,..._)=>{const E=_.length?_[0]:S;return c.ctx&&r(c.ctx[d],c.ctx[d]=E)&&(!c.skip_bound&&c.bound[d]&&c.bound[d](E),f&&Ii(i,d)),S})):[],c.update(),f=!0,ze(c.before_update),c.fragment=!!n&&n(c.ctx),e.target){if(e.hydrate){const d=(function(S){return Array.from(S.childNodes)})(e.target);c.fragment&&c.fragment.l(d),d.forEach(oe)}else c.fragment&&c.fragment.c();e.intro&&(h=i.$$.fragment)&&h.i&&(Ai.delete(h),h.i(u)),(function(d,S,_){const{fragment:E,after_update:R}=d.$$;E&&E.m(S,_),lt((()=>{const L=d.$$.on_mount.map(Dt).filter(xt);d.$$.on_destroy?d.$$.on_destroy.push(...L):ze(L),d.$$.on_mount=[]})),R.forEach(lt)})(i,e.target,e.anchor),w()}var h,u;Oe(l)}let Qt;function je(i,e,t,n){var s;const r=(s=t[i])==null?void 0:s.type;if(e=r==="Boolean"&&typeof e!="boolean"?e!=null:e,!n||!t[i])return e;if(n==="toAttribute")switch(r){case"Object":case"Array":return e==null?null:JSON.stringify(e);case"Boolean":return e?"":null;case"Number":return e??null;default:return e}else switch(r){case"Object":case"Array":return e&&JSON.parse(e);case"Boolean":default:return e;case"Number":return e!=null?+e:e}}function Wt(i,e,t,n,r,s){let a=class extends Qt{constructor(){super(i,t,r),this.$$p_d=e}static get observedAttributes(){return Object.keys(e).map((o=>(e[o].attribute||o).toLowerCase()))}};return Object.keys(e).forEach((o=>{Object.defineProperty(a.prototype,o,{get(){return this.$$c&&o in this.$$c?this.$$c[o]:this.$$d[o]},set(l){var c;l=je(o,l,e),this.$$d[o]=l,(c=this.$$c)==null||c.$set({[o]:l})}})})),n.forEach((o=>{Object.defineProperty(a.prototype,o,{get(){var l;return(l=this.$$c)==null?void 0:l[o]}})})),s&&(a=s(a)),i.element=a,a}typeof HTMLElement=="function"&&(Qt=class extends HTMLElement{constructor(e,t,n){super();A(this,"$$ctor");A(this,"$$s");A(this,"$$c");A(this,"$$cn",!1);A(this,"$$d",{});A(this,"$$r",!1);A(this,"$$p_d",{});A(this,"$$l",{});A(this,"$$l_u",new Map);this.$$ctor=e,this.$$s=t,n&&this.attachShadow({mode:"open"})}addEventListener(e,t,n){if(this.$$l[e]=this.$$l[e]||[],this.$$l[e].push(t),this.$$c){const r=this.$$c.$on(e,t);this.$$l_u.set(t,r)}super.addEventListener(e,t,n)}removeEventListener(e,t,n){if(super.removeEventListener(e,t,n),this.$$c){const r=this.$$l_u.get(t);r&&(r(),this.$$l_u.delete(t))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let t=function(a){return()=>{let o;return{c:function(){o=Ae("slot"),a!=="default"&&W(o,"name",a)},m:function(l,c){de(l,o,c)},d:function(l){l&&oe(o)}}}};var e=t;if(await Promise.resolve(),!this.$$cn||this.$$c)return;const n={},r=(function(a){const o={};return a.childNodes.forEach((l=>{o[l.slot||"default"]=!0})),o})(this);for(const a of this.$$s)a in r&&(n[a]=[t(a)]);for(const a of this.attributes){const o=this.$$g_p(a.name);o in this.$$d||(this.$$d[o]=je(o,a.value,this.$$p_d,"toProp"))}for(const a in this.$$p_d)a in this.$$d||this[a]===void 0||(this.$$d[a]=this[a],delete this[a]);this.$$c=new this.$$ctor({target:this.shadowRoot||this,props:{...this.$$d,$$slots:n,$$scope:{ctx:[]}}});const s=()=>{this.$$r=!0;for(const a in this.$$p_d)if(this.$$d[a]=this.$$c.$$.ctx[this.$$c.$$.props[a]],this.$$p_d[a].reflect){const o=je(a,this.$$d[a],this.$$p_d,"toAttribute");o==null?this.removeAttribute(this.$$p_d[a].attribute||a):this.setAttribute(this.$$p_d[a].attribute||a,o)}this.$$r=!1};this.$$c.$$.after_update.push(s),s();for(const a in this.$$l)for(const o of this.$$l[a]){const l=this.$$c.$on(a,o);this.$$l_u.set(o,l)}this.$$l={}}}attributeChangedCallback(e,t,n){var r;this.$$r||(e=this.$$g_p(e),this.$$d[e]=je(e,n,this.$$p_d,"toProp"),(r=this.$$c)==null||r.$set({[e]:this.$$d[e]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then((()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$c=void 0)}))}$$g_p(e){return Object.keys(this.$$p_d).find((t=>this.$$p_d[t].attribute===e||!this.$$p_d[t].attribute&&t.toLowerCase()===e))||e}});class Gt{constructor(){A(this,"$$");A(this,"$$set")}$destroy(){Pi(this,1),this.$destroy=ae}$on(e,t){if(!xt(t))return ae;const n=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return n.push(t),()=>{const r=n.indexOf(t);r!==-1&&n.splice(r,1)}}$set(e){var t;this.$$set&&(t=e,Object.keys(t).length!==0)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}var T;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"})(T||(T={}));class $i extends Event{constructor(e,t,n,r){super(e),this.detail=t,this.payload=n||t||{},this.callbackFn=r}callback(e){this.callbackFn&&this.callbackFn(e)}}const p={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 ht{isVisible(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)}sendCustomMessageToIframe(e,t,n){var s;const r=n||"custom";if((s=e==null?void 0:e.iframe)!=null&&s.contentWindow){const a=new URL(e.iframe.src);r==="custom"?e.iframe.contentWindow.postMessage({msg:r,data:t},a.origin):e.iframe.contentWindow.postMessage({msg:r,...t},a.origin)}else console.error("Message target could not be resolved")}dispatchWithPayload(e,t,n,r,s){this.dispatch(e,t,n,s,r)}dispatch(e,t,n,r,s){const a=new $i(e,n,s,r);t.dispatchEvent(a)}getTargetContainer(e){let t;return globalThis.__luigi_container_manager.container.forEach((n=>{var r;(r=n.iframeHandle)!=null&&r.iframe&&n.iframeHandle.iframe.contentWindow===e.source&&(t=n)})),t}getContainerManager(){return globalThis.__luigi_container_manager||(globalThis.__luigi_container_manager={container:[],messageListener:e=>{var r,s,a,o,l,c,f,h;const t=this.getTargetContainer(e),n=(s=(r=t==null?void 0:t.iframeHandle)==null?void 0:r.iframe)==null?void 0:s.contentWindow;if(n&&n===e.source)switch(e.data.msg){case T.CUSTOM_MESSAGE:{const u=e.data.data,d=u.id;delete u.id,this.dispatch(p.CUSTOM_MESSAGE,t,{id:d,_metaData:{},data:u})}break;case T.GET_CONTEXT:n.postMessage({msg:T.SEND_CONTEXT_HANDSHAKE,context:t.context||{},internal:{thirdPartyCookieCheck:{disabled:t.skipCookieCheck==="true"},currentTheme:t.theme,currentLocale:t.locale,activeFeatureToggleList:t.activeFeatureToggleList||[],cssVariables:t.cssVariables||{},anchor:t.anchor||"",userSettings:t.userSettings||null,drawer:t.drawer||!1,modal:t.modal||!1,viewStackSize:t.viewStackSize||0,isNavigateBack:t.isNavigateBack||!1},authData:t.authData||{},nodeParams:t.nodeParams||{},searchParams:t.searchParams||{},pathParams:t.pathParams||{}},e.origin);break;case T.NAVIGATION_REQUEST:this.dispatch(p.NAVIGATION_REQUEST,t,e.data.params,(u=>{n.postMessage({msg:T.CLOSE_MODAL_ANSWER,data:u},e.origin)}));break;case T.ALERT_REQUEST:this.dispatchWithPayload(p.ALERT_REQUEST,t,e,(o=(a=e.data)==null?void 0:a.data)==null?void 0:o.settings,(u=>{var d,S,_;t.notifyAlertClosed((_=(S=(d=e.data)==null?void 0:d.data)==null?void 0:S.settings)==null?void 0:_.id,u)}));break;case T.INITIALIZED:this.dispatch(p.INITIALIZED,t,((l=e.data)==null?void 0:l.params)||{});break;case T.ADD_SEARCH_PARAMS_REQUEST:this.dispatch(p.ADD_SEARCH_PARAMS_REQUEST,t,{data:e.data.data,keepBrowserHistory:e.data.keepBrowserHistory});break;case T.ADD_NODE_PARAMS_REQUEST:this.dispatch(p.ADD_NODE_PARAMS_REQUEST,t,{data:e.data.data,keepBrowserHistory:e.data.keepBrowserHistory});break;case T.SHOW_CONFIRMATION_MODAL_REQUEST:this.dispatchWithPayload(p.SHOW_CONFIRMATION_MODAL_REQUEST,t,e.data.data,(c=e.data.data)==null?void 0:c.settings,(u=>{t.notifyConfirmationModalClosed(u)}));break;case T.SHOW_LOADING_INDICATOR_REQUEST:this.dispatch(p.SHOW_LOADING_INDICATOR_REQUEST,t,e);break;case T.HIDE_LOADING_INDICATOR_REQUEST:this.dispatch(p.HIDE_LOADING_INDICATOR_REQUEST,t,e);break;case T.SET_CURRENT_LOCALE_REQUEST:this.dispatchWithPayload(p.SET_CURRENT_LOCALE_REQUEST,t,e,e.data.data);break;case T.LOCAL_STORAGE_SET_REQUEST:this.dispatchWithPayload(p.LOCAL_STORAGE_SET_REQUEST,t,e,(f=e.data.data)==null?void 0:f.params);break;case T.RUNTIME_ERROR_HANDLING_REQUEST:this.dispatch(p.RUNTIME_ERROR_HANDLING_REQUEST,t,e);break;case T.SET_ANCHOR_LINK_REQUEST:this.dispatchWithPayload(p.SET_ANCHOR_LINK_REQUEST,t,e,e.data.anchor);break;case T.SET_THIRD_PARTY_COOKIES_REQUEST:this.dispatch(p.SET_THIRD_PARTY_COOKIES_REQUEST,t,e);break;case T.BACK_NAVIGATION_REQUEST:{let u=((h=e.data)==null?void 0:h.goBackContext)||{};if(typeof u=="string")try{u=JSON.parse(u)}catch(d){console.warn(d)}this.dispatch(p.GO_BACK_REQUEST,t,u),this.dispatch(p.BACK_NAVIGATION_REQUEST,t,e)}break;case T.GET_CURRENT_ROUTE_REQUEST:this.dispatchWithPayload(p.GET_CURRENT_ROUTE_REQUEST,t,e,e.data.data,(u=>{var d,S;n.postMessage({msg:T.SEND_CURRENT_ROUTE_ANSWER,data:{correlationId:(S=(d=e.data)==null?void 0:d.data)==null?void 0:S.id,route:u}},e.origin)}));break;case T.NAVIGATION_COMPLETED_REPORT:this.dispatch(p.NAVIGATION_COMPLETED_REPORT,t,e);break;case T.UPDATE_MODAL_PATH_DATA_REQUEST:this.dispatchWithPayload(p.UPDATE_MODAL_PATH_DATA_REQUEST,t,e,e.data.params);break;case T.UPDATE_MODAL_SETTINGS:this.dispatchWithPayload(p.UPDATE_MODAL_SETTINGS_REQUEST,t,e,{addHistoryEntry:e.data.addHistoryEntry,updatedModalSettings:e.data.updatedModalSettings});break;case T.CHECK_PATH_EXISTS_REQUEST:this.dispatchWithPayload(p.CHECK_PATH_EXISTS_REQUEST,t,e,e.data.data,(u=>{var d,S;n.postMessage({msg:T.SEND_PATH_EXISTS_ANSWER,data:{correlationId:(S=(d=e.data)==null?void 0:d.data)==null?void 0:S.id,pathExists:u}},e.origin)}));break;case T.SET_DIRTY_STATUS_REQUEST:this.dispatchWithPayload(p.SET_DIRTY_STATUS_REQUEST,t,e,{dirty:e.data.dirty});break;case T.SET_VIEW_GROUP_DATA_REQUEST:this.dispatch(p.SET_VIEW_GROUP_DATA_REQUEST,t,e.data.data);break;case T.ADD_BACKDROP_REQUEST:this.dispatch(p.ADD_BACKDROP_REQUEST,t,e);break;case T.REMOVE_BACKDROP_REQUEST:this.dispatch(p.REMOVE_BACKDROP_REQUEST,t,e);break;case T.CLOSE_CURRENT_MODAL_REQUEST:this.dispatch(p.CLOSE_CURRENT_MODAL_REQUEST,t,e)}}},window.addEventListener("message",globalThis.__luigi_container_manager.messageListener)),globalThis.__luigi_container_manager}registerContainer(e){this.getContainerManager().container.push(e)}}const se=new ht,Ee=new class{constructor(){this.updateContext=(i,e,t,n,r,s)=>{if(t){const a=e||{};se.sendCustomMessageToIframe(t,{context:i,nodeParams:n||{},pathParams:r||{},searchParams:s||{},internal:a,withoutSync:!0},T.SEND_CONTEXT_OBJECT)}else console.warn("Attempting to update context on inexisting iframe")},this.updateViewUrl=(i,e,t,n)=>{if(n){const r=t||{};se.sendCustomMessageToIframe(n,{context:e,internal:r,withoutSync:!1,viewUrl:i},T.SEND_CONTEXT_OBJECT)}else console.warn("Attempting to update route on inexisting iframe")},this.updateAuthData=(i,e)=>{i&&e?se.sendCustomMessageToIframe(i,{authData:e},T.AUTH_SET_TOKEN):console.warn("Attempting to update auth data on inexisting iframe or authData")},this.sendCustomMessage=(i,e,t,n,r)=>{if(t&&e._luigi_mfe_webcomponent)se.dispatch(i,e._luigi_mfe_webcomponent,r);else{const s={...r};s.id&&console.warn('Property "id" is reserved and can not be used in custom message data'),s.id=i,se.sendCustomMessageToIframe(n,s)}},this.notifyConfirmationModalClosed=(i,e)=>{const t={data:{confirmed:i}};se.sendCustomMessageToIframe(e,t,T.CONFIRMATION_MODAL_CLOSED)}}notifyAlertClosed(i,e,t){const n=e?{id:i,dismissKey:e}:{id:i};se.sendCustomMessageToIframe(t,n,T.ALERT_CLOSED)}},wt=i=>{if(!i)return;const e=i;return e.forEach(((t,n)=>{e[n]=t+(t.indexOf(";")!=-1?"":";"),e[n]=i[n].replaceAll('"',"'")})),e.join(" ")};class Pe{constructor(e){e?(this.rendererObject=e,this.config=e.config||{}):this.config={}}createCompoundContainer(){return document.createElement("div")}createCompoundItemContainer(e){return document.createElement("div")}attachCompoundItem(e,t){e.appendChild(t)}}class Li extends Pe{constructor(e){super(e||{use:{}}),e&&e.use&&e.use.extends&&(this.superRenderer=jt({use:e.use.extends,config:e.config}))}createCompoundContainer(){return this.rendererObject.use.createCompoundContainer?this.rendererObject.use.createCompoundContainer(this.config,this.superRenderer):this.superRenderer?this.superRenderer.createCompoundContainer():super.createCompoundContainer()}createCompoundItemContainer(e){return this.rendererObject.use.createCompoundItemContainer?this.rendererObject.use.createCompoundItemContainer(e,this.config,this.superRenderer):this.superRenderer?this.superRenderer.createCompoundItemContainer(e):super.createCompoundItemContainer(e)}attachCompoundItem(e,t){this.rendererObject.use.attachCompoundItem?this.rendererObject.use.attachCompoundItem(e,t,this.superRenderer):this.superRenderer?this.superRenderer.attachCompoundItem(e,t):super.attachCompoundItem(e,t)}}class Ni extends Pe{createCompoundContainer(){const e="__lui_compound_"+new Date().getTime(),t=document.createElement("div");t.classList.add(e);let n="";return this.config.layouts&&this.config.layouts.forEach((r=>{if(r.minWidth||r.maxWidth){let s="@media only screen ";r.minWidth!=null&&(s+=`and (min-width: ${r.minWidth}px) `),r.maxWidth!=null&&(s+=`and (max-width: ${r.maxWidth}px) `),s+=`{
|
|
7
|
+
.${e} {
|
|
8
|
+
grid-template-columns: ${r.columns||"auto"};
|
|
9
|
+
grid-template-rows: ${r.rows||"auto"};
|
|
10
|
+
grid-gap: ${r.gap||"0"};
|
|
37
11
|
}
|
|
38
12
|
}
|
|
39
|
-
`,
|
|
13
|
+
`,n+=s}})),t.innerHTML=`
|
|
40
14
|
<style scoped>
|
|
41
|
-
.${
|
|
15
|
+
.${e} {
|
|
42
16
|
display: grid;
|
|
43
17
|
grid-template-columns: ${this.config.columns||"auto"};
|
|
44
18
|
grid-template-rows: ${this.config.rows||"auto"};
|
|
45
19
|
grid-gap: ${this.config.gap||"0"};
|
|
46
20
|
min-height: ${this.config.minHeight||"auto"};
|
|
47
21
|
}
|
|
48
|
-
${
|
|
22
|
+
${n}
|
|
49
23
|
</style>
|
|
50
|
-
`,r}createCompoundItemContainer(n){const r=n||{},o=document.createElement("div");return o.setAttribute("style",`grid-row: ${r.row||"auto"}; grid-column: ${r.column||"auto"}`),o.classList.add("lui-compoundItemCnt"),o}}const Cl=s=>{const n=s.use;return n?n==="grid"?new Jm(s):n.createCompoundContainer||n.createCompoundItemContainer||n.attachCompoundItem?new Xm(s):new Vn(s):new Vn(s)},ju=(s,n,r,o)=>{n!=null&&n.eventListeners&&n.eventListeners.forEach((u=>{const c=u.source+"."+u.name,h=s[c],d={wcElementId:r,wcElement:o,action:u.action,converter:u.dataConverter};h?h.push(d):s[c]=[d]}))};function el(s){return String(s).replaceAll("<","<").replaceAll(">",">").replaceAll(""",'"').replaceAll("'","'").replaceAll("/","/")}class Tl{constructor(){this.alertResolvers={},this.alertIndex=0,this.containerService=new uo}dynamicImport(n){return Object.freeze(import(n))}processViewUrl(n,r){return n}attachWC(n,r,o,u,c,h,d){if(o&&o.contains(r)){const _=document.createElement(n);h&&_.setAttribute("nodeId",h),_.setAttribute("lui_web_component","true"),this.initWC(_,n,o,c,u,h,d),o.replaceChild(_,r),o._luigi_node&&(o._luigi_mfe_webcomponent=_),o.dispatchEvent(new Event("wc_ready"))}}dispatchLuigiEvent(n,r,o){this.containerService.dispatch(n,this.thisComponent,r,o)}createClientAPI(n,r,o,u,c){return{linkManager:()=>{let h=null,d=!1,_=!1,v=!1,x={};const C={navigate:(y,I={})=>{const L={fromContext:h,fromClosestContext:d,fromVirtualTreeRoot:_,fromParent:v,nodeParams:x,...I};this.dispatchLuigiEvent(O.NAVIGATION_REQUEST,{link:y,...L})},navigateToIntent:(y,I={})=>{var D;let L="#?intent=";if(L+=y,I&&((D=Object.keys(I))==null?void 0:D.length)){const F=Object.entries(I);if(F.length>0){L+="?";for(const[te,de]of F)L+=te+"="+de+"&";L=L.slice(0,-1)}}C.navigate(L)},fromClosestContext:()=>(d=!0,C),fromContext:y=>(h=y,C),fromVirtualTreeRoot:()=>(_=!0,C),fromParent:()=>(v=!0,C),getCurrentRoute:()=>{const y={fromContext:h,fromClosestContext:d,fromVirtualTreeRoot:_,fromParent:v,nodeParams:x};return new Promise(((I,L)=>{this.containerService.dispatch(O.GET_CURRENT_ROUTE_REQUEST,this.thisComponent,{...y},(D=>{D?I(D):L("No current route received.")}))}))},withParams:y=>(x=y,C),updateModalPathInternalNavigation:(y,I={},L=!1)=>{if(!y)return void console.warn("Updating path of the modal upon internal navigation prevented. No path specified.");const D={fromClosestContext:d,fromContext:h,fromParent:v,fromVirtualTreeRoot:_,nodeParams:x};this.dispatchLuigiEvent(O.UPDATE_MODAL_PATH_DATA_REQUEST,Object.assign(D,{history:L,link:y,modal:I}))},updateTopNavigation:()=>{this.dispatchLuigiEvent(O.UPDATE_TOP_NAVIGATION_REQUEST,{})},pathExists:y=>{const I={fromContext:h,fromClosestContext:d,fromVirtualTreeRoot:_,fromParent:v,nodeParams:x};return new Promise(((L,D)=>{this.containerService.dispatch(O.CHECK_PATH_EXISTS_REQUEST,this.thisComponent,{...I,link:y},(F=>{F?L(!0):D(!1)})),this.containerService.dispatch(O.PATH_EXISTS_REQUEST,this.thisComponent,{...I,link:y},(F=>{F?L(!0):D(!1)}))}))},openAsDrawer:(y,I={})=>{C.navigate(y,{drawer:I})},openAsModal:(y,I={})=>{C.navigate(y,{modal:I})},openAsSplitView:(y,I={})=>{C.navigate(y,{splitView:I})},goBack:y=>{this.dispatchLuigiEvent(O.GO_BACK_REQUEST,y)},hasBack:()=>!1,updateModalSettings:(y={},I=!1)=>{this.dispatchLuigiEvent(O.UPDATE_MODAL_SETTINGS_REQUEST,{updatedModalSettings:y,addHistoryEntry:I})}};return C},uxManager:()=>({showAlert:h=>(h.id=this.alertIndex++,new Promise((d=>{this.alertResolvers[h.id]=d,this.dispatchLuigiEvent(O.ALERT_REQUEST,h,(_=>{this.resolveAlert(h.id,_)}))}))),showConfirmationModal:h=>new Promise(((d,_)=>{this.modalResolver={resolve:d,reject:_},this.containerService.dispatch(O.SHOW_CONFIRMATION_MODAL_REQUEST,this.thisComponent,h,(v=>{v?d():_()}))})),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:h=>{this.dispatchLuigiEvent(O.SET_DOCUMENT_TITLE_REQUEST,h)},setDirtyStatus:h=>{this.dispatchLuigiEvent(O.SET_DIRTY_STATUS_REQUEST,{dirty:h})},setCurrentLocale:h=>{h&&this.dispatchLuigiEvent(O.SET_CURRENT_LOCALE_REQUEST,{currentLocale:h})},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:h=>{n&&n.eventBus&&n.eventBus.onPublishEvent(h,r,o);const d={id:h.type,_metaData:{nodeId:r,wc_id:o,src:u},data:h.detail};this.dispatchLuigiEvent(O.CUSTOM_MESSAGE,d)},luigiClientInit:()=>{this.dispatchLuigiEvent(O.INITIALIZED,{})},addNodeParams:(h,d)=>{c||this.dispatchLuigiEvent(O.ADD_NODE_PARAMS_REQUEST,{params:h,data:h,keepBrowserHistory:d})},getNodeParams:h=>{return c?{}:h?(d=this.thisComponent.nodeParams,Object.entries(d).reduce(((_,v)=>(_[el(v[0])]=el(v[1]),_)),{})):this.thisComponent.nodeParams||{};var d},setAnchor:h=>{c||this.dispatchLuigiEvent(O.SET_ANCHOR_LINK_REQUEST,h)},getAnchor:()=>this.thisComponent.anchor||"",getCoreSearchParams:()=>this.thisComponent.searchParams||{},getPathParams:()=>this.thisComponent.pathParams||{},getClientPermissions:()=>this.thisComponent.clientPermissions||{},addCoreSearchParams:(h={},d=!0)=>{this.dispatchLuigiEvent(O.ADD_SEARCH_PARAMS_REQUEST,{data:h,keepBrowserHistory:d})},getUserSettings:()=>this.thisComponent.userSettings||{},setViewGroupData:h=>{this.dispatchLuigiEvent(O.SET_VIEW_GROUP_DATA_REQUEST,h)}}}initWC(n,r,o,u,c,h,d){const _=this.createClientAPI(o,h,r,n,d);if(n.__postProcess){const v=new URL(document.baseURI).origin===new URL(u,document.baseURI).origin?new URL("./",new URL(u,document.baseURI)):new URL("./",u);n.__postProcess(c,_,v.origin+v.pathname)}else n.context=c,n.LuigiClient=_}generateWCId(n){let r="";const o=new URL(n,encodeURI(location.href)).href;for(let u=0;u<o.length;u++)r+=o.charCodeAt(u).toString(16);return"luigi-wc-"+r}registerWCFromUrl(n,r){const o=this.processViewUrl(n);return new Promise(((u,c)=>{this.checkWCUrl(o)?this.dynamicImport(o).then((h=>{try{if(!window.customElements.get(r)){let d=h.default;if(!HTMLElement.isPrototypeOf(d)){const _=Object.keys(h);for(let v=0;v<_.length&&(d=h[_[v]],!HTMLElement.isPrototypeOf(d));v++);}window.customElements.define(r,d)}u(1)}catch(d){c(d)}})).catch((h=>{c(h)})):c(`Error: View URL '${o}' not allowed to be included`)}))}includeSelfRegisteredWCFromUrl(n,r,o){if(this.checkWCUrl(r)){this.containerService.getContainerManager()._registerWebcomponent||(this.containerService.getContainerManager()._registerWebcomponent=(c,h)=>{window.customElements.define(this.generateWCId(c),h)}),window.Luigi||(window.Luigi={},window.Luigi._registerWebcomponent||(window.Luigi._registerWebcomponent=(c,h)=>{this.containerService.getContainerManager()._registerWebcomponent(c,h)}));const u=document.createElement("script");u.setAttribute("src",r),n.webcomponent.type==="module"&&u.setAttribute("type","module"),u.setAttribute("defer","true"),u.addEventListener("load",(()=>{o()})),document.body.appendChild(u)}else console.warn(`View URL '${r}' not allowed to be included`)}checkWCUrl(n){return!0}renderWebComponent(n,r,o,u,c,h){var x,C;const d=this.processViewUrl(n,{context:o}),_=((x=u==null?void 0:u.webcomponent)==null?void 0:x.tagName)||this.generateWCId(d),v=document.createElement("div");r.appendChild(v),r._luigi_node=u,window.customElements.get(_)?this.attachWC(_,v,r,o,d,c,h):window.luigiWCFn?window.luigiWCFn(d,_,v,(()=>{this.attachWC(_,v,r,o,d,c,h)})):(C=u==null?void 0:u.webcomponent)!=null&&C.selfRegistered?this.includeSelfRegisteredWCFromUrl(u,d,(()=>{this.attachWC(_,v,r,o,d,c,h)})):this.registerWCFromUrl(d,_).then((()=>{this.attachWC(_,v,r,o,d,c,h)})).catch((y=>{console.warn("ERROR =>",y),this.containerService.dispatch(O.RUNTIME_ERROR_HANDLING_REQUEST,this.thisComponent,y)}))}createCompoundContainerAsync(n,r,o){return new Promise(((u,c)=>{var h,d;if(n.viewUrl)try{const _=((h=o==null?void 0:o.webcomponent)==null?void 0:h.tagName)||this.generateWCId(n.viewUrl);(d=o==null?void 0:o.webcomponent)!=null&&d.selfRegistered?this.includeSelfRegisteredWCFromUrl(o,n.viewUrl,(()=>{const v=document.createElement(_);v.setAttribute("lui_web_component","true"),this.initWC(v,_,v,n.viewUrl,r,"_root"),u(v)})):this.registerWCFromUrl(n.viewUrl,_).then((()=>{const v=document.createElement(_);v.setAttribute("lui_web_component","true"),this.initWC(v,_,v,n.viewUrl,r,"_root"),u(v)})).catch((v=>{console.warn("Error: ",v),this.containerService.dispatch(O.RUNTIME_ERROR_HANDLING_REQUEST,this.thisComponent,v)}))}catch(_){c(_)}else u(n.createCompoundContainer())}))}renderWebComponentCompound(n,r,o){var c;let u;return n.webcomponent&&n.viewUrl?(u=new Vn,u.viewUrl=this.processViewUrl(n.viewUrl,{context:o}),u.createCompoundItemContainer=h=>{const d=document.createElement("div");return h!=null&&h.slot&&d.setAttribute("slot",h.slot),d}):(c=n.compound)!=null&&c.renderer&&(u=Cl(n.compound.renderer)),u=u||new Vn,new Promise((h=>{this.createCompoundContainerAsync(u,o,n).then((d=>{var v,x;r._luigi_mfe_webcomponent=d,r._luigi_node=n;const _={};d.eventBus={listeners:_,onPublishEvent:(C,y,I)=>{const L=_[y+"."+C.type]||[];L.push(..._["*."+C.type]||[]),L.forEach((D=>{const F=D.wcElement||d.querySelector("[nodeId="+D.wcElementId+"]");F?F.dispatchEvent(new CustomEvent(D.action,{detail:D.converter?D.converter(C.detail):C.detail})):console.debug("Could not find event target",D)}))}},(x=(v=n.compound)==null?void 0:v.children)==null||x.forEach(((C,y)=>{const I={...o,...C.context},L=u.createCompoundItemContainer(C.layoutConfig);L.eventBus=d.eventBus,u.attachCompoundItem(d,L);const D=C.id||"gen_"+y;this.renderWebComponent(C.viewUrl,L,I,C,D,!0),ju(_,C,D)})),r.appendChild(d),ju(_,n.compound,"_root",d),h(d)})).catch((d=>{console.warn("Error: ",d),this.containerService.dispatch(O.RUNTIME_ERROR_HANDLING_REQUEST,this.thisComponent,d)}))}))}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 vr=new class{isFunction(s){return s&&{}.toString.call(s)==="[object Function]"}isObject(s){return!(!s||typeof s!="object"||Array.isArray(s))}checkWebcomponentValue(s){return typeof s=="string"?JSON.parse(s):typeof s=="boolean"||typeof s=="object"?s:void console.warn("Webcomponent value has a wrong type.")}resolveContext(s){return s?typeof s=="string"?JSON.parse(s):s:{}}};function tl(s){let n,r=(!s[4]||s[4]==="false")&&nl(s);return{c(){r&&r.c(),n=pl("")},m(o,u){r&&r.m(o,u),gn(o,n,u)},p(o,u){o[4]&&o[4]!=="false"?r&&(r.d(1),r=null):r?r.p(o,u):(r=nl(o),r.c(),r.m(n.parentNode,n))},d(o){o&&en(n),r&&r.d(o)}}}function nl(s){let n,r,o,u,c,h;return{c(){n=Bn("style"),n.textContent=`main.lui-isolated,
|
|
24
|
+
`,t}createCompoundItemContainer(e){const t=e||{},n=document.createElement("div");return n.setAttribute("style",`grid-row: ${t.row||"auto"}; grid-column: ${t.column||"auto"}`),n.classList.add("lui-compoundItemCnt"),n}}const jt=i=>{const e=i.use;return e?e==="grid"?new Ni(i):e.createCompoundContainer||e.createCompoundItemContainer||e.attachCompoundItem?new Li(i):new Pe(i):new Pe(i)},Tt=(i,e,t,n)=>{e!=null&&e.eventListeners&&e.eventListeners.forEach((r=>{const s=r.source+"."+r.name,a=i[s],o={wcElementId:t,wcElement:n,action:r.action,converter:r.dataConverter};a?a.push(o):i[s]=[o]}))};function yt(i){return String(i).replaceAll("<","<").replaceAll(">",">").replaceAll(""",'"').replaceAll("'","'").replaceAll("/","/")}class Bt{constructor(){this.alertResolvers={},this.alertIndex=0,this.containerService=new ht}dynamicImport(e){return Object.freeze(import(e))}processViewUrl(e,t){return e}attachWC(e,t,n,r,s,a,o){if(n&&n.contains(t)){const l=document.createElement(e);a&&l.setAttribute("nodeId",a),l.setAttribute("lui_web_component","true"),this.initWC(l,e,n,s,r,a,o),n.replaceChild(l,t),n._luigi_node&&(n._luigi_mfe_webcomponent=l),n.dispatchEvent(new Event("wc_ready"))}}dispatchLuigiEvent(e,t,n){this.containerService.dispatch(e,this.thisComponent,t,n)}createClientAPI(e,t,n,r,s){return{linkManager:()=>{let a=null,o=!1,l=!1,c=!1,f={};const h={navigate:(u,d={})=>{const S={fromContext:a,fromClosestContext:o,fromVirtualTreeRoot:l,fromParent:c,nodeParams:f,...d};this.dispatchLuigiEvent(p.NAVIGATION_REQUEST,{link:u,...S})},navigateToIntent:(u,d={})=>{var _;let S="#?intent=";if(S+=u,d&&((_=Object.keys(d))==null?void 0:_.length)){const E=Object.entries(d);if(E.length>0){S+="?";for(const[R,L]of E)S+=R+"="+L+"&";S=S.slice(0,-1)}}h.navigate(S)},fromClosestContext:()=>(o=!0,h),fromContext:u=>(a=u,h),fromVirtualTreeRoot:()=>(l=!0,h),fromParent:()=>(c=!0,h),getCurrentRoute:()=>{const u={fromContext:a,fromClosestContext:o,fromVirtualTreeRoot:l,fromParent:c,nodeParams:f};return new Promise(((d,S)=>{this.containerService.dispatch(p.GET_CURRENT_ROUTE_REQUEST,this.thisComponent,{...u},(_=>{_?d(_):S("No current route received.")}))}))},withParams:u=>(f=u,h),updateModalPathInternalNavigation:(u,d={},S=!1)=>{if(!u)return void console.warn("Updating path of the modal upon internal navigation prevented. No path specified.");const _={fromClosestContext:o,fromContext:a,fromParent:c,fromVirtualTreeRoot:l,nodeParams:f};this.dispatchLuigiEvent(p.UPDATE_MODAL_PATH_DATA_REQUEST,Object.assign(_,{history:S,link:u,modal:d}))},updateTopNavigation:()=>{this.dispatchLuigiEvent(p.UPDATE_TOP_NAVIGATION_REQUEST,{})},pathExists:u=>{const d={fromContext:a,fromClosestContext:o,fromVirtualTreeRoot:l,fromParent:c,nodeParams:f};return new Promise(((S,_)=>{this.containerService.dispatch(p.CHECK_PATH_EXISTS_REQUEST,this.thisComponent,{...d,link:u},(E=>{E?S(!0):_(!1)})),this.containerService.dispatch(p.PATH_EXISTS_REQUEST,this.thisComponent,{...d,link:u},(E=>{E?S(!0):_(!1)}))}))},openAsDrawer:(u,d={})=>{h.navigate(u,{drawer:d})},openAsModal:(u,d={})=>{h.navigate(u,{modal:d})},openAsSplitView:(u,d={})=>{h.navigate(u,{splitView:d})},goBack:u=>{this.dispatchLuigiEvent(p.GO_BACK_REQUEST,u)},hasBack:()=>!1,updateModalSettings:(u={},d=!1)=>{this.dispatchLuigiEvent(p.UPDATE_MODAL_SETTINGS_REQUEST,{updatedModalSettings:u,addHistoryEntry:d})}};return h},uxManager:()=>({showAlert:a=>(a.id=this.alertIndex++,new Promise((o=>{this.alertResolvers[a.id]=o,this.dispatchLuigiEvent(p.ALERT_REQUEST,a,(l=>{this.resolveAlert(a.id,l)}))}))),showConfirmationModal:a=>new Promise(((o,l)=>{this.modalResolver={resolve:o,reject:l},this.containerService.dispatch(p.SHOW_CONFIRMATION_MODAL_REQUEST,this.thisComponent,a,(c=>{c?o():l()}))})),getCurrentTheme:()=>this.thisComponent.theme,closeUserSettings:()=>{this.dispatchLuigiEvent(p.CLOSE_USER_SETTINGS_REQUEST,this.thisComponent.userSettings)},openUserSettings:()=>{this.dispatchLuigiEvent(p.OPEN_USER_SETTINGS_REQUEST,this.thisComponent.userSettings)},collapseLeftSideNav:()=>{this.dispatchLuigiEvent(p.COLLAPSE_LEFT_NAV_REQUEST,{})},getDirtyStatus:()=>this.thisComponent.dirtyStatus||!1,getDocumentTitle:()=>this.thisComponent.documentTitle,setDocumentTitle:a=>{this.dispatchLuigiEvent(p.SET_DOCUMENT_TITLE_REQUEST,a)},setDirtyStatus:a=>{this.dispatchLuigiEvent(p.SET_DIRTY_STATUS_REQUEST,{dirty:a})},setCurrentLocale:a=>{a&&this.dispatchLuigiEvent(p.SET_CURRENT_LOCALE_REQUEST,{currentLocale:a})},removeBackdrop:()=>{this.dispatchLuigiEvent(p.REMOVE_BACKDROP_REQUEST,{})},addBackdrop:()=>{this.dispatchLuigiEvent(p.ADD_BACKDROP_REQUEST,{})},showLoadingIndicator:()=>{this.dispatchLuigiEvent(p.SHOW_LOADING_INDICATOR_REQUEST,{})},hideLoadingIndicator:()=>{this.dispatchLuigiEvent(p.HIDE_LOADING_INDICATOR_REQUEST,{})},hideAppLoadingIndicator:()=>{this.dispatchLuigiEvent(p.HIDE_LOADING_INDICATOR_REQUEST,{})},closeCurrentModal:()=>{this.dispatchLuigiEvent(p.CLOSE_CURRENT_MODAL_REQUEST,{})}}),getCurrentLocale:()=>this.thisComponent.locale,getActiveFeatureToggles:()=>this.thisComponent.activeFeatureToggleList||[],publishEvent:a=>{e&&e.eventBus&&e.eventBus.onPublishEvent(a,t,n);const o={id:a.type,_metaData:{nodeId:t,wc_id:n,src:r},data:a.detail};this.dispatchLuigiEvent(p.CUSTOM_MESSAGE,o)},luigiClientInit:()=>{this.dispatchLuigiEvent(p.INITIALIZED,{})},addNodeParams:(a,o)=>{s||this.dispatchLuigiEvent(p.ADD_NODE_PARAMS_REQUEST,{params:a,data:a,keepBrowserHistory:o})},getNodeParams:a=>{return s?{}:a?(o=this.thisComponent.nodeParams,Object.entries(o).reduce(((l,c)=>(l[yt(c[0])]=yt(c[1]),l)),{})):this.thisComponent.nodeParams||{};var o},setAnchor:a=>{s||this.dispatchLuigiEvent(p.SET_ANCHOR_LINK_REQUEST,a)},getAnchor:()=>this.thisComponent.anchor||"",getCoreSearchParams:()=>this.thisComponent.searchParams||{},getPathParams:()=>this.thisComponent.pathParams||{},getClientPermissions:()=>this.thisComponent.clientPermissions||{},addCoreSearchParams:(a={},o=!0)=>{this.dispatchLuigiEvent(p.ADD_SEARCH_PARAMS_REQUEST,{data:a,keepBrowserHistory:o})},getUserSettings:()=>this.thisComponent.userSettings||{},setViewGroupData:a=>{this.dispatchLuigiEvent(p.SET_VIEW_GROUP_DATA_REQUEST,a)}}}initWC(e,t,n,r,s,a,o){const l=this.createClientAPI(n,a,t,e,o);if(e.__postProcess){const c=new URL(document.baseURI).origin===new URL(r,document.baseURI).origin?new URL("./",new URL(r,document.baseURI)):new URL("./",r);e.__postProcess(s,l,c.origin+c.pathname)}else e.context=s,e.LuigiClient=l}generateWCId(e){let t="";const n=new URL(e,encodeURI(location.href)).href;for(let r=0;r<n.length;r++)t+=n.charCodeAt(r).toString(16);return"luigi-wc-"+t}registerWCFromUrl(e,t){const n=this.processViewUrl(e);return new Promise(((r,s)=>{this.checkWCUrl(n)?this.dynamicImport(n).then((a=>{try{if(!window.customElements.get(t)){let o=a.default;if(!HTMLElement.isPrototypeOf(o)){const l=Object.keys(a);for(let c=0;c<l.length&&(o=a[l[c]],!HTMLElement.isPrototypeOf(o));c++);}window.customElements.define(t,o)}r(1)}catch(o){s(o)}})).catch((a=>{s(a)})):s(`Error: View URL '${n}' not allowed to be included`)}))}includeSelfRegisteredWCFromUrl(e,t,n){if(this.checkWCUrl(t)){this.containerService.getContainerManager()._registerWebcomponent||(this.containerService.getContainerManager()._registerWebcomponent=(s,a)=>{window.customElements.define(this.generateWCId(s),a)}),window.Luigi||(window.Luigi={},window.Luigi._registerWebcomponent||(window.Luigi._registerWebcomponent=(s,a)=>{this.containerService.getContainerManager()._registerWebcomponent(s,a)}));const r=document.createElement("script");r.setAttribute("src",t),e.webcomponent.type==="module"&&r.setAttribute("type","module"),r.setAttribute("defer","true"),r.addEventListener("load",(()=>{n()})),document.body.appendChild(r)}else console.warn(`View URL '${t}' not allowed to be included`)}checkWCUrl(e){return!0}renderWebComponent(e,t,n,r,s,a){var f,h;const o=this.processViewUrl(e,{context:n}),l=((f=r==null?void 0:r.webcomponent)==null?void 0:f.tagName)||this.generateWCId(o),c=document.createElement("div");t.appendChild(c),t._luigi_node=r,window.customElements.get(l)?this.attachWC(l,c,t,n,o,s,a):window.luigiWCFn?window.luigiWCFn(o,l,c,(()=>{this.attachWC(l,c,t,n,o,s,a)})):(h=r==null?void 0:r.webcomponent)!=null&&h.selfRegistered?this.includeSelfRegisteredWCFromUrl(r,o,(()=>{this.attachWC(l,c,t,n,o,s,a)})):this.registerWCFromUrl(o,l).then((()=>{this.attachWC(l,c,t,n,o,s,a)})).catch((u=>{console.warn("ERROR =>",u),this.containerService.dispatch(p.RUNTIME_ERROR_HANDLING_REQUEST,this.thisComponent,u)}))}createCompoundContainerAsync(e,t,n){return new Promise(((r,s)=>{var a,o;if(e.viewUrl)try{const l=((a=n==null?void 0:n.webcomponent)==null?void 0:a.tagName)||this.generateWCId(e.viewUrl);(o=n==null?void 0:n.webcomponent)!=null&&o.selfRegistered?this.includeSelfRegisteredWCFromUrl(n,e.viewUrl,(()=>{const c=document.createElement(l);c.setAttribute("lui_web_component","true"),this.initWC(c,l,c,e.viewUrl,t,"_root"),r(c)})):this.registerWCFromUrl(e.viewUrl,l).then((()=>{const c=document.createElement(l);c.setAttribute("lui_web_component","true"),this.initWC(c,l,c,e.viewUrl,t,"_root"),r(c)})).catch((c=>{console.warn("Error: ",c),this.containerService.dispatch(p.RUNTIME_ERROR_HANDLING_REQUEST,this.thisComponent,c)}))}catch(l){s(l)}else r(e.createCompoundContainer())}))}renderWebComponentCompound(e,t,n){var s;let r;return e.webcomponent&&e.viewUrl?(r=new Pe,r.viewUrl=this.processViewUrl(e.viewUrl,{context:n}),r.createCompoundItemContainer=a=>{const o=document.createElement("div");return a!=null&&a.slot&&o.setAttribute("slot",a.slot),o}):(s=e.compound)!=null&&s.renderer&&(r=jt(e.compound.renderer)),r=r||new Pe,new Promise((a=>{this.createCompoundContainerAsync(r,n,e).then((o=>{var c,f;t._luigi_mfe_webcomponent=o,t._luigi_node=e;const l={};o.eventBus={listeners:l,onPublishEvent:(h,u,d)=>{const S=l[u+"."+h.type]||[];S.push(...l["*."+h.type]||[]),S.forEach((_=>{const E=_.wcElement||o.querySelector("[nodeId="+_.wcElementId+"]");E?E.dispatchEvent(new CustomEvent(_.action,{detail:_.converter?_.converter(h.detail):h.detail})):console.debug("Could not find event target",_)}))}},(f=(c=e.compound)==null?void 0:c.children)==null||f.forEach(((h,u)=>{const d={...n,...h.context},S=r.createCompoundItemContainer(h.layoutConfig);S.eventBus=o.eventBus,r.attachCompoundItem(o,S);const _=h.id||"gen_"+u;this.renderWebComponent(h.viewUrl,S,d,h,_,!0),Tt(l,h,_)})),t.appendChild(o),Tt(l,e.compound,"_root",o),a(o)})).catch((o=>{console.warn("Error: ",o),this.containerService.dispatch(p.RUNTIME_ERROR_HANDLING_REQUEST,this.thisComponent,o)}))}))}resolveAlert(e,t){this.alertResolvers[e]?(this.alertResolvers[e](t===void 0||t),this.alertResolvers[e]=void 0):console.log("Promise is not in the list.")}notifyConfirmationModalClosed(e){this.modalResolver?(e?this.modalResolver.resolve():this.modalResolver.reject(),this.modalResolver=void 0):console.log("Modal promise is not listed.")}}const De=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 bt(i){let e,t=(!i[4]||i[4]==="false")&&Rt(i);return{c(){t&&t.c(),e=Mt("")},m(n,r){t&&t.m(n,r),de(n,e,r)},p(n,r){n[4]&&n[4]!=="false"?t&&(t.d(1),t=null):t?t.p(n,r):(t=Rt(n),t.c(),t.m(e.parentNode,e))},d(n){n&&oe(e),t&&t.d(n)}}}function Rt(i){let e,t,n,r,s,a;return{c(){e=Ae("style"),e.textContent=`main.lui-isolated,
|
|
51
25
|
.lui-isolated iframe {
|
|
52
26
|
width: 100%;
|
|
53
27
|
height: 100%;
|
|
@@ -56,5 +30,5 @@ Invalid Children:`,r);return}return r.some(h=>{if(h.pathSegment===n||h.pathSegme
|
|
|
56
30
|
|
|
57
31
|
main.lui-isolated {
|
|
58
32
|
line-height: 0;
|
|
59
|
-
}`,r=pl(" "),o=Bn("iframe"),Xu(o.src,u=s[3])||ht(o,"src",u),ht(o,"title",s[1]),ht(o,"allow",c=Zu(s[0])),ht(o,"sandbox",h=s[2]?s[2].join(" "):void 0)},m(d,_){gn(d,n,_),gn(d,r,_),gn(d,o,_),s[28](o)},p(d,_){8&_[0]&&!Xu(o.src,u=d[3])&&ht(o,"src",u),2&_[0]&&ht(o,"title",d[1]),1&_[0]&&c!==(c=Zu(d[0]))&&ht(o,"allow",c),4&_[0]&&h!==(h=d[2]?d[2].join(" "):void 0)&&ht(o,"sandbox",h)},d(d){d&&(en(n),en(r),en(o)),s[28](null)}}}function Zm(s){let n,r,o=s[5]&&tl(s);return{c(){n=Bn("main"),o&&o.c(),ht(n,"class",r=s[4]?void 0:"lui-isolated")},m(u,c){gn(u,n,c),o&&o.m(n,null),s[29](n)},p(u,c){u[5]?o?o.p(u,c):(o=tl(u),o.c(),o.m(n,null)):o&&(o.d(1),o=null),16&c[0]&&r!==(r=u[4]?void 0:"lui-isolated")&&ht(n,"class",r)},i:jt,o:jt,d(u){u&&en(n),o&&o.d(),s[29](null)}}}function jm(s,n,r){let{activeFeatureToggleList:o}=n,{allowRules:u}=n,{anchor:c}=n,{authData:h}=n,{clientPermissions:d}=n,{context:_}=n,{deferInit:v}=n,{dirtyStatus:x}=n,{documentTitle:C}=n,{hasBack:y}=n,{label:I}=n,{locale:L}=n,{noShadow:D}=n,{nodeParams:F}=n,{pathParams:te}=n,{sandboxRules:de}=n,{searchParams:oe}=n,{skipCookieCheck:Oe}=n,{skipInitCheck:pe}=n,{theme:Ue}=n,{userSettings:Ce}=n,{viewurl:Pe}=n,{webcomponent:Te}=n;const _e={};let me,$,ft=!1;const ke=new Tl,Re=b=>{if(!ft){b.sendCustomMessage=(ee,ve)=>{Nn.sendCustomMessage(ee,b.getNoShadow()?b:me,!!Te,_e,ve)},b.updateContext=(ee,ve)=>{if(r(8,_=ee),Te)(b.getNoShadow()?b:me)._luigi_mfe_webcomponent.context=ee;else{const Le={...ve||{},activeFeatureToggleList:b.activeFeatureToggleList||[],currentLocale:b.locale,currentTheme:b.theme,userSettings:b.userSettings||null,cssVariables:b.cssVariables||{},anchor:b.anchor||"",drawer:b.drawer||!1,modal:b.modal||!1,viewStackSize:b.viewStackSize||0,isNavigateBack:b.isNavigateBack||!1};Nn.updateContext(ee,Le,_e,F,te,oe)}},b.closeAlert=(ee,ve)=>{b.notifyAlertClosed(ee,ve)},b.notifyAlertClosed=(ee,ve)=>{b.isConnected&&(Te?ke.resolveAlert(ee,ve):Nn.notifyAlertClosed(ee,ve,_e))},b.notifyConfirmationModalClosed=ee=>{b.isConnected&&(Te?ke.notifyConfirmationModalClosed(!!ee):Nn.notifyConfirmationModalClosed(!!ee,_e))},Zt.registerContainer(b),ke.thisComponent=b;const Ne=vr.resolveContext(_);if(b.updateViewUrl=(ee,ve)=>{ee!=null&&ee.length&&Nn.updateViewUrl(ee,vr.resolveContext(_),ve,_e)},Te&&Te!="false"){b.getNoShadow()?b.innerHTML="":(r(7,me.innerHTML="",me),b.attachShadow({mode:"open"}).append(me));const ee=vr.checkWebcomponentValue(Te);ke.renderWebComponent(Pe,b.getNoShadow()?b:me,Ne,typeof ee=="object"?{webcomponent:ee}:{})}else b.getNoShadow()||(b.innerHTML="",b.attachShadow({mode:"open"}).append(me));pe?(b.initialized=!0,setTimeout((()=>{ke.dispatchLuigiEvent(O.INITIALIZED,{})}))):Te&&(b.getNoShadow()?b:me).addEventListener("wc_ready",(()=>{var ee;(ee=(b.getNoShadow()?b:me)._luigi_mfe_webcomponent)!=null&&ee.deferLuigiClientWCInit||(b.initialized=!0,ke.dispatchLuigiEvent(O.INITIALIZED,{}))})),r(5,ft=!0),b.containerInitialized=!0}};var wt;return ml((async()=>{r(27,$=me.parentNode),r(27,$.iframeHandle=_e,$),r(27,$.init=()=>{Re($)},$),!v&&Pe&&Re($)})),wt=async()=>{},_l().$$.on_destroy.push(wt),s.$$set=b=>{"activeFeatureToggleList"in b&&r(9,o=b.activeFeatureToggleList),"allowRules"in b&&r(0,u=b.allowRules),"anchor"in b&&r(10,c=b.anchor),"authData"in b&&r(11,h=b.authData),"clientPermissions"in b&&r(12,d=b.clientPermissions),"context"in b&&r(8,_=b.context),"deferInit"in b&&r(13,v=b.deferInit),"dirtyStatus"in b&&r(14,x=b.dirtyStatus),"documentTitle"in b&&r(15,C=b.documentTitle),"hasBack"in b&&r(16,y=b.hasBack),"label"in b&&r(1,I=b.label),"locale"in b&&r(17,L=b.locale),"noShadow"in b&&r(18,D=b.noShadow),"nodeParams"in b&&r(19,F=b.nodeParams),"pathParams"in b&&r(20,te=b.pathParams),"sandboxRules"in b&&r(2,de=b.sandboxRules),"searchParams"in b&&r(21,oe=b.searchParams),"skipCookieCheck"in b&&r(22,Oe=b.skipCookieCheck),"skipInitCheck"in b&&r(23,pe=b.skipInitCheck),"theme"in b&&r(24,Ue=b.theme),"userSettings"in b&&r(25,Ce=b.userSettings),"viewurl"in b&&r(3,Pe=b.viewurl),"webcomponent"in b&&r(4,Te=b.webcomponent)},s.$$.update=()=>{134225960&s.$$.dirty[0]&&!ft&&Pe&&!v&&$&&Re($)},[u,I,de,Pe,Te,ft,_e,me,_,o,c,h,d,v,x,C,y,L,D,F,te,oe,Oe,pe,Ue,Ce,()=>o&&u&&c&&h&&d&&x&&C&&y&&L&&D&&F&&te&&de&&oe&&Oe&&pe&&Ue&&Ce,$,function(b){wr[b?"unshift":"push"]((()=>{_e.iframe=b,r(6,_e)}))},function(b){wr[b?"unshift":"push"]((()=>{me=b,r(7,me)}))}]}class yl extends wl{constructor(n){super(),vl(this,n,jm,Zm,dl,{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 ev(s){Vm(s,"svelte-1buc46y","main.svelte-1buc46y{width:100%;height:100%;border:none}")}function tv(s){let n;return{c(){n=Bn("main"),ht(n,"class","svelte-1buc46y")},m(r,o){gn(r,n,o),s[21](n)},p:jt,i:jt,o:jt,d(r){r&&en(n),s[21](null)}}}function nv(s,n,r){let o,u,{activeFeatureToggleList:c}=n,{anchor:h}=n,{clientPermissions:d}=n,{compoundConfig:_}=n,{context:v}=n,{deferInit:x}=n,{dirtyStatus:C}=n,{documentTitle:y}=n,{hasBack:I}=n,{locale:L}=n,{noShadow:D}=n,{nodeParams:F}=n,{pathParams:te}=n,{searchParams:de}=n,{skipInitCheck:oe}=n,{theme:Oe}=n,{userSettings:pe}=n,{viewurl:Ue}=n,{webcomponent:Ce}=n,Pe=!1;const Te=new uo,_e=new Tl,me=$=>{if(!_||Pe)return;$.updateContext=(Re,wt)=>{const b=$.getNoShadow()?$:o;b._luigi_mfe_webcomponent.context=Re,r(1,v=Re);const Ne=b._luigi_mfe_webcomponent;if(Ne){const ee=Ne.querySelectorAll("[lui_web_component]");ee==null||ee.forEach((ve=>{const Le=ve.context||{};ve.context=Object.assign(Le,Re)}))}};const ft=vr.resolveContext(v);r(2,x=!1),$.notifyAlertClosed=(Re,wt)=>{$.isConnected&&_e.resolveAlert(Re,wt)},$.notifyConfirmationModalClosed=Re=>{$.isConnected&&_e.notifyConfirmationModalClosed(!!Re)};const ke={compound:_,viewUrl:Ue,webcomponent:vr.checkWebcomponentValue(Ce)||!0};$.getNoShadow()?$.innerHTML="":(r(0,o.innerHTML="",o),$.attachShadow({mode:"open"}).append(o)),_e.renderWebComponentCompound(ke,$.getNoShadow()?$:o,ft).then((Re=>{u=Re,oe||!ke.viewUrl?($.initialized=!0,setTimeout((()=>{_e.dispatchLuigiEvent(O.INITIALIZED,{})}))):u.LuigiClient&&!u.deferLuigiClientWCInit&&($.initialized=!0,_e.dispatchLuigiEvent(O.INITIALIZED,{}))})),Pe=!0,$.containerInitialized=!0};return ml((async()=>{const $=o.getRootNode()===document?o.parentNode:o.getRootNode().host;$.init=()=>{me($)},x||me($),Te.registerContainer($),_e.thisComponent=$})),s.$$set=$=>{"activeFeatureToggleList"in $&&r(3,c=$.activeFeatureToggleList),"anchor"in $&&r(4,h=$.anchor),"clientPermissions"in $&&r(5,d=$.clientPermissions),"compoundConfig"in $&&r(6,_=$.compoundConfig),"context"in $&&r(1,v=$.context),"deferInit"in $&&r(2,x=$.deferInit),"dirtyStatus"in $&&r(7,C=$.dirtyStatus),"documentTitle"in $&&r(8,y=$.documentTitle),"hasBack"in $&&r(9,I=$.hasBack),"locale"in $&&r(10,L=$.locale),"noShadow"in $&&r(11,D=$.noShadow),"nodeParams"in $&&r(12,F=$.nodeParams),"pathParams"in $&&r(13,te=$.pathParams),"searchParams"in $&&r(14,de=$.searchParams),"skipInitCheck"in $&&r(15,oe=$.skipInitCheck),"theme"in $&&r(16,Oe=$.theme),"userSettings"in $&&r(17,pe=$.userSettings),"viewurl"in $&&r(18,Ue=$.viewurl),"webcomponent"in $&&r(19,Ce=$.webcomponent)},[o,v,x,c,h,d,_,C,y,I,L,D,F,te,de,oe,Oe,pe,Ue,Ce,()=>c&&h&&d&&C&&y&&I&&L&&D&&F&&te&&de&&oe&&Oe&&pe,function($){wr[$?"unshift":"push"]((()=>{o=$,r(0,o)}))}]}El(yl,{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,(s=>{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 s{constructor(){super(...arguments);we(this,"sendCustomMessage",n("sendCustomMessage"));we(this,"updateContext",n("updateContext"));we(this,"updateViewUrl",n("updateViewUrl"));we(this,"closeAlert",n("closeAlert"));we(this,"notifyAlertClosed",n("notifyAlertClosed"));we(this,"notifyConfirmationModalClosed",n("notifyConfirmationModalClosed"))}attributeChangedCallback(o,u,c){try{super.attributeChangedCallback(o,u,c)}catch(h){console.error("Error in super.attributeChangedCallback",h)}this.containerInitialized&&(o==="context"&&this.updateContext(JSON.parse(c)),o==="auth-data"&&Nn.updateAuthData(this.iframeHandle,JSON.parse(c)))}getNoShadow(){return this.hasAttribute("no-shadow")||this.noShadow}}}));class rl extends wl{constructor(n){super(),vl(this,n,nv,tv,dl,{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},ev)}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]}}El(rl,{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,(s=>{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 s{constructor(){super(...arguments);we(this,"updateContext",n("updateContext"));we(this,"notifyAlertClosed",n("notifyAlertClosed"));we(this,"notifyConfirmationModalClosed",n("notifyConfirmationModalClosed"))}attributeChangedCallback(o,u,c){try{super.attributeChangedCallback(o,u,c)}catch(h){console.warn("Error in attributeChangedCallback",h)}this.containerInitialized&&o==="context"&&this.updateContext(JSON.parse(c))}getNoShadow(){return this.hasAttribute("no-shadow")||this.noShadow}}})),customElements.get("luigi-container")||customElements.define("luigi-container",yl.element),customElements.get("luigi-compound-container")||customElements.define("luigi-compound-container",rl.element);class Qn{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 o=new URL(B.prependOrigin(n)),u=this.decorators.filter(c=>c.type==="queryString");for(let c=0;c<u.length;c++){const h=u[c];o.searchParams.has(h.key)&&o.searchParams.delete(h.key);const d=h.valueFn();o.searchParams.append(h.key,d)}return r&&(o.search=decodeURIComponent(o.search)),o.href}}const ro=async(s,n)=>{const r=await n.readUserSettings(),u=s.userSettingsGroup&&typeof r=="object"&&r!==null?r[s.userSettingsGroup]:null;if(s.webcomponent&&!q.checkWCUrl(s.viewUrl,n))return console.warn(`View URL '${s.viewUrl}' not allowed to be included`),document.createElement("div");if(s.compound){const c=document.createElement("luigi-compound-container");return c.setAttribute("lui_container","true"),c.viewurl=se.get(Qn).applyDecorators(s.viewUrl,s.decodeViewUrl),c.webcomponent=s.webcomponent,c.compoundConfig=s.compound,c.context=s.context,c.clientPermissions=s.clientPermissions,c.nodeParams=s.nodeParams,c.pathParams=s.pathParams,c.userSettingsGroup=s.userSettingsGroup,c.userSettings=u,c.searchParams=s.searchParams,c.activeFeatureToggleList=n.featureToggles().getActiveFeatureToggleList(),c.locale=n.i18n().getCurrentLocale(),c.theme=n.theming().getCurrentTheme(),c.viewGroup=s.viewGroup,n.getEngine()._comm.addListeners(c,n),c}else{const c=document.createElement("luigi-container");return c.setAttribute("lui_container","true"),c.viewurl=se.get(Qn).applyDecorators(s.viewUrl,s.decodeViewUrl),c.webcomponent=s.webcomponent,c.context=s.context,c.clientPermissions=s.clientPermissions,c.cssVariables=await n.theming().getCSSVariables(),c.nodeParams=s.nodeParams,c.pathParams=s.pathParams,c.userSettingsGroup=s.userSettingsGroup,c.userSettings=u,c.searchParams=s.searchParams,c.activeFeatureToggleList=n.featureToggles().getActiveFeatureToggleList(),c.locale=n.i18n().getCurrentLocale(),c.theme=n.theming().getCurrentTheme(),c.viewGroup=s.viewGroup,Al(c,n),Rl(c,n),n.getEngine()._comm.addListeners(c,n),c}},Al=(s,n)=>{const r=n.getConfigValue("settings.customSandboxRules");if(!(r!=null&&r.length))return;const o=["allow-forms","allow-modals","allow-popups","allow-popups-to-escape-sandbox","allow-same-origin","allow-scripts"],u=r?[...new Set([...o,...r])]:o;s.sandboxRules=u},Rl=(s,n)=>{const r=n.getConfigValue("settings.allowRules");r!=null&&r.length&&(r.forEach((o,u)=>{r[u]=o+(o.indexOf(";")!=-1?"":";")}),s.allowRules=r)},Fe={navService:void 0,routingService:void 0,luigi:void 0,init:s=>{var n;console.log("Init UI..."),Fe.navService=se.get(tn),Fe.routingService=se.get(dn),Fe.luigi=s,(n=s.getEngine()._connector)==null||n.renderMainLayout()},update:s=>{var o,u,c;const n=Fe.routingService.getCurrentRoute();if(!n)return;const r=!s||s.length===0;(r||s.includes("settings.header")||s.includes("settings")||s.includes("navigation")||s.includes("navigation.profile")||s.includes("navigation.contextSwitcher")||s.includes("navigation.productSwitcher"))&&((o=Fe.luigi.getEngine()._connector)==null||o.renderTopNav(Fe.navService.getTopNavData(n.path))),(r||s.includes("navigation")||s.includes("navigation.nodes")||s.includes("navigation.viewgroupdata")||s.includes("settings")||s.includes("settings.footer"))&&((u=Fe.luigi.getEngine()._connector)==null||u.renderLeftNav(Fe.navService.getLeftNavData(n.path)),(c=Fe.luigi.getEngine()._connector)==null||c.renderTabNav(Fe.navService.getTabNavData(n.path))),(r||s.includes("navigation")||s.includes("navigation.nodes")||s.includes("navigation.viewgroupdata")||s.includes("settings.theming"))&&Fe.updateMainContent(n.node,Fe.luigi)},updateMainContent:async(s,n)=>{var h,d,_;const r=await n.readUserSettings(),u=s.userSettingsGroup&&typeof r=="object"&&r!==null?r[s.userSettingsGroup]:null,c=(h=n.getEngine()._connector)==null?void 0:h.getContainerWrapper();if((d=n.getEngine()._connector)==null||d.hideLoadingIndicator(c),s&&c){let v;if([...c.childNodes].forEach(x=>{var C;((C=x.tagName)==null?void 0:C.indexOf("LUIGI-"))===0&&(x.viewGroup?s.viewGroup===x.viewGroup?v=x:x.style.display="none":x.remove())}),v)v.style.display="block",v.viewurl=se.get(Qn).applyDecorators(s.viewUrl,s.decodeViewUrl),v.nodeParams=s.nodeParams,v.pathParams=s.pathParams,v.clientPermissions=s.clientPermissions,v.searchParams=q.prepareSearchParamsForClient(s,n),v.locale=n.i18n().getCurrentLocale(),v.theme=n.theming().getCurrentTheme(),v.activeFeatureToggleList=n.featureToggles().getActiveFeatureToggleList(),v.userSettingsGroup=s.userSettingsGroup,v.userSettings=u,Al(v,n),Rl(v,n),v.updateContext(s.context||{});else{const x=await ro(s,n);c==null||c.appendChild(x);const C=n.getEngine()._connector;((_=s.loadingIndicator)==null?void 0:_.enabled)!==!1&&(C==null||C.showLoadingIndicator(c))}}},openModal:async(s,n,r,o)=>{var L,D;const u=await ro(n,s),c=se.get(dn),h=se.get(pn);let d=!1,_,v;const C=new Promise(F=>{_=()=>{d||(d=!0,F(),h.removeLastModalFromStack())},v=()=>{_&&_(),s.getConfigValue("routing.showModalPathInUrl")&&h.getModalStackLength()===0&&c.removeModalDataFromUrl(!0)},u.addEventListener(O.CLOSE_CURRENT_MODAL_REQUEST,v)}),y={closePromise:C,resolveFn:_,onCloseRequestHandler:v,onInternalClose:()=>{try{y.resolveFn&&y.resolveFn()}catch(F){console.warn("onInternalClose failed",F)}},modalsettings:r};h.registerModal(y),(L=s.getEngine()._connector)==null||L.renderModal(u,r,()=>{o==null||o(),h.removeLastModalFromStack(),s.getConfigValue("routing.showModalPathInUrl")&&h.getModalStackLength()===0&&c.removeModalDataFromUrl(!0)},()=>C);const I=s.getEngine()._connector;((D=n.loadingIndicator)==null?void 0:D.enabled)!==!1&&(I==null||I.showLoadingIndicator(u.parentElement))},updateModalSettings:(s,n,r)=>{var h;const o=se.get(pn);if(o.getModalStackLength()===0)return;o.updateFirstModalSettings(s);const u=se.get(dn),c=q.getModalPathFromPath(r);c&&u.updateModalDataInUrl(c,o.getModalSettings(),n),(h=r.getEngine()._connector)==null||h.updateModalSettings(o.getModalSettings())},openDrawer:async(s,n,r,o)=>{var h,d;const u=await ro(n,s);(h=s.getEngine()._connector)==null||h.renderDrawer(u,r,o);const c=s.getEngine()._connector;((d=n.loadingIndicator)==null?void 0:d.enabled)!==!1&&(c==null||c.showLoadingIndicator(u.parentElement))}};class dn{constructor(n){this.luigi=n}getNavigationService(){return this.navigationService||(this.navigationService=se.get(tn)),this.navigationService}shouldSkipRoutingForUrlPatterns(){const n=[/access_token=/,/id_token=/];return(this.luigi.getConfigValue("routing.skipRoutingForUrlPatterns")||n).filter(o=>location.href.match(o)).length!==0}enableRouting(){var r;const n=this.luigi.getConfig();console.log("Init Routing...",n.routing),(r=n.routing)!=null&&r.useHashRouting?(window.addEventListener("hashchange",o=>{var c;const u=!!((c=o==null?void 0:o.detail)!=null&&c.withoutSync);this.handleRouteChange(q.getCurrentPath(!0),u)}),this.handleRouteChange(q.getCurrentPath(!0))):(window.addEventListener("popstate",o=>{var c;const u=!!((c=o==null?void 0:o.detail)!=null&&c.withoutSync);this.handleRouteChange(q.getCurrentPath(),u)}),this.handleRouteChange(q.getCurrentPath()))}async handleRouteChange(n,r=!1){var y,I,L;const o=n.path,u=n.query,c=o+(u?"?"+u:""),h=new URLSearchParams(u),d={};if(this.shouldSkipRoutingForUrlPatterns())return;this.setFeatureToggle(c),await this.shouldShowModalPathInUrl(n),h.forEach((D,F)=>{d[F]=D});const _=this.getNavigationService().getPathData(o),v=q.filterNodeParams(d,this.luigi),x=this.getNavigationService().shouldRedirect(o,_);if(x){this.luigi.navigation().navigate(x);return}this.currentRoute={raw:window.location.href,path:o,nodeParams:v},(y=this.luigi.getEngine()._connector)==null||y.renderTopNav(this.getNavigationService().getTopNavData(o,_)),(I=this.luigi.getEngine()._connector)==null||I.renderLeftNav(this.getNavigationService().getLeftNavData(o,_)),(L=this.luigi.getEngine()._connector)==null||L.renderTabNav(this.getNavigationService().getTabNavData(o,_));const C=(_==null?void 0:_.selectedNode)??this.getNavigationService().getCurrentNode(o);C&&(this.currentRoute.node=C,C.nodeParams=v||{},C.pathParams=(_==null?void 0:_.pathParams)||{},C.searchParams=q.prepareSearchParamsForClient(C,this.luigi),this.getNavigationService().onNodeChange(this.previousNode,C),this.previousNode=C,r||Fe.updateMainContent(C,this.luigi))}getCurrentRoute(){return this.currentRoute}async shouldShowModalPathInUrl(n){this.luigi.getConfigValue("routing.showModalPathInUrl")&&await this.handleBookmarkableModalPath(n)}async handleBookmarkableModalPath(n){var d;const r=se.get(tn),o=se.get(pn),u=new URLSearchParams((n==null?void 0:n.query)||""),c=q.getModalViewParamName(this.luigi),h=u.get(c);if(h){const _=u.get(`${c}Params`);try{const v=JSON.parse(_||"{}"),{nodeObject:x}=await r.extractDataFromPath(h);document.querySelector(".lui-modal luigi-container")?(d=this.luigi.getEngine()._connector)==null||d.updateModalSettings(v):this.luigi.navigation().openAsModal(h,v||x.openNodeInModal)}catch(v){console.error("Error parsing modal settings from URL parameters",v)}}else{o.closeModals();return}}appendModalDataToUrl(n,r){const o=q.getHashQueryParamSeparator(),u=q.getQueryParams(this.luigi),c=q.getModalViewParamName(this.luigi),h=u[c],d=new URL(location.href),_=this.luigi.getConfigValue("routing.useHashRouting");let v=history.state,x,C;if(_){let[y,I]=d.hash.split("?");x=y,C=q.getURLWithoutModalData(I,c),C&&(x+="?"+C)}else x=d.pathname,C=q.getURLWithoutModalData(d.search,c),C&&(x+="?"+q.getURLWithoutModalData(d.search,c));if(v=q.handleHistoryState(v,x),h!==n){if(u[c]=n,r&&Object.keys(r).length&&(u[`${c}Params`]=JSON.stringify(r)),_){const y=location.hash.indexOf(o);y!==-1&&(d.hash=d.hash.slice(0,y)),d.hash=`${d.hash}${o}${q.encodeParams(u)}`}else d.search=`?${q.encodeParams(u)}`;history.pushState(v,"",d.href)}else{const y=new URL(d);if(_){let I=y.hash.split("?")[0];y.hash=I,C&&(y.hash+="?"+C)}else y.search=C;history.replaceState({},"",y.href),history.pushState(v,"",d.href)}}removeModalDataFromUrl(n){const r=q.getQueryParams(this.luigi),o=q.getModalViewParamName(this.luigi);let u=new URL(location.href);if(this.luigi.getConfigValue("routing.useHashRouting")){let h={};r[o]&&(h[o]=r[o]),r[`${o}Params`]&&(h[`${o}Params`]=r[`${o}Params`]);let d=q.encodeParams(h);u.hash.includes(`?${d}`)?u.hash=u.hash.replace(`?${d}`,""):u.hash.includes(`&${d}`)&&(u.hash=u.hash.replace(`&${d}`,""))}else{let h=new URLSearchParams(u.search.slice(1));h.delete(o),h.delete(`${o}Params`);let d="";Array.from(h.keys()).forEach(_=>{d+=(d===""?"?":"&")+_+"="+h.get(_)}),u.search=d}if(history.state&&history.state.modalHistoryLength>=0&&n){history.state.modalHistoryLength;const h=history.state.pathBeforeHistory;let d=!1;if(window.addEventListener("popstate",_=>{d?(history.replaceState({},"",h),history.pushState({},"",h),history.back()):(history.pushState({},"",h),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 _=history.length-1;d=!0,history.go(-_),window.Luigi.preventLoadingModalData=!0}else{const _=history.state.modalHistoryLength;history.go(-_)}}else history.pushState({},"",u.href)}setFeatureToggle(n){const r=this.luigi.getConfigValue("settings.featureToggles.queryStringParam"),o=this.luigi.featureToggles();r&&typeof n=="string"&&q.setFeatureToggles(r,n,o)}updateModalDataInUrl(n,r,o){let u=q.getHashQueryParamSeparator();const c=q.getQueryParams(this.luigi),h=q.getModalViewParamName(this.luigi);c[h]=n,r&&Object.keys(r).length&&(c[`${h}Params`]=JSON.stringify(r));const d=new URL(location.href);if(this.luigi.getConfigValue("routing.useHashRouting")){const v=location.hash.indexOf(u);v!==-1&&(d.hash=d.hash.slice(0,v)),d.hash=`${d.hash}${u}${q.encodeParams(c)}`}else d.search=`?${q.encodeParams(c)}`;o?history.pushState(window.state,"",d.href):history.replaceState(window.state,"",d.href)}}class rv{constructor(n){var r;this.hashRouting=!1,this.navigate=async(o,u,c,h,d)=>{this.navService.handleNavigationRequest(o,u,c,!1,!1,void 0)},this.openAsModal=async(o,u,c)=>{u.keepPrevious||await this.modalService.closeModals();const h=o.replace(/\/\/+/g,"/"),d=this.navService.getCurrentNode(h),_=u||{};_.title||(_.title=d.label),this.luigi.getConfigValue("routing.showModalPathInUrl")&&this.modalService.getModalStackLength()===0&&this.routingService.appendModalDataToUrl(h,_),this.luigi.getEngine()._ui.openModal(this.luigi,d,_,c)},this.openAsDrawer=(o,u,c)=>{const h=o.replace(/\/\/+/g,"/"),d=this.navService.getCurrentNode(h),_=u||{};_.title||(_.title=d.label),this.luigi.getEngine()._ui.openDrawer(this.luigi,d,_,c)},this.runTimeErrorHandler=o=>{var d,_,v;const{path:u}=q.getCurrentPath((d=this.luigi.getConfig().routing)==null?void 0:d.useHashRouting),c=this.navService.getCurrentNode(u),h=this.luigi.getConfigValue("navigation.defaults.runTimeErrorHandler");(_=c==null?void 0:c.runTimeErrorHandler)!=null&&_.errorFn&&B.isFunction((v=c==null?void 0:c.runTimeErrorHandler)==null?void 0:v.errorFn)?c.runTimeErrorHandler.errorFn(o,c):h!=null&&h.errorFn&&B.isFunction(h.errorFn)&&h.errorFn(o,c)},this.luigi=n,this.hashRouting=(r=n.getConfig().routing)==null?void 0:r.useHashRouting,this.navService=se.get(tn),this.routingService=se.get(dn),this.modalService=se.get(pn)}}class iv{constructor(n){this.luigi=n}addSearchParams(n,r=!1){if(!B.isObject(n)){console.log("Params argument must be an object");return}const o=new URL(location.href);this.luigi.getConfigValue("routing.useHashRouting")?o.hash=q.addParamsOnHashRouting(n,o.hash):q.modifySearchParams(n,o.searchParams),this.handleBrowserHistory(r,o),this.luigi.configChanged()}getSearchParams(){const n={},r=["__proto__","constructor","prototype"],o=new URL(location.href);let u;if(this.luigi.getConfigValue("routing.useHashRouting")){const c=o.hash.split("?")[1];u=c?new URLSearchParams(c).entries():[]}else u=o.searchParams.entries();for(const[c,h]of u){if(r.some(d=>c===d)){console.warn(`Blocked because of potentially dangerous query param: ${c}`);continue}n[c]=h}return n}handleBrowserHistory(n,r){const o=this.sanitizeUrl(r.href);if(!o){console.warn("invalid url: "+o);return}n?window.history.pushState({},"",o):window.history.replaceState({},"",o)}sanitizeUrl(n){return new URL(location.href).origin===new URL(n).origin?n:void 0}addNodeParams(n,r){if(!B.isObject(n)){console.log("Params argument must be an object");return}const o=q.getContentViewParamPrefix(this.luigi),u=new URL(location.href);this.luigi.getConfigValue("routing.useHashRouting")?u.hash=q.addParamsOnHashRouting(n,u.hash,o):q.modifySearchParams(n,u.searchParams,o),this.handleBrowserHistory(r,u),this.luigi.getConfigValue("routing.useHashRouting")?window.dispatchEvent(new HashChangeEvent("hashchange")):this.luigi.configChanged()}}var tt,Hn;class sv{constructor(n){js(this,tt);js(this,Hn,"");eo(this,tt,n)}async getAvailableThemes(){return await ct(this,tt).getConfigValueAsync("settings.theming.themes")}setCurrentTheme(n){eo(this,Hn,n),ct(this,tt).__cssVars=void 0}async getThemeObject(n){const r=await this.getAvailableThemes();return r==null?void 0:r.find(o=>o.id===n)}getCurrentTheme(){if(!this.isThemingAvailable())return!1;if(ct(this,Hn))return ct(this,Hn);const n=ct(this,tt).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!!ct(this,tt).getConfigValue("settings.theming")}async getCSSVariables(){if(!window.Luigi.__cssVars){const n=ct(this,tt).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(o=>{const u=getComputedStyle(document.documentElement).getPropertyValue("--"+o);u&&(window.Luigi.__cssVars[o]=u)})}catch(r){B.isFunction(ct(this,tt).getConfigValue("settings.theming.variables.errorHandling"))?ct(this,tt).getConfigValue("settings.theming.variables.errorHandling")(r):console.error("CSS variables file error: ",r)}else ct(this,tt).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=se.get(Qn);(()=>{const o=ct(this,tt).getConfigValue("settings.theming");o&&o.nodeViewURLDecorator&&o.nodeViewURLDecorator.queryStringParameter&&n.add({type:"queryString",uid:"theming",key:o.nodeViewURLDecorator.queryStringParameter.keyName,valueFn:()=>{const u=this.getCurrentTheme(),c=o.nodeViewURLDecorator.queryStringParameter.value;return c?c(u):u}}),o&&o.useFioriScrollbars===!0&&document.body.classList.add("fioriScrollbars")})()}}tt=new WeakMap,Hn=new WeakMap;class Ri{constructor(){this.unsavedChanges={isDirty:!1,persistUrl:null}}updateDirtyStatus(n,r){var o,u;if(!this.unsavedChanges.dirtySet||!(this.unsavedChanges.dirtySet instanceof Set)){const c=new Set;c.add(r),this.unsavedChanges={dirtySet:c}}this.unsavedChanges.persistUrl=window.location.href,n?(o=this.unsavedChanges.dirtySet)==null||o.add(r):(u=this.unsavedChanges.dirtySet)==null||u.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 il;const Ie={luigi:void 0,documentTitle:void 0,init:s=>{console.log("ux init..."),Ie.luigi=s,Ie.documentTitle=Ti(void 0),il=se.get(Ri)},processAlert:(s,n,r)=>{var u;if(!Ie.luigi)throw new Error("Luigi is not initialized.");const o={openFromClient:n,close:()=>{s.id&&r.notifyAlertClosed(s.id)},link:c=>{var h;if(s.links){const d=s.links[c];if(d&&(d.url&&((h=Ie.luigi)==null||h.navigation().navigate(d.url)),d.dismissKey&&s.id))return r.notifyAlertClosed(s.id,d.dismissKey),!0}return!1}};(u=Ie.luigi.getEngine()._connector)==null||u.renderAlert(s,o)},handleConfirmationModalRequest:(s,n)=>{var r;if(!Ie.luigi)throw new Error("Luigi is not initialized.");s&&(s={...s,header:Ie.luigi.i18n().getTranslation(s.header||"luigi.confirmationModal.header"),body:Ie.luigi.i18n().getTranslation(s.body||"luigi.confirmationModal.body"),buttonDismiss:Ie.luigi.i18n().getTranslation(s.buttonDismiss||"luigi.button.dismiss"),buttonConfirm:Ie.luigi.i18n().getTranslation(s.buttonConfirm||"luigi.button.confirm")}),(r=Ie.luigi.getEngine()._connector)==null||r.renderConfirmationModal(s,{confirm(){n.notifyConfirmationModalClosed(!0)},dismiss(){n.notifyConfirmationModalClosed(!1)}})},handleDirtyStatusRequest:(s,n)=>{if(!Ie.luigi)throw new Error("Luigi is not initialized.");il.updateDirtyStatus(s,n)}};class ov{processUserSettingGroups(n,r){var d;const o=[],u=n==null?void 0:n.userSettingGroups,c=(d=r==null?void 0:r.userSettings)==null?void 0:d.userSettingGroups,h=u||c;if(B.isObject(h)){for(const _ in h){const v={};v[_]=h[_],o.push(v)}return o}return o}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 o=0;o<r.length;o++)if(r[o].contentWindow===n)return r[o];return null}}const av=new ov;class uv{constructor(n){this.dirtyStatusService=se.get(Ri),this.appLoadingIndicatorSelector="[luigi-app-loading-indicator]",this.showAlert=r=>new Promise(o=>{var c;r.id||(r.id=B.getRandomId().toString());const u={openFromClient:!1,close:()=>{o(!0)},link:h=>{var d;if(r.links){const _=r.links[h];if(_&&(_.url&&((d=this.luigi)==null||d.navigation().navigate(_.url)),_.dismissKey))return o(_.dismissKey),!0}return!1}};(c=this.luigi.getEngine()._connector)==null||c.renderAlert(r,u)}),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((o,u)=>{var c;(c=this.luigi.getEngine()._connector)==null||c.renderConfirmationModal(r,{confirm(){o(!0)},dismiss(){u()}})})),this.processUserSettingGroups=()=>{const r=this.luigi.getConfigValue("userSettings"),o=this.luigi.getConfigValue("settings");return av.processUserSettingGroups(r,o)},this.openUserSettings=r=>{var o;(o=this.luigi.getEngine()._connector)==null||o.openUserSettings(r)},this.closeUserSettings=()=>{var r;(r=this.luigi.getEngine()._connector)==null||r.closeUserSettings()},this.setDocumentTitle=r=>{var o,u,c;(u=(o=this.luigi.getEngine()._ux)==null?void 0:o.documentTitle)==null||u.set(r),(c=this.luigi.getEngine()._connector)==null||c.setDocumentTitle(r)},this.getDocumentTitle=()=>{var r;return hl((r=this.luigi.getEngine()._ux)==null?void 0:r.documentTitle)||window.document.title||""},this.hideAppLoadingIndicator=()=>{const r=document.querySelector(this.appLoadingIndicatorSelector);r&&(r.classList.add("hidden"),setTimeout(()=>{var o;(o=r.parentNode)==null||o.removeChild(r)},500))},this.showLoadingIndicator=r=>{var o;return(o=this.luigi.getEngine()._connector)==null?void 0:o.showLoadingIndicator(r)},this.hideLoadingIndicator=r=>{var o;return(o=this.luigi.getEngine()._connector)==null?void 0:o.hideLoadingIndicator(r)},this.addBackdrop=()=>{var r;return(r=this.luigi.getEngine()._connector)==null?void 0:r.addBackdrop()},this.removeBackdrop=()=>{var r;return(r=this.luigi.getEngine()._connector)==null?void 0:r.removeBackdrop()},this.getDirtyStatus=()=>this.dirtyStatusService.readDirtyStatus(),this.luigi=n}}class lv{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()),Fn.init().then(()=>{this.engine.init(),this.initialized||(this.initialized=!0,Mm.luigiAfterInit(this))})},this.getConfig=()=>this.config,this.configChanged=(...r)=>{this.getEngine()._ui.update(r)},this.i18n=()=>(this._i18n||(this._i18n=new Dm(this)),this._i18n),this.navigation=()=>new rv(this),this.ux=()=>new uv(this),this.featureToggles=()=>(this._featureToggles||(this._featureToggles=new Fm),this._featureToggles),this.routing=()=>(this._routing||(this._routing=new iv(this)),this._routing),this.theming=()=>(this._theming||(this._theming=new sv(this)),this._theming),this.auth=()=>Dn,this._store=this.createConfigStore()}getEngine(){return this.engine}getConfigValue(n){return B.getConfigValueFromObject(this.getConfig(),n)}getConfigValueAsync(n,...r){return _r.getConfigValueFromObjectAsync(this.getConfig(),n,r)}async readUserSettings(){const n=await this.getConfigValueAsync("userSettings"),r=n||await this.getConfigValueAsync("settings.userSettings");if(r&&B.isFunction(r.readUserSettings))return r.readUserSettings();const o=localStorage.getItem(this.USER_SETTINGS_KEY);return o&&JSON.parse(o)}async storeUserSettings(n,r){const o=await this.getConfigValueAsync("userSettings"),u=o||await this.getConfigValueAsync("settings.userSettings");if(u&&B.isFunction(u.storeUserSettings))return u.storeUserSettings(n,r);localStorage.setItem(this.USER_SETTINGS_KEY,JSON.stringify(n)),this.configChanged()}createConfigStore(){const n=Ti({}),r={};let o=[];return{subscribe:u=>{o.push(n.subscribe(u))},reset:u=>{n.update(u)},subscribeToScope:(u,c)=>{let h=r[c];h||(h=new Set,r[c]=h),h.add(u)},fire:(u,c)=>{const h=r[u];h&&[...h].forEach(d=>{d(c)})},clear:()=>{o.forEach(u=>{u()}),o=[]}}}getConfigReadyCallback(){return new Promise(n=>{this.i18n()._init(),n()})}setConfigCallback(n){this.configReadyCallback=n}}const cv=!1;var hv=Array.isArray,fv=Array.from,gv=Object.defineProperty,sl=Object.getOwnPropertyDescriptor;const lo=2,bl=4,Il=8,dv=16,Tr=32,Pi=64,Li=128,bi=256,Bt=512,Pl=1024,co=2048,Ll=4096,xi=8192,pv=16384,_v=1<<18,mv=1<<19;function vv(s){return s===this.v}function Sv(){throw new Error("effect_update_depth_exceeded")}function Ev(s){return{f:0,v:s,reactions:null,equals:vv,version:0}}var ol,xl;function wv(){if(ol===void 0){ol=window;var s=Element.prototype,n=Node.prototype;sl(n,"firstChild").get,xl=sl(n,"nextSibling").get,s.__click=void 0,s.__className="",s.__attributes=null,s.__styles=null,s.__e=void 0,Text.prototype.__t=void 0}}function Cv(s=""){return document.createTextNode(s)}function Tv(s){return xl.call(s)}function $l(s){var n=s.children;if(n!==null){s.children=null;for(var r=0;r<n.length;r+=1){var o=n[r];(o.f&lo)!==0?Ol(o):yr(o)}}}function yv(s){var n,r=Ht;qn(s.parent);try{$l(s),n=kl(s)}finally{qn(r)}return n}function Av(s){var n=yv(s),r=(Mn||(s.f&Li)!==0)&&s.deps!==null?co:Bt;zn(s,r),s.equals(n)||(s.v=n,s.version=xv())}function Ol(s){$l(s),Cr(s,0),zn(s,xi),s.v=s.children=s.deps=s.ctx=s.reactions=null}function Rv(s,n){var r=n.last;r===null?n.last=n.first=s:(r.next=s,s.prev=r,n.last=s)}function ho(s,n,r,o=!0){var u=(s&Pi)!==0,c=Ht,h={ctx:Pt,deps:null,deriveds:null,nodes_start:null,nodes_end:null,f:s|Pl,first:null,fn:n,last:null,next:null,parent:u?null:c,prev:null,teardown:null,transitions:null,version:0};if(r){var d=Wn;try{al(!0),go(h),h.f|=pv}catch(x){throw yr(h),x}finally{al(d)}}else n!==null&&Fv(h);var _=r&&h.deps===null&&h.first===null&&h.nodes_start===null&&h.teardown===null&&(h.f&mv)===0;if(!_&&!u&&o&&(c!==null&&Rv(h,c),It!==null&&(It.f&lo)!==0)){var v=It;(v.children??(v.children=[])).push(h)}return h}function bv(s){const n=ho(Pi,s,!0);return()=>{yr(n)}}function Iv(s){return ho(bl,s,!1)}function Pv(s,n=!0){return ho(Il|Tr,s,!0,n)}function Ul(s){var n=s.teardown;if(n!==null){const r=It;Gn(null);try{n.call(null)}finally{Gn(r)}}}function Nl(s){var n=s.deriveds;if(n!==null){s.deriveds=null;for(var r=0;r<n.length;r+=1)Ol(n[r])}}function Dl(s,n=!1){var r=s.first;for(s.first=s.last=null;r!==null;){var o=r.next;yr(r,n),r=o}}function Lv(s){for(var n=s.first;n!==null;){var r=n.next;(n.f&Tr)===0&&yr(n),n=r}}function yr(s,n=!0){var r=!1;if((n||(s.f&_v)!==0)&&s.nodes_start!==null){for(var o=s.nodes_start,u=s.nodes_end;o!==null;){var c=o===u?null:Tv(o);o.remove(),o=c}r=!0}Nl(s),Dl(s,n&&!r),Cr(s,0),zn(s,xi);var h=s.transitions;if(h!==null)for(const _ of h)_.stop();Ul(s);var d=s.parent;d!==null&&d.first!==null&&Ml(s),s.next=s.prev=s.teardown=s.ctx=s.deps=s.parent=s.fn=s.nodes_start=s.nodes_end=null}function Ml(s){var n=s.parent,r=s.prev,o=s.next;r!==null&&(r.next=o),o!==null&&(o.prev=r),n!==null&&(n.first===s&&(n.first=o),n.last===s&&(n.last=r))}let Ii=!1,Wn=!1;function al(s){Wn=s}let oo=[],Sr=0;let It=null;function Gn(s){It=s}let Ht=null;function qn(s){Ht=s}let Rt=null,St=0,Fl=0,Mn=!1,Pt=null;function xv(){return++Fl}function fo(s){var h,d;var n=s.f;if((n&Pl)!==0)return!0;if((n&co)!==0){var r=s.deps,o=(n&Li)!==0;if(r!==null){var u;if((n&bi)!==0){for(u=0;u<r.length;u++)((h=r[u]).reactions??(h.reactions=[])).push(s);s.f^=bi}for(u=0;u<r.length;u++){var c=r[u];if(fo(c)&&Av(c),o&&Ht!==null&&!Mn&&!((d=c==null?void 0:c.reactions)!=null&&d.includes(s))&&(c.reactions??(c.reactions=[])).push(s),c.version>s.version)return!0}}o||zn(s,Bt)}return!1}function $v(s,n,r){throw s}function kl(s){var x;var n=Rt,r=St,o=It,u=Mn,c=Pt,h=s.f;Rt=null,St=0,It=(h&(Tr|Pi))===0?s:null,Mn=!Wn&&(h&Li)!==0,Pt=s.ctx;try{var d=(0,s.fn)(),_=s.deps;if(Rt!==null){var v;if(Cr(s,St),_!==null&&St>0)for(_.length=St+Rt.length,v=0;v<Rt.length;v++)_[St+v]=Rt[v];else s.deps=_=Rt;if(!Mn)for(v=St;v<_.length;v++)((x=_[v]).reactions??(x.reactions=[])).push(s)}else _!==null&&St<_.length&&(Cr(s,St),_.length=St);return d}finally{Rt=n,St=r,It=o,Mn=u,Pt=c}}function Ov(s,n){let r=n.reactions;if(r!==null){var o=r.indexOf(s);if(o!==-1){var u=r.length-1;u===0?r=n.reactions=null:(r[o]=r[u],r.pop())}}r===null&&(n.f&lo)!==0&&(Rt===null||!Rt.includes(n))&&(zn(n,co),(n.f&(Li|bi))===0&&(n.f^=bi),Cr(n,0))}function Cr(s,n){var r=s.deps;if(r!==null)for(var o=n;o<r.length;o++)Ov(s,r[o])}function go(s){var n=s.f;if((n&xi)===0){zn(s,Bt);var r=Ht;Ht=s;try{Nl(s),(n&dv)!==0?Lv(s):Dl(s),Ul(s);var o=kl(s);s.teardown=typeof o=="function"?o:null,s.version=Fl}catch(u){$v(u)}finally{Ht=r}}}function Uv(){Sr>1e3&&(Sr=0,Sv()),Sr++}function Nv(s){var n=s.length;if(n!==0){Uv();var r=Wn;Wn=!0;try{for(var o=0;o<n;o++){var u=s[o];(u.f&Bt)===0&&(u.f^=Bt);var c=[];Wl(u,c),Dv(c)}}finally{Wn=r}}}function Dv(s){var n=s.length;if(n!==0)for(var r=0;r<n;r++){var o=s[r];(o.f&(xi|Ll))===0&&fo(o)&&(go(o),o.deps===null&&o.first===null&&o.nodes_start===null&&(o.teardown===null?Ml(o):o.fn=null))}}function Mv(){if(Ii=!1,Sr>1001)return;const s=oo;oo=[],Nv(s),Ii||(Sr=0)}function Fv(s){Ii||(Ii=!0,queueMicrotask(Mv));for(var n=s;n.parent!==null;){n=n.parent;var r=n.f;if((r&(Pi|Tr))!==0){if((r&Bt)===0)return;n.f^=Bt}}oo.push(n)}function Wl(s,n){var r=s.first,o=[];e:for(;r!==null;){var u=r.f,c=(u&Tr)!==0,h=c&&(u&Bt)!==0;if(!h&&(u&Ll)===0)if((u&Il)!==0){c?r.f^=Bt:fo(r)&&go(r);var d=r.first;if(d!==null){r=d;continue}}else(u&bl)!==0&&o.push(r);var _=r.next;if(_===null){let C=r.parent;for(;C!==null;){if(s===C)break e;var v=C.next;if(v!==null){r=v;continue e}C=C.parent}}r=_}for(var x=0;x<o.length;x++)d=o[x],n.push(d),Wl(d,n)}const kv=-3585;function zn(s,n){s.f=s.f&kv|n}function Wv(s,n=!1,r){Pt={p:Pt,c:null,e:null,m:!1,s,x:null,l:null},n||(Pt.l={s:null,u:null,r1:[],r2:Ev(!1)})}function Hv(s){const n=Pt;if(n!==null){const h=n.e;if(h!==null){var r=Ht,o=It;n.e=null;try{for(var u=0;u<h.length;u++){var c=h[u];qn(c.effect),Gn(c.reaction),Iv(c.fn)}}finally{qn(r),Gn(o)}}Pt=n.p,n.m=!0}return{}}const Bv=new Set,ul=new Set;function wi(s){var de;var n=this,r=n.ownerDocument,o=s.type,u=((de=s.composedPath)==null?void 0:de.call(s))||[],c=u[0]||s.target,h=0,d=s.__root;if(d){var _=u.indexOf(d);if(_!==-1&&(n===document||n===window)){s.__root=n;return}var v=u.indexOf(n);if(v===-1)return;_<=v&&(h=_)}if(c=u[h]||s.target,c!==n){gv(s,"currentTarget",{configurable:!0,get(){return c||r}});var x=It,C=Ht;Gn(null),qn(null);try{for(var y,I=[];c!==null;){var L=c.assignedSlot||c.parentNode||c.host||null;try{var D=c["__"+o];if(D!==void 0&&!c.disabled)if(hv(D)){var[F,...te]=D;F.apply(c,[s,...te])}else D.call(c,s)}catch(oe){y?I.push(oe):y=oe}if(s.cancelBubble||L===n||L===null)break;c=L}if(y){for(let oe of I)queueMicrotask(()=>{throw oe});throw y}}finally{s.__root=n,delete s.currentTarget,Gn(x),qn(C)}}}const Vv=["touchstart","touchmove"];function Qv(s){return Vv.includes(s)}function Gv(s,n){return qv(s,n)}const On=new Map;function qv(s,{target:n,anchor:r,props:o={},events:u,context:c,intro:h=!0}){wv();var d=new Set,_=C=>{for(var y=0;y<C.length;y++){var I=C[y];if(!d.has(I)){d.add(I);var L=Qv(I);n.addEventListener(I,wi,{passive:L});var D=On.get(I);D===void 0?(document.addEventListener(I,wi,{passive:L}),On.set(I,1)):On.set(I,D+1)}}};_(fv(Bv)),ul.add(_);var v=void 0,x=bv(()=>{var C=r??n.appendChild(Cv());return Pv(()=>{if(c){Wv({});var y=Pt;y.c=c}u&&(o.$$events=u),v=s(C,o)||{},c&&Hv()}),()=>{var L;for(var y of d){n.removeEventListener(y,wi);var I=On.get(y);--I===0?(document.removeEventListener(y,wi),On.delete(y)):On.set(y,I)}ul.delete(_),ll.delete(v),C!==r&&((L=C.parentNode)==null||L.removeChild(C))}});return ll.set(v,x),v}let ll=new WeakMap;const zv="5";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(zv);function Kv(s){}const ao={init:s=>{se.get(dn).enableRouting()},handlePageErrorHandler:(s,n,r)=>{s&&s.timeout&&setTimeout(()=>{if(s.viewUrl)n.viewUrl=s.viewUrl,r.getEngine()._ui.updateMainContent(n,r);else if(s.errorFn)s.errorFn(n);else{console.warn("Something went wrong with a client! You will be redirected to another page.");const o=s.redirectPath||"/";r.navigation().navigate(o)}},s.timeout)},handleExternalLinkNavigation:s=>{if(s.url)if(s.sameWindow||!1)window.location.href=s.url;else{const r=window.open(s.url,"_blank","noopener noreferrer");r&&(r.opener=null,r.focus())}},addSearchParamsFromClient(s,n,r){var d;const o=se.get(tn),u=q.getCurrentPath(),c=o.getCurrentNode(u.path),h={...s};if((d=c==null?void 0:c.clientPermissions)!=null&&d.urlParameters){const _={};Object.keys(c.clientPermissions.urlParameters).forEach(v=>{v in h&&c.clientPermissions.urlParameters[v].write===!0&&(_[v]=h[v],delete h[v])});for(const v in h)console.warn(`No permission to add the search param "${v}" to the url`);Object.keys(_).length>0&&r.routing().addSearchParams(_,n)}}},bt={luigi:{},init:s=>{console.log("Init communication..."),bt.luigi=s},addListeners:(s,n)=>{s.addEventListener(O.INITIALIZED,r=>{var o;(o=Ie.luigi)==null||o.ux().hideLoadingIndicator(s.parentNode)}),s.addEventListener(O.NAVIGATION_REQUEST,r=>{const{link:o,preserveView:u,modal:c,newTab:h,withoutSync:d}=r.detail;se.get(tn).handleNavigationRequest(o,u,c,h,d,r.callbackFn)}),s.addEventListener(O.RUNTIME_ERROR_HANDLING_REQUEST,r=>{var o,u;n.navigation().runTimeErrorHandler(((u=(o=r.payload)==null?void 0:o.data)==null?void 0:u.errorObj)||{})}),s.addEventListener(O.ALERT_REQUEST,r=>{Ie.processAlert(r.payload,!0,s)}),s.addEventListener(O.SHOW_CONFIRMATION_MODAL_REQUEST,r=>{Ie.handleConfirmationModalRequest(r.payload,s)}),s.addEventListener(O.SET_DOCUMENT_TITLE_REQUEST,r=>{var o;(o=bt.luigi.getEngine()._connector)==null||o.setDocumentTitle(r.detail.title)}),s.addEventListener(O.SHOW_LOADING_INDICATOR_REQUEST,r=>{var o;(o=bt.luigi.getEngine()._connector)==null||o.showLoadingIndicator(s.parentNode)}),s.addEventListener(O.HIDE_LOADING_INDICATOR_REQUEST,r=>{var o;(o=bt.luigi.getEngine()._connector)==null||o.hideLoadingIndicator(s.parentNode)}),s.addEventListener(O.ADD_BACKDROP_REQUEST,r=>{var o;(o=bt.luigi.getEngine()._connector)==null||o.addBackdrop()}),s.addEventListener(O.REMOVE_BACKDROP_REQUEST,r=>{var o;(o=bt.luigi.getEngine()._connector)==null||o.removeBackdrop()}),s.addEventListener(O.SET_DIRTY_STATUS_REQUEST,r=>{var o,u,c;Ie.handleDirtyStatusRequest((u=(o=r.detail)==null?void 0:o.data)==null?void 0:u.dirty,(c=r.detail)==null?void 0:c.source)}),s.addEventListener(O.ADD_NODE_PARAMS_REQUEST,r=>{n.routing().addNodeParams(r.payload.data,r.payload.keepBrowserHistory)}),s.addEventListener(O.OPEN_USER_SETTINGS_REQUEST,r=>{var o;(o=bt.luigi.getEngine()._connector)==null||o.openUserSettings(r.detail)}),s.addEventListener(O.CLOSE_USER_SETTINGS_REQUEST,r=>{var o;(o=bt.luigi.getEngine()._connector)==null||o.closeUserSettings()}),s.addEventListener(O.ADD_SEARCH_PARAMS_REQUEST,r=>{ao.addSearchParamsFromClient(r.detail.data,r.detail.keepBrowserHistory,n)}),s.addEventListener(O.UPDATE_MODAL_SETTINGS_REQUEST,r=>{Fe.updateModalSettings(r.payload.updatedModalSettings,r.payload.addHistoryEntry,n)}),s.addEventListener(O.SET_CURRENT_LOCALE_REQUEST,r=>{var o,u,c;n.i18n().setCurrentLocale((c=(u=(o=r.detail)==null?void 0:o.data)==null?void 0:u.data)==null?void 0:c.currentLocale,s)})}};class cl{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 o=0;o<r.length;o++)this.deleteNodesRecursively(r[o])}this.dataManagement.delete(n)}}class Yv{constructor(){this._ui=Fe,this._comm=bt,this._ux=Ie,this._routing=ao}bootstrap(n){this._app=Gv(Kv,{target:document.body}),this._connector=n}init(){const n=window.Luigi;se.register(Ri,()=>new Ri),se.register(tn,()=>new tn(n)),se.register(cl,()=>new cl),se.register(dn,()=>new dn(n)),se.register(Qn,()=>new Qn),se.register(pn,()=>new pn(n)),n.theming()._init(),Fe.init(n),ao.init(n),bt.init(n),Ie.init(n)}}window.Luigi=new lv(new Yv);
|
|
33
|
+
}`,t=Mt(" "),n=Ae("iframe"),vt(n.src,r=i[3])||W(n,"src",r),W(n,"title",i[1]),W(n,"allow",s=wt(i[0])),W(n,"sandbox",a=i[2]?i[2].join(" "):void 0)},m(o,l){de(o,e,l),de(o,t,l),de(o,n,l),i[28](n)},p(o,l){8&l[0]&&!vt(n.src,r=o[3])&&W(n,"src",r),2&l[0]&&W(n,"title",o[1]),1&l[0]&&s!==(s=wt(o[0]))&&W(n,"allow",s),4&l[0]&&a!==(a=o[2]?o[2].join(" "):void 0)&&W(n,"sandbox",a)},d(o){o&&(oe(e),oe(t),oe(n)),i[28](null)}}}function Ui(i){let e,t,n=i[5]&&bt(i);return{c(){e=Ae("main"),n&&n.c(),W(e,"class",t=i[4]?void 0:"lui-isolated")},m(r,s){de(r,e,s),n&&n.m(e,null),i[29](e)},p(r,s){r[5]?n?n.p(r,s):(n=bt(r),n.c(),n.m(e,null)):n&&(n.d(1),n=null),16&s[0]&&t!==(t=r[4]?void 0:"lui-isolated")&&W(e,"class",t)},i:ae,o:ae,d(r){r&&oe(e),n&&n.d(),i[29](null)}}}function Oi(i,e,t){let{activeFeatureToggleList:n}=e,{allowRules:r}=e,{anchor:s}=e,{authData:a}=e,{clientPermissions:o}=e,{context:l}=e,{deferInit:c}=e,{dirtyStatus:f}=e,{documentTitle:h}=e,{hasBack:u}=e,{label:d}=e,{locale:S}=e,{noShadow:_}=e,{nodeParams:E}=e,{pathParams:R}=e,{sandboxRules:L}=e,{searchParams:U}=e,{skipCookieCheck:z}=e,{skipInitCheck:G}=e,{theme:K}=e,{userSettings:J}=e,{viewurl:j}=e,{webcomponent:k}=e;const I={};let $,m,te=!1;const H=new Bt,O=g=>{if(!te){g.sendCustomMessage=(b,D)=>{Ee.sendCustomMessage(b,g.getNoShadow()?g:$,!!k,I,D)},g.updateContext=(b,D)=>{if(t(8,l=b),k)(g.getNoShadow()?g:$)._luigi_mfe_webcomponent.context=b;else{const pe={...D||{},activeFeatureToggleList:g.activeFeatureToggleList||[],currentLocale:g.locale,currentTheme:g.theme,userSettings:g.userSettings||null,cssVariables:g.cssVariables||{},anchor:g.anchor||"",drawer:g.drawer||!1,modal:g.modal||!1,viewStackSize:g.viewStackSize||0,isNavigateBack:g.isNavigateBack||!1};Ee.updateContext(b,pe,I,E,R,U)}},g.closeAlert=(b,D)=>{g.notifyAlertClosed(b,D)},g.notifyAlertClosed=(b,D)=>{g.isConnected&&(k?H.resolveAlert(b,D):Ee.notifyAlertClosed(b,D,I))},g.notifyConfirmationModalClosed=b=>{g.isConnected&&(k?H.notifyConfirmationModalClosed(!!b):Ee.notifyConfirmationModalClosed(!!b,I))},se.registerContainer(g),H.thisComponent=g;const ue=De.resolveContext(l);if(g.updateViewUrl=(b,D)=>{b!=null&&b.length&&Ee.updateViewUrl(b,De.resolveContext(l),D,I)},k&&k!="false"){g.getNoShadow()?g.innerHTML="":(t(7,$.innerHTML="",$),g.attachShadow({mode:"open"}).append($));const b=De.checkWebcomponentValue(k);H.renderWebComponent(j,g.getNoShadow()?g:$,ue,typeof b=="object"?{webcomponent:b}:{})}else g.getNoShadow()||(g.innerHTML="",g.attachShadow({mode:"open"}).append($));G?(g.initialized=!0,setTimeout((()=>{H.dispatchLuigiEvent(p.INITIALIZED,{})}))):k&&(g.getNoShadow()?g:$).addEventListener("wc_ready",(()=>{var b;(b=(g.getNoShadow()?g:$)._luigi_mfe_webcomponent)!=null&&b.deferLuigiClientWCInit||(g.initialized=!0,H.dispatchLuigiEvent(p.INITIALIZED,{}))})),t(5,te=!0),g.containerInitialized=!0}};var re;return Vt((async()=>{t(27,m=$.parentNode),t(27,m.iframeHandle=I,m),t(27,m.init=()=>{O(m)},m),!c&&j&&O(m)})),re=async()=>{},Ft().$$.on_destroy.push(re),i.$$set=g=>{"activeFeatureToggleList"in g&&t(9,n=g.activeFeatureToggleList),"allowRules"in g&&t(0,r=g.allowRules),"anchor"in g&&t(10,s=g.anchor),"authData"in g&&t(11,a=g.authData),"clientPermissions"in g&&t(12,o=g.clientPermissions),"context"in g&&t(8,l=g.context),"deferInit"in g&&t(13,c=g.deferInit),"dirtyStatus"in g&&t(14,f=g.dirtyStatus),"documentTitle"in g&&t(15,h=g.documentTitle),"hasBack"in g&&t(16,u=g.hasBack),"label"in g&&t(1,d=g.label),"locale"in g&&t(17,S=g.locale),"noShadow"in g&&t(18,_=g.noShadow),"nodeParams"in g&&t(19,E=g.nodeParams),"pathParams"in g&&t(20,R=g.pathParams),"sandboxRules"in g&&t(2,L=g.sandboxRules),"searchParams"in g&&t(21,U=g.searchParams),"skipCookieCheck"in g&&t(22,z=g.skipCookieCheck),"skipInitCheck"in g&&t(23,G=g.skipInitCheck),"theme"in g&&t(24,K=g.theme),"userSettings"in g&&t(25,J=g.userSettings),"viewurl"in g&&t(3,j=g.viewurl),"webcomponent"in g&&t(4,k=g.webcomponent)},i.$$.update=()=>{134225960&i.$$.dirty[0]&&!te&&j&&!c&&m&&O(m)},[r,d,L,j,k,te,I,$,l,n,s,a,o,c,f,h,u,S,_,E,R,U,z,G,K,J,()=>n&&r&&s&&a&&o&&f&&h&&u&&S&&_&&E&&R&&L&&U&&z&&G&&K&&J,m,function(g){Me[g?"unshift":"push"]((()=>{I.iframe=g,t(6,I)}))},function(g){Me[g?"unshift":"push"]((()=>{$=g,t(7,$)}))}]}class qt extends Gt{constructor(e){super(),Ht(this,e,Oi,Ui,kt,{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(e){this.$$set({activeFeatureToggleList:e}),w()}get allowRules(){return this.$$.ctx[0]}set allowRules(e){this.$$set({allowRules:e}),w()}get anchor(){return this.$$.ctx[10]}set anchor(e){this.$$set({anchor:e}),w()}get authData(){return this.$$.ctx[11]}set authData(e){this.$$set({authData:e}),w()}get clientPermissions(){return this.$$.ctx[12]}set clientPermissions(e){this.$$set({clientPermissions:e}),w()}get context(){return this.$$.ctx[8]}set context(e){this.$$set({context:e}),w()}get deferInit(){return this.$$.ctx[13]}set deferInit(e){this.$$set({deferInit:e}),w()}get dirtyStatus(){return this.$$.ctx[14]}set dirtyStatus(e){this.$$set({dirtyStatus:e}),w()}get documentTitle(){return this.$$.ctx[15]}set documentTitle(e){this.$$set({documentTitle:e}),w()}get hasBack(){return this.$$.ctx[16]}set hasBack(e){this.$$set({hasBack:e}),w()}get label(){return this.$$.ctx[1]}set label(e){this.$$set({label:e}),w()}get locale(){return this.$$.ctx[17]}set locale(e){this.$$set({locale:e}),w()}get noShadow(){return this.$$.ctx[18]}set noShadow(e){this.$$set({noShadow:e}),w()}get nodeParams(){return this.$$.ctx[19]}set nodeParams(e){this.$$set({nodeParams:e}),w()}get pathParams(){return this.$$.ctx[20]}set pathParams(e){this.$$set({pathParams:e}),w()}get sandboxRules(){return this.$$.ctx[2]}set sandboxRules(e){this.$$set({sandboxRules:e}),w()}get searchParams(){return this.$$.ctx[21]}set searchParams(e){this.$$set({searchParams:e}),w()}get skipCookieCheck(){return this.$$.ctx[22]}set skipCookieCheck(e){this.$$set({skipCookieCheck:e}),w()}get skipInitCheck(){return this.$$.ctx[23]}set skipInitCheck(e){this.$$set({skipInitCheck:e}),w()}get theme(){return this.$$.ctx[24]}set theme(e){this.$$set({theme:e}),w()}get userSettings(){return this.$$.ctx[25]}set userSettings(e){this.$$set({userSettings:e}),w()}get viewurl(){return this.$$.ctx[3]}set viewurl(e){this.$$set({viewurl:e}),w()}get webcomponent(){return this.$$.ctx[4]}set webcomponent(e){this.$$set({webcomponent:e}),w()}get unwarn(){return this.$$.ctx[26]}}function Di(i){yi(i,"svelte-1buc46y","main.svelte-1buc46y{width:100%;height:100%;border:none}")}function xi(i){let e;return{c(){e=Ae("main"),W(e,"class","svelte-1buc46y")},m(t,n){de(t,e,n),i[21](e)},p:ae,i:ae,o:ae,d(t){t&&oe(e),i[21](null)}}}function ki(i,e,t){let n,r,{activeFeatureToggleList:s}=e,{anchor:a}=e,{clientPermissions:o}=e,{compoundConfig:l}=e,{context:c}=e,{deferInit:f}=e,{dirtyStatus:h}=e,{documentTitle:u}=e,{hasBack:d}=e,{locale:S}=e,{noShadow:_}=e,{nodeParams:E}=e,{pathParams:R}=e,{searchParams:L}=e,{skipInitCheck:U}=e,{theme:z}=e,{userSettings:G}=e,{viewurl:K}=e,{webcomponent:J}=e,j=!1;const k=new ht,I=new Bt,$=m=>{if(!l||j)return;m.updateContext=(O,re)=>{const g=m.getNoShadow()?m:n;g._luigi_mfe_webcomponent.context=O,t(1,c=O);const ue=g._luigi_mfe_webcomponent;if(ue){const b=ue.querySelectorAll("[lui_web_component]");b==null||b.forEach((D=>{const pe=D.context||{};D.context=Object.assign(pe,O)}))}};const te=De.resolveContext(c);t(2,f=!1),m.notifyAlertClosed=(O,re)=>{m.isConnected&&I.resolveAlert(O,re)},m.notifyConfirmationModalClosed=O=>{m.isConnected&&I.notifyConfirmationModalClosed(!!O)};const H={compound:l,viewUrl:K,webcomponent:De.checkWebcomponentValue(J)||!0};m.getNoShadow()?m.innerHTML="":(t(0,n.innerHTML="",n),m.attachShadow({mode:"open"}).append(n)),I.renderWebComponentCompound(H,m.getNoShadow()?m:n,te).then((O=>{r=O,U||!H.viewUrl?(m.initialized=!0,setTimeout((()=>{I.dispatchLuigiEvent(p.INITIALIZED,{})}))):r.LuigiClient&&!r.deferLuigiClientWCInit&&(m.initialized=!0,I.dispatchLuigiEvent(p.INITIALIZED,{}))})),j=!0,m.containerInitialized=!0};return Vt((async()=>{const m=n.getRootNode()===document?n.parentNode:n.getRootNode().host;m.init=()=>{$(m)},f||$(m),k.registerContainer(m),I.thisComponent=m})),i.$$set=m=>{"activeFeatureToggleList"in m&&t(3,s=m.activeFeatureToggleList),"anchor"in m&&t(4,a=m.anchor),"clientPermissions"in m&&t(5,o=m.clientPermissions),"compoundConfig"in m&&t(6,l=m.compoundConfig),"context"in m&&t(1,c=m.context),"deferInit"in m&&t(2,f=m.deferInit),"dirtyStatus"in m&&t(7,h=m.dirtyStatus),"documentTitle"in m&&t(8,u=m.documentTitle),"hasBack"in m&&t(9,d=m.hasBack),"locale"in m&&t(10,S=m.locale),"noShadow"in m&&t(11,_=m.noShadow),"nodeParams"in m&&t(12,E=m.nodeParams),"pathParams"in m&&t(13,R=m.pathParams),"searchParams"in m&&t(14,L=m.searchParams),"skipInitCheck"in m&&t(15,U=m.skipInitCheck),"theme"in m&&t(16,z=m.theme),"userSettings"in m&&t(17,G=m.userSettings),"viewurl"in m&&t(18,K=m.viewurl),"webcomponent"in m&&t(19,J=m.webcomponent)},[n,c,f,s,a,o,l,h,u,d,S,_,E,R,L,U,z,G,K,J,()=>s&&a&&o&&h&&u&&d&&S&&_&&E&&R&&L&&U&&z&&G,function(m){Me[m?"unshift":"push"]((()=>{n=m,t(0,n)}))}]}Wt(qt,{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 e=t=>()=>console.warn(t+" can't be called on luigi-container before its micro frontend is attached to the DOM.");return class extends i{constructor(){super(...arguments);A(this,"sendCustomMessage",e("sendCustomMessage"));A(this,"updateContext",e("updateContext"));A(this,"updateViewUrl",e("updateViewUrl"));A(this,"closeAlert",e("closeAlert"));A(this,"notifyAlertClosed",e("notifyAlertClosed"));A(this,"notifyConfirmationModalClosed",e("notifyConfirmationModalClosed"))}attributeChangedCallback(n,r,s){try{super.attributeChangedCallback(n,r,s)}catch(a){console.error("Error in super.attributeChangedCallback",a)}this.containerInitialized&&(n==="context"&&this.updateContext(JSON.parse(s)),n==="auth-data"&&Ee.updateAuthData(this.iframeHandle,JSON.parse(s)))}getNoShadow(){return this.hasAttribute("no-shadow")||this.noShadow}}}));class At extends Gt{constructor(e){super(),Ht(this,e,ki,xi,kt,{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},Di)}get activeFeatureToggleList(){return this.$$.ctx[3]}set activeFeatureToggleList(e){this.$$set({activeFeatureToggleList:e}),w()}get anchor(){return this.$$.ctx[4]}set anchor(e){this.$$set({anchor:e}),w()}get clientPermissions(){return this.$$.ctx[5]}set clientPermissions(e){this.$$set({clientPermissions:e}),w()}get compoundConfig(){return this.$$.ctx[6]}set compoundConfig(e){this.$$set({compoundConfig:e}),w()}get context(){return this.$$.ctx[1]}set context(e){this.$$set({context:e}),w()}get deferInit(){return this.$$.ctx[2]}set deferInit(e){this.$$set({deferInit:e}),w()}get dirtyStatus(){return this.$$.ctx[7]}set dirtyStatus(e){this.$$set({dirtyStatus:e}),w()}get documentTitle(){return this.$$.ctx[8]}set documentTitle(e){this.$$set({documentTitle:e}),w()}get hasBack(){return this.$$.ctx[9]}set hasBack(e){this.$$set({hasBack:e}),w()}get locale(){return this.$$.ctx[10]}set locale(e){this.$$set({locale:e}),w()}get noShadow(){return this.$$.ctx[11]}set noShadow(e){this.$$set({noShadow:e}),w()}get nodeParams(){return this.$$.ctx[12]}set nodeParams(e){this.$$set({nodeParams:e}),w()}get pathParams(){return this.$$.ctx[13]}set pathParams(e){this.$$set({pathParams:e}),w()}get searchParams(){return this.$$.ctx[14]}set searchParams(e){this.$$set({searchParams:e}),w()}get skipInitCheck(){return this.$$.ctx[15]}set skipInitCheck(e){this.$$set({skipInitCheck:e}),w()}get theme(){return this.$$.ctx[16]}set theme(e){this.$$set({theme:e}),w()}get userSettings(){return this.$$.ctx[17]}set userSettings(e){this.$$set({userSettings:e}),w()}get viewurl(){return this.$$.ctx[18]}set viewurl(e){this.$$set({viewurl:e}),w()}get webcomponent(){return this.$$.ctx[19]}set webcomponent(e){this.$$set({webcomponent:e}),w()}get unwarn(){return this.$$.ctx[20]}}Wt(At,{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 e=t=>()=>console.warn(t+" can't be called on luigi-container before its micro frontend is attached to the DOM.");return class extends i{constructor(){super(...arguments);A(this,"updateContext",e("updateContext"));A(this,"notifyAlertClosed",e("notifyAlertClosed"));A(this,"notifyConfirmationModalClosed",e("notifyConfirmationModalClosed"))}attributeChangedCallback(n,r,s){try{super.attributeChangedCallback(n,r,s)}catch(a){console.warn("Error in attributeChangedCallback",a)}this.containerInitialized&&n==="context"&&this.updateContext(JSON.parse(s))}getNoShadow(){return this.hasAttribute("no-shadow")||this.noShadow}}})),customElements.get("luigi-container")||customElements.define("luigi-container",qt.element),customElements.get("luigi-compound-container")||customElements.define("luigi-compound-container",At.element);class Ie{constructor(){this.decorators=[]}hasDecorators(){return this.decorators.length>0}add(e){this.decorators=this.decorators.filter(t=>t.uid!==e.uid).concat(e)}applyDecorators(e,t){if(!e)return e;const n=new URL(v.prependOrigin(e)),r=this.decorators.filter(s=>s.type==="queryString");for(let s=0;s<r.length;s++){const a=r[s];n.searchParams.has(a.key)&&n.searchParams.delete(a.key);const o=a.valueFn();n.searchParams.append(a.key,o)}return t&&(n.search=decodeURIComponent(n.search)),n.href}}const at=async(i,e)=>{const t=await e.readUserSettings(),r=i.userSettingsGroup&&typeof t=="object"&&t!==null?t[i.userSettingsGroup]:null;if(i.webcomponent&&!C.checkWCUrl(i.viewUrl,e))return console.warn(`View URL '${i.viewUrl}' not allowed to be included`),document.createElement("div");if(i.compound){const s=document.createElement("luigi-compound-container");return s.setAttribute("lui_container","true"),s.viewurl=y.get(Ie).applyDecorators(i.viewUrl,i.decodeViewUrl),s.webcomponent=i.webcomponent,s.compoundConfig=i.compound,s.context=i.context,s.clientPermissions=i.clientPermissions,s.nodeParams=i.nodeParams,s.pathParams=i.pathParams,s.userSettingsGroup=i.userSettingsGroup,s.userSettings=r,s.searchParams=i.searchParams,s.activeFeatureToggleList=e.featureToggles().getActiveFeatureToggleList(),s.locale=e.i18n().getCurrentLocale(),s.theme=e.theming().getCurrentTheme(),s.viewGroup=i.viewGroup,e.getEngine()._comm.addListeners(s,e),s}else{const s=document.createElement("luigi-container");return s.setAttribute("lui_container","true"),s.viewurl=y.get(Ie).applyDecorators(i.viewUrl,i.decodeViewUrl),s.webcomponent=i.webcomponent,s.context=i.context,s.clientPermissions=i.clientPermissions,s.cssVariables=await e.theming().getCSSVariables(),s.nodeParams=i.nodeParams,s.pathParams=i.pathParams,s.userSettingsGroup=i.userSettingsGroup,s.userSettings=r,s.searchParams=i.searchParams,s.activeFeatureToggleList=e.featureToggles().getActiveFeatureToggleList(),s.locale=e.i18n().getCurrentLocale(),s.theme=e.theming().getCurrentTheme(),s.viewGroup=i.viewGroup,zt(s,e),Kt(s,e),e.getEngine()._comm.addListeners(s,e),s}},zt=(i,e)=>{const t=e.getConfigValue("settings.customSandboxRules");if(!(t!=null&&t.length))return;const n=["allow-forms","allow-modals","allow-popups","allow-popups-to-escape-sandbox","allow-same-origin","allow-scripts"],r=t?[...new Set([...n,...t])]:n;i.sandboxRules=r},Kt=(i,e)=>{const t=e.getConfigValue("settings.allowRules");t!=null&&t.length&&(t.forEach((n,r)=>{t[r]=n+(n.indexOf(";")!=-1?"":";")}),i.allowRules=t)},x={navService:void 0,routingService:void 0,luigi:void 0,init:i=>{var e;console.log("Init UI..."),x.navService=y.get(ce),x.routingService=y.get(ge),x.luigi=i,(e=i.getEngine()._connector)==null||e.renderMainLayout()},update:async i=>{var n,r,s;const e=x.routingService.getCurrentRoute();if(!e)return;const t=!i||i.length===0;(t||i.includes("settings.header")||i.includes("settings")||i.includes("navigation")||i.includes("navigation.profile")||i.includes("navigation.contextSwitcher")||i.includes("navigation.productSwitcher"))&&((n=x.luigi.getEngine()._connector)==null||n.renderTopNav(await x.navService.getTopNavData(e.path))),(t||i.includes("navigation")||i.includes("navigation.nodes")||i.includes("navigation.viewgroupdata")||i.includes("settings")||i.includes("settings.footer"))&&(y.get(le).deleteCache(),(r=x.luigi.getEngine()._connector)==null||r.renderLeftNav(await x.navService.getLeftNavData(e.path)),(s=x.luigi.getEngine()._connector)==null||s.renderTabNav(await x.navService.getTabNavData(e.path))),(t||i.includes("navigation")||i.includes("navigation.nodes")||i.includes("navigation.viewgroupdata")||i.includes("settings.theming"))&&(y.get(le).deleteCache(),x.updateMainContent(e.node,x.luigi))},updateMainContent:async(i,e)=>{var a,o,l;const t=await e.readUserSettings(),r=i.userSettingsGroup&&typeof t=="object"&&t!==null?t[i.userSettingsGroup]:null,s=(a=e.getEngine()._connector)==null?void 0:a.getContainerWrapper();if((o=e.getEngine()._connector)==null||o.hideLoadingIndicator(s),i&&s){let c;if([...s.childNodes].forEach(f=>{var h;((h=f.tagName)==null?void 0:h.indexOf("LUIGI-"))===0&&(f.viewGroup?i.viewGroup===f.viewGroup?c=f:f.style.display="none":f.remove())}),c)c.style.display="block",c.viewurl=y.get(Ie).applyDecorators(i.viewUrl,i.decodeViewUrl),c.nodeParams=i.nodeParams,c.pathParams=i.pathParams,c.clientPermissions=i.clientPermissions,c.searchParams=C.prepareSearchParamsForClient(i,e),c.locale=e.i18n().getCurrentLocale(),c.theme=e.theming().getCurrentTheme(),c.activeFeatureToggleList=e.featureToggles().getActiveFeatureToggleList(),c.userSettingsGroup=i.userSettingsGroup,c.userSettings=r,zt(c,e),Kt(c,e),c.updateContext(i.context||{});else{const f=await at(i,e);s==null||s.appendChild(f);const h=e.getEngine()._connector;((l=i.loadingIndicator)==null?void 0:l.enabled)!==!1&&(h==null||h.showLoadingIndicator(s))}}},openModal:async(i,e,t,n)=>{var S,_;const r=await at(e,i),s=y.get(ge),a=y.get(fe);let o=!1,l,c;const h=new Promise(E=>{l=()=>{o||(o=!0,E(),a.removeLastModalFromStack())},c=()=>{l&&l(),i.getConfigValue("routing.showModalPathInUrl")&&a.getModalStackLength()===0&&s.removeModalDataFromUrl(!0)},r.addEventListener(p.CLOSE_CURRENT_MODAL_REQUEST,c)}),u={closePromise:h,resolveFn:l,onCloseRequestHandler:c,onInternalClose:()=>{try{u.resolveFn&&u.resolveFn()}catch(E){console.warn("onInternalClose failed",E)}},modalsettings:t};a.registerModal(u),(S=i.getEngine()._connector)==null||S.renderModal(r,t,()=>{n==null||n(),a.removeLastModalFromStack(),i.getConfigValue("routing.showModalPathInUrl")&&a.getModalStackLength()===0&&s.removeModalDataFromUrl(!0)},()=>h);const d=i.getEngine()._connector;((_=e.loadingIndicator)==null?void 0:_.enabled)!==!1&&(d==null||d.showLoadingIndicator(r.parentElement))},updateModalSettings:(i,e,t)=>{var a;const n=y.get(fe);if(n.getModalStackLength()===0)return;n.updateFirstModalSettings(i);const r=y.get(ge),s=C.getModalPathFromPath(t);s&&r.updateModalDataInUrl(s,n.getModalSettings(),e),(a=t.getEngine()._connector)==null||a.updateModalSettings(n.getModalSettings())},openDrawer:async(i,e,t,n)=>{var a,o;const r=await at(e,i);(a=i.getEngine()._connector)==null||a.renderDrawer(r,t,n);const s=i.getEngine()._connector;((o=e.loadingIndicator)==null?void 0:o.enabled)!==!1&&(s==null||s.showLoadingIndicator(r.parentElement))}};class ge{constructor(e){this.luigi=e}getNavigationService(){return this.navigationService||(this.navigationService=y.get(ce)),this.navigationService}shouldSkipRoutingForUrlPatterns(){const e=[/access_token=/,/id_token=/];return(this.luigi.getConfigValue("routing.skipRoutingForUrlPatterns")||e).filter(n=>location.href.match(n)).length!==0}enableRouting(){var t;const e=this.luigi.getConfig();console.log("Init Routing...",e.routing),(t=e.routing)!=null&&t.useHashRouting?(window.addEventListener("hashchange",n=>{var s;const r=!!((s=n==null?void 0:n.detail)!=null&&s.withoutSync);this.handleRouteChange(C.getCurrentPath(!0),r)}),this.handleRouteChange(C.getCurrentPath(!0))):(window.addEventListener("popstate",n=>{var s;const r=!!((s=n==null?void 0:n.detail)!=null&&s.withoutSync);this.handleRouteChange(C.getCurrentPath(),r)}),this.handleRouteChange(C.getCurrentPath()))}async handleRouteChange(e,t=!1){var u,d,S;const n=e.path,r=e.query,s=n+(r?"?"+r:""),a=new URLSearchParams(r),o={};if(this.shouldSkipRoutingForUrlPatterns())return;this.setFeatureToggle(s),await this.shouldShowModalPathInUrl(e),a.forEach((_,E)=>{o[E]=_}),this.checkInvalidateCache(this.previousPathData,n);const l=await this.getNavigationService().getPathData(n);this.previousPathData=l;const c=C.filterNodeParams(o,this.luigi),f=await this.getNavigationService().shouldRedirect(n,l);if(f){this.luigi.navigation().navigate(f);return}this.currentRoute={raw:window.location.href,path:n,nodeParams:c},(u=this.luigi.getEngine()._connector)==null||u.renderTopNav(await this.getNavigationService().getTopNavData(n,l)),(d=this.luigi.getEngine()._connector)==null||d.renderLeftNav(await this.getNavigationService().getLeftNavData(n,l)),(S=this.luigi.getEngine()._connector)==null||S.renderTabNav(await this.getNavigationService().getTabNavData(n,l));const h=(l==null?void 0:l.selectedNode)??await this.getNavigationService().getCurrentNode(n);h&&(this.currentRoute.node=h,h.nodeParams=c||{},h.pathParams=(l==null?void 0:l.pathParams)||{},h.searchParams=C.prepareSearchParamsForClient(h,this.luigi),this.getNavigationService().onNodeChange(this.previousNode,h),this.previousNode=h,t||x.updateMainContent(h,this.luigi))}getCurrentRoute(){return this.currentRoute}async shouldShowModalPathInUrl(e){this.luigi.getConfigValue("routing.showModalPathInUrl")&&await this.handleBookmarkableModalPath(e)}async handleBookmarkableModalPath(e){var o;const t=y.get(ce),n=y.get(fe),r=new URLSearchParams((e==null?void 0:e.query)||""),s=C.getModalViewParamName(this.luigi),a=r.get(s);if(a){const l=r.get(`${s}Params`);try{const c=JSON.parse(l||"{}"),{nodeObject:f}=await t.extractDataFromPath(a);document.querySelector(".lui-modal luigi-container")?(o=this.luigi.getEngine()._connector)==null||o.updateModalSettings(c):this.luigi.navigation().openAsModal(a,c||f.openNodeInModal)}catch(c){console.error("Error parsing modal settings from URL parameters",c)}}else{n.closeModals();return}}appendModalDataToUrl(e,t){const n=C.getHashQueryParamSeparator(),r=C.getQueryParams(this.luigi),s=C.getModalViewParamName(this.luigi),a=r[s],o=new URL(location.href),l=this.luigi.getConfigValue("routing.useHashRouting");let c=history.state,f,h;if(l){let[u,d]=o.hash.split("?");f=u,h=C.getURLWithoutModalData(d,s),h&&(f+="?"+h)}else f=o.pathname,h=C.getURLWithoutModalData(o.search,s),h&&(f+="?"+C.getURLWithoutModalData(o.search,s));if(c=C.handleHistoryState(c,f),a!==e){if(r[s]=e,t&&Object.keys(t).length&&(r[`${s}Params`]=JSON.stringify(t)),l){const u=location.hash.indexOf(n);u!==-1&&(o.hash=o.hash.slice(0,u)),o.hash=`${o.hash}${n}${C.encodeParams(r)}`}else o.search=`?${C.encodeParams(r)}`;history.pushState(c,"",o.href)}else{const u=new URL(o);if(l){let d=u.hash.split("?")[0];u.hash=d,h&&(u.hash+="?"+h)}else u.search=h;history.replaceState({},"",u.href),history.pushState(c,"",o.href)}}removeModalDataFromUrl(e){const t=C.getQueryParams(this.luigi),n=C.getModalViewParamName(this.luigi);let r=new URL(location.href);if(this.luigi.getConfigValue("routing.useHashRouting")){let a={};t[n]&&(a[n]=t[n]),t[`${n}Params`]&&(a[`${n}Params`]=t[`${n}Params`]);let o=C.encodeParams(a);r.hash.includes(`?${o}`)?r.hash=r.hash.replace(`?${o}`,""):r.hash.includes(`&${o}`)&&(r.hash=r.hash.replace(`&${o}`,""))}else{let a=new URLSearchParams(r.search.slice(1));a.delete(n),a.delete(`${n}Params`);let o="";Array.from(a.keys()).forEach(l=>{o+=(o===""?"?":"&")+l+"="+a.get(l)}),r.search=o}if(history.state&&history.state.modalHistoryLength>=0&&e){history.state.modalHistoryLength;const a=history.state.pathBeforeHistory;let o=!1;if(window.addEventListener("popstate",l=>{o?(history.replaceState({},"",a),history.pushState({},"",a),history.back()):(history.pushState({},"",a),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 l=history.length-1;o=!0,history.go(-l),window.Luigi.preventLoadingModalData=!0}else{const l=history.state.modalHistoryLength;history.go(-l)}}else history.pushState({},"",r.href)}setFeatureToggle(e){const t=this.luigi.getConfigValue("settings.featureToggles.queryStringParam"),n=this.luigi.featureToggles();t&&typeof e=="string"&&C.setFeatureToggles(t,e,n)}updateModalDataInUrl(e,t,n){let r=C.getHashQueryParamSeparator();const s=C.getQueryParams(this.luigi),a=C.getModalViewParamName(this.luigi);s[a]=e,t&&Object.keys(t).length&&(s[`${a}Params`]=JSON.stringify(t));const o=new URL(location.href);if(this.luigi.getConfigValue("routing.useHashRouting")){const c=location.hash.indexOf(r);c!==-1&&(o.hash=o.hash.slice(0,c)),o.hash=`${o.hash}${r}${C.encodeParams(s)}`}else o.search=`?${C.encodeParams(s)}`;n?history.pushState(window.state,"",o.href):history.replaceState(window.state,"",o.href)}checkInvalidateCache(e,t){if(!e)return;const n=y.get(le);let r=t.split("/");if(e.nodesInPath&&e.nodesInPath.length>0){let s=e.nodesInPath.slice(1),a=!0;for(let o=0;o<s.length;o++){let l=r.length>o?r[o]:void 0,c=s[o];if(l!==c.pathSegment||!a)if(C.isDynamicNode(c)){if(!a||l!==C.getDynamicNodeValue(c,e.pathParams)){n.deleteNodesRecursively(c);break}}else a=!1}}else n.deleteCache()}}class Mi{constructor(e){var t;this.hashRouting=!1,this.navigate=async(n,r,s,a,o)=>{this.navService.handleNavigationRequest(n,r,s,!1,!1,void 0)},this.openAsModal=async(n,r,s)=>{r.keepPrevious||await this.modalService.closeModals();const a=n.replace(/\/\/+/g,"/"),o=await this.navService.getCurrentNode(a),l=r||{};l.title||(l.title=o.label),this.luigi.getConfigValue("routing.showModalPathInUrl")&&this.modalService.getModalStackLength()===0&&this.routingService.appendModalDataToUrl(a,l),this.luigi.getEngine()._ui.openModal(this.luigi,o,l,s)},this.openAsDrawer=async(n,r,s)=>{const a=n.replace(/\/\/+/g,"/"),o=await this.navService.getCurrentNode(a),l=r||{};l.title||(l.title=o.label),this.luigi.getEngine()._ui.openDrawer(this.luigi,o,l,s)},this.runTimeErrorHandler=async n=>{var o,l,c;const{path:r}=C.getCurrentPath((o=this.luigi.getConfig().routing)==null?void 0:o.useHashRouting),s=await this.navService.getCurrentNode(r),a=this.luigi.getConfigValue("navigation.defaults.runTimeErrorHandler");(l=s==null?void 0:s.runTimeErrorHandler)!=null&&l.errorFn&&v.isFunction((c=s==null?void 0:s.runTimeErrorHandler)==null?void 0:c.errorFn)?s.runTimeErrorHandler.errorFn(n,s):a!=null&&a.errorFn&&v.isFunction(a.errorFn)&&a.errorFn(n,s)},this.luigi=e,this.hashRouting=(t=e.getConfig().routing)==null?void 0:t.useHashRouting,this.navService=y.get(ce),this.routingService=y.get(ge),this.modalService=y.get(fe)}}class Fi{constructor(e){this.luigi=e}addSearchParams(e,t=!1){if(!v.isObject(e)){console.log("Params argument must be an object");return}const n=new URL(location.href);this.luigi.getConfigValue("routing.useHashRouting")?n.hash=C.addParamsOnHashRouting(e,n.hash):C.modifySearchParams(e,n.searchParams),this.handleBrowserHistory(t,n),this.luigi.configChanged()}getSearchParams(){const e={},t=["__proto__","constructor","prototype"],n=new URL(location.href);let r;if(this.luigi.getConfigValue("routing.useHashRouting")){const s=n.hash.split("?")[1];r=s?new URLSearchParams(s).entries():[]}else r=n.searchParams.entries();for(const[s,a]of r){if(t.some(o=>s===o)){console.warn(`Blocked because of potentially dangerous query param: ${s}`);continue}e[s]=a}return e}handleBrowserHistory(e,t){const n=this.sanitizeUrl(t.href);if(!n){console.warn("invalid url: "+n);return}e?window.history.pushState({},"",n):window.history.replaceState({},"",n)}sanitizeUrl(e){return new URL(location.href).origin===new URL(e).origin?e:void 0}addNodeParams(e,t){if(!v.isObject(e)){console.log("Params argument must be an object");return}const n=C.getContentViewParamPrefix(this.luigi),r=new URL(location.href);this.luigi.getConfigValue("routing.useHashRouting")?r.hash=C.addParamsOnHashRouting(e,r.hash,n):C.modifySearchParams(e,r.searchParams,n),this.handleBrowserHistory(t,r),this.luigi.getConfigValue("routing.useHashRouting")?window.dispatchEvent(new HashChangeEvent("hashchange")):this.luigi.configChanged()}}var V,Re;class Vi{constructor(e){it(this,V);it(this,Re,"");nt(this,V,e)}async getAvailableThemes(){return await Q(this,V).getConfigValueAsync("settings.theming.themes")}setCurrentTheme(e){nt(this,Re,e),Q(this,V).__cssVars=void 0}async getThemeObject(e){const t=await this.getAvailableThemes();return t==null?void 0:t.find(n=>n.id===e)}getCurrentTheme(){if(!this.isThemingAvailable())return!1;if(Q(this,Re))return Q(this,Re);const e=Q(this,V).getConfigValue("settings.theming");return e.defaultTheme||console.error("[Theming] getCurrentTheme() error. No theme set and no defaultTheme found in configuration",e),e.defaultTheme}isThemingAvailable(){return!!Q(this,V).getConfigValue("settings.theming")}async getCSSVariables(){if(!window.Luigi.__cssVars){const e=Q(this,V).getConfigValue("settings.theming.variables.file");if(e)try{const t=await fetch(e);window.Luigi.__cssVars=(await t.json()).root,Object.keys(window.Luigi.__cssVars).forEach(n=>{const r=getComputedStyle(document.documentElement).getPropertyValue("--"+n);r&&(window.Luigi.__cssVars[n]=r)})}catch(t){v.isFunction(Q(this,V).getConfigValue("settings.theming.variables.errorHandling"))?Q(this,V).getConfigValue("settings.theming.variables.errorHandling")(t):console.error("CSS variables file error: ",t)}else Q(this,V).getConfigValue("settings.theming.variables")==="fiori"&&window.__luigiThemeVars?(window.Luigi.__cssVars={},window.__luigiThemeVars.forEach(t=>{window.Luigi.__cssVars[t]=getComputedStyle(document.documentElement).getPropertyValue("--"+t)})):window.Luigi.__cssVars={}}return window.Luigi.__cssVars}_init(){const e=y.get(Ie);(()=>{const n=Q(this,V).getConfigValue("settings.theming");n&&n.nodeViewURLDecorator&&n.nodeViewURLDecorator.queryStringParameter&&e.add({type:"queryString",uid:"theming",key:n.nodeViewURLDecorator.queryStringParameter.keyName,valueFn:()=>{const r=this.getCurrentTheme(),s=n.nodeViewURLDecorator.queryStringParameter.value;return s?s(r):r}}),n&&n.useFioriScrollbars===!0&&document.body.classList.add("fioriScrollbars")})()}}V=new WeakMap,Re=new WeakMap;class Ke{constructor(){this.unsavedChanges={isDirty:!1,persistUrl:null}}updateDirtyStatus(e,t){var n,r;if(!this.unsavedChanges.dirtySet||!(this.unsavedChanges.dirtySet instanceof Set)){const s=new Set;s.add(t),this.unsavedChanges={dirtySet:s}}this.unsavedChanges.persistUrl=window.location.href,e?(n=this.unsavedChanges.dirtySet)==null||n.add(t):(r=this.unsavedChanges.dirtySet)==null||r.delete(t)}clearDirtyState(e){this.unsavedChanges&&this.unsavedChanges.dirtySet&&(e?this.unsavedChanges.dirtySet.delete(e):this.unsavedChanges.dirtySet.clear())}readDirtyStatus(){return this.unsavedChanges.dirtySet?this.unsavedChanges.dirtySet.size>0:!!this.unsavedChanges.isDirty}}let Pt;const N={luigi:void 0,documentTitle:void 0,init:i=>{console.log("ux init..."),N.luigi=i,N.documentTitle=Be(void 0),Pt=y.get(Ke)},processAlert:(i,e,t)=>{var r;if(!N.luigi)throw new Error("Luigi is not initialized.");const n={openFromClient:e,close:()=>{i.id&&t.notifyAlertClosed(i.id)},link:s=>{var a;if(i.links){const o=i.links[s];if(o&&(o.url&&((a=N.luigi)==null||a.navigation().navigate(o.url)),o.dismissKey&&i.id))return t.notifyAlertClosed(i.id,o.dismissKey),!0}return!1}};(r=N.luigi.getEngine()._connector)==null||r.renderAlert(i,n)},handleConfirmationModalRequest:(i,e)=>{var t;if(!N.luigi)throw new Error("Luigi is not initialized.");i&&(i={...i,header:N.luigi.i18n().getTranslation(i.header||"luigi.confirmationModal.header"),body:N.luigi.i18n().getTranslation(i.body||"luigi.confirmationModal.body"),buttonDismiss:N.luigi.i18n().getTranslation(i.buttonDismiss||"luigi.button.dismiss"),buttonConfirm:N.luigi.i18n().getTranslation(i.buttonConfirm||"luigi.button.confirm")}),(t=N.luigi.getEngine()._connector)==null||t.renderConfirmationModal(i,{confirm(){e.notifyConfirmationModalClosed(!0)},dismiss(){e.notifyConfirmationModalClosed(!1)}})},handleDirtyStatusRequest:(i,e)=>{if(!N.luigi)throw new Error("Luigi is not initialized.");Pt.updateDirtyStatus(i,e)}};class Hi{processUserSettingGroups(e,t){var o;const n=[],r=e==null?void 0:e.userSettingGroups,s=(o=t==null?void 0:t.userSettings)==null?void 0:o.userSettingGroups,a=r||s;if(v.isObject(a)){for(const l in a){const c={};c[l]=a[l],n.push(c)}return n}return n}getUserSettingsIframesInDom(){const e=document.querySelector(".iframeUserSettingsCtn");return e?[...e.children]:[]}hideUserSettingsIframe(){this.getUserSettingsIframesInDom().forEach(e=>{e.style.display="none"})}findActiveCustomUserSettingsIframe(e){const t=document.querySelectorAll("[userSettingsGroup]");for(let n=0;n<t.length;n++)if(t[n].contentWindow===e)return t[n];return null}}const Qi=new Hi;class Wi{constructor(e){this.dirtyStatusService=y.get(Ke),this.appLoadingIndicatorSelector="[luigi-app-loading-indicator]",this.showAlert=t=>new Promise(n=>{var s;t.id||(t.id=v.getRandomId().toString());const r={openFromClient:!1,close:()=>{n(!0)},link:a=>{var o;if(t.links){const l=t.links[a];if(l&&(l.url&&((o=this.luigi)==null||o.navigation().navigate(l.url)),l.dismissKey))return n(l.dismissKey),!0}return!1}};(s=this.luigi.getEngine()._connector)==null||s.renderAlert(t,r)}),this.showConfirmationModal=t=>(t&&(t={...t,header:this.luigi.i18n().getTranslation(t.header||"luigi.confirmationModal.header"),body:this.luigi.i18n().getTranslation(t.body||"luigi.confirmationModal.body"),buttonDismiss:this.luigi.i18n().getTranslation(t.buttonDismiss||"luigi.button.dismiss"),buttonConfirm:this.luigi.i18n().getTranslation(t.buttonConfirm||"luigi.button.confirm")}),new Promise((n,r)=>{var s;(s=this.luigi.getEngine()._connector)==null||s.renderConfirmationModal(t,{confirm(){n(!0)},dismiss(){r()}})})),this.processUserSettingGroups=()=>{const t=this.luigi.getConfigValue("userSettings"),n=this.luigi.getConfigValue("settings");return Qi.processUserSettingGroups(t,n)},this.openUserSettings=t=>{var n;(n=this.luigi.getEngine()._connector)==null||n.openUserSettings(t)},this.closeUserSettings=()=>{var t;(t=this.luigi.getEngine()._connector)==null||t.closeUserSettings()},this.setDocumentTitle=t=>{var n,r,s;(r=(n=this.luigi.getEngine()._ux)==null?void 0:n.documentTitle)==null||r.set(t),(s=this.luigi.getEngine()._connector)==null||s.setDocumentTitle(t)},this.getDocumentTitle=()=>{var t;return Ot((t=this.luigi.getEngine()._ux)==null?void 0:t.documentTitle)||window.document.title||""},this.hideAppLoadingIndicator=()=>{const t=document.querySelector(this.appLoadingIndicatorSelector);t&&(t.classList.add("hidden"),setTimeout(()=>{var n;(n=t.parentNode)==null||n.removeChild(t)},500))},this.showLoadingIndicator=t=>{var n;return(n=this.luigi.getEngine()._connector)==null?void 0:n.showLoadingIndicator(t)},this.hideLoadingIndicator=t=>{var n;return(n=this.luigi.getEngine()._connector)==null?void 0:n.hideLoadingIndicator(t)},this.addBackdrop=()=>{var t;return(t=this.luigi.getEngine()._connector)==null?void 0:t.addBackdrop()},this.removeBackdrop=()=>{var t;return(t=this.luigi.getEngine()._connector)==null?void 0:t.removeBackdrop()},this.getDirtyStatus=()=>this.dirtyStatusService.readDirtyStatus(),this.luigi=e}}class Gi{constructor(e){this.engine=e,this.initialized=!1,this.configReadyCallback=function(){},this.USER_SETTINGS_KEY="luigi.preferences.userSettings",this.setConfig=t=>{this.config=t,this.setConfigCallback(this.getConfigReadyCallback()),Te.init().then(()=>{this.engine.init(),this.initialized||(this.initialized=!0,Ci.luigiAfterInit(this))})},this.getConfig=()=>this.config,this.configChanged=(...t)=>{this.getEngine()._ui.update(t)},this.i18n=()=>(this._i18n||(this._i18n=new vi(this)),this._i18n),this.navigation=()=>new Mi(this),this.ux=()=>new Wi(this),this.featureToggles=()=>(this._featureToggles||(this._featureToggles=new wi),this._featureToggles),this.routing=()=>(this._routing||(this._routing=new Fi(this)),this._routing),this.theming=()=>(this._theming||(this._theming=new Vi(this)),this._theming),this.auth=()=>ve,this._store=this.createConfigStore()}getEngine(){return this.engine}getConfigValue(e){return v.getConfigValueFromObject(this.getConfig(),e)}getConfigValueAsync(e,...t){return we.getConfigValueFromObjectAsync(this.getConfig(),e,t)}clearNavigationCache(){y.get(le).deleteCache()}async readUserSettings(){const e=await this.getConfigValueAsync("userSettings"),t=e||await this.getConfigValueAsync("settings.userSettings");if(t&&v.isFunction(t.readUserSettings))return t.readUserSettings();const n=localStorage.getItem(this.USER_SETTINGS_KEY);return n&&JSON.parse(n)}async storeUserSettings(e,t){const n=await this.getConfigValueAsync("userSettings"),r=n||await this.getConfigValueAsync("settings.userSettings");if(r&&v.isFunction(r.storeUserSettings))return r.storeUserSettings(e,t);localStorage.setItem(this.USER_SETTINGS_KEY,JSON.stringify(e)),this.configChanged()}createConfigStore(){const e=Be({}),t={};let n=[];return{subscribe:r=>{n.push(e.subscribe(r))},reset:r=>{e.update(r)},subscribeToScope:(r,s)=>{let a=t[s];a||(a=new Set,t[s]=a),a.add(r)},fire:(r,s)=>{const a=t[r];a&&[...a].forEach(o=>{o(s)})},clear:()=>{n.forEach(r=>{r()}),n=[]}}}getConfigReadyCallback(){return new Promise(e=>{this.i18n()._init(),e()})}setConfigCallback(e){this.configReadyCallback=e}}const ji=!1;var Bi=Array.isArray,qi=Array.from,zi=Object.defineProperty,It=Object.getOwnPropertyDescriptor;const dt=2,Jt=4,Xt=8,Ki=16,Ve=32,Ye=64,Ze=128,Je=256,ne=512,Yt=1024,gt=2048,Zt=4096,et=8192,Ji=16384,Xi=1<<18,Yi=1<<19;function Zi(i){return i===this.v}function en(){throw new Error("effect_update_depth_exceeded")}function tn(i){return{f:0,v:i,reactions:null,equals:Zi,version:0}}var $t,ei;function nn(){if($t===void 0){$t=window;var i=Element.prototype,e=Node.prototype;It(e,"firstChild").get,ei=It(e,"nextSibling").get,i.__click=void 0,i.__className="",i.__attributes=null,i.__styles=null,i.__e=void 0,Text.prototype.__t=void 0}}function rn(i=""){return document.createTextNode(i)}function sn(i){return ei.call(i)}function ti(i){var e=i.children;if(e!==null){i.children=null;for(var t=0;t<e.length;t+=1){var n=e[t];(n.f&dt)!==0?ii(n):He(n)}}}function an(i){var e,t=ie;Le(i.parent);try{ti(i),e=li(i)}finally{Le(t)}return e}function on(i){var e=an(i),t=(Ce||(i.f&Ze)!==0)&&i.deps!==null?gt:ne;Ne(i,t),i.equals(e)||(i.v=e,i.version=gn())}function ii(i){ti(i),Fe(i,0),Ne(i,et),i.v=i.children=i.deps=i.ctx=i.reactions=null}function ln(i,e){var t=e.last;t===null?e.last=e.first=i:(t.next=i,i.prev=t,e.last=i)}function ft(i,e,t,n=!0){var r=(i&Ye)!==0,s=ie,a={ctx:ee,deps:null,deriveds:null,nodes_start:null,nodes_end:null,f:i|Yt,first:null,fn:e,last:null,next:null,parent:r?null:s,prev:null,teardown:null,transitions:null,version:0};if(t){var o=be;try{Lt(!0),mt(a),a.f|=Ji}catch(f){throw He(a),f}finally{Lt(o)}}else e!==null&&vn(a);var l=t&&a.deps===null&&a.first===null&&a.nodes_start===null&&a.teardown===null&&(a.f&Yi)===0;if(!l&&!r&&n&&(s!==null&&ln(a,s),Z!==null&&(Z.f&dt)!==0)){var c=Z;(c.children??(c.children=[])).push(a)}return a}function cn(i){const e=ft(Ye,i,!0);return()=>{He(e)}}function un(i){return ft(Jt,i,!1)}function hn(i,e=!0){return ft(Xt|Ve,i,!0,e)}function ni(i){var e=i.teardown;if(e!==null){const t=Z;$e(null);try{e.call(null)}finally{$e(t)}}}function ri(i){var e=i.deriveds;if(e!==null){i.deriveds=null;for(var t=0;t<e.length;t+=1)ii(e[t])}}function si(i,e=!1){var t=i.first;for(i.first=i.last=null;t!==null;){var n=t.next;He(t,e),t=n}}function dn(i){for(var e=i.first;e!==null;){var t=e.next;(e.f&Ve)===0&&He(e),e=t}}function He(i,e=!0){var t=!1;if((e||(i.f&Xi)!==0)&&i.nodes_start!==null){for(var n=i.nodes_start,r=i.nodes_end;n!==null;){var s=n===r?null:sn(n);n.remove(),n=s}t=!0}ri(i),si(i,e&&!t),Fe(i,0),Ne(i,et);var a=i.transitions;if(a!==null)for(const l of a)l.stop();ni(i);var o=i.parent;o!==null&&o.first!==null&&ai(i),i.next=i.prev=i.teardown=i.ctx=i.deps=i.parent=i.fn=i.nodes_start=i.nodes_end=null}function ai(i){var e=i.parent,t=i.prev,n=i.next;t!==null&&(t.next=n),n!==null&&(n.prev=t),e!==null&&(e.first===i&&(e.first=n),e.last===i&&(e.last=t))}let Xe=!1,be=!1;function Lt(i){be=i}let ct=[],xe=0;let Z=null;function $e(i){Z=i}let ie=null;function Le(i){ie=i}let X=null,B=0,oi=0,Ce=!1,ee=null;function gn(){return++oi}function pt(i){var a,o;var e=i.f;if((e&Yt)!==0)return!0;if((e>)!==0){var t=i.deps,n=(e&Ze)!==0;if(t!==null){var r;if((e&Je)!==0){for(r=0;r<t.length;r++)((a=t[r]).reactions??(a.reactions=[])).push(i);i.f^=Je}for(r=0;r<t.length;r++){var s=t[r];if(pt(s)&&on(s),n&&ie!==null&&!Ce&&!((o=s==null?void 0:s.reactions)!=null&&o.includes(i))&&(s.reactions??(s.reactions=[])).push(i),s.version>i.version)return!0}}n||Ne(i,ne)}return!1}function fn(i,e,t){throw i}function li(i){var f;var e=X,t=B,n=Z,r=Ce,s=ee,a=i.f;X=null,B=0,Z=(a&(Ve|Ye))===0?i:null,Ce=!be&&(a&Ze)!==0,ee=i.ctx;try{var o=(0,i.fn)(),l=i.deps;if(X!==null){var c;if(Fe(i,B),l!==null&&B>0)for(l.length=B+X.length,c=0;c<X.length;c++)l[B+c]=X[c];else i.deps=l=X;if(!Ce)for(c=B;c<l.length;c++)((f=l[c]).reactions??(f.reactions=[])).push(i)}else l!==null&&B<l.length&&(Fe(i,B),l.length=B);return o}finally{X=e,B=t,Z=n,Ce=r,ee=s}}function pn(i,e){let t=e.reactions;if(t!==null){var n=t.indexOf(i);if(n!==-1){var r=t.length-1;r===0?t=e.reactions=null:(t[n]=t[r],t.pop())}}t===null&&(e.f&dt)!==0&&(X===null||!X.includes(e))&&(Ne(e,gt),(e.f&(Ze|Je))===0&&(e.f^=Je),Fe(e,0))}function Fe(i,e){var t=i.deps;if(t!==null)for(var n=e;n<t.length;n++)pn(i,t[n])}function mt(i){var e=i.f;if((e&et)===0){Ne(i,ne);var t=ie;ie=i;try{ri(i),(e&Ki)!==0?dn(i):si(i),ni(i);var n=li(i);i.teardown=typeof n=="function"?n:null,i.version=oi}catch(r){fn(r)}finally{ie=t}}}function mn(){xe>1e3&&(xe=0,en()),xe++}function Sn(i){var e=i.length;if(e!==0){mn();var t=be;be=!0;try{for(var n=0;n<e;n++){var r=i[n];(r.f&ne)===0&&(r.f^=ne);var s=[];ci(r,s),_n(s)}}finally{be=t}}}function _n(i){var e=i.length;if(e!==0)for(var t=0;t<e;t++){var n=i[t];(n.f&(et|Zt))===0&&pt(n)&&(mt(n),n.deps===null&&n.first===null&&n.nodes_start===null&&(n.teardown===null?ai(n):n.fn=null))}}function En(){if(Xe=!1,xe>1001)return;const i=ct;ct=[],Sn(i),Xe||(xe=0)}function vn(i){Xe||(Xe=!0,queueMicrotask(En));for(var e=i;e.parent!==null;){e=e.parent;var t=e.f;if((t&(Ye|Ve))!==0){if((t&ne)===0)return;e.f^=ne}}ct.push(e)}function ci(i,e){var t=i.first,n=[];e:for(;t!==null;){var r=t.f,s=(r&Ve)!==0,a=s&&(r&ne)!==0;if(!a&&(r&Zt)===0)if((r&Xt)!==0){s?t.f^=ne:pt(t)&&mt(t);var o=t.first;if(o!==null){t=o;continue}}else(r&Jt)!==0&&n.push(t);var l=t.next;if(l===null){let h=t.parent;for(;h!==null;){if(i===h)break e;var c=h.next;if(c!==null){t=c;continue e}h=h.parent}}t=l}for(var f=0;f<n.length;f++)o=n[f],e.push(o),ci(o,e)}const Cn=-3585;function Ne(i,e){i.f=i.f&Cn|e}function wn(i,e=!1,t){ee={p:ee,c:null,e:null,m:!1,s:i,x:null,l:null},e||(ee.l={s:null,u:null,r1:[],r2:tn(!1)})}function Tn(i){const e=ee;if(e!==null){const a=e.e;if(a!==null){var t=ie,n=Z;e.e=null;try{for(var r=0;r<a.length;r++){var s=a[r];Le(s.effect),$e(s.reaction),un(s.fn)}}finally{Le(t),$e(n)}}ee=e.p,e.m=!0}return{}}const yn=new Set,Nt=new Set;function Ge(i){var L;var e=this,t=e.ownerDocument,n=i.type,r=((L=i.composedPath)==null?void 0:L.call(i))||[],s=r[0]||i.target,a=0,o=i.__root;if(o){var l=r.indexOf(o);if(l!==-1&&(e===document||e===window)){i.__root=e;return}var c=r.indexOf(e);if(c===-1)return;l<=c&&(a=l)}if(s=r[a]||i.target,s!==e){zi(i,"currentTarget",{configurable:!0,get(){return s||t}});var f=Z,h=ie;$e(null),Le(null);try{for(var u,d=[];s!==null;){var S=s.assignedSlot||s.parentNode||s.host||null;try{var _=s["__"+n];if(_!==void 0&&!s.disabled)if(Bi(_)){var[E,...R]=_;E.apply(s,[i,...R])}else _.call(s,i)}catch(U){u?d.push(U):u=U}if(i.cancelBubble||S===e||S===null)break;s=S}if(u){for(let U of d)queueMicrotask(()=>{throw U});throw u}}finally{i.__root=e,delete i.currentTarget,$e(f),Le(h)}}}const bn=["touchstart","touchmove"];function Rn(i){return bn.includes(i)}function An(i,e){return Pn(i,e)}const Se=new Map;function Pn(i,{target:e,anchor:t,props:n={},events:r,context:s,intro:a=!0}){nn();var o=new Set,l=h=>{for(var u=0;u<h.length;u++){var d=h[u];if(!o.has(d)){o.add(d);var S=Rn(d);e.addEventListener(d,Ge,{passive:S});var _=Se.get(d);_===void 0?(document.addEventListener(d,Ge,{passive:S}),Se.set(d,1)):Se.set(d,_+1)}}};l(qi(yn)),Nt.add(l);var c=void 0,f=cn(()=>{var h=t??e.appendChild(rn());return hn(()=>{if(s){wn({});var u=ee;u.c=s}r&&(n.$$events=r),c=i(h,n)||{},s&&Tn()}),()=>{var S;for(var u of o){e.removeEventListener(u,Ge);var d=Se.get(u);--d===0?(document.removeEventListener(u,Ge),Se.delete(u)):Se.set(u,d)}Nt.delete(l),Ut.delete(c),h!==t&&((S=h.parentNode)==null||S.removeChild(h))}});return Ut.set(c,f),c}let Ut=new WeakMap;const In="5";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(In);function $n(i){}const ut={init:i=>{y.get(ge).enableRouting()},handlePageErrorHandler:(i,e,t)=>{i&&i.timeout&&setTimeout(()=>{if(i.viewUrl)e.viewUrl=i.viewUrl,t.getEngine()._ui.updateMainContent(e,t);else if(i.errorFn)i.errorFn(e);else{console.warn("Something went wrong with a client! You will be redirected to another page.");const n=i.redirectPath||"/";t.navigation().navigate(n)}},i.timeout)},handleExternalLinkNavigation:i=>{if(i.url)if(i.sameWindow||!1)window.location.href=i.url;else{const t=window.open(i.url,"_blank","noopener noreferrer");t&&(t.opener=null,t.focus())}},async addSearchParamsFromClient(i,e,t){var o;const n=y.get(ce),r=C.getCurrentPath(),s=await n.getCurrentNode(r.path),a={...i};if((o=s==null?void 0:s.clientPermissions)!=null&&o.urlParameters){const l={};Object.keys(s.clientPermissions.urlParameters).forEach(c=>{c in a&&s.clientPermissions.urlParameters[c].write===!0&&(l[c]=a[c],delete a[c])});for(const c in a)console.warn(`No permission to add the search param "${c}" to the url`);Object.keys(l).length>0&&t.routing().addSearchParams(l,e)}}},Y={luigi:{},init:i=>{console.log("Init communication..."),Y.luigi=i},addListeners:(i,e)=>{i.addEventListener(p.INITIALIZED,t=>{var n;(n=N.luigi)==null||n.ux().hideLoadingIndicator(i.parentNode)}),i.addEventListener(p.NAVIGATION_REQUEST,t=>{const{link:n,preserveView:r,modal:s,newTab:a,withoutSync:o}=t.detail;y.get(ce).handleNavigationRequest(n,r,s,a,o,t.callbackFn)}),i.addEventListener(p.RUNTIME_ERROR_HANDLING_REQUEST,t=>{var n,r;e.navigation().runTimeErrorHandler(((r=(n=t.payload)==null?void 0:n.data)==null?void 0:r.errorObj)||{})}),i.addEventListener(p.ALERT_REQUEST,t=>{N.processAlert(t.payload,!0,i)}),i.addEventListener(p.SHOW_CONFIRMATION_MODAL_REQUEST,t=>{N.handleConfirmationModalRequest(t.payload,i)}),i.addEventListener(p.SET_DOCUMENT_TITLE_REQUEST,t=>{var n;(n=Y.luigi.getEngine()._connector)==null||n.setDocumentTitle(t.detail.title)}),i.addEventListener(p.SHOW_LOADING_INDICATOR_REQUEST,t=>{var n;(n=Y.luigi.getEngine()._connector)==null||n.showLoadingIndicator(i.parentNode)}),i.addEventListener(p.HIDE_LOADING_INDICATOR_REQUEST,t=>{var n;(n=Y.luigi.getEngine()._connector)==null||n.hideLoadingIndicator(i.parentNode)}),i.addEventListener(p.ADD_BACKDROP_REQUEST,t=>{var n;(n=Y.luigi.getEngine()._connector)==null||n.addBackdrop()}),i.addEventListener(p.REMOVE_BACKDROP_REQUEST,t=>{var n;(n=Y.luigi.getEngine()._connector)==null||n.removeBackdrop()}),i.addEventListener(p.SET_DIRTY_STATUS_REQUEST,t=>{var n,r,s;N.handleDirtyStatusRequest((r=(n=t.detail)==null?void 0:n.data)==null?void 0:r.dirty,(s=t.detail)==null?void 0:s.source)}),i.addEventListener(p.ADD_NODE_PARAMS_REQUEST,t=>{e.routing().addNodeParams(t.payload.data,t.payload.keepBrowserHistory)}),i.addEventListener(p.OPEN_USER_SETTINGS_REQUEST,t=>{var n;(n=Y.luigi.getEngine()._connector)==null||n.openUserSettings(t.detail)}),i.addEventListener(p.CLOSE_USER_SETTINGS_REQUEST,t=>{var n;(n=Y.luigi.getEngine()._connector)==null||n.closeUserSettings()}),i.addEventListener(p.ADD_SEARCH_PARAMS_REQUEST,t=>{ut.addSearchParamsFromClient(t.detail.data,t.detail.keepBrowserHistory,e)}),i.addEventListener(p.UPDATE_MODAL_SETTINGS_REQUEST,t=>{x.updateModalSettings(t.payload.updatedModalSettings,t.payload.addHistoryEntry,e)}),i.addEventListener(p.SET_CURRENT_LOCALE_REQUEST,t=>{var n,r,s;e.i18n().setCurrentLocale((s=(r=(n=t.detail)==null?void 0:n.data)==null?void 0:r.data)==null?void 0:s.currentLocale,i)})}};class Ln{constructor(){this._ui=x,this._comm=Y,this._ux=N,this._routing=ut}bootstrap(e){this._app=An($n,{target:document.body}),this._connector=e}init(){const e=window.Luigi;y.register(Ke,()=>new Ke),y.register(ce,()=>new ce(e)),y.register(le,()=>new le),y.register(ge,()=>new ge(e)),y.register(Ie,()=>new Ie),y.register(fe,()=>new fe(e)),e.theming()._init(),x.init(e),ut.init(e),Y.init(e),N.init(e)}}window.Luigi=new Gi(new Ln);
|
|
60
34
|
//# sourceMappingURL=luigi.js.map
|