@luigi-project/core-modular 0.0.3 → 0.0.4
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/navigation.d.ts +26 -1
- package/luigi-engine.d.ts +6 -6
- package/luigi.js +33 -12
- package/luigi.js.map +1 -1
- package/modules/routing-module.d.ts +1 -1
- package/modules/ui-module.d.ts +3 -2
- package/package.json +1 -1
- package/services/modal.service.d.ts +1 -1
- package/services/navigation.service.d.ts +45 -176
- package/services/node-data-management.service.d.ts +1 -1
- package/services/routing.service.d.ts +4 -2
- package/types/connector.d.ts +1 -1
- package/types/navigation.d.ts +201 -0
- package/utilities/helpers/generic-helpers.d.ts +38 -0
- package/utilities/helpers/navigation-helpers.d.ts +7 -1
- package/utilities/helpers/routing-helpers.d.ts +37 -1
package/luigi.js
CHANGED
|
@@ -1,27 +1,48 @@
|
|
|
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.
|
|
1
|
+
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 jl(i){return i.$value}function rs(i){return new Im(i)}var Yi=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Br={exports:{}};var xm=Br.exports,Nl;function Lm(){return Nl||(Nl=1,(function(i,n){(function(){var r,a="4.17.23",u=200,l="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",c="Expected a function",d="Invalid `variable` option passed into `_.template`",p="__lodash_hash_undefined__",m=500,y="__lodash_placeholder__",R=1,C=2,T=4,L=1,D=2,F=1,te=2,ve=4,ce=8,Je=16,Ee=32,je=64,be=128,Ge=256,Le=512,Ce=30,Te="...",$=800,Zt=16,ut=1,Fe=2,En=3,I=1/0,et=9007199254740991,he=17976931348623157e292,ye=NaN,Qe=4294967295,Wc=Qe-1,Hc=Qe>>>1,Vc=[["ary",be],["bind",F],["bindKey",te],["curry",ce],["curryRight",Je],["flip",Le],["partial",Ee],["partialRight",je],["rearg",Ge]],Hn="[object Arguments]",ri="[object Array]",Bc="[object AsyncFunction]",Er="[object Boolean]",Cr="[object Date]",Gc="[object DOMException]",ii="[object Error]",si="[object Function]",eo="[object GeneratorFunction]",Ct="[object Map]",Tr="[object Number]",Qc="[object Null]",Wt="[object Object]",to="[object Promise]",qc="[object Proxy]",yr="[object RegExp]",Tt="[object Set]",Ar="[object String]",ai="[object Symbol]",zc="[object Undefined]",Rr="[object WeakMap]",Kc="[object WeakSet]",br="[object ArrayBuffer]",Vn="[object DataView]",hs="[object Float32Array]",gs="[object Float64Array]",ds="[object Int8Array]",ps="[object Int16Array]",_s="[object Int32Array]",vs="[object Uint8Array]",ms="[object Uint8ClampedArray]",Ss="[object Uint16Array]",ws="[object Uint32Array]",Yc=/\b__p \+= '';/g,Xc=/\b(__p \+=) '' \+/g,Zc=/(__e\(.*?\)|\b__t\)) \+\n'';/g,no=/&(?:amp|lt|gt|quot|#39);/g,ro=/[&<>"']/g,Jc=RegExp(no.source),jc=RegExp(ro.source),ef=/<%-([\s\S]+?)%>/g,tf=/<%([\s\S]+?)%>/g,io=/<%=([\s\S]+?)%>/g,nf=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,rf=/^\w*$/,sf=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Es=/[\\^$.*+?()[\]{}|]/g,af=RegExp(Es.source),Cs=/^\s+/,of=/\s/,uf=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,lf=/\{\n\/\* \[wrapped with (.+)\] \*/,cf=/,? & /,ff=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,hf=/[()=,{}\[\]\/\s]/,gf=/\\(\\)?/g,df=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,so=/\w*$/,pf=/^[-+]0x[0-9a-f]+$/i,_f=/^0b[01]+$/i,vf=/^\[object .+?Constructor\]$/,mf=/^0o[0-7]+$/i,Sf=/^(?:0|[1-9]\d*)$/,wf=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,oi=/($^)/,Ef=/['\n\r\u2028\u2029\\]/g,ui="\\ud800-\\udfff",Cf="\\u0300-\\u036f",Tf="\\ufe20-\\ufe2f",yf="\\u20d0-\\u20ff",ao=Cf+Tf+yf,oo="\\u2700-\\u27bf",uo="a-z\\xdf-\\xf6\\xf8-\\xff",Af="\\xac\\xb1\\xd7\\xf7",Rf="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",bf="\\u2000-\\u206f",Pf=" \\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",lo="A-Z\\xc0-\\xd6\\xd8-\\xde",co="\\ufe0e\\ufe0f",fo=Af+Rf+bf+Pf,Ts="['’]",If="["+ui+"]",ho="["+fo+"]",li="["+ao+"]",go="\\d+",xf="["+oo+"]",po="["+uo+"]",_o="[^"+ui+fo+go+oo+uo+lo+"]",ys="\\ud83c[\\udffb-\\udfff]",Lf="(?:"+li+"|"+ys+")",vo="[^"+ui+"]",As="(?:\\ud83c[\\udde6-\\uddff]){2}",Rs="[\\ud800-\\udbff][\\udc00-\\udfff]",Bn="["+lo+"]",mo="\\u200d",So="(?:"+po+"|"+_o+")",Nf="(?:"+Bn+"|"+_o+")",wo="(?:"+Ts+"(?:d|ll|m|re|s|t|ve))?",Eo="(?:"+Ts+"(?:D|LL|M|RE|S|T|VE))?",Co=Lf+"?",To="["+co+"]?",$f="(?:"+mo+"(?:"+[vo,As,Rs].join("|")+")"+To+Co+")*",Of="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Uf="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",yo=To+Co+$f,Df="(?:"+[xf,As,Rs].join("|")+")"+yo,Mf="(?:"+[vo+li+"?",li,As,Rs,If].join("|")+")",Ff=RegExp(Ts,"g"),kf=RegExp(li,"g"),bs=RegExp(ys+"(?="+ys+")|"+Mf+yo,"g"),Wf=RegExp([Bn+"?"+po+"+"+wo+"(?="+[ho,Bn,"$"].join("|")+")",Nf+"+"+Eo+"(?="+[ho,Bn+So,"$"].join("|")+")",Bn+"?"+So+"+"+wo,Bn+"+"+Eo,Uf,Of,go,Df].join("|"),"g"),Hf=RegExp("["+mo+ui+ao+co+"]"),Vf=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Bf=["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"],Gf=-1,ue={};ue[hs]=ue[gs]=ue[ds]=ue[ps]=ue[_s]=ue[vs]=ue[ms]=ue[Ss]=ue[ws]=!0,ue[Hn]=ue[ri]=ue[br]=ue[Er]=ue[Vn]=ue[Cr]=ue[ii]=ue[si]=ue[Ct]=ue[Tr]=ue[Wt]=ue[yr]=ue[Tt]=ue[Ar]=ue[Rr]=!1;var oe={};oe[Hn]=oe[ri]=oe[br]=oe[Vn]=oe[Er]=oe[Cr]=oe[hs]=oe[gs]=oe[ds]=oe[ps]=oe[_s]=oe[Ct]=oe[Tr]=oe[Wt]=oe[yr]=oe[Tt]=oe[Ar]=oe[ai]=oe[vs]=oe[ms]=oe[Ss]=oe[ws]=!0,oe[ii]=oe[si]=oe[Rr]=!1;var Qf={À:"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"},qf={"&":"&","<":"<",">":">",'"':""","'":"'"},zf={"&":"&","<":"<",">":">",""":'"',"'":"'"},Kf={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Yf=parseFloat,Xf=parseInt,Ao=typeof Yi=="object"&&Yi&&Yi.Object===Object&&Yi,Zf=typeof self=="object"&&self&&self.Object===Object&&self,Pe=Ao||Zf||Function("return this")(),Ps=n&&!n.nodeType&&n,Cn=Ps&&!0&&i&&!i.nodeType&&i,Ro=Cn&&Cn.exports===Ps,Is=Ro&&Ao.process,lt=(function(){try{var S=Cn&&Cn.require&&Cn.require("util").types;return S||Is&&Is.binding&&Is.binding("util")}catch{}})(),bo=lt&<.isArrayBuffer,Po=lt&<.isDate,Io=lt&<.isMap,xo=lt&<.isRegExp,Lo=lt&<.isSet,No=lt&<.isTypedArray;function tt(S,A,E){switch(E.length){case 0:return S.call(A);case 1:return S.call(A,E[0]);case 2:return S.call(A,E[0],E[1]);case 3:return S.call(A,E[0],E[1],E[2])}return S.apply(A,E)}function Jf(S,A,E,U){for(var G=-1,ne=S==null?0:S.length;++G<ne;){var Se=S[G];A(U,Se,E(Se),S)}return U}function ct(S,A){for(var E=-1,U=S==null?0:S.length;++E<U&&A(S[E],E,S)!==!1;);return S}function jf(S,A){for(var E=S==null?0:S.length;E--&&A(S[E],E,S)!==!1;);return S}function $o(S,A){for(var E=-1,U=S==null?0:S.length;++E<U;)if(!A(S[E],E,S))return!1;return!0}function Jt(S,A){for(var E=-1,U=S==null?0:S.length,G=0,ne=[];++E<U;){var Se=S[E];A(Se,E,S)&&(ne[G++]=Se)}return ne}function ci(S,A){var E=S==null?0:S.length;return!!E&&Gn(S,A,0)>-1}function xs(S,A,E){for(var U=-1,G=S==null?0:S.length;++U<G;)if(E(A,S[U]))return!0;return!1}function le(S,A){for(var E=-1,U=S==null?0:S.length,G=Array(U);++E<U;)G[E]=A(S[E],E,S);return G}function jt(S,A){for(var E=-1,U=A.length,G=S.length;++E<U;)S[G+E]=A[E];return S}function Ls(S,A,E,U){var G=-1,ne=S==null?0:S.length;for(U&&ne&&(E=S[++G]);++G<ne;)E=A(E,S[G],G,S);return E}function eh(S,A,E,U){var G=S==null?0:S.length;for(U&&G&&(E=S[--G]);G--;)E=A(E,S[G],G,S);return E}function Ns(S,A){for(var E=-1,U=S==null?0:S.length;++E<U;)if(A(S[E],E,S))return!0;return!1}var th=$s("length");function nh(S){return S.split("")}function rh(S){return S.match(ff)||[]}function Oo(S,A,E){var U;return E(S,function(G,ne,Se){if(A(G,ne,Se))return U=ne,!1}),U}function fi(S,A,E,U){for(var G=S.length,ne=E+(U?1:-1);U?ne--:++ne<G;)if(A(S[ne],ne,S))return ne;return-1}function Gn(S,A,E){return A===A?ph(S,A,E):fi(S,Uo,E)}function ih(S,A,E,U){for(var G=E-1,ne=S.length;++G<ne;)if(U(S[G],A))return G;return-1}function Uo(S){return S!==S}function Do(S,A){var E=S==null?0:S.length;return E?Us(S,A)/E:ye}function $s(S){return function(A){return A==null?r:A[S]}}function Os(S){return function(A){return S==null?r:S[A]}}function Mo(S,A,E,U,G){return G(S,function(ne,Se,se){E=U?(U=!1,ne):A(E,ne,Se,se)}),E}function sh(S,A){var E=S.length;for(S.sort(A);E--;)S[E]=S[E].value;return S}function Us(S,A){for(var E,U=-1,G=S.length;++U<G;){var ne=A(S[U]);ne!==r&&(E=E===r?ne:E+ne)}return E}function Ds(S,A){for(var E=-1,U=Array(S);++E<S;)U[E]=A(E);return U}function ah(S,A){return le(A,function(E){return[E,S[E]]})}function Fo(S){return S&&S.slice(0,Vo(S)+1).replace(Cs,"")}function nt(S){return function(A){return S(A)}}function Ms(S,A){return le(A,function(E){return S[E]})}function Pr(S,A){return S.has(A)}function ko(S,A){for(var E=-1,U=S.length;++E<U&&Gn(A,S[E],0)>-1;);return E}function Wo(S,A){for(var E=S.length;E--&&Gn(A,S[E],0)>-1;);return E}function oh(S,A){for(var E=S.length,U=0;E--;)S[E]===A&&++U;return U}var uh=Os(Qf),lh=Os(qf);function ch(S){return"\\"+Kf[S]}function fh(S,A){return S==null?r:S[A]}function Qn(S){return Hf.test(S)}function hh(S){return Vf.test(S)}function gh(S){for(var A,E=[];!(A=S.next()).done;)E.push(A.value);return E}function Fs(S){var A=-1,E=Array(S.size);return S.forEach(function(U,G){E[++A]=[G,U]}),E}function Ho(S,A){return function(E){return S(A(E))}}function en(S,A){for(var E=-1,U=S.length,G=0,ne=[];++E<U;){var Se=S[E];(Se===A||Se===y)&&(S[E]=y,ne[G++]=E)}return ne}function hi(S){var A=-1,E=Array(S.size);return S.forEach(function(U){E[++A]=U}),E}function dh(S){var A=-1,E=Array(S.size);return S.forEach(function(U){E[++A]=[U,U]}),E}function ph(S,A,E){for(var U=E-1,G=S.length;++U<G;)if(S[U]===A)return U;return-1}function _h(S,A,E){for(var U=E+1;U--;)if(S[U]===A)return U;return U}function qn(S){return Qn(S)?mh(S):th(S)}function yt(S){return Qn(S)?Sh(S):nh(S)}function Vo(S){for(var A=S.length;A--&&of.test(S.charAt(A)););return A}var vh=Os(zf);function mh(S){for(var A=bs.lastIndex=0;bs.test(S);)++A;return A}function Sh(S){return S.match(bs)||[]}function wh(S){return S.match(Wf)||[]}var Eh=(function S(A){A=A==null?Pe:zn.defaults(Pe.Object(),A,zn.pick(Pe,Bf));var E=A.Array,U=A.Date,G=A.Error,ne=A.Function,Se=A.Math,se=A.Object,ks=A.RegExp,Ch=A.String,ft=A.TypeError,gi=E.prototype,Th=ne.prototype,Kn=se.prototype,di=A["__core-js_shared__"],pi=Th.toString,re=Kn.hasOwnProperty,yh=0,Bo=(function(){var e=/[^.]+$/.exec(di&&di.keys&&di.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})(),_i=Kn.toString,Ah=pi.call(se),Rh=Pe._,bh=ks("^"+pi.call(re).replace(Es,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),vi=Ro?A.Buffer:r,tn=A.Symbol,mi=A.Uint8Array,Go=vi?vi.allocUnsafe:r,Si=Ho(se.getPrototypeOf,se),Qo=se.create,qo=Kn.propertyIsEnumerable,wi=gi.splice,zo=tn?tn.isConcatSpreadable:r,Ir=tn?tn.iterator:r,Tn=tn?tn.toStringTag:r,Ei=(function(){try{var e=Pn(se,"defineProperty");return e({},"",{}),e}catch{}})(),Ph=A.clearTimeout!==Pe.clearTimeout&&A.clearTimeout,Ih=U&&U.now!==Pe.Date.now&&U.now,xh=A.setTimeout!==Pe.setTimeout&&A.setTimeout,Ci=Se.ceil,Ti=Se.floor,Ws=se.getOwnPropertySymbols,Lh=vi?vi.isBuffer:r,Ko=A.isFinite,Nh=gi.join,$h=Ho(se.keys,se),we=Se.max,Ne=Se.min,Oh=U.now,Uh=A.parseInt,Yo=Se.random,Dh=gi.reverse,Hs=Pn(A,"DataView"),xr=Pn(A,"Map"),Vs=Pn(A,"Promise"),Yn=Pn(A,"Set"),Lr=Pn(A,"WeakMap"),Nr=Pn(se,"create"),yi=Lr&&new Lr,Xn={},Mh=In(Hs),Fh=In(xr),kh=In(Vs),Wh=In(Yn),Hh=In(Lr),Ai=tn?tn.prototype:r,$r=Ai?Ai.valueOf:r,Xo=Ai?Ai.toString:r;function h(e){if(ge(e)&&!q(e)&&!(e instanceof J)){if(e instanceof ht)return e;if(re.call(e,"__wrapped__"))return Zu(e)}return new ht(e)}var Zn=(function(){function e(){}return function(t){if(!fe(t))return{};if(Qo)return Qo(t);e.prototype=t;var s=new e;return e.prototype=r,s}})();function Ri(){}function ht(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=r}h.templateSettings={escape:ef,evaluate:tf,interpolate:io,variable:"",imports:{_:h}},h.prototype=Ri.prototype,h.prototype.constructor=h,ht.prototype=Zn(Ri.prototype),ht.prototype.constructor=ht;function J(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Qe,this.__views__=[]}function Vh(){var e=new J(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 Bh(){if(this.__filtered__){var e=new J(this);e.__dir__=-1,e.__filtered__=!0}else e=this.clone(),e.__dir__*=-1;return e}function Gh(){var e=this.__wrapped__.value(),t=this.__dir__,s=q(e),o=t<0,f=s?e.length:0,g=nd(0,f,this.__views__),_=g.start,v=g.end,w=v-_,b=o?v:_-1,P=this.__iteratees__,x=P.length,O=0,M=Ne(w,this.__takeCount__);if(!s||!o&&f==w&&M==w)return wu(e,this.__actions__);var V=[];e:for(;w--&&O<M;){b+=t;for(var K=-1,B=e[b];++K<x;){var X=P[K],j=X.iteratee,st=X.type,He=j(B);if(st==Fe)B=He;else if(!He){if(st==ut)continue e;break e}}V[O++]=B}return V}J.prototype=Zn(Ri.prototype),J.prototype.constructor=J;function yn(e){var t=-1,s=e==null?0:e.length;for(this.clear();++t<s;){var o=e[t];this.set(o[0],o[1])}}function Qh(){this.__data__=Nr?Nr(null):{},this.size=0}function qh(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}function zh(e){var t=this.__data__;if(Nr){var s=t[e];return s===p?r:s}return re.call(t,e)?t[e]:r}function Kh(e){var t=this.__data__;return Nr?t[e]!==r:re.call(t,e)}function Yh(e,t){var s=this.__data__;return this.size+=this.has(e)?0:1,s[e]=Nr&&t===r?p:t,this}yn.prototype.clear=Qh,yn.prototype.delete=qh,yn.prototype.get=zh,yn.prototype.has=Kh,yn.prototype.set=Yh;function Ht(e){var t=-1,s=e==null?0:e.length;for(this.clear();++t<s;){var o=e[t];this.set(o[0],o[1])}}function Xh(){this.__data__=[],this.size=0}function Zh(e){var t=this.__data__,s=bi(t,e);if(s<0)return!1;var o=t.length-1;return s==o?t.pop():wi.call(t,s,1),--this.size,!0}function Jh(e){var t=this.__data__,s=bi(t,e);return s<0?r:t[s][1]}function jh(e){return bi(this.__data__,e)>-1}function eg(e,t){var s=this.__data__,o=bi(s,e);return o<0?(++this.size,s.push([e,t])):s[o][1]=t,this}Ht.prototype.clear=Xh,Ht.prototype.delete=Zh,Ht.prototype.get=Jh,Ht.prototype.has=jh,Ht.prototype.set=eg;function Vt(e){var t=-1,s=e==null?0:e.length;for(this.clear();++t<s;){var o=e[t];this.set(o[0],o[1])}}function tg(){this.size=0,this.__data__={hash:new yn,map:new(xr||Ht),string:new yn}}function ng(e){var t=ki(this,e).delete(e);return this.size-=t?1:0,t}function rg(e){return ki(this,e).get(e)}function ig(e){return ki(this,e).has(e)}function sg(e,t){var s=ki(this,e),o=s.size;return s.set(e,t),this.size+=s.size==o?0:1,this}Vt.prototype.clear=tg,Vt.prototype.delete=ng,Vt.prototype.get=rg,Vt.prototype.has=ig,Vt.prototype.set=sg;function An(e){var t=-1,s=e==null?0:e.length;for(this.__data__=new Vt;++t<s;)this.add(e[t])}function ag(e){return this.__data__.set(e,p),this}function og(e){return this.__data__.has(e)}An.prototype.add=An.prototype.push=ag,An.prototype.has=og;function At(e){var t=this.__data__=new Ht(e);this.size=t.size}function ug(){this.__data__=new Ht,this.size=0}function lg(e){var t=this.__data__,s=t.delete(e);return this.size=t.size,s}function cg(e){return this.__data__.get(e)}function fg(e){return this.__data__.has(e)}function hg(e,t){var s=this.__data__;if(s instanceof Ht){var o=s.__data__;if(!xr||o.length<u-1)return o.push([e,t]),this.size=++s.size,this;s=this.__data__=new Vt(o)}return s.set(e,t),this.size=s.size,this}At.prototype.clear=ug,At.prototype.delete=lg,At.prototype.get=cg,At.prototype.has=fg,At.prototype.set=hg;function Zo(e,t){var s=q(e),o=!s&&xn(e),f=!s&&!o&&on(e),g=!s&&!o&&!f&&tr(e),_=s||o||f||g,v=_?Ds(e.length,Ch):[],w=v.length;for(var b in e)(t||re.call(e,b))&&!(_&&(b=="length"||f&&(b=="offset"||b=="parent")||g&&(b=="buffer"||b=="byteLength"||b=="byteOffset")||qt(b,w)))&&v.push(b);return v}function Jo(e){var t=e.length;return t?e[js(0,t-1)]:r}function gg(e,t){return Wi(qe(e),Rn(t,0,e.length))}function dg(e){return Wi(qe(e))}function Bs(e,t,s){(s!==r&&!Rt(e[t],s)||s===r&&!(t in e))&&Bt(e,t,s)}function Or(e,t,s){var o=e[t];(!(re.call(e,t)&&Rt(o,s))||s===r&&!(t in e))&&Bt(e,t,s)}function bi(e,t){for(var s=e.length;s--;)if(Rt(e[s][0],t))return s;return-1}function pg(e,t,s,o){return nn(e,function(f,g,_){t(o,f,s(f),_)}),o}function jo(e,t){return e&&Ot(t,Ae(t),e)}function _g(e,t){return e&&Ot(t,Ke(t),e)}function Bt(e,t,s){t=="__proto__"&&Ei?Ei(e,t,{configurable:!0,enumerable:!0,value:s,writable:!0}):e[t]=s}function Gs(e,t){for(var s=-1,o=t.length,f=E(o),g=e==null;++s<o;)f[s]=g?r:ya(e,t[s]);return f}function Rn(e,t,s){return e===e&&(s!==r&&(e=e<=s?e:s),t!==r&&(e=e>=t?e:t)),e}function gt(e,t,s,o,f,g){var _,v=t&R,w=t&C,b=t&T;if(s&&(_=f?s(e,o,f,g):s(e)),_!==r)return _;if(!fe(e))return e;var P=q(e);if(P){if(_=id(e),!v)return qe(e,_)}else{var x=$e(e),O=x==si||x==eo;if(on(e))return Tu(e,v);if(x==Wt||x==Hn||O&&!f){if(_=w||O?{}:Vu(e),!v)return w?zg(e,_g(_,e)):qg(e,jo(_,e))}else{if(!oe[x])return f?e:{};_=sd(e,x,v)}}g||(g=new At);var M=g.get(e);if(M)return M;g.set(e,_),vl(e)?e.forEach(function(B){_.add(gt(B,t,s,B,e,g))}):pl(e)&&e.forEach(function(B,X){_.set(X,gt(B,t,s,X,e,g))});var V=b?w?ca:la:w?Ke:Ae,K=P?r:V(e);return ct(K||e,function(B,X){K&&(X=B,B=e[X]),Or(_,X,gt(B,t,s,X,e,g))}),_}function vg(e){var t=Ae(e);return function(s){return eu(s,e,t)}}function eu(e,t,s){var o=s.length;if(e==null)return!o;for(e=se(e);o--;){var f=s[o],g=t[f],_=e[f];if(_===r&&!(f in e)||!g(_))return!1}return!0}function tu(e,t,s){if(typeof e!="function")throw new ft(c);return Hr(function(){e.apply(r,s)},t)}function Ur(e,t,s,o){var f=-1,g=ci,_=!0,v=e.length,w=[],b=t.length;if(!v)return w;s&&(t=le(t,nt(s))),o?(g=xs,_=!1):t.length>=u&&(g=Pr,_=!1,t=new An(t));e:for(;++f<v;){var P=e[f],x=s==null?P:s(P);if(P=o||P!==0?P:0,_&&x===x){for(var O=b;O--;)if(t[O]===x)continue e;w.push(P)}else g(t,x,o)||w.push(P)}return w}var nn=Pu($t),nu=Pu(qs,!0);function mg(e,t){var s=!0;return nn(e,function(o,f,g){return s=!!t(o,f,g),s}),s}function Pi(e,t,s){for(var o=-1,f=e.length;++o<f;){var g=e[o],_=t(g);if(_!=null&&(v===r?_===_&&!it(_):s(_,v)))var v=_,w=g}return w}function Sg(e,t,s,o){var f=e.length;for(s=z(s),s<0&&(s=-s>f?0:f+s),o=o===r||o>f?f:z(o),o<0&&(o+=f),o=s>o?0:Sl(o);s<o;)e[s++]=t;return e}function ru(e,t){var s=[];return nn(e,function(o,f,g){t(o,f,g)&&s.push(o)}),s}function Ie(e,t,s,o,f){var g=-1,_=e.length;for(s||(s=od),f||(f=[]);++g<_;){var v=e[g];t>0&&s(v)?t>1?Ie(v,t-1,s,o,f):jt(f,v):o||(f[f.length]=v)}return f}var Qs=Iu(),iu=Iu(!0);function $t(e,t){return e&&Qs(e,t,Ae)}function qs(e,t){return e&&iu(e,t,Ae)}function Ii(e,t){return Jt(t,function(s){return zt(e[s])})}function bn(e,t){t=sn(t,e);for(var s=0,o=t.length;e!=null&&s<o;)e=e[Ut(t[s++])];return s&&s==o?e:r}function su(e,t,s){var o=t(e);return q(e)?o:jt(o,s(e))}function ke(e){return e==null?e===r?zc:Qc:Tn&&Tn in se(e)?td(e):dd(e)}function zs(e,t){return e>t}function wg(e,t){return e!=null&&re.call(e,t)}function Eg(e,t){return e!=null&&t in se(e)}function Cg(e,t,s){return e>=Ne(t,s)&&e<we(t,s)}function Ks(e,t,s){for(var o=s?xs:ci,f=e[0].length,g=e.length,_=g,v=E(g),w=1/0,b=[];_--;){var P=e[_];_&&t&&(P=le(P,nt(t))),w=Ne(P.length,w),v[_]=!s&&(t||f>=120&&P.length>=120)?new An(_&&P):r}P=e[0];var x=-1,O=v[0];e:for(;++x<f&&b.length<w;){var M=P[x],V=t?t(M):M;if(M=s||M!==0?M:0,!(O?Pr(O,V):o(b,V,s))){for(_=g;--_;){var K=v[_];if(!(K?Pr(K,V):o(e[_],V,s)))continue e}O&&O.push(V),b.push(M)}}return b}function Tg(e,t,s,o){return $t(e,function(f,g,_){t(o,s(f),g,_)}),o}function Dr(e,t,s){t=sn(t,e),e=qu(e,t);var o=e==null?e:e[Ut(pt(t))];return o==null?r:tt(o,e,s)}function au(e){return ge(e)&&ke(e)==Hn}function yg(e){return ge(e)&&ke(e)==br}function Ag(e){return ge(e)&&ke(e)==Cr}function Mr(e,t,s,o,f){return e===t?!0:e==null||t==null||!ge(e)&&!ge(t)?e!==e&&t!==t:Rg(e,t,s,o,Mr,f)}function Rg(e,t,s,o,f,g){var _=q(e),v=q(t),w=_?ri:$e(e),b=v?ri:$e(t);w=w==Hn?Wt:w,b=b==Hn?Wt:b;var P=w==Wt,x=b==Wt,O=w==b;if(O&&on(e)){if(!on(t))return!1;_=!0,P=!1}if(O&&!P)return g||(g=new At),_||tr(e)?ku(e,t,s,o,f,g):jg(e,t,w,s,o,f,g);if(!(s&L)){var M=P&&re.call(e,"__wrapped__"),V=x&&re.call(t,"__wrapped__");if(M||V){var K=M?e.value():e,B=V?t.value():t;return g||(g=new At),f(K,B,s,o,g)}}return O?(g||(g=new At),ed(e,t,s,o,f,g)):!1}function bg(e){return ge(e)&&$e(e)==Ct}function Ys(e,t,s,o){var f=s.length,g=f,_=!o;if(e==null)return!g;for(e=se(e);f--;){var v=s[f];if(_&&v[2]?v[1]!==e[v[0]]:!(v[0]in e))return!1}for(;++f<g;){v=s[f];var w=v[0],b=e[w],P=v[1];if(_&&v[2]){if(b===r&&!(w in e))return!1}else{var x=new At;if(o)var O=o(b,P,w,e,t,x);if(!(O===r?Mr(P,b,L|D,o,x):O))return!1}}return!0}function ou(e){if(!fe(e)||ld(e))return!1;var t=zt(e)?bh:vf;return t.test(In(e))}function Pg(e){return ge(e)&&ke(e)==yr}function Ig(e){return ge(e)&&$e(e)==Tt}function xg(e){return ge(e)&&qi(e.length)&&!!ue[ke(e)]}function uu(e){return typeof e=="function"?e:e==null?Ye:typeof e=="object"?q(e)?fu(e[0],e[1]):cu(e):xl(e)}function Xs(e){if(!Wr(e))return $h(e);var t=[];for(var s in se(e))re.call(e,s)&&s!="constructor"&&t.push(s);return t}function Lg(e){if(!fe(e))return gd(e);var t=Wr(e),s=[];for(var o in e)o=="constructor"&&(t||!re.call(e,o))||s.push(o);return s}function Zs(e,t){return e<t}function lu(e,t){var s=-1,o=ze(e)?E(e.length):[];return nn(e,function(f,g,_){o[++s]=t(f,g,_)}),o}function cu(e){var t=ha(e);return t.length==1&&t[0][2]?Gu(t[0][0],t[0][1]):function(s){return s===e||Ys(s,e,t)}}function fu(e,t){return da(e)&&Bu(t)?Gu(Ut(e),t):function(s){var o=ya(s,e);return o===r&&o===t?Aa(s,e):Mr(t,o,L|D)}}function xi(e,t,s,o,f){e!==t&&Qs(t,function(g,_){if(f||(f=new At),fe(g))Ng(e,t,_,s,xi,o,f);else{var v=o?o(_a(e,_),g,_+"",e,t,f):r;v===r&&(v=g),Bs(e,_,v)}},Ke)}function Ng(e,t,s,o,f,g,_){var v=_a(e,s),w=_a(t,s),b=_.get(w);if(b){Bs(e,s,b);return}var P=g?g(v,w,s+"",e,t,_):r,x=P===r;if(x){var O=q(w),M=!O&&on(w),V=!O&&!M&&tr(w);P=w,O||M||V?q(v)?P=v:de(v)?P=qe(v):M?(x=!1,P=Tu(w,!0)):V?(x=!1,P=yu(w,!0)):P=[]:Vr(w)||xn(w)?(P=v,xn(v)?P=wl(v):(!fe(v)||zt(v))&&(P=Vu(w))):x=!1}x&&(_.set(w,P),f(P,w,o,g,_),_.delete(w)),Bs(e,s,P)}function hu(e,t){var s=e.length;if(s)return t+=t<0?s:0,qt(t,s)?e[t]:r}function gu(e,t,s){t.length?t=le(t,function(g){return q(g)?function(_){return bn(_,g.length===1?g[0]:g)}:g}):t=[Ye];var o=-1;t=le(t,nt(H()));var f=lu(e,function(g,_,v){var w=le(t,function(b){return b(g)});return{criteria:w,index:++o,value:g}});return sh(f,function(g,_){return Qg(g,_,s)})}function $g(e,t){return du(e,t,function(s,o){return Aa(e,o)})}function du(e,t,s){for(var o=-1,f=t.length,g={};++o<f;){var _=t[o],v=bn(e,_);s(v,_)&&Fr(g,sn(_,e),v)}return g}function Og(e){return function(t){return bn(t,e)}}function Js(e,t,s,o){var f=o?ih:Gn,g=-1,_=t.length,v=e;for(e===t&&(t=qe(t)),s&&(v=le(e,nt(s)));++g<_;)for(var w=0,b=t[g],P=s?s(b):b;(w=f(v,P,w,o))>-1;)v!==e&&wi.call(v,w,1),wi.call(e,w,1);return e}function pu(e,t){for(var s=e?t.length:0,o=s-1;s--;){var f=t[s];if(s==o||f!==g){var g=f;qt(f)?wi.call(e,f,1):na(e,f)}}return e}function js(e,t){return e+Ti(Yo()*(t-e+1))}function Ug(e,t,s,o){for(var f=-1,g=we(Ci((t-e)/(s||1)),0),_=E(g);g--;)_[o?g:++f]=e,e+=s;return _}function ea(e,t){var s="";if(!e||t<1||t>et)return s;do t%2&&(s+=e),t=Ti(t/2),t&&(e+=e);while(t);return s}function Y(e,t){return va(Qu(e,t,Ye),e+"")}function Dg(e){return Jo(nr(e))}function Mg(e,t){var s=nr(e);return Wi(s,Rn(t,0,s.length))}function Fr(e,t,s,o){if(!fe(e))return e;t=sn(t,e);for(var f=-1,g=t.length,_=g-1,v=e;v!=null&&++f<g;){var w=Ut(t[f]),b=s;if(w==="__proto__"||w==="constructor"||w==="prototype")return e;if(f!=_){var P=v[w];b=o?o(P,w,v):r,b===r&&(b=fe(P)?P:qt(t[f+1])?[]:{})}Or(v,w,b),v=v[w]}return e}var _u=yi?function(e,t){return yi.set(e,t),e}:Ye,Fg=Ei?function(e,t){return Ei(e,"toString",{configurable:!0,enumerable:!1,value:ba(t),writable:!0})}:Ye;function kg(e){return Wi(nr(e))}function dt(e,t,s){var o=-1,f=e.length;t<0&&(t=-t>f?0:f+t),s=s>f?f:s,s<0&&(s+=f),f=t>s?0:s-t>>>0,t>>>=0;for(var g=E(f);++o<f;)g[o]=e[o+t];return g}function Wg(e,t){var s;return nn(e,function(o,f,g){return s=t(o,f,g),!s}),!!s}function Li(e,t,s){var o=0,f=e==null?o:e.length;if(typeof t=="number"&&t===t&&f<=Hc){for(;o<f;){var g=o+f>>>1,_=e[g];_!==null&&!it(_)&&(s?_<=t:_<t)?o=g+1:f=g}return f}return ta(e,t,Ye,s)}function ta(e,t,s,o){var f=0,g=e==null?0:e.length;if(g===0)return 0;t=s(t);for(var _=t!==t,v=t===null,w=it(t),b=t===r;f<g;){var P=Ti((f+g)/2),x=s(e[P]),O=x!==r,M=x===null,V=x===x,K=it(x);if(_)var B=o||V;else b?B=V&&(o||O):v?B=V&&O&&(o||!M):w?B=V&&O&&!M&&(o||!K):M||K?B=!1:B=o?x<=t:x<t;B?f=P+1:g=P}return Ne(g,Wc)}function vu(e,t){for(var s=-1,o=e.length,f=0,g=[];++s<o;){var _=e[s],v=t?t(_):_;if(!s||!Rt(v,w)){var w=v;g[f++]=_===0?0:_}}return g}function mu(e){return typeof e=="number"?e:it(e)?ye:+e}function rt(e){if(typeof e=="string")return e;if(q(e))return le(e,rt)+"";if(it(e))return Xo?Xo.call(e):"";var t=e+"";return t=="0"&&1/e==-I?"-0":t}function rn(e,t,s){var o=-1,f=ci,g=e.length,_=!0,v=[],w=v;if(s)_=!1,f=xs;else if(g>=u){var b=t?null:Zg(e);if(b)return hi(b);_=!1,f=Pr,w=new An}else w=t?[]:v;e:for(;++o<g;){var P=e[o],x=t?t(P):P;if(P=s||P!==0?P:0,_&&x===x){for(var O=w.length;O--;)if(w[O]===x)continue e;t&&w.push(x),v.push(P)}else f(w,x,s)||(w!==v&&w.push(x),v.push(P))}return v}function na(e,t){t=sn(t,e);var s=-1,o=t.length;if(!o)return!0;for(var f=e==null||typeof e!="object"&&typeof e!="function";++s<o;){var g=t[s];if(typeof g=="string"){if(g==="__proto__"&&!re.call(e,"__proto__"))return!1;if(g==="constructor"&&s+1<o&&typeof t[s+1]=="string"&&t[s+1]==="prototype"){if(f&&s===0)continue;return!1}}}var _=qu(e,t);return _==null||delete _[Ut(pt(t))]}function Su(e,t,s,o){return Fr(e,t,s(bn(e,t)),o)}function Ni(e,t,s,o){for(var f=e.length,g=o?f:-1;(o?g--:++g<f)&&t(e[g],g,e););return s?dt(e,o?0:g,o?g+1:f):dt(e,o?g+1:0,o?f:g)}function wu(e,t){var s=e;return s instanceof J&&(s=s.value()),Ls(t,function(o,f){return f.func.apply(f.thisArg,jt([o],f.args))},s)}function ra(e,t,s){var o=e.length;if(o<2)return o?rn(e[0]):[];for(var f=-1,g=E(o);++f<o;)for(var _=e[f],v=-1;++v<o;)v!=f&&(g[f]=Ur(g[f]||_,e[v],t,s));return rn(Ie(g,1),t,s)}function Eu(e,t,s){for(var o=-1,f=e.length,g=t.length,_={};++o<f;){var v=o<g?t[o]:r;s(_,e[o],v)}return _}function ia(e){return de(e)?e:[]}function sa(e){return typeof e=="function"?e:Ye}function sn(e,t){return q(e)?e:da(e,t)?[e]:Xu(ie(e))}var Hg=Y;function an(e,t,s){var o=e.length;return s=s===r?o:s,!t&&s>=o?e:dt(e,t,s)}var Cu=Ph||function(e){return Pe.clearTimeout(e)};function Tu(e,t){if(t)return e.slice();var s=e.length,o=Go?Go(s):new e.constructor(s);return e.copy(o),o}function aa(e){var t=new e.constructor(e.byteLength);return new mi(t).set(new mi(e)),t}function Vg(e,t){var s=t?aa(e.buffer):e.buffer;return new e.constructor(s,e.byteOffset,e.byteLength)}function Bg(e){var t=new e.constructor(e.source,so.exec(e));return t.lastIndex=e.lastIndex,t}function Gg(e){return $r?se($r.call(e)):{}}function yu(e,t){var s=t?aa(e.buffer):e.buffer;return new e.constructor(s,e.byteOffset,e.length)}function Au(e,t){if(e!==t){var s=e!==r,o=e===null,f=e===e,g=it(e),_=t!==r,v=t===null,w=t===t,b=it(t);if(!v&&!b&&!g&&e>t||g&&_&&w&&!v&&!b||o&&_&&w||!s&&w||!f)return 1;if(!o&&!g&&!b&&e<t||b&&s&&f&&!o&&!g||v&&s&&f||!_&&f||!w)return-1}return 0}function Qg(e,t,s){for(var o=-1,f=e.criteria,g=t.criteria,_=f.length,v=s.length;++o<_;){var w=Au(f[o],g[o]);if(w){if(o>=v)return w;var b=s[o];return w*(b=="desc"?-1:1)}}return e.index-t.index}function Ru(e,t,s,o){for(var f=-1,g=e.length,_=s.length,v=-1,w=t.length,b=we(g-_,0),P=E(w+b),x=!o;++v<w;)P[v]=t[v];for(;++f<_;)(x||f<g)&&(P[s[f]]=e[f]);for(;b--;)P[v++]=e[f++];return P}function bu(e,t,s,o){for(var f=-1,g=e.length,_=-1,v=s.length,w=-1,b=t.length,P=we(g-v,0),x=E(P+b),O=!o;++f<P;)x[f]=e[f];for(var M=f;++w<b;)x[M+w]=t[w];for(;++_<v;)(O||f<g)&&(x[M+s[_]]=e[f++]);return x}function qe(e,t){var s=-1,o=e.length;for(t||(t=E(o));++s<o;)t[s]=e[s];return t}function Ot(e,t,s,o){var f=!s;s||(s={});for(var g=-1,_=t.length;++g<_;){var v=t[g],w=o?o(s[v],e[v],v,s,e):r;w===r&&(w=e[v]),f?Bt(s,v,w):Or(s,v,w)}return s}function qg(e,t){return Ot(e,ga(e),t)}function zg(e,t){return Ot(e,Wu(e),t)}function $i(e,t){return function(s,o){var f=q(s)?Jf:pg,g=t?t():{};return f(s,e,H(o,2),g)}}function Jn(e){return Y(function(t,s){var o=-1,f=s.length,g=f>1?s[f-1]:r,_=f>2?s[2]:r;for(g=e.length>3&&typeof g=="function"?(f--,g):r,_&&We(s[0],s[1],_)&&(g=f<3?r:g,f=1),t=se(t);++o<f;){var v=s[o];v&&e(t,v,o,g)}return t})}function Pu(e,t){return function(s,o){if(s==null)return s;if(!ze(s))return e(s,o);for(var f=s.length,g=t?f:-1,_=se(s);(t?g--:++g<f)&&o(_[g],g,_)!==!1;);return s}}function Iu(e){return function(t,s,o){for(var f=-1,g=se(t),_=o(t),v=_.length;v--;){var w=_[e?v:++f];if(s(g[w],w,g)===!1)break}return t}}function Kg(e,t,s){var o=t&F,f=kr(e);function g(){var _=this&&this!==Pe&&this instanceof g?f:e;return _.apply(o?s:this,arguments)}return g}function xu(e){return function(t){t=ie(t);var s=Qn(t)?yt(t):r,o=s?s[0]:t.charAt(0),f=s?an(s,1).join(""):t.slice(1);return o[e]()+f}}function jn(e){return function(t){return Ls(Pl(bl(t).replace(Ff,"")),e,"")}}function kr(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var s=Zn(e.prototype),o=e.apply(s,t);return fe(o)?o:s}}function Yg(e,t,s){var o=kr(e);function f(){for(var g=arguments.length,_=E(g),v=g,w=er(f);v--;)_[v]=arguments[v];var b=g<3&&_[0]!==w&&_[g-1]!==w?[]:en(_,w);if(g-=b.length,g<s)return Uu(e,t,Oi,f.placeholder,r,_,b,r,r,s-g);var P=this&&this!==Pe&&this instanceof f?o:e;return tt(P,this,_)}return f}function Lu(e){return function(t,s,o){var f=se(t);if(!ze(t)){var g=H(s,3);t=Ae(t),s=function(v){return g(f[v],v,f)}}var _=e(t,s,o);return _>-1?f[g?t[_]:_]:r}}function Nu(e){return Qt(function(t){var s=t.length,o=s,f=ht.prototype.thru;for(e&&t.reverse();o--;){var g=t[o];if(typeof g!="function")throw new ft(c);if(f&&!_&&Fi(g)=="wrapper")var _=new ht([],!0)}for(o=_?o:s;++o<s;){g=t[o];var v=Fi(g),w=v=="wrapper"?fa(g):r;w&&pa(w[0])&&w[1]==(be|ce|Ee|Ge)&&!w[4].length&&w[9]==1?_=_[Fi(w[0])].apply(_,w[3]):_=g.length==1&&pa(g)?_[v]():_.thru(g)}return function(){var b=arguments,P=b[0];if(_&&b.length==1&&q(P))return _.plant(P).value();for(var x=0,O=s?t[x].apply(this,b):P;++x<s;)O=t[x].call(this,O);return O}})}function Oi(e,t,s,o,f,g,_,v,w,b){var P=t&be,x=t&F,O=t&te,M=t&(ce|Je),V=t&Le,K=O?r:kr(e);function B(){for(var X=arguments.length,j=E(X),st=X;st--;)j[st]=arguments[st];if(M)var He=er(B),at=oh(j,He);if(o&&(j=Ru(j,o,f,M)),g&&(j=bu(j,g,_,M)),X-=at,M&&X<b){var pe=en(j,He);return Uu(e,t,Oi,B.placeholder,s,j,pe,v,w,b-X)}var bt=x?s:this,Yt=O?bt[e]:e;return X=j.length,v?j=pd(j,v):V&&X>1&&j.reverse(),P&&w<X&&(j.length=w),this&&this!==Pe&&this instanceof B&&(Yt=K||kr(Yt)),Yt.apply(bt,j)}return B}function $u(e,t){return function(s,o){return Tg(s,e,t(o),{})}}function Ui(e,t){return function(s,o){var f;if(s===r&&o===r)return t;if(s!==r&&(f=s),o!==r){if(f===r)return o;typeof s=="string"||typeof o=="string"?(s=rt(s),o=rt(o)):(s=mu(s),o=mu(o)),f=e(s,o)}return f}}function oa(e){return Qt(function(t){return t=le(t,nt(H())),Y(function(s){var o=this;return e(t,function(f){return tt(f,o,s)})})})}function Di(e,t){t=t===r?" ":rt(t);var s=t.length;if(s<2)return s?ea(t,e):t;var o=ea(t,Ci(e/qn(t)));return Qn(t)?an(yt(o),0,e).join(""):o.slice(0,e)}function Xg(e,t,s,o){var f=t&F,g=kr(e);function _(){for(var v=-1,w=arguments.length,b=-1,P=o.length,x=E(P+w),O=this&&this!==Pe&&this instanceof _?g:e;++b<P;)x[b]=o[b];for(;w--;)x[b++]=arguments[++v];return tt(O,f?s:this,x)}return _}function Ou(e){return function(t,s,o){return o&&typeof o!="number"&&We(t,s,o)&&(s=o=r),t=Kt(t),s===r?(s=t,t=0):s=Kt(s),o=o===r?t<s?1:-1:Kt(o),Ug(t,s,o,e)}}function Mi(e){return function(t,s){return typeof t=="string"&&typeof s=="string"||(t=_t(t),s=_t(s)),e(t,s)}}function Uu(e,t,s,o,f,g,_,v,w,b){var P=t&ce,x=P?_:r,O=P?r:_,M=P?g:r,V=P?r:g;t|=P?Ee:je,t&=~(P?je:Ee),t&ve||(t&=-4);var K=[e,t,f,M,x,V,O,v,w,b],B=s.apply(r,K);return pa(e)&&zu(B,K),B.placeholder=o,Ku(B,e,t)}function ua(e){var t=Se[e];return function(s,o){if(s=_t(s),o=o==null?0:Ne(z(o),292),o&&Ko(s)){var f=(ie(s)+"e").split("e"),g=t(f[0]+"e"+(+f[1]+o));return f=(ie(g)+"e").split("e"),+(f[0]+"e"+(+f[1]-o))}return t(s)}}var Zg=Yn&&1/hi(new Yn([,-0]))[1]==I?function(e){return new Yn(e)}:xa;function Du(e){return function(t){var s=$e(t);return s==Ct?Fs(t):s==Tt?dh(t):ah(t,e(t))}}function Gt(e,t,s,o,f,g,_,v){var w=t&te;if(!w&&typeof e!="function")throw new ft(c);var b=o?o.length:0;if(b||(t&=-97,o=f=r),_=_===r?_:we(z(_),0),v=v===r?v:z(v),b-=f?f.length:0,t&je){var P=o,x=f;o=f=r}var O=w?r:fa(e),M=[e,t,s,o,f,P,x,g,_,v];if(O&&hd(M,O),e=M[0],t=M[1],s=M[2],o=M[3],f=M[4],v=M[9]=M[9]===r?w?0:e.length:we(M[9]-b,0),!v&&t&(ce|Je)&&(t&=-25),!t||t==F)var V=Kg(e,t,s);else t==ce||t==Je?V=Yg(e,t,v):(t==Ee||t==(F|Ee))&&!f.length?V=Xg(e,t,s,o):V=Oi.apply(r,M);var K=O?_u:zu;return Ku(K(V,M),e,t)}function Mu(e,t,s,o){return e===r||Rt(e,Kn[s])&&!re.call(o,s)?t:e}function Fu(e,t,s,o,f,g){return fe(e)&&fe(t)&&(g.set(t,e),xi(e,t,r,Fu,g),g.delete(t)),e}function Jg(e){return Vr(e)?r:e}function ku(e,t,s,o,f,g){var _=s&L,v=e.length,w=t.length;if(v!=w&&!(_&&w>v))return!1;var b=g.get(e),P=g.get(t);if(b&&P)return b==t&&P==e;var x=-1,O=!0,M=s&D?new An:r;for(g.set(e,t),g.set(t,e);++x<v;){var V=e[x],K=t[x];if(o)var B=_?o(K,V,x,t,e,g):o(V,K,x,e,t,g);if(B!==r){if(B)continue;O=!1;break}if(M){if(!Ns(t,function(X,j){if(!Pr(M,j)&&(V===X||f(V,X,s,o,g)))return M.push(j)})){O=!1;break}}else if(!(V===K||f(V,K,s,o,g))){O=!1;break}}return g.delete(e),g.delete(t),O}function jg(e,t,s,o,f,g,_){switch(s){case Vn:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case br:return!(e.byteLength!=t.byteLength||!g(new mi(e),new mi(t)));case Er:case Cr:case Tr:return Rt(+e,+t);case ii:return e.name==t.name&&e.message==t.message;case yr:case Ar:return e==t+"";case Ct:var v=Fs;case Tt:var w=o&L;if(v||(v=hi),e.size!=t.size&&!w)return!1;var b=_.get(e);if(b)return b==t;o|=D,_.set(e,t);var P=ku(v(e),v(t),o,f,g,_);return _.delete(e),P;case ai:if($r)return $r.call(e)==$r.call(t)}return!1}function ed(e,t,s,o,f,g){var _=s&L,v=la(e),w=v.length,b=la(t),P=b.length;if(w!=P&&!_)return!1;for(var x=w;x--;){var O=v[x];if(!(_?O in t:re.call(t,O)))return!1}var M=g.get(e),V=g.get(t);if(M&&V)return M==t&&V==e;var K=!0;g.set(e,t),g.set(t,e);for(var B=_;++x<w;){O=v[x];var X=e[O],j=t[O];if(o)var st=_?o(j,X,O,t,e,g):o(X,j,O,e,t,g);if(!(st===r?X===j||f(X,j,s,o,g):st)){K=!1;break}B||(B=O=="constructor")}if(K&&!B){var He=e.constructor,at=t.constructor;He!=at&&"constructor"in e&&"constructor"in t&&!(typeof He=="function"&&He instanceof He&&typeof at=="function"&&at instanceof at)&&(K=!1)}return g.delete(e),g.delete(t),K}function Qt(e){return va(Qu(e,r,el),e+"")}function la(e){return su(e,Ae,ga)}function ca(e){return su(e,Ke,Wu)}var fa=yi?function(e){return yi.get(e)}:xa;function Fi(e){for(var t=e.name+"",s=Xn[t],o=re.call(Xn,t)?s.length:0;o--;){var f=s[o],g=f.func;if(g==null||g==e)return f.name}return t}function er(e){var t=re.call(h,"placeholder")?h:e;return t.placeholder}function H(){var e=h.iteratee||Pa;return e=e===Pa?uu:e,arguments.length?e(arguments[0],arguments[1]):e}function ki(e,t){var s=e.__data__;return ud(t)?s[typeof t=="string"?"string":"hash"]:s.map}function ha(e){for(var t=Ae(e),s=t.length;s--;){var o=t[s],f=e[o];t[s]=[o,f,Bu(f)]}return t}function Pn(e,t){var s=fh(e,t);return ou(s)?s:r}function td(e){var t=re.call(e,Tn),s=e[Tn];try{e[Tn]=r;var o=!0}catch{}var f=_i.call(e);return o&&(t?e[Tn]=s:delete e[Tn]),f}var ga=Ws?function(e){return e==null?[]:(e=se(e),Jt(Ws(e),function(t){return qo.call(e,t)}))}:La,Wu=Ws?function(e){for(var t=[];e;)jt(t,ga(e)),e=Si(e);return t}:La,$e=ke;(Hs&&$e(new Hs(new ArrayBuffer(1)))!=Vn||xr&&$e(new xr)!=Ct||Vs&&$e(Vs.resolve())!=to||Yn&&$e(new Yn)!=Tt||Lr&&$e(new Lr)!=Rr)&&($e=function(e){var t=ke(e),s=t==Wt?e.constructor:r,o=s?In(s):"";if(o)switch(o){case Mh:return Vn;case Fh:return Ct;case kh:return to;case Wh:return Tt;case Hh:return Rr}return t});function nd(e,t,s){for(var o=-1,f=s.length;++o<f;){var g=s[o],_=g.size;switch(g.type){case"drop":e+=_;break;case"dropRight":t-=_;break;case"take":t=Ne(t,e+_);break;case"takeRight":e=we(e,t-_);break}}return{start:e,end:t}}function rd(e){var t=e.match(lf);return t?t[1].split(cf):[]}function Hu(e,t,s){t=sn(t,e);for(var o=-1,f=t.length,g=!1;++o<f;){var _=Ut(t[o]);if(!(g=e!=null&&s(e,_)))break;e=e[_]}return g||++o!=f?g:(f=e==null?0:e.length,!!f&&qi(f)&&qt(_,f)&&(q(e)||xn(e)))}function id(e){var t=e.length,s=new e.constructor(t);return t&&typeof e[0]=="string"&&re.call(e,"index")&&(s.index=e.index,s.input=e.input),s}function Vu(e){return typeof e.constructor=="function"&&!Wr(e)?Zn(Si(e)):{}}function sd(e,t,s){var o=e.constructor;switch(t){case br:return aa(e);case Er:case Cr:return new o(+e);case Vn:return Vg(e,s);case hs:case gs:case ds:case ps:case _s:case vs:case ms:case Ss:case ws:return yu(e,s);case Ct:return new o;case Tr:case Ar:return new o(e);case yr:return Bg(e);case Tt:return new o;case ai:return Gg(e)}}function ad(e,t){var s=t.length;if(!s)return e;var o=s-1;return t[o]=(s>1?"& ":"")+t[o],t=t.join(s>2?", ":" "),e.replace(uf,`{
|
|
2
|
+
/* [wrapped with `+t+`] */
|
|
3
|
+
`)}function od(e){return q(e)||xn(e)||!!(zo&&e&&e[zo])}function qt(e,t){var s=typeof e;return t=t??et,!!t&&(s=="number"||s!="symbol"&&Sf.test(e))&&e>-1&&e%1==0&&e<t}function We(e,t,s){if(!fe(s))return!1;var o=typeof t;return(o=="number"?ze(s)&&qt(t,s.length):o=="string"&&t in s)?Rt(s[t],e):!1}function da(e,t){if(q(e))return!1;var s=typeof e;return s=="number"||s=="symbol"||s=="boolean"||e==null||it(e)?!0:rf.test(e)||!nf.test(e)||t!=null&&e in se(t)}function ud(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function pa(e){var t=Fi(e),s=h[t];if(typeof s!="function"||!(t in J.prototype))return!1;if(e===s)return!0;var o=fa(s);return!!o&&e===o[0]}function ld(e){return!!Bo&&Bo in e}var cd=di?zt:Na;function Wr(e){var t=e&&e.constructor,s=typeof t=="function"&&t.prototype||Kn;return e===s}function Bu(e){return e===e&&!fe(e)}function Gu(e,t){return function(s){return s==null?!1:s[e]===t&&(t!==r||e in se(s))}}function fd(e){var t=Gi(e,function(o){return s.size===m&&s.clear(),o}),s=t.cache;return t}function hd(e,t){var s=e[1],o=t[1],f=s|o,g=f<(F|te|be),_=o==be&&s==ce||o==be&&s==Ge&&e[7].length<=t[8]||o==(be|Ge)&&t[7].length<=t[8]&&s==ce;if(!(g||_))return e;o&F&&(e[2]=t[2],f|=s&F?0:ve);var v=t[3];if(v){var w=e[3];e[3]=w?Ru(w,v,t[4]):v,e[4]=w?en(e[3],y):t[4]}return v=t[5],v&&(w=e[5],e[5]=w?bu(w,v,t[6]):v,e[6]=w?en(e[5],y):t[6]),v=t[7],v&&(e[7]=v),o&be&&(e[8]=e[8]==null?t[8]:Ne(e[8],t[8])),e[9]==null&&(e[9]=t[9]),e[0]=t[0],e[1]=f,e}function gd(e){var t=[];if(e!=null)for(var s in se(e))t.push(s);return t}function dd(e){return _i.call(e)}function Qu(e,t,s){return t=we(t===r?e.length-1:t,0),function(){for(var o=arguments,f=-1,g=we(o.length-t,0),_=E(g);++f<g;)_[f]=o[t+f];f=-1;for(var v=E(t+1);++f<t;)v[f]=o[f];return v[t]=s(_),tt(e,this,v)}}function qu(e,t){return t.length<2?e:bn(e,dt(t,0,-1))}function pd(e,t){for(var s=e.length,o=Ne(t.length,s),f=qe(e);o--;){var g=t[o];e[o]=qt(g,s)?f[g]:r}return e}function _a(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var zu=Yu(_u),Hr=xh||function(e,t){return Pe.setTimeout(e,t)},va=Yu(Fg);function Ku(e,t,s){var o=t+"";return va(e,ad(o,_d(rd(o),s)))}function Yu(e){var t=0,s=0;return function(){var o=Oh(),f=Zt-(o-s);if(s=o,f>0){if(++t>=$)return arguments[0]}else t=0;return e.apply(r,arguments)}}function Wi(e,t){var s=-1,o=e.length,f=o-1;for(t=t===r?o:t;++s<t;){var g=js(s,f),_=e[g];e[g]=e[s],e[s]=_}return e.length=t,e}var Xu=fd(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(sf,function(s,o,f,g){t.push(f?g.replace(gf,"$1"):o||s)}),t});function Ut(e){if(typeof e=="string"||it(e))return e;var t=e+"";return t=="0"&&1/e==-I?"-0":t}function In(e){if(e!=null){try{return pi.call(e)}catch{}try{return e+""}catch{}}return""}function _d(e,t){return ct(Vc,function(s){var o="_."+s[0];t&s[1]&&!ci(e,o)&&e.push(o)}),e.sort()}function Zu(e){if(e instanceof J)return e.clone();var t=new ht(e.__wrapped__,e.__chain__);return t.__actions__=qe(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}function vd(e,t,s){(s?We(e,t,s):t===r)?t=1:t=we(z(t),0);var o=e==null?0:e.length;if(!o||t<1)return[];for(var f=0,g=0,_=E(Ci(o/t));f<o;)_[g++]=dt(e,f,f+=t);return _}function md(e){for(var t=-1,s=e==null?0:e.length,o=0,f=[];++t<s;){var g=e[t];g&&(f[o++]=g)}return f}function Sd(){var e=arguments.length;if(!e)return[];for(var t=E(e-1),s=arguments[0],o=e;o--;)t[o-1]=arguments[o];return jt(q(s)?qe(s):[s],Ie(t,1))}var wd=Y(function(e,t){return de(e)?Ur(e,Ie(t,1,de,!0)):[]}),Ed=Y(function(e,t){var s=pt(t);return de(s)&&(s=r),de(e)?Ur(e,Ie(t,1,de,!0),H(s,2)):[]}),Cd=Y(function(e,t){var s=pt(t);return de(s)&&(s=r),de(e)?Ur(e,Ie(t,1,de,!0),r,s):[]});function Td(e,t,s){var o=e==null?0:e.length;return o?(t=s||t===r?1:z(t),dt(e,t<0?0:t,o)):[]}function yd(e,t,s){var o=e==null?0:e.length;return o?(t=s||t===r?1:z(t),t=o-t,dt(e,0,t<0?0:t)):[]}function Ad(e,t){return e&&e.length?Ni(e,H(t,3),!0,!0):[]}function Rd(e,t){return e&&e.length?Ni(e,H(t,3),!0):[]}function bd(e,t,s,o){var f=e==null?0:e.length;return f?(s&&typeof s!="number"&&We(e,t,s)&&(s=0,o=f),Sg(e,t,s,o)):[]}function Ju(e,t,s){var o=e==null?0:e.length;if(!o)return-1;var f=s==null?0:z(s);return f<0&&(f=we(o+f,0)),fi(e,H(t,3),f)}function ju(e,t,s){var o=e==null?0:e.length;if(!o)return-1;var f=o-1;return s!==r&&(f=z(s),f=s<0?we(o+f,0):Ne(f,o-1)),fi(e,H(t,3),f,!0)}function el(e){var t=e==null?0:e.length;return t?Ie(e,1):[]}function Pd(e){var t=e==null?0:e.length;return t?Ie(e,I):[]}function Id(e,t){var s=e==null?0:e.length;return s?(t=t===r?1:z(t),Ie(e,t)):[]}function xd(e){for(var t=-1,s=e==null?0:e.length,o={};++t<s;){var f=e[t];o[f[0]]=f[1]}return o}function tl(e){return e&&e.length?e[0]:r}function Ld(e,t,s){var o=e==null?0:e.length;if(!o)return-1;var f=s==null?0:z(s);return f<0&&(f=we(o+f,0)),Gn(e,t,f)}function Nd(e){var t=e==null?0:e.length;return t?dt(e,0,-1):[]}var $d=Y(function(e){var t=le(e,ia);return t.length&&t[0]===e[0]?Ks(t):[]}),Od=Y(function(e){var t=pt(e),s=le(e,ia);return t===pt(s)?t=r:s.pop(),s.length&&s[0]===e[0]?Ks(s,H(t,2)):[]}),Ud=Y(function(e){var t=pt(e),s=le(e,ia);return t=typeof t=="function"?t:r,t&&s.pop(),s.length&&s[0]===e[0]?Ks(s,r,t):[]});function Dd(e,t){return e==null?"":Nh.call(e,t)}function pt(e){var t=e==null?0:e.length;return t?e[t-1]:r}function Md(e,t,s){var o=e==null?0:e.length;if(!o)return-1;var f=o;return s!==r&&(f=z(s),f=f<0?we(o+f,0):Ne(f,o-1)),t===t?_h(e,t,f):fi(e,Uo,f,!0)}function Fd(e,t){return e&&e.length?hu(e,z(t)):r}var kd=Y(nl);function nl(e,t){return e&&e.length&&t&&t.length?Js(e,t):e}function Wd(e,t,s){return e&&e.length&&t&&t.length?Js(e,t,H(s,2)):e}function Hd(e,t,s){return e&&e.length&&t&&t.length?Js(e,t,r,s):e}var Vd=Qt(function(e,t){var s=e==null?0:e.length,o=Gs(e,t);return pu(e,le(t,function(f){return qt(f,s)?+f:f}).sort(Au)),o});function Bd(e,t){var s=[];if(!(e&&e.length))return s;var o=-1,f=[],g=e.length;for(t=H(t,3);++o<g;){var _=e[o];t(_,o,e)&&(s.push(_),f.push(o))}return pu(e,f),s}function ma(e){return e==null?e:Dh.call(e)}function Gd(e,t,s){var o=e==null?0:e.length;return o?(s&&typeof s!="number"&&We(e,t,s)?(t=0,s=o):(t=t==null?0:z(t),s=s===r?o:z(s)),dt(e,t,s)):[]}function Qd(e,t){return Li(e,t)}function qd(e,t,s){return ta(e,t,H(s,2))}function zd(e,t){var s=e==null?0:e.length;if(s){var o=Li(e,t);if(o<s&&Rt(e[o],t))return o}return-1}function Kd(e,t){return Li(e,t,!0)}function Yd(e,t,s){return ta(e,t,H(s,2),!0)}function Xd(e,t){var s=e==null?0:e.length;if(s){var o=Li(e,t,!0)-1;if(Rt(e[o],t))return o}return-1}function Zd(e){return e&&e.length?vu(e):[]}function Jd(e,t){return e&&e.length?vu(e,H(t,2)):[]}function jd(e){var t=e==null?0:e.length;return t?dt(e,1,t):[]}function ep(e,t,s){return e&&e.length?(t=s||t===r?1:z(t),dt(e,0,t<0?0:t)):[]}function tp(e,t,s){var o=e==null?0:e.length;return o?(t=s||t===r?1:z(t),t=o-t,dt(e,t<0?0:t,o)):[]}function np(e,t){return e&&e.length?Ni(e,H(t,3),!1,!0):[]}function rp(e,t){return e&&e.length?Ni(e,H(t,3)):[]}var ip=Y(function(e){return rn(Ie(e,1,de,!0))}),sp=Y(function(e){var t=pt(e);return de(t)&&(t=r),rn(Ie(e,1,de,!0),H(t,2))}),ap=Y(function(e){var t=pt(e);return t=typeof t=="function"?t:r,rn(Ie(e,1,de,!0),r,t)});function op(e){return e&&e.length?rn(e):[]}function up(e,t){return e&&e.length?rn(e,H(t,2)):[]}function lp(e,t){return t=typeof t=="function"?t:r,e&&e.length?rn(e,r,t):[]}function Sa(e){if(!(e&&e.length))return[];var t=0;return e=Jt(e,function(s){if(de(s))return t=we(s.length,t),!0}),Ds(t,function(s){return le(e,$s(s))})}function rl(e,t){if(!(e&&e.length))return[];var s=Sa(e);return t==null?s:le(s,function(o){return tt(t,r,o)})}var cp=Y(function(e,t){return de(e)?Ur(e,t):[]}),fp=Y(function(e){return ra(Jt(e,de))}),hp=Y(function(e){var t=pt(e);return de(t)&&(t=r),ra(Jt(e,de),H(t,2))}),gp=Y(function(e){var t=pt(e);return t=typeof t=="function"?t:r,ra(Jt(e,de),r,t)}),dp=Y(Sa);function pp(e,t){return Eu(e||[],t||[],Or)}function _p(e,t){return Eu(e||[],t||[],Fr)}var vp=Y(function(e){var t=e.length,s=t>1?e[t-1]:r;return s=typeof s=="function"?(e.pop(),s):r,rl(e,s)});function il(e){var t=h(e);return t.__chain__=!0,t}function mp(e,t){return t(e),e}function Hi(e,t){return t(e)}var Sp=Qt(function(e){var t=e.length,s=t?e[0]:0,o=this.__wrapped__,f=function(g){return Gs(g,e)};return t>1||this.__actions__.length||!(o instanceof J)||!qt(s)?this.thru(f):(o=o.slice(s,+s+(t?1:0)),o.__actions__.push({func:Hi,args:[f],thisArg:r}),new ht(o,this.__chain__).thru(function(g){return t&&!g.length&&g.push(r),g}))});function wp(){return il(this)}function Ep(){return new ht(this.value(),this.__chain__)}function Cp(){this.__values__===r&&(this.__values__=ml(this.value()));var e=this.__index__>=this.__values__.length,t=e?r:this.__values__[this.__index__++];return{done:e,value:t}}function Tp(){return this}function yp(e){for(var t,s=this;s instanceof Ri;){var o=Zu(s);o.__index__=0,o.__values__=r,t?f.__wrapped__=o:t=o;var f=o;s=s.__wrapped__}return f.__wrapped__=e,t}function Ap(){var e=this.__wrapped__;if(e instanceof J){var t=e;return this.__actions__.length&&(t=new J(this)),t=t.reverse(),t.__actions__.push({func:Hi,args:[ma],thisArg:r}),new ht(t,this.__chain__)}return this.thru(ma)}function Rp(){return wu(this.__wrapped__,this.__actions__)}var bp=$i(function(e,t,s){re.call(e,s)?++e[s]:Bt(e,s,1)});function Pp(e,t,s){var o=q(e)?$o:mg;return s&&We(e,t,s)&&(t=r),o(e,H(t,3))}function Ip(e,t){var s=q(e)?Jt:ru;return s(e,H(t,3))}var xp=Lu(Ju),Lp=Lu(ju);function Np(e,t){return Ie(Vi(e,t),1)}function $p(e,t){return Ie(Vi(e,t),I)}function Op(e,t,s){return s=s===r?1:z(s),Ie(Vi(e,t),s)}function sl(e,t){var s=q(e)?ct:nn;return s(e,H(t,3))}function al(e,t){var s=q(e)?jf:nu;return s(e,H(t,3))}var Up=$i(function(e,t,s){re.call(e,s)?e[s].push(t):Bt(e,s,[t])});function Dp(e,t,s,o){e=ze(e)?e:nr(e),s=s&&!o?z(s):0;var f=e.length;return s<0&&(s=we(f+s,0)),zi(e)?s<=f&&e.indexOf(t,s)>-1:!!f&&Gn(e,t,s)>-1}var Mp=Y(function(e,t,s){var o=-1,f=typeof t=="function",g=ze(e)?E(e.length):[];return nn(e,function(_){g[++o]=f?tt(t,_,s):Dr(_,t,s)}),g}),Fp=$i(function(e,t,s){Bt(e,s,t)});function Vi(e,t){var s=q(e)?le:lu;return s(e,H(t,3))}function kp(e,t,s,o){return e==null?[]:(q(t)||(t=t==null?[]:[t]),s=o?r:s,q(s)||(s=s==null?[]:[s]),gu(e,t,s))}var Wp=$i(function(e,t,s){e[s?0:1].push(t)},function(){return[[],[]]});function Hp(e,t,s){var o=q(e)?Ls:Mo,f=arguments.length<3;return o(e,H(t,4),s,f,nn)}function Vp(e,t,s){var o=q(e)?eh:Mo,f=arguments.length<3;return o(e,H(t,4),s,f,nu)}function Bp(e,t){var s=q(e)?Jt:ru;return s(e,Qi(H(t,3)))}function Gp(e){var t=q(e)?Jo:Dg;return t(e)}function Qp(e,t,s){(s?We(e,t,s):t===r)?t=1:t=z(t);var o=q(e)?gg:Mg;return o(e,t)}function qp(e){var t=q(e)?dg:kg;return t(e)}function zp(e){if(e==null)return 0;if(ze(e))return zi(e)?qn(e):e.length;var t=$e(e);return t==Ct||t==Tt?e.size:Xs(e).length}function Kp(e,t,s){var o=q(e)?Ns:Wg;return s&&We(e,t,s)&&(t=r),o(e,H(t,3))}var Yp=Y(function(e,t){if(e==null)return[];var s=t.length;return s>1&&We(e,t[0],t[1])?t=[]:s>2&&We(t[0],t[1],t[2])&&(t=[t[0]]),gu(e,Ie(t,1),[])}),Bi=Ih||function(){return Pe.Date.now()};function Xp(e,t){if(typeof t!="function")throw new ft(c);return e=z(e),function(){if(--e<1)return t.apply(this,arguments)}}function ol(e,t,s){return t=s?r:t,t=e&&t==null?e.length:t,Gt(e,be,r,r,r,r,t)}function ul(e,t){var s;if(typeof t!="function")throw new ft(c);return e=z(e),function(){return--e>0&&(s=t.apply(this,arguments)),e<=1&&(t=r),s}}var wa=Y(function(e,t,s){var o=F;if(s.length){var f=en(s,er(wa));o|=Ee}return Gt(e,o,t,s,f)}),ll=Y(function(e,t,s){var o=F|te;if(s.length){var f=en(s,er(ll));o|=Ee}return Gt(t,o,e,s,f)});function cl(e,t,s){t=s?r:t;var o=Gt(e,ce,r,r,r,r,r,t);return o.placeholder=cl.placeholder,o}function fl(e,t,s){t=s?r:t;var o=Gt(e,Je,r,r,r,r,r,t);return o.placeholder=fl.placeholder,o}function hl(e,t,s){var o,f,g,_,v,w,b=0,P=!1,x=!1,O=!0;if(typeof e!="function")throw new ft(c);t=_t(t)||0,fe(s)&&(P=!!s.leading,x="maxWait"in s,g=x?we(_t(s.maxWait)||0,t):g,O="trailing"in s?!!s.trailing:O);function M(pe){var bt=o,Yt=f;return o=f=r,b=pe,_=e.apply(Yt,bt),_}function V(pe){return b=pe,v=Hr(X,t),P?M(pe):_}function K(pe){var bt=pe-w,Yt=pe-b,Ll=t-bt;return x?Ne(Ll,g-Yt):Ll}function B(pe){var bt=pe-w,Yt=pe-b;return w===r||bt>=t||bt<0||x&&Yt>=g}function X(){var pe=Bi();if(B(pe))return j(pe);v=Hr(X,K(pe))}function j(pe){return v=r,O&&o?M(pe):(o=f=r,_)}function st(){v!==r&&Cu(v),b=0,o=w=f=v=r}function He(){return v===r?_:j(Bi())}function at(){var pe=Bi(),bt=B(pe);if(o=arguments,f=this,w=pe,bt){if(v===r)return V(w);if(x)return Cu(v),v=Hr(X,t),M(w)}return v===r&&(v=Hr(X,t)),_}return at.cancel=st,at.flush=He,at}var Zp=Y(function(e,t){return tu(e,1,t)}),Jp=Y(function(e,t,s){return tu(e,_t(t)||0,s)});function jp(e){return Gt(e,Le)}function Gi(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new ft(c);var s=function(){var o=arguments,f=t?t.apply(this,o):o[0],g=s.cache;if(g.has(f))return g.get(f);var _=e.apply(this,o);return s.cache=g.set(f,_)||g,_};return s.cache=new(Gi.Cache||Vt),s}Gi.Cache=Vt;function Qi(e){if(typeof e!="function")throw new ft(c);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 e_(e){return ul(2,e)}var t_=Hg(function(e,t){t=t.length==1&&q(t[0])?le(t[0],nt(H())):le(Ie(t,1),nt(H()));var s=t.length;return Y(function(o){for(var f=-1,g=Ne(o.length,s);++f<g;)o[f]=t[f].call(this,o[f]);return tt(e,this,o)})}),Ea=Y(function(e,t){var s=en(t,er(Ea));return Gt(e,Ee,r,t,s)}),gl=Y(function(e,t){var s=en(t,er(gl));return Gt(e,je,r,t,s)}),n_=Qt(function(e,t){return Gt(e,Ge,r,r,r,t)});function r_(e,t){if(typeof e!="function")throw new ft(c);return t=t===r?t:z(t),Y(e,t)}function i_(e,t){if(typeof e!="function")throw new ft(c);return t=t==null?0:we(z(t),0),Y(function(s){var o=s[t],f=an(s,0,t);return o&&jt(f,o),tt(e,this,f)})}function s_(e,t,s){var o=!0,f=!0;if(typeof e!="function")throw new ft(c);return fe(s)&&(o="leading"in s?!!s.leading:o,f="trailing"in s?!!s.trailing:f),hl(e,t,{leading:o,maxWait:t,trailing:f})}function a_(e){return ol(e,1)}function o_(e,t){return Ea(sa(t),e)}function u_(){if(!arguments.length)return[];var e=arguments[0];return q(e)?e:[e]}function l_(e){return gt(e,T)}function c_(e,t){return t=typeof t=="function"?t:r,gt(e,T,t)}function f_(e){return gt(e,R|T)}function h_(e,t){return t=typeof t=="function"?t:r,gt(e,R|T,t)}function g_(e,t){return t==null||eu(e,t,Ae(t))}function Rt(e,t){return e===t||e!==e&&t!==t}var d_=Mi(zs),p_=Mi(function(e,t){return e>=t}),xn=au((function(){return arguments})())?au:function(e){return ge(e)&&re.call(e,"callee")&&!qo.call(e,"callee")},q=E.isArray,__=bo?nt(bo):yg;function ze(e){return e!=null&&qi(e.length)&&!zt(e)}function de(e){return ge(e)&&ze(e)}function v_(e){return e===!0||e===!1||ge(e)&&ke(e)==Er}var on=Lh||Na,m_=Po?nt(Po):Ag;function S_(e){return ge(e)&&e.nodeType===1&&!Vr(e)}function w_(e){if(e==null)return!0;if(ze(e)&&(q(e)||typeof e=="string"||typeof e.splice=="function"||on(e)||tr(e)||xn(e)))return!e.length;var t=$e(e);if(t==Ct||t==Tt)return!e.size;if(Wr(e))return!Xs(e).length;for(var s in e)if(re.call(e,s))return!1;return!0}function E_(e,t){return Mr(e,t)}function C_(e,t,s){s=typeof s=="function"?s:r;var o=s?s(e,t):r;return o===r?Mr(e,t,r,s):!!o}function Ca(e){if(!ge(e))return!1;var t=ke(e);return t==ii||t==Gc||typeof e.message=="string"&&typeof e.name=="string"&&!Vr(e)}function T_(e){return typeof e=="number"&&Ko(e)}function zt(e){if(!fe(e))return!1;var t=ke(e);return t==si||t==eo||t==Bc||t==qc}function dl(e){return typeof e=="number"&&e==z(e)}function qi(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=et}function fe(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}function ge(e){return e!=null&&typeof e=="object"}var pl=Io?nt(Io):bg;function y_(e,t){return e===t||Ys(e,t,ha(t))}function A_(e,t,s){return s=typeof s=="function"?s:r,Ys(e,t,ha(t),s)}function R_(e){return _l(e)&&e!=+e}function b_(e){if(cd(e))throw new G(l);return ou(e)}function P_(e){return e===null}function I_(e){return e==null}function _l(e){return typeof e=="number"||ge(e)&&ke(e)==Tr}function Vr(e){if(!ge(e)||ke(e)!=Wt)return!1;var t=Si(e);if(t===null)return!0;var s=re.call(t,"constructor")&&t.constructor;return typeof s=="function"&&s instanceof s&&pi.call(s)==Ah}var Ta=xo?nt(xo):Pg;function x_(e){return dl(e)&&e>=-et&&e<=et}var vl=Lo?nt(Lo):Ig;function zi(e){return typeof e=="string"||!q(e)&&ge(e)&&ke(e)==Ar}function it(e){return typeof e=="symbol"||ge(e)&&ke(e)==ai}var tr=No?nt(No):xg;function L_(e){return e===r}function N_(e){return ge(e)&&$e(e)==Rr}function $_(e){return ge(e)&&ke(e)==Kc}var O_=Mi(Zs),U_=Mi(function(e,t){return e<=t});function ml(e){if(!e)return[];if(ze(e))return zi(e)?yt(e):qe(e);if(Ir&&e[Ir])return gh(e[Ir]());var t=$e(e),s=t==Ct?Fs:t==Tt?hi:nr;return s(e)}function Kt(e){if(!e)return e===0?e:0;if(e=_t(e),e===I||e===-I){var t=e<0?-1:1;return t*he}return e===e?e:0}function z(e){var t=Kt(e),s=t%1;return t===t?s?t-s:t:0}function Sl(e){return e?Rn(z(e),0,Qe):0}function _t(e){if(typeof e=="number")return e;if(it(e))return ye;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=Fo(e);var s=_f.test(e);return s||mf.test(e)?Xf(e.slice(2),s?2:8):pf.test(e)?ye:+e}function wl(e){return Ot(e,Ke(e))}function D_(e){return e?Rn(z(e),-et,et):e===0?e:0}function ie(e){return e==null?"":rt(e)}var M_=Jn(function(e,t){if(Wr(t)||ze(t)){Ot(t,Ae(t),e);return}for(var s in t)re.call(t,s)&&Or(e,s,t[s])}),El=Jn(function(e,t){Ot(t,Ke(t),e)}),Ki=Jn(function(e,t,s,o){Ot(t,Ke(t),e,o)}),F_=Jn(function(e,t,s,o){Ot(t,Ae(t),e,o)}),k_=Qt(Gs);function W_(e,t){var s=Zn(e);return t==null?s:jo(s,t)}var H_=Y(function(e,t){e=se(e);var s=-1,o=t.length,f=o>2?t[2]:r;for(f&&We(t[0],t[1],f)&&(o=1);++s<o;)for(var g=t[s],_=Ke(g),v=-1,w=_.length;++v<w;){var b=_[v],P=e[b];(P===r||Rt(P,Kn[b])&&!re.call(e,b))&&(e[b]=g[b])}return e}),V_=Y(function(e){return e.push(r,Fu),tt(Cl,r,e)});function B_(e,t){return Oo(e,H(t,3),$t)}function G_(e,t){return Oo(e,H(t,3),qs)}function Q_(e,t){return e==null?e:Qs(e,H(t,3),Ke)}function q_(e,t){return e==null?e:iu(e,H(t,3),Ke)}function z_(e,t){return e&&$t(e,H(t,3))}function K_(e,t){return e&&qs(e,H(t,3))}function Y_(e){return e==null?[]:Ii(e,Ae(e))}function X_(e){return e==null?[]:Ii(e,Ke(e))}function ya(e,t,s){var o=e==null?r:bn(e,t);return o===r?s:o}function Z_(e,t){return e!=null&&Hu(e,t,wg)}function Aa(e,t){return e!=null&&Hu(e,t,Eg)}var J_=$u(function(e,t,s){t!=null&&typeof t.toString!="function"&&(t=_i.call(t)),e[t]=s},ba(Ye)),j_=$u(function(e,t,s){t!=null&&typeof t.toString!="function"&&(t=_i.call(t)),re.call(e,t)?e[t].push(s):e[t]=[s]},H),ev=Y(Dr);function Ae(e){return ze(e)?Zo(e):Xs(e)}function Ke(e){return ze(e)?Zo(e,!0):Lg(e)}function tv(e,t){var s={};return t=H(t,3),$t(e,function(o,f,g){Bt(s,t(o,f,g),o)}),s}function nv(e,t){var s={};return t=H(t,3),$t(e,function(o,f,g){Bt(s,f,t(o,f,g))}),s}var rv=Jn(function(e,t,s){xi(e,t,s)}),Cl=Jn(function(e,t,s,o){xi(e,t,s,o)}),iv=Qt(function(e,t){var s={};if(e==null)return s;var o=!1;t=le(t,function(g){return g=sn(g,e),o||(o=g.length>1),g}),Ot(e,ca(e),s),o&&(s=gt(s,R|C|T,Jg));for(var f=t.length;f--;)na(s,t[f]);return s});function sv(e,t){return Tl(e,Qi(H(t)))}var av=Qt(function(e,t){return e==null?{}:$g(e,t)});function Tl(e,t){if(e==null)return{};var s=le(ca(e),function(o){return[o]});return t=H(t),du(e,s,function(o,f){return t(o,f[0])})}function ov(e,t,s){t=sn(t,e);var o=-1,f=t.length;for(f||(f=1,e=r);++o<f;){var g=e==null?r:e[Ut(t[o])];g===r&&(o=f,g=s),e=zt(g)?g.call(e):g}return e}function uv(e,t,s){return e==null?e:Fr(e,t,s)}function lv(e,t,s,o){return o=typeof o=="function"?o:r,e==null?e:Fr(e,t,s,o)}var yl=Du(Ae),Al=Du(Ke);function cv(e,t,s){var o=q(e),f=o||on(e)||tr(e);if(t=H(t,4),s==null){var g=e&&e.constructor;f?s=o?new g:[]:fe(e)?s=zt(g)?Zn(Si(e)):{}:s={}}return(f?ct:$t)(e,function(_,v,w){return t(s,_,v,w)}),s}function fv(e,t){return e==null?!0:na(e,t)}function hv(e,t,s){return e==null?e:Su(e,t,sa(s))}function gv(e,t,s,o){return o=typeof o=="function"?o:r,e==null?e:Su(e,t,sa(s),o)}function nr(e){return e==null?[]:Ms(e,Ae(e))}function dv(e){return e==null?[]:Ms(e,Ke(e))}function pv(e,t,s){return s===r&&(s=t,t=r),s!==r&&(s=_t(s),s=s===s?s:0),t!==r&&(t=_t(t),t=t===t?t:0),Rn(_t(e),t,s)}function _v(e,t,s){return t=Kt(t),s===r?(s=t,t=0):s=Kt(s),e=_t(e),Cg(e,t,s)}function vv(e,t,s){if(s&&typeof s!="boolean"&&We(e,t,s)&&(t=s=r),s===r&&(typeof t=="boolean"?(s=t,t=r):typeof e=="boolean"&&(s=e,e=r)),e===r&&t===r?(e=0,t=1):(e=Kt(e),t===r?(t=e,e=0):t=Kt(t)),e>t){var o=e;e=t,t=o}if(s||e%1||t%1){var f=Yo();return Ne(e+f*(t-e+Yf("1e-"+((f+"").length-1))),t)}return js(e,t)}var mv=jn(function(e,t,s){return t=t.toLowerCase(),e+(s?Rl(t):t)});function Rl(e){return Ra(ie(e).toLowerCase())}function bl(e){return e=ie(e),e&&e.replace(wf,uh).replace(kf,"")}function Sv(e,t,s){e=ie(e),t=rt(t);var o=e.length;s=s===r?o:Rn(z(s),0,o);var f=s;return s-=t.length,s>=0&&e.slice(s,f)==t}function wv(e){return e=ie(e),e&&jc.test(e)?e.replace(ro,lh):e}function Ev(e){return e=ie(e),e&&af.test(e)?e.replace(Es,"\\$&"):e}var Cv=jn(function(e,t,s){return e+(s?"-":"")+t.toLowerCase()}),Tv=jn(function(e,t,s){return e+(s?" ":"")+t.toLowerCase()}),yv=xu("toLowerCase");function Av(e,t,s){e=ie(e),t=z(t);var o=t?qn(e):0;if(!t||o>=t)return e;var f=(t-o)/2;return Di(Ti(f),s)+e+Di(Ci(f),s)}function Rv(e,t,s){e=ie(e),t=z(t);var o=t?qn(e):0;return t&&o<t?e+Di(t-o,s):e}function bv(e,t,s){e=ie(e),t=z(t);var o=t?qn(e):0;return t&&o<t?Di(t-o,s)+e:e}function Pv(e,t,s){return s||t==null?t=0:t&&(t=+t),Uh(ie(e).replace(Cs,""),t||0)}function Iv(e,t,s){return(s?We(e,t,s):t===r)?t=1:t=z(t),ea(ie(e),t)}function xv(){var e=arguments,t=ie(e[0]);return e.length<3?t:t.replace(e[1],e[2])}var Lv=jn(function(e,t,s){return e+(s?"_":"")+t.toLowerCase()});function Nv(e,t,s){return s&&typeof s!="number"&&We(e,t,s)&&(t=s=r),s=s===r?Qe:s>>>0,s?(e=ie(e),e&&(typeof t=="string"||t!=null&&!Ta(t))&&(t=rt(t),!t&&Qn(e))?an(yt(e),0,s):e.split(t,s)):[]}var $v=jn(function(e,t,s){return e+(s?" ":"")+Ra(t)});function Ov(e,t,s){return e=ie(e),s=s==null?0:Rn(z(s),0,e.length),t=rt(t),e.slice(s,s+t.length)==t}function Uv(e,t,s){var o=h.templateSettings;s&&We(e,t,s)&&(t=r),e=ie(e),t=Ki({},t,o,Mu);var f=Ki({},t.imports,o.imports,Mu),g=Ae(f),_=Ms(f,g),v,w,b=0,P=t.interpolate||oi,x="__p += '",O=ks((t.escape||oi).source+"|"+P.source+"|"+(P===io?df:oi).source+"|"+(t.evaluate||oi).source+"|$","g"),M="//# sourceURL="+(re.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Gf+"]")+`
|
|
4
|
+
`;e.replace(O,function(B,X,j,st,He,at){return j||(j=st),x+=e.slice(b,at).replace(Ef,ch),X&&(v=!0,x+=`' +
|
|
5
|
+
__e(`+X+`) +
|
|
6
|
+
'`),He&&(w=!0,x+=`';
|
|
7
|
+
`+He+`;
|
|
8
|
+
__p += '`),j&&(x+=`' +
|
|
9
|
+
((__t = (`+j+`)) == null ? '' : __t) +
|
|
10
|
+
'`),b=at+B.length,B}),x+=`';
|
|
11
|
+
`;var V=re.call(t,"variable")&&t.variable;if(!V)x=`with (obj) {
|
|
12
|
+
`+x+`
|
|
13
|
+
}
|
|
14
|
+
`;else if(hf.test(V))throw new G(d);x=(w?x.replace(Yc,""):x).replace(Xc,"$1").replace(Zc,"$1;"),x="function("+(V||"obj")+`) {
|
|
15
|
+
`+(V?"":`obj || (obj = {});
|
|
16
|
+
`)+"var __t, __p = ''"+(v?", __e = _.escape":"")+(w?`, __j = Array.prototype.join;
|
|
17
|
+
function print() { __p += __j.call(arguments, '') }
|
|
18
|
+
`:`;
|
|
19
|
+
`)+x+`return __p
|
|
20
|
+
}`;var K=Il(function(){return ne(g,M+"return "+x).apply(r,_)});if(K.source=x,Ca(K))throw K;return K}function Dv(e){return ie(e).toLowerCase()}function Mv(e){return ie(e).toUpperCase()}function Fv(e,t,s){if(e=ie(e),e&&(s||t===r))return Fo(e);if(!e||!(t=rt(t)))return e;var o=yt(e),f=yt(t),g=ko(o,f),_=Wo(o,f)+1;return an(o,g,_).join("")}function kv(e,t,s){if(e=ie(e),e&&(s||t===r))return e.slice(0,Vo(e)+1);if(!e||!(t=rt(t)))return e;var o=yt(e),f=Wo(o,yt(t))+1;return an(o,0,f).join("")}function Wv(e,t,s){if(e=ie(e),e&&(s||t===r))return e.replace(Cs,"");if(!e||!(t=rt(t)))return e;var o=yt(e),f=ko(o,yt(t));return an(o,f).join("")}function Hv(e,t){var s=Ce,o=Te;if(fe(t)){var f="separator"in t?t.separator:f;s="length"in t?z(t.length):s,o="omission"in t?rt(t.omission):o}e=ie(e);var g=e.length;if(Qn(e)){var _=yt(e);g=_.length}if(s>=g)return e;var v=s-qn(o);if(v<1)return o;var w=_?an(_,0,v).join(""):e.slice(0,v);if(f===r)return w+o;if(_&&(v+=w.length-v),Ta(f)){if(e.slice(v).search(f)){var b,P=w;for(f.global||(f=ks(f.source,ie(so.exec(f))+"g")),f.lastIndex=0;b=f.exec(P);)var x=b.index;w=w.slice(0,x===r?v:x)}}else if(e.indexOf(rt(f),v)!=v){var O=w.lastIndexOf(f);O>-1&&(w=w.slice(0,O))}return w+o}function Vv(e){return e=ie(e),e&&Jc.test(e)?e.replace(no,vh):e}var Bv=jn(function(e,t,s){return e+(s?" ":"")+t.toUpperCase()}),Ra=xu("toUpperCase");function Pl(e,t,s){return e=ie(e),t=s?r:t,t===r?hh(e)?wh(e):rh(e):e.match(t)||[]}var Il=Y(function(e,t){try{return tt(e,r,t)}catch(s){return Ca(s)?s:new G(s)}}),Gv=Qt(function(e,t){return ct(t,function(s){s=Ut(s),Bt(e,s,wa(e[s],e))}),e});function Qv(e){var t=e==null?0:e.length,s=H();return e=t?le(e,function(o){if(typeof o[1]!="function")throw new ft(c);return[s(o[0]),o[1]]}):[],Y(function(o){for(var f=-1;++f<t;){var g=e[f];if(tt(g[0],this,o))return tt(g[1],this,o)}})}function qv(e){return vg(gt(e,R))}function ba(e){return function(){return e}}function zv(e,t){return e==null||e!==e?t:e}var Kv=Nu(),Yv=Nu(!0);function Ye(e){return e}function Pa(e){return uu(typeof e=="function"?e:gt(e,R))}function Xv(e){return cu(gt(e,R))}function Zv(e,t){return fu(e,gt(t,R))}var Jv=Y(function(e,t){return function(s){return Dr(s,e,t)}}),jv=Y(function(e,t){return function(s){return Dr(e,s,t)}});function Ia(e,t,s){var o=Ae(t),f=Ii(t,o);s==null&&!(fe(t)&&(f.length||!o.length))&&(s=t,t=e,e=this,f=Ii(t,Ae(t)));var g=!(fe(s)&&"chain"in s)||!!s.chain,_=zt(e);return ct(f,function(v){var w=t[v];e[v]=w,_&&(e.prototype[v]=function(){var b=this.__chain__;if(g||b){var P=e(this.__wrapped__),x=P.__actions__=qe(this.__actions__);return x.push({func:w,args:arguments,thisArg:e}),P.__chain__=b,P}return w.apply(e,jt([this.value()],arguments))})}),e}function em(){return Pe._===this&&(Pe._=Rh),this}function xa(){}function tm(e){return e=z(e),Y(function(t){return hu(t,e)})}var nm=oa(le),rm=oa($o),im=oa(Ns);function xl(e){return da(e)?$s(Ut(e)):Og(e)}function sm(e){return function(t){return e==null?r:bn(e,t)}}var am=Ou(),om=Ou(!0);function La(){return[]}function Na(){return!1}function um(){return{}}function lm(){return""}function cm(){return!0}function fm(e,t){if(e=z(e),e<1||e>et)return[];var s=Qe,o=Ne(e,Qe);t=H(t),e-=Qe;for(var f=Ds(o,t);++s<e;)t(s);return f}function hm(e){return q(e)?le(e,Ut):it(e)?[e]:qe(Xu(ie(e)))}function gm(e){var t=++yh;return ie(e)+t}var dm=Ui(function(e,t){return e+t},0),pm=ua("ceil"),_m=Ui(function(e,t){return e/t},1),vm=ua("floor");function mm(e){return e&&e.length?Pi(e,Ye,zs):r}function Sm(e,t){return e&&e.length?Pi(e,H(t,2),zs):r}function wm(e){return Do(e,Ye)}function Em(e,t){return Do(e,H(t,2))}function Cm(e){return e&&e.length?Pi(e,Ye,Zs):r}function Tm(e,t){return e&&e.length?Pi(e,H(t,2),Zs):r}var ym=Ui(function(e,t){return e*t},1),Am=ua("round"),Rm=Ui(function(e,t){return e-t},0);function bm(e){return e&&e.length?Us(e,Ye):0}function Pm(e,t){return e&&e.length?Us(e,H(t,2)):0}return h.after=Xp,h.ary=ol,h.assign=M_,h.assignIn=El,h.assignInWith=Ki,h.assignWith=F_,h.at=k_,h.before=ul,h.bind=wa,h.bindAll=Gv,h.bindKey=ll,h.castArray=u_,h.chain=il,h.chunk=vd,h.compact=md,h.concat=Sd,h.cond=Qv,h.conforms=qv,h.constant=ba,h.countBy=bp,h.create=W_,h.curry=cl,h.curryRight=fl,h.debounce=hl,h.defaults=H_,h.defaultsDeep=V_,h.defer=Zp,h.delay=Jp,h.difference=wd,h.differenceBy=Ed,h.differenceWith=Cd,h.drop=Td,h.dropRight=yd,h.dropRightWhile=Ad,h.dropWhile=Rd,h.fill=bd,h.filter=Ip,h.flatMap=Np,h.flatMapDeep=$p,h.flatMapDepth=Op,h.flatten=el,h.flattenDeep=Pd,h.flattenDepth=Id,h.flip=jp,h.flow=Kv,h.flowRight=Yv,h.fromPairs=xd,h.functions=Y_,h.functionsIn=X_,h.groupBy=Up,h.initial=Nd,h.intersection=$d,h.intersectionBy=Od,h.intersectionWith=Ud,h.invert=J_,h.invertBy=j_,h.invokeMap=Mp,h.iteratee=Pa,h.keyBy=Fp,h.keys=Ae,h.keysIn=Ke,h.map=Vi,h.mapKeys=tv,h.mapValues=nv,h.matches=Xv,h.matchesProperty=Zv,h.memoize=Gi,h.merge=rv,h.mergeWith=Cl,h.method=Jv,h.methodOf=jv,h.mixin=Ia,h.negate=Qi,h.nthArg=tm,h.omit=iv,h.omitBy=sv,h.once=e_,h.orderBy=kp,h.over=nm,h.overArgs=t_,h.overEvery=rm,h.overSome=im,h.partial=Ea,h.partialRight=gl,h.partition=Wp,h.pick=av,h.pickBy=Tl,h.property=xl,h.propertyOf=sm,h.pull=kd,h.pullAll=nl,h.pullAllBy=Wd,h.pullAllWith=Hd,h.pullAt=Vd,h.range=am,h.rangeRight=om,h.rearg=n_,h.reject=Bp,h.remove=Bd,h.rest=r_,h.reverse=ma,h.sampleSize=Qp,h.set=uv,h.setWith=lv,h.shuffle=qp,h.slice=Gd,h.sortBy=Yp,h.sortedUniq=Zd,h.sortedUniqBy=Jd,h.split=Nv,h.spread=i_,h.tail=jd,h.take=ep,h.takeRight=tp,h.takeRightWhile=np,h.takeWhile=rp,h.tap=mp,h.throttle=s_,h.thru=Hi,h.toArray=ml,h.toPairs=yl,h.toPairsIn=Al,h.toPath=hm,h.toPlainObject=wl,h.transform=cv,h.unary=a_,h.union=ip,h.unionBy=sp,h.unionWith=ap,h.uniq=op,h.uniqBy=up,h.uniqWith=lp,h.unset=fv,h.unzip=Sa,h.unzipWith=rl,h.update=hv,h.updateWith=gv,h.values=nr,h.valuesIn=dv,h.without=cp,h.words=Pl,h.wrap=o_,h.xor=fp,h.xorBy=hp,h.xorWith=gp,h.zip=dp,h.zipObject=pp,h.zipObjectDeep=_p,h.zipWith=vp,h.entries=yl,h.entriesIn=Al,h.extend=El,h.extendWith=Ki,Ia(h,h),h.add=dm,h.attempt=Il,h.camelCase=mv,h.capitalize=Rl,h.ceil=pm,h.clamp=pv,h.clone=l_,h.cloneDeep=f_,h.cloneDeepWith=h_,h.cloneWith=c_,h.conformsTo=g_,h.deburr=bl,h.defaultTo=zv,h.divide=_m,h.endsWith=Sv,h.eq=Rt,h.escape=wv,h.escapeRegExp=Ev,h.every=Pp,h.find=xp,h.findIndex=Ju,h.findKey=B_,h.findLast=Lp,h.findLastIndex=ju,h.findLastKey=G_,h.floor=vm,h.forEach=sl,h.forEachRight=al,h.forIn=Q_,h.forInRight=q_,h.forOwn=z_,h.forOwnRight=K_,h.get=ya,h.gt=d_,h.gte=p_,h.has=Z_,h.hasIn=Aa,h.head=tl,h.identity=Ye,h.includes=Dp,h.indexOf=Ld,h.inRange=_v,h.invoke=ev,h.isArguments=xn,h.isArray=q,h.isArrayBuffer=__,h.isArrayLike=ze,h.isArrayLikeObject=de,h.isBoolean=v_,h.isBuffer=on,h.isDate=m_,h.isElement=S_,h.isEmpty=w_,h.isEqual=E_,h.isEqualWith=C_,h.isError=Ca,h.isFinite=T_,h.isFunction=zt,h.isInteger=dl,h.isLength=qi,h.isMap=pl,h.isMatch=y_,h.isMatchWith=A_,h.isNaN=R_,h.isNative=b_,h.isNil=I_,h.isNull=P_,h.isNumber=_l,h.isObject=fe,h.isObjectLike=ge,h.isPlainObject=Vr,h.isRegExp=Ta,h.isSafeInteger=x_,h.isSet=vl,h.isString=zi,h.isSymbol=it,h.isTypedArray=tr,h.isUndefined=L_,h.isWeakMap=N_,h.isWeakSet=$_,h.join=Dd,h.kebabCase=Cv,h.last=pt,h.lastIndexOf=Md,h.lowerCase=Tv,h.lowerFirst=yv,h.lt=O_,h.lte=U_,h.max=mm,h.maxBy=Sm,h.mean=wm,h.meanBy=Em,h.min=Cm,h.minBy=Tm,h.stubArray=La,h.stubFalse=Na,h.stubObject=um,h.stubString=lm,h.stubTrue=cm,h.multiply=ym,h.nth=Fd,h.noConflict=em,h.noop=xa,h.now=Bi,h.pad=Av,h.padEnd=Rv,h.padStart=bv,h.parseInt=Pv,h.random=vv,h.reduce=Hp,h.reduceRight=Vp,h.repeat=Iv,h.replace=xv,h.result=ov,h.round=Am,h.runInContext=S,h.sample=Gp,h.size=zp,h.snakeCase=Lv,h.some=Kp,h.sortedIndex=Qd,h.sortedIndexBy=qd,h.sortedIndexOf=zd,h.sortedLastIndex=Kd,h.sortedLastIndexBy=Yd,h.sortedLastIndexOf=Xd,h.startCase=$v,h.startsWith=Ov,h.subtract=Rm,h.sum=bm,h.sumBy=Pm,h.template=Uv,h.times=fm,h.toFinite=Kt,h.toInteger=z,h.toLength=Sl,h.toLower=Dv,h.toNumber=_t,h.toSafeInteger=D_,h.toString=ie,h.toUpper=Mv,h.trim=Fv,h.trimEnd=kv,h.trimStart=Wv,h.truncate=Hv,h.unescape=Vv,h.uniqueId=gm,h.upperCase=Bv,h.upperFirst=Ra,h.each=sl,h.eachRight=al,h.first=tl,Ia(h,(function(){var e={};return $t(h,function(t,s){re.call(h.prototype,s)||(e[s]=t)}),e})(),{chain:!1}),h.VERSION=a,ct(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){h[e].placeholder=h}),ct(["drop","take"],function(e,t){J.prototype[e]=function(s){s=s===r?1:we(z(s),0);var o=this.__filtered__&&!t?new J(this):this.clone();return o.__filtered__?o.__takeCount__=Ne(s,o.__takeCount__):o.__views__.push({size:Ne(s,Qe),type:e+(o.__dir__<0?"Right":"")}),o},J.prototype[e+"Right"]=function(s){return this.reverse()[e](s).reverse()}}),ct(["filter","map","takeWhile"],function(e,t){var s=t+1,o=s==ut||s==En;J.prototype[e]=function(f){var g=this.clone();return g.__iteratees__.push({iteratee:H(f,3),type:s}),g.__filtered__=g.__filtered__||o,g}}),ct(["head","last"],function(e,t){var s="take"+(t?"Right":"");J.prototype[e]=function(){return this[s](1).value()[0]}}),ct(["initial","tail"],function(e,t){var s="drop"+(t?"":"Right");J.prototype[e]=function(){return this.__filtered__?new J(this):this[s](1)}}),J.prototype.compact=function(){return this.filter(Ye)},J.prototype.find=function(e){return this.filter(e).head()},J.prototype.findLast=function(e){return this.reverse().find(e)},J.prototype.invokeMap=Y(function(e,t){return typeof e=="function"?new J(this):this.map(function(s){return Dr(s,e,t)})}),J.prototype.reject=function(e){return this.filter(Qi(H(e)))},J.prototype.slice=function(e,t){e=z(e);var s=this;return s.__filtered__&&(e>0||t<0)?new J(s):(e<0?s=s.takeRight(-e):e&&(s=s.drop(e)),t!==r&&(t=z(t),s=t<0?s.dropRight(-t):s.take(t-e)),s)},J.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},J.prototype.toArray=function(){return this.take(Qe)},$t(J.prototype,function(e,t){var s=/^(?:filter|find|map|reject)|While$/.test(t),o=/^(?:head|last)$/.test(t),f=h[o?"take"+(t=="last"?"Right":""):t],g=o||/^find/.test(t);f&&(h.prototype[t]=function(){var _=this.__wrapped__,v=o?[1]:arguments,w=_ instanceof J,b=v[0],P=w||q(_),x=function(X){var j=f.apply(h,jt([X],v));return o&&O?j[0]:j};P&&s&&typeof b=="function"&&b.length!=1&&(w=P=!1);var O=this.__chain__,M=!!this.__actions__.length,V=g&&!O,K=w&&!M;if(!g&&P){_=K?_:new J(this);var B=e.apply(_,v);return B.__actions__.push({func:Hi,args:[x],thisArg:r}),new ht(B,O)}return V&&K?e.apply(this,v):(B=this.thru(x),V?o?B.value()[0]:B.value():B)})}),ct(["pop","push","shift","sort","splice","unshift"],function(e){var t=gi[e],s=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",o=/^(?:pop|shift)$/.test(e);h.prototype[e]=function(){var f=arguments;if(o&&!this.__chain__){var g=this.value();return t.apply(q(g)?g:[],f)}return this[s](function(_){return t.apply(q(_)?_:[],f)})}}),$t(J.prototype,function(e,t){var s=h[t];if(s){var o=s.name+"";re.call(Xn,o)||(Xn[o]=[]),Xn[o].push({name:t,func:s})}}),Xn[Oi(r,te).name]=[{name:"wrapper",func:r}],J.prototype.clone=Vh,J.prototype.reverse=Bh,J.prototype.value=Gh,h.prototype.at=Sp,h.prototype.chain=wp,h.prototype.commit=Ep,h.prototype.next=Cp,h.prototype.plant=yp,h.prototype.reverse=Ap,h.prototype.toJSON=h.prototype.valueOf=h.prototype.value=Rp,h.prototype.first=h.prototype.head,Ir&&(h.prototype[Ir]=Tp),h}),zn=Eh();Cn?((Cn.exports=zn)._=zn,Ps._=zn):Pe._=zn}).call(xm)})(Br,Br.exports)),Br.exports}var $l=Lm();const W={getRandomId:()=>window.crypto.getRandomValues(new Uint32Array(1))[0],isPromise:i=>i&&W.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=>W.isString(i)?i.replace(/^\/+/g,""):"",trimTrailingSlash:i=>W.isString(i)?i.replace(/\/+$/,""):"",isElementVisible:i=>i?window.getComputedStyle(i).getPropertyValue("display")!=="none":!1,getNodeList:(i,n=!1)=>{const r=[];return i&&Array.from(document.querySelectorAll(i)).forEach(u=>{n?W.isElementVisible(u)&&r.push(u):r.push(u)}),r},prependOrigin:i=>{if(!i||i.startsWith("http"))return i;const n=i.startsWith("/");return i.length?window.location.origin+(n?"":"/")+i:window.location.origin},getConfigValueFromObject:(i,n)=>{let r=0,a=i;const u=n.split(".");for(;a&&r<u.length;)a=a[u[r++]];return a},getConfigBooleanValue:(i,n)=>{const r=W.getConfigValueFromObject(i,n);return r===!0||r==="true"},getUrlParameter:i=>new URLSearchParams(window.location.search).get(i),removeProperties(i,n){const r={};if(!(n instanceof Array)||!n.length)return console.error("[ERROR] removeProperties requires second parameter: array of keys to remove from object."),i;for(const a in i)if(i.hasOwnProperty(a)){const u=n.filter(c=>a.includes(c)).length===0,l=n.filter(c=>c.endsWith("*")).map(c=>c.slice(0,-1)).filter(c=>a.startsWith(c)).length===0;u&&l&&(r[a]=i[a])}return r},replaceVars(i,n,r,a=!0){let u=i;return n&&(a?u=$l.replace(u,/{([\s\S]+?)}/g,l=>{let c=l.slice(1,-1).trim();return c.indexOf(r)===0&&(c=c.substring(r.length)),$l.get(n,c,l)}):Object.entries(n).forEach(l=>{u=u.replace(new RegExp(this.escapeRegExp(r+l[0]),"g"),encodeURIComponent(l[1]))})),a&&(u=u.replace(new RegExp("\\{"+this.escapeRegExp(r)+"[^\\}]+\\}","g"),"")),u},escapeRegExp(i){return i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")},hasHashOrSlash:i=>!!(i&&i.search(/^[#\/].*$/)===0),getPathWithoutHashOrSlash:i=>{for(;W.hasHashOrSlash(i);)i=i.substring(1,i.length);return i}},cr={wrapAsPromise:i=>new Promise(n=>{n(i)}),applyFunctionPromisified:(i,n)=>(i=i.apply(void 0,n),W.isPromise(i)?i:cr.wrapAsPromise(i)),getConfigValueFromObjectAsync:(i,n,...r)=>{const a=W.getConfigValueFromObject(i,n);return W.isFunction(a)?cr.applyFunctionPromisified(a,r):cr.wrapAsPromise(a)}};class Nm{setErrorMessage(n){this.getLuigi().getEngine()?._connector?.showFatalError(n)}getLuigi(){return window.Luigi}getConfigValue(n){return this.getLuigi().getConfigValue(n)}getConfigValueAsync(n){return this.getLuigi().getConfigValueAsync(n)}async executeConfigFnAsync(n,r=!1,...a){const u=this.getConfigValue(n);if(W.isFunction(u))try{return await cr.applyFunctionPromisified(u,a)}catch(l){if(r)return Promise.reject(l)}return Promise.resolve(void 0)}}const Xe=new Nm;class $m{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=Xe.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 Pt=new $m;class Om{isAuthorizationEnabled(){return!!Xe.getConfigValue("auth.use")}login(){this.isAuthorizationEnabled()&&fr.startAuthorization()}logout(){this.isAuthorizationEnabled()&&fr.logout()}async handleAuthEvent(n,r,a,u){const l=await Xe.executeConfigFnAsync("auth.events."+n,!1,r,a),c=l===void 0||!!l;if(c&&u){window.location.href=u;return}return c}get store(){return Xe.getLuigi()?.initialized||console.warn("Luigi Core is not initialized yet. Consider moving your code to the luigiAfterInit lifecycle hook. Documentation: https://docs.luigi-project.io/docs/lifecycle-hooks"),{getStorageKey:()=>Pt.getStorageKey(),getStorageType:()=>Pt.getStorageType(),getAuthData:()=>Pt.getAuthData(),setAuthData:n=>Pt.setAuthData(n),removeAuthData:()=>Pt.removeAuthData(),setNewlyAuthorized:()=>{Pt.setNewlyAuthorized(),fr.resetExpirationChecks()}}}}const ar=new Om;class Um{getStoredAuthData(){return Pt.getAuthData()}isLoggedIn(){const n=this.getStoredAuthData();return!!(n&&n.accessTokenExpirationDate>Number(new Date))}parseUrlAuthErrors(){const n=W.getUrlParameter("error"),r=W.getUrlParameter("errorDescription");if(n)return{error:n,errorDescription:r}}async handleUrlAuthErrors(n,r,a){return r?await ar.handleAuthEvent("onAuthError",n,{error:r,errorDescription:a},n.logoutUrl+"?post_logout_redirect_uri="+n.post_logout_redirect_uri+"&error="+r+"&errorDescription="+a):!0}}const $n=new Um;class Dm{constructor(){this._userInfoStore=rs({}),this._loggedInStore=rs(!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=Xe.getConfigValue("auth.use");if(!n)return Promise.resolve(!0);const r=Xe.getConfigValue(`auth.${n}`),a=$n.parseUrlAuthErrors()||{};if(await $n.handleUrlAuthErrors(r,a.error,a.errorDescription))return this.idpProviderInstance=this.getIdpProviderInstance(n,r),W.isPromise(this.idpProviderInstance)?this.idpProviderInstance.then(l=>(this.idpProviderInstance=l,this.checkAuth(r))).catch(l=>{const c=`Error: ${l.message||l}`;console.error(c,l.message&&l),Xe.setErrorMessage(c)}):this.checkAuth(r)}async checkAuth(n){const r=$n.getStoredAuthData();if(!r||!$n.isLoggedIn()){if(Xe.getConfigValue("auth.disableAutoLogin"))return;let u=!0;return r&&(u=await ar.handleAuthEvent("onAuthExpired",n)),u?this.startAuthorization():void 0}this.idpProviderInstance.settings&&W.isFunction(this.idpProviderInstance.settings.userInfoFn)?this.idpProviderInstance.settings.userInfoFn(this.idpProviderInstance.settings,r).then(u=>{this.setUserInfo(u),this.setLoggedIn(!0)}):W.isFunction(this.idpProviderInstance.userInfo)?this.idpProviderInstance.userInfo(n).then(u=>{this.setUserInfo(u),this.setLoggedIn(!0)}):(this.setLoggedIn(!0),this.setUserInfo(jl(this._userInfoStore))),W.isFunction(Xe.getConfigValue("auth.events.onAuthSuccessful"))&&Pt.isNewlyAuthorized()&&await ar.handleAuthEvent("onAuthSuccessful",n,r),Pt.removeNewlyAuthorized(),W.isFunction(this.idpProviderInstance.setTokenExpirationAction)&&this.idpProviderInstance.setTokenExpirationAction(),W.isFunction(this.idpProviderInstance.setTokenExpireSoonAction)&&this.idpProviderInstance.setTokenExpireSoonAction()}async startAuthorization(){if(this.idpProviderInstance)return this.idpProviderInstance.login().then(n=>{Pt.setNewlyAuthorized(),n&&console.error(n)})}logout(){const n=$n.getStoredAuthData(),r=async l=>{await ar.handleAuthEvent("onLogout",this.idpProviderInstance.settings,void 0,l),Pt.removeAuthData()},a=Xe.getConfigValue(`auth.${Xe.getConfigValue("auth.use")}.logoutFn`),u=Xe.getConfigValueAsync("navigation.profile.logout.customLogoutFn");W.isFunction(a)?a(this.idpProviderInstance.settings,n,r):W.isFunction(this.idpProviderInstance.logout)?this.idpProviderInstance.logout(n,r):u&&W.isFunction(u)?u(n,r):r(this.idpProviderInstance.settings.logoutUrl)}createIdpProviderException(n){return{message:n,name:"IdpProviderException"}}async getIdpProviderInstance(n,r){const a=W.getConfigValueFromObject(r,"idpProvider");if(a){const l=await new a(r);return["login"].forEach(c=>{if(!W.isFunction(l[c]))throw this.createIdpProviderException(`${c} function does not exist in custom IDP Provider ${n}`)}),l}if(W.isFunction(Xe.getConfigValue("auth.events.onAuthConfigError")))await ar.handleAuthEvent("onAuthConfigError",{idpProviderName:n,type:"IdpProviderException"});else throw this.createIdpProviderException(`IDP Provider ${n} does not exist.`)}unload(){this.idpProviderInstance&&W.isFunction(this.idpProviderInstance.unload)&&this.idpProviderInstance.unload()}resetExpirationChecks(){this.idpProviderInstance&&W.isFunction(this.idpProviderInstance.resetExpirationChecks)&&this.idpProviderInstance.resetExpirationChecks()}}const fr=new Dm,Mm={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"}}},Fm=Mm,is={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 n=i;const r=["i","b","br","mark","strong","em","small","del","ins","sub","sup"];for(let a=0;a<r.length;a++){const u=new RegExp(`<${r[a]}/>`,"g"),l=new RegExp(`<${r[a]} />`,"g"),c=new RegExp(`<${r[a]}>`,"g"),d=new RegExp(`<${r[a]} >`,"g"),p=new RegExp(`</${r[a]}[/]>`,"g"),m=new RegExp(`</${r[a]} [/]>`,"g"),y=new RegExp(`<[/]${r[a]}>`,"g"),R=new RegExp(`<[/]${r[a]} >`,"g");n=n.replace(u,`<${r[a]}>`).replace(l,`<${r[a]}>`).replace(c,`<${r[a]}>`).replace(d,`<${r[a]}>`).replace(p,`</${r[a]}>`).replace(m,`</${r[a]}>`).replace(y,`</${r[a]}>`).replace(R,`</${r[a]}>`)}return n},sanatizeHtmlExceptTextFormatting(i=""){return this.restoreSanitizedElements(this.sanitizeHtml(i))},sanitizeParam(i=""){return String(i).replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'").replace(/\//g,"/")},escapeKeyForRegexp(i=""){return i.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")},processTextAndLinks(i="",n,r){const u={sanitizedText:this.restoreSanitizedBrs(this.sanitizeHtml(i)),links:[]};return n?Object.entries(n).reduce((l,[c,d])=>{const p=`_luigi_alert_${r}_link_${this.sanitizeParam(c)}`,m=this.restoreSanitizedBrs(this.sanitizeHtml(d.text)),y=`<a id="${p}">${m}</a>`,R=this.escapeKeyForRegexp(c),C=new RegExp(`({${R}})`,"g");return{sanitizedText:l.sanitizedText.replace(C,y),links:l.links.concat({elemId:p,url:d.url?encodeURI(this.sanitizeHtml(d.url)):void 0,dismissKey:d.dismissKey?encodeURI(this.sanitizeHtml(d.dismissKey)):void 0})}},u):u}};class km{constructor(n){this.luigi=n,this.currentLocaleStorageKey="luigi.currentLocale",this.defaultLocale="en",this.listeners={},this.translationTable=Fm}_init(){this._initCustomImplementation(),this.addCurrentLocaleChangeListener(n=>{this.broadcastLocaleToAllContainers(n)})}getCurrentLocale(){return sessionStorage.getItem(this.currentLocaleStorageKey)||this.defaultLocale}setCurrentLocale(n,r){if(!r?.clientPermissions?.changeCurrentLocale){console.error('Current locale change declined from client, as client permission "changeCurrentLocale" is not set for this view.');return}n&&(r&&(r.locale=n),sessionStorage.setItem(this.currentLocaleStorageKey,n),this._notifyLocaleChange(n)),this.luigi.getEngine()._connector?.setCurrentLocale(n)}addCurrentLocaleChangeListener(n){let r=null;return W.isFunction(n)?(r=W.getRandomId(),this.listeners[r]=n):console.error("Provided locale change listener is not a function."),r}removeCurrentLocaleChangeListener(n){n&&this.listeners[n]?delete this.listeners[n]:console.error("Unable to remove locale change listener - no listener registered for given ID.")}getTranslation(n,r=void 0,a=void 0){if(!n)return"";if(this.translationImpl){const l=this.translationImpl.getTranslation(n,r,a);if(l!==n)return l}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"),W.isFunction(this.translationImpl)&&(this.translationImpl=this.translationImpl())}broadcastLocaleToAllContainers(n){const r=W.getNodeList("luigi-container[lui_container]");r?.length&&n&&r.forEach(a=>{a.locale=n,a.updateContext({locale:n})})}findTranslation(n,r,a){const u=n.split(".");for(let l=0;l<u.length;l++){const c=u[l];if(Object.prototype.hasOwnProperty.call(r,c)&&typeof r[c]=="object")r=r[c];else return a?this.findInterpolations(r[c],a):r[c]}}findInterpolations(n,r){return typeof n!="string"||!n.trim()||Object.keys(r).forEach(a=>{n=n.replace(new RegExp("{"+is.escapeKeyForRegexp(a)+"}","gi"),r[a])}),n}}const Wm={luigiAfterInit:async i=>{W.getConfigBooleanValue(i.getConfig(),"settings.appLoadingIndicator.hideAutomatically")&&setTimeout(()=>{i.ux().hideAppLoadingIndicator()},0),await Xe.executeConfigFnAsync("lifecycleHooks.luigiAfterInit")}};class Hm{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 W.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(a){console.warn("onInternalClose threw an error",a)}this.clearModalStack()}registerModal(n){n&&this._modalStack.push(n)}getModalSettings(){return this._modalStack.length>0?this._modalStack[0].modalsettings||{}:{}}getModalStackLength(){return this._modalStack.length}updateFirstModalSettings(n){if(this._modalStack.length>0){const r=this._modalStack[0];r.modalsettings={...r.modalsettings,...n}}}clearModalStack(){this._modalStack=[]}removeLastModalFromStack(){this._modalStack.pop()}}const xe={normalizePath:i=>{if(!i||i.length<=0)return i;let n=i;return n.startsWith("#")&&(n=n.substring(1)),n.startsWith("/")&&(n=n.substring(1)),n},segmentMatches:(i,n,r)=>!!(i===n||n.startsWith(":")&&r&&r[n.substr(1)]===i),checkMatch:(i,n,r)=>{let a=!0;return W.trimTrailingSlash(W.trimLeadingSlash(i)).split("/").forEach((u,l)=>{a&&(l+1>=n.length||!n[l+1]?.pathSegment||!xe.segmentMatches(u,n[l+1]?.pathSegment??"",r??{}))&&(a=!1)}),a},checkVisibleForFeatureToggles:(i,n)=>{if(i?.visibleForFeatureToggles){const r=n?.getActiveFeatureToggleList()||[];for(const a of i.visibleForFeatureToggles)if(a.startsWith("!")){if(r.includes(a.slice(1)))return!1}else if(!r.includes(a))return!1}return!0},generateTooltipText:(i,n,r)=>{let a=i?.tooltipText;switch(a===void 0&&(a=r.getConfigValue("navigation.defaults.tooltipText")),a){case void 0:return n;case!1:return"";default:return r.i18n().getTranslation(a)}},isNodeAccessPermitted:(i,n,r,a)=>{if(a.auth().isAuthorizationEnabled()){const c=$n.isLoggedIn(),d=i.anonymousAccess;if(c&&d==="exclusive"||!c&&d!=="exclusive"&&d!==!0)return!1}const u=a.featureToggles();if(!xe.checkVisibleForFeatureToggles(i,u))return!1;const l=a.getConfigValue("navigation.nodeAccessibilityResolver");return typeof l!="function"?!0:l(i,n,r)},updateHeaderTitle:(i,n)=>{const r=i?.items;if(r&&n){let a="";return[...r].sort((u,l)=>(l.link||"").localeCompare(u.link||"")).some(u=>{let l=!1;if(l=xe.checkMatch(u.link||"",n.nodesInPath??[]),!l&&u.selectionConditions&&u.selectionConditions.route&&(l=xe.checkMatch(u.selectionConditions.route,n.nodesInPath??[]),l&&(u.selectionConditions.contextCriteria||[]).forEach(c=>{l=l&&n?.selectedNode?.context?.[c.key]===c.value})),l)return a=u.title||"",!0}),a}},buildPath(i,n){return i.map(a=>{const u=a.pathSegment;if(u?.startsWith(":")){const l=u.slice(1),c=n?.pathParams?.[l];if(c!=null)return encodeURIComponent(String(c))}return u}).join("/")},mergeContext(...i){return Object.assign({},...i)},prepareForTests(...i){let n="";return i.forEach(r=>{r&&(n+=(n?"_":"")+encodeURIComponent(r.toLowerCase().split(" ").join("")))}),n},findVirtualTreeRootNode(i){if(i.virtualTree)return i;if(i.parent)return xe.findVirtualTreeRootNode(i.parent)}};class _n{constructor(){this.dataManagement=new Map}setChildren(n,r){this.dataManagement.set(n,r),this.navPath=""}getChildren(n){return n?this.dataManagement.get(n):{}}hasChildren(n){const r=this.getChildren(n);return!!(r&&Object.prototype.hasOwnProperty.call(r,"children"))}setRootNode(n){this.dataManagement.set("_luigiRootNode",{node:n})}getRootNode(){return this.dataManagement.get("_luigiRootNode")}hasRootNode(){return!!this.getRootNode()}deleteCache(){this.dataManagement.clear()}deleteNodesRecursively(n){if(this.hasChildren(n)){const r=this.getChildren(n).children;for(let a=0;a<r.length;a++)this.deleteNodesRecursively(r[a])}this.dataManagement.delete(n)}}const k={defaultContentViewParamPrefix:"~",defaultQueryParamSeparator:"?",defaultModalViewParamName:"modal",addParamsOnHashRouting(i,n,r){let a=n;const[u,l]=a.split("?"),c=new URLSearchParams(l);return this.modifySearchParams(i,c,r),a=u,c.toString()!==""&&(a+=`?${c.toString()}`),a},modifySearchParams(i,n,r){for(const[a,u]of Object.entries(i)){const l=r?`${r}${a}`:a;n.set(l,u),u===void 0&&n.delete(l)}},filterNodeParams(i,n){const r={},a=this.getContentViewParamPrefix(n);return i&&Object.entries(i).forEach(u=>{if(u[0].startsWith(a)){const l=u[0].substr(a.length);r[l]=u[1]}}),this.sanitizeParamsMap(r)},getContentViewParamPrefix(i){let n=i?.getConfigValue("routing.nodeParamPrefix");return n===!1?n="":n||(n=this.defaultContentViewParamPrefix),n},sanitizeParamsMap(i){return Object.entries(i).reduce((n,r)=>(n[is.sanitizeParam(r[0])]=is.sanitizeParam(r[1]),n),{})},prepareSearchParamsForClient(i,n){const r={};return i&&i.clientPermissions&&i.clientPermissions.urlParameters&&Object.keys(i.clientPermissions.urlParameters).forEach(a=>{a in n.routing().getSearchParams()&&i.clientPermissions?.urlParameters&&i.clientPermissions.urlParameters[a]?.read===!0&&(r[a]=n.routing().getSearchParams()[a])}),r},getCurrentPath(i){if(i){const n=xe.normalizePath(location.hash),[r,a]=n.split("?");return{path:r,query:a}}else return{path:xe.normalizePath(location.pathname),query:location.search}},getModalPathFromPath(i){return this.getQueryParam(this.getModalViewParamName(i),i)},getQueryParam(i,n){return this.getQueryParams(n)[i]},getQueryParams(i){return i.getConfigValue("routing.useHashRouting")?this.getLocationHashQueryParams():this.getLocationSearchQueryParams()},getLocationSearchQueryParams(){return k.getLocation().search?k.parseParams(k.getLocation().search.slice(1)):{}},getLocation(){return location},getLocationHashQueryParams(){const i=k.getLocation().hash.indexOf(this.defaultQueryParamSeparator);return i!==-1?k.parseParams(k.getLocation().hash.slice(i+1)):{}},getModalViewParamName(i){let n=i.getConfigValue("routing.modalPathParam");return n||(n=this.defaultModalViewParamName),n},parseParams(i){const n=new URLSearchParams(i),r=new Map;for(const[a,u]of n.entries())r.set(a,u);return Object.fromEntries(r)},getModalParamsFromPath(i){const n=this.getQueryParam(`${this.getModalViewParamName(i)}Params`,i);return n&&JSON.parse(n)},getHashQueryParamSeparator(){return this.defaultQueryParamSeparator},getURLWithoutModalData(i,n){const r=new URLSearchParams(i);return r.delete(n),r.delete(`${n}Params`),r.toString()},handleHistoryState(i,n){return i&&i.modalHistoryLength?i.modalHistoryLength+=1:i={modalHistoryLength:1,historygap:history.length,pathBeforeHistory:n},i},encodeParams(i){const n=[];for(const r in i)n.push(encodeURIComponent(r)+"="+encodeURIComponent(i[r]));return n.join("&")},getLastNodeObject(i){return(i.nodesInPath?[...i.nodesInPath].pop():{})||{}},checkWCUrl(i,n){if(i.indexOf("://")>0||i.trim().indexOf("//")===0){if(new URL(i).host===window.location.host)return!0;const a=n.getConfigValue("navigation.validWebcomponentUrls");if(a?.length>0)for(const u of a)try{if(new RegExp(u).test(i))return!0}catch(l){console.error(l)}return!1}return!0},setFeatureToggles(i,n,r){const a=this.sanitizeParamsMap(this.parseParams(n.split("?")[1]));let u;if(a[i]&&(u=a[i]),!u)return;const l=u.split(",");l.length>0&&l[0]!==""&&l.forEach(c=>r?.setFeatureToggle(c,!0))},substituteDynamicParamsInObject(i,n,r=":",a=!1){return Object.entries(i).map(([u,l])=>{const c=a?Object.keys(n).find(d=>l&&l.indexOf(r+d)>=0):Object.keys(n).find(d=>l===r+d);return[u,c?a?l.replace(r+c,n[c]):n[c]:l]}).reduce((u,[l,c])=>Object.assign(u,{[l]:c}),{})},isDynamicNode(i){return typeof i.pathSegment=="string"&&i.pathSegment.length>0&&i.pathSegment[0]===":"},getDynamicNodeValue(i,n){return this.isDynamicNode(i)&&i.pathSegment?n[i.pathSegment.substring(1)]:void 0},getNodePath(i,n){return!i||n?i?this.buildRoute(i,i.pathSegment?"/"+i.pathSegment:"",n):"":`${i.parent?this.getNodePath(i.parent):""}/${i.pathSegment}`},buildRoute(i,n,r){return i.parent?this.buildRoute(i.parent,`/${i.parent.pathSegment}${n}`,r):n+(r?"?"+r:"")},substituteViewUrl(i,n,r){return i=W.replaceVars(i,n,":",!1),i},getSubPath(i,n){return W.replaceVars(k.getNodePath(i),n,":",!1)},concatenatePath(i,n){let r=W.getPathWithoutHashOrSlash(i);return r?(n&&(r.endsWith("/")&&(r=r.substring(0,r.length-1)),n.startsWith("/")||(r+="/"),r+=n),r):n}},$a={logout:{label:"Sign Out",icon:"log"}};class Vm{constructor(){this.services=new Map}register(n,r,a=!0){this.services.set(n,{factory:r,singleton:a})}get(n){const r=this.services.get(n);if(!r)throw new Error(`Service '${n}' is not registered.`);return r.singleton?(r.instance||(r.instance=r.factory()),r.instance):r.factory()}}const ee=new Vm;class vn{constructor(n){this.luigi=n}getModalService(){return this.modalService||(this.modalService=ee.get(pn)),this.modalService}getNodeDataManagementService(){return this.nodeDataManagementService||(this.nodeDataManagementService=ee.get(_n)),this.nodeDataManagementService}async getPathData(n){const r=this.luigi.getConfig();let a=n.split("/");a?.length>0&&a[0]===""&&(a=a.slice(1));let l=r.navigation?.globalContext||{},c;if(this.getNodeDataManagementService().hasRootNode())c=this.getNodeDataManagementService().getRootNode().node;else{let m=await this.luigi.getConfigValueAsync("navigation.nodes");typeof m=="object"&&!Array.isArray(m)?(c=m,c.pathSegment&&(c.pathSegment="",console.warn("Root node must have an empty path segment. Provided path segment will be ignored."))):c={children:m},c.children=await this.getChildren(c,l),c.children=this.prepareRootNodes(c.children||[],l),this.getNodeDataManagementService().setRootNode(c)}let d={};const p={selectedNodeChildren:c.children,nodesInPath:[c],rootNodes:c.children,pathParams:d};if(c.viewUrl&&a.length===0)p.selectedNode=c;else for(const m of a)if(p.selectedNodeChildren){const y=this.findMatchingNode(m,p.selectedNodeChildren||[]);if(!y){console.warn("No matching node found for segment:",m);break}const R=y.context||{},C=xe.mergeContext(l,R);let T=C;if(y.pathSegment?.startsWith(":")&&(d[y.pathSegment.replace(":","")]=is.sanitizeParam(m),T=k.substituteDynamicParamsInObject(C,d)),l=T,y.context=T,p.selectedNode=y,p.selectedNode&&p.nodesInPath?.push(p.selectedNode),y.virtualTree||y._virtualTree){const L=this.buildVirtualTree(y,m,d);L&&L.length>0&&(y.children=L)}p.selectedNodeChildren=await this.getChildren(y,l)}return p}findMatchingNode(n,r){let a;const u=r.filter(c=>!!c.pathSegment).length,l=r.filter(c=>c.pathSegment&&c.pathSegment.startsWith(":")).length;if(u>1&&(l===1&&(console.warn(`Invalid node setup detected.
|
|
2
21
|
Static and dynamic nodes cannot be used together on the same level. Static node gets cleaned up.
|
|
3
22
|
Remove the static node from the configuration to resolve this warning.
|
|
4
|
-
Affected pathSegment:`,
|
|
23
|
+
Affected pathSegment:`,n,"Children:",r),r=r.filter(c=>c.pathSegment&&c.pathSegment.startsWith(":"))),l>1)){console.error(`Invalid node setup detected.
|
|
5
24
|
Multiple dynamic nodes are not allowed on the same level. Stopped navigation.
|
|
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,s;const n=t??await this.getPathData(e);if(e=="")return(r=n.rootNodes[0])==null?void 0:r.pathSegment;if(n.selectedNode&&!n.selectedNode.viewUrl&&((s=n.selectedNode.children)!=null&&s.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
|
-
|
|
8
|
-
grid-template-columns: ${r.columns||"auto"};
|
|
9
|
-
|
|
10
|
-
grid-
|
|
25
|
+
Invalid Children:`,r);return}return r.some(c=>{if(c.pathSegment===n||c.pathSegment&&c.pathSegment.startsWith(":"))return a=c,!0}),a}buildNavItems(n,r,a){const u={},l=[];return n?.forEach(c=>{if(xe.isNodeAccessPermitted(c,this.getParentNode(a.selectedNode,a),a?.selectedNode?.context||{},this.luigi))if(c.category){const d=c.category.id||c.category.label||c.category,p=this.luigi.i18n().getTranslation(c.category.label||c.category.id||c.category);let m=u[d];m||(m={category:{altText:c.category.altText||"",icon:c.category.icon,id:d,label:p,nodes:[],tooltip:this.resolveTooltipText(c.category,p)}},u[d]=m,l.push(m)),m.category?.nodes?.push({node:c,selected:c===r,label:c.label?this.luigi.i18n().getTranslation(c.label):void 0,tooltip:c.label?this.resolveTooltipText(c,c.label):void 0,altText:c.altText,icon:c.icon})}else l.push({altText:c.altText,icon:c.icon,label:c.label?this.luigi.i18n().getTranslation(c.label):void 0,tooltip:c.label?this.resolveTooltipText(c,c.label):void 0,node:c,selected:c===r})}),l}async shouldRedirect(n,r){const a=r??await this.getPathData(n);if(n=="")return a?.nodesInPath?.[0].viewUrl?void 0:a?.rootNodes?.[0]?.pathSegment;if(a?.selectedNode&&!a.selectedNode.viewUrl&&a.selectedNode.children?.length)return n+"/"+a.selectedNode.children[0].pathSegment}async getCurrentNode(n){const r=await this.getPathData(n),a=r.selectedNode;if(!(!a||!xe.isNodeAccessPermitted(a,this.getParentNode(r.selectedNode,r),r?.selectedNode?.context||{},this.luigi)))return a}async getPathParams(n){return(await this.getPathData(n)).pathParams}getTruncatedChildren(n){let r=!1,a=!1,u=[];return n.slice().reverse().forEach(l=>{(!r||l.tabNav)&&(l.tabNav===!1&&(a=!0),l.keepSelectedForChildren===!1?r=!0:(l.keepSelectedForChildren||l.tabNav&&!a)&&(r=!0,u=[])),u.push(l)}),u.reverse()}applyNavGroups(n){const r={},a=[],l=[];return n.forEach(c=>{if(c.node)l.push(c);else if(c.category){const d=c.category.id;d&&d.indexOf("::")>0?a.push(c):(c.category.isGroup,r[d]=c,l.push(c))}}),a.forEach(c=>{const d=c.category?.id.split("::")[0]||"",p=r[d];p&&p.category&&(p.category.isGroup||(p.category.isGroup=!0),p.category.nodes||(p.category.nodes=[]),p.category.nodes.push(c))}),l.filter(c=>{if(c.category?.isGroup&&c.category?.nodes&&c.category?.nodes.length>0){for(let d=0;d<c.category?.nodes.length;d++){const p=c.category?.nodes[d];if(p.node&&!p.node.hideFromNav&&p.node.label||p.category?.nodes&&p.category.nodes.filter(m=>!m.node?.hideFromNav&&m.node?.label).length>0)return!0}return!1}return!0})}async getLeftNavData(n,r){const a=r??await this.getPathData(n);if(n===""&&a?.nodesInPath?.[0].viewUrl)return{items:[],basePath:"",selectedNode:void 0,navClick:void 0};let u=[];const l=[];let c="";a.nodesInPath?.forEach(T=>{T.children&&(T.tabNav||(c+="/"+(T.pathSegment||"")),l.push(T))});const d=this.getTruncatedChildren(a.nodesInPath);let p=[...d].pop(),m=a.selectedNode;(p?.keepSelectedForChildren||p?.tabNav)&&(m=p,d.pop(),p=[...d].pop());let y,R=m;m?a.rootNodes.includes(m)?(y=m,R=void 0):m.tabNav||m.keepSelectedForChildren?y=p:y=[...l].pop():(y=[...l].pop(),R=void 0);let C=await this.getChildren(y,y?.context||{})||[];return u=this.buildNavItems(C,R,a),u=this.applyNavGroups(u),{selectedNode:m,items:u,basePath:c.replace(/\/\/+/g,"/"),sideNavFooterText:this.luigi.getConfig().settings?.sideNavFooterText,navClick:T=>T.node&&this.navItemClick(T.node,a)}}navItemClick(n,r){let a=k.getNodePath(n),u=r?.pathParams;if(a=W.replaceVars(a,u||{},":",!1),!a&&a!==""){console.error("Navigation error: could not build path for the node. Check if pathSegment is defined for all nodes in the path and if there are no duplicate pathSegments on the same level.");return}this.luigi.navigation().navigate(a)}async getTopNavData(n,r){const a=this.luigi.getConfig(),u=r??await this.getPathData(n),l=a.navigation?.profile?.items?.length?JSON.parse(JSON.stringify(a.navigation.profile.items)):[],c=a.navigation?.appSwitcher&&this.getAppSwitcherData(a.navigation?.appSwitcher,a.settings?.header),d=xe.updateHeaderTitle(c,u);l?.length&&l.map(T=>({...T,label:this.luigi.i18n().getTranslation(T.label||"")}));const p=this.luigi.i18n().getTranslation(a.navigation?.profile?.logout?.label)||$a.logout.label,m=T=>{if(T.openNodeInModal&&!T.externalLink?.url)this.luigi.navigation().openAsModal(T.link||"",T.openNodeInModal===!0?{}:T.openNodeInModal);else if(T.link)this.luigi.navigation().navigate(T.link);else if(T.externalLink?.url)if(T.externalLink.sameWindow)window.location.href=T.externalLink.url;else{const L=window.open(T.externalLink.url,"_blank","noopener noreferrer");L&&(L.opener=null,L.focus())}},y={authEnabled:this.luigi.auth().isAuthorizationEnabled(),signedIn:this.luigi.auth().isAuthorizationEnabled()&&$n.isLoggedIn(),items:l,itemClick:m,logout:{altText:this.luigi.i18n().getTranslation(a.navigation?.profile?.logout?.altText)||$a.logout.label,label:p,icon:a.navigation?.profile?.logout?.icon||$a.logout.icon,testId:a.navigation?.profile?.logout?.testId||xe.prepareForTests(p),doLogout:()=>{fr.logout()}},onUserInfoUpdate:T=>{this.luigi.getConfigValueAsync("navigation.profile.staticUserInfoFn").then(L=>{L?T(L):fr.getUserInfoStore().subscribe(D=>{T(D)})})}},R=u.selectedNode,C=R&&u.rootNodes.includes(R)?R:void 0;return{appTitle:d||a.settings?.header?.title,logo:a.settings?.header?.logo,topNodes:this.buildNavItems(u.rootNodes,C,u),productSwitcher:a.navigation?.productSwitcher,profile:this.luigi.auth().isAuthorizationEnabled()||a.navigation?.profile?y:void 0,appSwitcher:a.navigation?.appSwitcher&&this.getAppSwitcherData(a.navigation?.appSwitcher,a.settings?.header),navClick:T=>T.node&&this.navItemClick(T.node,u)}}getParentNode(n,r){if(n&&n===r.nodesInPath?.[r.nodesInPath.length-1])return r.nodesInPath[r.nodesInPath.length-2]}getAppSwitcherData(n,r){const a=n,u=a?.showMainAppEntry;if(a&&a.items&&u){const l={title:this.luigi.i18n().getTranslation(r.title||""),subTitle:r.subTitle,link:"/"};if(a.items?.map(c=>({...c,title:this.luigi.i18n().getTranslation(c.title||"")})),a.items.some(c=>c.link===l.link))return a;a.items.unshift(l)}return a}async getTabNavData(n,r){const a=r??await this.getPathData(n);if(n===""&&a?.nodesInPath?.[0].viewUrl)return{};const u=a?.selectedNode;let l;if(!u)return{};if(!u.tabNav&&(l=this.getParentNode(u,a),l&&!l.tabNav))return{};let c="";a.nodesInPath?.forEach(m=>{m.children&&(c+="/"+(m.pathSegment||""))});const d=l?this.getTruncatedChildren(l.children):this.getTruncatedChildren(u.children),p=this.buildNavItems(d,u,a);return{selectedNode:u,items:p,basePath:c.replace(/\/\/+/g,"/"),navClick:m=>m.node&&this.navItemClick(m.node,a)}}onNodeChange(n,r){const a=this.luigi.getConfigValue("navigation.nodeChangeHook");W.isFunction(a)?a(n,r):a!==void 0&&console.warn("nodeChangeHook is not a function!")}async extractDataFromPath(n){const r=await this.getPathData(n);return{nodeObject:k.getLastNodeObject(r),pathData:r}}async shouldPreventNavigation(n){return!!(n?.onNodeActivation&&(W.isFunction(n.onNodeActivation)||W.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 xe.generateTooltipText(n,r,this.luigi)}prepareRootNodes(n,r){const a=n;return a.length&&a.forEach(u=>{u.isRootNode=!0}),a}getAccessibleNodes(n,r,a){return r?r.filter(u=>xe.isNodeAccessPermitted(u,n,a,this.luigi)):[]}async handleNavigationRequest(n,r){const{path:a,preserveView:u,modalSettings:l,newTab:c,withoutSync:d,preventContextUpdate:p,preventHistoryEntry:m,options:y}=n;let R=await this.buildPath(a,y||{});const C=R.replace(/\/\/+/g,"/"),T=m?"replaceState":"pushState";if(l)l.keepPrevious||this.getModalService().closeModals(),this.luigi.navigation().openAsModal(C,l,r);else{const L={detail:{preventContextUpdate:!!p,preventHistoryEntry:!!m,withoutSync:!!d}};if(await ee.get(pn).closeModals(),c){await this.openViewInNewTab(R);return}const D=this.luigi.getConfigValue("routing.disableBrowserHistory")?"replaceState":T;if(this.luigi.getConfig().routing?.useHashRouting)if(!d&&D!=="replaceState")location.hash=C;else{const F=new CustomEvent("hashchange",L);window.history[D]({path:"/#"+C},"","/#"+C),window.dispatchEvent(F)}else{const F=new CustomEvent("popstate",L);window.history[D]({path:C},"",C),window.dispatchEvent(F)}}}async getChildren(n,r={}){const a=ee.get(_n);if(!n)return[];let u=[];if(a.hasChildren(n)){let c=a.getChildren(n);c&&(u=c.children)}else try{u=await cr.getConfigValueFromObjectAsync(n,"children",r||n.context),u==null&&(u=[]),u=u.map(c=>this.getExpandStructuralPathSegment(c)).map(c=>this.bindChildToParent(c,n))||[]}catch(c){console.error("Could not lazy-load children for node",c)}let l=this.getAccessibleNodes(n,u,r);return a.setChildren(n,{children:u,filteredChildren:l}),l}getExpandStructuralPathSegment(n){if(n&&n.pathSegment&&n.pathSegment.indexOf("/")!==-1){const r=n.pathSegment.split("/"),a={...n},u=(l,c)=>{const d=l.shift();let p={};return l.length?(p.pathSegment=d,c.hideFromNav&&(p.hideFromNav=c.hideFromNav),p.children=[u(l,c)]):(p=a,p.pathSegment=d),p};return u(r,n)}return n}bindChildToParent(n,r){return r&&r.pathSegment&&(n.parent=r),n}buildVirtualTree(n,r,a){const u=n.virtualTree,l=n._virtualTree,c=n._virtualViewUrl||n.viewUrl;if((u||l)&&r){let d=typeof n._virtualPathIndex=="number"?n._virtualPathIndex:void 0;u&&(d=void 0,n.keepSelectedForChildren=!0);const p=50;if(typeof d=="number"&&d>p)return;const m=(d??0)+1;if(m>p)return;const y=["_*","virtualTree","parent","children","keepSelectedForChildren","navigationContext"],R=W.removeProperties(n,y);Object.assign(R,{pathSegment:":virtualSegment_"+m,label:":virtualSegment_"+m,viewUrl:W.trimTrailingSlash(this.buildVirtualViewUrl(c||"",a,m)),_virtualTree:!0,_virtualPathIndex:m,_virtualViewUrl:c});const C=Array.isArray(n.children)&&n.children.length>0?n.children[0]._virtualTree:!1;return n.children&&!C&&console.warn(`Found both virtualTree and children nodes defined on a navigation node.
|
|
26
|
+
Children nodes are redundant and ignored when virtualTree is enabled.
|
|
27
|
+
Please refer to documentation`),[R]}}buildVirtualViewUrl(n,r,a){let u="";for(const l in r)l.startsWith("virtualSegment")&&(u+=":"+l+"/");return a?(u+=":virtualSegment_"+a+"/",n+"/"+u):n}async buildPath(n,r){const{fromVirtualTreeRoot:a,fromContext:u,fromClosestContext:l,fromParent:c}=r;if(!a&&!u&&!l&&!c)return n;const d=this.luigi.getConfigValue("routing.useHashRouting"),{path:p,query:m}=k.getCurrentPath(d),y=p+(m?"?"+m:""),R=await this.getPathData(y),C=R.nodesInPath;if(C===void 0)return console.warn("No nodes in path found for current path:",y),n;if(a){let T="";const L=[...C].map((F,te)=>F.virtualTree?te:-1).filter(F=>F!==-1).pop();return C.forEach((F,te)=>{F.pathSegment&&(L===void 0||te<=L)&&(T+="/"+F.pathSegment)}),T+="/"+n}else if(u){const T=u,L=[...C].reverse().find(F=>T===F.navigationContext);return k.concatenatePath(k.getSubPath(L,R.pathParams),n)}else if(l){const T=[...C].reverse().find(D=>D.navigationContext&&D.navigationContext.length>0);return k.concatenatePath(k.getSubPath(T,R.pathParams),n)}else if(c)return k.concatenatePath(k.getSubPath(R.selectedNode?.parent,R.pathParams),n);return n}}function cn(){}function ec(i){return i()}function Ol(){return Object.create(null)}function ss(i){i.forEach(ec)}function tc(i){return typeof i=="function"}function nc(i,n){return i!=i?n==n:i!==n||i&&typeof i=="object"||typeof i=="function"}let Xi,Yr;function Ul(i,n){return i===n||(Xi||(Xi=document.createElement("a")),Xi.href=n,i===Xi.href)}function Bm(i,n,r){const a=(function(u){if(!u)return document;const l=u.getRootNode?u.getRootNode():u.ownerDocument;return l&&l.host?l:u.ownerDocument})(i);if(!a.getElementById(n)){const u=dr("style");u.id=n,u.textContent=r,(function(l,c){(function(d,p){d.appendChild(p)})(l.head||l,c),c.sheet})(a,u)}}function Un(i,n,r){i.insertBefore(n,r||null)}function fn(i){i.parentNode&&i.parentNode.removeChild(i)}function dr(i){return document.createElement(i)}function rc(i){return document.createTextNode(i)}function mt(i,n,r){r==null?i.removeAttribute(n):i.getAttribute(n)!==r&&i.setAttribute(n,r)}function Qr(i){Yr=i}function ic(){if(!Yr)throw new Error("Function called outside component initialization");return Yr}function sc(i){ic().$$.on_mount.push(i)}const ir=[],Xr=[];let hr=[];const Dl=[],Gm=Promise.resolve();let Ma=!1;function Fa(i){hr.push(i)}const Oa=new Set;let rr=0;function Q(){if(rr!==0)return;const i=Yr;do{try{for(;rr<ir.length;){const n=ir[rr];rr++,Qr(n),Qm(n.$$)}}catch(n){throw ir.length=0,rr=0,n}for(Qr(null),ir.length=0,rr=0;Xr.length;)Xr.pop()();for(let n=0;n<hr.length;n+=1){const r=hr[n];Oa.has(r)||(Oa.add(r),r())}hr.length=0}while(ir.length);for(;Dl.length;)Dl.pop()();Ma=!1,Oa.clear(),Qr(i)}function Qm(i){if(i.fragment!==null){i.update(),ss(i.before_update);const n=i.dirty;i.dirty=[-1],i.fragment&&i.fragment.p(i.ctx,n),i.after_update.forEach(Fa)}}const qm=new Set;function zm(i,n){const r=i.$$;r.fragment!==null&&((function(a){const u=[],l=[];hr.forEach((c=>a.indexOf(c)===-1?u.push(c):l.push(c))),l.forEach((c=>c())),hr=u})(r.after_update),ss(r.on_destroy),r.fragment&&r.fragment.d(n),r.on_destroy=r.fragment=null,r.ctx=[])}function Km(i,n){i.$$.dirty[0]===-1&&(ir.push(i),Ma||(Ma=!0,Gm.then(Q)),i.$$.dirty.fill(0)),i.$$.dirty[n/31|0]|=1<<n%31}function ac(i,n,r,a,u,l,c=null,d=[-1]){const p=Yr;Qr(i);const m=i.$$={fragment:null,ctx:[],props:l,update:cn,not_equal:u,bound:Ol(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(n.context||(p?p.$$.context:[])),callbacks:Ol(),dirty:d,skip_bound:!1,root:n.target||p.$$.root};c&&c(m.root);let y=!1;if(m.ctx=r?r(i,n.props||{},((T,L,...D)=>{const F=D.length?D[0]:L;return m.ctx&&u(m.ctx[T],m.ctx[T]=F)&&(!m.skip_bound&&m.bound[T]&&m.bound[T](F),y&&Km(i,T)),L})):[],m.update(),y=!0,ss(m.before_update),m.fragment=!!a&&a(m.ctx),n.target){if(n.hydrate){const T=(function(L){return Array.from(L.childNodes)})(n.target);m.fragment&&m.fragment.l(T),T.forEach(fn)}else m.fragment&&m.fragment.c();n.intro&&(R=i.$$.fragment)&&R.i&&(qm.delete(R),R.i(C)),(function(T,L,D){const{fragment:F,after_update:te}=T.$$;F&&F.m(L,D),Fa((()=>{const ve=T.$$.on_mount.map(ec).filter(tc);T.$$.on_destroy?T.$$.on_destroy.push(...ve):ss(ve),T.$$.on_mount=[]})),te.forEach(Fa)})(i,n.target,n.anchor),Q()}var R,C;Qr(p)}let oc;function es(i,n,r,a){const u=r[i]?.type;if(n=u==="Boolean"&&typeof n!="boolean"?n!=null:n,!a||!r[i])return n;if(a==="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 uc(i,n,r,a,u,l){let c=class extends oc{constructor(){super(i,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(c.prototype,d,{get(){return this.$$c&&d in this.$$c?this.$$c[d]:this.$$d[d]},set(p){p=es(d,p,n),this.$$d[d]=p,this.$$c?.$set({[d]:p})}})})),a.forEach((d=>{Object.defineProperty(c.prototype,d,{get(){return this.$$c?.[d]}})})),l&&(c=l(c)),i.element=c,c}typeof HTMLElement=="function"&&(oc=class extends HTMLElement{$$ctor;$$s;$$c;$$cn=!1;$$d={};$$r=!1;$$p_d={};$$l={};$$l_u=new Map;constructor(i,n,r){super(),this.$$ctor=i,this.$$s=n,r&&this.attachShadow({mode:"open"})}addEventListener(i,n,r){if(this.$$l[i]=this.$$l[i]||[],this.$$l[i].push(n),this.$$c){const a=this.$$c.$on(i,n);this.$$l_u.set(n,a)}super.addEventListener(i,n,r)}removeEventListener(i,n,r){if(super.removeEventListener(i,n,r),this.$$c){const a=this.$$l_u.get(n);a&&(a(),this.$$l_u.delete(n))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let n=function(l){return()=>{let c;return{c:function(){c=dr("slot"),l!=="default"&&mt(c,"name",l)},m:function(d,p){Un(d,c,p)},d:function(d){d&&fn(c)}}}};var i=n;if(await Promise.resolve(),!this.$$cn||this.$$c)return;const r={},a=(function(l){const c={};return l.childNodes.forEach((d=>{c[d.slot||"default"]=!0})),c})(this);for(const l of this.$$s)l in a&&(r[l]=[n(l)]);for(const l of this.attributes){const c=this.$$g_p(l.name);c in this.$$d||(this.$$d[c]=es(c,l.value,this.$$p_d,"toProp"))}for(const l in this.$$p_d)l in this.$$d||this[l]===void 0||(this.$$d[l]=this[l],delete this[l]);this.$$c=new this.$$ctor({target:this.shadowRoot||this,props:{...this.$$d,$$slots:r,$$scope:{ctx:[]}}});const u=()=>{this.$$r=!0;for(const l in this.$$p_d)if(this.$$d[l]=this.$$c.$$.ctx[this.$$c.$$.props[l]],this.$$p_d[l].reflect){const c=es(l,this.$$d[l],this.$$p_d,"toAttribute");c==null?this.removeAttribute(this.$$p_d[l].attribute||l):this.setAttribute(this.$$p_d[l].attribute||l,c)}this.$$r=!1};this.$$c.$$.after_update.push(u),u();for(const l in this.$$l)for(const c of this.$$l[l]){const d=this.$$c.$on(l,c);this.$$l_u.set(c,d)}this.$$l={}}}attributeChangedCallback(i,n,r){this.$$r||(i=this.$$g_p(i),this.$$d[i]=es(i,r,this.$$p_d,"toProp"),this.$$c?.$set({[i]:this.$$d[i]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then((()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$c=void 0)}))}$$g_p(i){return Object.keys(this.$$p_d).find((n=>this.$$p_d[n].attribute===i||!this.$$p_d[n].attribute&&n.toLowerCase()===i))||i}});class lc{$$=void 0;$$set=void 0;$destroy(){zm(this,1),this.$destroy=cn}$on(n,r){if(!tc(r))return cn;const a=this.$$.callbacks[n]||(this.$$.callbacks[n]=[]);return a.push(r),()=>{const u=a.indexOf(r);u!==-1&&a.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 Z;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"})(Z||(Z={}));class Ym extends Event{constructor(n,r,a,u){super(n),this.detail=r,this.payload=a||r||{},this.callbackFn=u}callback(n){this.callbackFn&&this.callbackFn(n)}}const N={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 Ga{isVisible(n){return!!(n.offsetWidth||n.offsetHeight||n.getClientRects().length)}sendCustomMessageToIframe(n,r,a){const u=a||"custom";if(n?.iframe?.contentWindow){const l=new URL(n.iframe.src);u==="custom"?n.iframe.contentWindow.postMessage({msg:u,data:r},l.origin):n.iframe.contentWindow.postMessage({msg:u,...r},l.origin)}else console.error("Message target could not be resolved")}dispatchWithPayload(n,r,a,u,l){this.dispatch(n,r,a,l,u)}dispatch(n,r,a,u,l){const c=new Ym(n,a,l,u);r.dispatchEvent(c)}getTargetContainer(n){let r;return globalThis.__luigi_container_manager.container.forEach((a=>{a.iframeHandle?.iframe&&a.iframeHandle.iframe.contentWindow===n.source&&(r=a)})),r}getContainerManager(){return globalThis.__luigi_container_manager||(globalThis.__luigi_container_manager={container:[],messageListener:n=>{const r=this.getTargetContainer(n),a=r?.iframeHandle?.iframe?.contentWindow;if(a&&a===n.source)switch(n.data.msg){case Z.CUSTOM_MESSAGE:{const u=n.data.data,l=u.id;delete u.id,this.dispatch(N.CUSTOM_MESSAGE,r,{id:l,_metaData:{},data:u})}break;case Z.GET_CONTEXT:a.postMessage({msg:Z.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 Z.NAVIGATION_REQUEST:this.dispatch(N.NAVIGATION_REQUEST,r,n.data.params,(u=>{a.postMessage({msg:Z.CLOSE_MODAL_ANSWER,data:u},n.origin)}));break;case Z.ALERT_REQUEST:this.dispatchWithPayload(N.ALERT_REQUEST,r,n,n.data?.data?.settings,(u=>{r.notifyAlertClosed(n.data?.data?.settings?.id,u)}));break;case Z.INITIALIZED:this.dispatch(N.INITIALIZED,r,n.data?.params||{});break;case Z.ADD_SEARCH_PARAMS_REQUEST:this.dispatch(N.ADD_SEARCH_PARAMS_REQUEST,r,{data:n.data.data,keepBrowserHistory:n.data.keepBrowserHistory});break;case Z.ADD_NODE_PARAMS_REQUEST:this.dispatch(N.ADD_NODE_PARAMS_REQUEST,r,{data:n.data.data,keepBrowserHistory:n.data.keepBrowserHistory});break;case Z.SHOW_CONFIRMATION_MODAL_REQUEST:this.dispatchWithPayload(N.SHOW_CONFIRMATION_MODAL_REQUEST,r,n.data.data,n.data.data?.settings,(u=>{r.notifyConfirmationModalClosed(u)}));break;case Z.SHOW_LOADING_INDICATOR_REQUEST:this.dispatch(N.SHOW_LOADING_INDICATOR_REQUEST,r,n);break;case Z.HIDE_LOADING_INDICATOR_REQUEST:this.dispatch(N.HIDE_LOADING_INDICATOR_REQUEST,r,n);break;case Z.SET_CURRENT_LOCALE_REQUEST:this.dispatchWithPayload(N.SET_CURRENT_LOCALE_REQUEST,r,n,n.data.data);break;case Z.LOCAL_STORAGE_SET_REQUEST:this.dispatchWithPayload(N.LOCAL_STORAGE_SET_REQUEST,r,n,n.data.data?.params);break;case Z.RUNTIME_ERROR_HANDLING_REQUEST:this.dispatch(N.RUNTIME_ERROR_HANDLING_REQUEST,r,n);break;case Z.SET_ANCHOR_LINK_REQUEST:this.dispatchWithPayload(N.SET_ANCHOR_LINK_REQUEST,r,n,n.data.anchor);break;case Z.SET_THIRD_PARTY_COOKIES_REQUEST:this.dispatch(N.SET_THIRD_PARTY_COOKIES_REQUEST,r,n);break;case Z.BACK_NAVIGATION_REQUEST:{let u=n.data?.goBackContext||{};if(typeof u=="string")try{u=JSON.parse(u)}catch(l){console.warn(l)}this.dispatch(N.GO_BACK_REQUEST,r,u),this.dispatch(N.BACK_NAVIGATION_REQUEST,r,n)}break;case Z.GET_CURRENT_ROUTE_REQUEST:this.dispatchWithPayload(N.GET_CURRENT_ROUTE_REQUEST,r,n,n.data.data,(u=>{a.postMessage({msg:Z.SEND_CURRENT_ROUTE_ANSWER,data:{correlationId:n.data?.data?.id,route:u}},n.origin)}));break;case Z.NAVIGATION_COMPLETED_REPORT:this.dispatch(N.NAVIGATION_COMPLETED_REPORT,r,n);break;case Z.UPDATE_MODAL_PATH_DATA_REQUEST:this.dispatchWithPayload(N.UPDATE_MODAL_PATH_DATA_REQUEST,r,n,n.data.params);break;case Z.UPDATE_MODAL_SETTINGS:this.dispatchWithPayload(N.UPDATE_MODAL_SETTINGS_REQUEST,r,n,{addHistoryEntry:n.data.addHistoryEntry,updatedModalSettings:n.data.updatedModalSettings});break;case Z.CHECK_PATH_EXISTS_REQUEST:this.dispatchWithPayload(N.CHECK_PATH_EXISTS_REQUEST,r,n,n.data.data,(u=>{a.postMessage({msg:Z.SEND_PATH_EXISTS_ANSWER,data:{correlationId:n.data?.data?.id,pathExists:u}},n.origin)}));break;case Z.SET_DIRTY_STATUS_REQUEST:this.dispatchWithPayload(N.SET_DIRTY_STATUS_REQUEST,r,n,{dirty:n.data.dirty});break;case Z.SET_VIEW_GROUP_DATA_REQUEST:this.dispatch(N.SET_VIEW_GROUP_DATA_REQUEST,r,n.data.data);break;case Z.ADD_BACKDROP_REQUEST:this.dispatch(N.ADD_BACKDROP_REQUEST,r,n);break;case Z.REMOVE_BACKDROP_REQUEST:this.dispatch(N.REMOVE_BACKDROP_REQUEST,r,n);break;case Z.CLOSE_CURRENT_MODAL_REQUEST:this.dispatch(N.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 ln=new Ga,sr=new class{constructor(){this.updateContext=(i,n,r,a,u,l)=>{if(r){const c=n||{};ln.sendCustomMessageToIframe(r,{context:i,nodeParams:a||{},pathParams:u||{},searchParams:l||{},internal:c,withoutSync:!0},Z.SEND_CONTEXT_OBJECT)}else console.warn("Attempting to update context on inexisting iframe")},this.updateViewUrl=(i,n,r,a)=>{if(a){const u=r||{};ln.sendCustomMessageToIframe(a,{context:n,internal:u,withoutSync:!1,viewUrl:i},Z.SEND_CONTEXT_OBJECT)}else console.warn("Attempting to update route on inexisting iframe")},this.updateAuthData=(i,n)=>{i&&n?ln.sendCustomMessageToIframe(i,{authData:n},Z.AUTH_SET_TOKEN):console.warn("Attempting to update auth data on inexisting iframe or authData")},this.sendCustomMessage=(i,n,r,a,u)=>{if(r&&n._luigi_mfe_webcomponent)ln.dispatch(i,n._luigi_mfe_webcomponent,u);else{const l={...u};l.id&&console.warn('Property "id" is reserved and can not be used in custom message data'),l.id=i,ln.sendCustomMessageToIframe(a,l)}},this.notifyConfirmationModalClosed=(i,n)=>{const r={data:{confirmed:i}};ln.sendCustomMessageToIframe(n,r,Z.CONFIRMATION_MODAL_CLOSED)}}notifyAlertClosed(i,n,r){const a=n?{id:i,dismissKey:n}:{id:i};ln.sendCustomMessageToIframe(r,a,Z.ALERT_CLOSED)}},Ml=i=>{if(!i)return;const n=i;return n.forEach(((r,a)=>{n[a]=r+(r.indexOf(";")!=-1?"":";"),n[a]=i[a].replaceAll('"',"'")})),n.join(" ")};class pr{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 pr{constructor(n){super(n||{use:{}}),n&&n.use&&n.use.extends&&(this.superRenderer=cc({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 Zm extends pr{createCompoundContainer(){const n="__lui_compound_"+new Date().getTime(),r=document.createElement("div");r.classList.add(n);let a="";return this.config.layouts&&this.config.layouts.forEach((u=>{if(u.minWidth||u.maxWidth){let l="@media only screen ";u.minWidth!=null&&(l+=`and (min-width: ${u.minWidth}px) `),u.maxWidth!=null&&(l+=`and (max-width: ${u.maxWidth}px) `),l+=`{
|
|
28
|
+
.${n} {
|
|
29
|
+
grid-template-columns: ${u.columns||"auto"};
|
|
30
|
+
grid-template-rows: ${u.rows||"auto"};
|
|
31
|
+
grid-gap: ${u.gap||"0"};
|
|
11
32
|
}
|
|
12
33
|
}
|
|
13
|
-
`,
|
|
34
|
+
`,a+=l}})),r.innerHTML=`
|
|
14
35
|
<style scoped>
|
|
15
|
-
.${
|
|
36
|
+
.${n} {
|
|
16
37
|
display: grid;
|
|
17
38
|
grid-template-columns: ${this.config.columns||"auto"};
|
|
18
39
|
grid-template-rows: ${this.config.rows||"auto"};
|
|
19
40
|
grid-gap: ${this.config.gap||"0"};
|
|
20
41
|
min-height: ${this.config.minHeight||"auto"};
|
|
21
42
|
}
|
|
22
|
-
${
|
|
43
|
+
${a}
|
|
23
44
|
</style>
|
|
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,
|
|
45
|
+
`,r}createCompoundItemContainer(n){const r=n||{},a=document.createElement("div");return a.setAttribute("style",`grid-row: ${r.row||"auto"}; grid-column: ${r.column||"auto"}`),a.classList.add("lui-compoundItemCnt"),a}}const cc=i=>{const n=i.use;return n?n==="grid"?new Zm(i):n.createCompoundContainer||n.createCompoundItemContainer||n.attachCompoundItem?new Xm(i):new pr(i):new pr(i)},Fl=(i,n,r,a)=>{n?.eventListeners&&n.eventListeners.forEach((u=>{const l=u.source+"."+u.name,c=i[l],d={wcElementId:r,wcElement:a,action:u.action,converter:u.dataConverter};c?c.push(d):i[l]=[d]}))};function kl(i){return String(i).replaceAll("<","<").replaceAll(">",">").replaceAll(""",'"').replaceAll("'","'").replaceAll("/","/")}class fc{constructor(){this.alertResolvers={},this.alertIndex=0,this.containerService=new Ga}dynamicImport(n){return Object.freeze(import(n))}processViewUrl(n,r){return n}attachWC(n,r,a,u,l,c,d){if(a&&a.contains(r)){const p=document.createElement(n);c&&p.setAttribute("nodeId",c),p.setAttribute("lui_web_component","true"),this.initWC(p,n,a,l,u,c,d),a.replaceChild(p,r),a._luigi_node&&(a._luigi_mfe_webcomponent=p),a.dispatchEvent(new Event("wc_ready"))}}dispatchLuigiEvent(n,r,a){this.containerService.dispatch(n,this.thisComponent,r,a)}createClientAPI(n,r,a,u,l){return{linkManager:()=>{let c=null,d=!1,p=!1,m=!1,y={};const R={navigate:(C,T={})=>{const L={fromContext:c,fromClosestContext:d,fromVirtualTreeRoot:p,fromParent:m,nodeParams:y,...T};this.dispatchLuigiEvent(N.NAVIGATION_REQUEST,{link:C,...L})},navigateToIntent:(C,T={})=>{let L="#?intent=";if(L+=C,T&&Object.keys(T)?.length){const D=Object.entries(T);if(D.length>0){L+="?";for(const[F,te]of D)L+=F+"="+te+"&";L=L.slice(0,-1)}}R.navigate(L)},fromClosestContext:()=>(d=!0,R),fromContext:C=>(c=C,R),fromVirtualTreeRoot:()=>(p=!0,R),fromParent:()=>(m=!0,R),getCurrentRoute:()=>{const C={fromContext:c,fromClosestContext:d,fromVirtualTreeRoot:p,fromParent:m,nodeParams:y};return new Promise(((T,L)=>{this.containerService.dispatch(N.GET_CURRENT_ROUTE_REQUEST,this.thisComponent,{...C},(D=>{D?T(D):L("No current route received.")}))}))},withParams:C=>(y=C,R),updateModalPathInternalNavigation:(C,T={},L=!1)=>{if(!C)return void console.warn("Updating path of the modal upon internal navigation prevented. No path specified.");const D={fromClosestContext:d,fromContext:c,fromParent:m,fromVirtualTreeRoot:p,nodeParams:y};this.dispatchLuigiEvent(N.UPDATE_MODAL_PATH_DATA_REQUEST,Object.assign(D,{history:L,link:C,modal:T}))},updateTopNavigation:()=>{this.dispatchLuigiEvent(N.UPDATE_TOP_NAVIGATION_REQUEST,{})},pathExists:C=>{const T={fromContext:c,fromClosestContext:d,fromVirtualTreeRoot:p,fromParent:m,nodeParams:y};return new Promise(((L,D)=>{this.containerService.dispatch(N.CHECK_PATH_EXISTS_REQUEST,this.thisComponent,{...T,link:C},(F=>{F?L(!0):D(!1)})),this.containerService.dispatch(N.PATH_EXISTS_REQUEST,this.thisComponent,{...T,link:C},(F=>{F?L(!0):D(!1)}))}))},openAsDrawer:(C,T={})=>{R.navigate(C,{drawer:T})},openAsModal:(C,T={})=>{R.navigate(C,{modal:T})},openAsSplitView:(C,T={})=>{R.navigate(C,{splitView:T})},goBack:C=>{this.dispatchLuigiEvent(N.GO_BACK_REQUEST,C)},hasBack:()=>!1,updateModalSettings:(C={},T=!1)=>{this.dispatchLuigiEvent(N.UPDATE_MODAL_SETTINGS_REQUEST,{updatedModalSettings:C,addHistoryEntry:T})}};return R},uxManager:()=>({showAlert:c=>(c.id=this.alertIndex++,new Promise((d=>{this.alertResolvers[c.id]=d,this.dispatchLuigiEvent(N.ALERT_REQUEST,c,(p=>{this.resolveAlert(c.id,p)}))}))),showConfirmationModal:c=>new Promise(((d,p)=>{this.modalResolver={resolve:d,reject:p},this.containerService.dispatch(N.SHOW_CONFIRMATION_MODAL_REQUEST,this.thisComponent,c,(m=>{m?d():p()}))})),getCurrentTheme:()=>this.thisComponent.theme,closeUserSettings:()=>{this.dispatchLuigiEvent(N.CLOSE_USER_SETTINGS_REQUEST,this.thisComponent.userSettings)},openUserSettings:()=>{this.dispatchLuigiEvent(N.OPEN_USER_SETTINGS_REQUEST,this.thisComponent.userSettings)},collapseLeftSideNav:()=>{this.dispatchLuigiEvent(N.COLLAPSE_LEFT_NAV_REQUEST,{})},getDirtyStatus:()=>this.thisComponent.dirtyStatus||!1,getDocumentTitle:()=>this.thisComponent.documentTitle,setDocumentTitle:c=>{this.dispatchLuigiEvent(N.SET_DOCUMENT_TITLE_REQUEST,c)},setDirtyStatus:c=>{this.dispatchLuigiEvent(N.SET_DIRTY_STATUS_REQUEST,{dirty:c})},setCurrentLocale:c=>{c&&this.dispatchLuigiEvent(N.SET_CURRENT_LOCALE_REQUEST,{currentLocale:c})},removeBackdrop:()=>{this.dispatchLuigiEvent(N.REMOVE_BACKDROP_REQUEST,{})},addBackdrop:()=>{this.dispatchLuigiEvent(N.ADD_BACKDROP_REQUEST,{})},showLoadingIndicator:()=>{this.dispatchLuigiEvent(N.SHOW_LOADING_INDICATOR_REQUEST,{})},hideLoadingIndicator:()=>{this.dispatchLuigiEvent(N.HIDE_LOADING_INDICATOR_REQUEST,{})},hideAppLoadingIndicator:()=>{this.dispatchLuigiEvent(N.HIDE_LOADING_INDICATOR_REQUEST,{})},closeCurrentModal:()=>{this.dispatchLuigiEvent(N.CLOSE_CURRENT_MODAL_REQUEST,{})}}),getCurrentLocale:()=>this.thisComponent.locale,getActiveFeatureToggles:()=>this.thisComponent.activeFeatureToggleList||[],publishEvent:c=>{n&&n.eventBus&&n.eventBus.onPublishEvent(c,r,a);const d={id:c.type,_metaData:{nodeId:r,wc_id:a,src:u},data:c.detail};this.dispatchLuigiEvent(N.CUSTOM_MESSAGE,d)},luigiClientInit:()=>{this.dispatchLuigiEvent(N.INITIALIZED,{})},addNodeParams:(c,d)=>{l||this.dispatchLuigiEvent(N.ADD_NODE_PARAMS_REQUEST,{params:c,data:c,keepBrowserHistory:d})},getNodeParams:c=>{return l?{}:c?(d=this.thisComponent.nodeParams,Object.entries(d).reduce(((p,m)=>(p[kl(m[0])]=kl(m[1]),p)),{})):this.thisComponent.nodeParams||{};var d},setAnchor:c=>{l||this.dispatchLuigiEvent(N.SET_ANCHOR_LINK_REQUEST,c)},getAnchor:()=>this.thisComponent.anchor||"",getCoreSearchParams:()=>this.thisComponent.searchParams||{},getPathParams:()=>this.thisComponent.pathParams||{},getClientPermissions:()=>this.thisComponent.clientPermissions||{},addCoreSearchParams:(c={},d=!0)=>{this.dispatchLuigiEvent(N.ADD_SEARCH_PARAMS_REQUEST,{data:c,keepBrowserHistory:d})},getUserSettings:()=>this.thisComponent.userSettings||{},setViewGroupData:c=>{this.dispatchLuigiEvent(N.SET_VIEW_GROUP_DATA_REQUEST,c)}}}initWC(n,r,a,u,l,c,d){const p=this.createClientAPI(a,c,r,n,d);if(n.__postProcess){const m=new URL(document.baseURI).origin===new URL(u,document.baseURI).origin?new URL("./",new URL(u,document.baseURI)):new URL("./",u);n.__postProcess(l,p,m.origin+m.pathname)}else n.context=l,n.LuigiClient=p}generateWCId(n){let r="";const a=new URL(n,encodeURI(location.href)).href;for(let u=0;u<a.length;u++)r+=a.charCodeAt(u).toString(16);return"luigi-wc-"+r}registerWCFromUrl(n,r){const a=this.processViewUrl(n);return new Promise(((u,l)=>{this.checkWCUrl(a)?this.dynamicImport(a).then((c=>{try{if(!window.customElements.get(r)){let d=c.default;if(!HTMLElement.isPrototypeOf(d)){const p=Object.keys(c);for(let m=0;m<p.length&&(d=c[p[m]],!HTMLElement.isPrototypeOf(d));m++);}window.customElements.define(r,d)}u(1)}catch(d){l(d)}})).catch((c=>{l(c)})):l(`Error: View URL '${a}' not allowed to be included`)}))}includeSelfRegisteredWCFromUrl(n,r,a){if(this.checkWCUrl(r)){this.containerService.getContainerManager()._registerWebcomponent||(this.containerService.getContainerManager()._registerWebcomponent=(l,c)=>{window.customElements.define(this.generateWCId(l),c)}),window.Luigi||(window.Luigi={},window.Luigi._registerWebcomponent||(window.Luigi._registerWebcomponent=(l,c)=>{this.containerService.getContainerManager()._registerWebcomponent(l,c)}));const u=document.createElement("script");u.setAttribute("src",r),n.webcomponent.type==="module"&&u.setAttribute("type","module"),u.setAttribute("defer","true"),u.addEventListener("load",(()=>{a()})),document.body.appendChild(u)}else console.warn(`View URL '${r}' not allowed to be included`)}checkWCUrl(n){return!0}renderWebComponent(n,r,a,u,l,c){const d=this.processViewUrl(n,{context:a}),p=u?.webcomponent?.tagName||this.generateWCId(d),m=document.createElement("div");r.appendChild(m),r._luigi_node=u,window.customElements.get(p)?this.attachWC(p,m,r,a,d,l,c):window.luigiWCFn?window.luigiWCFn(d,p,m,(()=>{this.attachWC(p,m,r,a,d,l,c)})):u?.webcomponent?.selfRegistered?this.includeSelfRegisteredWCFromUrl(u,d,(()=>{this.attachWC(p,m,r,a,d,l,c)})):this.registerWCFromUrl(d,p).then((()=>{this.attachWC(p,m,r,a,d,l,c)})).catch((y=>{console.warn("ERROR =>",y),this.containerService.dispatch(N.RUNTIME_ERROR_HANDLING_REQUEST,this.thisComponent,y)}))}createCompoundContainerAsync(n,r,a){return new Promise(((u,l)=>{if(n.viewUrl)try{const c=a?.webcomponent?.tagName||this.generateWCId(n.viewUrl);a?.webcomponent?.selfRegistered?this.includeSelfRegisteredWCFromUrl(a,n.viewUrl,(()=>{const d=document.createElement(c);d.setAttribute("lui_web_component","true"),this.initWC(d,c,d,n.viewUrl,r,"_root"),u(d)})):this.registerWCFromUrl(n.viewUrl,c).then((()=>{const d=document.createElement(c);d.setAttribute("lui_web_component","true"),this.initWC(d,c,d,n.viewUrl,r,"_root"),u(d)})).catch((d=>{console.warn("Error: ",d),this.containerService.dispatch(N.RUNTIME_ERROR_HANDLING_REQUEST,this.thisComponent,d)}))}catch(c){l(c)}else u(n.createCompoundContainer())}))}renderWebComponentCompound(n,r,a){let u;return n.webcomponent&&n.viewUrl?(u=new pr,u.viewUrl=this.processViewUrl(n.viewUrl,{context:a}),u.createCompoundItemContainer=l=>{const c=document.createElement("div");return l?.slot&&c.setAttribute("slot",l.slot),c}):n.compound?.renderer&&(u=cc(n.compound.renderer)),u=u||new pr,new Promise((l=>{this.createCompoundContainerAsync(u,a,n).then((c=>{r._luigi_mfe_webcomponent=c,r._luigi_node=n;const d={};c.eventBus={listeners:d,onPublishEvent:(p,m,y)=>{const R=d[m+"."+p.type]||[];R.push(...d["*."+p.type]||[]),R.forEach((C=>{const T=C.wcElement||c.querySelector("[nodeId="+C.wcElementId+"]");T?T.dispatchEvent(new CustomEvent(C.action,{detail:C.converter?C.converter(p.detail):p.detail})):console.debug("Could not find event target",C)}))}},n.compound?.children?.forEach(((p,m)=>{const y={...a,...p.context},R=u.createCompoundItemContainer(p.layoutConfig);R.eventBus=c.eventBus,u.attachCompoundItem(c,R);const C=p.id||"gen_"+m;this.renderWebComponent(p.viewUrl,R,y,p,C,!0),Fl(d,p,C)})),r.appendChild(c),Fl(d,n.compound,"_root",c),l(c)})).catch((c=>{console.warn("Error: ",c),this.containerService.dispatch(N.RUNTIME_ERROR_HANDLING_REQUEST,this.thisComponent,c)}))}))}resolveAlert(n,r){this.alertResolvers[n]?(this.alertResolvers[n](r===void 0||r),this.alertResolvers[n]=void 0):console.log("Promise is not in the list.")}notifyConfirmationModalClosed(n){this.modalResolver?(n?this.modalResolver.resolve():this.modalResolver.reject(),this.modalResolver=void 0):console.log("Modal promise is not listed.")}}const qr=new class{isFunction(i){return i&&{}.toString.call(i)==="[object Function]"}isObject(i){return!(!i||typeof i!="object"||Array.isArray(i))}checkWebcomponentValue(i){return typeof i=="string"?JSON.parse(i):typeof i=="boolean"||typeof i=="object"?i:void console.warn("Webcomponent value has a wrong type.")}resolveContext(i){return i?typeof i=="string"?JSON.parse(i):i:{}}};function Wl(i){let n,r=(!i[4]||i[4]==="false")&&Hl(i);return{c(){r&&r.c(),n=rc("")},m(a,u){r&&r.m(a,u),Un(a,n,u)},p(a,u){a[4]&&a[4]!=="false"?r&&(r.d(1),r=null):r?r.p(a,u):(r=Hl(a),r.c(),r.m(n.parentNode,n))},d(a){a&&fn(n),r&&r.d(a)}}}function Hl(i){let n,r,a,u,l,c;return{c(){n=dr("style"),n.textContent=`main.lui-isolated,
|
|
25
46
|
.lui-isolated iframe {
|
|
26
47
|
width: 100%;
|
|
27
48
|
height: 100%;
|
|
@@ -30,5 +51,5 @@ Invalid Children:`,t);return}return t.some(a=>{if(a.pathSegment===e||a.pathSegme
|
|
|
30
51
|
|
|
31
52
|
main.lui-isolated {
|
|
32
53
|
line-height: 0;
|
|
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);
|
|
54
|
+
}`,r=rc(" "),a=dr("iframe"),Ul(a.src,u=i[3])||mt(a,"src",u),mt(a,"title",i[1]),mt(a,"allow",l=Ml(i[0])),mt(a,"sandbox",c=i[2]?i[2].join(" "):void 0)},m(d,p){Un(d,n,p),Un(d,r,p),Un(d,a,p),i[28](a)},p(d,p){8&p[0]&&!Ul(a.src,u=d[3])&&mt(a,"src",u),2&p[0]&&mt(a,"title",d[1]),1&p[0]&&l!==(l=Ml(d[0]))&&mt(a,"allow",l),4&p[0]&&c!==(c=d[2]?d[2].join(" "):void 0)&&mt(a,"sandbox",c)},d(d){d&&(fn(n),fn(r),fn(a)),i[28](null)}}}function Jm(i){let n,r,a=i[5]&&Wl(i);return{c(){n=dr("main"),a&&a.c(),mt(n,"class",r=i[4]?void 0:"lui-isolated")},m(u,l){Un(u,n,l),a&&a.m(n,null),i[29](n)},p(u,l){u[5]?a?a.p(u,l):(a=Wl(u),a.c(),a.m(n,null)):a&&(a.d(1),a=null),16&l[0]&&r!==(r=u[4]?void 0:"lui-isolated")&&mt(n,"class",r)},i:cn,o:cn,d(u){u&&fn(n),a&&a.d(),i[29](null)}}}function jm(i,n,r){let{activeFeatureToggleList:a}=n,{allowRules:u}=n,{anchor:l}=n,{authData:c}=n,{clientPermissions:d}=n,{context:p}=n,{deferInit:m}=n,{dirtyStatus:y}=n,{documentTitle:R}=n,{hasBack:C}=n,{label:T}=n,{locale:L}=n,{noShadow:D}=n,{nodeParams:F}=n,{pathParams:te}=n,{sandboxRules:ve}=n,{searchParams:ce}=n,{skipCookieCheck:Je}=n,{skipInitCheck:Ee}=n,{theme:je}=n,{userSettings:be}=n,{viewurl:Ge}=n,{webcomponent:Le}=n;const Ce={};let Te,$,Zt=!1;const ut=new fc,Fe=I=>{if(!Zt){I.sendCustomMessage=(he,ye)=>{sr.sendCustomMessage(he,I.getNoShadow()?I:Te,!!Le,Ce,ye)},I.updateContext=(he,ye)=>{if(r(8,p=he),Le)(I.getNoShadow()?I:Te)._luigi_mfe_webcomponent.context=he;else{const Qe={...ye||{},activeFeatureToggleList:I.activeFeatureToggleList||[],currentLocale:I.locale,currentTheme:I.theme,userSettings:I.userSettings||null,cssVariables:I.cssVariables||{},anchor:I.anchor||"",drawer:I.drawer||!1,modal:I.modal||!1,viewStackSize:I.viewStackSize||0,isNavigateBack:I.isNavigateBack||!1};sr.updateContext(he,Qe,Ce,F,te,ce)}},I.closeAlert=(he,ye)=>{I.notifyAlertClosed(he,ye)},I.notifyAlertClosed=(he,ye)=>{I.isConnected&&(Le?ut.resolveAlert(he,ye):sr.notifyAlertClosed(he,ye,Ce))},I.notifyConfirmationModalClosed=he=>{I.isConnected&&(Le?ut.notifyConfirmationModalClosed(!!he):sr.notifyConfirmationModalClosed(!!he,Ce))},ln.registerContainer(I),ut.thisComponent=I;const et=qr.resolveContext(p);if(I.updateViewUrl=(he,ye)=>{he?.length&&sr.updateViewUrl(he,qr.resolveContext(p),ye,Ce)},Le&&Le!="false"){I.getNoShadow()?I.innerHTML="":(r(7,Te.innerHTML="",Te),I.attachShadow({mode:"open"}).append(Te));const he=qr.checkWebcomponentValue(Le);ut.renderWebComponent(Ge,I.getNoShadow()?I:Te,et,typeof he=="object"?{webcomponent:he}:{})}else I.getNoShadow()||(I.innerHTML="",I.attachShadow({mode:"open"}).append(Te));Ee?(I.initialized=!0,setTimeout((()=>{ut.dispatchLuigiEvent(N.INITIALIZED,{})}))):Le&&(I.getNoShadow()?I:Te).addEventListener("wc_ready",(()=>{(I.getNoShadow()?I:Te)._luigi_mfe_webcomponent?.deferLuigiClientWCInit||(I.initialized=!0,ut.dispatchLuigiEvent(N.INITIALIZED,{}))})),r(5,Zt=!0),I.containerInitialized=!0}};var En;return sc((async()=>{r(27,$=Te.parentNode),r(27,$.iframeHandle=Ce,$),r(27,$.init=()=>{Fe($)},$),!m&&Ge&&Fe($)})),En=async()=>{},ic().$$.on_destroy.push(En),i.$$set=I=>{"activeFeatureToggleList"in I&&r(9,a=I.activeFeatureToggleList),"allowRules"in I&&r(0,u=I.allowRules),"anchor"in I&&r(10,l=I.anchor),"authData"in I&&r(11,c=I.authData),"clientPermissions"in I&&r(12,d=I.clientPermissions),"context"in I&&r(8,p=I.context),"deferInit"in I&&r(13,m=I.deferInit),"dirtyStatus"in I&&r(14,y=I.dirtyStatus),"documentTitle"in I&&r(15,R=I.documentTitle),"hasBack"in I&&r(16,C=I.hasBack),"label"in I&&r(1,T=I.label),"locale"in I&&r(17,L=I.locale),"noShadow"in I&&r(18,D=I.noShadow),"nodeParams"in I&&r(19,F=I.nodeParams),"pathParams"in I&&r(20,te=I.pathParams),"sandboxRules"in I&&r(2,ve=I.sandboxRules),"searchParams"in I&&r(21,ce=I.searchParams),"skipCookieCheck"in I&&r(22,Je=I.skipCookieCheck),"skipInitCheck"in I&&r(23,Ee=I.skipInitCheck),"theme"in I&&r(24,je=I.theme),"userSettings"in I&&r(25,be=I.userSettings),"viewurl"in I&&r(3,Ge=I.viewurl),"webcomponent"in I&&r(4,Le=I.webcomponent)},i.$$.update=()=>{134225960&i.$$.dirty[0]&&!Zt&&Ge&&!m&&$&&Fe($)},[u,T,ve,Ge,Le,Zt,Ce,Te,p,a,l,c,d,m,y,R,C,L,D,F,te,ce,Je,Ee,je,be,()=>a&&u&&l&&c&&d&&y&&R&&C&&L&&D&&F&&te&&ve&&ce&&Je&&Ee&&je&&be,$,function(I){Xr[I?"unshift":"push"]((()=>{Ce.iframe=I,r(6,Ce)}))},function(I){Xr[I?"unshift":"push"]((()=>{Te=I,r(7,Te)}))}]}class hc extends lc{constructor(n){super(),ac(this,n,jm,Jm,nc,{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 eS(i){Bm(i,"svelte-1buc46y","main.svelte-1buc46y{width:100%;height:100%;border:none}")}function tS(i){let n;return{c(){n=dr("main"),mt(n,"class","svelte-1buc46y")},m(r,a){Un(r,n,a),i[21](n)},p:cn,i:cn,o:cn,d(r){r&&fn(n),i[21](null)}}}function nS(i,n,r){let a,u,{activeFeatureToggleList:l}=n,{anchor:c}=n,{clientPermissions:d}=n,{compoundConfig:p}=n,{context:m}=n,{deferInit:y}=n,{dirtyStatus:R}=n,{documentTitle:C}=n,{hasBack:T}=n,{locale:L}=n,{noShadow:D}=n,{nodeParams:F}=n,{pathParams:te}=n,{searchParams:ve}=n,{skipInitCheck:ce}=n,{theme:Je}=n,{userSettings:Ee}=n,{viewurl:je}=n,{webcomponent:be}=n,Ge=!1;const Le=new Ga,Ce=new fc,Te=$=>{if(!p||Ge)return;$.updateContext=(Fe,En)=>{const I=$.getNoShadow()?$:a;I._luigi_mfe_webcomponent.context=Fe,r(1,m=Fe);const et=I._luigi_mfe_webcomponent;et&&et.querySelectorAll("[lui_web_component]")?.forEach((ye=>{const Qe=ye.context||{};ye.context=Object.assign(Qe,Fe)}))};const Zt=qr.resolveContext(m);r(2,y=!1),$.notifyAlertClosed=(Fe,En)=>{$.isConnected&&Ce.resolveAlert(Fe,En)},$.notifyConfirmationModalClosed=Fe=>{$.isConnected&&Ce.notifyConfirmationModalClosed(!!Fe)};const ut={compound:p,viewUrl:je,webcomponent:qr.checkWebcomponentValue(be)||!0};$.getNoShadow()?$.innerHTML="":(r(0,a.innerHTML="",a),$.attachShadow({mode:"open"}).append(a)),Ce.renderWebComponentCompound(ut,$.getNoShadow()?$:a,Zt).then((Fe=>{u=Fe,ce||!ut.viewUrl?($.initialized=!0,setTimeout((()=>{Ce.dispatchLuigiEvent(N.INITIALIZED,{})}))):u.LuigiClient&&!u.deferLuigiClientWCInit&&($.initialized=!0,Ce.dispatchLuigiEvent(N.INITIALIZED,{}))})),Ge=!0,$.containerInitialized=!0};return sc((async()=>{const $=a.getRootNode()===document?a.parentNode:a.getRootNode().host;$.init=()=>{Te($)},y||Te($),Le.registerContainer($),Ce.thisComponent=$})),i.$$set=$=>{"activeFeatureToggleList"in $&&r(3,l=$.activeFeatureToggleList),"anchor"in $&&r(4,c=$.anchor),"clientPermissions"in $&&r(5,d=$.clientPermissions),"compoundConfig"in $&&r(6,p=$.compoundConfig),"context"in $&&r(1,m=$.context),"deferInit"in $&&r(2,y=$.deferInit),"dirtyStatus"in $&&r(7,R=$.dirtyStatus),"documentTitle"in $&&r(8,C=$.documentTitle),"hasBack"in $&&r(9,T=$.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,ve=$.searchParams),"skipInitCheck"in $&&r(15,ce=$.skipInitCheck),"theme"in $&&r(16,Je=$.theme),"userSettings"in $&&r(17,Ee=$.userSettings),"viewurl"in $&&r(18,je=$.viewurl),"webcomponent"in $&&r(19,be=$.webcomponent)},[a,m,y,l,c,d,p,R,C,T,L,D,F,te,ve,ce,Je,Ee,je,be,()=>l&&c&&d&&R&&C&&T&&L&&D&&F&&te&&ve&&ce&&Je&&Ee,function($){Xr[$?"unshift":"push"]((()=>{a=$,r(0,a)}))}]}uc(hc,{activeFeatureToggleList:{type:"Array",reflect:!1,attribute:"active-feature-toggle-list"},allowRules:{type:"Array",reflect:!1,attribute:"allow-rules"},anchor:{type:"String",reflect:!1,attribute:"anchor"},authData:{type:"Object",reflect:!1,attribute:"auth-data"},clientPermissions:{type:"Object",reflect:!1,attribute:"client-permissions"},context:{type:"String",reflect:!1,attribute:"context"},deferInit:{type:"Boolean",attribute:"defer-init"},dirtyStatus:{type:"Boolean",reflect:!1,attribute:"dirty-status"},documentTitle:{type:"String",reflect:!1,attribute:"document-title"},hasBack:{type:"Boolean",reflect:!1,attribute:"has-back"},label:{type:"String",reflect:!1,attribute:"label"},locale:{type:"String",reflect:!1,attribute:"locale"},noShadow:{type:"Boolean",attribute:"no-shadow"},nodeParams:{type:"Object",reflect:!1,attribute:"node-params"},pathParams:{type:"Object",reflect:!1,attribute:"path-params"},sandboxRules:{type:"Array",reflect:!1,attribute:"sandbox-rules"},searchParams:{type:"Object",reflect:!1,attribute:"search-params"},skipCookieCheck:{type:"String",reflect:!1,attribute:"skip-cookie-check"},skipInitCheck:{type:"Boolean",reflect:!1,attribute:"skip-init-check"},theme:{type:"String",reflect:!1,attribute:"theme"},userSettings:{type:"Object",reflect:!1,attribute:"user-settings"},viewurl:{type:"String",reflect:!1,attribute:"viewurl"},webcomponent:{type:"String",reflect:!1,attribute:"webcomponent"}},[],["unwarn"],!1,(i=>{let n=r=>()=>console.warn(r+" can't be called on luigi-container before its micro frontend is attached to the DOM.");return class extends i{sendCustomMessage=n("sendCustomMessage");updateContext=n("updateContext");updateViewUrl=n("updateViewUrl");closeAlert=n("closeAlert");notifyAlertClosed=n("notifyAlertClosed");notifyConfirmationModalClosed=n("notifyConfirmationModalClosed");attributeChangedCallback(r,a,u){try{super.attributeChangedCallback(r,a,u)}catch(l){console.error("Error in super.attributeChangedCallback",l)}this.containerInitialized&&(r==="context"&&this.updateContext(JSON.parse(u)),r==="auth-data"&&sr.updateAuthData(this.iframeHandle,JSON.parse(u)))}getNoShadow(){return this.hasAttribute("no-shadow")||this.noShadow}}}));class Vl extends lc{constructor(n){super(),ac(this,n,nS,tS,nc,{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},eS)}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]}}uc(Vl,{activeFeatureToggleList:{type:"Array",reflect:!1,attribute:"active-feature-toggle-list"},anchor:{type:"String",reflect:!1,attribute:"anchor"},clientPermissions:{type:"Object",reflect:!1,attribute:"client-permissions"},compoundConfig:{type:"Object",reflect:!1,attribute:"compound-config"},context:{type:"String",reflect:!1,attribute:"context"},deferInit:{type:"Boolean",attribute:"defer-init"},dirtyStatus:{type:"Boolean",reflect:!1,attribute:"dirty-status"},documentTitle:{type:"String",reflect:!1,attribute:"document-title"},hasBack:{type:"Boolean",reflect:!1,attribute:"has-back"},locale:{type:"String",reflect:!1,attribute:"locale"},noShadow:{type:"Boolean",attribute:"no-shadow",reflect:!1},nodeParams:{type:"Object",reflect:!1,attribute:"node-params"},pathParams:{type:"Object",reflect:!1,attribute:"path-params"},searchParams:{type:"Object",reflect:!1,attribute:"search-params"},skipInitCheck:{type:"Boolean",reflect:!1,attribute:"skip-init-check"},theme:{type:"String",reflect:!1,attribute:"theme"},userSettings:{type:"Object",reflect:!1,attribute:"user-settings"},viewurl:{type:"String",reflect:!1,attribute:"viewurl"},webcomponent:{type:"String",reflect:!1,attribute:"webcomponent"}},[],["unwarn"],!1,(i=>{let n=r=>()=>console.warn(r+" can't be called on luigi-container before its micro frontend is attached to the DOM.");return class extends i{updateContext=n("updateContext");notifyAlertClosed=n("notifyAlertClosed");notifyConfirmationModalClosed=n("notifyConfirmationModalClosed");attributeChangedCallback(r,a,u){try{super.attributeChangedCallback(r,a,u)}catch(l){console.warn("Error in attributeChangedCallback",l)}this.containerInitialized&&r==="context"&&this.updateContext(JSON.parse(u))}getNoShadow(){return this.hasAttribute("no-shadow")||this.noShadow}}})),customElements.get("luigi-container")||customElements.define("luigi-container",hc.element),customElements.get("luigi-compound-container")||customElements.define("luigi-compound-container",Vl.element);class _r{constructor(){this.decorators=[]}hasDecorators(){return this.decorators.length>0}add(n){this.decorators=this.decorators.filter(r=>r.uid!==n.uid).concat(n)}applyDecorators(n,r){if(!n)return n;const a=new URL(W.prependOrigin(n)),u=this.decorators.filter(l=>l.type==="queryString");for(let l=0;l<u.length;l++){const c=u[l];a.searchParams.has(c.key)&&a.searchParams.delete(c.key);const d=c.valueFn();a.searchParams.append(c.key,d)}return r&&(a.search=decodeURIComponent(a.search)),a.href}}const Ua=async(i,n)=>{const r=await n.readUserSettings(),u=i.userSettingsGroup&&typeof r=="object"&&r!==null?r[i.userSettingsGroup]:null;if(i.webcomponent&&!k.checkWCUrl(i.viewUrl,n))return console.warn(`View URL '${i.viewUrl}' not allowed to be included`),document.createElement("div");if(i.compound){const l=document.createElement("luigi-compound-container");return l.setAttribute("lui_container","true"),l.viewurl=ee.get(_r).applyDecorators(k.substituteViewUrl(i.viewUrl,i.pathParams,n),i.decodeViewUrl),l.webcomponent=i.webcomponent,l.compoundConfig=i.compound,l.context=i.context,l.clientPermissions=i.clientPermissions,l.nodeParams=i.nodeParams,l.pathParams=i.pathParams,l.userSettingsGroup=i.userSettingsGroup,l.userSettings=u,l.searchParams=i.searchParams,l.activeFeatureToggleList=n.featureToggles().getActiveFeatureToggleList(),l.locale=n.i18n().getCurrentLocale(),l.theme=n.theming().getCurrentTheme(),l.viewGroup=i.viewGroup,l.virtualTree=i.virtualTree||i._virtualTree,l.virtualTreeRootNode=xe.findVirtualTreeRootNode(i),n.getEngine()._comm.addListeners(l,n),l}else{const l=document.createElement("luigi-container");return l.setAttribute("lui_container","true"),l.viewurl=ee.get(_r).applyDecorators(k.substituteViewUrl(i.viewUrl,i.pathParams,n),i.decodeViewUrl),l.webcomponent=i.webcomponent,l.context=i.context,l.clientPermissions=i.clientPermissions,l.cssVariables=await n.theming().getCSSVariables(),l.nodeParams=i.nodeParams,l.pathParams=i.pathParams,l.userSettingsGroup=i.userSettingsGroup,l.userSettings=u,l.searchParams=i.searchParams,l.activeFeatureToggleList=n.featureToggles().getActiveFeatureToggleList(),l.locale=n.i18n().getCurrentLocale(),l.theme=n.theming().getCurrentTheme(),l.viewGroup=i.viewGroup,l.virtualTree=i.virtualTree||i._virtualTree,l.virtualTreeRootNode=xe.findVirtualTreeRootNode(i),gc(l,n),dc(l,n),n.getEngine()._comm.addListeners(l,n),l}},gc=(i,n)=>{const r=n.getConfigValue("settings.customSandboxRules");if(!r?.length)return;const a=["allow-forms","allow-modals","allow-popups","allow-popups-to-escape-sandbox","allow-same-origin","allow-scripts"],u=r?[...new Set([...a,...r])]:a;i.sandboxRules=u},dc=(i,n)=>{const r=n.getConfigValue("settings.allowRules");r?.length&&(r.forEach((a,u)=>{r[u]=a+(a.indexOf(";")!=-1?"":";")}),i.allowRules=r)},Ue={navService:void 0,routingService:void 0,luigi:void 0,init:i=>{console.log("Init UI..."),Ue.navService=ee.get(vn),Ue.routingService=ee.get(Dn),Ue.luigi=i,i.getEngine()._connector?.renderMainLayout()},update:async i=>{const n=Ue.routingService.getCurrentRoute();if(!n)return;const r=!i||i.length===0;(r||i.includes("settings.header")||i.includes("settings")||i.includes("navigation")||i.includes("navigation.profile")||i.includes("navigation.contextSwitcher")||i.includes("navigation.productSwitcher"))&&Ue.luigi.getEngine()._connector?.renderTopNav(await Ue.navService.getTopNavData(n.path)),(r||i.includes("navigation")||i.includes("navigation.nodes")||i.includes("navigation.viewgroupdata")||i.includes("settings")||i.includes("settings.footer"))&&(ee.get(_n).deleteCache(),Ue.luigi.getEngine()._connector?.renderLeftNav(await Ue.navService.getLeftNavData(n.path)),Ue.luigi.getEngine()._connector?.renderTabNav(await Ue.navService.getTabNavData(n.path))),(r||i.includes("navigation")||i.includes("navigation.nodes")||i.includes("navigation.viewgroupdata")||i.includes("settings.theming"))&&(ee.get(_n).deleteCache(),Ue.updateMainContent(n.node,Ue.luigi))},updateMainContent:async(i,n,r,a)=>{const u=await n.readUserSettings(),c=i.userSettingsGroup&&typeof u=="object"&&u!==null?u[i.userSettingsGroup]:null,d=n.getEngine()._connector?.getContainerWrapper();if(n.getEngine()._connector?.hideLoadingIndicator(d),i&&d){let p,m;if((i.virtualTree||i._virtualTree)&&(m=xe.findVirtualTreeRootNode(i)),[...d.childNodes].forEach(y=>{y.tagName?.indexOf("LUIGI-")===0&&(y.viewGroup&&i.viewGroup!==y.viewGroup?y.style.display="none":y.viewGroup||y.virtualTree&&m===y.virtualTreeRootNode?p=y:y.remove())}),p)r||(p.style.display="block",p.viewurl=ee.get(_r).applyDecorators(k.substituteViewUrl(i.viewUrl,i.pathParams,n),i.decodeViewUrl),p.nodeParams=i.nodeParams,p.pathParams=i.pathParams,p.clientPermissions=i.clientPermissions,p.searchParams=k.prepareSearchParamsForClient(i,n),p.locale=n.i18n().getCurrentLocale(),p.theme=n.theming().getCurrentTheme(),p.activeFeatureToggleList=n.featureToggles().getActiveFeatureToggleList(),p.userSettingsGroup=i.userSettingsGroup,p.userSettings=c,gc(p,n),dc(p,n)),a||p.updateContext(i.context||{});else{const y=await Ua(i,n);d?.appendChild(y);const R=n.getEngine()._connector;i.loadingIndicator?.enabled!==!1&&R?.showLoadingIndicator(d)}}},openModal:async(i,n,r,a)=>{const u=await Ua(n,i),l=ee.get(Dn),c=ee.get(pn);let d=!1,p,m;const R=new Promise(L=>{p=()=>{d||(d=!0,L(),c.removeLastModalFromStack())},m=()=>{p&&p(),i.getConfigValue("routing.showModalPathInUrl")&&c.getModalStackLength()===0&&l.removeModalDataFromUrl(!0)},u.addEventListener(N.CLOSE_CURRENT_MODAL_REQUEST,m)}),C={closePromise:R,resolveFn:p,onCloseRequestHandler:m,onInternalClose:()=>{try{C.resolveFn&&C.resolveFn()}catch(L){console.warn("onInternalClose failed",L)}},modalsettings:r};c.registerModal(C),i.getEngine()._connector?.renderModal(u,r,()=>{a?.(),c.removeLastModalFromStack(),i.getConfigValue("routing.showModalPathInUrl")&&c.getModalStackLength()===0&&l.removeModalDataFromUrl(!0)},()=>R);const T=i.getEngine()._connector;n.loadingIndicator?.enabled!==!1&&T?.showLoadingIndicator(u.parentElement)},updateModalSettings:(i,n,r)=>{const a=ee.get(pn);if(a.getModalStackLength()===0)return;a.updateFirstModalSettings(i);const u=ee.get(Dn),l=k.getModalPathFromPath(r);l&&u.updateModalDataInUrl(l,a.getModalSettings(),n),r.getEngine()._connector?.updateModalSettings(a.getModalSettings())},openDrawer:async(i,n,r,a)=>{const u=await Ua(n,i);i.getEngine()._connector?.renderDrawer(u,r,a);const l=i.getEngine()._connector;n.loadingIndicator?.enabled!==!1&&l?.showLoadingIndicator(u.parentElement)}};class Dn{constructor(n){this.luigi=n}getNavigationService(){return this.navigationService||(this.navigationService=ee.get(vn)),this.navigationService}shouldSkipRoutingForUrlPatterns(){const n=[/access_token=/,/id_token=/];return(this.luigi.getConfigValue("routing.skipRoutingForUrlPatterns")||n).filter(a=>location.href.match(a)).length!==0}enableRouting(){const n=this.luigi.getConfig();console.log("Init Routing...",n.routing),n.routing?.useHashRouting?(window.addEventListener("hashchange",r=>{const a=!!r?.detail?.preventContextUpdate,u=!!r?.detail?.withoutSync;this.handleRouteChange(k.getCurrentPath(!0),u,a)}),this.handleRouteChange(k.getCurrentPath(!0))):(window.addEventListener("popstate",r=>{const a=!!r?.detail?.preventContextUpdate,u=!!r?.detail?.withoutSync;this.handleRouteChange(k.getCurrentPath(),u,a)}),this.handleRouteChange(k.getCurrentPath()))}async handleRouteChange(n,r=!1,a=!1){const u=n.path,l=n.query,c=u+(l?"?"+l:""),d=new URLSearchParams(l),p={};if(this.shouldSkipRoutingForUrlPatterns())return;this.setFeatureToggle(c),await this.shouldShowModalPathInUrl(n),d.forEach((T,L)=>{p[L]=T}),this.checkInvalidateCache(this.previousPathData,u);const m=await this.getNavigationService().getPathData(u);this.previousPathData=m;const y=k.filterNodeParams(p,this.luigi),R=await this.getNavigationService().shouldRedirect(u,m);if(R){this.luigi.navigation().navigate(R);return}this.currentRoute={raw:window.location.href,path:u,nodeParams:y},this.luigi.getEngine()._connector?.renderTopNav(await this.getNavigationService().getTopNavData(u,m)),this.luigi.getEngine()._connector?.renderLeftNav(await this.getNavigationService().getLeftNavData(u,m)),this.luigi.getEngine()._connector?.renderTabNav(await this.getNavigationService().getTabNavData(u,m));const C=m?.selectedNode??await this.getNavigationService().getCurrentNode(u);C&&(this.currentRoute.node=C,C.nodeParams=y||{},C.pathParams=m?.pathParams||{},C.searchParams=k.prepareSearchParamsForClient(C,this.luigi),this.getNavigationService().onNodeChange(this.previousNode,C),this.previousNode=C,Ue.updateMainContent(C,this.luigi,r,a))}getCurrentRoute(){return this.currentRoute}async shouldShowModalPathInUrl(n){this.luigi.getConfigValue("routing.showModalPathInUrl")&&await this.handleBookmarkableModalPath(n)}async handleBookmarkableModalPath(n){const r=ee.get(vn),a=ee.get(pn),u=new URLSearchParams(n?.query||""),l=k.getModalViewParamName(this.luigi),c=u.get(l);if(c){const d=u.get(`${l}Params`);try{const p=JSON.parse(d||"{}"),{nodeObject:m}=await r.extractDataFromPath(c);document.querySelector(".lui-modal luigi-container")?this.luigi.getEngine()._connector?.updateModalSettings(p):this.luigi.navigation().openAsModal(c,p||m.openNodeInModal)}catch(p){console.error("Error parsing modal settings from URL parameters",p)}}else{a.closeModals();return}}appendModalDataToUrl(n,r){const a=k.getHashQueryParamSeparator(),u=k.getQueryParams(this.luigi),l=k.getModalViewParamName(this.luigi),c=u[l],d=new URL(location.href),p=this.luigi.getConfigValue("routing.useHashRouting");let m=history.state,y,R;if(p){let[C,T]=d.hash.split("?");y=C,R=k.getURLWithoutModalData(T,l),R&&(y+="?"+R)}else y=d.pathname,R=k.getURLWithoutModalData(d.search,l),R&&(y+="?"+k.getURLWithoutModalData(d.search,l));if(m=k.handleHistoryState(m,y),c!==n){if(u[l]=n,r&&Object.keys(r).length&&(u[`${l}Params`]=JSON.stringify(r)),p){const C=location.hash.indexOf(a);C!==-1&&(d.hash=d.hash.slice(0,C)),d.hash=`${d.hash}${a}${k.encodeParams(u)}`}else d.search=`?${k.encodeParams(u)}`;history.pushState(m,"",d.href)}else{const C=new URL(d);if(p){let T=C.hash.split("?")[0];C.hash=T,R&&(C.hash+="?"+R)}else C.search=R;history.replaceState({},"",C.href),history.pushState(m,"",d.href)}}removeModalDataFromUrl(n){const r=k.getQueryParams(this.luigi),a=k.getModalViewParamName(this.luigi);let u=new URL(location.href);if(this.luigi.getConfigValue("routing.useHashRouting")){let c={};r[a]&&(c[a]=r[a]),r[`${a}Params`]&&(c[`${a}Params`]=r[`${a}Params`]);let d=k.encodeParams(c);u.hash.includes(`?${d}`)?u.hash=u.hash.replace(`?${d}`,""):u.hash.includes(`&${d}`)&&(u.hash=u.hash.replace(`&${d}`,""))}else{let c=new URLSearchParams(u.search.slice(1));c.delete(a),c.delete(`${a}Params`);let d="";Array.from(c.keys()).forEach(p=>{d+=(d===""?"?":"&")+p+"="+c.get(p)}),u.search=d}if(history.state&&history.state.modalHistoryLength>=0&&n){history.state.modalHistoryLength;const c=history.state.pathBeforeHistory;let d=!1;if(window.addEventListener("popstate",p=>{d?(history.replaceState({},"",c),history.pushState({},"",c),history.back()):(history.pushState({},"",c),history.back())},{once:!0}),history.state.historygap===history.length-history.state.modalHistoryLength)history.go(-history.state.modalHistoryLength);else if(history.state.modalHistoryLength>history.length){const p=history.length-1;d=!0,history.go(-p),window.Luigi.preventLoadingModalData=!0}else{const p=history.state.modalHistoryLength;history.go(-p)}}else history.pushState({},"",u.href)}setFeatureToggle(n){const r=this.luigi.getConfigValue("settings.featureToggles.queryStringParam"),a=this.luigi.featureToggles();r&&typeof n=="string"&&k.setFeatureToggles(r,n,a)}updateModalDataInUrl(n,r,a){let u=k.getHashQueryParamSeparator();const l=k.getQueryParams(this.luigi),c=k.getModalViewParamName(this.luigi);l[c]=n,r&&Object.keys(r).length&&(l[`${c}Params`]=JSON.stringify(r));const d=new URL(location.href);if(this.luigi.getConfigValue("routing.useHashRouting")){const m=location.hash.indexOf(u);m!==-1&&(d.hash=d.hash.slice(0,m)),d.hash=`${d.hash}${u}${k.encodeParams(l)}`}else d.search=`?${k.encodeParams(l)}`;a?history.pushState(window.state,"",d.href):history.replaceState(window.state,"",d.href)}checkInvalidateCache(n,r){if(!n)return;const a=ee.get(_n);let u=r.split("/");if(n.nodesInPath&&n.nodesInPath.length>0){let l=n.nodesInPath.slice(1),c=!0;for(let d=0;d<l.length;d++){let p=u.length>d?u[d]:void 0,m=l[d];if(p!==m.pathSegment||!c)if(k.isDynamicNode(m)){if(!c||p!==k.getDynamicNodeValue(m,n.pathParams)){a.deleteNodesRecursively(m);break}}else c=!1}}else a.deleteCache()}}class rS{constructor(n){this.hashRouting=!1,this.options={fromContext:null,fromClosestContext:!1,fromVirtualTreeRoot:!1,fromParent:!1},this.navigate=async(r,a,u,l,c)=>{const d={modalSettings:u,newTab:!1,options:this.options,path:r,preserveView:a,preventContextUpdate:!1,preventHistoryEntry:!1,withoutSync:!1};this.navService.handleNavigationRequest(d,void 0)},this.openAsModal=async(r,a,u)=>{a?.keepPrevious||await this.modalService.closeModals();const l=r.replace(/\/\/+/g,"/"),c=await this.navService.getCurrentNode(l),d=a||{};d.title||(d.title=c.label),this.luigi.getConfigValue("routing.showModalPathInUrl")&&this.modalService.getModalStackLength()===0&&this.routingService.appendModalDataToUrl(l,d),this.luigi.getEngine()._ui.openModal(this.luigi,c,d,u)},this.openAsDrawer=async(r,a,u)=>{const l=r.replace(/\/\/+/g,"/"),c=await this.navService.getCurrentNode(l),d=a||{};d.title||(d.title=c.label),this.luigi.getEngine()._ui.openDrawer(this.luigi,c,d,u)},this.runTimeErrorHandler=async r=>{const{path:a}=k.getCurrentPath(this.luigi.getConfig().routing?.useHashRouting),u=await this.navService.getCurrentNode(a),l=this.luigi.getConfigValue("navigation.defaults.runTimeErrorHandler");u?.runTimeErrorHandler?.errorFn&&W.isFunction(u?.runTimeErrorHandler?.errorFn)?u.runTimeErrorHandler.errorFn(r,u):l?.errorFn&&W.isFunction(l.errorFn)&&l.errorFn(r,u)},this.luigi=n,this.hashRouting=n.getConfig().routing?.useHashRouting,this.navService=ee.get(vn),this.routingService=ee.get(Dn),this.modalService=ee.get(pn)}fromVirtualTreeRoot(){return this.options.fromContext=null,this.options.fromClosestContext=!1,this.options.fromVirtualTreeRoot=!0,this.options.fromParent=!1,this}fromContext(n){return this.options.fromContext=n,this}fromClosestContext(){return this.options.fromContext=null,this.options.fromClosestContext=!0,this.options.fromParent=!1,this}fromParent(){return this.options.fromContext=null,this.options.fromClosestContext=!1,this.options.fromVirtualTreeRoot=!1,this.options.fromParent=!0,this}}class iS{constructor(n){this.luigi=n}addSearchParams(n,r=!1){if(!W.isObject(n)){console.log("Params argument must be an object");return}const a=new URL(location.href);this.luigi.getConfigValue("routing.useHashRouting")?a.hash=k.addParamsOnHashRouting(n,a.hash):k.modifySearchParams(n,a.searchParams),this.handleBrowserHistory(r,a),this.luigi.configChanged()}getSearchParams(){const n={},r=["__proto__","constructor","prototype"],a=new URL(location.href);let u;if(this.luigi.getConfigValue("routing.useHashRouting")){const l=a.hash.split("?")[1];u=l?new URLSearchParams(l).entries():[]}else u=a.searchParams.entries();for(const[l,c]of u){if(r.some(d=>l===d)){console.warn(`Blocked because of potentially dangerous query param: ${l}`);continue}n[l]=c}return n}handleBrowserHistory(n,r){const a=this.sanitizeUrl(r.href);if(!a){console.warn("invalid url: "+a);return}n?window.history.pushState({},"",a):window.history.replaceState({},"",a)}sanitizeUrl(n){return new URL(location.href).origin===new URL(n).origin?n:void 0}addNodeParams(n,r){if(!W.isObject(n)){console.log("Params argument must be an object");return}const a=k.getContentViewParamPrefix(this.luigi),u=new URL(location.href);this.luigi.getConfigValue("routing.useHashRouting")?u.hash=k.addParamsOnHashRouting(n,u.hash,a):k.modifySearchParams(n,u.searchParams,a),this.handleBrowserHistory(r,u),this.luigi.getConfigValue("routing.useHashRouting")?window.dispatchEvent(new HashChangeEvent("hashchange")):this.luigi.configChanged()}}class sS{#e;#o="";constructor(n){this.#e=n}async getAvailableThemes(){return await this.#e.getConfigValueAsync("settings.theming.themes")}setCurrentTheme(n){this.#o=n,this.#e.__cssVars=void 0}async getThemeObject(n){return(await this.getAvailableThemes())?.find(a=>a.id===n)}getCurrentTheme(){if(!this.isThemingAvailable())return!1;if(this.#o)return this.#o;const n=this.#e.getConfigValue("settings.theming");return n.defaultTheme||console.error("[Theming] getCurrentTheme() error. No theme set and no defaultTheme found in configuration",n),n.defaultTheme}isThemingAvailable(){return!!this.#e.getConfigValue("settings.theming")}async getCSSVariables(){if(!window.Luigi.__cssVars){const n=this.#e.getConfigValue("settings.theming.variables.file");if(n)try{const r=await fetch(n);window.Luigi.__cssVars=(await r.json()).root,Object.keys(window.Luigi.__cssVars).forEach(a=>{const u=getComputedStyle(document.documentElement).getPropertyValue("--"+a);u&&(window.Luigi.__cssVars[a]=u)})}catch(r){W.isFunction(this.#e.getConfigValue("settings.theming.variables.errorHandling"))?this.#e.getConfigValue("settings.theming.variables.errorHandling")(r):console.error("CSS variables file error: ",r)}else this.#e.getConfigValue("settings.theming.variables")==="fiori"&&window.__luigiThemeVars?(window.Luigi.__cssVars={},window.__luigiThemeVars.forEach(r=>{window.Luigi.__cssVars[r]=getComputedStyle(document.documentElement).getPropertyValue("--"+r)})):window.Luigi.__cssVars={}}return window.Luigi.__cssVars}_init(){const n=ee.get(_r);(()=>{const a=this.#e.getConfigValue("settings.theming");a&&a.nodeViewURLDecorator&&a.nodeViewURLDecorator.queryStringParameter&&n.add({type:"queryString",uid:"theming",key:a.nodeViewURLDecorator.queryStringParameter.keyName,valueFn:()=>{const u=this.getCurrentTheme(),l=a.nodeViewURLDecorator.queryStringParameter.value;return l?l(u):u}}),a&&a.useFioriScrollbars===!0&&document.body.classList.add("fioriScrollbars")})()}}class as{constructor(){this.unsavedChanges={isDirty:!1,persistUrl:null}}updateDirtyStatus(n,r){if(!this.unsavedChanges.dirtySet||!(this.unsavedChanges.dirtySet instanceof Set)){const a=new Set;a.add(r),this.unsavedChanges={dirtySet:a}}this.unsavedChanges.persistUrl=window.location.href,n?this.unsavedChanges.dirtySet?.add(r):this.unsavedChanges.dirtySet?.delete(r)}clearDirtyState(n){this.unsavedChanges&&this.unsavedChanges.dirtySet&&(n?this.unsavedChanges.dirtySet.delete(n):this.unsavedChanges.dirtySet.clear())}readDirtyStatus(){return this.unsavedChanges.dirtySet?this.unsavedChanges.dirtySet.size>0:!!this.unsavedChanges.isDirty}}let Bl;const Re={luigi:void 0,documentTitle:void 0,init:i=>{console.log("ux init..."),Re.luigi=i,Re.documentTitle=rs(void 0),Bl=ee.get(as)},processAlert:(i,n,r)=>{if(!Re.luigi)throw new Error("Luigi is not initialized.");const a={openFromClient:n,close:()=>{i.id&&r.notifyAlertClosed(i.id)},link:u=>{if(i.links){const l=i.links[u];if(l&&(l.url&&Re.luigi?.navigation().navigate(l.url),l.dismissKey&&i.id))return r.notifyAlertClosed(i.id,l.dismissKey),!0}return!1}};Re.luigi.getEngine()._connector?.renderAlert(i,a)},handleConfirmationModalRequest:(i,n)=>{if(!Re.luigi)throw new Error("Luigi is not initialized.");i&&(i={...i,header:Re.luigi.i18n().getTranslation(i.header||"luigi.confirmationModal.header"),body:Re.luigi.i18n().getTranslation(i.body||"luigi.confirmationModal.body"),buttonDismiss:Re.luigi.i18n().getTranslation(i.buttonDismiss||"luigi.button.dismiss"),buttonConfirm:Re.luigi.i18n().getTranslation(i.buttonConfirm||"luigi.button.confirm")}),Re.luigi.getEngine()._connector?.renderConfirmationModal(i,{confirm(){n.notifyConfirmationModalClosed(!0)},dismiss(){n.notifyConfirmationModalClosed(!1)}})},handleDirtyStatusRequest:(i,n)=>{if(!Re.luigi)throw new Error("Luigi is not initialized.");Bl.updateDirtyStatus(i,n)}};class aS{processUserSettingGroups(n,r){const a=[],u=n?.userSettingGroups,l=r?.userSettings?.userSettingGroups,c=u||l;if(W.isObject(c)){for(const d in c){const p={};p[d]=c[d],a.push(p)}return a}return a}getUserSettingsIframesInDom(){const n=document.querySelector(".iframeUserSettingsCtn");return n?[...n.children]:[]}hideUserSettingsIframe(){this.getUserSettingsIframesInDom().forEach(n=>{n.style.display="none"})}findActiveCustomUserSettingsIframe(n){const r=document.querySelectorAll("[userSettingsGroup]");for(let a=0;a<r.length;a++)if(r[a].contentWindow===n)return r[a];return null}}const oS=new aS;class uS{constructor(n){this.dirtyStatusService=ee.get(as),this.appLoadingIndicatorSelector="[luigi-app-loading-indicator]",this.showAlert=r=>new Promise(a=>{r.id||(r.id=W.getRandomId().toString());const u={openFromClient:!1,close:()=>{a(!0)},link:l=>{if(r.links){const c=r.links[l];if(c&&(c.url&&this.luigi?.navigation().navigate(c.url),c.dismissKey))return a(c.dismissKey),!0}return!1}};this.luigi.getEngine()._connector?.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((a,u)=>{this.luigi.getEngine()._connector?.renderConfirmationModal(r,{confirm(){a(!0)},dismiss(){u()}})})),this.processUserSettingGroups=()=>{const r=this.luigi.getConfigValue("userSettings"),a=this.luigi.getConfigValue("settings");return oS.processUserSettingGroups(r,a)},this.openUserSettings=r=>{this.luigi.getEngine()._connector?.openUserSettings(r)},this.closeUserSettings=()=>{this.luigi.getEngine()._connector?.closeUserSettings()},this.setDocumentTitle=r=>{this.luigi.getEngine()._ux?.documentTitle?.set(r),this.luigi.getEngine()._connector?.setDocumentTitle(r)},this.getDocumentTitle=()=>jl(this.luigi.getEngine()._ux?.documentTitle)||window.document.title||"",this.hideAppLoadingIndicator=()=>{const r=document.querySelector(this.appLoadingIndicatorSelector);r&&(r.classList.add("hidden"),setTimeout(()=>{r.parentNode?.removeChild(r)},500))},this.showLoadingIndicator=r=>this.luigi.getEngine()._connector?.showLoadingIndicator(r),this.hideLoadingIndicator=r=>this.luigi.getEngine()._connector?.hideLoadingIndicator(r),this.addBackdrop=()=>this.luigi.getEngine()._connector?.addBackdrop(),this.removeBackdrop=()=>this.luigi.getEngine()._connector?.removeBackdrop(),this.getDirtyStatus=()=>this.dirtyStatusService.readDirtyStatus(),this.luigi=n}}class lS{constructor(n){this.engine=n,this.initialized=!1,this.configReadyCallback=function(){},this.USER_SETTINGS_KEY="luigi.preferences.userSettings",this.setConfig=r=>{this.config=r,this.setConfigCallback(this.getConfigReadyCallback()),fr.init().then(()=>{this.engine.init(),this.initialized||(this.initialized=!0,Wm.luigiAfterInit(this))})},this.getConfig=()=>this.config,this.configChanged=(...r)=>{this.getEngine()._ui.update(r)},this.i18n=()=>(this._i18n||(this._i18n=new km(this)),this._i18n),this.navigation=()=>new rS(this),this.ux=()=>new uS(this),this.featureToggles=()=>(this._featureToggles||(this._featureToggles=new Hm),this._featureToggles),this.routing=()=>(this._routing||(this._routing=new iS(this)),this._routing),this.theming=()=>(this._theming||(this._theming=new sS(this)),this._theming),this.auth=()=>ar,this._store=this.createConfigStore()}getEngine(){return this.engine}getConfigValue(n){return W.getConfigValueFromObject(this.getConfig(),n)}getConfigValueAsync(n,...r){return cr.getConfigValueFromObjectAsync(this.getConfig(),n,r)}clearNavigationCache(){ee.get(_n).deleteCache()}async readUserSettings(){const n=await this.getConfigValueAsync("userSettings"),r=n||await this.getConfigValueAsync("settings.userSettings");if(r&&W.isFunction(r.readUserSettings))return r.readUserSettings();const a=localStorage.getItem(this.USER_SETTINGS_KEY);return a&&JSON.parse(a)}async storeUserSettings(n,r){const a=await this.getConfigValueAsync("userSettings"),u=a||await this.getConfigValueAsync("settings.userSettings");if(u&&W.isFunction(u.storeUserSettings))return u.storeUserSettings(n,r);localStorage.setItem(this.USER_SETTINGS_KEY,JSON.stringify(n)),this.configChanged()}createConfigStore(){const n=rs({}),r={};let a=[];return{subscribe:u=>{a.push(n.subscribe(u))},reset:u=>{n.update(u)},subscribeToScope:(u,l)=>{let c=r[l];c||(c=new Set,r[l]=c),c.add(u)},fire:(u,l)=>{const c=r[u];c&&[...c].forEach(d=>{d(l)})},clear:()=>{a.forEach(u=>{u()}),a=[]}}}getConfigReadyCallback(){return new Promise(n=>{this.i18n()._init(),n()})}setConfigCallback(n){this.configReadyCallback=n}}const ka=!1;var cS=Array.isArray,fS=Array.prototype.indexOf,vr=Array.prototype.includes,hS=Array.from,gS=Object.defineProperty,zr=Object.getOwnPropertyDescriptor,dS=Object.prototype,pS=Array.prototype,_S=Object.getPrototypeOf,Gl=Object.isExtensible;const vS=()=>{};function mS(i){for(var n=0;n<i.length;n++)i[n]()}function SS(){var i,n,r=new Promise((a,u)=>{i=a,n=u});return{promise:r,resolve:i,reject:n}}const Be=2,jr=4,os=8,Qa=1<<24,Sn=16,wn=32,Wn=64,Wa=128,wt=512,De=1024,Me=2048,Lt=4096,hn=8192,Mn=16384,ei=32768,us=65536,Ql=1<<17,wS=1<<18,cs=1<<19,ES=1<<20,kn=65536,Ha=1<<21,pc=1<<22,Zr=1<<23,Da=Symbol("$state"),qa=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"};function CS(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function TS(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function yS(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function AS(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function RS(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}const Ve=Symbol();function bS(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}function PS(i){return i===this.v}let za=!1,IS=!1;function xS(){za=!0}let Nt=null;function ls(i){Nt=i}function LS(i,n=!1,r){Nt={p:Nt,i:!1,c:null,e:null,s:i,x:null,l:za&&!n?{s:null,u:null,$:[]}:null}}function NS(i){var n=Nt,r=n.e;if(r!==null){n.e=null;for(var a of r)KS(a)}return n.i=!0,Nt=n.p,{}}function fs(){return!za||Nt!==null&&Nt.l===null}let or=[];function $S(){var i=or;or=[],mS(i)}function gr(i){if(or.length===0){var n=or;queueMicrotask(()=>{n===or&&$S()})}or.push(i)}function _c(i){var n=_e;if(n===null)return ae.f|=Zr,i;if((n.f&ei)===0&&(n.f&jr)===0)throw i;ur(i,n)}function ur(i,n){for(;n!==null;){if((n.f&Wa)!==0){if((n.f&ei)===0)throw i;try{n.b.error(i);return}catch(r){i=r}}n=n.parent}throw i}const OS=-7169;function me(i,n){i.f=i.f&OS|n}function Ka(i){(i.f&wt)!==0||i.deps===null?me(i,De):me(i,Lt)}function vc(i){if(i!==null)for(const n of i)(n.f&Be)===0||(n.f&kn)===0||(n.f^=kn,vc(n.deps))}function mc(i,n,r){(i.f&Me)!==0?n.add(i):(i.f&Lt)!==0&&r.add(i),vc(i.deps),me(i,De)}const Zi=new Set;let Oe=null,It=null,St=[],Ya=null,mr=null,US=1;class gn{id=US++;current=new Map;previous=new Map;#e=new Set;#o=new Set;#i=0;#u=0;#r=null;#s=new Set;#t=new Set;#n=new Map;is_fork=!1;#a=!1;#c(){return this.is_fork||this.#u>0}skip_effect(n){this.#n.has(n)||this.#n.set(n,{d:[],m:[]})}unskip_effect(n){var r=this.#n.get(n);if(r){this.#n.delete(n);for(var a of r.d)me(a,Me),Mt(a);for(a of r.m)me(a,Lt),Mt(a)}}process(n){St=[],this.apply();var r=mr=[],a=[];for(const u of n)this.#l(u,r,a);if(mr=null,this.#c()){this.#f(a),this.#f(r);for(const[u,l]of this.#n)Ec(u,l)}else{Oe=null;for(const u of this.#e)u(this);this.#e.clear(),this.#i===0&&this.#h(),ql(a),ql(r),this.#s.clear(),this.#t.clear(),this.#r?.resolve()}It=null}#l(n,r,a){n.f^=De;for(var u=n.first;u!==null;){var l=u.f,c=(l&(wn|Wn))!==0,d=c&&(l&De)!==0,p=(l&hn)!==0,m=d||this.#n.has(u);if(!m&&u.fn!==null){c?p||(u.f^=De):(l&jr)!==0?r.push(u):(l&(os|Qa))!==0&&p?a.push(u):ni(u)&&(wr(u),(l&Sn)!==0&&(this.#t.add(u),p&&me(u,Me)));var y=u.first;if(y!==null){u=y;continue}}for(;u!==null;){var R=u.next;if(R!==null){u=R;break}u=u.parent}}}#f(n){for(var r=0;r<n.length;r+=1)mc(n[r],this.#s,this.#t)}capture(n,r){r!==Ve&&!this.previous.has(n)&&this.previous.set(n,r),(n.f&Zr)===0&&(this.current.set(n,n.v),It?.set(n,n.v))}activate(){Oe=this,this.apply()}deactivate(){Oe===this&&(Oe=null,It=null)}flush(){if(St.length>0)Oe=this,DS();else if(this.#i===0&&!this.is_fork){for(const n of this.#e)n(this);this.#e.clear(),this.#h(),this.#r?.resolve()}this.deactivate()}discard(){for(const n of this.#o)n(this);this.#o.clear()}#h(){if(Zi.size>1){this.previous.clear();var n=Oe,r=It,a=!0;for(const l of Zi){if(l===this){a=!1;continue}const c=[];for(const[p,m]of this.current){if(l.current.has(p))if(a&&m!==l.current.get(p))l.current.set(p,m);else continue;c.push(p)}if(c.length===0)continue;const d=[...l.current.keys()].filter(p=>!this.current.has(p));if(d.length>0){var u=St;St=[];const p=new Set,m=new Map;for(const y of c)Sc(y,d,p,m);if(St.length>0){Oe=l,l.apply();for(const y of St)l.#l(y,[],[]);l.deactivate()}St=u}}Oe=n,It=r}this.#n.clear(),Zi.delete(this)}increment(n){this.#i+=1,n&&(this.#u+=1)}decrement(n){this.#i-=1,n&&(this.#u-=1),!this.#a&&(this.#a=!0,gr(()=>{this.#a=!1,this.#c()?St.length>0&&this.flush():this.revive()}))}revive(){for(const n of this.#s)this.#t.delete(n),me(n,Me),Mt(n);for(const n of this.#t)me(n,Lt),Mt(n);this.flush()}oncommit(n){this.#e.add(n)}ondiscard(n){this.#o.add(n)}settled(){return(this.#r??=SS()).promise}static ensure(){if(Oe===null){const n=Oe=new gn;Zi.add(Oe),gr(()=>{Oe===n&&n.flush()})}return Oe}apply(){}}function DS(){var i=null;try{for(var n=0;St.length>0;){var r=gn.ensure();if(n++>1e3){var a,u;MS()}r.process(St),dn.clear()}}finally{St=[],Ya=null,mr=null}}function MS(){try{CS()}catch(i){ur(i,Ya)}}let Xt=null;function ql(i){var n=i.length;if(n!==0){for(var r=0;r<n;){var a=i[r++];if((a.f&(Mn|hn))===0&&ni(a)&&(Xt=new Set,wr(a),a.deps===null&&a.first===null&&a.nodes===null&&a.teardown===null&&a.ac===null&&Nc(a),Xt?.size>0)){dn.clear();for(const u of Xt){if((u.f&(Mn|hn))!==0)continue;const l=[u];let c=u.parent;for(;c!==null;)Xt.has(c)&&(Xt.delete(c),l.push(c)),c=c.parent;for(let d=l.length-1;d>=0;d--){const p=l[d];(p.f&(Mn|hn))===0&&wr(p)}}Xt.clear()}}Xt=null}}function Sc(i,n,r,a){if(!r.has(i)&&(r.add(i),i.reactions!==null))for(const u of i.reactions){const l=u.f;(l&Be)!==0?Sc(u,n,r,a):(l&(pc|Sn))!==0&&(l&Me)===0&&wc(u,n,a)&&(me(u,Me),Mt(u))}}function wc(i,n,r){const a=r.get(i);if(a!==void 0)return a;if(i.deps!==null)for(const u of i.deps){if(vr.call(n,u))return!0;if((u.f&Be)!==0&&wc(u,n,r))return r.set(u,!0),!0}return r.set(i,!1),!1}function Mt(i){var n=Ya=i,r=n.b;if(r?.is_pending&&(i.f&(jr|os|Qa))!==0&&(i.f&ei)===0){r.defer_effect(i);return}for(;n.parent!==null;){n=n.parent;var a=n.f;if(mr!==null&&n===_e&&(i.f&os)===0)return;if((a&(Wn|wn))!==0){if((a&De)===0)return;n.f^=De}}St.push(n)}function Ec(i,n){if(!((i.f&wn)!==0&&(i.f&De)!==0)){(i.f&Me)!==0?n.d.push(i):(i.f&Lt)!==0&&n.m.push(i),me(i,De);for(var r=i.first;r!==null;)Ec(r,n),r=r.next}}function FS(i){let n=0,r=Za(0),a;return()=>{Ja()&&(lr(r),XS(()=>(n===0&&(a=iw(()=>i(()=>Kr(r)))),n+=1,()=>{gr(()=>{n-=1,n===0&&(a?.(),a=void 0,Kr(r))})})))}}var kS=us|cs;function WS(i,n,r,a){new HS(i,n,r,a)}class HS{parent;is_pending=!1;transform_error;#e;#o=null;#i;#u;#r;#s=null;#t=null;#n=null;#a=null;#c=0;#l=0;#f=!1;#h=new Set;#d=new Set;#g=null;#S=FS(()=>(this.#g=Za(this.#c),()=>{this.#g=null}));constructor(n,r,a,u){this.#e=n,this.#i=r,this.#u=l=>{var c=_e;c.b=this,c.f|=Wa,a(l)},this.parent=_e.b,this.transform_error=u??this.parent?.transform_error??(l=>l),this.#r=ZS(()=>{this.#v()},kS)}#w(){try{this.#s=Ln(()=>this.#u(this.#e))}catch(n){this.error(n)}}#E(n){const r=this.#i.failed;r&&(this.#n=Ln(()=>{r(this.#e,()=>n,()=>()=>{})}))}#C(){const n=this.#i.pending;n&&(this.is_pending=!0,this.#t=Ln(()=>n(this.#e)),gr(()=>{var r=this.#a=document.createDocumentFragment(),a=Pc();r.append(a),this.#s=this.#_(()=>(gn.ensure(),Ln(()=>this.#u(a)))),this.#l===0&&(this.#e.before(r),this.#a=null,ts(this.#t,()=>{this.#t=null}),this.#p())}))}#v(){try{if(this.is_pending=this.has_pending_snippet(),this.#l=0,this.#c=0,this.#s=Ln(()=>{this.#u(this.#e)}),this.#l>0){var n=this.#a=document.createDocumentFragment();ew(this.#s,n);const r=this.#i.pending;this.#t=Ln(()=>r(this.#e))}else this.#p()}catch(r){this.error(r)}}#p(){this.is_pending=!1;for(const n of this.#h)me(n,Me),Mt(n);for(const n of this.#d)me(n,Lt),Mt(n);this.#h.clear(),this.#d.clear()}defer_effect(n){mc(n,this.#h,this.#d)}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!this.#i.pending}#_(n){var r=_e,a=ae,u=Nt;mn(this.#r),kt(this.#r),ls(this.#r.ctx);try{return n()}catch(l){return _c(l),null}finally{mn(r),kt(a),ls(u)}}#m(n){if(!this.has_pending_snippet()){this.parent&&this.parent.#m(n);return}this.#l+=n,this.#l===0&&(this.#p(),this.#t&&ts(this.#t,()=>{this.#t=null}),this.#a&&(this.#e.before(this.#a),this.#a=null))}update_pending_count(n){this.#m(n),this.#c+=n,!(!this.#g||this.#f)&&(this.#f=!0,gr(()=>{this.#f=!1,this.#g&&Ac(this.#g,this.#c)}))}get_effect_pending(){return this.#S(),lr(this.#g)}error(n){var r=this.#i.onerror;let a=this.#i.failed;if(!r&&!a)throw n;this.#s&&(Ft(this.#s),this.#s=null),this.#t&&(Ft(this.#t),this.#t=null),this.#n&&(Ft(this.#n),this.#n=null);var u=!1,l=!1;const c=()=>{if(u){bS();return}u=!0,l&&RS(),this.#n!==null&&ts(this.#n,()=>{this.#n=null}),this.#_(()=>{gn.ensure(),this.#v()})},d=p=>{try{l=!0,r?.(p,c),l=!1}catch(m){ur(m,this.#r&&this.#r.parent)}a&&(this.#n=this.#_(()=>{gn.ensure();try{return Ln(()=>{var m=_e;m.b=this,m.f|=Wa,a(this.#e,()=>p,()=>c)})}catch(m){return ur(m,this.#r.parent),null}}))};gr(()=>{var p;try{p=this.transform_error(n)}catch(m){ur(m,this.#r&&this.#r.parent);return}p!==null&&typeof p=="object"&&typeof p.then=="function"?p.then(d,m=>ur(m,this.#r&&this.#r.parent)):d(p)})}}function VS(i){var n=i.effects;if(n!==null){i.effects=null;for(var r=0;r<n.length;r+=1)Ft(n[r])}}function BS(i){for(var n=i.parent;n!==null;){if((n.f&Be)===0)return(n.f&Mn)===0?n:null;n=n.parent}return null}function Xa(i){var n,r=_e;mn(BS(i));try{i.f&=~kn,VS(i),n=Mc(i)}finally{mn(r)}return n}function Cc(i){var n=Xa(i);if(!i.equals(n)&&(i.wv=Uc(),(!Oe?.is_fork||i.deps===null)&&(i.v=n,i.deps===null))){me(i,De);return}Sr||(It!==null?(Ja()||Oe?.is_fork)&&It.set(i,n):Ka(i))}function GS(i){if(i.effects!==null)for(const n of i.effects)(n.teardown||n.ac)&&(n.teardown?.(),n.ac?.abort(qa),n.teardown=vS,n.ac=null,Jr(n,0),ja(n))}function Tc(i){if(i.effects!==null)for(const n of i.effects)n.teardown&&wr(n)}let Va=new Set;const dn=new Map;let yc=!1;function Za(i,n){var r={f:0,v:i,reactions:null,equals:PS,rv:0,wv:0};return r}function un(i,n){const r=Za(i);return tw(r),r}function Nn(i,n,r=!1){ae!==null&&(!xt||(ae.f&Ql)!==0)&&fs()&&(ae.f&(Be|Sn|pc|Ql))!==0&&(Et===null||!vr.call(Et,i))&&AS();let a=r?Gr(n):n;return Ac(i,a)}function Ac(i,n){if(!i.equals(n)){var r=i.v;Sr?dn.set(i,n):dn.set(i,r),i.v=n;var a=gn.ensure();if(a.capture(i,r),(i.f&Be)!==0){const u=i;(i.f&Me)!==0&&Xa(u),Ka(u)}i.wv=Uc(),Rc(i,Me),fs()&&_e!==null&&(_e.f&De)!==0&&(_e.f&(wn|Wn))===0&&(vt===null?nw([i]):vt.push(i)),!a.is_fork&&Va.size>0&&!yc&&QS()}return n}function QS(){yc=!1;for(const i of Va)(i.f&De)!==0&&me(i,Lt),ni(i)&&wr(i);Va.clear()}function Kr(i){Nn(i,i.v+1)}function Rc(i,n){var r=i.reactions;if(r!==null)for(var a=fs(),u=r.length,l=0;l<u;l++){var c=r[l],d=c.f;if(!(!a&&c===_e)){var p=(d&Me)===0;if(p&&me(c,n),(d&Be)!==0){var m=c;It?.delete(m),(d&kn)===0&&(d&wt&&(c.f|=kn),Rc(m,Lt))}else p&&((d&Sn)!==0&&Xt!==null&&Xt.add(c),Mt(c))}}}function Gr(i){if(typeof i!="object"||i===null||Da in i)return i;const n=_S(i);if(n!==dS&&n!==pS)return i;var r=new Map,a=cS(i),u=un(0),l=Fn,c=d=>{if(Fn===l)return d();var p=ae,m=Fn;kt(null),Yl(l);var y=d();return kt(p),Yl(m),y};return a&&r.set("length",un(i.length)),new Proxy(i,{defineProperty(d,p,m){(!("value"in m)||m.configurable===!1||m.enumerable===!1||m.writable===!1)&&TS();var y=r.get(p);return y===void 0?c(()=>{var R=un(m.value);return r.set(p,R),R}):Nn(y,m.value,!0),!0},deleteProperty(d,p){var m=r.get(p);if(m===void 0){if(p in d){const y=c(()=>un(Ve));r.set(p,y),Kr(u)}}else Nn(m,Ve),Kr(u);return!0},get(d,p,m){if(p===Da)return i;var y=r.get(p),R=p in d;if(y===void 0&&(!R||zr(d,p)?.writable)&&(y=c(()=>{var T=Gr(R?d[p]:Ve),L=un(T);return L}),r.set(p,y)),y!==void 0){var C=lr(y);return C===Ve?void 0:C}return Reflect.get(d,p,m)},getOwnPropertyDescriptor(d,p){var m=Reflect.getOwnPropertyDescriptor(d,p);if(m&&"value"in m){var y=r.get(p);y&&(m.value=lr(y))}else if(m===void 0){var R=r.get(p),C=R?.v;if(R!==void 0&&C!==Ve)return{enumerable:!0,configurable:!0,value:C,writable:!0}}return m},has(d,p){if(p===Da)return!0;var m=r.get(p),y=m!==void 0&&m.v!==Ve||Reflect.has(d,p);if(m!==void 0||_e!==null&&(!y||zr(d,p)?.writable)){m===void 0&&(m=c(()=>{var C=y?Gr(d[p]):Ve,T=un(C);return T}),r.set(p,m));var R=lr(m);if(R===Ve)return!1}return y},set(d,p,m,y){var R=r.get(p),C=p in d;if(a&&p==="length")for(var T=m;T<R.v;T+=1){var L=r.get(T+"");L!==void 0?Nn(L,Ve):T in d&&(L=c(()=>un(Ve)),r.set(T+"",L))}if(R===void 0)(!C||zr(d,p)?.writable)&&(R=c(()=>un(void 0)),Nn(R,Gr(m)),r.set(p,R));else{C=R.v!==Ve;var D=c(()=>Gr(m));Nn(R,D)}var F=Reflect.getOwnPropertyDescriptor(d,p);if(F?.set&&F.set.call(y,m),!C){if(a&&typeof p=="string"){var te=r.get("length"),ve=Number(p);Number.isInteger(ve)&&ve>=te.v&&Nn(te,ve+1)}Kr(u)}return!0},ownKeys(d){lr(u);var p=Reflect.ownKeys(d).filter(R=>{var C=r.get(R);return C===void 0||C.v!==Ve});for(var[m,y]of r)y.v!==Ve&&!(m in d)&&p.push(m);return p},setPrototypeOf(){yS()}})}var zl,bc;function qS(){if(zl===void 0){zl=window;var i=Element.prototype,n=Node.prototype,r=Text.prototype;zr(n,"firstChild").get,bc=zr(n,"nextSibling").get,Gl(i)&&(i.__click=void 0,i.__className=void 0,i.__attributes=null,i.__style=void 0,i.__e=void 0),Gl(r)&&(r.__t=void 0)}}function Pc(i=""){return document.createTextNode(i)}function Ic(i){return bc.call(i)}function xc(i){var n=ae,r=_e;kt(null),mn(null);try{return i()}finally{kt(n),mn(r)}}function zS(i,n){var r=n.last;r===null?n.last=n.first=i:(r.next=i,i.prev=r,n.last=i)}function ti(i,n){var r=_e;r!==null&&(r.f&hn)!==0&&(i|=hn);var a={ctx:Nt,deps:null,nodes:null,f:i|Me|wt,first:null,fn:n,last:null,next:null,parent:r,b:r&&r.b,prev:null,teardown:null,wv:0,ac:null},u=a;if((i&jr)!==0)mr!==null?mr.push(a):Mt(a);else if(n!==null){try{wr(a)}catch(c){throw Ft(a),c}u.deps===null&&u.teardown===null&&u.nodes===null&&u.first===u.last&&(u.f&cs)===0&&(u=u.first,(i&Sn)!==0&&(i&us)!==0&&u!==null&&(u.f|=us))}if(u!==null&&(u.parent=r,r!==null&&zS(u,r),ae!==null&&(ae.f&Be)!==0&&(i&Wn)===0)){var l=ae;(l.effects??=[]).push(u)}return a}function Ja(){return ae!==null&&!xt}function KS(i){return ti(jr|ES,i)}function YS(i){gn.ensure();const n=ti(Wn|cs,i);return(r={})=>new Promise(a=>{r.outro?ts(n,()=>{Ft(n),a(void 0)}):(Ft(n),a(void 0))})}function XS(i,n=0){return ti(os|n,i)}function ZS(i,n=0){var r=ti(Sn|n,i);return r}function Ln(i){return ti(wn|cs,i)}function Lc(i){var n=i.teardown;if(n!==null){const r=Sr,a=ae;Kl(!0),kt(null);try{n.call(null)}finally{Kl(r),kt(a)}}}function ja(i,n=!1){var r=i.first;for(i.first=i.last=null;r!==null;){const u=r.ac;u!==null&&xc(()=>{u.abort(qa)});var a=r.next;(r.f&Wn)!==0?r.parent=null:Ft(r,n),r=a}}function JS(i){for(var n=i.first;n!==null;){var r=n.next;(n.f&wn)===0&&Ft(n),n=r}}function Ft(i,n=!0){var r=!1;(n||(i.f&wS)!==0)&&i.nodes!==null&&i.nodes.end!==null&&(jS(i.nodes.start,i.nodes.end),r=!0),ja(i,n&&!r),Jr(i,0),me(i,Mn);var a=i.nodes&&i.nodes.t;if(a!==null)for(const l of a)l.stop();Lc(i);var u=i.parent;u!==null&&u.first!==null&&Nc(i),i.next=i.prev=i.teardown=i.ctx=i.deps=i.fn=i.nodes=i.ac=null}function jS(i,n){for(;i!==null;){var r=i===n?null:Ic(i);i.remove(),i=r}}function Nc(i){var n=i.parent,r=i.prev,a=i.next;r!==null&&(r.next=a),a!==null&&(a.prev=r),n!==null&&(n.first===i&&(n.first=a),n.last===i&&(n.last=r))}function ts(i,n,r=!0){var a=[];$c(i,a,!0);var u=()=>{r&&Ft(i),n&&n()},l=a.length;if(l>0){var c=()=>--l||u();for(var d of a)d.out(c)}else u()}function $c(i,n,r){if((i.f&hn)===0){i.f^=hn;var a=i.nodes&&i.nodes.t;if(a!==null)for(const d of a)(d.is_global||r)&&n.push(d);for(var u=i.first;u!==null;){var l=u.next,c=(u.f&us)!==0||(u.f&wn)!==0&&(i.f&Sn)!==0;$c(u,n,c?r:!1),u=l}}}function ew(i,n){if(i.nodes)for(var r=i.nodes.start,a=i.nodes.end;r!==null;){var u=r===a?null:Ic(r);n.append(r),r=u}}let ns=!1,Sr=!1;function Kl(i){Sr=i}let ae=null,xt=!1;function kt(i){ae=i}let _e=null;function mn(i){_e=i}let Et=null;function tw(i){ae!==null&&(Et===null?Et=[i]:Et.push(i))}let Ze=null,ot=0,vt=null;function nw(i){vt=i}let Oc=1,On=0,Fn=On;function Yl(i){Fn=i}function Uc(){return++Oc}function ni(i){var n=i.f;if((n&Me)!==0)return!0;if(n&Be&&(i.f&=~kn),(n&Lt)!==0){for(var r=i.deps,a=r.length,u=0;u<a;u++){var l=r[u];if(ni(l)&&Cc(l),l.wv>i.wv)return!0}(n&wt)!==0&&It===null&&me(i,De)}return!1}function Dc(i,n,r=!0){var a=i.reactions;if(a!==null&&!(Et!==null&&vr.call(Et,i)))for(var u=0;u<a.length;u++){var l=a[u];(l.f&Be)!==0?Dc(l,n,!1):n===l&&(r?me(l,Me):(l.f&De)!==0&&me(l,Lt),Mt(l))}}function Mc(i){var n=Ze,r=ot,a=vt,u=ae,l=Et,c=Nt,d=xt,p=Fn,m=i.f;Ze=null,ot=0,vt=null,ae=(m&(wn|Wn))===0?i:null,Et=null,ls(i.ctx),xt=!1,Fn=++On,i.ac!==null&&(xc(()=>{i.ac.abort(qa)}),i.ac=null);try{i.f|=Ha;var y=i.fn,R=y();i.f|=ei;var C=i.deps,T=Oe?.is_fork;if(Ze!==null){var L;if(T||Jr(i,ot),C!==null&&ot>0)for(C.length=ot+Ze.length,L=0;L<Ze.length;L++)C[ot+L]=Ze[L];else i.deps=C=Ze;if(Ja()&&(i.f&wt)!==0)for(L=ot;L<C.length;L++)(C[L].reactions??=[]).push(i)}else!T&&C!==null&&ot<C.length&&(Jr(i,ot),C.length=ot);if(fs()&&vt!==null&&!xt&&C!==null&&(i.f&(Be|Lt|Me))===0)for(L=0;L<vt.length;L++)Dc(vt[L],i);if(u!==null&&u!==i){if(On++,u.deps!==null)for(let D=0;D<r;D+=1)u.deps[D].rv=On;if(n!==null)for(const D of n)D.rv=On;vt!==null&&(a===null?a=vt:a.push(...vt))}return(i.f&Zr)!==0&&(i.f^=Zr),R}catch(D){return _c(D)}finally{i.f^=Ha,Ze=n,ot=r,vt=a,ae=u,Et=l,ls(c),xt=d,Fn=p}}function rw(i,n){let r=n.reactions;if(r!==null){var a=fS.call(r,i);if(a!==-1){var u=r.length-1;u===0?r=n.reactions=null:(r[a]=r[u],r.pop())}}if(r===null&&(n.f&Be)!==0&&(Ze===null||!vr.call(Ze,n))){var l=n;(l.f&wt)!==0&&(l.f^=wt,l.f&=~kn),Ka(l),GS(l),Jr(l,0)}}function Jr(i,n){var r=i.deps;if(r!==null)for(var a=n;a<r.length;a++)rw(i,r[a])}function wr(i){var n=i.f;if((n&Mn)===0){me(i,De);var r=_e,a=ns;_e=i,ns=!0;try{(n&(Sn|Qa))!==0?JS(i):ja(i),Lc(i);var u=Mc(i);i.teardown=typeof u=="function"?u:null,i.wv=Oc;var l;ka&&IS&&(i.f&Me)!==0&&i.deps}finally{ns=a,_e=r}}}function lr(i){var n=i.f,r=(n&Be)!==0;if(ae!==null&&!xt){var a=_e!==null&&(_e.f&Mn)!==0;if(!a&&(Et===null||!vr.call(Et,i))){var u=ae.deps;if((ae.f&Ha)!==0)i.rv<On&&(i.rv=On,Ze===null&&u!==null&&u[ot]===i?ot++:Ze===null?Ze=[i]:Ze.push(i));else{(ae.deps??=[]).push(i);var l=i.reactions;l===null?i.reactions=[ae]:vr.call(l,ae)||l.push(ae)}}}if(Sr&&dn.has(i))return dn.get(i);if(r){var c=i;if(Sr){var d=c.v;return((c.f&De)===0&&c.reactions!==null||kc(c))&&(d=Xa(c)),dn.set(c,d),d}var p=(c.f&wt)===0&&!xt&&ae!==null&&(ns||(ae.f&wt)!==0),m=(c.f&ei)===0;ni(c)&&(p&&(c.f|=wt),Cc(c)),p&&!m&&(Tc(c),Fc(c))}if(It?.has(i))return It.get(i);if((i.f&Zr)!==0)throw i.v;return i.v}function Fc(i){if(i.f|=wt,i.deps!==null)for(const n of i.deps)(n.reactions??=[]).push(i),(n.f&Be)!==0&&(n.f&wt)===0&&(Tc(n),Fc(n))}function kc(i){if(i.v===Ve)return!0;if(i.deps===null)return!1;for(const n of i.deps)if(dn.has(n)||(n.f&Be)!==0&&kc(n))return!0;return!1}function iw(i){var n=xt;try{return xt=!0,i()}finally{xt=n}}const sw=["touchstart","touchmove"];function aw(i){return sw.includes(i)}const Ji=Symbol("events"),ow=new Set,Xl=new Set;let Zl=null;function Jl(i){var n=this,r=n.ownerDocument,a=i.type,u=i.composedPath?.()||[],l=u[0]||i.target;Zl=i;var c=0,d=Zl===i&&i[Ji];if(d){var p=u.indexOf(d);if(p!==-1&&(n===document||n===window)){i[Ji]=n;return}var m=u.indexOf(n);if(m===-1)return;p<=m&&(c=p)}if(l=u[c]||i.target,l!==n){gS(i,"currentTarget",{configurable:!0,get(){return l||r}});var y=ae,R=_e;kt(null),mn(null);try{for(var C,T=[];l!==null;){var L=l.assignedSlot||l.parentNode||l.host||null;try{var D=l[Ji]?.[a];D!=null&&(!l.disabled||i.target===l)&&D.call(l,i)}catch(F){C?T.push(F):C=F}if(i.cancelBubble||L===n||L===null)break;l=L}if(C){for(let F of T)queueMicrotask(()=>{throw F});throw C}}finally{i[Ji]=n,delete i.currentTarget,kt(y),mn(R)}}}function uw(i,n){return lw(i,n)}const ji=new Map;function lw(i,{target:n,anchor:r,props:a={},events:u,context:l,intro:c=!0,transformError:d}){qS();var p=void 0,m=YS(()=>{var y=r??n.appendChild(Pc());WS(y,{pending:()=>{}},T=>{LS({});var L=Nt;l&&(L.c=l),u&&(a.$$events=u),p=i(T,a)||{},NS()},d);var R=new Set,C=T=>{for(var L=0;L<T.length;L++){var D=T[L];if(!R.has(D)){R.add(D);var F=aw(D);for(const ce of[n,document]){var te=ji.get(ce);te===void 0&&(te=new Map,ji.set(ce,te));var ve=te.get(D);ve===void 0?(ce.addEventListener(D,Jl,{passive:F}),te.set(D,1)):te.set(D,ve+1)}}}};return C(hS(ow)),Xl.add(C),()=>{for(var T of R)for(const F of[n,document]){var L=ji.get(F),D=L.get(T);--D==0?(F.removeEventListener(T,Jl),L.delete(T),L.size===0&&ji.delete(F)):L.set(T,D)}Xl.delete(C),y!==r&&y.parentNode?.removeChild(y)}});return cw.set(p,m),p}let cw=new WeakMap;const fw="5";typeof window<"u"&&((window.__svelte??={}).v??=new Set).add(fw);xS();function hw(i){}const Ba={init:i=>{ee.get(Dn).enableRouting()},handlePageErrorHandler:(i,n,r)=>{i&&i.timeout&&setTimeout(()=>{if(i.viewUrl)n.viewUrl=i.viewUrl,r.getEngine()._ui.updateMainContent(n,r);else if(i.errorFn)i.errorFn(n);else{console.warn("Something went wrong with a client! You will be redirected to another page.");const a=i.redirectPath||"/";r.navigation().navigate(a)}},i.timeout)},handleExternalLinkNavigation:i=>{if(i.url)if(i.sameWindow||!1)window.location.href=i.url;else{const r=window.open(i.url,"_blank","noopener noreferrer");r&&(r.opener=null,r.focus())}},async addSearchParamsFromClient(i,n,r){const a=ee.get(vn),u=k.getCurrentPath(),l=await a.getCurrentNode(u.path),c={...i};if(l?.clientPermissions?.urlParameters){const d={};Object.keys(l.clientPermissions.urlParameters).forEach(p=>{p in c&&l.clientPermissions.urlParameters[p].write===!0&&(d[p]=c[p],delete c[p])});for(const p in c)console.warn(`No permission to add the search param "${p}" to the url`);Object.keys(d).length>0&&r.routing().addSearchParams(d,n)}}},Dt={luigi:{},init:i=>{console.log("Init communication..."),Dt.luigi=i},addListeners:(i,n)=>{i.addEventListener(N.INITIALIZED,r=>{Re.luigi?.ux().hideLoadingIndicator(i.parentNode)}),i.addEventListener(N.NAVIGATION_REQUEST,r=>{const{link:a,preserveView:u,modal:l,newTab:c,withoutSync:d,preventContextUpdate:p,preventHistoryEntry:m,fromVirtualTreeRoot:y,fromContext:R,fromClosestContext:C,fromParent:T}=r.detail,L={modalSettings:l,newTab:c,path:a,preserveView:u,preventContextUpdate:p,options:{fromVirtualTreeRoot:y,fromContext:R,fromClosestContext:C,fromParent:T},preventHistoryEntry:m,withoutSync:d};ee.get(vn).handleNavigationRequest(L,r.callbackFn)}),i.addEventListener(N.RUNTIME_ERROR_HANDLING_REQUEST,r=>{n.navigation().runTimeErrorHandler(r.payload?.data?.errorObj||{})}),i.addEventListener(N.ALERT_REQUEST,r=>{Re.processAlert(r.payload,!0,i)}),i.addEventListener(N.SHOW_CONFIRMATION_MODAL_REQUEST,r=>{Re.handleConfirmationModalRequest(r.payload,i)}),i.addEventListener(N.SET_DOCUMENT_TITLE_REQUEST,r=>{Dt.luigi.getEngine()._connector?.setDocumentTitle(r.detail.title)}),i.addEventListener(N.SHOW_LOADING_INDICATOR_REQUEST,r=>{Dt.luigi.getEngine()._connector?.showLoadingIndicator(i.parentNode)}),i.addEventListener(N.HIDE_LOADING_INDICATOR_REQUEST,r=>{Dt.luigi.getEngine()._connector?.hideLoadingIndicator(i.parentNode)}),i.addEventListener(N.ADD_BACKDROP_REQUEST,r=>{Dt.luigi.getEngine()._connector?.addBackdrop()}),i.addEventListener(N.REMOVE_BACKDROP_REQUEST,r=>{Dt.luigi.getEngine()._connector?.removeBackdrop()}),i.addEventListener(N.SET_DIRTY_STATUS_REQUEST,r=>{Re.handleDirtyStatusRequest(r.detail?.data?.dirty,r.detail?.source)}),i.addEventListener(N.ADD_NODE_PARAMS_REQUEST,r=>{n.routing().addNodeParams(r.payload.data,r.payload.keepBrowserHistory)}),i.addEventListener(N.OPEN_USER_SETTINGS_REQUEST,r=>{Dt.luigi.getEngine()._connector?.openUserSettings(r.detail)}),i.addEventListener(N.CLOSE_USER_SETTINGS_REQUEST,r=>{Dt.luigi.getEngine()._connector?.closeUserSettings()}),i.addEventListener(N.ADD_SEARCH_PARAMS_REQUEST,r=>{Ba.addSearchParamsFromClient(r.detail.data,r.detail.keepBrowserHistory,n)}),i.addEventListener(N.UPDATE_MODAL_SETTINGS_REQUEST,r=>{Ue.updateModalSettings(r.payload.updatedModalSettings,r.payload.addHistoryEntry,n)}),i.addEventListener(N.SET_CURRENT_LOCALE_REQUEST,r=>{n.i18n().setCurrentLocale(r.detail?.data?.data?.currentLocale,i)})}};class gw{constructor(){this._ui=Ue,this._comm=Dt,this._ux=Re,this._routing=Ba}bootstrap(n){this._app=uw(hw,{target:document.body}),this._connector=n}init(){const n=window.Luigi;ee.register(as,()=>new as),ee.register(vn,()=>new vn(n)),ee.register(_n,()=>new _n),ee.register(Dn,()=>new Dn(n)),ee.register(_r,()=>new _r),ee.register(pn,()=>new pn(n)),n.theming()._init(),Ue.init(n),Ba.init(n),Dt.init(n),Re.init(n)}}window.Luigi=new lS(new gw);
|
|
34
55
|
//# sourceMappingURL=luigi.js.map
|