UNPKG

@finos/legend-application-pure-ide-deployment

Version:
1 lines 670 kB
(()=>{var e,t,n,s,i,o={23243:(e,t,n)=>{"use strict";const s=JSON.parse('{"rE":"11.0.14","XO":{"Z":"@finos/legend-logger-plugin-web-console"}}');var i,o=n(20938);class r{name;version;signature;uuid}class a{name;version;uuid=(0,o.A)();constructor(e,t){this.name=e,this.version=t}getName(){return this.name}getVersion(){return this.version}getSignature(){return`${this.getName()}@${this.getVersion()}`}getUUID(){return this.uuid}getInfo(){const e=new r;return e.name=this.getName(),e.version=this.getVersion(),e.signature=this.getSignature(),e.uuid=this.getUUID(),e}configure(e){return this}}class c{plugins=[];presets=[];usePlugins(e){return this.plugins=e,this}usePresets(e){return this.presets=e,this}configure(e){Object.keys(e).forEach((t=>{const n=e[t];this.presets.forEach((e=>{e.getName()===t&&e.configure(n)})),this.plugins.forEach((e=>{e.getName()===t&&e.configure(n)}))}))}install(){this.plugins.forEach((e=>e.install(this))),this.presets.forEach((e=>e.install(this)))}getInfo(){return{plugins:this.plugins.filter((e=>!this.getHiddenPluginNames().includes(e.getName()))).map((e=>e.getInfo())).sort(((e,t)=>e.name.localeCompare(t.name))),presets:this.presets.filter((e=>!this.getHiddenPresetNames().includes(e.getName()))).map((e=>e.getInfo())).sort(((e,t)=>e.name.localeCompare(t.name)))}}getHiddenPluginNames(){return[]}getHiddenPresetNames(){return[]}}!function(e){e[e.DEBUG=1]="DEBUG",e[e.INFO=2]="INFO",e[e.WARN=3]="WARN",e[e.ERROR=4]="ERROR",e[e.SILENT=5]="SILENT"}(i||(i={}));class l{channel;name;timestamp=Date.now();static create(e){const t=new l;return t.name=e,t}}class d extends a{level=i.DEBUG;setLevel(e){this.level=e}install(e){e.registerLoggerPlugin(this)}debug(e,...t){this.level<=i.DEBUG&&this._debug(e,...t)}info(e,...t){this.level<=i.INFO&&this._info(e,...t)}warn(e,...t){this.level<=i.WARN&&this._warn(e,...t)}error(e,...t){this.level<=i.ERROR&&this._error(e,...t)}}class u{loggers=[];registerPlugins(e){this.loggers=e}debug(e,...t){this.loggers.forEach((n=>n.debug(e,...t)))}info(e,...t){this.loggers.forEach((n=>n.info(e,...t)))}warn(e,...t){this.loggers.forEach((n=>n.warn(e,...t)))}error(e,...t){this.loggers.forEach((n=>n.error(e,...t)))}}const{debug:p,info:h,warn:g,error:m}=console;class f extends d{constructor(){super(s.XO.Z,s.rE)}_debug(e,...t){p(`[${e.timestamp}] ${e.name} ${t.length?":":""}`,...t)}_info(e,...t){h(`[${e.timestamp}] ${e.name} ${t.length?":":""}`,...t)}_warn(e,...t){g(`[${e.timestamp}] ${e.name} ${t.length?":":""}`,...t)}_error(e,...t){m(`[${e.timestamp}] ${e.name} ${t.length?":":""}`,...t)}}var _=n(31085),E=n(25873),b=n(94417),T=n(84365);const C=e=>e.constructor,v=()=>()=>{},y=(e,t,n)=>D(e.at(t),n),S=e=>new Promise(((t,n)=>setTimeout((()=>{try{t(e())}catch(e){n(e)}}),0))),N=(e,t,n=(e,t)=>e===t)=>!e.find((e=>n(e,t)))&&(e.push(t),!0),A=(e,t,n,s=(e,t)=>e===t)=>{const i=e.findIndex((e=>s(e,t))),o=e.findIndex((e=>s(e,n)));return-1!==i&&-1!==o&&(e[i]=n,e[o]=t,!0)},I=(e,t,n=(e,t)=>e===t)=>{const s=e.findIndex((e=>n(e,t)));return-1!==s&&(e.splice(s,1),!0)};class x extends Error{uuid=(0,o.A)();constructor(e){super(),this.message=void 0===e||""===e?"(no error message)":e}get detail(){return this.message}}class w extends Error{constructor(e,t,n){if(super(n||(t instanceof Error?t.message:t)),this.name=e,t instanceof Error){const e=(this.message.match(/\n/g)??[]).length+1;this.stack=`${(this.stack??"").split("\n").slice(0,e+1).join("\n")}\nCaused by: ${t.stack}`}else"function"==typeof Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error(t).stack}}class k extends w{constructor(e){super("Illegal State Error [PLEASE NOTIFY DEVELOPER]",e)}}class O extends w{constructor(e,t){super("Unsupported Operation Error",e||t?`${e}${t?`\n${((e,t)=>{const n=(s={printFunctionName:!1,maxDepth:t?.deep?void 0:1},(0,b.A)(s,(e=>void 0!==e)));var s;return(0,T.GP)(e,n).replace(/.*\s\{/g,"{").replace(/\[.*\]/g,(e=>["[Array]","[Function]"].includes(e)?e:"[Object]"))})(t)}`:""}`:void 0)}}function R(e){if(!(e instanceof Error))throw new k("Expected error to be thrown")}const P=e=>{try{return e()}catch{return}};class F extends w{constructor(e,t){super("Assertion Error",e,t)}}const L=e=>null!=e;function M(e,t=""){if(null==e)throw new F(t||"Value is nullable")}const D=(e,t="")=>(M(e,t),e),B=(e,t)=>e instanceof t,j=e=>t=>B(t,e);function H(e,t,n=""){if(!(e instanceof t))throw new F(n||`Value is expected to be of type '${t.name}'`)}const G=(e,t,n="")=>(H(e,t,n),e);function U(e,t=""){if(""===D(e,t))throw new F(t||"Expected string value to be non-empty")}function V(e,t=""){return U(e,t),e}function $(e,t=""){if(!e)throw new F(t||"Expected predicate to be truthy")}const W=e=>"string"==typeof e,Y=e=>"number"==typeof e&&!isNaN(e),z=e=>"boolean"==typeof e,K=e=>"object"==typeof e&&null!==e;var X=n(66651),J=n(56046),q=n(6451),Z=n(8041);const Q=X.v,ee="charset=utf-8";var te,ne,se;!function(e){e.CONTENT_TYPE="Content-Type",e.ACCEPT="Accept"}(te||(te={})),function(e){e.APPLICATION_JSON="application/json",e.APPLICATION_XML="application/xml",e.APPLICATION_ZLIB="application/zlib",e.APPLICATION_XLSX="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",e.TEXT_PLAIN="text/plain",e.TEXT_HTML="text/html",e.TEXT_CSV="text/csv",e.ALL="*/*",e.MESSAGE_RFC822="message/rfc822"}(ne||(ne={})),function(e){e.GET="GET",e.PUT="PUT",e.POST="POST",e.DELETE="DELETE"}(se||(se={}));const ie={mode:"cors",credentials:"include",redirect:"follow"},oe=(e,t)=>{const n={};return e&&Object.entries(e).forEach((([e,t])=>{n[e]=t})),t&&Object.entries(t).forEach((([e,t])=>{n[e]=t})),n};class re extends Error{response;payload;constructor(e,t){super(),"function"==typeof Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.name="Network Client Error",this.response=e;const{status:n,statusText:s,url:i}=e,o=`Received response with status ${n} (${s}) for ${i}`;this.message=(t?(e=>{if(K(e))return W(e.message)?e.message:JSON.stringify(e);let t;try{t=JSON.parse(e)}catch{}return t&&W(t.message)?t.message:e})(t).substring(0,5e3):"")||o,this.payload=t}}const ae=async(e,t,n)=>{if(n?.preprocess?.(e),!e.ok){let t;try{t=await e.text(),t=JSON.parse(t)}catch{}return Promise.reject(new re(e,t))}if(n?.skipProcessing)return Promise.resolve(e);if(e.status===Q.NO_CONTENT)return Promise.resolve(void 0);const s=t.headers.Accept;switch(s){case ne.APPLICATION_JSON:return e.json();case ne.TEXT_PLAIN:return e.text();default:return Promise.reject(new re(e,`Can't process response for request with Content-Type '${s}'`))}},ce=(e,t)=>{const n={};return n.Accept=ne.APPLICATION_JSON,e!==se.GET&&(n[te.CONTENT_TYPE]=`${ne.APPLICATION_JSON};${ee}`),oe(n,t)};class le{options={};baseUrl;constructor(e){this.baseUrl=e?.baseUrl,this.options={...ie,...e?.options??{}}}async get(e,t={},n,s,i,o){return this.request(se.GET,e,void 0,t,n,s,i,o)}async put(e,t={},n={},s,i,o,r){return this.request(se.PUT,e,t,n,s,i,o,r)}async post(e,t={},n={},s,i,o,r){return this.request(se.POST,e,t,n,s,i,o,r)}async delete(e,t={},n={},s,i,o,r){return this.request(se.DELETE,e,t,n,s,i,o,r)}async request(e,t,n,s,i,o,r,a){const c=((e,t,n)=>{if(!e&&!P((()=>new URL(t))))throw new Error(`Can't build URL string: base URL is not specified and the provided URL '${t}' is not absolute`);const s=new URL(t,e);return n instanceof Object&&Object.entries(n).forEach((([e,t])=>{void 0!==t&&(Array.isArray(t)?t.filter(L).forEach((t=>s.searchParams.append(e,t.toString()))):s.searchParams.append(e,t.toString()))})),s.toString()})(this.baseUrl,t,o??{});let l;if((W(n)||K(n))&&r?.enableCompression&&($(e!==se.GET," GET request should not have any request payload"),n=(e=>new Blob([(0,J.Kc)(K(e)?JSON.stringify(e):e)]))(n),i=oe(i,{[te.CONTENT_TYPE]:`${ne.APPLICATION_ZLIB};${ee}`})),void 0!==n)if(W(n)||n instanceof Blob)l=n;else{if(!K(n))throw new F("Request body can only be either a 'string' or an 'object'");l=JSON.stringify(n)}const d={...this.options,...s,method:e,body:l,headers:ce(e,i)};return fetch(c,d).then((e=>0===e.status||e.status===Q.UNAUTHORIZED?a?.autoReAuthenticateUrl?(e=>new Promise((t=>{const n="AUTO_AUTHENTICATION_IFRAME",s=document.getElementById(n);s?.remove();const i=document.createElement("iframe");i.id=n,i.src=e,i.style.display="none",i.addEventListener("load",(()=>{i.remove(),t()})),document.body.appendChild(i)})))(a.autoReAuthenticateUrl).then((()=>fetch(c,d))).then((e=>ae(e,d,a))):fetch(c,d).then((e=>ae(e,d,a))):ae(e,d,a))).catch((e=>(e=>e instanceof TypeError&&"Failed to fetch"===e.message)(e)?fetch(c,d).then((e=>ae(e,d,a))):Promise.reject(e)))}}const de=(e,t,n)=>{const s=new Blob([t],{type:n}),i=URL.createObjectURL(s),o=document.createElement("a");"string"==typeof o.download?(document.body.appendChild(o),o.download=e,o.href=i,o.click(),document.body.removeChild(o)):location.replace(i)};var ue;!function(e){e.GENERIC_FAILURE="application.failure.generic",e.APPLICATION_SETUP__FAILURE="application.setup.failure",e.APPLICATION_LOAD__SUCCESS="application.load.success",e.APPLICATION_LOAD__FAILURE="application.load.failure",e.ILLEGAL_APPLICATION_STATE_OCCURRED="application.error.illegal-state",e.APPLICATION_CONFIGURATION__FAILURE="application.configuration.failure",e.IDENTITY_AUTO_FETCH__FAILURE="application.identity.auto-fetch.failure",e.DOCUMENTATION_FETCH__FAILURE="application.documentation.fetch.failure",e.DOCUMENTATION_LOAD__SKIP="application.documentation.load.skip",e.DOCUMENTATION_REQUIREMENT_CHECK__FAILURE="application.documentation.requirement-check.failure",e.CONTEXTUAL_DOCUMENTATION_LOAD__SKIP="application.virtual-assistant.contextual-documentation-load.skip",e.VIRTUAL_ASSISTANT_DOCUMENTATION_ENTRY__ACCESS="application.virtual-assistant.documentation-entry.access",e.TERMINAL_COMMAND_CONFIGURATION_CHECK__FAILURE="application.load.terminal-command.configuration-check.failure",e.COLOR_THEME_CONFIGURATION_CHECK__FAILURE="application.layout.color-theme.configuration-check.failure",e.SETTING_CONFIGURATION_CHECK__FAILURE="application.setting.configuration-check.failure",e.SETTING_RETRIVE_FAILURE="application.setting.retrieve.failure",e.USER_DATA_RETRIEVE_FAILURE="application.user-data.retrieve.failure",e.COMMAND_CENTER_REGISTRATION__FAILURE="application.command.registration.failure",e.APPLICATION_CONTEXT__ACCESS="application.context.access",e.APPLICATION_USAGE__INTERRUPT="application.usage.interrupt",e.NAVIGATION_BLOCKED="application.usage.navigation-blocked",e.APPLICATION_TELEMETRY_EVENT__FAILURE="application.telemetry-event.failure",e.DEBUG="development.debug"}(ue||(ue={}));var pe=n(97542);class he{schema;deserializeNullAsUndefined;constructor(e,t){this.schema=e,this.deserializeNullAsUndefined=Boolean(t?.deserializeNullAsUndefined)}toJson(e){return(0,pe.lK)(this.schema,e)}fromJson(e){return(0,pe.iu)(this.schema,this.deserializeNullAsUndefined?(t=e,(0,b.A)(t,(e=>null!==e))):e);var t}}class ge{key;markdownText;title;text;url;related;static serialization=new he((0,pe.PL)(ge,{markdownText:(0,pe.Ie)((e=>e),(e=>e.value?e:void 0)),related:(0,pe.lq)((0,pe.p_)((0,pe.MY)())),title:(0,pe.lq)((0,pe.MY)()),text:(0,pe.lq)((0,pe.MY)()),url:(0,pe.lq)((0,pe.MY)())}));static create(e,t){const n=ge.serialization.fromJson(e);return n.key=t,n}}var me=n(66696);const fe=e=>Object.entries(e).map((e=>({key:e[0],content:ge.create(e[1],e[0])})));class _e{url;links;docRegistry=new Map;contextualDocIndex=new Map;constructor(e){this.url=e.config.documentationUrl,this.links=e.config.documentationLinkEntries,e.pluginManager.getApplicationPlugins().flatMap((e=>e.getExtraKeyedDocumentationEntries?.()??[])).forEach((t=>{this.hasDocEntry(t.key)?e.logService.warn(l.create(ue.DOCUMENTATION_LOAD__SKIP),t.key):this.docRegistry.set(t.key,t.content)})),e.config.keyedDocumentationEntries.forEach((e=>this.docRegistry.set(e.key,e.content)));const t=e.pluginManager.getApplicationPlugins().flatMap((e=>e.getExtraContextualDocumentationEntries?.()??[])),n=[];(0,me.A)(e.pluginManager.getApplicationPlugins().flatMap((e=>e.getExtraRequiredDocumentationKeys?.()??[])).concat(t.map((e=>e.documentationKey)))).forEach((e=>{this.docRegistry.has(e)||n.push(e)})),n.length&&e.logService.warn(l.create(ue.DOCUMENTATION_REQUIREMENT_CHECK__FAILURE),`Can't find corresponding documentation entry for keys:\n${n.map((e=>`- ${e}`)).join("\n")}`),t.forEach((t=>{if(this.hasContextualDocEntry(t.context))e.logService.warn(l.create(ue.CONTEXTUAL_DOCUMENTATION_LOAD__SKIP),t.context);else{const e=this.getDocEntry(t.documentationKey);e&&this.contextualDocIndex.set(t.context,e)}})),e.config.contextualDocEntries.forEach((e=>{const t=this.getDocEntry(e.documentationKey);t&&this.contextualDocIndex.set(e.context,t)}))}getDocEntry(e){return this.docRegistry.get(e)}hasDocEntry(e){return this.docRegistry.has(e)}getContextualDocEntry(e){return this.contextualDocIndex.get(e)}hasContextualDocEntry(e){return this.contextualDocIndex.has(e)}getAllDocEntries(){return Array.from(this.docRegistry.values())}publishDocRegistry(){const e={};return this.docRegistry.forEach(((t,n)=>{e[n]=ge.serialization.toJson(t)})),e}publishContextualDocIndex(){const e={};return this.contextualDocIndex.forEach(((t,n)=>{e[n]=t.key})),e}}var Ee,be,Te=n(83794);!function(e){e.INITIAL="INITIAL",e.IN_PROGRESS="IN_PROGRESS",e.SUCCEEDED="SUCEEDED",e.FAILED="FAILED"}(Ee||(Ee={}));class Ce{state;_message;_messageFormatter;constructor(){this.state=Ee.INITIAL}setMessage(e){this._message=e}setMessageFormatter(e){this._messageFormatter=e}reset(){return this.state=Ee.INITIAL,this}inProgress(){return this.state=Ee.IN_PROGRESS,this}fail(){return this.state=Ee.FAILED,this}pass(){return this.state=Ee.SUCCEEDED,this}complete(e=!0){return e?this.pass():this.fail(),this}sync(e){const t=e.exportData();this.state=t.state,this._message=t.message}exportData(){return{state:this.state,message:this._message}}get isInInitialState(){return this.state===Ee.INITIAL}get isInProgress(){return this.state===Ee.IN_PROGRESS}get hasFailed(){return this.state===Ee.FAILED}get hasSucceeded(){return this.state===Ee.SUCCEEDED}get message(){return this._message?this._messageFormatter?this._messageFormatter(this._message):this._message:void 0}get hasCompleted(){return this.hasFailed||this.hasSucceeded}static create(){return(0,Te.Gn)(new Ce,{state:Te.sH,_message:Te.sH,reset:Te.XI,inProgress:Te.XI,pass:Te.XI,fail:Te.XI,complete:Te.XI,setMessage:Te.XI,sync:Te.XI,isInInitialState:Te.EW,isInProgress:Te.EW,hasFailed:Te.EW,hasSucceeded:Te.EW,hasCompleted:Te.EW,message:Te.EW})}}!function(e){e.USER="user",e.ENV="env",e.RESULT="result",e.ERROR="error",e.HTTP_STATUS="status",e.HTTP_REQUEST_METHOD="method",e.HTTP_REQUEST_URL="url"}(be||(be={}));class ve{traceEntries=[];setup(e){this.traceEntries=e}bootstrap(e){this.traceEntries.forEach((t=>{t.plugin.bootstrap(t.clientSpan,e)}))}reportSuccess(){this.traceEntries.forEach((e=>{e.plugin.concludeClientSpan(e.clientSpan,void 0)}))}reportError(e){this.traceEntries.forEach((t=>{t.plugin.concludeClientSpan(t.clientSpan,e)}))}}class ye{plugins=[];registerPlugins(e){this.plugins=e}createTrace(e,t,n,s){const i=new ve;return e&&i.setup(this.plugins.map((i=>({clientSpan:i.createClientSpan(e,t,n,s),plugin:i})))),i}}const Se=n(37102).A;var Ne,Ae;!function(e){e.STANDARD="standard",e.INCLUDE="include match",e.EXACT="exact match",e.INVERSE="excludes exact match"}(Ne||(Ne={}));class Ie{currentMode=Ne.STANDARD;onSearchModeChange;constructor(e){(0,Te.Gn)(this,{currentMode:Te.sH,isAdvancedSearchActive:Te.EW,setCurrentMode:Te.XI}),this.onSearchModeChange=e}get isAdvancedSearchActive(){return this.currentMode!==Ne.STANDARD}generateSearchText(e){switch(this.currentMode){case Ne.INCLUDE:return`'"${e}"`;case Ne.EXACT:return`="${e}"`;case Ne.INVERSE:return`!"${e}"`;default:return e}}setCurrentMode(e){this.currentMode=e,this.onSearchModeChange()}}!function(e){e.SEARCH="SEARCH",e.CONTEXTUAL_SUPPORT="CONTEXTUAL_SUPPORT"}(Ae||(Ae={}));class xe{uuid=(0,o.A)();documentationKey;title;content;url;isOpen=!1;constructor(e){(0,Te.Gn)(this,{isOpen:Te.sH,setIsOpen:Te.XI}),this.documentationKey=e.key,this.title=V(e.title),this.content=e.markdownText??e.text,this.url=e.url}setIsOpen(e){this.isOpen=e}}class we{uuid=(0,o.A)();context;title;content;url;related;constructor(e,t,n){this.context=e,this.title=t.title,this.content=t.markdownText??t.text,this.url=t.url,this.related=n}}const ke=e=>Boolean(e.title&&(e.url??e.text??e.markdownText));class Oe{applicationStore;panelRenderingKey=(0,o.A)();isDisabled=!1;isHidden=!0;isOpen=!1;isPanelMaximized=!1;selectedTab=Ae.SEARCH;currentDocumentationEntry;searchEngine;searchConfigurationState;searchState=Ce.create();searchText="";searchResults=[];showSearchConfigurationMenu=!1;isOverSearchLimit=!1;constructor(e){(0,Te.Gn)(this,{isDisabled:Te.sH,isHidden:Te.sH,isOpen:Te.sH,isPanelMaximized:Te.sH,panelRenderingKey:Te.sH,isOverSearchLimit:Te.sH,selectedTab:Te.sH,searchText:Te.sH,searchResults:Te.sH,currentDocumentationEntry:Te.sH,showSearchConfigurationMenu:Te.sH,currentContextualDocumentationEntry:Te.EW,setIsDisabled:Te.XI,setIsHidden:Te.XI,setIsOpen:Te.XI,setIsPanelMaximized:Te.XI,setSelectedTab:Te.XI,setSearchText:Te.XI,resetSearch:Te.XI,search:Te.XI,openDocumentationEntry:Te.XI,refreshPanelRendering:Te.XI,setShowSearchConfigurationMenu:Te.XI}),this.applicationStore=e,this.searchEngine=new Se(this.applicationStore.documentationService.getAllDocEntries().filter(ke),{includeScore:!0,shouldSort:!0,ignoreLocation:!0,threshold:.2,keys:[{name:"title",weight:4},{name:"text",weight:1},{name:"markdownText.value",weight:1}],useExtendedSearch:!0}),this.searchConfigurationState=new Ie((()=>{this.search()}))}get currentContextualDocumentationEntry(){if(!this.applicationStore.navigationContextService.currentContext)return;const e=this.applicationStore.navigationContextService.currentContext.key,t=this.applicationStore.documentationService.getContextualDocEntry(e);return t?new we(e,t,(t.related??[]).map((e=>this.applicationStore.documentationService.getDocEntry(e))).filter(L).filter(ke).map((e=>new xe(e)))):void 0}openDocumentationEntry(e){const t=this.applicationStore.documentationService.getDocEntry(e);t&&(this.setIsOpen(!0),this.setIsHidden(!1),this.currentDocumentationEntry=new xe(t),this.currentDocumentationEntry.setIsOpen(!0),this.resetSearch())}openDocumentationEntryLink(e){const t=this.applicationStore.documentationService.getDocEntry(e);t&&((e=>ke(e)&&Boolean(e.text??e.markdownText))(t)?this.openDocumentationEntry(t.key):t.url&&this.applicationStore.navigationService.navigator.visitAddress(t.url))}setIsDisabled(e){this.isDisabled=e}setIsHidden(e){this.isHidden=e}setIsPanelMaximized(e){this.isPanelMaximized=e}hideAssistant(){this.setIsHidden(!0),this.setIsOpen(!1)}toggleAssistant(){this.isHidden?this.setIsHidden(!1):this.hideAssistant()}setIsOpen(e){this.isOpen=e}setSelectedTab(e){this.selectedTab=e}refreshPanelRendering(){this.panelRenderingKey=(0,o.A)()}setSearchText(e){this.searchText=e}resetSearch(){this.searchText="",this.searchResults=[],this.searchState.complete()}search(){this.searchText?(this.currentDocumentationEntry=void 0,this.searchState.inProgress(),this.searchResults=Array.from(this.searchEngine.search(this.searchConfigurationState.generateSearchText(this.searchText),{limit:101}).values()).map((e=>new xe(e.item))),this.searchResults.length>100?(this.isOverSearchLimit=!0,this.searchResults=this.searchResults.slice(0,100)):this.isOverSearchLimit=!1,this.searchState.complete()):this.searchResults=[]}setShowSearchConfigurationMenu(e){this.showSearchConfigurationMenu=e}}class Re{notifierPlugins=[];registerEventNotifierPlugins(e){this.notifierPlugins=e}notify(e,t){this.notifierPlugins.forEach((n=>n.notify(e,t)))}}class Pe{static logEvent_ApplicationInitializationSucceeded(e,t){e.logEvent(ue.APPLICATION_LOAD__SUCCESS,{application:{name:t.config.appName,version:t.config.appVersion,env:t.config.env},browser:{userAgent:navigator.userAgent},screen:{height:window.screen.height,width:window.screen.width}})}static logEvent_ApplicationContextAccessed(e,t){e.logEvent(ue.APPLICATION_CONTEXT__ACCESS,t)}static logEvent_VirtualAssistantDocumentationEntryAccessed(e,t){e.logEvent(ue.VIRTUAL_ASSISTANT_DOCUMENTATION_ENTRY__ACCESS,t)}static logEvent_ApplicationUsageInterrupted(e){e.logEvent(ue.APPLICATION_USAGE__INTERRUPT,{})}}class Fe{applicationStore;contextStack=[];constructor(e){(0,Te.Gn)(this,{contextStack:Te.sH,currentContext:Te.EW,push:Te.XI,pop:Te.XI}),this.applicationStore=e}get currentContext(){return this.contextStack.length?this.contextStack[this.contextStack.length-1]:void 0}push(e){const t=this.contextStack.filter((e=>!e.isTransient));if(t.find((t=>t.key===e.key)))throw new k(`Found multiple context '${e.key}' in application navigation context stack`);t.push(e),this.applicationStore.pluginManager.getApplicationPlugins().flatMap((e=>e.getExtraAccessEventLoggingApplicationContextKeys?.()??[])).includes(e.key)&&Pe.logEvent_ApplicationContextAccessed(this.applicationStore.telemetryService,{key:e.key}),this.contextStack=t}pop(e){const t=this.contextStack.find((t=>t.key===e.key));if(!t)return;const n=this.contextStack.indexOf(t);-1!==n&&(this.contextStack=this.contextStack.slice(0,n).filter((e=>!e.isTransient)))}}class Le{applicationStore;commandRegistry=new Map;constructor(e){(0,Te.Gn)(this,{commandRegistry:Te.sH,registerCommand:Te.XI,deregisterCommand:Te.XI}),this.applicationStore=e}registerCommand(e){const t=e.key;this.commandRegistry.has(t)?this.applicationStore.logService.warn(l.create(ue.COMMAND_CENTER_REGISTRATION__FAILURE),`Can't register command: command '${t}' is already registered`):this.commandRegistry.set(t,e)}deregisterCommand(e){this.commandRegistry.delete(e)}runCommand(e,t){const n=this.commandRegistry.get(e);return!(!n||n.trigger&&!n.trigger()||(n.action?.(t),0))}}class Me{applicationStore;keyMap=new Map;commandKeyMap=new Map;isHotkeysBlocked=!1;constructor(e){(0,Te.Gn)(this,{keyMap:Te.sH,commandKeyMap:Te.sH,isHotkeysBlocked:Te.sH,addHotkey:Te.XI,blockGlobalHotkeys:Te.XI,unblockGlobalHotkeys:Te.XI}),this.applicationStore=e,this.applicationStore.pluginManager.getApplicationPlugins().flatMap((e=>e.getExtraKeyedCommandConfigEntries?.()??[])).forEach((e=>{const t=[e.content.defaultKeyboardShortcut,...e.content.additionalKeyboardShortcuts??[]].filter(L);t.length?t.forEach((t=>this.addHotkey(e.key,t))):this.commandKeyMap.has(e.key)||this.commandKeyMap.set(e.key,[])}))}blockGlobalHotkeys(){this.isHotkeysBlocked=!0}unblockGlobalHotkeys(){this.isHotkeysBlocked=!1}addHotkey(e,t){this.commandKeyMap.set(e,[...this.commandKeyMap.get(e)??[],t]),this.keyMap.set(t,[...(this.keyMap.get(t)??[]).filter((t=>t!==e)),e])}dispatch(e){if(this.isHotkeysBlocked)return;const t=this.keyMap.get(e)??[];for(const e of t)if(this.applicationStore.commandService.runCommand(e))return}}var De=n(84594),Be=n(34462),je=n(720),He=n(75974),Ge=n(90382);const Ue="Roboto Mono",Ve="yyyy-MM-dd'T'HH:mm:ss";var $e;!function(e){e.RESET="",e.BOLD="",e.DIM="",e.ITALIC="",e.UNDERLINE="",e.BLINKING="",e.STRIKETHROUGH="",e.BLACK="",e.RED="",e.GREEN="",e.YELLOW="",e.BLUE="",e.MAGENTA="",e.CYAN="",e.WHITE="",e.BRIGHT_BLACK="",e.BRIGHT_RED="",e.BRIGHT_GREEN="",e.BRIGHT_YELLOW="",e.BRIGHT_BLUE="",e.BRIGHT_MAGENTA="",e.BRIGHT_CYAN="",e.BRIGHT_WHITE="",e.DIMMED_BLACK="",e.DIMMED_RED="",e.DIMMED_GREEN="",e.DIMMED_YELLOW="",e.DIMMED_BLUE="",e.DIMMED_MAGENTA="",e.DIMMED_CYAN="",e.DIMMED_WHITE="",e.BLACK_BG="",e.RED_BG="",e.GREEN_BG="",e.YELLOW_BG="",e.BLUE_BG="",e.MAGENTA_BG="",e.CYAN_BG="",e.WHITE_BG="",e.BRIGHT_BLACK_BG="",e.BRIGHT_RED_BG="",e.BRIGHT_GREEN_BG="",e.BRIGHT_YELLOW_BG="",e.BRIGHT_BLUE_BG="",e.BRIGHT_MAGENTA_BG="",e.BRIGHT_CYAN_BG="",e.BRIGHT_WHITE_BG="",e.DIMMED_BLACK_BG="",e.DIMMED_RED_BG="",e.DIMMED_GREEN_BG="",e.DIMMED_YELLOW_BG="",e.DIMMED_BLUE_BG="",e.DIMMED_MAGENTA_BG="",e.DIMMED_CYAN_BG="",e.DIMMED_WHITE_BG=""}($e||($e={}));const We=(e,t)=>`[${e};${t}H`;class Ye{searchInput;searchText="";useRegex=!1;matchWholeWord=!1;matchCaseSensitive=!1;resultCount;currentResultIndex;constructor(){(0,Te.Gn)(this,{searchText:Te.sH,useRegex:Te.sH,matchWholeWord:Te.sH,matchCaseSensitive:Te.sH,resultCount:Te.sH,currentResultIndex:Te.sH})}setSearchInput(e){this.searchInput=e}focus(){this.searchInput?.focus()}}class ze{applicationStore;searchConfig=new Ye;constructor(e){(0,Te.Gn)(this,{setSearchText:Te.XI,setSearchRegex:Te.XI,setSearchWholeWord:Te.XI,setSearchCaseSensitive:Te.XI,setSearchResultCount:Te.XI,setSearchCurrentResultIndex:Te.XI}),this.applicationStore=e}setSearchText(e){this.searchConfig.searchText=e}setSearchRegex(e){this.searchConfig.useRegex=e}setSearchWholeWord(e){this.searchConfig.matchWholeWord=e}setSearchCaseSensitive(e){this.searchConfig.matchCaseSensitive=e}setSearchResultCount(e){this.searchConfig.resultCount=e}setSearchCurrentResultIndex(e){this.searchConfig.currentResultIndex=e}}class Ke extends ze{preserveLog=!1;commandRegistry=new Map;constructor(e){super(e),(0,Te.Gn)(this,{preserveLog:Te.sH,setPreserveLog:Te.XI})}setPreserveLog(e){this.preserveLog=e}showHelp(){}showCommonANSIEscapeSequences(){}}var Xe=n(29481),Je=n(24404);n(41880);const qe=e=>e.length>=1?`${e[0].toUpperCase()}${e.substring(1,e.length)}`:e,Ze=["a","an","the","but","by","nor","and","or","so","as","yet","for","in","nor","of","on","at","out","to","up"],Qe=e=>(e??"").trim().replace(/\b(?:\w+)\b/gu,(e=>Ze.includes(e.toLowerCase())?e.toLowerCase():qe(e))).replace(/^(?:\w+)\b/u,(e=>qe(e))).replace(/\b(?:\w+)$/u,(e=>qe(e))),et=e=>{try{return((e,t=2)=>{try{return((e,t,n)=>{const s=(0,Je.As)(e,void 0,n);return M(s,"Can't stringify lossless JSON value"),s})((0,Je.qg)(e),0,t)}catch{return e}})(e,0)}catch{return e.replace(/\n\s*/g,"")}};var tt;function nt(e){return e.trim().split(" ").map((e=>{const t=e.split(/\b\+/),n=D(t.pop(),"Can't parse key binding: last part must be a non-modifier key");return{modifiers:t,key:n}}))}!function(e){e.TAB="Tab",e.CAPSLOCK="CapsLock",e.SHIFT="Shift",e.META="Meta",e.ALT="Alt",e.CONTROL="Control",e.SPACE="Space",e.ESC="Escape",e.LEFT="ArrowLeft",e.RIGHT="ArrowRight",e.UP="ArrowUp",e.DOWN="ArrowDown",e.ENTER="Enter",e.DELETE="Delete",e.BACKSPACE="Backspace",e.BACKQUOTE="Backquote"}(tt||(tt={}));const st=(e,t)=>t.key===e.code&&t.modifiers.every((t=>e.getModifierState(t)))&&![tt.SHIFT,tt.META,tt.ALT,tt.CONTROL].find((n=>t.key!==n&&e.getModifierState(n)&&!t.modifiers.includes(n))),it=(e,t)=>st(e,D(nt(t)[0]));function ot(e){const t=new Map;let n=null;return s=>{s instanceof KeyboardEvent&&((0,Xe.A)(Object.values(e).flatMap((e=>e.combinations.map((t=>({combination:t,handler:e.handler}))))).filter((e=>e.combination.length)),(e=>e.combination)).forEach((e=>{const n=e.combination,i=nt(e.combination);if(!i.length)return;const o=t.get(n)??i,r=D(o[0]);st(s,r)?o.length>1?t.set(n,o.slice(1)):(t.delete(n),e.handler(n,s)):s.getModifierState(s.key)||t.delete(n)})),n&&clearTimeout(n),n=setTimeout(t.clear.bind(t),1e3))}}var rt=n(48187),at=n(12285),ct=n(75735),lt=n(71083),dt=n(22351);const ut=e=>(0,rt.A)({...e?{}:{transitions:{create:()=>"none"}},components:{MuiButtonBase:{defaultProps:{disableRipple:!0}}},breakpoints:{values:{xs:0,sm:600,md:900,lg:1200,xl:1536,xxl:1800,xxxl:2300,xxxxl:2800}}}),pt=e=>{const{children:t,enableTransitions:n}=e;return(0,_.jsx)(at.A,{injectFirst:!0,children:(0,_.jsx)(ct.A,{theme:ut(n),children:(0,_.jsx)(lt.$,{dateAdapter:dt.h,children:t})})})};var ht=n(49676),gt=n(23432),mt=n(25150),ft=n(63737),_t=n(50692),Et=n(33416),bt=n(54357);const Tt=(e,t)=>{const n=e=>{const{children:n,className:s}=e;return(0,_.jsx)("div",{className:(0,bt.$)(t,s),"data-testid":e["data-testid"],children:n})};return n.displayName=e,n},Ct=e=>{const{children:t,darkMode:n,className:s}=e;return(0,_.jsx)("div",{className:(0,bt.$)("modal",{"modal--dark":n},s),children:t})},vt=e=>{const{title:t,icon:n,className:s}=e;return(0,_.jsxs)("div",{className:(0,bt.$)("modal__title",s),children:[n&&(0,_.jsx)("div",{className:"modal__title__icon",children:n}),(0,_.jsx)("div",{className:"modal__title__label",children:Qe(t)})]})},yt=e=>{const{title:t,children:n,className:s}=e;return!n&&t?(0,_.jsx)("div",{className:(0,bt.$)("modal__header",s),children:(0,_.jsx)(vt,{title:t})}):(0,_.jsx)("div",{className:(0,bt.$)("modal__header",s),children:n})},St=(Tt("ModalHeaderActions","modal__header__actions"),Tt("ModalBody","modal__body")),Nt=Tt("ModalFooter","modal__footer");var At,It;Tt("ModalFooterStatus","modal__footer__status"),function(e){e.STANDARD="STANDARD",e.CAUTION="CAUTION",e.ERROR="ERROR"}(At||(At={})),function(e){e.STANDARD="STANDARD",e.PROCEED_WITH_CAUTION="PROCEED_WITH_CAUTION",e.PROCEED="PROCEED"}(It||(It={}));class xt{applicationStore;blockingAlertInfo;actionAlertInfo;constructor(e){(0,Te.Gn)(this,{blockingAlertInfo:Te.sH,actionAlertInfo:Te.sH,setBlockingAlert:Te.XI,setActionAlertInfo:Te.XI}),this.applicationStore=e}setBlockingAlert(e){e?this.applicationStore.keyboardShortcutsService.blockGlobalHotkeys():this.applicationStore.keyboardShortcutsService.unblockGlobalHotkeys(),this.blockingAlertInfo=e}setActionAlertInfo(e){this.actionAlertInfo&&e&&this.applicationStore.notificationService.notifyIllegalState("Action alert is stacked: new alert is invoked while another one is being displayed"),e?this.applicationStore.keyboardShortcutsService.blockGlobalHotkeys():this.applicationStore.keyboardShortcutsService.unblockGlobalHotkeys(),this.actionAlertInfo=e}}var wt=n(14041);const kt=(0,wt.createContext)(void 0),Ot=()=>D((0,wt.useContext)(kt),"Can't find application store in context"),Rt=e=>{const{children:t,store:n}=e,s=(0,mt.iz)((()=>n));return(0,_.jsx)(kt.Provider,{value:s,children:t})},Pt=e=>{switch(e){case It.PROCEED_WITH_CAUTION:return"btn--caution";case It.PROCEED:case It.STANDARD:default:return"btn--dark"}},Ft=(0,mt.PA)((e=>{const{info:t}=e,n=Ot(),{title:s,message:i,prompt:o,type:r,onClose:a,onEnter:c,actions:l}=t,d=()=>{a?.(),n.alertService.setActionAlertInfo(void 0)};return(0,_.jsx)(Et.A,{open:Boolean(n.alertService.actionAlertInfo),onClose:v,TransitionProps:{onEnter:()=>c?.()},children:(0,_.jsxs)("form",{onSubmit:e=>{e.preventDefault(),l.find((e=>e.default))?.handler?.(),d()},className:`modal search-modal modal--dark blocking-alert blocking-alert--${(r??At.STANDARD).toLowerCase()}`,children:[s&&(0,_.jsx)(yt,{title:s}),(0,_.jsxs)(St,{children:[(0,_.jsx)("div",{className:"blocking-alert__summary-text",children:i}),(0,_.jsx)("div",{className:"blocking-alert__prompt-text",children:o})]}),(0,_.jsxs)(Nt,{children:[l.map(((e,t)=>(0,_.jsx)("button",{type:e.default?"submit":"button",className:`btn btn--dark ${Pt(e.type??It.STANDARD)}`,onClick:t=>{t.preventDefault(),e.handler?.(),d()},autoFocus:Boolean(e.default),children:e.label},t))),!l.length&&(0,_.jsx)("button",{type:"button",className:"btn btn--dark blocking-alert__action--standard",onClick:d,children:"Cancel"})]})]})})})),Lt=(0,mt.PA)((()=>{const e=Ot().alertService.actionAlertInfo;return e?(0,_.jsx)(Ft,{info:e}):null})),Mt=e=>{const{isLoading:t,className:n}=e,s=(0,wt.useRef)(null);return(0,wt.useEffect)((()=>{s.current&&(t?s.current.parentElement?.classList.add("panel-loading-indicator__container"):s.current.parentElement?.classList.remove("panel-loading-indicator__container"))}),[t]),(0,_.jsx)("div",{ref:s,className:(0,bt.$)(n,"panel-loading-indicator"+(t?"":"--disabled"))})},Dt=(0,mt.PA)((()=>{const e=Ot(),t=e.alertService.blockingAlertInfo;return t?(0,_.jsx)(Et.A,{open:Boolean(t),onClose:v,classes:{root:"blocking-alert__root-container",container:"blocking-alert__container"},children:(0,_.jsxs)(Ct,{darkMode:!e.layoutService.TEMPORARY__isLightColorThemeEnabled,className:"blocking-alert",children:[(0,_.jsx)(Mt,{isLoading:Boolean(t.showLoading)}),(0,_.jsxs)(St,{children:[(0,_.jsx)("div",{className:"blocking-alert__message",children:t.message}),t.prompt&&(0,_.jsx)("div",{className:"blocking-alert__message__prompt",children:t.prompt})]})]})}):null}));var Bt=n(49787),jt=n(25314),Ht=n(94269),Gt=n(59896),Ut=n(12812),Vt=n(86750),$t=n(87997),Wt=n(56819),Yt=n(55250),zt=n(63318);const Kt=Bt.nvT,Xt=jt.joZ,Jt=jt.OAW,qt=jt.RCA,Zt=jt.nDj,Qt=Ht.LkA,en=Ht.EiC,tn=Ht.RQJ,nn=Ht.MYw,sn=Ht.ZCl,on=Ht.suX,rn=Ht.Xv9,an=Ht.xoW,cn=Ht.z6b,ln=Ht.kkD,dn=Gt.QRP,un=Gt.WnZ,pn=Gt.q$s,hn=Gt.UHp,gn=Gt.$15,mn=Gt.qt6,fn=Gt.UJh,_n=Gt.HLi,En=Gt.JpF,bn=Gt.r$n,Tn=Ut.GaR,Cn=Vt.OKX,vn=Vt.hO$,yn=Vt.JhU,Sn=Vt.QCr,Nn=Vt._Hm,An=Vt.OiG,In=Vt.Pcn,xn=Vt.z44,wn=Vt.$qz,kn=Vt.Hcz,On=Vt.Kni,Rn=Vt.gZZ,Pn=Vt.__w,Fn=Vt.Wsx,Ln=Vt.A4L,Mn=Vt.gSK,Dn=Vt.QyA,Bn=Vt.E4Q,jn=Vt.KSO,Hn=Vt.svy,Gn=Vt.UnJ,Un=Vt.qbC,Vn=Vt.A7C,$n=Vt.BS8,Wn=Vt.KRc,Yn=Vt.q7G,zn=Vt._AH,Kn=Vt.Ph,Xn=Vt.$TP,Jn=Vt.uCC,qn=Vt.iuJ,Zn=Vt.g1V,Qn=Vt.M1W,es=Vt.TNq,ts=Vt.Rqy,ns=Vt.Su4,ss=Vt.zU_,is=Vt.t69,os=Vt.kxO,rs=Vt.vq8,as=Vt.GfC,cs=Vt.SoL,ls=Vt.Wx3,ds=Vt.nBS,us=$t.f7n,ps=$t.Lun,hs=Wt.oss,gs=Wt.Br,ms=Wt.YZI,fs=Wt.D9N,_s=Yt.BMQ,Es=zt.est,bs=zt._cq,Ts=zt.PfQ,Cs=zt._wx,vs=zt.lIm;var ys=n(82801),Ss=n(98960);const Ns=6e3;var As;!function(e){e.ILEGAL_STATE="ILEGAL_STATE",e.ERROR="ERROR",e.WARNING="WARNING",e.SUCCESS="SUCCESS",e.INFO="INFO"}(As||(As={}));class Is{severity;message;actions;autoHideDuration;constructor(e,t,n,s){this.severity=e,this.message=t,this.actions=n,this.autoHideDuration=s}}class xs{notification;constructor(){(0,Te.Gn)(this,{notification:Te.sH,setNotification:Te.XI,notify:Te.XI,notifySuccess:Te.XI,notifyWarning:Te.XI,notifyIllegalState:Te.XI,notifyError:Te.XI})}setNotification(e){this.notification=e}notify(e,t,n){this.setNotification(new Is(As.INFO,e,t??[],null===n?void 0:n??Ns))}notifySuccess(e,t,n){this.setNotification(new Is(As.SUCCESS,e,t??[],null===n?void 0:n??Ns))}notifyWarning(e,t,n){this.setNotification(new Is(As.WARNING,e instanceof Error?e.message:e,t??[],null===n?void 0:n??Ns))}notifyError(e,t){const n=this.getErrorMessage(e);n&&this.setNotification(new Is(As.ERROR,n,t??[],void 0))}getErrorMessage(e){let t;return e instanceof x?t=e.detail:e instanceof Error?t=e.message:($(W(e),"Can't display error"),t=e),t}notifyIllegalState(e,t,n){this.setNotification(new Is(As.ILEGAL_STATE,W(e)?`[PLEASE NOTIFY DEVELOPER] ${e}`:e,t??[],null===n?void 0:n??Ns))}notifyUnsupportedFeature(e){this.notifyWarning(`Unsupported feature: ${e}`)}notifyAndReturnAlternativeOnError=(e,t)=>{try{return e()}catch(e){return R(e),this.notifyIllegalState(e.message),t}}}const ws=(0,mt.PA)((()=>{const e=Ot(),t=e.notificationService.notification,n=Boolean(t),s=t?.message??"",i=t?.severity??As.INFO,[o,r]=(0,wt.useState)(!1);let a=(0,_.jsx)("div",{className:"notification__message__content__icon notification__message__content__icon--info",children:(0,_.jsx)(Pn,{})});switch(i){case As.ILEGAL_STATE:a=(0,_.jsx)("div",{className:"notification__message__content__icon notification__message__content__icon--error",children:(0,_.jsx)(Wn,{})});break;case As.ERROR:a=(0,_.jsx)("div",{className:"notification__message__content__icon notification__message__content__icon--error",children:(0,_.jsx)(Nn,{})});break;case As.WARNING:a=(0,_.jsx)("div",{className:"notification__message__content__icon notification__message__content__icon--warning",children:(0,_.jsx)($n,{})});break;case As.SUCCESS:a=(0,_.jsx)("div",{className:"notification__message__content__icon notification__message__content__icon--success",children:(0,_.jsx)(Vn,{})})}const c=()=>{e.notificationService.setNotification(void 0),r(!1)},l=e.guardUnhandledError((()=>e.clipboardService.copyTextToClipboard(s)));return(0,_.jsx)(ys.A,{classes:{root:"notification",anchorOriginBottomRight:"notification__position"},anchorOrigin:{vertical:"bottom",horizontal:"right"},open:n,autoHideDuration:t?t.autoHideDuration??null:Ns,onClose:(e,t)=>{"timeout"===t&&c()},children:(0,_.jsx)(Ss.A,{classes:{root:"notification__content",message:"notification__message",action:"notification__actions"},message:(0,_.jsxs)("div",{className:"notification__message__content",children:[a,(0,_.jsx)("div",{className:(0,bt.$)("notification__message__content__text",{"notification__message__content__text--expanded":o}),onClick:l,title:"Click to Copy",children:s})]}),action:[(0,_.jsx)("button",{className:"notification__action",onClick:()=>r(!o),tabIndex:-1,title:o?"Collapse":"Expand",children:o?(0,_.jsx)(hs,{}):(0,_.jsx)(gs,{})},"expand"),(0,_.jsx)("button",{className:"notification__action",onClick:c,tabIndex:-1,title:"Dismiss",children:(0,_.jsx)(Sn,{})},"close")]})},"string"==typeof s||"number"==typeof s?s:"")}));var ks=n(70165);const Os=e=>{const{children:t,classes:n,...s}=e;return(0,_.jsx)(ks.A,{classes:{...n??{},paper:"mui-menu__paper",list:"mui-menu__list"},transitionDuration:0,...s,children:e.children})},Rs=e=>{const{className:t,children:n,menuProps:s,content:i,disabled:o,onClose:r,onOpen:a}=e,c=(0,wt.useRef)(null),[l,d]=(0,wt.useState)(!1),[u,p]=(0,wt.useState)(),[h,g]=(0,wt.useState)(0),[m,f]=(0,wt.useState)(0),E=()=>{p(void 0),d(!1),f(0),g(0)},b=e=>{e.stopPropagation(),e.preventDefault(),E(),r?.()},T=e=>{if(e.stopPropagation(),e.preventDefault(),!o&&(a?.(),c.current)){const t=c.current.getBoundingClientRect(),n=t.left+(window.scrollX||document.documentElement.scrollLeft),s=t.top+(window.scrollY||document.documentElement.scrollTop),{clientX:i,clientY:o,target:a}=e,l=a;if(u!==l&&!(document.elementsFromPoint(i,o).some((e=>e===l))&&n<=i&&i<=n+t.width&&s<=o&&o<=s+t.height))return E(),void r?.();p(l),d(!0),f(o),g(i)}};return(0,_.jsxs)("div",{ref:c,className:t,onContextMenu:T,children:[n,(0,_.jsx)(Os,{open:l,anchorPosition:{left:h,top:m},onClose:b,anchorReference:"anchorPosition",BackdropProps:{invisible:!0,onContextMenu:T},disableRestoreFocus:!0,transitionDuration:0,onClick:b,...s,children:l&&i},`${h}, ${m}`)]})},Ps=(0,wt.forwardRef)((function(e,t){const{className:n,children:s,...i}=e;return(0,_.jsx)("div",{ref:t,className:(0,bt.$)("menu",n),...i,children:s})})),Fs=e=>{const{className:t,onClick:n,title:s,disabled:i,children:o,...r}=e;return(0,_.jsx)("button",{className:(0,bt.$)("menu__item",t),disabled:Boolean(i),title:s,onClick:n,...r,children:o})},Ls=Tt("MenuContentDivider","menu__divider");Tt("MenuContentItemIcon","menu__item__icon"),Tt("MenuContentItemLabel","menu__item__label");var Ms=n(87062),Ds=n(29163),Bs=n(30559);const js=e=>((0,wt.useEffect)((()=>{Bs.A.initialize({startOnLoad:!0,theme:"dark"}),Bs.A.contentLoaded()}),[e.value]),(0,_.jsx)("div",{className:(0,bt.$)("markdown-content",e.className),children:(0,_.jsx)(Ms.oz,{remarkPlugins:[Ds.A],components:e.components??{code:e=>{const{children:t,className:n,node:s,...i}=e,o=/language-(?<language>\w+)/.exec(n??"");return o?.groups?.language?(0,_.jsx)("code",{...i,className:(0,bt.$)(o.groups.language),children:t}):(0,_.jsx)("code",{...i,className:n,children:t})}},children:e.value.value})}));var Hs=n(89463),Gs=(n(11097),n(53213),n(65318)),Us=n(12777);function Vs(e){const t=(0,wt.useRef)(e?.skipOnMount),n=e?.refreshMode,s=e?.refreshRate??1e3,i=(0,wt.useMemo)((()=>({leading:e?.refreshOptions?.leading,trailing:e?.refreshOptions?.trailing})),[e?.refreshOptions?.leading,e?.refreshOptions?.trailing]),[o,r]=(0,wt.useState)({width:void 0,height:void 0}),a=(0,wt.useRef)(null),c=(0,wt.useMemo)((()=>e?.targetRef??a),[e?.targetRef]),l=e?.onResize,d=(0,wt.useCallback)((e=>{t.current?t.current=!1:e.forEach((e=>{const t={width:e.contentRect.width,height:e.contentRect.height};r((n=>n.width===t.width&&n.height===t.height?n:(l?.({width:t.width,height:t.height,entry:e}),t)))}))}),[t,l]),u=(0,wt.useMemo)((()=>{switch(n){case"debounce":return(0,Gs.A)(d,s,i);case"throttle":return(0,Us.A)(d,s,i);default:return d}}),[d,n,s,i]);return(0,wt.useEffect)((()=>{let e;return c.current?(e=new window.ResizeObserver(u),e.observe(c.current)):(l?.({width:void 0,height:void 0,entry:void 0}),r({width:void 0,height:void 0})),()=>{e?.disconnect(),"cancel"in u&&u.cancel()}}),[u,l,c]),{ref:c,...o}}const $s=e=>{const{children:t}=e,{ref:n,width:s,height:i}=Vs({refreshMode:"throttle",refreshRate:50,refreshOptions:{trailing:!0}}),[o,r]=(0,wt.useState)(!1),{ref:a,width:c,height:l}=Vs({refreshMode:"throttle",refreshRate:50,refreshOptions:{trailing:!0}});return(0,wt.useEffect)((()=>{r((c??0)>(s??0)+40&&(l??0)>(i??0)+40)}),[c,l,s,i]),(0,_.jsx)("div",{ref:a,className:"panel__content__blank",children:(0,_.jsx)("div",{ref:n,className:(0,bt.$)("panel__content__blank__content",{"panel__content__blank__content--hide":!o}),children:t})})};var Ws=n(31122),Ys=n(42515),zs=n(16088);const Ks=e=>{const{children:t,options:n,size:s,className:i,...o}=e,r=((e,t)=>{const n=[];for(let s=0;s<e.length;s+=t)n.push(e.slice(s,s+t));return n})(n,s);return(0,_.jsxs)("div",{className:(0,bt.$)("mui-radio-group",i),children:[r.map(((e,t)=>(0,_.jsx)("div",{children:(0,_.jsx)(Ws.A,{className:"mui-radio-group__group",...o,children:e.map((e=>(0,_.jsx)(Ys.A,{className:"mui-radio-group__group__column",style:{width:100/s+"%"},value:e,control:(0,_.jsx)(zs.A,{className:"mui-radio-group__group__item__radio-btn",classes:{checked:"mui-radio-group__group__item__radio-btn--checked"}}),label:(0,_.jsx)("div",{className:"mui-radio-group__group__item__label",children:e})},e)))})},t))),t]})};var Xs=n(88806);const Js=e=>{const{children:t,...n}=e;return(0,_.jsx)(Xs.Ay,{classes:{paper:"mui-popover__paper"},transitionDuration:0,...n,children:e.children})};var qs,Zs=n(64);!function(e){e.QUESTION_HOW_TO_USE_ADVANCED_SEARCH_SYNTAX="question.how-to-use-advanced-search-syntax"}(qs||(qs={}));const Qs=(0,mt.PA)((e=>{const{entry:t}=e,n=Ot(),s=()=>{t.isOpen||Pe.logEvent_VirtualAssistantDocumentationEntryAccessed(n.telemetryService,{key:t.documentationKey}),t.setIsOpen(!t.isOpen)},i=n.guardUnhandledError((()=>n.clipboardService.copyTextToClipboard(t.documentationKey)));return(0,_.jsx)(Rs,{className:"virtual-assistant__doc-entry",menuProps:{elevation:7,classes:{root:"virtual-assistant__context-menu"}},content:(0,_.jsx)(Ps,{children:(0,_.jsx)(Fs,{onClick:i,children:"Copy Documentation Key"})}),children:(0,_.jsxs)("div",{className:"virtual-assistant__doc-entry",children:[(0,_.jsxs)("div",{className:"virtual-assistant__doc-entry__header",children:[(0,_.jsx)("button",{className:(0,bt.$)("virtual-assistant__doc-entry__expand-icon",{"virtual-assistant__doc-entry__expand-icon--disabled":!t.content}),disabled:!t.content,tabIndex:-1,onClick:s,children:t.isOpen?(0,_.jsx)(hs,{}):(0,_.jsx)(ms,{})}),t.url?(0,_.jsx)("a",{className:"virtual-assistant__doc-entry__title virtual-assistant__doc-entry__title--link",rel:"noopener noreferrer",target:"_blank",href:t.url,onClick:()=>{Pe.logEvent_VirtualAssistantDocumentationEntryAccessed(n.telemetryService,{key:t.documentationKey})},title:"Click to see external documentation",children:t.title}):(0,_.jsx)("div",{className:"virtual-assistant__doc-entry__title",onClick:s,children:t.title})]}),t.isOpen&&t.content&&(0,_.jsx)("div",{className:"virtual-assistant__doc-entry__content",children:W(t.content)?(0,_.jsx)("div",{className:"virtual-assistant__doc-entry__content__text",children:t.content}):(0,_.jsx)(js,{className:"virtual-assistant__doc-entry__content__markdown-text",value:t.content})})]})})})),ei=(0,mt.PA)((()=>{const e=Ot(),t=e.assistantService.currentContextualDocumentationEntry,n=e.guardUnhandledError((()=>e.clipboardService.copyTextToClipboard(t?.context??""))),s=e.guardUnhandledError((()=>e.clipboardService.copyTextToClipboard(e.navigationContextService.currentContext?.key??""))),i=e.guardUnhandledError((()=>e.clipboardService.copyTextToClipboard(e.navigationContextService.contextStack.map((e=>e.key)).join(" > "))));return(0,_.jsxs)(Rs,{className:"virtual-assistant__contextual-support",disabled:!t,menuProps:{elevation:7,classes:{root:"virtual-assistant__context-menu"}},content:(0,_.jsxs)(Ps,{children:[(0,_.jsx)(Fs,{onClick:n,children:"Copy Context ID"}),(0,_.jsx)(Fs,{onClick:s,children:"Copy Current Context ID"}),(0,_.jsx)(Fs,{onClick:i,children:"Copy Context Stack"})]}),children:[t&&(0,_.jsxs)("div",{className:"virtual-assistant__contextual-support__content",children:[t.title&&(0,_.jsx)("div",{className:"virtual-assistant__contextual-support__title",children:t.title}),t.content&&(0,_.jsx)(_.Fragment,{children:W(t.content)?(0,_.jsx)("div",{className:"virtual-assistant__contextual-support__text",children:t.content}):(0,_.jsx)(js,{className:"virtual-assistant__contextual-support__markdown-text",value:t.content})}),t.related.length&&(0,_.jsxs)("div",{className:"virtual-assistant__contextual-support__relevant-entries",children:[(0,_.jsxs)("div",{className:"virtual-assistant__contextual-support__relevant-entries__title",children:["Related entries (",t.related.length,")"]}),t.related.map((e=>(0,_.jsx)(Qs,{entry:e},e.uuid)))]})]}),!t&&(0,_.jsx)($s,{children:(0,_.jsxs)("div",{className:"virtual-assistant__panel__placeholder",children:[(0,_.jsx)(cs,{className:"virtual-assistant__panel__placeholder__icon"}),(0,_.jsx)("div",{className:"virtual-assistant__panel__placeholder__message",children:"No contextual documentation found!"}),(0,_.jsx)("div",{className:"virtual-assistant__panel__placeholder__instruction",children:"Keep using the app. When contextual help is available, we will let you know!"})]})})]})})),ti=(0,mt.PA)((()=>{const e=Ot(),t=(0,wt.useRef)(null),n=e.assistantService,s=n.searchText,i=(0,wt.useMemo)((()=>(0,Gs.A)((()=>n.search()),100)),[n]);return(0,wt.useEffect)((()=>{t.current?.focus()}),[]),(0,_.jsxs)("div",{className:"virtual-assistant__search",children:[(0,_.jsxs)("div",{className:"virtual-assistant__search__header",children:[(0,_.jsx)("input",{ref:t,onClick:()=>{document.querySelectorAll('[role="dialog"]').length&&t.current!==document.activeElement&&n.refreshPanelRendering()},className:(0,bt.$)("virtual-assistant__search__input input--dark",{"virtual-assistant__search__input--searching":s}),spellCheck:!1,onChange:e=>{n.setSearchText(e.target.value),i()},value:s,placeholder:"Ask me a question"}),s&&(0,_.jsx)("div",{className:"virtual-assistant__search__input__search__count",children:n.searchResults.length+(n.isOverSearchLimit?"+":"")}),(0,_.jsx)("button",{className:(0,bt.$)("virtual-assistant__search__input__config__trigger",{"virtual-assistant__search__input__config__trigger--toggled":n.showSearchConfigurationMenu,"virtual-assistant__search__input__config__trigger--active":n.searchConfigurationState.isAdvancedSearchActive}),tabIndex:-1,onClick:()=>n.setShowSearchConfigurationMenu(!n.showSearchConfigurationMenu),title:(n.searchConfigurationState.isAdvancedSearchActive?"Advanced search is currently active\n":"")+"Click to toggle search config menu",children:(0,_.jsx)(In,{})}),s?(0,_.jsx)("button",{className:"virtual-assistant__search__input__clear-btn",tabIndex:-1,onClick:()=>{n.resetSearch(),n.currentDocumentationEntry=void 0,t.current?.focus()},title:"Clear",children:(0,_.jsx)(Sn,{})}):(0,_.jsx)("div",{className:"virtual-assistant__search__input__search__icon",children:(0,_.jsx)(jn,{})})]}),(0,_.jsxs)("div",{className:"virtual-assistant__search__content",children:[(0,_.jsx)(Mt,{isLoading:n.searchState.isInProgress}),(0,_.jsx)("div",{className:(0,bt.$)("virtual-assistant__search__input__config__panel",{"virtual-assistant__search__input__config__panel--toggled":n.showSearchConfigurationMenu}),children:(0,_.jsxs)("div",{className:"virtual-assistant__search__input__advanced-config__panel",children:[(0,_.jsxs)("div",{className:"virtual-assistant__search__input__advanced-config__panel__header__label",children:["search config",e.documentationService.hasDocEntry(qs.QUESTION_HOW_TO_USE_ADVANCED_SEARCH_SYNTAX)&&(0,_.jsx)("div",{onClick:()=>n.openDocumentationEntryLink(qs.QUESTION_HOW_TO_USE_ADVANCED_SEARCH_SYNTAX),title:"Click to see documentation",className:"virtual-assistant__search__input__advanced-config__panel__header__label__hint",children:(0,_.jsx)(Rn,{})})]}),(0,_.jsx)("div",{children:(0,_.jsx)(Ks,{value:n.searchConfigurationState.currentMode,onChange:e=>{const t=e.target.value;n.searchConfigurationState.setCurrentMode(t)},row:!1,options:[Ne.STANDARD,Ne.INCLUDE,Ne.EXACT,Ne.INVERSE],size:1})})]})}),n.currentDocumentationEntry&&(0,_.jsx)("div",{className:"virtual-assistant__search__results",children:(0,_.jsx)(Qs,{entry:n.currentDocumentationEntry},n.currentDocumentationEntry.uuid)}),!n.currentDocumentationEntry&&(0,_.jsxs)(_.Fragment,{children:[Boolean(n.searchResults.length)&&(0,_.jsx)("div",{className:"virtual-assistant__search__results",children:n.searchResults.map((e=>(0,_.jsx)(Qs,{entry:e},e.uuid)))}),s&&!n.searchResults.length&&(0,_.jsx)($s,{children:(0,_.jsxs)("div",{className:"virtual-assistant__panel__placeholder",children:[(0,_.jsx)(ls,{className:"virtual-assistant__panel__placeholder__icon"}),(0,_.jsx)("div",{className:"virtual-assistant__panel__placeholder__message",children:"No result..."})]})}),!s&&!n.searchResults.length&&(0,_.jsx)(Rs,{className:"virtual-assistant__character__container",menuProps:{elevation:7,classes:{root:"virtual-assistant__context-menu"}},content:(0,_.jsxs)(Ps,{children:[(0,_.jsx)(Fs,{onClick:()=>{de(`documentation-registry_${(0,Zs.GP)(new Date(Date.now()),Ve)}.json`,JSON.stringify(e.documentationService.publishDocRegistry(),void 0,2),ne.APPLICATION_JSON)},children:"Download documentation registry"}),(0,_.jsx)(Fs,{onClick:()=>{de(`documentation-registry_${(0,Zs.GP)(new Date(Date.now()),Ve)}.json`,JSON.stringify(e.documentationService.publishContextualDocIndex(),void 0,2),ne.APPLICATION_JSON)},children:"Download contextual documentation mapping"})]}),children:(0,_.jsxs)("div",{className:"virtual-assistant__character",children:[(0,_.jsxs)("div",{className:"virtual-assistant__character__figure",children:[(0,_.jsx)(as,{className:"virtual-assistant__character__hat"}),(0,_.jsx)(ps,{className:"virtual-assistant__character__glasses"}),(0,_.jsx)(us,{className:"virtual-assistant__character__beard"})]}),(0,_.jsx)("div",{className:"virtual-assistant__character__greeting",children:"Bonjour, It's Pierre!"}),(0,_.jsx)("div",{className:"virtual-assistant__character__question",children:"How can I help today?"})]})})]})]})]})})),ni=(0,mt