@finos/legend-application-pure-ide-deployment 13.175.0 → 13.176.0

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.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"static/index.095beb4c.js","mappings":"UAAIA,ECCAC,EADAC,ECAAC,EACAC,E,gICkBOC,E,WCHJ,MAAMC,EACTC,KACAC,QACAC,UACAC,KAEG,MAAM,EACTH,KACAC,QACAE,MAAO,SACP,WAAAC,CAAYJ,EAAMC,GACdI,KAAKL,KAAOA,EACZK,KAAKJ,QAAUA,CACnB,CACA,OAAAK,GACI,OAAOD,KAAKL,IAChB,CACA,UAAAO,GACI,OAAOF,KAAKJ,OAChB,CACA,YAAAO,GACI,MAAO,GAAGH,KAAKC,aAAaD,KAAKE,cACrC,CACA,OAAAE,GACI,OAAOJ,KAAKF,IAChB,CACA,OAAAO,GACI,MAAMC,EAAO,IAAIZ,EAKjB,OAJAY,EAAKX,KAAOK,KAAKC,UACjBK,EAAKV,QAAUI,KAAKE,aACpBI,EAAKT,UAAYG,KAAKG,eACtBG,EAAKR,KAAOE,KAAKI,UACVE,CACX,CACA,SAAAC,CAAUC,GACN,OAAOR,IACX,EAoDG,MAAMS,EACTC,QAAU,GACVC,QAAU,GACV,UAAAC,CAAWF,GAEP,OADAV,KAAKU,QAAUA,EACRV,IACX,CACA,UAAAa,CAAWF,GAEP,OADAX,KAAKW,QAAUA,EACRX,IACX,CACA,SAAAO,CAAUC,GACNM,OAAOC,KAAKP,GAAYQ,QAASC,IAC7B,MAAMC,EAAYV,EAAWS,GAC7BjB,KAAKW,QAAQK,QAASG,IACdA,EAAOlB,YAAcgB,GACrBE,EAAOZ,UAAUW,KAGzBlB,KAAKU,QAAQM,QAASI,IACdA,EAAOnB,YAAcgB,GACrBG,EAAOb,UAAUW,MAIjC,CACA,OAAAG,GAGIrB,KAAKU,QAAQM,QAASI,GAAWA,EAAOC,QAAQrB,OAEhDA,KAAKW,QAAQK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sBnE,EAAoBa,OAAE/iH,EAAW,CAAC,KAAM,IAAOkiH,EAAoB,QAC7FmE,EAAsBnE,EAAoBa,EAAEsD,E","sources":["webpack://@finos/legend-application-pure-ide-deployment/webpack/runtime/chunk loaded","webpack://@finos/legend-application-pure-ide-deployment/webpack/runtime/create fake namespace object","webpack://@finos/legend-application-pure-ide-deployment/webpack/runtime/load script","webpack://@finos/legend-application-pure-ide-deployment/../legend-shared/lib/log/LogService.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-shared/lib/application/AbstractPluginManager.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-shared/lib/log/WebConsole.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-shared/lib/CommonUtils.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-shared/lib/error/ErrorUtils.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-shared/lib/error/AssertionUtils.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-shared/lib/network/NetworkUtils.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application/lib/__lib__/LegendApplicationEvent.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-shared/lib/application/SerializationUtils.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-shared/lib/application/DocumentationUtils.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application/lib/stores/DocumentationService.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-shared/lib/application/ActionState.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-shared/lib/network/TracerService.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-shared/lib/search/FuzzySearch.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-shared/lib/search/FuzzySearchAdvancedConfigState.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application/lib/stores/AssistantService.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application/lib/stores/event/EventService.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application/lib/__lib__/LegendApplicationTelemetry.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application/lib/stores/ApplicationNavigationContextService.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application/lib/stores/CommandService.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application/lib/stores/KeyboardShortcutsService.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application/lib/stores/ApplicationConfig.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application/lib/stores/terminal/Terminal.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-shared/lib/format/FormatterUtils.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-shared/lib/keyboard/KeyBinding.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-art/lib/utils/LegendStyleProvider.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-art/lib/utils/ComponentCreatorUtils.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-art/lib/dialog/Modal.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application/lib/stores/AlertService.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application/lib/components/ApplicationStoreProvider.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application/lib/components/ActionAlert.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-art/lib/layout/PanelLoadingIndicator.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application/lib/components/BlockingAlert.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-art/lib/icon/Icon.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application/lib/stores/NotificationService.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application/lib/components/NotificationManager.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-art/lib/menu/BaseMenu.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-art/lib/menu/ContextMenu.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-art/lib/menu/MenuContent.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-art/lib/markdown/MarkdownTextViewer.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-art/lib/utils/ComponentUtils.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-art/lib/layout/BlankPanelContent.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-art/lib/radio-group/BaseRadioGroup.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-art/lib/popover/BasePopover.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application/lib/__lib__/LegendApplicationDocumentation.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application/lib/components/VirtualAssistant.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application/lib/components/ApplicationComponentFrameworkProvider.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application/lib/stores/terminal/XTerm.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application/lib/stores/TerminalService.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application/lib/stores/IdentityService.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application/lib/__lib__/LegendApplicationColorTheme.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application/lib/stores/storage/ApplicationStorage.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application/lib/stores/storage/StorageService.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application/lib/stores/TelemetryService.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application/lib/stores/TimeService.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application/lib/__lib__/LegendApplicationSetting.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application/lib/stores/LayoutService.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application/lib/stores/ClipboardService.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application/lib/stores/navigation/NavigationService.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application/lib/stores/SettingService.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application/lib/stores/navigation/DefaultNavigator.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application/lib/stores/UserDataService.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-shared/lib/compare/StringCompareUtil.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application/lib/stores/ReleaseNotesService.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application/lib/stores/ApplicationStore.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application/lib/util/DownloadHelperServiceWorker.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application/lib/application/LegendApplication.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-shared/lib/format/MatcherUtils.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application/lib/stores/LegendApplicationPlugin.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-art/lib/layout/ResizablePanel.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application/lib/stores/Core_LegendApplicationPlugin.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application/lib/application/LegendApplicationConfig.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application-pure-ide/lib/application/LegendPureIDEApplicationConfig.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application/lib/application/LegendApplicationPluginManager.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application-pure-ide/lib/application/LegendPureIDEPluginManager.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application/lib/__lib__/LegendApplicationNavigation.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application/lib/stores/navigation/BrowserNavigator.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application/lib/stores/platform/ApplicationPlatform.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application/lib/stores/platform/BrowserPlatform.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application/lib/components/ApplicationPlatformProvider.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application/lib/components/BrowserEnvironmentProvider.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application-pure-ide/lib/stores/PureIDEConfig.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-code-editor/lib/PureLanguage.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-code-editor/lib/themes/MonacoEditorThemeUtils.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-code-editor/lib/CodeEditorTheme.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-code-editor/lib/CodeEditorUtils.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-graph/lib/graph/MetaModelConst.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application-pure-ide/lib/server/models/ConceptTree.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-shared/lib/application/HashUtils.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application-pure-ide/lib/server/models/File.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application-pure-ide/lib/server/models/Usage.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-lego/lib/application/TabManagerState.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application-pure-ide/lib/stores/PureIDETabManagerState.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application-pure-ide/lib/__lib__/LegendPureIDECommand.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application-pure-ide/lib/stores/FileEditorState.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application-pure-ide/lib/stores/TreeState.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application-pure-ide/lib/server/models/DirectoryTree.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application-pure-ide/lib/stores/DirectoryTreeState.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-graph/lib/graph/MetaModelUtils.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application-pure-ide/lib/stores/ConceptTreeState.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application-pure-ide/lib/server/models/Initialization.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application-pure-ide/lib/server/models/Execution.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application-pure-ide/lib/server/models/SearchEntry.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application-pure-ide/lib/server/models/Test.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application-pure-ide/lib/stores/TestRunnerState.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application-pure-ide/lib/server/models/Command.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application-pure-ide/lib/server/PureServerClient.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-art/lib/layout/PanelDisplayState.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-graph/lib/graph/Core_HashUtils.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-graph/lib/graph/metamodel/pure/packageableElements/domain/AnnotatedElement.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-graph/lib/graph/metamodel/pure/packageableElements/PackageableElement.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-extension-dsl-diagram/lib/graph/DSL_Diagram_HashUtils.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-extension-dsl-diagram/lib/graph/metamodel/pure/packageableElements/diagram/DSL_Diagram_Diagram.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-extension-dsl-diagram/lib/graph/metamodel/pure/packageableElements/diagram/geometry/DSL_Diagram_Point.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-extension-dsl-diagram/lib/graph/metamodel/pure/packageableElements/diagram/geometry/DSL_Diagram_Rectangle.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-extension-dsl-diagram/lib/graph/metamodel/pure/packageableElements/diagram/geometry/DSL_Diagram_PositionedRectangle.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-extension-dsl-diagram/lib/graph/metamodel/pure/packageableElements/diagram/DSL_Diagram_ClassView.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-extension-dsl-diagram/lib/graph/metamodel/pure/packageableElements/diagram/DSL_Diagram_RelationshipViewEnd.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-graph/lib/graph/metamodel/pure/Reference.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-graph/lib/graph/metamodel/pure/packageableElements/PackageableElementReference.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-extension-dsl-diagram/lib/graph/metamodel/pure/packageableElements/diagram/DSL_Diagram_ClassViewReference.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-extension-dsl-diagram/lib/graph/metamodel/pure/packageableElements/diagram/DSL_Diagram_RelationshipView.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-extension-dsl-diagram/lib/graph/metamodel/pure/packageableElements/diagram/DSL_Diagram_PropertyHolderView.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-extension-dsl-diagram/lib/graph/metamodel/pure/packageableElements/diagram/DSL_Diagram_PropertyView.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-extension-dsl-diagram/lib/graph/helpers/DSL_Diagram_Helper.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-extension-dsl-diagram/lib/graph/metamodel/pure/packageableElements/diagram/DSL_Diagram_GeneralizationView.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-graph/lib/graph/metamodel/pure/packageableElements/domain/Type.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-graph/lib/graph/metamodel/pure/packageableElements/domain/Class.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-graph/lib/graph/metamodel/pure/packageableElements/domain/Package.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-graph/lib/graph/helpers/DomainHelper.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-graph/lib/graph/metamodel/pure/packageableElements/domain/Multiplicity.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-graph/lib/graph/metamodel/pure/packageableElements/domain/TaggedValue.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-graph/lib/graph/metamodel/pure/packageableElements/domain/TagReference.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-graph/lib/graph/metamodel/pure/packageableElements/domain/StereotypeReference.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-graph/lib/graph/metamodel/pure/packageableElements/domain/GenericTypeReference.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-graph/lib/graph/metamodel/pure/packageableElements/domain/Function.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-graph/lib/graph/metamodel/pure/packageableElements/relation/RelationType.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-graph/lib/graph/metamodel/pure/packageableElements/domain/GenericType.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-graph/lib/graph/metamodel/pure/packageableElements/domain/Property.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-graph/lib/graph/metamodel/pure/packageableElements/domain/AggregationKind.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-graph/lib/graph/metamodel/pure/dataProduct/DataProduct.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-graph/lib/graph/metamodel/pure/packageableElements/domain/DerivedProperty.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-graph/lib/graph/metamodel/pure/packageableElements/domain/DataType.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-graph/lib/graph/metamodel/pure/packageableElements/domain/PrimitiveType.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-graph/lib/graph/metamodel/pure/packageableElements/domain/Enumeration.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-graph/lib/graph/metamodel/pure/packageableElements/domain/Association.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-graph/lib/graph/metamodel/pure/packageableElements/mapping/Mapping.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-graph/lib/graph/metamodel/pure/packageableElements/domain/Profile.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-graph/lib/graph/metamodel/pure/packageableElements/service/Service.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-graph/lib/graph/metamodel/pure/packageableElements/function/ConcreteFunctionDefinition.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-graph/lib/graph/metamodel/pure/packageableElements/store/Store.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-graph/lib/graph/metamodel/pure/packageableElements/store/flatData/model/FlatData.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-graph/lib/graph/metamodel/pure/packageableElements/runtime/PackageableRuntime.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-graph/lib/graph/metamodel/pure/packageableElements/connection/PackageableConnection.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-graph/lib/graph/metamodel/pure/packageableElements/generationSpecification/AbstractGenerationSpecification.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-graph/lib/graph/metamodel/pure/packageableElements/fileGeneration/FileGenerationSpecification.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-graph/lib/graph/metamodel/pure/packageableElements/generationSpecification/GenerationSpecification.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-graph/lib/graph/metamodel/pure/packageableElements/domain/Measure.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-graph/lib/graph/metamodel/pure/packageableElements/store/relational/model/Database.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-graph/lib/graph/PureGraphExtension.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-graph/lib/graph/metamodel/pure/packageableElements/data/DataElement.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-graph/lib/graph/metamodel/pure/packageableElements/service/ExecutionEnvironmentInstance.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-graph/lib/graph/metamodel/pure/packageableElements/INTERNAL__UnknownPackageableElement.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-graph/lib/graph/metamodel/pure/packageableElements/function/FunctionActivator.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-graph/lib/graph/metamodel/pure/packageableElements/function/INTERNAL__UnknownFunctionActivator.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-graph/lib/graph/metamodel/pure/packageableElements/store/INTERNAL__UnknownStore.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-graph/lib/graph/metamodel/pure/packageableElements/INTERNAL__UnknownElement.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-graph/lib/graph/metamodel/pure/packageableElements/ingest/IngestDefinition.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-graph/lib/graph/BasicModel.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-graph/lib/graph/metamodel/pure/packageableElements/section/SectionIndex.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-graph/lib/graph/GraphDataOrigin.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-graph/lib/graph/DependencyManager.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-graph/lib/graph/metamodel/pure/packageableElements/store/modelToModel/model/ModelStore.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-graph/lib/graph/PureModel.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-graph/lib/graph/metamodel/pure/packageableElements/domain/Tag.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-graph/lib/graph/metamodel/pure/packageableElements/domain/Stereotype.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-graph/lib/graph/metamodel/pure/packageableElements/domain/PropertyReference.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application-pure-ide/lib/server/models/SourceInformation.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application-pure-ide/lib/server/models/DiagramInfo.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-graph/lib/graph/helpers/PureLanguageHelper.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-extension-dsl-diagram/lib/graph/metamodel/pure/packageableElements/diagram/DSL_Diagram_AssociationView.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-extension-dsl-diagram/lib/components/DiagramRenderer.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application-pure-ide/lib/stores/DiagramEditorState.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application-pure-ide/lib/stores/FileSearchCommandState.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application-pure-ide/lib/server/models/ExecutionError.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application-pure-ide/lib/stores/LegendPureIDETerminal.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application-pure-ide/lib/stores/CodeFixSuggestion.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application-pure-ide/lib/stores/ReferenceUsageResult.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application-pure-ide/lib/stores/TextSearchState.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application-pure-ide/lib/stores/PureIDEStore.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application-pure-ide/lib/components/PureIDEStoreProvider.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application-pure-ide/lib/components/panel-group/TerminalPanel.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application-pure-ide/lib/components/panel-group/TextSearchPanel.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-art/lib/tree/TreeView.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-art/lib/layout/Panel.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-lego/lib/code-editor/CodeEditor.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application-pure-ide/lib/components/panel-group/TestRunnerPanel.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application-pure-ide/lib/components/panel-group/CodeFixSuggestionsPanel.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application-pure-ide/lib/components/panel-group/ReferenceUsagePanel.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application-pure-ide/lib/components/panel-group/PanelGroup.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-art/lib/icon/TypeIcon.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application-pure-ide/lib/components/shared/ConceptIconUtils.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application-pure-ide/lib/components/side-bar/RenameConceptPrompt.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application-pure-ide/lib/components/side-bar/MoveElementPrompt.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application-pure-ide/lib/components/side-bar/ConceptTreeExplorer.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application-pure-ide/lib/components/side-bar/CreateNewFilePrompt.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application-pure-ide/lib/components/side-bar/CreateNewDirectoryPrompt.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application-pure-ide/lib/components/side-bar/RenameFilePrompt.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application-pure-ide/lib/components/side-bar/DirectoryTreeExplorer.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application-pure-ide/lib/components/side-bar/SideBar.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-art/lib/icon/LegendLogo.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application-pure-ide/lib/components/ActivityBar.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application-pure-ide/lib/components/StatusBar.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application/lib/components/useCommands.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application-pure-ide/lib/components/editor-group/GenericFileEditor.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-code-editor/lib/PureLanguageCodeEditorSupport.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application-pure-ide/lib/server/models/Suggestion.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application-pure-ide/lib/__lib__/LegendPureIDECodeSnippet.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application-pure-ide/lib/stores/PureFileEditorUtils.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application-pure-ide/lib/components/editor-group/PureFileEditor.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-art/lib/menu/DropdownMenu.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application-pure-ide/lib/components/editor-group/DiagramEditor.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-art/lib/layout/PanelDropZone.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-lego/lib/application/TabManager.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application-pure-ide/lib/components/editor-group/EditorGroup.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-art/lib/autocomplete/CustomSelectorInput.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application-pure-ide/lib/components/command-center/FileSearchCommand.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application-pure-ide/lib/__lib__/LegendPureIDENavigation.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application-pure-ide/lib/components/command-center/SelectPCTAdapterCommand.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application-pure-ide/lib/components/PureIDE.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application/lib/components/ApplicationFrameworkProvider.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application-pure-ide/lib/stores/LegendPureIDEBaseStore.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application-pure-ide/lib/components/LegendPureIDEFrameworkProvider.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application-pure-ide/lib/components/LegendPureIDEApplication.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application-pure-ide/lib/stores/LegendPureIDEApplicationPlugin.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-code-editor/lib/PureLanguageService.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application-pure-ide/lib/components/Core_LegendPureIDEApplicationPlugin.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application-pure-ide/lib/application/LegendPureIDE.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application-pure-ide/lib/index.js","webpack://@finos/legend-application-pure-ide-deployment/./src/index.tsx","webpack://@finos/legend-application-pure-ide-deployment/./pure-ide.config.js","webpack://@finos/legend-application-pure-ide-deployment/../../node_modules/monaco-editor/esm/vs/editor/common/services/ lazy ^.*$ namespace object","webpack://@finos/legend-application-pure-ide-deployment/../../node_modules/monaco-editor/esm/vs/base/common/worker/ lazy ^.*$ namespace object","webpack://@finos/legend-application-pure-ide-deployment/webpack/bootstrap","webpack://@finos/legend-application-pure-ide-deployment/webpack/runtime/amd options","webpack://@finos/legend-application-pure-ide-deployment/webpack/runtime/compat get default export","webpack://@finos/legend-application-pure-ide-deployment/webpack/runtime/define property getters","webpack://@finos/legend-application-pure-ide-deployment/webpack/runtime/ensure chunk","webpack://@finos/legend-application-pure-ide-deployment/webpack/runtime/get javascript chunk filename","webpack://@finos/legend-application-pure-ide-deployment/webpack/runtime/get mini-css chunk filename","webpack://@finos/legend-application-pure-ide-deployment/webpack/runtime/global","webpack://@finos/legend-application-pure-ide-deployment/webpack/runtime/hasOwnProperty shorthand","webpack://@finos/legend-application-pure-ide-deployment/webpack/runtime/make namespace object","webpack://@finos/legend-application-pure-ide-deployment/webpack/runtime/node module decorator","webpack://@finos/legend-application-pure-ide-deployment/webpack/runtime/publicPath","webpack://@finos/legend-application-pure-ide-deployment/webpack/runtime/jsonp chunk loading","webpack://@finos/legend-application-pure-ide-deployment/webpack/startup"],"sourcesContent":["var deferred = [];\n__webpack_require__.O = (result, chunkIds, fn, priority) => {\n\tif(chunkIds) {\n\t\tpriority = priority || 0;\n\t\tfor(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tvar notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tvar [chunkIds, fn, priority] = deferred[i];\n\t\tvar fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tvar r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\n};","var getProto = Object.getPrototypeOf ? (obj) => (Object.getPrototypeOf(obj)) : (obj) => (obj.__proto__);\nvar leafPrototypes;\n// create a fake namespace object\n// mode & 1: value is a module id, require it\n// mode & 2: merge all properties of value into the ns\n// mode & 4: return value when already ns object\n// mode & 16: return value when it's Promise-like\n// mode & 8|1: behave like require\n__webpack_require__.t = function(value, mode) {\n\tif(mode & 1) value = this(value);\n\tif(mode & 8) return value;\n\tif(typeof value === 'object' && value) {\n\t\tif((mode & 4) && value.__esModule) return value;\n\t\tif((mode & 16) && typeof value.then === 'function') return value;\n\t}\n\tvar ns = Object.create(null);\n\t__webpack_require__.r(ns);\n\tvar def = {};\n\tleafPrototypes = leafPrototypes || [null, getProto({}), getProto([]), getProto(getProto)];\n\tfor(var current = mode & 2 && value; typeof current == 'object' && !~leafPrototypes.indexOf(current); current = getProto(current)) {\n\t\tObject.getOwnPropertyNames(current).forEach((key) => (def[key] = () => (value[key])));\n\t}\n\tdef['default'] = () => (value);\n\t__webpack_require__.d(ns, def);\n\treturn ns;\n};","var inProgress = {};\nvar dataWebpackPrefix = \"@finos/legend-application-pure-ide-deployment:\";\n// loadScript function to load a script via script tag\n__webpack_require__.l = (url, done, key, chunkId) => {\n\tif(inProgress[url]) { inProgress[url].push(done); return; }\n\tvar script, needAttach;\n\tif(key !== undefined) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tfor(var i = 0; i < scripts.length; i++) {\n\t\t\tvar s = scripts[i];\n\t\t\tif(s.getAttribute(\"src\") == url || s.getAttribute(\"data-webpack\") == dataWebpackPrefix + key) { script = s; break; }\n\t\t}\n\t}\n\tif(!script) {\n\t\tneedAttach = true;\n\t\tscript = document.createElement('script');\n\n\t\tscript.charset = 'utf-8';\n\t\tscript.timeout = 120;\n\t\tif (__webpack_require__.nc) {\n\t\t\tscript.setAttribute(\"nonce\", __webpack_require__.nc);\n\t\t}\n\t\tscript.setAttribute(\"data-webpack\", dataWebpackPrefix + key);\n\n\t\tscript.src = url;\n\t}\n\tinProgress[url] = [done];\n\tvar onScriptComplete = (prev, event) => {\n\t\t// avoid mem leaks in IE.\n\t\tscript.onerror = script.onload = null;\n\t\tclearTimeout(timeout);\n\t\tvar doneFns = inProgress[url];\n\t\tdelete inProgress[url];\n\t\tscript.parentNode && script.parentNode.removeChild(script);\n\t\tdoneFns && doneFns.forEach((fn) => (fn(event)));\n\t\tif(prev) return prev(event);\n\t}\n\tvar timeout = setTimeout(onScriptComplete.bind(null, undefined, { type: 'timeout', target: script }), 120000);\n\tscript.onerror = onScriptComplete.bind(null, script.onerror);\n\tscript.onload = onScriptComplete.bind(null, script.onload);\n\tneedAttach && document.head.appendChild(script);\n};","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { AbstractPlugin, } from '../application/AbstractPluginManager.js';\n// We use numeric enum here for because we want to do comparison\n// In order to retrieve the name of the enum we can do reverse mapping, for example: LogLevel[LogLevel.INFO] -> INFO\n// https://www.typescriptlang.org/docs/handbook/enums.html#reverse-mappings\nexport var LOG_LEVEL;\n(function (LOG_LEVEL) {\n LOG_LEVEL[LOG_LEVEL[\"DEBUG\"] = 1] = \"DEBUG\";\n LOG_LEVEL[LOG_LEVEL[\"INFO\"] = 2] = \"INFO\";\n LOG_LEVEL[LOG_LEVEL[\"WARN\"] = 3] = \"WARN\";\n LOG_LEVEL[LOG_LEVEL[\"ERROR\"] = 4] = \"ERROR\";\n LOG_LEVEL[LOG_LEVEL[\"SILENT\"] = 5] = \"SILENT\";\n})(LOG_LEVEL || (LOG_LEVEL = {}));\nexport class LogEvent {\n channel;\n name;\n timestamp = Date.now();\n /**\n * TODO: we should make channel required and potentially name required as well, and for each\n * channel, there should be a list of known event names. Unknown event name, or wrong channel\n * will result in error.\n */\n static create(name) {\n const event = new LogEvent();\n event.name = name;\n return event;\n }\n}\nexport class LoggerPlugin extends AbstractPlugin {\n level = LOG_LEVEL.DEBUG;\n setLevel(level) {\n this.level = level;\n }\n install(pluginManager) {\n pluginManager.registerLoggerPlugin(this);\n }\n debug(event, ...data) {\n if (this.level <= LOG_LEVEL.DEBUG) {\n this._debug(event, ...data);\n }\n }\n info(event, ...data) {\n if (this.level <= LOG_LEVEL.INFO) {\n this._info(event, ...data);\n }\n }\n warn(event, ...data) {\n if (this.level <= LOG_LEVEL.WARN) {\n this._warn(event, ...data);\n }\n }\n error(event, ...data) {\n if (this.level <= LOG_LEVEL.ERROR) {\n this._error(event, ...data);\n }\n }\n}\nexport class LogService {\n loggers = [];\n registerPlugins(loggerPlugins) {\n this.loggers = loggerPlugins;\n }\n debug(event, ...data) {\n this.loggers.forEach((logger) => logger.debug(event, ...data));\n }\n info(event, ...data) {\n this.loggers.forEach((logger) => logger.info(event, ...data));\n }\n warn(event, ...data) {\n this.loggers.forEach((logger) => logger.warn(event, ...data));\n }\n error(event, ...data) {\n this.loggers.forEach((logger) => logger.error(event, ...data));\n }\n}\n//# sourceMappingURL=LogService.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { uuid } from '../CommonUtils.js';\nexport class PluginInfo {\n name;\n version;\n signature;\n uuid;\n}\nexport class AbstractPlugin {\n name;\n version;\n uuid = uuid();\n constructor(name, version) {\n this.name = name;\n this.version = version;\n }\n getName() {\n return this.name;\n }\n getVersion() {\n return this.version;\n }\n getSignature() {\n return `${this.getName()}@${this.getVersion()}`;\n }\n getUUID() {\n return this.uuid;\n }\n getInfo() {\n const info = new PluginInfo();\n info.name = this.getName();\n info.version = this.getVersion();\n info.signature = this.getSignature();\n info.uuid = this.getUUID();\n return info;\n }\n configure(configData) {\n return this;\n }\n}\nexport class PresetInfo {\n name;\n version;\n signature;\n uuid;\n plugins = [];\n}\nexport class AbstractPreset {\n name;\n version;\n uuid = uuid();\n plugins = [];\n constructor(name, version, plugins) {\n this.name = name;\n this.version = version;\n this.plugins = plugins;\n }\n getName() {\n return this.name;\n }\n getVersion() {\n return this.version;\n }\n getSignature() {\n return `${this.getName()}@${this.getVersion()}`;\n }\n getUUID() {\n return this.uuid;\n }\n getPlugins() {\n return [...this.plugins];\n }\n getInfo() {\n const info = new PresetInfo();\n info.name = this.getName();\n info.version = this.getVersion();\n info.signature = this.getSignature();\n info.uuid = this.getUUID();\n info.plugins = this.plugins\n .map((plugin) => plugin.getInfo())\n .sort((a, b) => a.name.localeCompare(b.name));\n return info;\n }\n configure(configData) {\n return this;\n }\n install(pluginManager) {\n this.plugins.forEach((plugin) => plugin.install(pluginManager));\n }\n}\nexport class AbstractPluginManager {\n plugins = [];\n presets = [];\n usePlugins(plugins) {\n this.plugins = plugins;\n return this;\n }\n usePresets(presets) {\n this.presets = presets;\n return this;\n }\n configure(configData) {\n Object.keys(configData).forEach((key) => {\n const configObj = configData[key];\n this.presets.forEach((preset) => {\n if (preset.getName() === key) {\n preset.configure(configObj);\n }\n });\n this.plugins.forEach((plugin) => {\n if (plugin.getName() === key) {\n plugin.configure(configObj);\n }\n });\n });\n }\n install() {\n // Plugins run before presets\n // Plugins ordering is first to last\n this.plugins.forEach((plugin) => plugin.install(this));\n // Presets ordering is first to last\n this.presets.forEach((plugin) => plugin.install(this));\n }\n getInfo() {\n return {\n plugins: this.plugins\n .filter((plugin) => !this.getHiddenPluginNames().includes(plugin.getName()))\n .map((plugin) => plugin.getInfo())\n .sort((a, b) => a.name.localeCompare(b.name)),\n presets: this.presets\n .filter((preset) => !this.getHiddenPresetNames().includes(preset.getName()))\n .map((preset) => preset.getInfo())\n .sort((a, b) => a.name.localeCompare(b.name)),\n };\n }\n /**\n * Return the list of core plugin names to be hidden\n * when getting plugin manager info, such as core plugins.\n */\n getHiddenPluginNames() {\n return [];\n }\n /**\n * Return the list of core presets names to be hidden\n * when getting plugin manager info, such as core presets.\n */\n getHiddenPresetNames() {\n return [];\n }\n}\n//# sourceMappingURL=AbstractPluginManager.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport packageJson from '../../package.json' with { type: 'json' };\nimport { LoggerPlugin } from './LogService.js';\nconst { debug, info, warn, error } = console;\nexport class WebConsole extends LoggerPlugin {\n constructor() {\n super(packageJson.extensions.webConsoleLoggerPlugin, packageJson.version);\n }\n _debug(event, ...data) {\n debug(`[${event.timestamp}] ${event.name} ${data.length ? ':' : ''}`, ...data);\n }\n _info(event, ...data) {\n info(`[${event.timestamp}] ${event.name} ${data.length ? ':' : ''}`, ...data);\n }\n _warn(event, ...data) {\n warn(`[${event.timestamp}] ${event.name} ${data.length ? ':' : ''}`, ...data);\n }\n _error(event, ...data) {\n error(`[${event.timestamp}] ${event.name} ${data.length ? ':' : ''}`, ...data);\n }\n}\n//# sourceMappingURL=WebConsole.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { capitalize as lodashCapitalize, clone, cloneDeep as deepClone, isEqual as deepEqual, findLast, isEmpty, pickBy, uniqBy, uniq, debounce, throttle, mergeWith, isObject, shuffle, startCase, } from 'lodash-es';\nimport { diff as deepDiff } from 'deep-object-diff';\nimport { UnsupportedOperationError } from './error/ErrorUtils.js';\nimport { format as prettyPrintObject } from 'pretty-format';\nimport { guaranteeNonNullable } from './error/AssertionUtils.js';\n// NOTE: We re-export lodash utilities like this so we centralize utility usage in our app\n// in case we want to swap out the implementation\nexport { clone, deepClone, deepEqual, deepDiff, findLast, isEmpty, lodashCapitalize, pickBy, uniqBy, uniq, debounce, throttle, shuffle, startCase, };\n// NOTE: we can use the `rng` option in UUID V4 to control the random seed during testing\n// See https://github.com/uuidjs/uuid#version-4-random\nexport { v4 as uuid } from 'uuid';\nexport const getClass = (obj) => obj.constructor;\nexport const getSuperclass = (_class) => {\n if (!_class.name) {\n throw new UnsupportedOperationError(`Cannot get superclass for non user-defined classes`);\n }\n // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type\n const superclass = Object.getPrototypeOf(_class);\n /**\n * When it comes to inheritance, JavaScript only has one construct: objects.\n * Each object has a private property which holds a link to another object called its prototype.\n * That prototype object has a prototype of its own, and so on until an object is reached\n * with null as its prototype. By definition, null has no prototype,\n * and acts as the final link in this prototype chain.\n *\n * NOTE: when the prototype name is `empty` we know it's not user-defined classes, so we can return undefined\n */\n return superclass?.name ? superclass : undefined;\n};\n/**\n * Check if the specified class is either the same as, or is a superclass of the provided class.\n */\nexport const isClassAssignableFrom = (cls1, cls2) => {\n let currentPrototype = cls2;\n while (currentPrototype) {\n if (currentPrototype === cls1) {\n return true;\n }\n currentPrototype = getSuperclass(currentPrototype);\n }\n return false;\n};\nexport const noop = () => () => {\n /* do nothing */\n};\n/**\n * Recursively omit keys from an object\n */\nexport const recursiveOmit = (obj, \n/**\n * Checker function which returns `true` if the object field should be omit\n */\nchecker) => {\n const newObj = deepClone(obj);\n const omit = (_obj, _checker) => {\n if (Array.isArray(_obj)) {\n _obj.forEach((o) => omit(o, _checker));\n }\n else {\n const o = _obj;\n for (const propKey in o) {\n if (Object.prototype.hasOwnProperty.call(_obj, propKey)) {\n const value = o[propKey];\n if (_checker(_obj, propKey)) {\n delete o[propKey];\n }\n else if (isObject(value)) {\n omit(value, _checker);\n }\n }\n }\n }\n };\n omit(newObj, checker);\n return newObj;\n};\n/**\n * Recursively remove fields with undefined values in object\n */\nexport const pruneObject = (obj) => pickBy(obj, (val) => val !== undefined);\n/**\n * Recursively remove fields with null values in object\n *\n * This is particularly useful in serialization, especially when handling response\n * coming from servers where `null` are returned for missing fields. We would like to\n * treat them as `undefined` instead, so we want to strip all the `null` values from the\n * plain JSON object.\n */\nexport const pruneNullValues = (obj) => pickBy(obj, (val) => val !== null);\n/**\n * Recursively sort object keys alphabetically\n */\nexport const sortObjectKeys = (value) => {\n const _sort = (obj) => {\n if (Array.isArray(obj)) {\n return obj.map(sortObjectKeys);\n }\n else if (typeof obj === 'object' && obj !== null) {\n const oldObj = obj;\n const newObj = {};\n Object.keys(oldObj)\n .sort((a, b) => a.localeCompare(b))\n .forEach((key) => {\n newObj[key] = _sort(oldObj[key]);\n });\n return newObj;\n }\n return obj;\n };\n return _sort(value);\n};\nexport const parseNumber = (val) => {\n const num = Number(val);\n if (isNaN(num)) {\n throw new Error(`Can't parse number '${val}'`);\n }\n return num;\n};\n/**\n * Stringify object shallowly\n * See https://stackoverflow.com/questions/16466220/limit-json-stringification-depth\n */\nexport const shallowStringify = (object) => JSON.stringify(object, (key, val) => key && val && typeof val !== 'number'\n ? Array.isArray(val)\n ? '[object Array]'\n : `${val}`\n : val);\nexport const generateEnumerableNameFromToken = (existingNames, token, delim = 'underscore') => {\n if (!token.match(/^[\\w_-]+$/)) {\n throw new Error(`Token must only contain digits, letters, or special characters _ and -`);\n }\n const delimiter = delim === 'whitespace' ? ' ' : '_';\n const maxCounter = existingNames\n .map((name) => {\n const matchingCount = name.match(new RegExp(`^${token}${delimiter}(?<count>\\\\d+)$`));\n return matchingCount?.groups?.count\n ? parseInt(matchingCount.groups.count, 10)\n : 0;\n })\n .reduce((max, num) => Math.max(max, num), 0);\n return `${token}${delimiter}${maxCounter + 1}`;\n};\nexport const at = (list, idx, message) => {\n return guaranteeNonNullable(list.at(idx), message);\n};\n/**\n * NOTE: This object mutates the input object (obj1)\n * To disable this behavior, set `createClone=true`\n */\nexport const mergeObjects = (obj1, obj2, createClone) => mergeWith(createClone ? deepClone(obj1) : obj1, obj2, (o1, o2) => {\n if (Array.isArray(o1)) {\n return o1.concat(o2);\n }\n return undefined;\n});\nexport const promisify = (func) => new Promise((resolve, reject) => setTimeout(() => {\n try {\n resolve(func());\n }\n catch (error) {\n reject(error);\n }\n}, 0));\nexport function sleep(duration) {\n return new Promise((resolve) => setTimeout(resolve, duration));\n}\nexport const addUniqueEntry = (array, newEntry, comparator = (val1, val2) => val1 === val2) => {\n if (!array.find((entry) => comparator(entry, newEntry))) {\n array.push(newEntry);\n return true;\n }\n return false;\n};\nexport const changeEntry = (array, oldEntry, newEntry, comparator = (val1, val2) => val1 === val2) => {\n const idx = array.findIndex((entry) => comparator(entry, oldEntry));\n if (idx !== -1) {\n array[idx] = newEntry;\n return true;\n }\n return false;\n};\nexport const swapEntry = (array, entryOne, entryTwo, comparator = (val1, val2) => val1 === val2) => {\n const idxX = array.findIndex((entry) => comparator(entry, entryOne));\n const idxY = array.findIndex((entry) => comparator(entry, entryTwo));\n if (idxX !== -1 && idxY !== -1) {\n array[idxX] = entryTwo;\n array[idxY] = entryOne;\n return true;\n }\n return false;\n};\nexport const deleteEntry = (array, entryToDelete, comparator = (val1, val2) => val1 === val2) => {\n const idx = array.findIndex((entry) => comparator(entry, entryToDelete));\n if (idx !== -1) {\n array.splice(idx, 1);\n return true;\n }\n return false;\n};\nexport const printObject = (value, options) => {\n const opts = pruneObject({\n printFunctionName: false,\n maxDepth: options?.deep ? undefined : 1,\n });\n const text = prettyPrintObject(value, opts);\n return (text\n // We do these replacements because when we do this for production and the class name is minified,\n // we'd better show `[Object]` instead.\n .replace(/.*\\s\\{/g, '{')\n .replace(/\\[.*\\]/g, (val) => ['[Array]', '[Function]'].includes(val) ? val : '[Object]'));\n};\nexport const hasWhiteSpace = (val) => Boolean(val.match(/\\s/));\n//# sourceMappingURL=CommonUtils.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { printObject, uuid, } from '../CommonUtils.js';\n/**\n * A generic error that can be used for building other errors in the application\n * which does not require Javascript stack trace.\n *\n * If the Javascript stack trace is needed to trace back where the problem occurs,\n * `EnrichedError` is the more suitable candidate.\n *\n * This type of error is useful for wrapping the innermost error or errors coming\n * from the servers. Since we enforce in the app that errors thrown must be of type\n * `Error`, this acts as a good wrapper to manage errors better.\n * See https://github.com/microsoft/TypeScript/issues/13219\n */\nexport class ApplicationError extends Error {\n uuid = uuid();\n constructor(message) {\n super();\n this.message =\n message === undefined || message === '' ? '(no error message)' : message;\n }\n /**\n * This provides more detail (better context) about the error, including the error message\n * stack trace, etc.\n */\n get detail() {\n return this.message;\n }\n}\n// Since Javascript does not fully support rethrowing error, we need to customize and manipulate the stack trace\n// See https://stackoverflow.com/questions/42754270/re-throwing-exception-in-nodejs-and-not-losing-stack-trace\nexport class EnrichedError extends Error {\n constructor(name, error, overideMessage) {\n super(overideMessage\n ? overideMessage\n : error instanceof Error\n ? error.message\n : error);\n this.name = name;\n // if the material used to make this error is also an error, we maintain the stack trace and\n // follow the `rethrown` error stack trace convention\n // See https://www.twilio.com/blog/how-to-read-and-understand-a-java-stacktrace\n if (error instanceof Error) {\n const messageLines = (this.message.match(/\\n/g) ?? []).length + 1;\n this.stack = `${(this.stack ?? '')\n .split('\\n')\n .slice(0, messageLines + 1)\n .join('\\n')}\\nCaused by: ${error.stack}`;\n }\n else {\n if (typeof Error.captureStackTrace === 'function') {\n // Maintains proper stack trace for where our error was thrown (only available on V8)\n // This only works in Chrome for now. Firefox (as of Feb 2020) will throw error\n // See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error\n Error.captureStackTrace(this, this.constructor);\n }\n else {\n // otherwise, use the non-standard but defacto stack trace (available in most browser)\n this.stack = new Error(error).stack;\n }\n }\n }\n}\n/**\n * Signals that a method has been invoked at an illegal or\n * inappropriate point at runtime. In other words, the environment\n * or application is not in an appropriate state for the requested\n * operation.\n */\nexport class IllegalStateError extends EnrichedError {\n constructor(error) {\n super('Illegal State Error [PLEASE NOTIFY DEVELOPER]', error);\n }\n}\nexport class UnsupportedOperationError extends EnrichedError {\n constructor(message, unsupportedObject) {\n super('Unsupported Operation Error', message || unsupportedObject\n ? `${message}${unsupportedObject ? `\\n${printObject(unsupportedObject)}` : ''}`\n : undefined);\n }\n}\n/**\n * This is a relatively crude way to handle error of type unknown thrown for now.\n * We should revisit this when Typescript supports `throws` clause\n * See https://github.com/microsoft/TypeScript/issues/13219\n *\n * NOTE: There's a problem with this check in JSDOM leading so we have to disable this in test environment\n * JSDOM uses their own isolated object rather than native object for performance purpose\n * See https://github.com/jsdom/jsdom/issues/3082\n * For example, TypeErrors generated by `webidl2js` or `whatwg-url` used by `jsdom`, or manually-thrown ones inside impl classes,\n * are thrown using global.TypeError, not dom.window.TypeError. This change is hard to implement as of now\n * See https://github.com/jsdom/jsdom/issues/2727\n * See https://github.com/facebook/jest/issues/2549\n *\n * Read more related discussions at:\n * https://github.com/jsdom/jsdom/issues/1737\n * https://github.com/webcomponents/polyfills/issues/105\n * https://github.com/jsdom/jsdom/issues/1769\n * https://github.com/jsdom/jsdom/issues/2555\n */\nexport function assertErrorThrown(error) {\n // eslint-disable-next-line no-process-env\n if (process.env.NODE_ENV === 'test') {\n return;\n }\n if (!(error instanceof Error)) {\n throw new IllegalStateError('Expected error to be thrown');\n }\n}\nexport const returnUndefOnError = (fn) => {\n try {\n return fn();\n }\n catch {\n return undefined;\n }\n};\nexport const decorateErrorMessageIfExists = (fn, errorMessageDecorator) => {\n try {\n return fn();\n }\n catch (error) {\n assertErrorThrown(error);\n error.message = errorMessageDecorator(error.message);\n throw error;\n }\n};\n//# sourceMappingURL=ErrorUtils.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { EnrichedError } from './ErrorUtils.js';\nexport class AssertionError extends EnrichedError {\n constructor(error, message) {\n super('Assertion Error', error, message);\n }\n}\nexport const isNullable = (value) => value === null || value === undefined;\nexport const isNonNullable = (value) => value !== null && value !== undefined;\nexport function assertNonNullable(value, message = '') {\n if (value === null || value === undefined) {\n throw new AssertionError(message || 'Value is nullable');\n }\n}\nexport const guaranteeNonNullable = (value, message = '') => {\n assertNonNullable(value, message);\n return value;\n};\nexport const isType = (value, clazz) => value instanceof clazz;\nexport const filterByType = (clazz) => (value) => isType(value, clazz);\n// Aserts typing doesn't work with all arrow function type declaration form\n// So we can use this: export const assertType: <T>(value: unknown, clazz: Clazz<T>, message: string) => asserts value is T = (value, clazz, message = '') => {\n// or the normal function form\n// See https://github.com/microsoft/TypeScript/issues/34523\n// See https://github.com/microsoft/TypeScript/pull/33622\nexport function assertType(value, clazz, message = '') {\n if (!(value instanceof clazz)) {\n throw new AssertionError(message || `Value is expected to be of type '${clazz.name}'`);\n }\n}\nexport const guaranteeType = (value, clazz, message = '') => {\n assertType(value, clazz, message);\n return value;\n};\nexport function isNonEmptyString(str) {\n return isNonNullable(str) && str !== '';\n}\nexport function assertNonEmptyString(str, message = '') {\n if (guaranteeNonNullable(str, message) === '') {\n throw new AssertionError(message || `Expected string value to be non-empty`);\n }\n}\nexport function guaranteeNonEmptyString(str, message = '') {\n assertNonEmptyString(str, message);\n return str;\n}\nexport function assertTrue(assertionValue, message = '') {\n if (!assertionValue) {\n throw new AssertionError(message || `Expected predicate to be truthy`);\n }\n}\nexport const isString = (val) => typeof val === 'string';\nexport const isNumber = (val) => typeof val === 'number' && !isNaN(val);\nexport const isBoolean = (val) => typeof val === 'boolean';\nexport const isObject = (val) => typeof val === 'object' && val !== null;\nexport const isPlainObject = (val) => isObject(val) && val.constructor.name === 'Object';\nexport function assertIsString(val, message = '') {\n if (!isString(val)) {\n throw new AssertionError(message || `Value is expected to be a string`);\n }\n}\nexport function assertIsNumber(val, message = '') {\n if (!isNumber(val)) {\n throw new AssertionError(message || `Value is expected to be a number`);\n }\n}\nexport function assertIsBoolean(val, message = '') {\n if (!isBoolean(val)) {\n throw new AssertionError(message || `Value is expected to be a boolean`);\n }\n}\nexport function assertIsObject(val, message = '') {\n if (!isObject(val)) {\n throw new AssertionError(message || `Value is expected to be a object`);\n }\n}\nexport const guaranteeIsString = (val, message = '') => {\n assertIsString(val, message);\n return val;\n};\nexport const guaranteeIsNumber = (val, message = '') => {\n assertIsNumber(val, message);\n return val;\n};\nexport const guaranteeIsBoolean = (val, message = '') => {\n assertIsBoolean(val, message);\n return val;\n};\nexport const guaranteeIsObject = (val, message = '') => {\n assertIsObject(val, message);\n return val;\n};\n//# sourceMappingURL=AssertionUtils.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { StatusCodes } from 'http-status-codes';\nimport { isNonNullable, isString, isObject, AssertionError, assertTrue, } from '../error/AssertionUtils.js';\nimport { deflate } from 'pako';\nimport queryString from 'query-string';\nimport { returnUndefOnError } from '../error/ErrorUtils.js';\nimport { sanitizeUrl } from '@braintree/sanitize-url';\nimport { action, makeObservable, observable } from 'mobx';\n/**\n * Unlike the download call (GET requests) which is gziped, the upload call send uncompressed data which is in megabytes realms\n * for bigger project. This really slows down operations. As such, we compress data using `zlib` for all network calls to execution\n * server. This requires the backend to uncompress, which for small models might end up adding a little overhead, so in the future, we might\n * want to make this decision `to compress or to not compress` more smartly and dynamicly (e.g. potentially to scan the size of the data/model\n * and decide the compression strategy).\n */\nconst compressData = (data) => new Blob([deflate(isObject(data) ? JSON.stringify(data) : data)]);\nexport const URL_SEPARATOR = '/';\n/**\n * Reference: https://uibakery.io/regex-library/url\n */\nconst URL_REGEX = new RegExp('^(?:https?|ssh|ftp|file)://(?:www.)?[-a-zA-Z0-9@:%._+~#=]{1,256}.[a-zA-Z0-9()]{1,6}\\\\b(?:[-a-zA-Z0-9()@:%_+.~#?&/=]*)$');\nexport const HttpStatus = StatusCodes;\nexport const CHARSET = 'charset=utf-8';\nexport var HttpHeader;\n(function (HttpHeader) {\n HttpHeader[\"CONTENT_TYPE\"] = \"Content-Type\";\n HttpHeader[\"ACCEPT\"] = \"Accept\";\n})(HttpHeader || (HttpHeader = {}));\nexport var ContentType;\n(function (ContentType) {\n ContentType[\"APPLICATION_JSON\"] = \"application/json\";\n ContentType[\"APPLICATION_XML\"] = \"application/xml\";\n ContentType[\"APPLICATION_ZLIB\"] = \"application/zlib\";\n ContentType[\"APPLICATION_XLSX\"] = \"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet\";\n ContentType[\"TEXT_PLAIN\"] = \"text/plain\";\n ContentType[\"TEXT_HTML\"] = \"text/html\";\n ContentType[\"TEXT_CSV\"] = \"text/csv\";\n ContentType[\"ALL\"] = \"*/*\";\n ContentType[\"MESSAGE_RFC822\"] = \"message/rfc822\";\n})(ContentType || (ContentType = {}));\nexport var HttpMethod;\n(function (HttpMethod) {\n HttpMethod[\"GET\"] = \"GET\";\n HttpMethod[\"PUT\"] = \"PUT\";\n HttpMethod[\"POST\"] = \"POST\";\n HttpMethod[\"DELETE\"] = \"DELETE\";\n})(HttpMethod || (HttpMethod = {}));\nconst DEFAULT_CLIENT_REQUEST_OPTIONS = {\n mode: 'cors', // allow CORS - See https://developer.mozilla.org/en-US/docs/Web/API/Request/mode\n credentials: 'include', // allow sending credentials to other domain\n /**\n * NOTE: We must set this to `follow` for the fetch to handle 3xx redirects automatically.\n * The other modes available are `error` which will throw error and does not really give a\n * response object, and `manual` which returns an opaque response object with status code 0;\n * either way, we cannot really handle the redirect manually ourselves.\n * See https://fetch.spec.whatwg.org/#concept-request-redirect-mode\n * See https://fetch.spec.whatwg.org/#concept-filtered-response-opaque-redirect\n */\n redirect: 'follow',\n};\n// NOTE: We could further improve this by using the MIME library https://flaviocopes.com/node-get-file-extension-mime-type/\nexport const getContentTypeFileExtension = (type) => {\n switch (type) {\n case ContentType.APPLICATION_JSON:\n return 'json';\n case ContentType.APPLICATION_XML:\n return 'xml';\n case ContentType.TEXT_CSV:\n return 'csv';\n default:\n return 'txt';\n }\n};\n/**\n * NOTE: the latter headers value will override the those of the first\n */\nexport const mergeRequestHeaders = (headersOne, headersTwo) => {\n const requestHeaders = {};\n if (headersOne) {\n Object.entries(headersOne).forEach(([key, value]) => {\n requestHeaders[key] = value;\n });\n }\n if (headersTwo) {\n Object.entries(headersTwo).forEach(([key, value]) => {\n requestHeaders[key] = value;\n });\n }\n return requestHeaders;\n};\nconst MAX_ERROR_MESSAGE_LENGTH = 5000;\n/**\n * Custom error for service client with response details.\n * NOTE: Since is particular to execution error we might want to separate this out to another place and leave network client\n * as pure/generic as possible\n */\nconst extractMessage = (payload) => {\n if (isObject(payload)) {\n return isString(payload.message)\n ? payload.message\n : JSON.stringify(payload);\n }\n let payloadAsObject;\n try {\n payloadAsObject = JSON.parse(payload);\n }\n catch {\n // NOTE: ignored, above is best effort\n }\n return payloadAsObject && isString(payloadAsObject.message)\n ? payloadAsObject.message\n : payload;\n};\n/**\n * This is a fairly basic way to attempt re-authentication.\n * We create an <iframe> to load a re-authentication url\n * which suppose to silently refresh the authentication cookie\n * and requires no action from users.\n *\n * NOTE: authentication is very specific to the deployment context\n * i.e. how the servers are being setup, so this way of re-authenticate\n * should be optional and configurable.\n */\nexport const autoReAuthenticate = (url) => \n// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type\nnew Promise((resolve) => {\n const id = 'AUTO_AUTHENTICATION_IFRAME';\n const previous = document.getElementById(id);\n previous?.remove();\n const element = document.createElement('iframe');\n element.id = id;\n element.src = url;\n element.style.display = 'none';\n element.addEventListener('load', () => {\n element.remove();\n resolve();\n });\n document.body.appendChild(element);\n});\nexport class NetworkClientError extends Error {\n response;\n payload;\n constructor(response, payload) {\n super();\n if (typeof Error.captureStackTrace === 'function') {\n // Maintains proper stack trace for where our error was thrown (only available on V8)\n // This only works in Chrome for now. Firefox (as of Feb 2020) will throw error\n // See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error\n Error.captureStackTrace(this, this.constructor);\n }\n else {\n // otherwise, use the non-standard but defacto stack trace (available in most browser)\n this.stack = new Error().stack;\n }\n this.name = 'Network Client Error';\n this.response = response;\n const { status, statusText, url } = response;\n const summary = `Received response with status ${status} (${statusText}) for ${url}`;\n this.message =\n (payload\n ? extractMessage(payload).substring(0, MAX_ERROR_MESSAGE_LENGTH)\n : '') || summary;\n this.payload = payload;\n }\n}\nexport const makeUrl = (baseUrl, url, parameters) => {\n if (!baseUrl && !returnUndefOnError(() => new URL(url))) {\n throw new Error(`Can't build URL string: base URL is not specified and the provided URL '${url}' is not absolute`);\n }\n const fullUrl = new URL(url, baseUrl);\n if (parameters instanceof Object) {\n Object.entries(parameters).forEach(([name, value]) => {\n if (value !== undefined) {\n if (Array.isArray(value)) {\n // if value is an array, keep adding it to the URL with the same parameter name, for example: /reviews?revisionIds=rev2&revisionIds=rev1\n value\n .filter(isNonNullable)\n .forEach((subVal) => fullUrl.searchParams.append(name, subVal.toString()));\n }\n else {\n fullUrl.searchParams.append(name, value.toString());\n }\n }\n });\n }\n return fullUrl.toString();\n};\n// NOTE: in case of missing CORS headers, failed authentication manifests itself as CORS error\nconst couldBeCORS = (error) => error instanceof TypeError && error.message === 'Failed to fetch';\nconst processResponse = async (response, init, responseProcessConfig) => {\n responseProcessConfig?.preprocess?.(response);\n if (!response.ok) {\n let payload;\n try {\n payload = await response.text();\n payload = JSON.parse(payload);\n }\n catch {\n // NOTE: ignored, above is best effort\n }\n return Promise.reject(new NetworkClientError(response, payload));\n }\n if (responseProcessConfig?.skipProcessing) {\n return Promise.resolve(response);\n }\n if (response.status === HttpStatus.NO_CONTENT) {\n return Promise.resolve(undefined);\n }\n // TODO: might need to handle */* ContentType and other types\n // Note that right now what we support is rather simplistic, as we always expect `application/json` or `text/plain`\n // and use these to determine how we should decode the response. However, we should properly allow passing in\n // a field in response process config to specify the format of the expected response body\n //\n // See https://www.npmjs.com/package/mime-types\n // See https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types\n // See https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types\n // See https://github.github.io/fetch/\n const accept = init.headers.Accept;\n switch (accept) {\n case ContentType.APPLICATION_JSON:\n return response.json();\n case ContentType.TEXT_PLAIN:\n return response.text();\n default:\n return Promise.reject(new NetworkClientError(response, `Can't process response for request with Content-Type '${accept}'`));\n }\n};\nexport const createRequestHeaders = (method, headers) => {\n const baseRequestHeaders = {};\n /**\n * NOTE: here we set the accept header to application/json instead of the default value\n * as that will imply the server can send us text/html sometimes when there is an\n * authentication problem, which is not desirable.\n */\n baseRequestHeaders.Accept = ContentType.APPLICATION_JSON;\n if (method !== HttpMethod.GET) {\n baseRequestHeaders[HttpHeader.CONTENT_TYPE] =\n `${ContentType.APPLICATION_JSON};${CHARSET}`;\n }\n return mergeRequestHeaders(baseRequestHeaders, headers);\n};\n/**\n * Simple wrapper around native `fetch` API. For `options`, see documentation for \"init\"\n * See https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API\n */\nexport class NetworkClient {\n options = {};\n baseUrl;\n constructor(config) {\n makeObservable(this, {\n baseUrl: observable,\n setBaseUrl: action,\n });\n this.baseUrl = config?.baseUrl;\n this.options = {\n ...DEFAULT_CLIENT_REQUEST_OPTIONS,\n ...(config?.options ?? {}),\n };\n }\n setBaseUrl(val) {\n this.baseUrl = val;\n }\n async get(url, options = {}, headers, parameters, requestProcessConfig, responseProcessConfig) {\n // NOTE: do not use Content-Type for GET to avoid unnecessary pre-flight when cross-origin\n return this.request(HttpMethod.GET, url, undefined, options, headers, parameters, requestProcessConfig, responseProcessConfig);\n }\n async put(url, data = {}, options = {}, headers, parameters, requestProcessConfig, responseProcessConfig) {\n return this.request(HttpMethod.PUT, url, data, options, headers, parameters, requestProcessConfig, responseProcessConfig);\n }\n async post(url, data = {}, options = {}, headers, parameters, requestProcessConfig, responseProcessConfig) {\n return this.request(HttpMethod.POST, url, data, options, headers, parameters, requestProcessConfig, responseProcessConfig);\n }\n async delete(url, data = {}, options = {}, headers, parameters, requestProcessConfig, responseProcessConfig) {\n return this.request(HttpMethod.DELETE, url, data, options, headers, parameters, requestProcessConfig, responseProcessConfig);\n }\n async request(method, url, data, options, headers, parameters, requestProcessConfig, responseProcessConfig) {\n const requestUrl = makeUrl(this.baseUrl, url, parameters ?? {});\n if ((isString(data) || isObject(data)) &&\n requestProcessConfig?.enableCompression) {\n assertTrue(method !== HttpMethod.GET, ' GET request should not have any request payload');\n data = compressData(data);\n // NOTE: do not use Content-Type for GET to avoid unnecessary pre-flight when cross-origin\n headers = mergeRequestHeaders(headers, {\n // Override Content-Type header when compression is enabled\n [HttpHeader.CONTENT_TYPE]: `${ContentType.APPLICATION_ZLIB};${CHARSET}`,\n });\n }\n let body;\n if (data !== undefined) {\n if (isString(data) || data instanceof Blob) {\n body = data;\n }\n else if (isObject(data)) {\n body = JSON.stringify(data);\n }\n else {\n throw new AssertionError(`Request body can only be either a 'string' or an 'object'`);\n }\n }\n const requestInit = {\n ...this.options,\n ...options,\n method,\n body: body,\n headers: createRequestHeaders(method, headers),\n };\n /**\n * For network client to work, we need an implementation of `window.fetch` to be present.\n * Modern browsers should already have native support for `fetch`.\n * In case they don't (such as in test where we use `jsdom` for example),\n * there are several ways to go about this,but we recommend using `whatwg-fetch` polyfill.\n *\n * Why favor `whatwg-fetch`?\n * It's Github's polyfill for a subset of features of Fetch API.\n * See https://github.com/github/fetch#read-this-first\n * What about `axios`? `axios` has pretty nice API, but larger bundle-size for no particular reason\n * See https://github.com/axios/axios/issues/1333#issuecomment-511375282\n * What about `node-fetch`? `node-fetch` is for server-side only, while `whatwg-fetch` is for client-side\n * See https://www.npmjs.com/package/node-fetch#motivation\n */\n return fetch(requestUrl, requestInit)\n .then((response) => {\n if (\n // NOTE: status 0 is either timeout or client error possibly caused by authentication\n response.status === 0 ||\n response.status === HttpStatus.UNAUTHORIZED) {\n // NOTE: we might want to consider different handling here rather than just proceeding with a retry\n // this is a good place to add an auto retry/authenticate mechanism\n if (responseProcessConfig?.autoReAuthenticateUrl) {\n return autoReAuthenticate(responseProcessConfig.autoReAuthenticateUrl)\n .then(() => fetch(requestUrl, requestInit))\n .then((resp) => processResponse(resp, requestInit, responseProcessConfig));\n }\n return fetch(requestUrl, requestInit).then((resp) => processResponse(resp, requestInit, responseProcessConfig));\n }\n return processResponse(response, requestInit, responseProcessConfig);\n })\n .catch((error) => couldBeCORS(error)\n ? // NOTE: we might want to consider different handling here rather than just proceeding with a retry\n fetch(requestUrl, requestInit).then((resp) => processResponse(resp, requestInit, responseProcessConfig))\n : Promise.reject(error));\n }\n}\n/**\n * Create and download a file using data URI\n * See http://stackoverflow.com/questions/283956\n */\nexport const downloadFileUsingDataURI = (fileName, content, contentType) => {\n const blob = new Blob([content], { type: contentType });\n const url = URL.createObjectURL(blob);\n const link = document.createElement('a');\n if (typeof link.download === 'string') {\n document.body.appendChild(link); // Firefox requires the link to be in the body\n link.download = fileName;\n link.href = url;\n link.click();\n document.body.removeChild(link); // remove the link when done\n }\n else {\n location.replace(url);\n }\n};\nexport const createUrlStringFromData = (data, contentType, base64) => base64\n ? `data:${contentType};base64,${window.btoa(data)}`\n : `data:${contentType},${encodeURIComponent(data)}`;\n// Buffer.from(str, 'base64')` and`buf.toString('base64')\n// NOTE: we can potentially use the native `URLSearchParams` as it provides\n// fairly good API and structured output, but it does not support duplicated query\n// such as `?foo=1&foo=2`, only the first value of `foo` will be recorded\n// See https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams\nexport const getQueryParameters = (url, isFullUrl = false) => {\n const params = isFullUrl\n ? queryString.parseUrl(url).query\n : queryString.parse(url);\n return params;\n};\nexport const getQueryParameterValue = (key, data, options) => {\n const paramValue = options?.sanitizeParametersInsteadOfUrl\n ? sanitizeUrl(data[key])\n : data[key];\n if (options?.replaceUrlSafeBase64Characters) {\n return paramValue\n ? decodeURIComponent(paramValue).replace(/-/g, '+').replace(/_/g, '/')\n : undefined;\n }\n else {\n return paramValue ? decodeURIComponent(paramValue) : undefined;\n }\n};\nexport const stringifyQueryParams = (params) => {\n const data = {};\n Object.entries(params).forEach(([key, value]) => {\n if (!value) {\n return;\n }\n data[key] = value.toString();\n });\n return queryString.stringify(data);\n};\nexport const addQueryParametersToUrl = (url, val) => (val ? `${url}?${val}` : url);\nexport const buildUrl = (parts) => parts\n .map((part) => part.replaceAll(/^\\/+/g, '').replaceAll(/\\/+$/g, ''))\n .join(URL_SEPARATOR);\nexport const sanitizeURL = (val) => {\n // eslint-disable-next-line no-process-env\n if (process.env.NODE_ENV === 'test') {\n // NOTE: the library we use for sanizing URL use URL.canParse() which is not available in JSDOM\n // so we skip sanitizing URL in test environment for now\n return val;\n }\n return sanitizeUrl(val);\n};\nexport const isValidURL = (val) => URL_REGEX.test(val);\n//# sourceMappingURL=NetworkUtils.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport var APPLICATION_EVENT;\n(function (APPLICATION_EVENT) {\n // TODO: split this into specific events\n APPLICATION_EVENT[\"GENERIC_FAILURE\"] = \"application.failure.generic\";\n APPLICATION_EVENT[\"APPLICATION_SETUP__FAILURE\"] = \"application.setup.failure\";\n APPLICATION_EVENT[\"APPLICATION_LOAD__SUCCESS\"] = \"application.load.success\";\n APPLICATION_EVENT[\"APPLICATION_LOAD__FAILURE\"] = \"application.load.failure\";\n APPLICATION_EVENT[\"ILLEGAL_APPLICATION_STATE_OCCURRED\"] = \"application.error.illegal-state\";\n APPLICATION_EVENT[\"APPLICATION_CONFIGURATION__FAILURE\"] = \"application.configuration.failure\";\n APPLICATION_EVENT[\"IDENTITY_AUTO_FETCH__FAILURE\"] = \"application.identity.auto-fetch.failure\";\n APPLICATION_EVENT[\"DOCUMENTATION_FETCH__FAILURE\"] = \"application.documentation.fetch.failure\";\n APPLICATION_EVENT[\"DOCUMENTATION_LOAD__SKIP\"] = \"application.documentation.load.skip\";\n APPLICATION_EVENT[\"DOCUMENTATION_REQUIREMENT_CHECK__FAILURE\"] = \"application.documentation.requirement-check.failure\";\n APPLICATION_EVENT[\"CONTEXTUAL_DOCUMENTATION_LOAD__SKIP\"] = \"application.virtual-assistant.contextual-documentation-load.skip\";\n APPLICATION_EVENT[\"VIRTUAL_ASSISTANT_DOCUMENTATION_ENTRY__ACCESS\"] = \"application.virtual-assistant.documentation-entry.access\";\n APPLICATION_EVENT[\"TERMINAL_COMMAND_CONFIGURATION_CHECK__FAILURE\"] = \"application.load.terminal-command.configuration-check.failure\";\n APPLICATION_EVENT[\"COLOR_THEME_CONFIGURATION_CHECK__FAILURE\"] = \"application.layout.color-theme.configuration-check.failure\";\n APPLICATION_EVENT[\"SETTING_CONFIGURATION_CHECK__FAILURE\"] = \"application.setting.configuration-check.failure\";\n APPLICATION_EVENT[\"SETTING_RETRIVE_FAILURE\"] = \"application.setting.retrieve.failure\";\n APPLICATION_EVENT[\"USER_DATA_RETRIEVE_FAILURE\"] = \"application.user-data.retrieve.failure\";\n APPLICATION_EVENT[\"COMMAND_CENTER_REGISTRATION__FAILURE\"] = \"application.command.registration.failure\";\n APPLICATION_EVENT[\"APPLICATION_CONTEXT__ACCESS\"] = \"application.context.access\";\n APPLICATION_EVENT[\"APPLICATION_USAGE__INTERRUPT\"] = \"application.usage.interrupt\";\n APPLICATION_EVENT[\"NAVIGATION_BLOCKED\"] = \"application.usage.navigation-blocked\";\n APPLICATION_EVENT[\"APPLICATION_TELEMETRY_EVENT__FAILURE\"] = \"application.telemetry-event.failure\";\n APPLICATION_EVENT[\"DEBUG\"] = \"development.debug\";\n})(APPLICATION_EVENT || (APPLICATION_EVENT = {}));\n//# sourceMappingURL=LegendApplicationEvent.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { pruneNullValues } from '../CommonUtils.js';\nimport { custom, SKIP, deserialize, serialize, } from 'serializr';\nexport class SerializationFactory {\n schema;\n deserializeNullAsUndefined;\n constructor(schema, options) {\n this.schema = schema;\n this.deserializeNullAsUndefined = Boolean(options?.deserializeNullAsUndefined);\n }\n toJson(val) {\n return serialize(this.schema, val);\n }\n fromJson(val) {\n return deserialize(this.schema, this.deserializeNullAsUndefined ? pruneNullValues(val) : val);\n }\n}\nexport const usingModelSchema = (schema) => custom((value) => (value === undefined ? SKIP : serialize(schema, value)), (value) => deserialize(schema, value));\n// NOTE: we need these methods because `map()` of `serializr` tries to smartly\n// determines if it should produce object or ES6 Map but we always want ES6 Map,\n// so we would use this function\nexport const deserializeMap = (val, itemDeserializer) => {\n const result = new Map();\n Object.keys(val).forEach((key) => result.set(key, itemDeserializer(val[key])));\n return result;\n};\nexport const serializeMap = (val, itemSerializer) => {\n const result = {};\n val.forEach((v, key) => {\n result[key] = itemSerializer(v);\n });\n return result;\n};\nexport const usingConstantValueSchema = (value) => custom(() => value, () => value);\n/**\n * This is the idiomatic usage pattern for `optional(custom(...))`.\n *\n * `optional` only affects serialization so we must make sure to check\n * if the value is `undefined` or not, if yes, serialize, else, return `undefined`\n * which will be processed by `optional(...)` as `SKIP`.\n *\n * `optional` does not affect deserialization, however, as `undefined` values\n * are automatically skipped\n * See https://github.com/mobxjs/serializr/issues/73#issuecomment-535641545\n */\nexport const optionalCustom = (\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nserializer, \n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ndeserializer, additionalArgs) => custom((val) => (val ? serializer(val) : SKIP), (val) => (val ? deserializer(val) : SKIP), additionalArgs);\nexport const optionalCustomUsingModelSchema = (schema) => custom((val) => (val ? serialize(schema, val) : SKIP), (val) => (val ? deserialize(schema, val) : SKIP));\nexport const deserializeArray = (values, itemDeserializer, options) => {\n if (Array.isArray(values)) {\n return values.map(itemDeserializer);\n }\n return options?.skipIfEmpty ? SKIP : [];\n};\nexport const serializeArray = (values, itemSerializer, options) => {\n let forceReturnEmptyInTest = false;\n // NOTE: this block is meant for test, `webpack` will tree-shake it\n // so we never reach inside, else we would get error about `process is not defined` as we're\n // in browser environment\n // eslint-disable-next-line no-process-env\n if (process.env.NODE_ENV === 'test') {\n forceReturnEmptyInTest =\n Boolean(options?.INTERNAL__forceReturnEmptyInTest) &&\n // TODO: when we distribute engine-roundtrip tests to different test groups, we should\n // remove this condition and clean up test data accordingly.\n // eslint-disable-next-line no-process-env\n process.env.TEST_GROUP === 'engine-roundtrip';\n }\n if (Array.isArray(values)) {\n return values.length\n ? values.map((value) => itemSerializer(value))\n : forceReturnEmptyInTest\n ? []\n : options?.skipIfEmpty\n ? SKIP\n : [];\n }\n return forceReturnEmptyInTest ? [] : SKIP;\n};\n/**\n * This is the idiomatic usage pattern for serialization of optional list of objects.\n *\n * Notice our particular usage of `serializeArray` and `deserializeArray` that is deisnged\n * for testing and accounting for logic mismatches between servers and studio\n */\nexport const customListWithSchema = (schema, options) => custom((values) => serializeArray(values, (value) => serialize(schema, value), {\n skipIfEmpty: true,\n INTERNAL__forceReturnEmptyInTest: options?.INTERNAL__forceReturnEmptyInTest,\n}), (values) => deserializeArray(values, (value) => deserialize(schema, value), {\n skipIfEmpty: false,\n}));\nexport const customList = (serializer, deserializer, options) => custom((values) => serializeArray(values, (value) => serializer(value), {\n skipIfEmpty: true,\n INTERNAL__forceReturnEmptyInTest: options?.INTERNAL__forceReturnEmptyInTest,\n}), (values) => deserializeArray(values, (value) => deserializer(value), {\n skipIfEmpty: false,\n}));\nexport const customEquivalentList = (options) => customList((value) => value, (value) => value, options);\nexport const optionalCustomListWithSchema = (schema, options) => optionalCustom((values) => serializeArray(values, (value) => serialize(schema, value), {\n skipIfEmpty: true,\n INTERNAL__forceReturnEmptyInTest: options?.INTERNAL__forceReturnEmptyInTest,\n}), (values) => deserializeArray(values, (value) => deserialize(schema, value), {\n skipIfEmpty: false,\n}));\nexport const optionalCustomList = (serializer, deserializer, options) => optionalCustom((values) => serializeArray(values, (value) => serializer(value), {\n skipIfEmpty: true,\n INTERNAL__forceReturnEmptyInTest: options?.INTERNAL__forceReturnEmptyInTest,\n}), (values) => deserializeArray(values, (value) => deserializer(value), {\n skipIfEmpty: false,\n}));\n/**\n * NOTE: this is a workaround for `serializr` to avoid the magic extension mechanism provided\n * by `createModelSchema`, where depending on the order schemas are defined, if the schema of the\n * super class is specified first, when we serialize subclasses, we would get fields of the order\n * of fields from the super classes first, followed by fields from the subclasses, not the order\n * specified in the subclass's schema.\n *\n * See https://github.com/mobxjs/serializr/issues/179\n */\nexport const TEMPORARY__disableModelSchemaExtensionMechanism = (schema) => {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-assignment\n schema.extends = undefined;\n return schema;\n};\n//# sourceMappingURL=SerializationUtils.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { createModelSchema, custom, list, optional, primitive, } from 'serializr';\nimport { SerializationFactory } from './SerializationUtils.js';\nexport class DocumentationEntry {\n key;\n markdownText;\n title;\n text;\n url;\n related;\n static serialization = new SerializationFactory(createModelSchema(DocumentationEntry, {\n markdownText: custom((val) => val, (val) => (val.value ? val : undefined)),\n related: optional(list(primitive())),\n title: optional(primitive()),\n text: optional(primitive()),\n url: optional(primitive()),\n }));\n static create(json, documentationKey) {\n const entry = DocumentationEntry.serialization.fromJson(json);\n entry.key = documentationKey;\n return entry;\n }\n}\n//# sourceMappingURL=DocumentationUtils.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { LogEvent, uniq, guaranteeNonEmptyString, DocumentationEntry, } from '@finos/legend-shared';\nimport { APPLICATION_EVENT } from '../__lib__/LegendApplicationEvent.js';\nexport const collectKeyedDocumentationEntriesFromConfig = (rawEntries) => Object.entries(rawEntries).map((entry) => ({\n key: entry[0],\n content: DocumentationEntry.create(entry[1], entry[0]),\n}));\nexport const collectDocumentationLinkEntryFromConfig = (rawEntries) => Object.entries(rawEntries).map((entry) => ({\n key: guaranteeNonEmptyString(entry[0], \"Documentation link 'key' is missing\"),\n label: guaranteeNonEmptyString(entry[1].label, \"Documentation link 'label' is missing\"),\n url: guaranteeNonEmptyString(entry[1].url, \"Documentation link 'url' is missing\"),\n}));\nexport const collectContextualDocumentationEntries = (config) => Object.entries(config).map((entry) => ({\n context: entry[0],\n documentationKey: entry[1],\n}));\nexport class DocumentationService {\n url;\n links;\n docRegistry = new Map();\n contextualDocIndex = new Map();\n constructor(applicationStore) {\n // set the main documenation site url\n this.url = applicationStore.config.documentationUrl;\n this.links = applicationStore.config.documentationLinkEntries;\n /**\n * NOTE: the order of documentation entry overidding is (the later override the former):\n * 1. Natively specified: specified in the codebase (no overriding allowed within this group of documentation entries):\n * since we have extension mechanism, the order of plugins matter,\n * we do not allow overriding, i.e. so the first specification for a documentation key wins\n * 2. Fetched from documentation registries (no overriding allowed within this group of documentation entries):\n * since we have extension mechanism and allow specifying multiple registry URLS,\n * we do not allow overriding, i.e. so the first specification for a documentation key wins\n * 3. Configured in application config (overiding allowed within this group)\n */\n // build doc registry\n applicationStore.pluginManager\n .getApplicationPlugins()\n .flatMap((plugin) => plugin.getExtraKeyedDocumentationEntries?.() ?? [])\n .forEach((entry) => {\n // NOTE: Entries specified natively will not override each other. This is to prevent entries from extensions\n // accidentally overide entries from core.\n if (this.hasDocEntry(entry.key)) {\n applicationStore.logService.warn(LogEvent.create(APPLICATION_EVENT.DOCUMENTATION_LOAD__SKIP), entry.key);\n }\n else {\n this.docRegistry.set(entry.key, entry.content);\n }\n });\n // entries from config will override entries specified natively\n applicationStore.config.keyedDocumentationEntries.forEach((entry) => this.docRegistry.set(entry.key, entry.content));\n const contextualDocEntries = applicationStore.pluginManager\n .getApplicationPlugins()\n .flatMap((plugin) => plugin.getExtraContextualDocumentationEntries?.() ?? []);\n // verify that required documentations are available\n const missingDocumentationEntries = [];\n uniq(applicationStore.pluginManager\n .getApplicationPlugins()\n .flatMap((plugin) => plugin.getExtraRequiredDocumentationKeys?.() ?? [])\n .concat(contextualDocEntries.map((entry) => entry.documentationKey))).forEach((key) => {\n if (!this.docRegistry.has(key)) {\n missingDocumentationEntries.push(key);\n }\n });\n if (missingDocumentationEntries.length) {\n applicationStore.logService.warn(LogEvent.create(APPLICATION_EVENT.DOCUMENTATION_REQUIREMENT_CHECK__FAILURE), `Can't find corresponding documentation entry for keys:\\n${missingDocumentationEntries\n .map((key) => `- ${key}`)\n .join('\\n')}`);\n }\n // Contextual Documentation\n contextualDocEntries.forEach((entry) => {\n // NOTE: Entries specified natively will not override each other. This is to prevent entries from extensions\n // overriding entries from core.\n //\n // However, it might be useful to allow extending the list of related doc entries.\n // This allows extensions to broaden related doc entries for contextual docs\n // If we need to support this behavior, we could create a dedicated extension method\n if (this.hasContextualDocEntry(entry.context)) {\n applicationStore.logService.warn(LogEvent.create(APPLICATION_EVENT.CONTEXTUAL_DOCUMENTATION_LOAD__SKIP), entry.context);\n }\n else {\n const existingDocEntry = this.getDocEntry(entry.documentationKey);\n if (existingDocEntry) {\n this.contextualDocIndex.set(entry.context, existingDocEntry);\n }\n }\n });\n // entries from config will override entries specified natively\n applicationStore.config.contextualDocEntries.forEach((entry) => {\n const existingDocEntry = this.getDocEntry(entry.documentationKey);\n if (existingDocEntry) {\n this.contextualDocIndex.set(entry.context, existingDocEntry);\n }\n });\n }\n getDocEntry(key) {\n return this.docRegistry.get(key);\n }\n hasDocEntry(key) {\n return this.docRegistry.has(key);\n }\n getContextualDocEntry(key) {\n return this.contextualDocIndex.get(key);\n }\n hasContextualDocEntry(key) {\n return this.contextualDocIndex.has(key);\n }\n getAllDocEntries() {\n return Array.from(this.docRegistry.values());\n }\n publishDocRegistry() {\n const result = {};\n this.docRegistry.forEach((value, key) => {\n result[key] = DocumentationEntry.serialization.toJson(value);\n });\n return result;\n }\n publishContextualDocIndex() {\n const result = {};\n this.contextualDocIndex.forEach((value, key) => {\n result[key] = value.key;\n });\n return result;\n }\n}\n//# sourceMappingURL=DocumentationService.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { action, computed, makeObservable, observable } from 'mobx';\nvar ACTION_STATE;\n(function (ACTION_STATE) {\n ACTION_STATE[\"INITIAL\"] = \"INITIAL\";\n ACTION_STATE[\"IN_PROGRESS\"] = \"IN_PROGRESS\";\n ACTION_STATE[\"SUCCEEDED\"] = \"SUCEEDED\";\n ACTION_STATE[\"FAILED\"] = \"FAILED\";\n})(ACTION_STATE || (ACTION_STATE = {}));\nexport class ActionState {\n state;\n _message;\n _messageFormatter;\n constructor() {\n this.state = ACTION_STATE.INITIAL;\n }\n setMessage(val) {\n this._message = val;\n }\n setMessageFormatter(val) {\n this._messageFormatter = val;\n }\n reset() {\n this.state = ACTION_STATE.INITIAL;\n return this;\n }\n inProgress() {\n this.state = ACTION_STATE.IN_PROGRESS;\n return this;\n }\n fail() {\n this.state = ACTION_STATE.FAILED;\n return this;\n }\n pass() {\n this.state = ACTION_STATE.SUCCEEDED;\n return this;\n }\n complete(hasSucceeded = true) {\n if (hasSucceeded) {\n this.pass();\n }\n else {\n this.fail();\n }\n return this;\n }\n sync(val) {\n const data = val.exportData();\n this.state = data.state;\n this._message = data.message;\n }\n exportData() {\n return {\n state: this.state,\n message: this._message,\n };\n }\n get isInInitialState() {\n return this.state === ACTION_STATE.INITIAL;\n }\n get isInProgress() {\n return this.state === ACTION_STATE.IN_PROGRESS;\n }\n get hasFailed() {\n return this.state === ACTION_STATE.FAILED;\n }\n get hasSucceeded() {\n return this.state === ACTION_STATE.SUCCEEDED;\n }\n get message() {\n return this._message\n ? this._messageFormatter\n ? this._messageFormatter(this._message)\n : this._message\n : undefined;\n }\n /**\n * Use this if only the completion state of the action is of concern,\n * i.e. we don't care if it fails or succeeds.\n */\n get hasCompleted() {\n return this.hasFailed || this.hasSucceeded;\n }\n static create() {\n return makeObservable(new ActionState(), {\n state: observable,\n _message: observable,\n reset: action,\n inProgress: action,\n pass: action,\n fail: action,\n complete: action,\n setMessage: action,\n sync: action,\n isInInitialState: computed,\n isInProgress: computed,\n hasFailed: computed,\n hasSucceeded: computed,\n hasCompleted: computed,\n message: computed,\n });\n }\n}\n//# sourceMappingURL=ActionState.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { AbstractPlugin, } from '../application/AbstractPluginManager.js';\nexport var CORE_TRACER_TAG;\n(function (CORE_TRACER_TAG) {\n CORE_TRACER_TAG[\"USER\"] = \"user\";\n CORE_TRACER_TAG[\"ENV\"] = \"env\";\n CORE_TRACER_TAG[\"RESULT\"] = \"result\";\n CORE_TRACER_TAG[\"ERROR\"] = \"error\";\n CORE_TRACER_TAG[\"HTTP_STATUS\"] = \"status\";\n CORE_TRACER_TAG[\"HTTP_REQUEST_METHOD\"] = \"method\";\n CORE_TRACER_TAG[\"HTTP_REQUEST_URL\"] = \"url\";\n})(CORE_TRACER_TAG || (CORE_TRACER_TAG = {}));\nexport class TracerServicePlugin extends AbstractPlugin {\n install(pluginManager) {\n pluginManager.registerTracerServicePlugin(this);\n }\n}\nexport class Trace {\n traceEntries = [];\n setup(traceEntries) {\n this.traceEntries = traceEntries;\n }\n bootstrap(response) {\n this.traceEntries.forEach((entry) => {\n entry.plugin.bootstrap(entry.clientSpan, response);\n });\n }\n reportSuccess() {\n this.traceEntries.forEach((entry) => {\n entry.plugin.concludeClientSpan(entry.clientSpan, undefined);\n });\n }\n reportError(error) {\n this.traceEntries.forEach((entry) => {\n entry.plugin.concludeClientSpan(entry.clientSpan, error);\n });\n }\n}\nexport class TracerService {\n plugins = [];\n registerPlugins(plugins) {\n this.plugins = plugins;\n }\n createTrace(traceData, method, url, headers) {\n const trace = new Trace();\n if (traceData) {\n trace.setup(this.plugins.map((plugin) => {\n const clientSpan = plugin.createClientSpan(traceData, method, url, headers);\n return {\n clientSpan,\n plugin,\n };\n }));\n }\n return trace;\n }\n}\n//# sourceMappingURL=TracerService.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport Fuse, {} from 'fuse.js';\nexport const FuzzySearchEngine = Fuse;\n//# sourceMappingURL=FuzzySearch.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { action, computed, makeObservable, observable } from 'mobx';\nexport var ADVANCED_FUZZY_SEARCH_MODE;\n(function (ADVANCED_FUZZY_SEARCH_MODE) {\n ADVANCED_FUZZY_SEARCH_MODE[\"STANDARD\"] = \"standard\";\n ADVANCED_FUZZY_SEARCH_MODE[\"INCLUDE\"] = \"include match\";\n ADVANCED_FUZZY_SEARCH_MODE[\"EXACT\"] = \"exact match\";\n ADVANCED_FUZZY_SEARCH_MODE[\"INVERSE\"] = \"excludes exact match\";\n})(ADVANCED_FUZZY_SEARCH_MODE || (ADVANCED_FUZZY_SEARCH_MODE = {}));\nexport class FuzzySearchAdvancedConfigState {\n currentMode = ADVANCED_FUZZY_SEARCH_MODE.STANDARD;\n onSearchModeChange;\n constructor(onSearchModeChange) {\n makeObservable(this, {\n currentMode: observable,\n isAdvancedSearchActive: computed,\n setCurrentMode: action,\n });\n this.onSearchModeChange = onSearchModeChange;\n }\n get isAdvancedSearchActive() {\n return this.currentMode !== ADVANCED_FUZZY_SEARCH_MODE.STANDARD;\n }\n generateSearchText(val) {\n switch (this.currentMode) {\n case ADVANCED_FUZZY_SEARCH_MODE.INCLUDE: {\n return `'\"${val}\"`;\n }\n case ADVANCED_FUZZY_SEARCH_MODE.EXACT: {\n return `=\"${val}\"`;\n }\n case ADVANCED_FUZZY_SEARCH_MODE.INVERSE: {\n return `!\"${val}\"`;\n }\n default: {\n return val;\n }\n }\n }\n setCurrentMode(val) {\n this.currentMode = val;\n this.onSearchModeChange();\n }\n}\n//# sourceMappingURL=FuzzySearchAdvancedConfigState.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { action, makeObservable, observable, computed } from 'mobx';\nimport { guaranteeNonEmptyString, uuid, isNonNullable, ActionState, FuzzySearchEngine, FuzzySearchAdvancedConfigState, } from '@finos/legend-shared';\nexport var VIRTUAL_ASSISTANT_TAB;\n(function (VIRTUAL_ASSISTANT_TAB) {\n VIRTUAL_ASSISTANT_TAB[\"SEARCH\"] = \"SEARCH\";\n VIRTUAL_ASSISTANT_TAB[\"CONTEXTUAL_SUPPORT\"] = \"CONTEXTUAL_SUPPORT\";\n})(VIRTUAL_ASSISTANT_TAB || (VIRTUAL_ASSISTANT_TAB = {}));\nexport const DOCUMENTATION_SEARCH_RESULTS_LIMIT = 100;\nexport class VirtualAssistantDocumentationEntry {\n uuid = uuid();\n documentationKey;\n title;\n content;\n url;\n isOpen = false;\n constructor(docEntry) {\n makeObservable(this, {\n isOpen: observable,\n setIsOpen: action,\n });\n this.documentationKey = docEntry.key;\n this.title = guaranteeNonEmptyString(docEntry.title);\n this.content = docEntry.markdownText ?? docEntry.text;\n this.url = docEntry.url;\n }\n setIsOpen(val) {\n this.isOpen = val;\n }\n}\nexport class VirtualAssistantContextualDocumentationEntry {\n uuid = uuid();\n context;\n title;\n content;\n url;\n related;\n constructor(context, docEntry, related) {\n this.context = context;\n this.title = docEntry.title;\n this.content = docEntry.markdownText ?? docEntry.text;\n this.url = docEntry.url;\n this.related = related;\n }\n}\n/**\n * NOTE: since we're displaying the documentation entry in virtual assistant\n * we want only user-friendly docs, we will discard anything that doesn't\n * come with a title, or does not have any content/url\n */\nexport const isValidVirtualAssistantDocumentationEntry = (entry) => Boolean(entry.title && (entry.url ?? entry.text ?? entry.markdownText));\n/**\n * Check if the documentation entry should be displayed in virtual assistant,\n * i.e. it has some text content, rather just a link\n */\nexport const shouldDisplayVirtualAssistantDocumentationEntry = (entry) => isValidVirtualAssistantDocumentationEntry(entry) &&\n Boolean(entry.text ?? entry.markdownText);\nexport class AssistantService {\n applicationStore;\n /**\n * This key is used to allow programmatic re-rendering of the assistant panel\n */\n panelRenderingKey = uuid();\n isDisabled = false;\n isHidden = true; // hide by default unless specified by the application to show\n isOpen = false;\n isPanelMaximized = false;\n selectedTab = VIRTUAL_ASSISTANT_TAB.SEARCH;\n currentDocumentationEntry;\n // search text\n searchEngine;\n searchConfigurationState;\n searchState = ActionState.create();\n searchText = '';\n searchResults = [];\n showSearchConfigurationMenu = false;\n isOverSearchLimit = false;\n constructor(applicationStore) {\n makeObservable(this, {\n isDisabled: observable,\n isHidden: observable,\n isOpen: observable,\n isPanelMaximized: observable,\n panelRenderingKey: observable,\n isOverSearchLimit: observable,\n selectedTab: observable,\n searchText: observable,\n searchResults: observable,\n currentDocumentationEntry: observable,\n showSearchConfigurationMenu: observable,\n currentContextualDocumentationEntry: computed,\n setIsDisabled: action,\n setIsHidden: action,\n setIsOpen: action,\n setIsPanelMaximized: action,\n setSelectedTab: action,\n setSearchText: action,\n resetSearch: action,\n search: action,\n openDocumentationEntry: action,\n refreshPanelRendering: action,\n setShowSearchConfigurationMenu: action,\n });\n this.applicationStore = applicationStore;\n this.searchEngine = new FuzzySearchEngine(this.applicationStore.documentationService\n .getAllDocEntries()\n .filter(isValidVirtualAssistantDocumentationEntry), {\n includeScore: true,\n shouldSort: true,\n // Ignore location when computing the search score\n // See https://fusejs.io/concepts/scoring-theory.html\n ignoreLocation: true,\n // This specifies the point the search gives up\n // `0.0` means exact match where `1.0` would match anything\n // We set a relatively low threshold to filter out irrelevant results\n threshold: 0.2,\n keys: [\n {\n // NOTE: for now, we would weight title the most\n name: 'title',\n weight: 4,\n },\n {\n name: 'text',\n weight: 1,\n },\n {\n name: 'markdownText.value',\n weight: 1,\n },\n ],\n // extended search allows for exact word match through single quote\n // See https://fusejs.io/examples.html#extended-search\n useExtendedSearch: true,\n });\n this.searchConfigurationState = new FuzzySearchAdvancedConfigState(() => {\n this.search();\n });\n }\n get currentContextualDocumentationEntry() {\n if (!this.applicationStore.navigationContextService.currentContext) {\n return undefined;\n }\n const currentContext = this.applicationStore.navigationContextService.currentContext.key;\n const currentContextualDocumentationEntry = this.applicationStore.documentationService.getContextualDocEntry(currentContext);\n return currentContextualDocumentationEntry\n ? new VirtualAssistantContextualDocumentationEntry(currentContext, currentContextualDocumentationEntry, (currentContextualDocumentationEntry.related ?? [])\n .map((entry) => this.applicationStore.documentationService.getDocEntry(entry))\n .filter(isNonNullable)\n .filter(isValidVirtualAssistantDocumentationEntry)\n .map((entry) => new VirtualAssistantDocumentationEntry(entry)))\n : undefined;\n }\n openDocumentationEntry(key) {\n const entry = this.applicationStore.documentationService.getDocEntry(key);\n if (entry) {\n this.setIsOpen(true);\n this.setIsHidden(false);\n this.currentDocumentationEntry = new VirtualAssistantDocumentationEntry(entry);\n this.currentDocumentationEntry.setIsOpen(true);\n this.resetSearch();\n }\n }\n openDocumentationEntryLink(key) {\n const entry = this.applicationStore.documentationService.getDocEntry(key);\n if (entry) {\n if (shouldDisplayVirtualAssistantDocumentationEntry(entry)) {\n this.openDocumentationEntry(entry.key);\n }\n else if (entry.url) {\n this.applicationStore.navigationService.navigator.visitAddress(entry.url);\n }\n }\n }\n setIsDisabled(val) {\n this.isDisabled = val;\n }\n setIsHidden(val) {\n this.isHidden = val;\n }\n setIsPanelMaximized(val) {\n this.isPanelMaximized = val;\n }\n hideAssistant() {\n this.setIsHidden(true);\n this.setIsOpen(false);\n }\n toggleAssistant() {\n const newVal = !this.isHidden;\n if (newVal) {\n this.hideAssistant();\n }\n else {\n this.setIsHidden(false);\n }\n }\n setIsOpen(val) {\n this.isOpen = val;\n }\n setSelectedTab(val) {\n this.selectedTab = val;\n }\n refreshPanelRendering() {\n this.panelRenderingKey = uuid();\n }\n setSearchText(val) {\n this.searchText = val;\n }\n resetSearch() {\n this.searchText = '';\n this.searchResults = [];\n this.searchState.complete();\n }\n search() {\n if (!this.searchText) {\n this.searchResults = [];\n return;\n }\n this.currentDocumentationEntry = undefined;\n this.searchState.inProgress();\n this.searchResults = Array.from(this.searchEngine\n .search(this.searchConfigurationState.generateSearchText(this.searchText), {\n // NOTE: search for limit + 1 item so we can know if there are more search results\n limit: DOCUMENTATION_SEARCH_RESULTS_LIMIT + 1,\n })\n .values()).map((result) => new VirtualAssistantDocumentationEntry(result.item));\n // check if the search results exceed the limit\n if (this.searchResults.length > DOCUMENTATION_SEARCH_RESULTS_LIMIT) {\n this.isOverSearchLimit = true;\n this.searchResults = this.searchResults.slice(0, DOCUMENTATION_SEARCH_RESULTS_LIMIT);\n }\n else {\n this.isOverSearchLimit = false;\n }\n this.searchState.complete();\n }\n setShowSearchConfigurationMenu(val) {\n this.showSearchConfigurationMenu = val;\n }\n}\n//# sourceMappingURL=AssistantService.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { AbstractPlugin, } from '@finos/legend-shared';\nexport class EventNotifierPlugin extends AbstractPlugin {\n install(pluginManager) {\n pluginManager.registerEventNotifierPlugin(this);\n }\n}\nexport class EventService {\n notifierPlugins = [];\n registerEventNotifierPlugins(plugins) {\n this.notifierPlugins = plugins;\n }\n notify(event, data) {\n this.notifierPlugins.forEach((plugin) => plugin.notify(event, data));\n }\n}\n//# sourceMappingURL=EventService.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { APPLICATION_EVENT } from './LegendApplicationEvent.js';\nexport class LegendApplicationTelemetryHelper {\n static logEvent_ApplicationInitializationSucceeded(service, applicationStore) {\n service.logEvent(APPLICATION_EVENT.APPLICATION_LOAD__SUCCESS, {\n application: {\n name: applicationStore.config.appName,\n version: applicationStore.config.appVersion,\n env: applicationStore.config.env,\n },\n browser: {\n userAgent: navigator.userAgent,\n },\n screen: {\n height: window.screen.height,\n width: window.screen.width,\n },\n });\n }\n static logEvent_ApplicationContextAccessed(service, data) {\n service.logEvent(APPLICATION_EVENT.APPLICATION_CONTEXT__ACCESS, data);\n }\n static logEvent_VirtualAssistantDocumentationEntryAccessed(service, data) {\n service.logEvent(APPLICATION_EVENT.VIRTUAL_ASSISTANT_DOCUMENTATION_ENTRY__ACCESS, data);\n }\n static logEvent_ApplicationUsageInterrupted(service) {\n service.logEvent(APPLICATION_EVENT.APPLICATION_USAGE__INTERRUPT, {});\n }\n}\n//# sourceMappingURL=LegendApplicationTelemetry.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { IllegalStateError } from '@finos/legend-shared';\nimport { action, computed, makeObservable, observable } from 'mobx';\nimport { LegendApplicationTelemetryHelper } from '../__lib__/LegendApplicationTelemetry.js';\n/**\n * Context data refers to the area of the application that the user is\n * currently navigating.\n *\n * NOTE: note that this is navigation-driven, do not associate places\n * which present in the app screen that is not a direct consequence\n * of user's navigation. e.g. the status bar is not a good area to\n * be considered a context, the editor screen is because it means\n * the user must have navigated to the editor screen from somewhere,\n * for instance, the setup page.\n */\nexport class ApplicationNavigationContextData {\n key;\n /**\n * There are 2 types of context data: `standard` and `transient`\n * 1. standard context data represents an application context layer that\n * would be pushed to the stack and the context will be popped as we leave\n * the application, in other words, the context will be properly cleaned up\n * e.g. when we go in an editor, we will push context data to the stack and\n * pop it when we leave that editor\n * 2. transient context does not guarantee to be cleaned up properly, this\n * corresponds to application areas whose presense is transient and not stable:\n * such as those triggered by on-flight events, whose exit-state is hard to capture\n * e.g. user focuses on an input\n *\n * NOTE: transient context must not be mistakened as event, even in the example of\n * user focusing on an input, that's an area of the application that we might want\n * to get record of in terms of context. Events like a notification pop up, failure\n * of some long-running processes are not considered application contexts\n */\n isTransient = false;\n constructor(key, isTransient) {\n this.key = key;\n this.isTransient = isTransient;\n }\n static create(key) {\n return new ApplicationNavigationContextData(key, false);\n }\n static createTransient(key) {\n return new ApplicationNavigationContextData(key, true);\n }\n}\nexport class ApplicationNavigationContextService {\n applicationStore;\n contextStack = [];\n constructor(applicationStore) {\n makeObservable(this, {\n contextStack: observable,\n currentContext: computed,\n push: action,\n pop: action,\n });\n this.applicationStore = applicationStore;\n }\n get currentContext() {\n return this.contextStack.length\n ? this.contextStack[this.contextStack.length - 1]\n : undefined;\n }\n /**\n * Add the context to the stack.\n *\n * If the context is already if the context is already part of the stack\n * we will throw an error. This is to make sure we context is unique in the stack\n * and we do proper context stack cleanups on navigation.\n */\n push(context) {\n // first, filter out all transient contexts, so we can be sure that\n // all of the remaining contexts are standard and they should be cleaned up properly\n // this makes our duplication meaningful\n const newContextStack = this.contextStack.filter((ctx) => !ctx.isTransient);\n if (newContextStack.find((ctx) => ctx.key === context.key)) {\n throw new IllegalStateError(`Found multiple context '${context.key}' in application navigation context stack`);\n }\n newContextStack.push(context);\n // log the context being accessed if it's in the list of interested context keys\n if (this.applicationStore.pluginManager\n .getApplicationPlugins()\n .flatMap((plugin) => plugin.getExtraAccessEventLoggingApplicationContextKeys?.() ?? [])\n .includes(context.key)) {\n LegendApplicationTelemetryHelper.logEvent_ApplicationContextAccessed(this.applicationStore.telemetryService, {\n key: context.key,\n });\n }\n this.contextStack = newContextStack;\n }\n /**\n * Remove the context from the stack.\n *\n * NOTE: we will check from bottom of the stack up, for the specified context,\n * if it's found in the context stack, we will pop until the specified context.\n * This is to allow popping deeper context layers from very high up in the application\n * context stack, e.g. removing a context of an element editor when leaving the editor\n * to go to setup page.\n */\n pop(context) {\n const existingCtx = this.contextStack.find((ctx) => ctx.key === context.key);\n if (!existingCtx) {\n return;\n }\n // NOTE: since we should not have any duplicated contexts\n // it's safe to search from bottom to top of the stack\n const idx = this.contextStack.indexOf(existingCtx);\n if (idx !== -1) {\n this.contextStack = this.contextStack\n .slice(0, idx)\n // remove all transient contexts\n .filter((ctx) => !ctx.isTransient);\n }\n }\n}\n//# sourceMappingURL=ApplicationNavigationContextService.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { LogEvent } from '@finos/legend-shared';\nimport { action, makeObservable, observable } from 'mobx';\nimport { APPLICATION_EVENT } from '../__lib__/LegendApplicationEvent.js';\nexport const collectKeyedCommandConfigEntriesFromConfig = (rawEntries) => Object.entries(rawEntries).map((entry) => ({\n key: entry[0],\n content: entry[1],\n}));\nexport class CommandService {\n applicationStore;\n commandRegistry = new Map();\n constructor(applicationStore) {\n makeObservable(this, {\n commandRegistry: observable,\n registerCommand: action,\n deregisterCommand: action,\n });\n this.applicationStore = applicationStore;\n }\n registerCommand(command) {\n const commandKey = command.key;\n if (this.commandRegistry.has(commandKey)) {\n this.applicationStore.logService.warn(LogEvent.create(APPLICATION_EVENT.COMMAND_CENTER_REGISTRATION__FAILURE), `Can't register command: command '${commandKey}' is already registered`);\n return;\n }\n this.commandRegistry.set(commandKey, command);\n }\n deregisterCommand(commandKey) {\n this.commandRegistry.delete(commandKey);\n }\n runCommand(commandKey, args) {\n const command = this.commandRegistry.get(commandKey);\n if (command && (!command.trigger || command.trigger())) {\n command.action?.(args);\n return true;\n }\n return false;\n }\n}\n//# sourceMappingURL=CommandService.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { isNonNullable } from '@finos/legend-shared';\nimport { action, makeObservable, observable } from 'mobx';\nexport class KeyboardShortcutsService {\n applicationStore;\n /**\n * NOTE: with this design, the relationship between command and key is many-to-many\n * We can have multiple commands being mapped to the same key combination, and vice versa\n */\n keyMap = new Map();\n commandKeyMap = new Map();\n isHotkeysBlocked = false;\n constructor(applicationStore) {\n makeObservable(this, {\n keyMap: observable,\n commandKeyMap: observable,\n isHotkeysBlocked: observable,\n addHotkey: action,\n blockGlobalHotkeys: action,\n unblockGlobalHotkeys: action,\n });\n this.applicationStore = applicationStore;\n this.applicationStore.pluginManager\n .getApplicationPlugins()\n .flatMap((plugin) => plugin.getExtraKeyedCommandConfigEntries?.() ?? [])\n .forEach((entry) => {\n // NOTE: since we allow mapping multiple commands to the same key combination\n // and when dispatching the command with a particular key combination, we only\n // execute the first matching command, if we override the config, we would need\n // to add them to the beginning of this list.\n // TODO: do validation on hot keys, hot keys which consist only of modifier keys, e.g. `Shift Shift` should not be supported\n const shortcuts = [\n entry.content.defaultKeyboardShortcut,\n ...(entry.content.additionalKeyboardShortcuts ?? []),\n ].filter(isNonNullable);\n if (shortcuts.length) {\n shortcuts.forEach((shortcut) => this.addHotkey(entry.key, shortcut));\n }\n else {\n if (!this.commandKeyMap.has(entry.key)) {\n this.commandKeyMap.set(entry.key, []);\n }\n }\n });\n }\n blockGlobalHotkeys() {\n this.isHotkeysBlocked = true;\n }\n unblockGlobalHotkeys() {\n this.isHotkeysBlocked = false;\n }\n addHotkey(commandKey, keyCombination) {\n // add shortcut to command key map\n this.commandKeyMap.set(commandKey, [\n ...(this.commandKeyMap.get(commandKey) ?? []),\n keyCombination,\n ]);\n // add new key map\n this.keyMap.set(keyCombination, [\n ...(this.keyMap.get(keyCombination) ?? []).filter((key) => key !== commandKey),\n commandKey,\n ]);\n }\n dispatch(keyCombination) {\n if (this.isHotkeysBlocked) {\n return;\n }\n const mappedCommandKeys = this.keyMap.get(keyCombination) ?? [];\n for (const commandKey of mappedCommandKeys) {\n // find the first command that works then escape\n if (this.applicationStore.commandService.runCommand(commandKey)) {\n return;\n }\n }\n }\n}\n//# sourceMappingURL=KeyboardShortcutsService.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport const DEFAULT_TAB_SIZE = 2;\nexport const DEFAULT_MONOSPACED_FONT_FAMILY = 'Roboto Mono';\nexport const DEFAULT_DATE_TIME_FORMAT = \"yyyy-MM-dd'T'HH:mm:ss\";\nexport const DEFAULT_TYPEAHEAD_SEARCH_MINIMUM_SEARCH_LENGTH = 2;\nexport const DEFAULT_TYPEAHEAD_SEARCH_LIMIT = 10;\n//# sourceMappingURL=ApplicationConfig.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { action, makeObservable, observable } from 'mobx';\n// NOTE: using Unicode for ANSI escape\n// See https://stackoverflow.com/questions/26153308/best-ansi-escape-beginning\n// See https://gist.github.com/fnky/458719343aabd01cfb17a3a4f7296797\nexport var DISPLAY_ANSI_ESCAPE;\n(function (DISPLAY_ANSI_ESCAPE) {\n DISPLAY_ANSI_ESCAPE[\"RESET\"] = \"\\u001B[0m\";\n // text decoration\n DISPLAY_ANSI_ESCAPE[\"BOLD\"] = \"\\u001B[1m\";\n DISPLAY_ANSI_ESCAPE[\"DIM\"] = \"\\u001B[2m\";\n DISPLAY_ANSI_ESCAPE[\"ITALIC\"] = \"\\u001B[3m\";\n DISPLAY_ANSI_ESCAPE[\"UNDERLINE\"] = \"\\u001B[4m\";\n DISPLAY_ANSI_ESCAPE[\"BLINKING\"] = \"\\u001B[5m\";\n DISPLAY_ANSI_ESCAPE[\"STRIKETHROUGH\"] = \"\\u001B[9m\";\n // foreground\n DISPLAY_ANSI_ESCAPE[\"BLACK\"] = \"\\u001B[30m\";\n DISPLAY_ANSI_ESCAPE[\"RED\"] = \"\\u001B[31m\";\n DISPLAY_ANSI_ESCAPE[\"GREEN\"] = \"\\u001B[32m\";\n DISPLAY_ANSI_ESCAPE[\"YELLOW\"] = \"\\u001B[33m\";\n DISPLAY_ANSI_ESCAPE[\"BLUE\"] = \"\\u001B[34m\";\n DISPLAY_ANSI_ESCAPE[\"MAGENTA\"] = \"\\u001B[35m\";\n DISPLAY_ANSI_ESCAPE[\"CYAN\"] = \"\\u001B[36m\";\n DISPLAY_ANSI_ESCAPE[\"WHITE\"] = \"\\u001B[37m\";\n DISPLAY_ANSI_ESCAPE[\"BRIGHT_BLACK\"] = \"\\u001B[1;30m\";\n DISPLAY_ANSI_ESCAPE[\"BRIGHT_RED\"] = \"\\u001B[1;31m\";\n DISPLAY_ANSI_ESCAPE[\"BRIGHT_GREEN\"] = \"\\u001B[1;32m\";\n DISPLAY_ANSI_ESCAPE[\"BRIGHT_YELLOW\"] = \"\\u001B[1;33m\";\n DISPLAY_ANSI_ESCAPE[\"BRIGHT_BLUE\"] = \"\\u001B[1;34m\";\n DISPLAY_ANSI_ESCAPE[\"BRIGHT_MAGENTA\"] = \"\\u001B[1;35m\";\n DISPLAY_ANSI_ESCAPE[\"BRIGHT_CYAN\"] = \"\\u001B[1;36m\";\n DISPLAY_ANSI_ESCAPE[\"BRIGHT_WHITE\"] = \"\\u001B[1;37m\";\n DISPLAY_ANSI_ESCAPE[\"DIMMED_BLACK\"] = \"\\u001B[2;30m\";\n DISPLAY_ANSI_ESCAPE[\"DIMMED_RED\"] = \"\\u001B[2;31m\";\n DISPLAY_ANSI_ESCAPE[\"DIMMED_GREEN\"] = \"\\u001B[2;32m\";\n DISPLAY_ANSI_ESCAPE[\"DIMMED_YELLOW\"] = \"\\u001B[2;33m\";\n DISPLAY_ANSI_ESCAPE[\"DIMMED_BLUE\"] = \"\\u001B[2;34m\";\n DISPLAY_ANSI_ESCAPE[\"DIMMED_MAGENTA\"] = \"\\u001B[2;35m\";\n DISPLAY_ANSI_ESCAPE[\"DIMMED_CYAN\"] = \"\\u001B[2;36m\";\n DISPLAY_ANSI_ESCAPE[\"DIMMED_WHITE\"] = \"\\u001B[2;37m\";\n // background\n DISPLAY_ANSI_ESCAPE[\"BLACK_BG\"] = \"\\u001B[40m\";\n DISPLAY_ANSI_ESCAPE[\"RED_BG\"] = \"\\u001B[41m\";\n DISPLAY_ANSI_ESCAPE[\"GREEN_BG\"] = \"\\u001B[42m\";\n DISPLAY_ANSI_ESCAPE[\"YELLOW_BG\"] = \"\\u001B[43m\";\n DISPLAY_ANSI_ESCAPE[\"BLUE_BG\"] = \"\\u001B[44m\";\n DISPLAY_ANSI_ESCAPE[\"MAGENTA_BG\"] = \"\\u001B[45m\";\n DISPLAY_ANSI_ESCAPE[\"CYAN_BG\"] = \"\\u001B[46m\";\n DISPLAY_ANSI_ESCAPE[\"WHITE_BG\"] = \"\\u001B[47m\";\n DISPLAY_ANSI_ESCAPE[\"BRIGHT_BLACK_BG\"] = \"\\u001B[1;40m\";\n DISPLAY_ANSI_ESCAPE[\"BRIGHT_RED_BG\"] = \"\\u001B[1;41m\";\n DISPLAY_ANSI_ESCAPE[\"BRIGHT_GREEN_BG\"] = \"\\u001B[1;42m\";\n DISPLAY_ANSI_ESCAPE[\"BRIGHT_YELLOW_BG\"] = \"\\u001B[1;43m\";\n DISPLAY_ANSI_ESCAPE[\"BRIGHT_BLUE_BG\"] = \"\\u001B[1;44m\";\n DISPLAY_ANSI_ESCAPE[\"BRIGHT_MAGENTA_BG\"] = \"\\u001B[1;45m\";\n DISPLAY_ANSI_ESCAPE[\"BRIGHT_CYAN_BG\"] = \"\\u001B[1;46m\";\n DISPLAY_ANSI_ESCAPE[\"BRIGHT_WHITE_BG\"] = \"\\u001B[1;47m\";\n DISPLAY_ANSI_ESCAPE[\"DIMMED_BLACK_BG\"] = \"\\u001B[2;40m\";\n DISPLAY_ANSI_ESCAPE[\"DIMMED_RED_BG\"] = \"\\u001B[2;41m\";\n DISPLAY_ANSI_ESCAPE[\"DIMMED_GREEN_BG\"] = \"\\u001B[2;42m\";\n DISPLAY_ANSI_ESCAPE[\"DIMMED_YELLOW_BG\"] = \"\\u001B[2;43m\";\n DISPLAY_ANSI_ESCAPE[\"DIMMED_BLUE_BG\"] = \"\\u001B[2;44m\";\n DISPLAY_ANSI_ESCAPE[\"DIMMED_MAGENTA_BG\"] = \"\\u001B[2;45m\";\n DISPLAY_ANSI_ESCAPE[\"DIMMED_CYAN_BG\"] = \"\\u001B[2;46m\";\n DISPLAY_ANSI_ESCAPE[\"DIMMED_WHITE_BG\"] = \"\\u001B[2;47m\";\n})(DISPLAY_ANSI_ESCAPE || (DISPLAY_ANSI_ESCAPE = {}));\n/**\n * NOTE: this is the line and the column of the viewport of the terminal;\n * Also, line and column start from 1\n */\nexport const ANSI_moveCursor = (line, column) => `\\x1b[${line};${column}H`;\nexport const ANSI_moveCursorUp = (val, start) => start ? `\\x1b[${val}F` : `\\x1b[${val}A`;\nexport const ANSI_moveCursorDown = (val, start) => start ? `\\x1b[${val}E` : `\\x1b[${val}B`;\nexport const ANSI_moveCursorRight = (val) => `\\x1b[${val}C`;\nexport const ANSI_moveCursorLeft = (val) => `\\x1b[${val}D`;\nexport const ANSI_moveCursorToColumn = (val) => `\\x1b[${val}G`;\nclass ConsoleSearchConfiguration {\n searchInput;\n searchText = '';\n useRegex = false;\n matchWholeWord = false;\n matchCaseSensitive = false;\n resultCount;\n currentResultIndex;\n constructor() {\n makeObservable(this, {\n searchText: observable,\n useRegex: observable,\n matchWholeWord: observable,\n matchCaseSensitive: observable,\n resultCount: observable,\n currentResultIndex: observable,\n });\n }\n setSearchInput(el) {\n this.searchInput = el;\n }\n focus() {\n this.searchInput?.focus();\n }\n}\nexport class Console {\n applicationStore;\n searchConfig = new ConsoleSearchConfiguration();\n constructor(applicationStore) {\n makeObservable(this, {\n setSearchText: action,\n setSearchRegex: action,\n setSearchWholeWord: action,\n setSearchCaseSensitive: action,\n setSearchResultCount: action,\n setSearchCurrentResultIndex: action,\n });\n this.applicationStore = applicationStore;\n }\n setSearchText(val) {\n this.searchConfig.searchText = val;\n }\n setSearchRegex(val) {\n this.searchConfig.useRegex = val;\n }\n setSearchWholeWord(val) {\n this.searchConfig.matchWholeWord = val;\n }\n setSearchCaseSensitive(val) {\n this.searchConfig.matchCaseSensitive = val;\n }\n setSearchResultCount(val) {\n this.searchConfig.resultCount = val;\n }\n setSearchCurrentResultIndex(val) {\n this.searchConfig.currentResultIndex = val;\n }\n}\nexport class OutputConsole extends Console {\n}\nexport class Terminal extends Console {\n preserveLog = false;\n commandRegistry = new Map();\n constructor(applicationStore) {\n super(applicationStore);\n makeObservable(this, {\n preserveLog: observable,\n setPreserveLog: action,\n });\n }\n setPreserveLog(val) {\n this.preserveLog = val;\n }\n showHelp() {\n // do nothing\n }\n showCommonANSIEscapeSequences() {\n // do nothing\n }\n}\n//# sourceMappingURL=Terminal.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { stringify as losslessStringify, parse as losslessParse, isSafeNumber as lossIsSafeNumber, } from 'lossless-json';\nimport CSVParser, {} from 'papaparse';\nimport { assertNonNullable } from '../error/AssertionUtils.js';\nexport const capitalize = (value) => value.length >= 1\n ? `${value[0].toUpperCase()}${value.substring(1, value.length)}`\n : value;\nexport const toSentenceCase = (value) => (value ?? '').trim().replace(/^(?:\\w+)\\b/u, (val) => capitalize(val));\nexport const TITLE_CASE_EXCEPTION_WORDS = [\n // We roughly follow AP style for simplicity\n // See https://en.wikipedia.org/wiki/Title_case\n 'a',\n 'an',\n 'the',\n 'but',\n 'by',\n 'nor',\n 'and',\n 'or',\n 'so',\n 'as',\n 'yet',\n 'for',\n 'in',\n 'nor',\n 'of',\n 'on',\n 'at',\n 'out',\n 'to',\n 'up',\n];\nexport const toTitleCase = (value) => (value ?? '')\n .trim()\n .replace(/\\b(?:\\w+)\\b/gu, (val) => {\n // lowercase minor words (typically articles, short prepositions, and some conjunctions)\n if (TITLE_CASE_EXCEPTION_WORDS.includes(val.toLowerCase())) {\n return val.toLowerCase();\n }\n return capitalize(val);\n})\n // always capitalize first and last word\n .replace(/^(?:\\w+)\\b/u, (val) => capitalize(val))\n .replace(/\\b(?:\\w+)$/u, (val) => capitalize(val));\nexport const prettyCONSTName = (value) => {\n if (!value) {\n return '';\n }\n // This handles our constant naming convention, e.g. SOME_VALUE, __PRIVATE_VALUE__, etc.\n if (value.trim().match(/^[A-Z_]+$/)) {\n return toTitleCase(value.trim().replace(/_+/gu, ' ').toLowerCase());\n }\n return (capitalize(value.trim())\n // NOTE: here we must use capturing group as we also need to capture the breakpoint/separator as chunks\n .split(/(?<chunk>[A-Z][a-z]+|[0-9]+)/)\n .map((chunk) => chunk.toUpperCase() === chunk\n ? chunk\n : chunk.charAt(0).toUpperCase() + chunk.slice(1).toLowerCase())\n .filter(Boolean)\n .join(' ')\n .replace(/_+/gu, ' ')\n .replace(/\\s+/gu, ' '));\n};\nexport const tryToFormatJSONString = (value, tabSize = 2) => {\n try {\n return JSON.stringify(JSON.parse(value), undefined, tabSize);\n }\n catch {\n return value;\n }\n};\nexport const tryToMinifyJSONString = (value) => {\n try {\n return JSON.stringify(JSON.parse(value));\n }\n catch {\n return value.replace(/\\n\\s*/g, '');\n }\n};\n/**\n * NOTE: this splits a string value into an array of strings by using a\n * delimiter of a comma if the string is only one line. However, if the\n * string has multiple lines, the delimiter will not be applied. This is so\n * that for an example input of multiple lines like\n * One, Comma in One\n * Two\n * Three\n * will still equal 3 elements (['One, Comma in One', 'Two', 'Three']) rather than 4\n */\nexport const parseCSVString = (value) => {\n let parseData;\n if (value.includes('\\n')) {\n parseData = value.trim().split(/\\r?\\n|\\r|\\n/g);\n return parseData;\n }\n else {\n const parseResult = CSVParser.parse(value.trim(), {\n delimiter: ',',\n });\n parseData = parseResult.data.flat();\n if (parseResult.errors.length) {\n // if (\n // parseResult.errors[0] &&\n // parseResult.errors[0].code === 'UndetectableDelimiter' &&\n // parseResult.errors[0].type === 'Delimiter' &&\n // parseResult.data.length === 1\n // ) {\n // // NOTE: this happens when the user only put one item in the value input\n // // we can go the other way by ensure the input has a comma but this is arguably neater\n // // as it tinkers with the parser\n // } else {\n // // there were some parsing error, escape\n // // NOTE: ideally, we could show a warning here\n // }\n return undefined;\n }\n else {\n return parseData;\n }\n }\n};\nexport const parseCSVFile = (file, config) => CSVParser.parse(file, config);\nexport const csvStringify = (value, config) => CSVParser.unparse(value, config);\n/**\n * One very common use case is that we get the JSON as response from the server than we will convert this to a string and persist\n * in the protocol. As such, we have to make sure this string is safe in PURE grammar format, i.e. it will escape single quotes\n * properly since PURE strings are wrapped in a pair of single quotes. The following pair of escape/unescape method does the simple job of\n * converting a JSON string to/from PURE grammar string\n *\n * NOTE: this is slightly different than escaping/unescaping JS string or normal JSON string, this is conversion is actually simplier since\n * the escaping is naturally handling by string conversion in Javascript, we just need to have special handling for the escaping of single-quotes\n * See https://stackoverflow.com/questions/3020094/how-should-i-escape-strings-in-json\n * See https://github.com/joliss/js-string-escape/blob/master/index.js\n */\nexport const fromGrammarString = (value) => value.replace(/\\\\'/gu, \"'\");\nexport const toGrammarString = (value) => value.replace(/'/gu, \"\\\\'\");\n/**\n * These are the sets of methods that helps with lossless conversion of JSON to/from text.\n *\n * The implementation of `JSON.parse` and `JSON.stringify` in Javascript is not lossless, e.g. values like 1.0 (a double) is automatically converted to 1 (an integer).\n * This pairs of method will convert the JSON losslessly. One caveat is that numeric values are stored as LosslessNumber, a data type which stores the numeric value as a string.\n *\n * NOTE: One can perform regular operations with a LosslessNumber, and it will throw an error when this would result in losing information.\n * But use this with discretion since it it does not result in the same object as `JSON.parse`\n */\nexport { losslessParse as parseLosslessJSON };\nexport { lossIsSafeNumber as isLossSafeNumber };\nexport const stringifyLosslessJSON = (val, replacer, space) => {\n const result = losslessStringify(val, replacer, space);\n assertNonNullable(result, `Can't stringify lossless JSON value`);\n return result;\n};\nexport const tryToFormatLosslessJSONString = (value, tabSize = 2) => {\n try {\n return stringifyLosslessJSON(losslessParse(value), undefined, tabSize);\n }\n catch {\n return value;\n }\n};\nexport const tryToMinifyLosslessJSONString = (value) => {\n try {\n return tryToFormatLosslessJSONString(value, 0);\n }\n catch {\n return value.replace(/\\n\\s*/g, '');\n }\n};\nexport const indent = (value, indentText) => value\n .split('\\n')\n .map((line) => `${indentText}${line}`)\n .join('\\n');\nexport const quantify = (value, label, pluralForm) => value <= 0\n ? `no ${pluralForm ?? `${label}s`}`\n : value > 1\n ? `${value} ${pluralForm ?? `${label}s`}`\n : `1 ${label}`;\nexport const quantifyList = (val, label, pluralForm) => quantify(val.length, label, pluralForm);\n//# sourceMappingURL=FormatterUtils.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { uniqBy } from '../CommonUtils.js';\nimport { guaranteeNonNullable } from '../error/AssertionUtils.js';\n/**\n * List of keyboard named key\n * See https://www.w3.org/TR/uievents-key/#named-key-attribute-values\n * See https://developer.mozilla.org/en-US/docs/Web/API/UI_Events/Keyboard_event_key_values\n */\nexport var KEYBOARD_NAMED_KEY;\n(function (KEYBOARD_NAMED_KEY) {\n KEYBOARD_NAMED_KEY[\"TAB\"] = \"Tab\";\n KEYBOARD_NAMED_KEY[\"CAPSLOCK\"] = \"CapsLock\";\n KEYBOARD_NAMED_KEY[\"SHIFT\"] = \"Shift\";\n KEYBOARD_NAMED_KEY[\"META\"] = \"Meta\";\n KEYBOARD_NAMED_KEY[\"ALT\"] = \"Alt\";\n KEYBOARD_NAMED_KEY[\"CONTROL\"] = \"Control\";\n KEYBOARD_NAMED_KEY[\"SPACE\"] = \"Space\";\n KEYBOARD_NAMED_KEY[\"ESC\"] = \"Escape\";\n KEYBOARD_NAMED_KEY[\"LEFT\"] = \"ArrowLeft\";\n KEYBOARD_NAMED_KEY[\"RIGHT\"] = \"ArrowRight\";\n KEYBOARD_NAMED_KEY[\"UP\"] = \"ArrowUp\";\n KEYBOARD_NAMED_KEY[\"DOWN\"] = \"ArrowDown\";\n KEYBOARD_NAMED_KEY[\"ENTER\"] = \"Enter\";\n KEYBOARD_NAMED_KEY[\"DELETE\"] = \"Delete\";\n KEYBOARD_NAMED_KEY[\"BACKSPACE\"] = \"Backspace\";\n KEYBOARD_NAMED_KEY[\"BACKQUOTE\"] = \"Backquote\";\n})(KEYBOARD_NAMED_KEY || (KEYBOARD_NAMED_KEY = {}));\n/**\n * Parses key bindings and pack them into parts\n *\n * grammar = `<sequence>`\n * <sequence> = `<press> <press> <press> ...`\n * <press> = `<key>` or `<mods>+<key>`\n * <mods> = `<mod>+<mod>+...`\n */\nexport function parseKeybinding(value) {\n return value\n .trim()\n .split(' ')\n .map((press) => {\n const modifiers = press.split(/\\b\\+/);\n const key = guaranteeNonNullable(modifiers.pop(), `Can't parse key binding: last part must be a non-modifier key`);\n return { modifiers, key };\n });\n}\n/**\n * Checks if a series of keypress events matches a key binding sequence either partially or exactly.\n */\nexport const isMatchingKeyPressData = (event, keyPressData) => \n// NOTE: we allow specifying with `event.code` only\n// - key: value of the key pressed by the user, taking into consideration the state of modifier keys\n// such as `Shift` as well as the keyboard locale and layout. This is not desirable, because\n// for matching, we have to do uppercase comparison, in Mac, if we presss Alt+B for example, we will\n// get symbols\n// - code: represents a physical key on the keyboard (as opposed to the character generated by pressing the key);\n// i.e. this property returns a value that isn't altered by keyboard layout or the state of the modifier keys\n// See https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key\n// See https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/code\nkeyPressData.key === event.code &&\n // ensure all the modifiers in the keybinding are pressed\n keyPressData.modifiers.every((modifier) => event.getModifierState(modifier)) &&\n // modifier keys (Shift, Control, etc.) change the meaning of a keybinding,\n // so if they are pressed but aren't part of the current keypress sequence, it's not a match.\n ![\n KEYBOARD_NAMED_KEY.SHIFT,\n KEYBOARD_NAMED_KEY.META,\n KEYBOARD_NAMED_KEY.ALT,\n KEYBOARD_NAMED_KEY.CONTROL,\n ].find((modifier) => \n // check if the current key pressed is one of the modifier keys\n keyPressData.key !== modifier &&\n event.getModifierState(modifier) &&\n // check if the modifier key pressed is part of the key combination\n !keyPressData.modifiers.includes(modifier));\nexport const isMatchingKeyCombination = (event, keyCombination) => isMatchingKeyPressData(event, guaranteeNonNullable(parseKeybinding(keyCombination)[0]));\n/**\n * Create event listener for keyboard event (recommended to be used with `keydown/keyup` event)\n *\n * This succinct logic is adapted from `tinykeys`\n * See https://github.com/jamiebuilds/tinykeys\n */\nexport function createKeybindingsHandler(config) {\n // this holds the possible hotkey matches for the current sequence of keyboard events\n const possibleMatches = new Map();\n // NOTE: this timer is used to time the duration between key presses to determine when to\n // cancel the sequence, we set the default timeout to be 1000, as short timeout\n // can be slightly too fast for users\n let timer = null;\n const DEFAULT_TIMEOUT_DURATION = 1000;\n return (event) => {\n // Ensure and stop any event that isn't an keyboard event.\n // e.g. auto-complete option navigation and selection could fire an event\n if (!(event instanceof KeyboardEvent)) {\n return;\n }\n // NOTE: create a flat collection of key combination to handler, make sure\n // for each combination, only the first matching entry is considered,\n // i.e. explicitly here, we don't handle multiple handling\n // See https://github.com/finos/legend-studio/issues/1969\n uniqBy(Object.values(config)\n .flatMap((entry) => entry.combinations.map((combination) => ({\n combination,\n handler: entry.handler,\n })))\n .filter((entry) => entry.combination.length), (val) => val.combination)\n // here, we go through each hotkey combination, and:\n // 1. parse the key combination\n // 2. if the key combination is already part of the possible matches,\n // retrieve the current match result: this result is the list of the\n // keypresses left to complete the combination, else, we just add the\n // new combination and proceed the same way\n .forEach((entry) => {\n const keyCombination = entry.combination;\n const parsedKeyCombination = parseKeybinding(entry.combination);\n // abort when we encounter an empty key combination\n if (!parsedKeyCombination.length) {\n return;\n }\n const remainingExpectedKeyPresses = possibleMatches.get(keyCombination) ?? parsedKeyCombination;\n // this should never be empty, as it becomes empty, it must mean:\n // 1. either the key combination has been matched before and not cleared\n // 2. the key combination is empty, which should not be possible due to the guard above\n const currentExpectedKeyPress = guaranteeNonNullable(remainingExpectedKeyPresses[0]);\n const matches = isMatchingKeyPressData(event, currentExpectedKeyPress);\n if (!matches) {\n // if the current key pressed is a modifier key\n // we don't consider this as a non-match yet\n // NOTE: here we use `event.key` instead of `event.code` since for `Shift` key,\n // the key is always `Shift` where the key code can be `ShiftLeft`\n if (!event.getModifierState(event.key)) {\n possibleMatches.delete(keyCombination);\n }\n }\n else if (remainingExpectedKeyPresses.length > 1) {\n // matches found, not all keypresses of the key combination have been fulfilled, remove\n // the matched keypress part of the combination (if it's in the list of possible matches)\n possibleMatches.set(keyCombination, remainingExpectedKeyPresses.slice(1));\n }\n else {\n // matches found, all keypresses of the combination have been fulfilled, call the handler\n possibleMatches.delete(keyCombination);\n entry.handler(keyCombination, event);\n }\n });\n if (timer) {\n clearTimeout(timer);\n }\n timer = setTimeout(possibleMatches.clear.bind(possibleMatches), DEFAULT_TIMEOUT_DURATION);\n };\n}\n//# sourceMappingURL=KeyBinding.js.map","import { jsx as _jsx } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { createTheme, ThemeProvider } from '@mui/material';\nimport { StyledEngineProvider } from '@mui/material/styles';\nimport { LocalizationProvider } from '@mui/x-date-pickers';\nimport { AdapterDateFns } from '@mui/x-date-pickers/AdapterDateFnsV3/index.js';\nconst LegendCustomMUITheme = (enableTransitions, customFonts) => createTheme({\n ...(!!enableTransitions\n ? {}\n : {\n transitions: {\n // disable all transition\n // NOTE: this is a catch-all way to remove all transitions\n // We technically don't need this because we can configure transition props for each component\n create: () => 'none',\n },\n }),\n ...(customFonts === undefined\n ? {}\n : {\n typography: {\n fontFamily: customFonts,\n },\n }),\n components: {\n MuiButtonBase: {\n defaultProps: {\n disableRipple: true,\n },\n },\n },\n breakpoints: {\n values: {\n xs: 0,\n sm: 600,\n md: 900,\n lg: 1200,\n xl: 1536,\n xxl: 1800,\n xxxl: 2300,\n xxxxl: 2800,\n },\n },\n});\nexport const LegendStyleProvider = (props) => {\n const { children, enableTransitions, customFonts } = props;\n return (\n // Make sure CSS for MUI generated by `emotion` are injected before our styling code\n // this ensures our styling code can override MUI styles\n // See https://mui.com/guides/interoperability/#css-injection-order-3\n _jsx(StyledEngineProvider, { injectFirst: true, children: _jsx(ThemeProvider, { theme: LegendCustomMUITheme(enableTransitions, customFonts), children: _jsx(LocalizationProvider, { dateAdapter: AdapterDateFns, children: children }) }) }));\n};\n//# sourceMappingURL=LegendStyleProvider.js.map","import { jsx as _jsx } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { clsx } from 'clsx';\nexport const generateSimpleDIVComponent = (componentName, divClassName) => {\n const component = (props) => {\n const { children, className } = props;\n return (_jsx(\"div\", { className: clsx(divClassName, className), \"data-testid\": props['data-testid'], children: children }));\n };\n component.displayName = componentName;\n return component;\n};\n//# sourceMappingURL=ComponentCreatorUtils.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { prettyCONSTName, toTitleCase } from '@finos/legend-shared';\nimport { clsx } from 'clsx';\nimport { generateSimpleDIVComponent } from '../utils/ComponentCreatorUtils.js';\nexport const Modal = (props) => {\n const { children, darkMode, className } = props;\n return (_jsx(\"div\", { className: clsx('modal', { 'modal--dark': darkMode }, className), children: children }));\n};\nexport const ModalTitle = (props) => {\n const { title, icon, className } = props;\n return (_jsxs(\"div\", { className: clsx('modal__title', className), children: [icon && _jsx(\"div\", { className: \"modal__title__icon\", children: icon }), _jsx(\"div\", { className: \"modal__title__label\", children: toTitleCase(title) })] }));\n};\nexport const ModalHeader = (props) => {\n const { title, children, className } = props;\n if (!children && title) {\n return (_jsx(\"div\", { className: clsx('modal__header', className), children: _jsx(ModalTitle, { title: title }) }));\n }\n return _jsx(\"div\", { className: clsx('modal__header', className), children: children });\n};\nexport const ModalHeaderActions = generateSimpleDIVComponent('ModalHeaderActions', 'modal__header__actions');\nexport const ModalBody = generateSimpleDIVComponent('ModalBody', 'modal__body');\nexport const ModalFooter = generateSimpleDIVComponent('ModalFooter', 'modal__footer');\nexport const ModalFooterStatus = generateSimpleDIVComponent('ModalFooterStatus', 'modal__footer__status');\nexport const ModalFooterButton = (props) => {\n const { onClick, inProgressText, text, title, children, disabled, className, darkMode, formatText, type, preventFormSubmit, } = props;\n const isDarkMode = darkMode ?? true;\n const isFormatText = formatText ?? true;\n const isSecondary = type === 'secondary';\n const isPreventFormSubmit = preventFormSubmit ?? false;\n return (_jsxs(\"button\", { className: clsx('btn', 'modal__footer__btn', {\n 'btn--dark': isDarkMode,\n 'btn--light': !isDarkMode,\n 'modal__footer__btn--primary': !isSecondary,\n 'modal__footer__btn--secondary': isSecondary,\n }, className), title: title, onClick: onClick, disabled: Boolean(inProgressText) || disabled, type: isPreventFormSubmit ? 'button' : undefined, children: [inProgressText\n ? prettyCONSTName(inProgressText)\n : isFormatText\n ? prettyCONSTName(text)\n : text, children] }));\n};\n//# sourceMappingURL=Modal.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { action, makeObservable, observable } from 'mobx';\nexport var ActionAlertType;\n(function (ActionAlertType) {\n ActionAlertType[\"STANDARD\"] = \"STANDARD\";\n ActionAlertType[\"CAUTION\"] = \"CAUTION\";\n ActionAlertType[\"ERROR\"] = \"ERROR\";\n})(ActionAlertType || (ActionAlertType = {}));\nexport var ActionAlertActionType;\n(function (ActionAlertActionType) {\n ActionAlertActionType[\"STANDARD\"] = \"STANDARD\";\n ActionAlertActionType[\"PROCEED_WITH_CAUTION\"] = \"PROCEED_WITH_CAUTION\";\n ActionAlertActionType[\"PROCEED\"] = \"PROCEED\";\n})(ActionAlertActionType || (ActionAlertActionType = {}));\nexport class AlertService {\n applicationStore;\n blockingAlertInfo;\n actionAlertInfo;\n constructor(applicationStore) {\n makeObservable(this, {\n blockingAlertInfo: observable,\n actionAlertInfo: observable,\n setBlockingAlert: action,\n setActionAlertInfo: action,\n });\n this.applicationStore = applicationStore;\n }\n setBlockingAlert(alertInfo) {\n if (alertInfo) {\n this.applicationStore.keyboardShortcutsService.blockGlobalHotkeys();\n }\n else {\n this.applicationStore.keyboardShortcutsService.unblockGlobalHotkeys();\n }\n this.blockingAlertInfo = alertInfo;\n }\n setActionAlertInfo(alertInfo) {\n if (this.actionAlertInfo && alertInfo) {\n this.applicationStore.notificationService.notifyIllegalState('Action alert is stacked: new alert is invoked while another one is being displayed');\n }\n if (alertInfo) {\n this.applicationStore.keyboardShortcutsService.blockGlobalHotkeys();\n }\n else {\n this.applicationStore.keyboardShortcutsService.unblockGlobalHotkeys();\n }\n this.actionAlertInfo = alertInfo;\n }\n}\n//# sourceMappingURL=AlertService.js.map","import { jsx as _jsx } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { createContext, useContext } from 'react';\nimport { useLocalObservable } from 'mobx-react-lite';\nimport { guaranteeNonNullable } from '@finos/legend-shared';\nconst ApplicationStoreContext = createContext(undefined);\nexport const useApplicationStore = () => guaranteeNonNullable(useContext(ApplicationStoreContext), `Can't find application store in context`);\nexport const ApplicationStoreProvider = (props) => {\n const { children, store } = props;\n const applicationStore = useLocalObservable(() => store);\n return (_jsx(ApplicationStoreContext.Provider, { value: applicationStore, children: children }));\n};\n//# sourceMappingURL=ApplicationStoreProvider.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { Dialog, ModalBody, ModalFooter, ModalHeader } from '@finos/legend-art';\nimport { ActionAlertActionType, ActionAlertType, } from '../stores/AlertService.js';\nimport { observer } from 'mobx-react-lite';\nimport { noop } from '@finos/legend-shared';\nimport { useApplicationStore } from './ApplicationStoreProvider.js';\nconst getActionButtonClassName = (type) => {\n switch (type) {\n case ActionAlertActionType.PROCEED_WITH_CAUTION:\n return 'btn--caution';\n case ActionAlertActionType.PROCEED:\n case ActionAlertActionType.STANDARD:\n default:\n return 'btn--dark';\n }\n};\nconst ActionAlertContent = observer((props) => {\n const { info } = props;\n const applicationStore = useApplicationStore();\n const { title, message, prompt, type, onClose, onEnter, actions } = info;\n const handleClose = () => {\n onClose?.();\n applicationStore.alertService.setActionAlertInfo(undefined);\n };\n const handleEnter = () => onEnter?.();\n const handleSubmit = () => {\n actions.find((action) => action.default)?.handler?.();\n handleClose();\n };\n return (_jsx(Dialog, { open: Boolean(applicationStore.alertService.actionAlertInfo), onClose: noop, slotProps: {\n transition: { onEnter: handleEnter },\n }, children: _jsxs(\"form\", { onSubmit: (event) => {\n event.preventDefault();\n handleSubmit();\n }, className: `modal search-modal modal--dark blocking-alert blocking-alert--${(type ?? ActionAlertType.STANDARD).toLowerCase()}`, children: [title && _jsx(ModalHeader, { title: title }), _jsxs(ModalBody, { children: [_jsx(\"div\", { className: \"blocking-alert__summary-text\", children: message }), _jsx(\"div\", { className: \"blocking-alert__prompt-text\", children: prompt })] }), _jsxs(ModalFooter, { children: [actions.map((action, idx) => {\n // NOTE: need to prevent default for the submit button, otherwise, we would get the warning \"Form submission canceled because the form is not connected\"\n // See https://stackoverflow.com/a/58234405\n const handler = (e) => {\n e.preventDefault();\n action.handler?.();\n handleClose();\n };\n return (_jsx(\"button\", { type: action.default ? 'submit' : 'button', className: `btn btn--dark ${getActionButtonClassName(action.type ?? ActionAlertActionType.STANDARD)}`, onClick: handler, autoFocus: Boolean(action.default), children: action.label }, idx));\n }), !actions.length && (_jsx(\"button\", { type: \"button\" // prevent this toggler being activated on form submission\n , className: \"btn btn--dark blocking-alert__action--standard\", onClick: handleClose, children: \"Cancel\" }))] })] }) }));\n});\nexport const ActionAlert = observer(() => {\n const applicationStore = useApplicationStore();\n const actionAlertInfo = applicationStore.alertService.actionAlertInfo;\n if (!actionAlertInfo) {\n return null;\n }\n return _jsx(ActionAlertContent, { info: actionAlertInfo });\n});\n//# sourceMappingURL=ActionAlert.js.map","import { jsx as _jsx } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { useEffect, useRef } from 'react';\nimport { clsx } from '../utils/ComponentUtils.js';\nexport const PanelLoadingIndicator = (props) => {\n const { isLoading, className } = props;\n const ref = useRef(null);\n useEffect(() => {\n if (ref.current) {\n if (isLoading) {\n ref.current.parentElement?.classList.add('panel-loading-indicator__container');\n }\n else {\n ref.current.parentElement?.classList.remove('panel-loading-indicator__container');\n }\n }\n }, [isLoading]);\n return (_jsx(\"div\", { ref: ref, className: clsx(className, `panel-loading-indicator${isLoading ? '' : '--disabled'}`) }));\n};\n//# sourceMappingURL=PanelLoadingIndicator.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { observer } from 'mobx-react-lite';\nimport { PanelLoadingIndicator, Dialog, Modal, ModalBody, } from '@finos/legend-art';\nimport { noop } from '@finos/legend-shared';\nimport { useApplicationStore } from './ApplicationStoreProvider.js';\n/**\n * The users of this need to justify their use case because blocking app disrupts the UX flow.\n * Of course there are legitimate use cases but please consult the team when you do so.\n * See https://material.io/components/dialogs#usage\n */\nexport const BlockingAlert = observer(() => {\n const applicationStore = useApplicationStore();\n const info = applicationStore.alertService.blockingAlertInfo;\n if (!info) {\n return null;\n }\n return (_jsx(Dialog, { open: Boolean(info), onClose: noop, classes: {\n root: 'blocking-alert__root-container',\n container: 'blocking-alert__container',\n }, children: _jsxs(Modal, { darkMode: !applicationStore.layoutService.TEMPORARY__isLightColorThemeEnabled, className: \"blocking-alert\", children: [_jsx(PanelLoadingIndicator, { isLoading: Boolean(info.showLoading) }), _jsxs(ModalBody, { children: [_jsx(\"div\", { className: \"blocking-alert__message\", children: info.message }), info.prompt && (_jsx(\"div\", { className: \"blocking-alert__message__prompt\", children: info.prompt }))] })] }) }));\n});\n//# sourceMappingURL=BlockingAlert.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//======================================================= TB =======================================================\nimport { TbAlertCircle, TbArrowsExchange, TbArrowsJoin2, TbArrowsSplit2, TbBook, TbBrandSnowflake, TbBriefcase, TbBuildingBank, TbBuildingCommunity, TbCalculator, TbCalendarStats, TbCalendarTime, TbCash, TbChartCandle, TbCircleOff, TbClockEdit, TbCreditCard, TbCurrencyDollar, TbDatabase, TbDatabaseImport, TbFileAnalytics, TbFileInvoice, TbFileUnknown, TbGavel, TbGraph, TbHeartbeat, TbHierarchy, TbHierarchy3, TbMapPin2, TbMathFunction, TbReceipt, TbReport, TbShieldCheck, TbSql, TbStopwatch, TbTimeline, TbTrees, TbUser, TbUsersGroup, TbWindElectricity, TbWorld, } from 'react-icons/tb';\nexport const ArrowsJoinIcon = TbArrowsJoin2;\nexport const ArrowsSplitIcon = TbArrowsSplit2;\nexport const FunctionIcon = TbMathFunction;\nexport const RepoIcon = TbBook;\nexport const OffIcon = TbCircleOff;\nexport const CalendarClockIcon = TbCalendarTime;\nexport const LastModifiedIcon = TbClockEdit;\nexport const SQLIcon = TbSql;\nexport const Snowflake_BrandIcon = TbBrandSnowflake;\nexport const DatabaseImportIcon = TbDatabaseImport;\nexport const FileUnknownIcon = TbFileUnknown;\nexport const Database = TbDatabase;\n//======================================================= TI =======================================================\nimport { TiDocument, TiWorldOutline } from 'react-icons/ti';\nexport const DocumentIcon = TiDocument;\nexport const WorldOutlineIcon = TiWorldOutline;\n//======================================================= MD =======================================================\nimport { MdManageSearch, MdModeEdit, MdTextFields, MdMoreVert, MdMoreHoriz, MdWrapText, MdSaveAs, MdSave, MdSend, MdVerticalAlignBottom, MdRefresh, MdFunctions, MdCompareArrows, MdPlaylistAddCheck, MdAdd, // to be reviewed\nMdEdit, // to be reviewed\nMdExpandMore, MdSubject, MdViewHeadline, MdAssistant, MdSettingsEthernet, MdLink, MdWindow, MdReviews, MdCalculate, MdRocketLaunch, MdOutlineDataset, MdVerified, MdQueryStats, MdFilterCenterFocus, MdOutlineDescription, MdQuestionAnswer, MdUnfoldLess, MdUnfoldMore, MdKeyboardDoubleArrowLeft, //to be reviewed\nMdKeyboardDoubleArrowRight, //to be reviewed\nMdOutlinePushPin, MdOutlineShoppingCart, MdOutlineHelpOutline, MdError, MdOutlineGroupWork, MdOutlineTune, MdOpenInNew, MdOutlineAnalytics, MdOutlineDashboard, MdInsights, MdTrendingUp, MdOutlineSmartToy, MdAutoAwesome, MdOutlinePsychology, MdOutlineLibraryBooks, MdOutlineExplore, MdOutlineAccountTree, MdGroup, MdOutlineSettingsSuggest, MdLightMode, } from 'react-icons/md';\nexport const ManageSearchIcon = MdManageSearch; // to be reviewed\nexport const PencilIcon = MdModeEdit;\nexport const StringTypeIcon = MdTextFields;\nexport const MoreVerticalIcon = MdMoreVert;\nexport const MoreHorizontalIcon = MdMoreHoriz;\nexport const WrapTextIcon = MdWrapText;\nexport const SaveAsIcon = MdSaveAs;\nexport const SaveCurrIcon = MdSave;\nexport const SendIcon = MdSend;\nexport const VerticalAlignBottomIcon = MdVerticalAlignBottom;\nexport const RefreshIcon = MdRefresh;\nexport const SigmaIcon = MdFunctions;\nexport const CompareIcon = MdCompareArrows;\nexport const CheckListIcon = MdPlaylistAddCheck;\nexport const AddIcon = MdAdd; // to be reviewed\nexport const EditIcon = MdEdit; // to be reviewed\nexport const SubjectIcon = MdSubject;\nexport const ViewHeadlineIcon = MdViewHeadline;\nexport const AssistantIcon = MdAssistant;\nexport const SettingsEthernetIcon = MdSettingsEthernet;\nexport const LinkIcon = MdLink;\nexport const WindowIcon = MdWindow;\nexport const ReviewIcon = MdReviews;\nexport const CalculateIcon = MdCalculate;\nexport const LaunchIcon = MdRocketLaunch;\nexport const DatasetIcon = MdOutlineDataset;\nexport const VerifiedIcon = MdVerified;\nexport const QueryIcon = MdQueryStats;\nexport const CenterFocusIcon = MdFilterCenterFocus;\nexport const DescriptionIcon = MdOutlineDescription;\nexport const QuestionAnswerIcon = MdQuestionAnswer;\nexport const FoldIcon = MdUnfoldLess;\nexport const UnfoldIcon = MdUnfoldMore;\nexport const DoubleArrowLeft = MdKeyboardDoubleArrowLeft; //to be reviewed\nexport const DoubleArrowRight = MdKeyboardDoubleArrowRight; //to be reviewed\nexport const PushPinIcon = MdOutlinePushPin;\nexport const ShoppingCartOutlineIcon = MdOutlineShoppingCart;\nexport const HelpOutlineIcon = MdOutlineHelpOutline;\nexport const ExpandMoreIcon = MdExpandMore;\nexport const ErrorWarnIcon = MdError;\nexport const GroupWorkIcon = MdOutlineGroupWork;\nexport const TuneIcon = MdOutlineTune;\nexport const OpenNewTabIcon = MdOpenInNew;\nexport const AnalyticsIcon = MdOutlineAnalytics;\nexport const DashboardIcon = MdOutlineDashboard;\nexport const InsightsIcon = MdInsights;\nexport const TrendingUpIcon = MdTrendingUp;\nexport const RobotOutlineIcon = MdOutlineSmartToy;\nexport const SparkleStarsIcon = MdAutoAwesome;\nexport const PsychologyIcon = MdOutlinePsychology;\nexport const LibraryBooksIcon = MdOutlineLibraryBooks;\nexport const CompassIcon = MdOutlineExplore;\nexport const AccountTreeIcon = MdOutlineAccountTree;\nexport const CollaborationIcon = MdGroup;\nexport const GearSuggestIcon = MdOutlineSettingsSuggest;\n//======================================================= VSC =======================================================\nimport { VscDebug, VscError, VscWarning, VscWordWrap, VscGoToFile, VscClose, VscRunAll, VscRunErrors, VscOpenPreview, VscDiff, VscRegex, VscVersions, VscCaseSensitive, VscWholeWord, VscReferences, VscWand, VscCollapseAll, VscExpandAll, VscJson, VscTable, } from 'react-icons/vsc';\nexport const DebugIcon = VscDebug;\nexport const ErrorIcon = VscError;\nexport const WarningIcon = VscWarning;\nexport const WordWrapIcon = VscWordWrap;\nexport const GoToFileIcon = VscGoToFile;\nexport const CloseIcon = VscClose;\nexport const RunAllIcon = VscRunAll;\nexport const RunErrorsIcon = VscRunErrors;\nexport const OpenPreviewIcon = VscOpenPreview;\nexport const DiffIcon = VscDiff;\nexport const RegexIcon = VscRegex;\nexport const VersionsIcon = VscVersions;\nexport const CaseSensitiveIcon = VscCaseSensitive;\nexport const WholeWordMatchIcon = VscWholeWord;\nexport const ReferencesIcon = VscReferences;\nexport const WandIcon = VscWand;\nexport const CollapseTreeIcon = VscCollapseAll;\nexport const ExpandTreeIcon = VscExpandAll;\nexport const SerializeIcon = VscJson;\nexport const TableIcon = VscTable;\n//======================================================= BS =======================================================\nimport { BsAlignBottom, BsAlignCenter, BsAlignEnd, BsAlignMiddle, BsAlignStart, BsAlignTop, BsBoxArrowUpRight, BsBoxSeam, BsChevronDown, BsChevronLeft, BsChevronRight, BsChevronUp, BsDatabaseFillCheck, BsDatabaseFillLock, BsDistributeHorizontal, BsDistributeVertical, BsFillFileEarmarkSpreadsheetFill, BsFillTriangleFill, BsGripVertical, BsHeadset, BsInfoCircle, BsQuestionCircle, BsQuestionSquare, BsQuestionSquareFill, BsTextLeft, } from 'react-icons/bs';\nexport const AlignBottomIcon = BsAlignBottom;\nexport const AlignCenterIcon = BsAlignCenter;\nexport const AlignEndIcon = BsAlignEnd;\nexport const AlignMiddleIcon = BsAlignMiddle;\nexport const AlignStartIcon = BsAlignStart;\nexport const AlignTopIcon = BsAlignTop;\nexport const BoxArrowUpRightIcon = BsBoxArrowUpRight;\nexport const BundleIcon = BsBoxSeam;\nexport const DataAccessIcon = BsDatabaseFillLock;\nexport const DataReadyIcon = BsDatabaseFillCheck;\nexport const DistributeHorizontalIcon = BsDistributeHorizontal;\nexport const DistributeVerticalIcon = BsDistributeVertical;\nexport const FilledTriangleIcon = BsFillTriangleFill;\nexport const HeadsetIcon = BsHeadset;\nexport const InfoCircleOutlineIcon = BsInfoCircle;\nexport const GenericTextFileIcon = BsTextLeft;\nexport const QuestionCircleOutlineIcon = BsQuestionCircle;\nexport const QuestionSquareFillIcon = BsQuestionSquareFill;\nexport const QuestionSquareIcon = BsQuestionSquare;\nexport const TabulatedDataFileIcon = BsFillFileEarmarkSpreadsheetFill;\nexport const ThinChevronDownIcon = BsChevronDown;\nexport const ThinChevronLeftIcon = BsChevronLeft;\nexport const ThinChevronRightIcon = BsChevronRight;\nexport const ThinChevronUpIcon = BsChevronUp;\nexport const ThinVerticalDragHandleIcon = BsGripVertical;\n//======================================================= HI =======================================================\nimport { HiCode, HiHome, HiOutlineDocumentReport } from 'react-icons/hi';\nexport const ReportIcon = HiOutlineDocumentReport;\nexport const CodeIcon = HiCode;\nexport const HomeIcon = HiHome;\n//======================================================= io5 =======================================================\nimport { IoOpenOutline, IoResize, IoFileTrayFullOutline, IoMenuOutline, IoBeaker, IoFlaskSharp, IoSyncCircleSharp, IoStatsChart, IoHelpBuoy, IoCloudDownloadOutline, IoCloudUploadOutline, IoHelp, IoSunnyOutline, IoMoon, } from 'react-icons/io5';\nexport const OpenIcon = IoOpenOutline;\nexport const ResizeIcon = IoResize;\nexport const FileTrayIcon = IoFileTrayFullOutline;\nexport const MenuIcon = IoMenuOutline;\nexport const BeakerIcon = IoBeaker;\nexport const FlaskIcon = IoFlaskSharp;\nexport const AvailabilityIcon = IoSyncCircleSharp;\nexport const StatisticsIcon = IoStatsChart;\nexport const SupportIcon = IoHelpBuoy;\nexport const CloudDownloadIcon = IoCloudDownloadOutline;\nexport const CloudUploadIcon = IoCloudUploadOutline;\nexport const QuestionThinIcon = IoHelp;\nexport const SunIcon = IoSunnyOutline;\nexport const SunFilledIcon = MdLightMode;\nexport const MoonIcon = IoMoon;\n//======================================================= PI =======================================================\nimport { PiFunctionBold } from 'react-icons/pi';\nexport const PiFunctionBoldIcon = PiFunctionBold;\n//======================================================= FA =======================================================\nimport { FaArchive, FaArrowAltCircleDown, FaArrowAltCircleLeft, FaArrowAltCircleRight, FaArrowAltCircleUp, FaArrowCircleRight, FaArrowDown, FaArrowLeft, FaArrowRight, FaArrowsAltH, FaArrowUp, FaAsterisk, FaBan, FaBolt, FaBookOpen, FaBrain, FaBuffer, FaBug, FaBuilding, FaBusinessTime, FaCalculator, FaCaretDown, FaCaretLeft, FaCaretRight, FaCaretUp, FaCheck, FaCheckCircle, FaCheckSquare, FaCircle, FaCircleNotch, FaClock, FaCodeBranch, FaCog, FaCommentDots, FaCompress, FaCrosshairs, FaCube, FaDatabase, FaDev, FaDollarSign, FaDownload, FaEdit, FaEnvelope, FaExclamationCircle, FaExclamationTriangle, FaExpand, FaExpandArrowsAlt, FaExternalLinkAlt, FaExternalLinkSquareAlt, FaEye, FaEyeSlash, FaFile, FaFileAlt, FaFileCode, FaFileCsv, FaFileImport, FaFilter, FaFire, FaFolder, FaFolderOpen, FaFolderPlus, FaGhost, FaGripVertical, FaHammer, FaHashtag, FaHatWizard, FaHistory, FaInfoCircle, FaKey, FaLayerGroup, FaLevelDownAlt, FaLightbulb, FaList, FaLock, FaLongArrowAltDown, FaLongArrowAltRight, FaLongArrowAltUp, FaMap, FaMapMarkerAlt, FaMask, FaMeteor, FaMinusCircle, FaMinusSquare, FaPauseCircle, FaPiedPiperSquare, FaPlay, FaPlus, FaPuzzlePiece, FaQuestion, FaQuestionCircle, FaReadme, FaRedo, FaRegBell, FaRegCalendarAlt, FaRegChartBar, FaRegCircle, FaRegClock, FaRegCopy, FaRegEnvelope, FaRegKeyboard, FaRegLaughWink, FaRegLightbulb, FaRegSadTear, FaRegSquare, FaRegStopCircle, FaRegUserCircle, FaRegWindowMaximize, FaRegWindowRestore, FaRobot, FaRocket, FaRegCalendar, FaSave, FaSearch, FaServer, FaShapes, FaShare, FaShieldAlt, FaShoppingCart, FaSitemap, FaSkull, FaSort, FaSortAlphaDown, FaSortAlphaDownAlt, FaSquare, FaStar, FaTag, FaTags, FaTerminal, FaTimes, FaTimesCircle, FaToggleOff, FaToggleOn, FaTrash, FaTruckLoading, FaUndo, FaUpload, FaUser, FaUserFriends, FaUserSecret, FaWindowMaximize, FaWrench, FaPython, FaStackOverflow, FaGitlab, FaCopy, } from 'react-icons/fa';\nexport const ArchiveIcon = FaArchive;\nexport const ArrowCircleDownIcon = FaArrowAltCircleDown;\nexport const ArrowCircleLeftIcon = FaArrowAltCircleLeft;\nexport const ArrowCircleRightIcon = FaArrowAltCircleRight;\nexport const ArrowCircleUpIcon = FaArrowAltCircleUp;\nexport const ArrowDownIcon = FaArrowDown;\nexport const ArrowLeftIcon = FaArrowLeft;\nexport const ArrowRightIcon = FaArrowRight;\nexport const ArrowsAltHIcon = FaArrowsAltH; // to be reviewed/combined\nexport const ArrowUpIcon = FaArrowUp;\nexport const AsteriskIcon = FaAsterisk;\nexport const BanIcon = FaBan;\nexport const BellIcon = FaRegBell;\nexport const BoltIcon = FaBolt;\nexport const BrainIcon = FaBrain;\nexport const BufferIcon = FaBuffer; // to be reviewed, moved to LegendIcon\nexport const BugIcon = FaBug;\nexport const BuildingIcon = FaBuilding;\nexport const BusinessTimeIcon = FaBusinessTime; // to be reviewed/combined\nexport const CalculatorIcon = FaCalculator;\nexport const CalendarIcon = FaRegCalendarAlt;\nexport const SimpleCalendarIcon = FaRegCalendar;\nexport const CaretDownIcon = FaCaretDown;\nexport const CaretLeftIcon = FaCaretLeft;\nexport const CaretRightIcon = FaCaretRight;\nexport const CaretUpIcon = FaCaretUp;\nexport const ChartIcon = FaRegChartBar;\nexport const ChatIcon = FaCommentDots;\nexport const CheckCircleIcon = FaCheckCircle;\nexport const CheckIcon = FaCheck;\nexport const CheckSquareIcon = FaCheckSquare;\nexport const CircleIcon = FaCircle;\nexport const CircleNotchIcon = FaCircleNotch;\nexport const ClockIcon = FaClock;\nexport const CloseEyeIcon = FaEyeSlash;\nexport const CodeBranchIcon = FaCodeBranch;\nexport const CogIcon = FaCog;\nexport const CompressIcon = FaCompress;\nexport const CopyIcon = FaRegCopy;\nexport const CrosshairsIcon = FaCrosshairs;\nexport const CsvIcon = FaFileCsv;\nexport const CubeIcon = FaCube;\nexport const DatabaseIcon = FaDatabase;\nexport const DocumentationIcon = FaBookOpen;\nexport const DollarIcon = FaDollarSign;\nexport const DownloadIcon = FaDownload;\nexport const EmptyCircleIcon = FaRegCircle;\nexport const EmptyClockIcon = FaRegClock;\nexport const EmptyLightBulbIcon = FaRegLightbulb;\nexport const EmptySquareIcon = FaRegSquare;\nexport const EmptyStopCircleIcon = FaRegStopCircle;\nexport const EmptyWindowRestoreIcon = FaRegWindowRestore;\nexport const EnvelopeIcon = FaEnvelope;\nexport const EnvelopeOutlineIcon = FaRegEnvelope;\nexport const ExclamationCircleIcon = FaExclamationCircle;\nexport const ExclamationTriangleIcon = FaExclamationTriangle;\nexport const ExpandAllIcon = FaExpandArrowsAlt;\nexport const ExpandIcon = FaExpand;\nexport const ExternalLinkIcon = FaExternalLinkAlt;\nexport const ExternalLinkSquareIcon = FaExternalLinkSquareAlt;\nexport const EyeIcon = FaEye;\nexport const FaceLaughWinkIcon = FaRegLaughWink;\nexport const FaceSadTearIcon = FaRegSadTear;\nexport const FileAltIcon = FaFileAlt; // to be reviewed/combined\nexport const FileCodeIcon = FaFileCode;\nexport const FileIcon = FaFile;\nexport const FileImportIcon = FaFileImport;\nexport const FilledWindowMaximizeIcon = FaWindowMaximize; // to be reviewed/combined\nexport const FilterIcon = FaFilter;\nexport const FireIcon = FaFire;\nexport const FolderIcon = FaFolder;\nexport const FolderOpenIcon = FaFolderOpen;\nexport const GhostIcon = FaGhost;\nexport const HackerIcon = FaUserSecret;\nexport const HammerIcon = FaHammer;\nexport const HashtagIcon = FaHashtag;\nexport const HistoryIcon = FaHistory;\nexport const InfoCircleIcon = FaInfoCircle;\nexport const KeyboardIcon = FaRegKeyboard;\nexport const KeyIcon = FaKey;\nexport const LayerGroupIcon = FaLayerGroup;\nexport const LevelDownIcon = FaLevelDownAlt; // to be reviewed/combined\nexport const LightBulbIcon = FaLightbulb;\nexport const ListIcon = FaList;\nexport const LockIcon = FaLock;\nexport const LongArrowAltDownIcon = FaLongArrowAltDown; // to be reviewed/combined\nexport const LongArrowAltUpIcon = FaLongArrowAltUp; // to be reviewed/combined\nexport const LongArrowRightIcon = FaLongArrowAltRight;\nexport const MapIcon = FaMap;\nexport const MapMarkerIcon = FaMapMarkerAlt;\nexport const MaskIcon = FaMask;\nexport const MeteorIcon = FaMeteor; // to be reviewed/combined\nexport const MinusCircleIcon = FaMinusCircle;\nexport const MinusSquareIcon = FaMinusSquare;\nexport const NewFolderIcon = FaFolderPlus;\nexport const PauseCircleIcon = FaPauseCircle;\nexport const PencilEditIcon = FaEdit; // to be reviewed/combined\nexport const PiedPiperSquareIcon = FaPiedPiperSquare; // to be reviewed/combined\nexport const PlayIcon = FaPlay;\nexport const DevIcon = FaDev;\nexport const PlusIcon = FaPlus;\nexport const PuzzlePieceIcon = FaPuzzlePiece; // to be reviewed/combined\nexport const QuestionCircleIcon = FaQuestionCircle;\nexport const QuestionIcon = FaQuestion;\nexport const ReadMeIcon = FaReadme;\nexport const RedoIcon = FaRedo;\nexport const RobotIcon = FaRobot;\nexport const RocketIcon = FaRocket;\nexport const SaveIcon = FaSave;\nexport const SearchIcon = FaSearch;\nexport const ServerIcon = FaServer;\nexport const ShapesIcon = FaShapes;\nexport const ShareIcon = FaShare;\nexport const ShieldIcon = FaShieldAlt;\nexport const ShoppingCartIcon = FaShoppingCart;\nexport const SitemapIcon = FaSitemap; // to be reviewed, moved to LegendIcon\nexport const SkullIcon = FaSkull;\nexport const SortDownAltIcon = FaSortAlphaDownAlt;\nexport const SortDownIcon = FaSortAlphaDown;\nexport const SortIcon = FaSort;\nexport const SquareIcon = FaSquare;\nexport const StarIcon = FaStar;\nexport const StickArrowCircleRightIcon = FaArrowCircleRight;\nexport const TagIcon = FaTag;\nexport const TagsIcon = FaTags;\nexport const TerminalIcon = FaTerminal;\nexport const TimesCircleIcon = FaTimesCircle;\nexport const TimesIcon = FaTimes;\nexport const ToggleIcon = FaToggleOn;\nexport const ToggleOffIcon = FaToggleOff;\nexport const TrashIcon = FaTrash;\nexport const TruckLoadingIcon = FaTruckLoading;\nexport const UndoIcon = FaUndo;\nexport const UploadIcon = FaUpload;\nexport const UserCircleIcon = FaRegUserCircle;\nexport const UserIcon = FaUser;\nexport const UsersIcon = FaUserFriends;\nexport const VerticalDragHandleIcon = FaGripVertical;\nexport const WindowMaximizeIcon = FaRegWindowMaximize; // to be reviewed/combined\nexport const WizardHatIcon = FaHatWizard;\nexport const WrenchIcon = FaWrench;\nexport const PythonIcon = FaPython;\nexport const StackOverflowIcon = FaStackOverflow;\nexport const GitlabIcon = FaGitlab;\nexport const CopyFilledIcon = FaCopy;\n//======================================================= fa6 ======================================================\nimport { FaArrowUpFromBracket, FaChartColumn } from 'react-icons/fa6';\nexport const ArrowUpFromBracketIcon = FaArrowUpFromBracket;\nexport const PowerBiIcon = FaChartColumn;\n//======================================================= GI =======================================================\nimport { GiWaterDrop, GiBeard, GiSunglasses, GiHouseKeys, } from 'react-icons/gi';\nexport const WaterDropIcon = GiWaterDrop;\nexport const BeardIcon = GiBeard;\nexport const SunglassesIcon = GiSunglasses;\nexport const HouseKeys = GiHouseKeys;\n//======================================================= GO =======================================================\nimport { GoChevronDown, GoChevronUp, GoChevronLeft, GoChevronRight, GoFileBinary, GoGitPullRequest, GoGitMerge, GoSync, GoGitBranch, GoX, GoPlug, } from 'react-icons/go';\nexport const ChevronDownIcon = GoChevronDown;\nexport const ChevronUpIcon = GoChevronUp;\nexport const ChevronLeftIcon = GoChevronLeft;\nexport const ChevronRightIcon = GoChevronRight;\nexport const BinaryTypeIcon = GoFileBinary;\nexport const GitPullRequestIcon = GoGitPullRequest;\nexport const GitMergeIcon = GoGitMerge;\nexport const SyncIcon = GoSync;\nexport const GitBranchIcon = GoGitBranch;\nexport const XIcon = GoX;\nexport const PluginIcon = GoPlug;\n//======================================================= SI =======================================================\nimport { SiSwagger, SiJupyter, SiSinglestore } from 'react-icons/si';\nexport const SwaggerIcon = SiSwagger; // to be reviewed\nexport const JupyterIcon = SiJupyter;\nexport const SinglestoreIcon = SiSinglestore;\n//======================================================= BI =======================================================\nimport { BiShapeTriangle, BiAtom, BiCabinet, BiLike, BiDislike, } from 'react-icons/bi';\nexport const ShapeTriangleIcon = BiShapeTriangle;\nexport const AtomIcon = BiAtom;\nexport const CabinetIcon = BiCabinet;\nexport const LikeIcon = BiLike;\nexport const DislikeIcon = BiDislike;\n//======================================================= CG =======================================================\nimport { CgOptions } from 'react-icons/cg';\nexport const OptionsIcon = CgOptions;\n//======================================================= FI =======================================================\nimport { FiPackage, FiMinus, FiMousePointer, FiMove, FiPlusCircle, FiSidebar, FiTriangle, FiZoomIn, FiZoomOut, FiGitMerge, FiLink, } from 'react-icons/fi';\nexport const PackageIcon = FiPackage;\nexport const MinusIcon = FiMinus;\nexport const MousePointerIcon = FiMousePointer;\nexport const MoveIcon = FiMove;\nexport const PlusCircleIcon = FiPlusCircle;\nexport const SidebarIcon = FiSidebar;\nexport const TriangleIcon = FiTriangle;\nexport const ZoomInIcon = FiZoomIn;\nexport const ZoomOutIcon = FiZoomOut;\nexport const TruncatedGitMergeIcon = FiGitMerge; // to be reviewed/combined\nexport const AnchorLinkIcon = FiLink;\n//======================================================= RI =======================================================\nimport { RiShapeLine, RiShareBoxFill, RiTestTubeFill, RiRobotFill, RiGovernmentFill, RiMoneyDollarCircleFill, } from 'react-icons/ri';\nexport const ShareBoxIcon = RiShareBoxFill;\nexport const ShapeLineIcon = RiShapeLine;\nexport const TestTubeIcon = RiTestTubeFill;\nexport const DroidIcon = RiRobotFill;\nexport const GovernanceIcon = RiGovernmentFill;\nexport const CostCircleIcon = RiMoneyDollarCircleFill;\n//======================================================= FC =======================================================\nimport { FcWorkflow } from 'react-icons/fc';\nexport const WorkflowIcon = FcWorkflow;\n//======================================================= IM =======================================================\nimport { ImTerminal } from 'react-icons/im';\nexport const Code_TerminalIcon = ImTerminal;\n//======================================================= LU =======================================================\nimport { LuRadioTower } from 'react-icons/lu';\nexport const AccessPointIcon = LuRadioTower;\nexport const IconSelectorIcons = {\n TbAlertCircle,\n TbArrowsExchange,\n TbBriefcase,\n TbBuildingBank,\n TbBuildingCommunity,\n TbCalculator,\n TbCalendarStats,\n TbCash,\n TbChartCandle,\n TbCreditCard,\n TbCurrencyDollar,\n TbFileAnalytics,\n TbFileInvoice,\n TbGavel,\n TbGraph,\n TbHeartbeat,\n TbHierarchy,\n TbHierarchy3,\n TbMapPin2,\n TbReceipt,\n TbReport,\n TbShieldCheck,\n TbStopwatch,\n TbTimeline,\n TbTrees,\n TbUser,\n TbUsersGroup,\n TbWindElectricity,\n TbWorld,\n};\n//# sourceMappingURL=Icon.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { ApplicationError, assertErrorThrown, assertTrue, isString, } from '@finos/legend-shared';\nimport { action, makeObservable, observable } from 'mobx';\nexport const DEFAULT_NOTIFICATION_HIDE_TIME = 6000; // ms\nexport const DEFAULT_ERROR_NOTIFICATION_HIDE_TIME = 10000; // ms\nexport var NOTIFCATION_SEVERITY;\n(function (NOTIFCATION_SEVERITY) {\n NOTIFCATION_SEVERITY[\"ILEGAL_STATE\"] = \"ILEGAL_STATE\";\n NOTIFCATION_SEVERITY[\"ERROR\"] = \"ERROR\";\n NOTIFCATION_SEVERITY[\"WARNING\"] = \"WARNING\";\n NOTIFCATION_SEVERITY[\"SUCCESS\"] = \"SUCCESS\";\n NOTIFCATION_SEVERITY[\"INFO\"] = \"INFO\";\n})(NOTIFCATION_SEVERITY || (NOTIFCATION_SEVERITY = {}));\nexport class Notification {\n severity;\n message;\n details;\n autoHideDuration;\n constructor(severity, message, details, autoHideDuration) {\n this.severity = severity;\n this.message = message;\n this.details = details;\n this.autoHideDuration = autoHideDuration;\n }\n}\nexport class NotificationService {\n notification;\n constructor() {\n makeObservable(this, {\n notification: observable,\n setNotification: action,\n notify: action,\n notifySuccess: action,\n notifyWarning: action,\n notifyIllegalState: action,\n notifyError: action,\n });\n }\n setNotification(notification) {\n this.notification = notification;\n }\n notify(message, details, autoHideDuration) {\n this.setNotification(new Notification(NOTIFCATION_SEVERITY.INFO, message, details, autoHideDuration === null\n ? undefined\n : (autoHideDuration ?? DEFAULT_NOTIFICATION_HIDE_TIME)));\n }\n notifySuccess(message, details, autoHideDuration) {\n this.setNotification(new Notification(NOTIFCATION_SEVERITY.SUCCESS, message, details, autoHideDuration === null\n ? undefined\n : (autoHideDuration ?? DEFAULT_NOTIFICATION_HIDE_TIME)));\n }\n notifyWarning(content, details, autoHideDuration) {\n this.setNotification(new Notification(NOTIFCATION_SEVERITY.WARNING, content instanceof Error ? content.message : content, details, autoHideDuration === null\n ? undefined\n : (autoHideDuration ?? DEFAULT_NOTIFICATION_HIDE_TIME)));\n }\n notifyError(content, details) {\n const message = this.getErrorMessage(content);\n if (message) {\n this.setNotification(new Notification(NOTIFCATION_SEVERITY.ERROR, message, details, undefined));\n }\n }\n getErrorMessage(content) {\n let message;\n if (content instanceof ApplicationError) {\n message = content.detail;\n }\n else if (content instanceof Error) {\n message = content.message;\n }\n else {\n assertTrue(isString(content), `Can't display error`);\n message = content;\n }\n return message;\n }\n notifyIllegalState(message, details, autoHideDuration) {\n this.setNotification(new Notification(NOTIFCATION_SEVERITY.ILEGAL_STATE, isString(message) ? `[PLEASE NOTIFY DEVELOPER] ${message}` : message, details, autoHideDuration === null\n ? undefined\n : (autoHideDuration ?? DEFAULT_NOTIFICATION_HIDE_TIME)));\n }\n notifyUnsupportedFeature(featureName) {\n this.notifyWarning(`Unsupported feature: ${featureName}`);\n }\n /**\n * This function creates a more user-friendly way to throw error in the UI. Rather than crashing the whole app, we will\n * just notify and replacing the value should get with an alternative (e.g. `undefined`). A good use-case for this\n * is where we would not expect an error to throw (i.e. `IllegalStateError`), but we want to be sure that if the error\n * ever occurs, it still shows very apparently in the UI, as such, printing out in the console is not good enough,\n * but crashing the app is bad too, so this is a good balance.\n */\n notifyAndReturnAlternativeOnError = (fn, alternative) => {\n try {\n return fn();\n }\n catch (error) {\n assertErrorThrown(error);\n this.notifyIllegalState(error.message);\n return alternative;\n }\n };\n}\n//# sourceMappingURL=NotificationService.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { observer } from 'mobx-react-lite';\nimport { useApplicationStore } from './ApplicationStoreProvider.js';\nimport { Notification, NotificationContent, ChevronDownIcon, ChevronUpIcon, TimesIcon, ExclamationTriangleIcon, TimesCircleIcon, CheckCircleIcon, InfoCircleIcon, BugIcon, clsx, CopyIcon, } from '@finos/legend-art';\nimport { useState } from 'react';\nimport { DEFAULT_NOTIFICATION_HIDE_TIME, NOTIFCATION_SEVERITY, } from '../stores/NotificationService.js';\nexport const NotificationManager = observer(() => {\n const applicationStore = useApplicationStore();\n const notification = applicationStore.notificationService.notification;\n const isOpen = Boolean(notification);\n const message = notification?.message ?? '';\n const detail = notification?.details;\n const severity = notification?.severity ?? NOTIFCATION_SEVERITY.INFO;\n const [isExpanded, setIsExpanded] = useState(false);\n let notificationIcon = (_jsx(\"div\", { className: \"notification__message__content__icon notification__message__content__icon--info\", children: _jsx(InfoCircleIcon, {}) }));\n switch (severity) {\n case NOTIFCATION_SEVERITY.ILEGAL_STATE:\n notificationIcon = (_jsx(\"div\", { className: \"notification__message__content__icon notification__message__content__icon--error\", children: _jsx(BugIcon, {}) }));\n break;\n case NOTIFCATION_SEVERITY.ERROR:\n notificationIcon = (_jsx(\"div\", { className: \"notification__message__content__icon notification__message__content__icon--error\", children: _jsx(TimesCircleIcon, {}) }));\n break;\n case NOTIFCATION_SEVERITY.WARNING:\n notificationIcon = (_jsx(\"div\", { className: \"notification__message__content__icon notification__message__content__icon--warning\", children: _jsx(ExclamationTriangleIcon, {}) }));\n break;\n case NOTIFCATION_SEVERITY.SUCCESS:\n notificationIcon = (_jsx(\"div\", { className: \"notification__message__content__icon notification__message__content__icon--success\", children: _jsx(CheckCircleIcon, {}) }));\n break;\n default:\n break;\n }\n const handleClose = () => {\n applicationStore.notificationService.setNotification(undefined);\n setIsExpanded(false);\n };\n const handleCopy = applicationStore.guardUnhandledError(() => {\n let content = message;\n if (isExpanded && detail) {\n content = `${content}\\n${detail}`;\n }\n return applicationStore.clipboardService.copyTextToClipboard(content);\n });\n const toggleExpansion = () => setIsExpanded(!isExpanded);\n const onSnackbarAutoHideOrClickAway = (event, reason) => {\n // NOTE: we only should not allow dismissing the notification on click-away. First of call, this might not be desirable\n // second, this clashes with modal that traps focus, e.g. when we have another modal open and want to show a notification\n // the notification focus is stolen by the modal leading to the notification immediately gets clicked-away and closed\n if (reason === 'timeout') {\n handleClose();\n }\n };\n return (_jsx(Notification, { classes: {\n root: 'notification',\n anchorOriginBottomRight: 'notification__position',\n }, anchorOrigin: {\n vertical: 'bottom',\n horizontal: 'right',\n }, open: isOpen, \n // setting the auto-hide duration to null will stop it from hiding automatically\n autoHideDuration: notification\n ? (notification.autoHideDuration ?? null)\n : DEFAULT_NOTIFICATION_HIDE_TIME, onClose: onSnackbarAutoHideOrClickAway, children: _jsx(NotificationContent, { classes: {\n root: 'notification__content',\n message: 'notification__message',\n action: 'notification__actions',\n }, message: _jsxs(\"div\", { className: \"notification__message__content\", children: [notificationIcon, _jsxs(\"div\", { className: clsx('notification__message__content__text', {\n 'notification__message__content__text--expanded': isExpanded,\n }), onClick: handleCopy, title: \"Click to Copy\", children: [message, isExpanded && notification?.details ? notification.details : ''] }), Boolean(notification?.details) && (_jsx(\"button\", { className: \"notification__copy__icon\", onClick: handleCopy, title: \"Copy message and trace\", \"aria-label\": \"Copy message and trace\", children: _jsx(CopyIcon, {}) }))] }), action: [\n _jsx(\"button\", { className: \"notification__action\", onClick: toggleExpansion, tabIndex: -1, title: isExpanded ? 'Collapse' : 'Expand', children: isExpanded ? _jsx(ChevronDownIcon, {}) : _jsx(ChevronUpIcon, {}) }, \"expand\"),\n _jsx(\"button\", { className: \"notification__action\", onClick: handleClose, tabIndex: -1, title: \"Dismiss\", children: _jsx(TimesIcon, {}) }, \"close\"),\n ] }) }, typeof message === 'string' || typeof message === 'number'\n ? message\n : ''));\n});\n//# sourceMappingURL=NotificationManager.js.map","import { jsx as _jsx } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { Menu as MuiMenu, MenuItem as MuiMenuItem, } from '@mui/material';\nexport const Menu = (props) => {\n const { children, classes, ...otherProps } = props;\n return (_jsx(MuiMenu, { classes: {\n ...(classes ?? {}),\n paper: 'mui-menu__paper',\n list: 'mui-menu__list',\n }, transitionDuration: 0, ...otherProps, children: props.children }));\n};\nexport { MuiMenuItem as BaseMenuItem, MuiMenu as BaseMenu };\n//# sourceMappingURL=BaseMenu.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { useState, useRef } from 'react';\nimport { Menu } from './BaseMenu.js';\nexport const ContextMenu = (props) => {\n const { className, children, menuProps, content, disabled, onClose, onOpen } = props;\n const contextMenuRoot = useRef(null);\n const [isOpen, setIsOpen] = useState(false);\n const [anchorEl, setAnchorEl] = useState();\n const [left, setLeft] = useState(0);\n const [top, setTop] = useState(0);\n const reset = () => {\n setAnchorEl(undefined);\n setIsOpen(false);\n setTop(0);\n setLeft(0);\n };\n const close = (event) => {\n event.stopPropagation();\n event.preventDefault();\n reset();\n onClose?.();\n };\n const onContextMenu = (event) => {\n event.stopPropagation();\n event.preventDefault();\n if (disabled) {\n return;\n }\n onOpen?.();\n if (contextMenuRoot.current) {\n // Get position of the container element relative to the page document\n // See https://plainjs.com/javascript/styles/get-the-position-of-an-element-relative-to-the-document-24/\n const containerRect = contextMenuRoot.current.getBoundingClientRect();\n const containerLeft = containerRect.left +\n (window.scrollX || document.documentElement.scrollLeft);\n const containerTop = containerRect.top +\n (window.scrollY || document.documentElement.scrollTop);\n const { clientX, clientY, target } = event;\n const eventTarget = target;\n if (anchorEl !== eventTarget) {\n // NOTE: since this method is not supported in JSDom, we will disable this optimization in test\n // eslint-disable-next-line no-process-env\n if (process.env.NODE_ENV !== 'test') {\n const elements = document.elementsFromPoint(clientX, clientY);\n // Besides checking for the element containment, we also want to check for position as MUI\n // Menu have a background that spans the whole screen to check for clickout and trap focus\n // which means right click on other part of the screen will also result in context menu being shown\n const hasAnchor = elements.some((element) => element === eventTarget) &&\n containerLeft <= clientX &&\n clientX <= containerLeft + containerRect.width &&\n containerTop <= clientY &&\n clientY <= containerTop + containerRect.height;\n if (!hasAnchor) {\n reset();\n onClose?.();\n return;\n }\n }\n }\n setAnchorEl(eventTarget);\n setIsOpen(true);\n setTop(clientY);\n setLeft(clientX);\n }\n };\n return (_jsxs(\"div\", { ref: contextMenuRoot, className: className, onContextMenu: onContextMenu, children: [children, _jsx(Menu, { open: isOpen, anchorPosition: { left, top }, onClose: close, anchorReference: \"anchorPosition\", BackdropProps: {\n invisible: true,\n onContextMenu,\n }, disableRestoreFocus: true, transitionDuration: 0, onClick: close, ...menuProps, children: isOpen && content }, `${left}, ${top}`)] }));\n};\n//# sourceMappingURL=ContextMenu.js.map","import { jsx as _jsx } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { forwardRef } from 'react';\nimport { clsx } from 'clsx';\nimport { generateSimpleDIVComponent } from '../utils/ComponentCreatorUtils.js';\nexport const MenuContent = forwardRef(function MenuContent(props, ref) {\n const { className, children, ...otherProps } = props;\n return (_jsx(\"div\", { ref: ref, className: clsx('menu', className), ...otherProps, children: children }));\n});\nexport const MenuContentItem = (props) => {\n const { className, onClick, title, disabled, children, ...otherProps } = props;\n return (_jsx(\"button\", { className: clsx('menu__item', className), disabled: Boolean(disabled), title: title, onClick: onClick, ...otherProps, children: children }));\n};\nexport const MenuContentDivider = generateSimpleDIVComponent('MenuContentDivider', 'menu__divider');\nexport const MenuContentItemIcon = generateSimpleDIVComponent('MenuContentItemIcon', 'menu__item__icon');\nexport const MenuContentItemBlankIcon = (props) => {\n const { className, ...otherProps } = props;\n return (_jsx(\"div\", { className: clsx('menu__item__icon', className), ...otherProps }));\n};\nexport const MenuContentItemLabel = generateSimpleDIVComponent('MenuContentItemLabel', 'menu__item__label');\n//# sourceMappingURL=MenuContent.js.map","import { jsx as _jsx } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport ReactMarkdown from 'react-markdown';\nimport remarkGFM from 'remark-gfm';\nimport { clsx } from 'clsx';\nimport { useEffect } from 'react';\nimport mermaid from 'mermaid';\nexport const MarkdownTextViewer = (props) => {\n useEffect(() => {\n // this will render the mermaid diagram\n mermaid.initialize({ startOnLoad: true, theme: 'dark' });\n mermaid.contentLoaded();\n }, [props.value]);\n return (_jsx(\"div\", { className: clsx('markdown-content', props.className), children: _jsx(ReactMarkdown, { remarkPlugins: [remarkGFM], components: props.components ?? {\n // customize the rendering of the <code> block, if the language is mermaid\n // the class name must include `mermaid` and it will get picked up by the mermaid renderer\n code: (_props) => {\n const { children, className, node, ...rest } = _props;\n const match = /language-(?<language>\\w+)/.exec(className ?? '');\n return match?.groups?.language ? (_jsx(\"code\", { ...rest, className: clsx(match.groups.language), children: children })) : (_jsx(\"code\", { ...rest, className: className, children: children }));\n },\n }, children: props.value.value }) }));\n};\n//# sourceMappingURL=MarkdownTextViewer.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { useState, useEffect, useRef, useCallback, useMemo } from 'react';\nimport { clsx } from 'clsx';\nimport { twMerge } from 'tailwind-merge';\nimport Draggable from 'react-draggable';\nimport { Resizable, ResizableBox } from 'react-resizable';\nimport { Rnd } from 'react-rnd';\nimport { debounce, throttle } from '@finos/legend-shared';\nexport { clsx };\nexport { Portal, useForkRef } from '@mui/material';\nexport function cn(...inputs) {\n return twMerge(clsx(inputs));\n}\nexport { Global, css } from '@emotion/react';\nexport { Draggable };\nexport { Resizable, ResizableBox };\nexport { Rnd as ResizableAndDraggableBox };\n/**\n * React `setState` used to come with a callback that runs after the state is updated\n * See https://www.robinwieruch.de/react-usestate-callback\n */\nexport const useStateWithCallback = (initialState, callback) => {\n const [state, setState] = useState(initialState);\n useEffect(() => callback(state), [state, callback]);\n return [state, setState];\n};\n/**\n * Use ResizeObserver to detect size of an element\n * Adapted from `react-resize-detector`\n *\n * See https://github.com/maslianok/react-resize-detector\n * See https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver\n */\nexport function useResizeDetector(options) {\n // If `skipOnMount` is enabled, skip the first resize event\n const skipResize = useRef(options?.skipOnMount);\n const refreshMode = options?.refreshMode;\n const refreshRate = options?.refreshRate ?? 1000;\n const refreshOptions = useMemo(() => ({\n leading: options?.refreshOptions?.leading,\n trailing: options?.refreshOptions?.trailing,\n }), [options?.refreshOptions?.leading, options?.refreshOptions?.trailing]);\n const [size, setSize] = useState({\n width: undefined,\n height: undefined,\n });\n const _ref = useRef(null);\n const ref = useMemo(() => options?.targetRef ?? _ref, [options?.targetRef]);\n const onResize = options?.onResize;\n const resizeCallback = useCallback((entries) => {\n if (skipResize.current) {\n skipResize.current = false;\n return;\n }\n entries.forEach((entry) => {\n const nextSize = {\n width: entry.contentRect.width,\n height: entry.contentRect.height,\n };\n setSize((prevSize) => {\n if (prevSize.width === nextSize.width &&\n prevSize.height === nextSize.height) {\n return prevSize;\n }\n onResize?.({\n width: nextSize.width,\n height: nextSize.height,\n entry,\n });\n return nextSize;\n });\n });\n }, [skipResize, onResize]);\n // customize refresh behavior\n const resizeHandler = useMemo(() => {\n switch (refreshMode) {\n case 'debounce':\n return debounce(resizeCallback, refreshRate, refreshOptions);\n case 'throttle':\n return throttle(resizeCallback, refreshRate, refreshOptions);\n default:\n return resizeCallback;\n }\n }, [resizeCallback, refreshMode, refreshRate, refreshOptions]);\n // attach ResizeObserver to the element\n useEffect(() => {\n let resizeObserver;\n if (ref.current) {\n resizeObserver = new window.ResizeObserver(resizeHandler);\n resizeObserver.observe(ref.current);\n }\n else {\n // if ref element is not registered, reset the size\n onResize?.({\n width: undefined,\n height: undefined,\n entry: undefined,\n });\n setSize({ width: undefined, height: undefined });\n }\n return () => {\n resizeObserver?.disconnect();\n if ('cancel' in resizeHandler) {\n resizeHandler.cancel();\n }\n };\n }, [resizeHandler, onResize, ref]);\n return { ref, ...size };\n}\n//# sourceMappingURL=ComponentUtils.js.map","import { jsx as _jsx } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { useEffect, useState } from 'react';\nimport { useResizeDetector } from '../utils/ComponentUtils.js';\nimport { clsx } from 'clsx';\nconst DEFAULT_CONTENT_PADDING = 20;\n/**\n * Use this component for panel with empty content, it has a resize detector that will\n * help to show/hide the content as the panel is resized\n */\nexport const BlankPanelContent = (props) => {\n const { children } = props;\n const { ref: contentRef, width: contentWidth, height: contentHeight, } = useResizeDetector({\n refreshMode: 'throttle',\n refreshRate: 50,\n refreshOptions: { trailing: true },\n });\n const [showContent, setShowContent] = useState(false);\n const { ref: containerRef, width: containerWidth, height: containerHeight, } = useResizeDetector({\n refreshMode: 'throttle',\n refreshRate: 50,\n refreshOptions: { trailing: true },\n });\n useEffect(() => {\n setShowContent((containerWidth ?? 0) >\n (contentWidth ?? 0) + DEFAULT_CONTENT_PADDING * 2 &&\n (containerHeight ?? 0) >\n (contentHeight ?? 0) + DEFAULT_CONTENT_PADDING * 2);\n }, [containerWidth, containerHeight, contentWidth, contentHeight]);\n return (_jsx(\"div\", { ref: containerRef, className: \"panel__content__blank\", children: _jsx(\"div\", { ref: contentRef, className: clsx('panel__content__blank__content', {\n 'panel__content__blank__content--hide': !showContent,\n }), children: children }) }));\n};\n//# sourceMappingURL=BlankPanelContent.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { RadioGroup as MuiRadioGroup, FormControlLabel, Radio, } from '@mui/material';\nimport { clsx } from 'clsx';\nconst transformToMatrix = (arr, stepSize) => {\n const matrix = [];\n for (let i = 0; i < arr.length; i += stepSize) {\n matrix.push(arr.slice(i, i + stepSize));\n }\n return matrix;\n};\nexport const BaseRadioGroup = (props) => {\n const { children, options, size, className, ...otherProps } = props;\n // For displaying avaible options in a [n,size] matrix\n const targetOptionsValuesInMatrix = transformToMatrix(options, size);\n return (_jsxs(\"div\", { className: clsx('mui-radio-group', className), children: [targetOptionsValuesInMatrix.map((row, idx) => (\n // eslint-disable-next-line react/no-array-index-key\n _jsx(\"div\", { children: _jsx(MuiRadioGroup, { className: \"mui-radio-group__group\", ...otherProps, children: row.map((op) => (_jsx(FormControlLabel, { className: \"mui-radio-group__group__column\", style: { width: `${100 / size}%` }, value: op, control: _jsx(Radio, { className: \"mui-radio-group__group__item__radio-btn\", classes: {\n checked: 'mui-radio-group__group__item__radio-btn--checked',\n } }), label: _jsx(\"div\", { className: \"mui-radio-group__group__item__label\", children: op }) }, op))) }) }, idx))), children] }));\n};\n//# sourceMappingURL=BaseRadioGroup.js.map","import { jsx as _jsx } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { Popover as MuiPopover, } from '@mui/material';\nexport const BasePopover = (props) => {\n const { children, ...otherProps } = props;\n return (_jsx(MuiPopover, { classes: {\n paper: 'mui-popover__paper',\n }, transitionDuration: 0, ...otherProps, children: props.children }));\n};\n//# sourceMappingURL=BasePopover.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport var LEGEND_APPLICATION_DOCUMENTATION_KEY;\n(function (LEGEND_APPLICATION_DOCUMENTATION_KEY) {\n LEGEND_APPLICATION_DOCUMENTATION_KEY[\"QUESTION_HOW_TO_USE_ADVANCED_SEARCH_SYNTAX\"] = \"question.how-to-use-advanced-search-syntax\";\n})(LEGEND_APPLICATION_DOCUMENTATION_KEY || (LEGEND_APPLICATION_DOCUMENTATION_KEY = {}));\n//# sourceMappingURL=LegendApplicationDocumentation.js.map","import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { clsx, TimesIcon, SearchIcon, MapMarkerIcon, CloseIcon, ContextMenu, MenuContent, MenuContentItem, MarkdownTextViewer, ChevronDownIcon, ChevronRightIcon, BlankPanelContent, BeardIcon, SunglassesIcon, WizardHatIcon, FaceLaughWinkIcon, ThinVerticalDragHandleIcon, PanelLoadingIndicator, BasePopover, FaceSadTearIcon, CogIcon, Draggable, BaseRadioGroup, QuestionCircleIcon, EmptyWindowRestoreIcon, WindowMaximizeIcon, MinusCircleIcon, } from '@finos/legend-art';\nimport { ADVANCED_FUZZY_SEARCH_MODE, ContentType, debounce, downloadFileUsingDataURI, formatDate, isString, uuid, } from '@finos/legend-shared';\nimport { observer } from 'mobx-react-lite';\nimport { useEffect, useMemo, useRef, useState } from 'react';\nimport { DEFAULT_DATE_TIME_FORMAT, DEFAULT_TAB_SIZE, } from '../stores/ApplicationConfig.js';\nimport { VIRTUAL_ASSISTANT_TAB, } from '../stores/AssistantService.js';\nimport { useApplicationStore } from './ApplicationStoreProvider.js';\nimport { LegendApplicationTelemetryHelper } from '../__lib__/LegendApplicationTelemetry.js';\nimport { LEGEND_APPLICATION_DOCUMENTATION_KEY } from '../__lib__/LegendApplicationDocumentation.js';\nconst WIZARD_GREETING = `Bonjour, It's Pierre!`;\nconst VirtualAssistantDocumentationEntryViewer = observer((props) => {\n const { entry } = props;\n const applicationStore = useApplicationStore();\n const toggleExpand = () => {\n if (!entry.isOpen) {\n LegendApplicationTelemetryHelper.logEvent_VirtualAssistantDocumentationEntryAccessed(applicationStore.telemetryService, {\n key: entry.documentationKey,\n });\n }\n entry.setIsOpen(!entry.isOpen);\n };\n const onDocumentationLinkClick = () => {\n LegendApplicationTelemetryHelper.logEvent_VirtualAssistantDocumentationEntryAccessed(applicationStore.telemetryService, {\n key: entry.documentationKey,\n });\n };\n const copyDocumentationKey = applicationStore.guardUnhandledError(() => applicationStore.clipboardService.copyTextToClipboard(entry.documentationKey));\n return (_jsx(ContextMenu, { className: \"virtual-assistant__doc-entry\", menuProps: {\n elevation: 7,\n classes: {\n root: 'virtual-assistant__context-menu',\n },\n }, content: _jsx(MenuContent, { children: _jsx(MenuContentItem, { onClick: copyDocumentationKey, children: \"Copy Documentation Key\" }) }), children: _jsxs(\"div\", { className: \"virtual-assistant__doc-entry\", children: [_jsxs(\"div\", { className: \"virtual-assistant__doc-entry__header\", children: [_jsx(\"button\", { className: clsx('virtual-assistant__doc-entry__expand-icon', {\n 'virtual-assistant__doc-entry__expand-icon--disabled': !entry.content,\n }), disabled: !entry.content, tabIndex: -1, onClick: toggleExpand, children: entry.isOpen ? _jsx(ChevronDownIcon, {}) : _jsx(ChevronRightIcon, {}) }), entry.url ? (_jsx(\"a\", { className: \"virtual-assistant__doc-entry__title virtual-assistant__doc-entry__title--link\", rel: \"noopener noreferrer\", target: \"_blank\", href: entry.url, onClick: onDocumentationLinkClick, title: \"Click to see external documentation\", children: entry.title })) : (_jsx(\"div\", { className: \"virtual-assistant__doc-entry__title\", onClick: toggleExpand, children: entry.title }))] }), entry.isOpen && entry.content && (_jsx(\"div\", { className: \"virtual-assistant__doc-entry__content\", children: isString(entry.content) ? (_jsx(\"div\", { className: \"virtual-assistant__doc-entry__content__text\", children: entry.content })) : (_jsx(MarkdownTextViewer, { className: \"virtual-assistant__doc-entry__content__markdown-text\", value: entry.content })) }))] }) }));\n});\nconst VirtualAssistantContextualSupportPanel = observer(() => {\n const applicationStore = useApplicationStore();\n const assistantService = applicationStore.assistantService;\n const contextualEntry = assistantService.currentContextualDocumentationEntry;\n const copyContextIDToClipboard = applicationStore.guardUnhandledError(() => applicationStore.clipboardService.copyTextToClipboard(contextualEntry?.context ?? ''));\n const copyCurrentContextIDToClipboard = applicationStore.guardUnhandledError(() => applicationStore.clipboardService.copyTextToClipboard(applicationStore.navigationContextService.currentContext?.key ?? ''));\n const copyContextStackToClipboard = applicationStore.guardUnhandledError(() => applicationStore.clipboardService.copyTextToClipboard(applicationStore.navigationContextService.contextStack\n .map((context) => context.key)\n .join(' > ')));\n return (_jsxs(ContextMenu, { className: \"virtual-assistant__contextual-support\", disabled: !contextualEntry, menuProps: {\n elevation: 7,\n classes: {\n root: 'virtual-assistant__context-menu',\n },\n }, content: _jsxs(MenuContent, { children: [_jsx(MenuContentItem, { onClick: copyContextIDToClipboard, children: \"Copy Context ID\" }), _jsx(MenuContentItem, { onClick: copyCurrentContextIDToClipboard, children: \"Copy Current Context ID\" }), _jsx(MenuContentItem, { onClick: copyContextStackToClipboard, children: \"Copy Context Stack\" })] }), children: [contextualEntry && (_jsxs(\"div\", { className: \"virtual-assistant__contextual-support__content\", children: [contextualEntry.title && (_jsx(\"div\", { className: \"virtual-assistant__contextual-support__title\", children: contextualEntry.title })), contextualEntry.content && (_jsx(_Fragment, { children: isString(contextualEntry.content) ? (_jsx(\"div\", { className: \"virtual-assistant__contextual-support__text\", children: contextualEntry.content })) : (_jsx(MarkdownTextViewer, { className: \"virtual-assistant__contextual-support__markdown-text\", value: contextualEntry.content })) })), contextualEntry.related.length && (_jsxs(\"div\", { className: \"virtual-assistant__contextual-support__relevant-entries\", children: [_jsxs(\"div\", { className: \"virtual-assistant__contextual-support__relevant-entries__title\", children: [\"Related entries (\", contextualEntry.related.length, \")\"] }), contextualEntry.related.map((entry) => (_jsx(VirtualAssistantDocumentationEntryViewer, { entry: entry }, entry.uuid)))] }))] })), !contextualEntry && (_jsx(BlankPanelContent, { children: _jsxs(\"div\", { className: \"virtual-assistant__panel__placeholder\", children: [_jsx(FaceLaughWinkIcon, { className: \"virtual-assistant__panel__placeholder__icon\" }), _jsx(\"div\", { className: \"virtual-assistant__panel__placeholder__message\", children: \"No contextual documentation found!\" }), _jsx(\"div\", { className: \"virtual-assistant__panel__placeholder__instruction\", children: \"Keep using the app. When contextual help is available, we will let you know!\" })] }) }))] }));\n});\nconst VirtualAssistantSearchPanel = observer(() => {\n const applicationStore = useApplicationStore();\n const searchInputRef = useRef(null);\n const assistantService = applicationStore.assistantService;\n // search text\n const searchText = assistantService.searchText;\n const debouncedSearch = useMemo(() => debounce(() => assistantService.search(), 100), [assistantService]);\n const onSearchTextChange = (event) => {\n assistantService.setSearchText(event.target.value);\n debouncedSearch();\n };\n const clearSearchText = () => {\n assistantService.resetSearch();\n assistantService.currentDocumentationEntry = undefined;\n searchInputRef.current?.focus();\n };\n const toggleSearchConfigMenu = () => assistantService.setShowSearchConfigurationMenu(!assistantService.showSearchConfigurationMenu);\n const downloadDocRegistry = () => {\n downloadFileUsingDataURI(`documentation-registry_${formatDate(new Date(Date.now()), DEFAULT_DATE_TIME_FORMAT)}.json`, JSON.stringify(applicationStore.documentationService.publishDocRegistry(), undefined, DEFAULT_TAB_SIZE), ContentType.APPLICATION_JSON);\n };\n const downloadContextualDocIndex = () => {\n downloadFileUsingDataURI(`documentation-registry_${formatDate(new Date(Date.now()), DEFAULT_DATE_TIME_FORMAT)}.json`, JSON.stringify(applicationStore.documentationService.publishContextualDocIndex(), undefined, DEFAULT_TAB_SIZE), ContentType.APPLICATION_JSON);\n };\n useEffect(() => {\n searchInputRef.current?.focus();\n }, []);\n return (_jsxs(\"div\", { className: \"virtual-assistant__search\", children: [_jsxs(\"div\", { className: \"virtual-assistant__search__header\", children: [_jsx(\"input\", { ref: searchInputRef, \n /**\n * NOTE: In the scenario where another modal is opened at the same time the assistant panel\n * is open, the focus will be stolen by the newly opened modal. In that case, we need\n * to take back the focus. The trick here is to remount the whole panel (modal/popover)\n * by refreshing the `key` prop of the panel. This will cause `mui` to recompute the\n * focus-trap and allow the input field to be selectable again. Basically, we are stealing\n * back the focus for the assistant.\n *\n * However, the caveat is that this will cause the component states, such as scroll positions,\n * to be reset as such, we need to do this really sparingly. In fact, the only\n * scenario where we need to do this is when a new modal is opened when the assistant panel\n * is already opened. Basically, Other scenarios, such as when the assistant is opened after the modal\n * is opened seem to pose no issue.\n */\n onClick: () => {\n if (\n // only when there are dialogs being opened\n // NOTE: this seems rather hacky, but querying by role is the least\n // vendor-dependent approach we can think of at the moment\n document.querySelectorAll('[role=\"dialog\"]').length &&\n // only when the focus is not already with the input field\n // this means the focus is being stolen from the assistant because\n // the newly opened modal is opened more recently than the assistant\n //\n // once the focus has been gained by the assistant\n // we will not need to do this anymore\n searchInputRef.current !== document.activeElement) {\n assistantService.refreshPanelRendering();\n }\n }, className: clsx('virtual-assistant__search__input input--dark', {\n 'virtual-assistant__search__input--searching': searchText,\n }), spellCheck: false, onChange: onSearchTextChange, value: searchText, placeholder: \"Ask me a question\" }), searchText && (_jsx(\"div\", { className: \"virtual-assistant__search__input__search__count\", children: assistantService.searchResults.length +\n (assistantService.isOverSearchLimit ? '+' : '') })), _jsx(\"button\", { className: clsx('virtual-assistant__search__input__config__trigger', {\n 'virtual-assistant__search__input__config__trigger--toggled': assistantService.showSearchConfigurationMenu,\n 'virtual-assistant__search__input__config__trigger--active': assistantService.searchConfigurationState.isAdvancedSearchActive,\n }), tabIndex: -1, onClick: toggleSearchConfigMenu, title: `${assistantService.searchConfigurationState.isAdvancedSearchActive\n ? 'Advanced search is currently active\\n'\n : ''}Click to toggle search config menu`, children: _jsx(CogIcon, {}) }), !searchText ? (_jsx(\"div\", { className: \"virtual-assistant__search__input__search__icon\", children: _jsx(SearchIcon, {}) })) : (_jsx(\"button\", { className: \"virtual-assistant__search__input__clear-btn\", tabIndex: -1, onClick: clearSearchText, title: \"Clear\", children: _jsx(TimesIcon, {}) }))] }), _jsxs(\"div\", { className: \"virtual-assistant__search__content\", children: [_jsx(PanelLoadingIndicator, { isLoading: assistantService.searchState.isInProgress }), _jsx(\"div\", { className: clsx('virtual-assistant__search__input__config__panel', {\n 'virtual-assistant__search__input__config__panel--toggled': assistantService.showSearchConfigurationMenu,\n }), children: _jsxs(\"div\", { className: \"virtual-assistant__search__input__advanced-config__panel\", children: [_jsxs(\"div\", { className: \"virtual-assistant__search__input__advanced-config__panel__header__label\", children: [\"search config\", applicationStore.documentationService.hasDocEntry(LEGEND_APPLICATION_DOCUMENTATION_KEY.QUESTION_HOW_TO_USE_ADVANCED_SEARCH_SYNTAX) && (_jsx(\"div\", { onClick: () => assistantService.openDocumentationEntryLink(LEGEND_APPLICATION_DOCUMENTATION_KEY.QUESTION_HOW_TO_USE_ADVANCED_SEARCH_SYNTAX), title: \"Click to see documentation\", className: \"virtual-assistant__search__input__advanced-config__panel__header__label__hint\", children: _jsx(QuestionCircleIcon, {}) }))] }), _jsx(\"div\", { children: _jsx(BaseRadioGroup, { value: assistantService.searchConfigurationState.currentMode, onChange: (event) => {\n const searchMode = event.target\n .value;\n assistantService.searchConfigurationState.setCurrentMode(searchMode);\n }, row: false, options: [\n ADVANCED_FUZZY_SEARCH_MODE.STANDARD,\n ADVANCED_FUZZY_SEARCH_MODE.INCLUDE,\n ADVANCED_FUZZY_SEARCH_MODE.EXACT,\n ADVANCED_FUZZY_SEARCH_MODE.INVERSE,\n ], size: 1 }) })] }) }), assistantService.currentDocumentationEntry && (_jsx(\"div\", { className: \"virtual-assistant__search__results\", children: _jsx(VirtualAssistantDocumentationEntryViewer, { entry: assistantService.currentDocumentationEntry }, assistantService.currentDocumentationEntry.uuid) })), !assistantService.currentDocumentationEntry && (_jsxs(_Fragment, { children: [Boolean(assistantService.searchResults.length) && (_jsx(\"div\", { className: \"virtual-assistant__search__results\", children: assistantService.searchResults.map((result) => (_jsx(VirtualAssistantDocumentationEntryViewer, { entry: result }, result.uuid))) })), searchText && !assistantService.searchResults.length && (_jsx(BlankPanelContent, { children: _jsxs(\"div\", { className: \"virtual-assistant__panel__placeholder\", children: [_jsx(FaceSadTearIcon, { className: \"virtual-assistant__panel__placeholder__icon\" }), _jsx(\"div\", { className: \"virtual-assistant__panel__placeholder__message\", children: \"No result...\" })] }) })), !searchText && !assistantService.searchResults.length && (_jsx(ContextMenu, { className: \"virtual-assistant__character__container\", menuProps: {\n elevation: 7,\n classes: {\n root: 'virtual-assistant__context-menu',\n },\n }, content: _jsxs(MenuContent, { children: [_jsx(MenuContentItem, { onClick: downloadDocRegistry, children: \"Download documentation registry\" }), _jsx(MenuContentItem, { onClick: downloadContextualDocIndex, children: \"Download contextual documentation mapping\" })] }), children: _jsxs(\"div\", { className: \"virtual-assistant__character\", children: [_jsxs(\"div\", { className: \"virtual-assistant__character__figure\", children: [_jsx(WizardHatIcon, { className: \"virtual-assistant__character__hat\" }), _jsx(SunglassesIcon, { className: \"virtual-assistant__character__glasses\" }), _jsx(BeardIcon, { className: \"virtual-assistant__character__beard\" })] }), _jsx(\"div\", { className: \"virtual-assistant__character__greeting\", children: WIZARD_GREETING }), _jsx(\"div\", { className: \"virtual-assistant__character__question\", children: \"How can I help today?\" })] }) }))] }))] })] }));\n});\nconst VirtualAssistantPanel = observer((props) => {\n const { triggerElement } = props;\n const applicationStore = useApplicationStore();\n const assistantService = applicationStore.assistantService;\n const currentContextualDocumentationEntry = assistantService.currentContextualDocumentationEntry;\n const selectedTab = assistantService.selectedTab;\n const extraViewConfigurations = applicationStore.pluginManager\n .getApplicationPlugins()\n .flatMap((plugin) => plugin.getExtraVirtualAssistantViewConfigurations?.() ?? []);\n const currentExtensionView = extraViewConfigurations.find((config) => config.key === selectedTab);\n const toggleMaximize = () => assistantService.setIsPanelMaximized(!assistantService.isPanelMaximized);\n const selectSearch = () => assistantService.setSelectedTab(VIRTUAL_ASSISTANT_TAB.SEARCH);\n const selectContextualDoc = () => assistantService.setSelectedTab(VIRTUAL_ASSISTANT_TAB.CONTEXTUAL_SUPPORT);\n const closeAssistantPanel = () => assistantService.setIsOpen(false);\n return (\n /**\n * The most appropriate component to use is `Popper`\n * as it does not block click-away\n * See https://mui.com/material-ui/react-popper/\n *\n * However, the caveat is that in the implementation of mui Popper\n * focus trap is not supported. As such, we could end up in a situation\n * where the assistant input fields will not be focusable\n * when another modal is being opened, as that newly opened modal will\n * **steal** the focus\n *\n * See https://github.com/finos/legend-studio/issues/1255\n * See https://mui.com/material-ui/react-modal/#focus-trap\n * See https://github.com/mui/material-ui/issues/17497\n */\n _jsx(BasePopover, { open: assistantService.isOpen, className: \"virtual-assistant__panel__container\", anchorEl: triggerElement, \n // we need to get rid of the backdrop and the click-away trap\n // to make this popover behave like a popper\n // NOTE: we will cancel the effect of click-away trap using CSS\n hideBackdrop: true, slotProps: {\n paper: {\n classes: { root: 'virtual-assistant__panel__container__root' },\n },\n }, \n // allow other modals to take the focus from the virtual assistant\n disableEnforceFocus: true, \n // NOTE: make sure the assistant is always fully displayed (not cropped)\n anchorOrigin: {\n vertical: 'bottom',\n horizontal: 'left',\n }, transformOrigin: {\n vertical: 'bottom',\n horizontal: 'right',\n }, children: _jsxs(\"div\", { className: clsx('virtual-assistant__panel', {\n 'virtual-assistant__panel--maximized': assistantService.isPanelMaximized,\n }), \n // NOTE: here we block `tabbing` (to move focus). This is to counter the effect of\n // `disableEnforceFocus={true}` set in the assistant panel popover\n // this is the poor-man focus trap for the assistant to ensure\n // that we don't leak focus tab down to other parts of the app\n //\n // Especially, due to the hack we do to compete for focus when another modal\n // is opened, we need to do this to avoid leaking of focus to components\n // beneath the modal via assistant\n //\n // setting `tabIndex={0}` is a hack to make this DOM node focusable\n // and hence, we could trap the focus here using `onKeyDown`\n // See https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex\n tabIndex: 0, onKeyDown: (event) => {\n if (event.key === 'Tab') {\n event.preventDefault();\n event.stopPropagation();\n }\n }, children: [_jsxs(\"div\", { className: \"virtual-assistant__panel__header\", children: [_jsxs(\"div\", { className: \"virtual-assistant__panel__header__tabs\", children: [_jsx(\"div\", { className: clsx('virtual-assistant__panel__header__tab', {\n 'virtual-assistant__panel__header__tab--active': selectedTab === VIRTUAL_ASSISTANT_TAB.SEARCH,\n }), onClick: selectSearch, title: \"Search\", children: _jsx(\"div\", { className: \"virtual-assistant__panel__header__tab__content\", children: _jsx(SearchIcon, {}) }) }), _jsx(\"div\", { className: clsx('virtual-assistant__panel__header__tab', {\n 'virtual-assistant__panel__header__tab--active': selectedTab === VIRTUAL_ASSISTANT_TAB.CONTEXTUAL_SUPPORT,\n }), onClick: selectContextualDoc, title: \"Contextual Support\", children: _jsxs(\"div\", { className: \"virtual-assistant__panel__header__tab__content\", children: [_jsx(MapMarkerIcon, {}), currentContextualDocumentationEntry && (_jsx(\"div\", { className: \"virtual-assistant__panel__header__tab__indicator\", title: \"Contextual support available\" }))] }) }), extraViewConfigurations.map((config) => (_jsx(\"div\", { className: clsx('virtual-assistant__panel__header__tab', {\n 'virtual-assistant__panel__header__tab--active': selectedTab === config.key,\n }), onClick: () => {\n assistantService.setSelectedTab(config.key);\n if (config.autoExpandOnOpen) {\n assistantService.setIsPanelMaximized(true);\n }\n }, title: config.title, children: _jsx(\"div\", { className: \"virtual-assistant__panel__header__tab__content\", children: config.icon ?? _jsx(QuestionCircleIcon, {}) }) }, config.key)))] }), _jsxs(\"div\", { className: \"virtual-assistant__panel__header__actions\", children: [_jsx(\"button\", { className: \"virtual-assistant__panel__header__action\", tabIndex: -1, onClick: toggleMaximize, title: assistantService.isPanelMaximized ? 'Minimize' : 'Maximize', children: assistantService.isPanelMaximized ? (_jsx(EmptyWindowRestoreIcon, {})) : (_jsx(WindowMaximizeIcon, {})) }), _jsx(\"button\", { className: \"virtual-assistant__panel__header__action\", tabIndex: -1, onClick: closeAssistantPanel, title: \"Close\", children: _jsx(CloseIcon, { className: \"virtual-assistant__panel__icon__close\" }) })] })] }), _jsxs(\"div\", { className: \"virtual-assistant__panel__content\", children: [selectedTab === VIRTUAL_ASSISTANT_TAB.SEARCH && (_jsx(VirtualAssistantSearchPanel, {})), selectedTab === VIRTUAL_ASSISTANT_TAB.CONTEXTUAL_SUPPORT && (_jsx(VirtualAssistantContextualSupportPanel, {})), currentExtensionView?.renderer()] })] }) }, assistantService.panelRenderingKey));\n});\nexport const VirtualAssistant = observer(() => {\n const [isDragging, setIsDragging] = useState(false);\n const [_key, _setKey] = useState(uuid());\n const applicationStore = useApplicationStore();\n const assistantRef = useRef(null);\n const assistantService = applicationStore.assistantService;\n const currentContextualDocumentationEntry = assistantService.currentContextualDocumentationEntry;\n const toggleAssistantPanel = () => {\n const newVal = !assistantService.isOpen;\n // open the contextual help tab when contextual help is available\n if (newVal && currentContextualDocumentationEntry) {\n assistantService.setSelectedTab(VIRTUAL_ASSISTANT_TAB.CONTEXTUAL_SUPPORT);\n }\n assistantService.setIsOpen(!assistantService.isOpen);\n };\n const hideAssistant = () => applicationStore.assistantService.hideAssistant();\n const resetPosition = () => {\n // close the panel since\n assistantService.setIsOpen(false);\n _setKey(uuid());\n };\n // drag and drop\n const onDragEnd = () => setIsDragging(false);\n const onDragStart = () => setIsDragging(true);\n useEffect(() => {\n if (assistantService.isHidden) {\n // reset to default position when we hide the assistant\n // so that when we open it the position is reset\n _setKey(uuid());\n }\n }, [assistantService.isHidden]);\n return (_jsx(Draggable\n // this is a trick so we could reset the default position of the assistant\n // See https://github.com/react-grid-layout/react-draggable/issues/214#issuecomment-270021423\n , { \n // make sure we cannot drag and drop outside of the screen\n bounds: \"parent\", onStart: onDragStart, onStop: onDragEnd, \n // Avoid using deprecated findDOMNode method to rid of React warning\n // See https://github.com/react-grid-layout/react-draggable/issues/749\n nodeRef: assistantRef, \n // limit the dnd trigger to only the drag handle\n handle: \".virtual-assistant__station__drag-handle\", children: _jsxs(\"div\", { className: \"virtual-assistant\", \n // NOTE: we have to set the `ref` at this level so even when the assistant is hidden\n // the element is still in the DOM so when we programmatically show the assistant panel\n // the anchor is available in time\n ref: assistantRef, children: [_jsxs(\"div\", { className: clsx('virtual-assistant__station', {\n 'virtual-assistant__station--hidden': assistantService.isHidden,\n 'virtual-assistant__station--active': Boolean(currentContextualDocumentationEntry),\n }), children: [_jsx(\"button\", { className: \"virtual-assistant__station__hide-button\", title: \"Hide assistant\", onClick: () => {\n applicationStore.assistantService.toggleAssistant();\n }, children: _jsx(MinusCircleIcon, {}) }), _jsx(\"button\", { className: \"virtual-assistant__station__trigger\", tabIndex: -1, onClick: toggleAssistantPanel, title: assistantService.isOpen\n ? `Click to close assistant panel`\n : `${currentContextualDocumentationEntry\n ? 'Contextual support available.\\n'\n : ''}Click to open Assistant...`, children: _jsxs(\"div\", { className: \"virtual-assistant__station__character\", children: [_jsx(WizardHatIcon, { className: \"virtual-assistant__station__character__hat\" }), _jsx(SunglassesIcon, { className: \"virtual-assistant__station__character__glasses\" }), _jsx(BeardIcon, { className: \"virtual-assistant__station__character__beard\" })] }) }), _jsx(\"div\", { className: \"virtual-assistant__station__label\", onClick: toggleAssistantPanel, children: \"Assistant\" }), _jsx(ContextMenu, { className: clsx('virtual-assistant__station__drag-handle', {\n 'virtual-assistant__station__drag-handle--dragging': isDragging,\n }), menuProps: {\n elevation: 7,\n classes: {\n root: 'virtual-assistant__context-menu',\n },\n }, content: _jsxs(MenuContent, { children: [_jsx(MenuContentItem, { onClick: resetPosition, children: \"Reset Position\" }), _jsx(MenuContentItem, { onClick: hideAssistant, children: \"Hide Assistant\" })] }), children: _jsx(\"div\", { className: \"virtual-assistant__station__drag-handle__content\", title: isDragging ? undefined : 'Grab to drag assistant', children: _jsx(ThinVerticalDragHandleIcon, {}) }) })] }, currentContextualDocumentationEntry?.uuid ?? ''), !isDragging &&\n assistantService.isOpen &&\n !assistantService.isHidden &&\n assistantRef.current && (_jsx(VirtualAssistantPanel, { triggerElement: assistantRef.current }))] }) }, _key));\n});\n//# sourceMappingURL=VirtualAssistant.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { Backdrop, LegendStyleProvider, Portal } from '@finos/legend-art';\nimport { observer } from 'mobx-react-lite';\nimport { DndProvider } from 'react-dnd';\nimport { HTML5Backend } from 'react-dnd-html5-backend';\nimport { ActionAlert } from './ActionAlert.js';\nimport { useApplicationStore } from './ApplicationStoreProvider.js';\nimport { BlockingAlert } from './BlockingAlert.js';\nimport { NotificationManager } from './NotificationManager.js';\nimport { useEffect } from 'react';\nimport { createKeybindingsHandler, } from '@finos/legend-shared';\nimport { VirtualAssistant } from './VirtualAssistant.js';\nimport { LegendApplicationTelemetryHelper } from '../__lib__/LegendApplicationTelemetry.js';\nvar APPLICATION_COMPONENT_ELEMENT_ID;\n(function (APPLICATION_COMPONENT_ELEMENT_ID) {\n APPLICATION_COMPONENT_ELEMENT_ID[\"TOP_LEVEL_CONTAINER\"] = \"application.top-level-container\";\n APPLICATION_COMPONENT_ELEMENT_ID[\"BACKDROP_CONTAINER\"] = \"application.backdrop-container\";\n})(APPLICATION_COMPONENT_ELEMENT_ID || (APPLICATION_COMPONENT_ELEMENT_ID = {}));\nconst PLATFORM_NATIVE_KEYBOARD_SHORTCUTS = [\n 'Meta+KeyP', // Print\n 'Control+KeyP',\n 'Meta+KeyS', // Save\n 'Control+KeyS',\n 'F8', // Chrome: Developer Tools > Sources: Run or pause script\n 'F10', // Chrome: Developer Tools > Sources: Step over next function call\n 'F11', // Chrome: Developer Tools > Sources: Step into next function call\n 'Meta+Shift+KeyP', // Chrome: Developer Tools: Open Command Prompt inside developer tools\n 'Control+Backquote', // Chrome: Developer Tools: Open console\n 'Control+Shift+KeyN', // Chrome: Open Private Browsing (incognito)\n 'Control+Shift+KeyP', // Firefox: Open Private Browsing\n 'Meta+KeyB', // Firefox: Open bookmark sidebar\n 'Control+KeyB',\n 'F7', // Firefox: Caret browsing\n 'Alt+F7', // Firefox: Caret browsing (Mac)\n 'Control+Shift+KeyB',\n 'Alt+KeyZ', // Mac: special symbol\n];\nconst buildHotkeysConfiguration = (commandKeyMap, handler) => {\n const keyMap = {};\n commandKeyMap.forEach((keyCombinations, commandKey) => {\n if (keyCombinations.length) {\n keyMap[commandKey] = {\n combinations: keyCombinations,\n handler,\n };\n }\n });\n // Disable platform native keyboard shortcuts\n // NOTE: due to the order in which hotkey configuration is searched and applied,\n // we must place these after application hotkey configuration\n const PLATFORM_NATIVE_KEYBOARD_COMMAND = 'INTERNAL__PLATFORM_NATIVE_KEYBOARD_COMMAND';\n keyMap[PLATFORM_NATIVE_KEYBOARD_COMMAND] = {\n combinations: PLATFORM_NATIVE_KEYBOARD_SHORTCUTS,\n handler: (keyCombination, event) => {\n // prevent default from potentially clashing key combinations\n event.preventDefault();\n },\n };\n return keyMap;\n};\n/**\n * Some elements (e.g. <canvas>) and components that we do not control the implementation\n * might have special logic to prevent `keydown` event bubbling naturally, this\n * method forces those event to surface to the top of the app and being handled\n * by keybinding service\n */\nexport const forceDispatchKeyboardEvent = (event, applicationStore) => {\n applicationStore.layoutService\n .getElementByID(APPLICATION_COMPONENT_ELEMENT_ID.TOP_LEVEL_CONTAINER)\n ?.dispatchEvent(new KeyboardEvent(event.type, event));\n};\n/**\n * Potential location to mount backdrop on\n *\n * NOTE: we usually want the backdrop container to be the first child of its immediate parent\n * so that it properly lies under the content that we pick to show on top of the backdrop\n */\nexport const BackdropContainer = (props) => (_jsx(\"div\", { className: \"backdrop__container\", \"data-elementid\": props.elementId }));\nexport const ApplicationComponentFrameworkProvider = observer((props) => {\n const { children, enableTransitions, customFonts, disableVirtualAssistant, } = props;\n const applicationStore = useApplicationStore();\n const disableContextMenu = (event) => {\n event.stopPropagation();\n event.preventDefault();\n };\n const keyBindingMap = buildHotkeysConfiguration(applicationStore.keyboardShortcutsService.commandKeyMap, (keyCombination, event) => {\n // prevent default from potentially clashing key combinations with platform native keyboard shortcuts\n // NOTE: Though tempting since it's a good way to simplify and potentially avoid conflicts,\n // we should not call `preventDefault()` because if we have any hotkey sequence which is too short,\n // such as `r`, `a` - we risk blocking some very common interaction, i.e. user typing, or even\n // constructing longer key combinations\n if (PLATFORM_NATIVE_KEYBOARD_SHORTCUTS.includes(keyCombination)) {\n event.preventDefault();\n }\n applicationStore.keyboardShortcutsService.dispatch(keyCombination);\n });\n useEffect(() => {\n const onKeyEvent = createKeybindingsHandler(keyBindingMap);\n document.addEventListener('keydown', onKeyEvent);\n return () => {\n document.removeEventListener('keydown', onKeyEvent);\n };\n }, [keyBindingMap]);\n /**\n * Keep track of when the application usage is interrupted (e.g. when the app window/tab is not in focus),\n * since for certain platform, background contexts are de-prioritized, given less resources, and hence, would\n * run less performantly; and might require particular handlings.\n *\n * See https://developer.mozilla.org/en-US/docs/Web/API/Page_Visibility_API#policies_in_place_to_aid_background_page_performance\n * See https://plumbr.io/blog/performance-blog/background-tabs-in-browser-load-20-times-slower\n */\n useEffect(() => {\n const onVisibilityChange = () => {\n if (document.hidden) {\n LegendApplicationTelemetryHelper.logEvent_ApplicationUsageInterrupted(applicationStore.telemetryService);\n applicationStore.timeService.recordUsageInterruption();\n }\n };\n document.addEventListener('visibilitychange', onVisibilityChange);\n return () => {\n document.removeEventListener('visibilitychange', onVisibilityChange);\n };\n }, [applicationStore]);\n return (_jsxs(LegendStyleProvider, { enableTransitions: enableTransitions, customFonts: customFonts, children: [_jsx(BlockingAlert, {}), _jsx(ActionAlert, {}), _jsx(NotificationManager, {}), !disableVirtualAssistant && _jsx(VirtualAssistant, {}), applicationStore.layoutService.showBackdrop && (\n // We use <Portal> here to insert backdrop into different parts of the app\n // as backdrop relies heavily on z-index mechanism so its location in the DOM\n // really matters.\n // For example, the default location of the backdrop works fine for most cases\n // but if we want to use the backdrop for elements within modal dialogs, we would\n // need to mount the backdrop at a different location\n _jsx(Portal, { container: applicationStore.layoutService.getElementByID(applicationStore.layoutService.backdropContainerElementID ??\n APPLICATION_COMPONENT_ELEMENT_ID.BACKDROP_CONTAINER) ?? null, children: _jsx(Backdrop, { className: \"backdrop\", open: applicationStore.layoutService.showBackdrop }) })), _jsx(DndProvider, { backend: HTML5Backend, children: _jsxs(\"div\", { style: { height: '100%', width: '100%' }, \"data-elementid\": APPLICATION_COMPONENT_ELEMENT_ID.TOP_LEVEL_CONTAINER, \n // Disable global context menu so that only places in the app that supports context-menu will be effective\n onContextMenu: disableContextMenu, children: [_jsx(BackdropContainer, { elementId: APPLICATION_COMPONENT_ELEMENT_ID.BACKDROP_CONTAINER }), children] }) })] }));\n});\nexport const SimpleApplicationComponentFrameworkProvider = observer((props) => {\n const { children, enableTransitions, customFonts } = props;\n const applicationStore = useApplicationStore();\n const disableContextMenu = (event) => {\n event.stopPropagation();\n event.preventDefault();\n };\n const keyBindingMap = buildHotkeysConfiguration(applicationStore.keyboardShortcutsService.commandKeyMap, (keyCombination, event) => {\n // prevent default from potentially clashing key combinations with platform native keyboard shortcuts\n // NOTE: Though tempting since it's a good way to simplify and potentially avoid conflicts,\n // we should not call `preventDefault()` because if we have any hotkey sequence which is too short,\n // such as `r`, `a` - we risk blocking some very common interaction, i.e. user typing, or even\n // constructing longer key combinations\n if (PLATFORM_NATIVE_KEYBOARD_SHORTCUTS.includes(keyCombination)) {\n event.preventDefault();\n }\n applicationStore.keyboardShortcutsService.dispatch(keyCombination);\n });\n useEffect(() => {\n const onKeyEvent = createKeybindingsHandler(keyBindingMap);\n document.addEventListener('keydown', onKeyEvent);\n return () => {\n document.removeEventListener('keydown', onKeyEvent);\n };\n }, [keyBindingMap]);\n return (_jsx(LegendStyleProvider, { enableTransitions: enableTransitions, customFonts: customFonts, children: _jsx(DndProvider, { backend: HTML5Backend, children: _jsxs(\"div\", { style: { height: '100%', width: '100%' }, \"data-elementid\": APPLICATION_COMPONENT_ELEMENT_ID.TOP_LEVEL_CONTAINER, \n // Disable global context menu so that only places in the app that supports context-menu will be effective\n onContextMenu: disableContextMenu, children: [_jsx(BackdropContainer, { elementId: APPLICATION_COMPONENT_ELEMENT_ID.BACKDROP_CONTAINER }), children] }) }) }));\n});\n//# sourceMappingURL=ApplicationComponentFrameworkProvider.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { Terminal as XTermTerminal, } from 'xterm';\nimport { FitAddon as XTermFitAddon } from 'xterm-addon-fit';\nimport { SearchAddon as XTermSearchAddon, } from 'xterm-addon-search';\nimport { Unicode11Addon as XTermUnicode11Addon } from 'xterm-addon-unicode11';\nimport { WebglAddon as XTermWebglAddon } from 'xterm-addon-webgl';\nimport { DEFAULT_MONOSPACED_FONT_FAMILY, DEFAULT_TAB_SIZE, } from '../ApplicationConfig.js';\nimport { Terminal, DISPLAY_ANSI_ESCAPE, ANSI_moveCursor, } from './Terminal.js';\nimport { ActionState, guaranteeNonNullable, IllegalStateError, isMatchingKeyCombination, LogEvent, noop, prettyCONSTName, uniqBy, } from '@finos/legend-shared';\nimport { APPLICATION_EVENT } from '../../__lib__/LegendApplicationEvent.js';\nimport { forceDispatchKeyboardEvent } from '../../components/ApplicationComponentFrameworkProvider.js';\nconst LEGEND_XTERM_THEME = {\n foreground: '#cccccc',\n background: '#1e1e1e',\n cursor: '#cccccc',\n /** The accent color of the cursor (fg color for a block cursor) */\n // cursorAccent?: string;\n /** The selection background color when the terminal does not have focus (can be transparent) */\n // selectionInactiveBackground?: string;\n selectionBackground: '#264f78', // blue\n black: '#000000',\n red: '#cd3131',\n green: '#0dbc79',\n yellow: '#e5e510',\n blue: '#2472c8',\n magenta: '#bc3fbc',\n cyan: '#11a8cd',\n white: '#e5e5e5',\n brightBlack: '#666666',\n brightRed: '#f14c4c',\n brightGreen: '#23d18b',\n brightYellow: '#f5f543',\n brightBlue: '#3b8eea',\n brightMagenta: '#d670d6',\n brightCyan: '#29b8db',\n brightWhite: '#e5e5e5',\n};\nconst LEGEND_XTERM_SEARCH_THEME = {\n matchOverviewRuler: '#d186167e',\n activeMatchColorOverviewRuler: '#A0A0A0CC',\n matchBackground: '#62331c',\n activeMatchBackground: '#515C6A',\n};\n// robot acsii art\n// See https://asciiartist.com/ascii-art-micro-robot/\nconst getHelpCommandContent = (commandRegistry) => `\n${DISPLAY_ANSI_ESCAPE.BRIGHT_BLACK}+-------------------------------------------------------+${DISPLAY_ANSI_ESCAPE.RESET}\n${DISPLAY_ANSI_ESCAPE.BRIGHT_BLACK}|${DISPLAY_ANSI_ESCAPE.RESET} ${DISPLAY_ANSI_ESCAPE.BRIGHT_GREEN}[@@]${DISPLAY_ANSI_ESCAPE.RESET} \"Hi! Welcome to the HELP menu of Pure IDE\" ${DISPLAY_ANSI_ESCAPE.BRIGHT_BLACK}|${DISPLAY_ANSI_ESCAPE.RESET}\n${DISPLAY_ANSI_ESCAPE.BRIGHT_BLACK}|${DISPLAY_ANSI_ESCAPE.RESET} ${DISPLAY_ANSI_ESCAPE.BRIGHT_GREEN}/|__|\\\\${DISPLAY_ANSI_ESCAPE.RESET} ${DISPLAY_ANSI_ESCAPE.BRIGHT_BLACK}|${DISPLAY_ANSI_ESCAPE.RESET}\n${DISPLAY_ANSI_ESCAPE.BRIGHT_BLACK}+--${DISPLAY_ANSI_ESCAPE.RESET} ${DISPLAY_ANSI_ESCAPE.BRIGHT_GREEN}d b${DISPLAY_ANSI_ESCAPE.RESET} ${DISPLAY_ANSI_ESCAPE.BRIGHT_BLACK}-----------------------------------------------+${DISPLAY_ANSI_ESCAPE.RESET}\n\nFollowing is the list of supported commands:\n\n${uniqBy(Array.from(commandRegistry.values()), (config) => config.command)\n .map((config) => `${DISPLAY_ANSI_ESCAPE.BRIGHT_GREEN}${config.command.padEnd(30)}${DISPLAY_ANSI_ESCAPE.RESET}${config.description}${config.aliases?.length\n ? `\\n${''.padEnd(30)}Aliases: ${config.aliases.join(', ')}`\n : ''}\\n${''.padEnd(30)}Usage: ${DISPLAY_ANSI_ESCAPE.DIM}${config.usage}${DISPLAY_ANSI_ESCAPE.RESET}`)\n .join('\\n')}`;\nconst getCommonANSIEscapeSequencesForStyling = () => `\nCommon ANSI Escape Sequences for Styling:\n\n${Object.entries(DISPLAY_ANSI_ESCAPE)\n .map(([key, value]) => `${value}${prettyCONSTName(key).padEnd(20)}${DISPLAY_ANSI_ESCAPE.RESET\n// NOTE: since these are recommended ANSI escape sequences which can be used\n// by users in strings input in Pure IDE, they have to be Unicode escape, if we send\n// the original hexadecimal escape as part of the string, some string escape handling\n// in Pure seems to escape the leading slash of the ANSI escape sequence \\x1B; however\n// this is not the case of the escape sequence for Unicode, \\u001b hence our logic here\n} ${value.replace('\\x1b', '\\\\u001b')}`)\n .join('\\n')}`;\nconst DEFAULT_USER = 'purist';\nconst DEFAULT_COMMAND_HEADER = `\n${DISPLAY_ANSI_ESCAPE.BOLD}${DISPLAY_ANSI_ESCAPE.BRIGHT_BLUE}$${DEFAULT_USER}${DISPLAY_ANSI_ESCAPE.RESET}\n${DISPLAY_ANSI_ESCAPE.BOLD}${DISPLAY_ANSI_ESCAPE.MAGENTA}\\u276f${DISPLAY_ANSI_ESCAPE.RESET} `;\nconst COMMAND_START = '\\u276f ';\n/**\n * Custom link provider for xterm. As the weblink addon provided by xterm\n * only supports URLs, not any arbitrary patterns.\n * See https://github.com/xtermjs/xterm.js/tree/master/addons/addon-web-links\n *\n * Extracted code from https://github.com/LabhanshAgrawal/xterm-link-provider\n */\nclass RegexLinkProvider {\n terminal;\n regex;\n handler;\n constructor(terminal, regex, handler) {\n this.terminal = terminal;\n this.regex = regex;\n this.handler = handler;\n }\n provideLinks(lineNumber, callback) {\n const links = this.computeLink(lineNumber).map((link) => ({\n range: link.range,\n text: link.text,\n activate: this.handler,\n }));\n callback(links);\n }\n computeLink(lineNumber) {\n const [line, startLineIndex] = this.translateBufferLineToStringWithWrap(lineNumber - 1);\n const rex = new RegExp(this.regex.source, `${this.regex.flags || ''}g`);\n let match;\n let stringIndex = -1;\n const result = [];\n while ((match = rex.exec(line)) !== null) {\n const text = match[0]; // match_index=0, i.e. get the full match, not a particular group in the regex pattern\n if (!text) {\n // something matched but does not comply with the given match_index=0\n // since this is most likely a bug the regex itself we simply do nothing here\n break;\n }\n // Get index, match.index is for the outer match which includes negated chars\n // therefore we cannot use match.index directly, instead we search the position\n // of the match group in text again\n // also correct regex and string search offsets for the next loop run\n stringIndex = line.indexOf(text, stringIndex + 1);\n rex.lastIndex = stringIndex + text.length;\n if (stringIndex < 0) {\n // invalid stringIndex (should not have happened)\n break;\n }\n result.push({\n text,\n range: {\n start: this.stringIndexToBufferPosition(stringIndex, startLineIndex, false),\n end: this.stringIndexToBufferPosition(stringIndex + text.length - 1, startLineIndex, true),\n },\n });\n }\n return result;\n }\n /**\n * Given a line, walk upward or downward to get all wrapped line that includes the current line\n * Make sure matching accounts for text content split by wrapping.\n */\n translateBufferLineToStringWithWrap(lineIndex) {\n let lineString = '';\n let lineWrapsToNext;\n let prevLinesToWrap;\n do {\n const line = this.terminal.buffer.active.getLine(lineIndex);\n if (!line) {\n break;\n }\n if (line.isWrapped) {\n lineIndex--;\n }\n prevLinesToWrap = line.isWrapped;\n } while (prevLinesToWrap);\n const startLineIndex = lineIndex;\n do {\n const nextLine = this.terminal.buffer.active.getLine(lineIndex + 1);\n lineWrapsToNext = nextLine ? nextLine.isWrapped : false;\n const line = this.terminal.buffer.active.getLine(lineIndex);\n if (!line) {\n break;\n }\n lineString += line\n .translateToString(true)\n .substring(0, this.terminal.cols);\n lineIndex++;\n } while (lineWrapsToNext);\n return [lineString, startLineIndex];\n }\n stringIndexToBufferPosition(stringIndex, lineIndex, reportLastCell) {\n const cell = this.terminal.buffer.active.getNullCell();\n while (stringIndex) {\n const line = this.terminal.buffer.active.getLine(lineIndex);\n if (!line) {\n return { x: 0, y: 0 };\n }\n const length = line.length;\n let i = 0;\n while (i < length) {\n line.getCell(i, cell);\n stringIndex -= cell.getChars().length;\n if (stringIndex < 0) {\n return {\n x: i + (reportLastCell ? cell.getWidth() : 1),\n y: lineIndex + 1,\n };\n }\n i += cell.getWidth();\n }\n lineIndex++;\n }\n return { x: 1, y: lineIndex + 1 };\n }\n}\nexport class XTerm extends Terminal {\n instance;\n resizer;\n renderer;\n searcher;\n linkProvider;\n _TEMPORARY__onKeyListener;\n _TEMPORARY__onDataListener;\n command = '';\n commandHistory = [];\n currentCommandSearchString = '';\n commandHistoryNavigationIdx = undefined;\n isRunningCommand = false;\n setupState = ActionState.create();\n constructor(applicationStore) {\n super(applicationStore);\n this.instance = new XTermTerminal({\n allowProposedApi: true,\n fontSize: 12,\n letterSpacing: 2,\n fontWeight: 400,\n fontWeightBold: 700,\n fontFamily: `\"${DEFAULT_MONOSPACED_FONT_FAMILY}\", Menlo, Consolas, monospace`,\n tabStopWidth: DEFAULT_TAB_SIZE,\n theme: LEGEND_XTERM_THEME,\n overviewRulerWidth: 14, // 14px\n scrollback: 100000, // buffer a substantial content length\n convertEol: true, // treat \\n as new line\n // this is needed so we can control the cursor programmatically using escape sequences\n scrollOnUserInput: false,\n });\n this.resizer = new XTermFitAddon();\n this.searcher = new XTermSearchAddon();\n this.renderer = new XTermWebglAddon();\n }\n setup(configuration) {\n if (this.setupState.hasCompleted) {\n throw new IllegalStateError(`Terminal is already set up`);\n }\n this.setupState.complete();\n // Handling context loss: The browser may drop WebGL contexts for various reasons like OOM or after the system has been suspended.\n // An easy, but suboptimal way, to handle this is by disposing of WebglAddon when the `webglcontextlost` event fires\n // NOTE: we don't really have a resilient way to fallback right now, hopefully, the fallback is to render in DOM\n this.renderer.onContextLoss(() => {\n this.renderer.dispose();\n });\n this.instance.loadAddon(this.resizer);\n this.instance.loadAddon(this.searcher);\n this.instance.loadAddon(this.renderer);\n this.instance.loadAddon(new XTermUnicode11Addon());\n this.instance.unicode.activeVersion = '11';\n // NOTE: since we render the terminal using webgl/canvas, event is not bubbled\n // naturally through the DOM tree, we have to manually force this\n this.instance.attachCustomKeyEventHandler((event) => {\n // NOTE: this is a cheap way to handle hotkey, but this is really the only\n // hotkey we want to support at local scope of the terminal\n // also, since here we have prevent default and stop propagation, we have to do\n // this here instead at in `onKey` handler\n if (isMatchingKeyCombination(event, 'Control+KeyF') ||\n isMatchingKeyCombination(event, 'Meta+KeyF')) {\n // prevent default so as to not trigger browser platform search command\n event.preventDefault();\n event.stopPropagation();\n this.searchConfig.focus();\n return false;\n }\n else if (\n // NOTE: by default Ctrl+C gets sent to the shell as you wouldn't be able to use bash otherwise.\n // We need this special handling here for normal copy behavior on Windows.\n // Paste (Ctrl+V) not working on Windows could also be due to the same reason, so we would not\n // manually handle that using `xterm.onKey` neither\n // See https://github.com/xtermjs/xterm.js/issues/1868\n // See https://github.com/microsoft/vscode/issues/6451\n (isMatchingKeyCombination(event, 'Control+KeyC') &&\n this.instance.hasSelection()) ||\n isMatchingKeyCombination(event, 'Control+KeyV')) {\n return false;\n }\n return true; // return true to indicate the event should still be handled by xterm\n });\n if (configuration?.webLinkProvider) {\n this.linkProvider = this.instance.registerLinkProvider(new RegexLinkProvider(this.instance, configuration.webLinkProvider.regex, configuration.webLinkProvider.handler));\n }\n (configuration?.commands ?? []).forEach((commandConfig) => {\n [commandConfig.command, ...(commandConfig.aliases ?? [])].forEach((command) => {\n if (!this.commandRegistry.has(command)) {\n this.commandRegistry.set(command, commandConfig);\n }\n else {\n this.applicationStore.logService.warn(LogEvent.create(APPLICATION_EVENT.TERMINAL_COMMAND_CONFIGURATION_CHECK__FAILURE), `Found multiple duplicated terminal commands '${command}'`);\n }\n });\n });\n this.searcher.onDidChangeResults((result) => {\n this.setSearchResultCount(result.resultCount);\n this.setSearchCurrentResultIndex(result.resultIndex);\n });\n // NOTE: `xterm` expects to be attached to a proper terminal program which handles\n // input, since we can't do that yet, we implement a fairly basic input handling flow\n // See https://github.com/xtermjs/xterm.js/issues/617#issuecomment-288849502\n this._TEMPORARY__onKeyListener = this.instance.onKey(({ key, domEvent }) => {\n // take care of command history navigation\n if (domEvent.code === 'ArrowUp') {\n this.setCommandFromHistory(this.commandHistoryNavigationIdx !== undefined\n ? this.commandHistoryNavigationIdx + 1\n : 0);\n return;\n // reset current command in place\n }\n else if (domEvent.code === 'ArrowDown') {\n if (this.commandHistoryNavigationIdx !== undefined) {\n this.setCommandFromHistory(this.commandHistoryNavigationIdx === 0\n ? undefined\n : this.commandHistoryNavigationIdx - 1);\n }\n return;\n }\n else {\n // reset navigation history the moment any other key is pressed\n this.commandHistoryNavigationIdx = undefined;\n }\n if (domEvent.code === 'Enter') {\n // run command\n if (this.command.trim()) {\n const text = this.command;\n const [command, ...args] = text.replaceAll(/\\s+/g, ' ').split(' ');\n this.addCommandToHistory(this.command);\n if (!command) {\n return;\n }\n const matchingCommand = this.commandRegistry.get(command);\n if (!matchingCommand) {\n this.fail(`command not found: ${command}`);\n return;\n }\n if (this.isRunningCommand) {\n return;\n }\n this.isRunningCommand = true;\n matchingCommand\n .handler(args.map((arg) => arg.trim()), command, text)\n .catch(noop())\n .finally(() => {\n this.isRunningCommand = false;\n if (!this.isFlushed) {\n this.abort();\n }\n });\n }\n }\n else if (isMatchingKeyCombination(domEvent, 'Control+KeyD') ||\n // NOTE: this handling here makes the assumption that the hotkey used for copying is\n // fixed to `Control+KeyC` (for Windows), it doesn't handling a different assignment\n (isMatchingKeyCombination(domEvent, 'Control+KeyC') &&\n !this.instance.hasSelection())) {\n // abort command\n this.abort();\n }\n else if (domEvent.code === 'Backspace') {\n // Alt: jump word only, Ctrl: jump to end\n // this would apply for Delete, ArrowLeft, ArrowRight\n this.deleteFromCommand(domEvent.altKey || domEvent.ctrlKey\n ? this.computeCursorJumpMovement(true)\n : -1);\n }\n else if (domEvent.code === 'Delete') {\n this.deleteFromCommand(domEvent.altKey || domEvent.ctrlKey\n ? this.computeCursorJumpMovement(false)\n : 1);\n }\n else if (domEvent.code === 'ArrowLeft') {\n const movement = this.computeCursorMovement(domEvent.altKey || domEvent.ctrlKey\n ? this.computeCursorJumpMovement(true)\n : -1);\n this.instance.scrollLines(movement.scroll);\n this.instance.write(movement.seq);\n }\n else if (domEvent.code === 'ArrowRight') {\n const movement = this.computeCursorMovement(domEvent.altKey || domEvent.ctrlKey\n ? this.computeCursorJumpMovement(false)\n : 1);\n this.instance.scrollLines(movement.scroll);\n this.instance.write(movement.seq);\n }\n else if (\n // use key here so we absolute do not allow any characters other than these\n // being added to the input command\n key.match(/^[A-Za-z0-9!@#$%^&*()\\-_=+\"':;,.<>/?[\\]{}|\\\\~` ]$/)) {\n // commonly supported keys\n this.writeToCommand(key);\n }\n else {\n // for the rest, allow the keyboard event to be bubbled to\n // application keyboard shortcuts handler\n forceDispatchKeyboardEvent(domEvent, this.applicationStore);\n }\n });\n // this is needed to support copy-pasting\n this._TEMPORARY__onDataListener = this.instance.onData((val) => {\n // only support pasting (not meant for 1 character though) and special functions starting with special\n // ANSI escape sequence\n if (val.length > 1 && !val.startsWith('\\x1b')) {\n this.writeToCommand(val\n // remove all unsupported characters, including newline\n .replaceAll(/[^A-Za-z0-9!@#$%^&*()\\-_=+\"':;,.<>/?[\\]{}|\\\\~` ]/g, '')\n .trimEnd());\n }\n });\n }\n // NOTE: this is fairly HACKY way to detect command\n // we don't really have a better solution at the moment,\n // but we should come with more systematic way of persisting the start line of command\n // the challenge with this is due to text-reflow\n //\n // there is also a quriky known issue with text-reflow and the line with cursor\n // See https://github.com/xtermjs/xterm.js/issues/1941#issuecomment-463660633\n getCommandRange() {\n const buffer = this.instance.buffer.active;\n const cols = this.instance.cols;\n const commandText = `${COMMAND_START}${this.command}`;\n const commandFirstLine = `${COMMAND_START}${this.command.substring(0, cols - COMMAND_START.length)}${this.command.length < cols - COMMAND_START.length\n ? ' '.repeat(cols - this.command.length - COMMAND_START.length)\n : ''}`;\n let startY = 0;\n let cursorIdx = 0;\n for (let i = buffer.baseY + buffer.cursorY; i > -1; --i) {\n const line = guaranteeNonNullable(buffer.getLine(i));\n const lineText = line.translateToString();\n if (lineText === commandFirstLine) {\n startY = i;\n cursorIdx +=\n (i === buffer.baseY + buffer.cursorY ? buffer.cursorX : cols) -\n COMMAND_START.length;\n break;\n }\n else {\n cursorIdx +=\n i === buffer.baseY + buffer.cursorY ? buffer.cursorX : cols;\n }\n }\n // start line == -1 is the rare case where the command is too long and exceeds the buffer length\n // leading to incomplete command being captured\n return {\n startY,\n startX: COMMAND_START.length,\n endY: startY + (commandText.length - (commandText.length % cols)) / cols,\n endX: commandText.length % cols,\n cursorIdx,\n };\n }\n computeCursorJumpMovement(back) {\n const range = this.getCommandRange();\n let distance = undefined;\n let foundWord = false;\n // scan for the boundary of the closest word to the cursor position\n if (back) {\n for (let i = range.cursorIdx - 1; i > -1; --i) {\n const char = this.command.charAt(i);\n if (char.match(/\\w/)) {\n if (!foundWord) {\n foundWord = true;\n }\n }\n else {\n if (foundWord) {\n distance = range.cursorIdx - i - 1;\n break;\n }\n }\n }\n }\n else {\n for (let i = range.cursorIdx + 1; i < this.command.length; ++i) {\n const char = this.command.charAt(i);\n if (char.match(/\\w/)) {\n if (!foundWord) {\n foundWord = true;\n }\n }\n else {\n if (foundWord) {\n distance = i - range.cursorIdx - 1;\n break;\n }\n }\n }\n }\n if (distance === undefined) {\n distance = back ? range.cursorIdx : this.command.length - range.cursorIdx;\n }\n return back ? -distance : distance;\n }\n /**\n * Generate the ANSI escape sequence for new cursor position\n * after being moved by the the number of cells.\n *\n * @param val a number (negative means cursor move leftwards)\n * @param limit whether to limit the movement of the cursor by the command range\n * @returns cursor movement information including the ANSI escape sequence for new cursor position and scroll distance\n */\n computeCursorMovement(val, limit = true) {\n const buffer = this.instance.buffer.active;\n const cols = this.instance.cols;\n const rows = this.instance.rows;\n const range = this.getCommandRange();\n const maxDistance = limit\n ? val < 0\n ? range.cursorIdx\n : this.command.length - range.cursorIdx\n : val;\n const distance = Math.min(Math.abs(val), maxDistance);\n let newCursorX = buffer.cursorX;\n let newCursorY = buffer.cursorY;\n let abs_cursorY = buffer.baseY + buffer.cursorY;\n if (val < 0) {\n // move leftwards\n newCursorX = (cols + ((buffer.cursorX - distance) % cols)) % cols;\n newCursorY =\n buffer.cursorY -\n (distance > buffer.cursorX ? Math.ceil(distance / cols) : 0);\n abs_cursorY = newCursorY + buffer.baseY;\n newCursorY = Math.max(newCursorY, -1);\n }\n else if (val > 0) {\n // move rightwards\n newCursorX = (buffer.cursorX + distance) % cols;\n newCursorY =\n buffer.cursorY +\n (buffer.cursorX + distance >= cols\n ? Math.floor((buffer.cursorX + distance) / cols)\n : 0);\n abs_cursorY = newCursorY + buffer.baseY;\n newCursorY = Math.min(newCursorY, rows - 1);\n }\n const scroll = abs_cursorY > buffer.viewportY + rows\n ? abs_cursorY - (buffer.viewportY + rows)\n : abs_cursorY < buffer.viewportY\n ? abs_cursorY - buffer.viewportY\n : 0;\n return {\n // NOTE: currently, there is a design limitation with programmatically set the cursor using escape sequence\n // by design, the scrollback (everything above the viewport/ybase) is readonly, and most terminals work like this.\n // So for very long command that causes an overflow, one cannot set the cursor position pass the `baseY`\n // this will affect both navigation and delete/backspace behavior\n // See https://github.com/xtermjs/xterm.js/issues/4405\n seq: ANSI_moveCursor(newCursorY + 1, newCursorX + 1),\n scroll,\n };\n }\n /**\n * Write value to command with awareness of the current cursor position\n */\n writeToCommand(val) {\n const range = this.getCommandRange();\n const left = this.command.slice(0, range.cursorIdx);\n const right = this.command.slice(range.cursorIdx);\n const movement = this.computeCursorMovement(val.length, false);\n this.instance.scrollLines(movement.scroll);\n this.instance.write(val +\n right +\n // update the cursor\n movement.seq);\n this.setCommand(left + val + right);\n }\n /**\n * Remove number of characters from command with awareness of the current cursor position\n * NOTE: negative number means backward deleting (i.e. backspace)\n */\n deleteFromCommand(val) {\n const range = this.getCommandRange();\n const maxDistance = val < 0 ? range.cursorIdx : this.command.length - range.cursorIdx;\n const distance = Math.min(Math.abs(val), maxDistance);\n let left;\n let right;\n let cursorMovement;\n if (val === 0) {\n return;\n }\n else if (val < 0) {\n // remove leftwards\n left = this.command.slice(0, range.cursorIdx - distance);\n right = this.command.slice(range.cursorIdx, this.command.length);\n cursorMovement = -distance;\n }\n else {\n // remove rightwards\n left = this.command.slice(0, range.cursorIdx);\n right = this.command.slice(range.cursorIdx + distance, this.command.length);\n cursorMovement = 0;\n }\n const movement = this.computeCursorMovement(cursorMovement);\n this.instance.scrollLines(movement.scroll);\n this.instance.write(\n // reset cursor to start of command, basically here, we're rewriting the entire command\n ANSI_moveCursor(range.startY + 1, range.startX + 1) +\n left +\n right +\n // fill space to erase cells rendered from previous command\n ' '.repeat(distance) +\n // move the cursor as well\n movement.seq);\n this.setCommand(left + right);\n }\n get isSetup() {\n return this.setupState.hasCompleted;\n }\n isFocused() {\n return document.activeElement === this.instance.textarea;\n }\n mount(container) {\n if (!this.setupState.hasCompleted) {\n throw new IllegalStateError(`XTerm terminal has not been set up yet`);\n }\n this.instance.open(container);\n }\n dispose() {\n this.searcher.dispose();\n this.resizer.dispose();\n this.renderer.dispose();\n this.linkProvider?.dispose();\n this._TEMPORARY__onKeyListener?.dispose();\n this._TEMPORARY__onDataListener?.dispose();\n this.instance.dispose();\n }\n autoResize() {\n this.resizer.fit();\n }\n focus() {\n this.instance.focus();\n }\n addCommandToHistory(val) {\n // if this is the same as previous command, do not push it to the history stack\n if (val === this.commandHistory.at(0)) {\n return;\n }\n // history command is essentially a stack, so we only insert at the beginning\n this.commandHistory.unshift(val);\n }\n /**\n * This methods help update the current command to a command in history\n * stack, it does the necessary resetting and helps properly update\n * the history navigation index\n */\n setCommandFromHistory(idx) {\n const val = idx === undefined\n ? this.currentCommandSearchString\n : // NOTE: only consider commands starting with the original command\n // also note that empty string naturaly match all history command\n this.commandHistory\n .filter((command) => command.startsWith(this.currentCommandSearchString))\n .at(idx);\n if (val !== undefined) {\n let range = this.getCommandRange();\n this.instance.write(\n // reset cursor to start of command and rewrite the entire command\n ANSI_moveCursor(range.startY + 1, range.startX + 1) +\n val.padEnd(this.command.length));\n this.command = val;\n range = this.getCommandRange();\n this.instance.write(\n // reset cursor to command end\n ANSI_moveCursor(range.endY + 1, range.endX + 1));\n this.commandHistoryNavigationIdx = idx;\n }\n }\n setCommand(val) {\n this.command = val;\n this.currentCommandSearchString = val;\n this.commandHistoryNavigationIdx = undefined;\n }\n newCommand() {\n this.instance.write(DEFAULT_COMMAND_HEADER);\n this.setCommand('');\n }\n newSystemCommand(command) {\n // if another command is already running, we don't need to print the command header anymore\n // the potential pitfall here is that we could have another process prints to the\n // terminal while the command is being run. Nothing much we can do here for now.\n if (!this.isRunningCommand) {\n if (this.command) {\n this.abort();\n this.newCommand();\n }\n this.instance.write(`${DISPLAY_ANSI_ESCAPE.DIM}(system: ${command})\\n${DISPLAY_ANSI_ESCAPE.RESET}`);\n }\n }\n /**\n * Flush the terminal screen completely\n *\n * Probably due to write buffer batching, calling `reset` or `clear` on xterm terminal immediately after\n * write commands will not work. To solve this, we can either promisify the `reset` call or write the ANSI\n * reset sequence \\x1bc\n */\n flushScreen() {\n this.instance.write('\\x1bc');\n this.instance.reset();\n }\n get isFlushed() {\n const buffer = this.instance.buffer.active;\n let isLastLineEmpty = true;\n for (let i = buffer.baseY + buffer.cursorY; i > -1; --i) {\n const line = guaranteeNonNullable(buffer.getLine(i));\n const lineText = line.translateToString();\n // skip empty lines\n if (!lineText.trim()) {\n continue;\n }\n else {\n isLastLineEmpty = lineText !== COMMAND_START;\n break;\n }\n }\n return this.command === '' && isLastLineEmpty;\n }\n clear() {\n this.flushScreen();\n this.instance.scrollToTop();\n this.newCommand();\n }\n resetANSIStyling() {\n this.instance.write(DISPLAY_ANSI_ESCAPE.RESET);\n }\n showHelp() {\n this.resetANSIStyling();\n this.instance.scrollToBottom();\n if (!this.isFlushed && !this.isRunningCommand) {\n this.abort();\n }\n this.instance.write(getHelpCommandContent(this.commandRegistry));\n this.abort();\n }\n showCommonANSIEscapeSequences() {\n this.resetANSIStyling();\n this.instance.scrollToBottom();\n if (!this.isFlushed && !this.isRunningCommand) {\n this.abort();\n }\n this.instance.write(getCommonANSIEscapeSequencesForStyling());\n this.abort();\n }\n abort() {\n this.resetANSIStyling();\n this.instance.write('\\n');\n this.newCommand();\n this.instance.scrollToBottom();\n this.isRunningCommand = false;\n }\n fail(error, opts) {\n if (opts?.systemCommand) {\n this.newSystemCommand(opts.systemCommand);\n }\n this.instance.write(`\\n${error}`);\n this.abort();\n }\n output(val, opts) {\n this.resetANSIStyling();\n if ((!opts?.clear || this.preserveLog) && opts?.systemCommand) {\n this.newSystemCommand(opts.systemCommand);\n }\n if (!this.preserveLog && opts?.clear) {\n this.flushScreen();\n }\n else if (this.preserveLog || this.isRunningCommand) {\n this.instance.write('\\n');\n }\n this.instance.write(val);\n this.resetANSIStyling();\n this.instance.write('\\n');\n this.instance.scrollToBottom();\n this.newCommand();\n }\n search(val) {\n this.searcher.findNext(val, {\n decorations: LEGEND_XTERM_SEARCH_THEME,\n regex: this.searchConfig.useRegex,\n wholeWord: this.searchConfig.matchWholeWord,\n caseSensitive: this.searchConfig.matchCaseSensitive,\n // do incremental search so that the expansion will be expanded the selection if it\n // still matches the term the user typed.\n incremental: true,\n });\n }\n clearSearch() {\n this.searcher.clearDecorations();\n this.instance.clearSelection();\n this.setSearchText('');\n this.setSearchResultCount(undefined);\n this.setSearchCurrentResultIndex(undefined);\n }\n findPrevious() {\n this.searcher.findPrevious(this.searchConfig.searchText, {\n decorations: LEGEND_XTERM_SEARCH_THEME,\n regex: this.searchConfig.useRegex,\n wholeWord: this.searchConfig.matchWholeWord,\n caseSensitive: this.searchConfig.matchCaseSensitive,\n });\n }\n findNext() {\n this.searcher.findNext(this.searchConfig.searchText, {\n decorations: LEGEND_XTERM_SEARCH_THEME,\n regex: this.searchConfig.useRegex,\n wholeWord: this.searchConfig.matchWholeWord,\n caseSensitive: this.searchConfig.matchCaseSensitive,\n });\n }\n getContent() {\n const buffer = this.instance.buffer.active;\n const lines = [];\n for (let i = 0; i < buffer.length; ++i) {\n const line = guaranteeNonNullable(buffer.getLine(i));\n lines.push(line.translateToString());\n }\n return lines.join('\\n').trimEnd();\n }\n copy() {\n if (!this.instance.hasSelection()) {\n this.applicationStore.notificationService.notifyWarning(`Ther terminal has no selection to copy`);\n return;\n }\n this.applicationStore.clipboardService\n .copyTextToClipboard(this.instance.getSelection())\n .catch(this.applicationStore.alertUnhandledError);\n }\n copyAll() {\n this.applicationStore.clipboardService\n .copyTextToClipboard(this.getContent())\n .catch(this.applicationStore.alertUnhandledError);\n }\n}\n//# sourceMappingURL=XTerm.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { XTerm } from './terminal/XTerm.js';\nexport class TerminalService {\n applicationStore;\n terminal;\n constructor(applicationStore) {\n this.applicationStore = applicationStore;\n this.terminal = new XTerm(applicationStore);\n }\n}\n//# sourceMappingURL=TerminalService.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { action, makeObservable, observable } from 'mobx';\nconst UNKNOWN_USER_ID = '(unknown)';\nexport class IdentityService {\n applicationStore;\n currentUser = UNKNOWN_USER_ID;\n constructor(applicationStore) {\n makeObservable(this, {\n currentUser: observable,\n setCurrentUser: action,\n });\n this.applicationStore = applicationStore;\n }\n get isAnonymous() {\n return this.currentUser === UNKNOWN_USER_ID;\n }\n setCurrentUser(val) {\n this.currentUser = val;\n }\n}\n//# sourceMappingURL=IdentityService.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport var LEGEND_APPLICATION_COLOR_THEME;\n(function (LEGEND_APPLICATION_COLOR_THEME) {\n LEGEND_APPLICATION_COLOR_THEME[\"DEFAULT_DARK\"] = \"default-dark\";\n LEGEND_APPLICATION_COLOR_THEME[\"LEGACY_LIGHT\"] = \"legacy-light\";\n LEGEND_APPLICATION_COLOR_THEME[\"HIGH_CONTRAST_LIGHT\"] = \"hc-light\";\n LEGEND_APPLICATION_COLOR_THEME[\"HIGH_CONTRAST_DARK\"] = \"hc-dark\";\n})(LEGEND_APPLICATION_COLOR_THEME || (LEGEND_APPLICATION_COLOR_THEME = {}));\nexport const DEFAULT_DARK_COLOR_THEME = {\n name: 'Default Dark (default)',\n key: LEGEND_APPLICATION_COLOR_THEME.DEFAULT_DARK,\n TEMPORARY__globalCSSClassName: 'theme__default-dark',\n colors: {\n 'data-access-overview.chart.access-granted': '#6a9955',\n 'data-access-overview.chart.access-approved': '#007acc',\n 'data-access-overview.chart.access-requested': '#fbbc05',\n 'data-access-overview.chart.access-not-granted': '#ea4646',\n 'data-access-overview.chart.unsupported-access': '#2d2d2d',\n },\n};\nexport const LEGACY_LIGHT_COLOR_THEME = {\n name: 'Legacy Light',\n key: LEGEND_APPLICATION_COLOR_THEME.LEGACY_LIGHT,\n TEMPORARY__globalCSSClassName: 'theme__legacy-light',\n};\nexport const HIGH_CONTRAST_LIGHT_COLOR_THEME = {\n name: 'High-Contrast Light',\n key: LEGEND_APPLICATION_COLOR_THEME.HIGH_CONTRAST_LIGHT,\n TEMPORARY__globalCSSClassName: 'theme__hc-light',\n colors: {\n 'data-access-overview.chart.access-granted': '#52a31d',\n 'data-access-overview.chart.access-approved': '#3d8df5',\n 'data-access-overview.chart.access-requested': '#f5c518',\n 'data-access-overview.chart.access-not-granted': '#fa5343',\n 'data-access-overview.chart.unsupported-access': '#e1e7ea',\n },\n};\nexport const HIGH_CONTRAST_DARK_COLOR_THEME = {\n name: 'High-Contrast Dark',\n key: LEGEND_APPLICATION_COLOR_THEME.HIGH_CONTRAST_DARK,\n TEMPORARY__globalCSSClassName: 'theme__hc-dark',\n colors: {\n 'data-access-overview.chart.access-granted': '#6a9955',\n 'data-access-overview.chart.access-approved': '#7399c6',\n 'data-access-overview.chart.access-requested': '#fbbc05',\n 'data-access-overview.chart.access-not-granted': '#ea4646',\n 'data-access-overview.chart.unsupported-access': '#2a2a2a',\n },\n};\n//# sourceMappingURL=LegendApplicationColorTheme.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { guaranteeNonNullable } from '@finos/legend-shared';\nexport class LocalStorage {\n get localStorage() {\n return guaranteeNonNullable(window.localStorage, `'window.localStorage' object is not available in non-web environment`);\n }\n setItem(key, value) {\n this.localStorage.setItem(key, value);\n }\n getItem(key) {\n return this.localStorage.getItem(key);\n }\n removeItem(key) {\n this.localStorage.removeItem(key);\n }\n clear() {\n this.localStorage.clear();\n }\n hasItem(key) {\n return this.localStorage.hasItem(key);\n }\n}\n//# sourceMappingURL=ApplicationStorage.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { guaranteeIsNumber, guaranteeIsString, guaranteeIsBoolean, guaranteeIsObject, isNonNullable, returnUndefOnError, isEmpty, } from '@finos/legend-shared';\nimport { LocalStorage } from './ApplicationStorage.js';\nexport class StorageStore {\n storeIndex;\n storageService;\n data;\n constructor(storageService, storeIndex) {\n this.storageService = storageService;\n this.storeIndex = storeIndex;\n this.data = this.storageService.getIndex(this.storeIndex) ?? {};\n }\n getValue(key) {\n return this.data[key];\n }\n getNumericValue(key) {\n const value = this.getValue(key);\n return value !== undefined ? guaranteeIsNumber(value) : undefined;\n }\n getStringValue(key) {\n const value = this.getValue(key);\n return value !== undefined ? guaranteeIsString(value) : undefined;\n }\n getBooleanValue(key) {\n const value = this.getValue(key);\n return value !== undefined ? guaranteeIsBoolean(value) : undefined;\n }\n getObjectValue(key) {\n const value = this.getValue(key);\n return value !== undefined ? guaranteeIsObject(value) : undefined;\n }\n hasValue(key) {\n return isNonNullable(this.data[key]);\n }\n persistValue(key, value) {\n if (value !== undefined) {\n this.data[key] = value;\n }\n else {\n delete this.data[key];\n }\n this.storageService.updateIndex(this.storeIndex, this.data);\n }\n}\nexport class StorageService {\n applicationStore;\n storage;\n data;\n constructor(applicationStore) {\n this.applicationStore = applicationStore;\n this.storage = new LocalStorage();\n const data = this.storage.getItem(applicationStore.config.applicationStorageKey);\n this.data = data\n ? (returnUndefOnError(() => JSON.parse(data)) ?? {})\n : {};\n }\n getIndex(index) {\n return this.data[index];\n }\n updateIndex(index, value) {\n if (isEmpty(value)) {\n delete this.data[index];\n }\n else {\n this.data[index] = value;\n }\n this.storage.setItem(this.applicationStore.config.applicationStorageKey, JSON.stringify(this.data));\n }\n}\n//# sourceMappingURL=StorageService.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { AbstractPlugin, } from '@finos/legend-shared';\nexport class TelemetryServicePlugin extends AbstractPlugin {\n userId;\n appName;\n appVersion;\n appEnv;\n appSessionId;\n appStartTime;\n install(pluginManager) {\n pluginManager.registerTelemetryServicePlugin(this);\n }\n setup(config) {\n this.userId = config.userId;\n this.appName = config.appName;\n this.appVersion = config.appVersion;\n this.appEnv = config.appEnv;\n this.appSessionId = config.appSessionId;\n this.appStartTime = config.appStartTime;\n }\n}\nexport class TelemetryService {\n applicationStore;\n plugins = [];\n constructor(applicationStore) {\n this.applicationStore = applicationStore;\n }\n registerPlugins(plugins) {\n this.plugins = plugins;\n }\n setup() {\n const config = {\n userId: this.applicationStore.identityService.currentUser,\n appName: this.applicationStore.config.appName,\n appEnv: this.applicationStore.config.env,\n appVersion: this.applicationStore.config.appVersion,\n appSessionId: this.applicationStore.uuid,\n appStartTime: this.applicationStore.timeService.timestamp,\n };\n this.plugins.forEach((plugin) => plugin.setup(config));\n }\n logEvent(eventType, data) {\n this.plugins.forEach((plugin) => plugin.logEvent(eventType, data));\n }\n}\n//# sourceMappingURL=TelemetryService.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport class TimeService {\n timestamp = Date.now();\n /**\n * Record the instances where the application usage is interrupted (e.g. when the app window/tab is not in focus),\n * this is useful to know since for certain platform, background contexts are de-prioritized, given less resources,\n * and hence, would run less performantly.\n *\n * See https://developer.mozilla.org/en-US/docs/Web/API/Page_Visibility_API#policies_in_place_to_aid_background_page_performance\n * See https://plumbr.io/blog/performance-blog/background-tabs-in-browser-load-20-times-slower\n *\n * This impacts certain operations such as scheduler and timer in the app, so it's useful to keep track of these here.\n */\n interruptions = [];\n recordUsageInterruption() {\n this.interruptions.push(Date.now());\n }\n finalizeTimingsRecord(stopWatch, timings) {\n const totalTime = stopWatch.elapsed;\n const startTime = stopWatch.startTime;\n const endTime = startTime + totalTime;\n const record = {\n ...(timings ?? {}),\n ...Object.fromEntries(stopWatch.records),\n total: totalTime,\n };\n // count the number of interruptions\n let numberOfInteruptions = 0;\n for (const interruption of this.interruptions) {\n if (interruption >= startTime && interruption <= endTime) {\n numberOfInteruptions++;\n }\n else if (interruption > endTime) {\n break;\n }\n }\n return numberOfInteruptions > 0\n ? { ...record, __numberOfInteruptions: numberOfInteruptions }\n : record;\n }\n}\n//# sourceMappingURL=TimeService.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { LEGEND_APPLICATION_COLOR_THEME } from './LegendApplicationColorTheme.js';\nexport var LEGEND_APPLICATION_SETTING_KEY;\n(function (LEGEND_APPLICATION_SETTING_KEY) {\n LEGEND_APPLICATION_SETTING_KEY[\"COLOR_THEME\"] = \"application.layout.colorTheme\";\n})(LEGEND_APPLICATION_SETTING_KEY || (LEGEND_APPLICATION_SETTING_KEY = {}));\nexport const LEGEND_APPLICATION_SETTING_CONFIG = {\n [LEGEND_APPLICATION_SETTING_KEY.COLOR_THEME]: {\n defaultValue: LEGEND_APPLICATION_COLOR_THEME.DEFAULT_DARK,\n },\n};\n//# sourceMappingURL=LegendApplicationSetting.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { action, computed, makeObservable, observable } from 'mobx';\nimport { LEGEND_APPLICATION_SETTING_KEY } from '../__lib__/LegendApplicationSetting.js';\nimport { LogEvent, guaranteeNonNullable } from '@finos/legend-shared';\nimport { APPLICATION_EVENT } from '../__lib__/LegendApplicationEvent.js';\nimport { DEFAULT_DARK_COLOR_THEME, LEGEND_APPLICATION_COLOR_THEME, } from '../__lib__/LegendApplicationColorTheme.js';\nexport class LayoutService {\n applicationStore;\n // backdrop\n backdropContainerElementID;\n showBackdrop = false;\n // color theme\n colorThemeRegistry = new Map();\n currentColorTheme;\n constructor(applicationStore) {\n makeObservable(this, {\n currentColorTheme: observable.ref,\n TEMPORARY__isLightColorThemeEnabled: computed,\n backdropContainerElementID: observable,\n showBackdrop: observable,\n setBackdropContainerElementID: action,\n setShowBackdrop: action,\n setColorTheme: action,\n });\n this.applicationStore = applicationStore;\n // register core color themes\n // TODO: we might want to cover at least: a dark theme, a light theme, and a high contrast theme (etc.)\n // as part of core\n this.colorThemeRegistry.set(LEGEND_APPLICATION_COLOR_THEME.DEFAULT_DARK, DEFAULT_DARK_COLOR_THEME);\n // register color themes from extensions\n this.applicationStore.pluginManager\n .getApplicationPlugins()\n .flatMap((plugin) => plugin.getExtraColorThemes?.() ?? [])\n .forEach((colorTheme) => {\n // NOTE: in the future, when we need to make theme extensible, we might want to reconsider this decision here\n // perhaps, each extension can define a new set of color keys that each theme supports and the core theme is extensible\n // while non-core themes are left in a separate package/module and might/might not have support for those color keys\n if (this.colorThemeRegistry.has(colorTheme.key)) {\n this.applicationStore.logService.warn(LogEvent.create(APPLICATION_EVENT.COLOR_THEME_CONFIGURATION_CHECK__FAILURE), `Found duplicated color themes with key '${colorTheme.key}'`);\n return;\n }\n this.colorThemeRegistry.set(colorTheme.key, colorTheme);\n });\n const themeKey = this.applicationStore.settingService.getStringValue(LEGEND_APPLICATION_SETTING_KEY.COLOR_THEME) ?? LEGEND_APPLICATION_COLOR_THEME.DEFAULT_DARK;\n this.currentColorTheme = guaranteeNonNullable(this.colorThemeRegistry.get(themeKey));\n this.TEMPORARY__syncGlobalCSSClassName(this.currentColorTheme, undefined);\n }\n getElementByID(val) {\n return document.querySelector(`[data-elementid='${val}']`) ?? undefined;\n }\n setWindowTitle(value) {\n document.title = value;\n }\n /**\n * Change the ID used to find the base element to mount the backdrop on.\n * This is useful when we want to use backdrop with embedded application which\n * requires its own backdrop usage.\n *\n * TODO?: we can consider making backdrop container component auto-register its ID\n * as it gets rendered in the application\n */\n setBackdropContainerElementID(val) {\n this.backdropContainerElementID = val;\n }\n setShowBackdrop(val) {\n this.showBackdrop = val;\n }\n /**\n * NOTE: this is the poor man way of doing theming as we only properly support dark color theme\n * This flag is binary because we did light color theme in rush\n *\n * See https://github.com/finos/legend-studio/issues/264\n */\n get TEMPORARY__isLightColorThemeEnabled() {\n return (this.currentColorTheme.key !==\n LEGEND_APPLICATION_COLOR_THEME.DEFAULT_DARK &&\n this.currentColorTheme.key !==\n LEGEND_APPLICATION_COLOR_THEME.HIGH_CONTRAST_DARK);\n }\n TEMPORARY__syncGlobalCSSClassName(theme, previousTheme) {\n if (previousTheme) {\n document.body.classList.remove(previousTheme.TEMPORARY__globalCSSClassName);\n }\n document.body.classList.add(theme.TEMPORARY__globalCSSClassName);\n }\n setColorTheme(key, options) {\n const newColorTheme = this.colorThemeRegistry.get(key);\n if (key === this.currentColorTheme.key || !newColorTheme) {\n return;\n }\n const previousColorTheme = this.currentColorTheme;\n this.currentColorTheme = newColorTheme;\n this.TEMPORARY__syncGlobalCSSClassName(newColorTheme, previousColorTheme);\n if (options?.persist) {\n this.applicationStore.settingService.persistValue(LEGEND_APPLICATION_SETTING_KEY.COLOR_THEME, key);\n }\n }\n getColor(key) {\n return (this.currentColorTheme.colors?.[key] ??\n guaranteeNonNullable(this.colorThemeRegistry.get(LEGEND_APPLICATION_COLOR_THEME.DEFAULT_DARK)).colors?.[key] ??\n 'transparent');\n }\n}\n//# sourceMappingURL=LayoutService.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport class ClipboardService {\n applicationStore;\n constructor(applicationStore) {\n this.applicationStore = applicationStore;\n }\n async copyTextToClipboard(text, options) {\n // This is a much cleaner way which requires HTTPS\n // See https://developers.google.com/web/updates/2018/03/clipboardapi\n await navigator.clipboard\n .writeText(text)\n .catch((error) => {\n this.applicationStore.notificationService.notifyError(error);\n })\n .finally(() => {\n if (options?.notifySuccessMessage) {\n this.applicationStore.notificationService.notifySuccess(options.notifySuccessMessage);\n }\n });\n }\n}\n//# sourceMappingURL=ClipboardService.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport const NAVIGATION_ZONE_SEPARATOR = '.';\nexport const NAVIGATION_ZONE_PREFIX = '#';\nexport class NavigationService {\n navigator;\n constructor(navigator) {\n this.navigator = navigator;\n }\n}\n//# sourceMappingURL=NavigationService.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { deepEqual, isBoolean, isNumber, isObject, isString, LogEvent, } from '@finos/legend-shared';\nimport { APPLICATION_EVENT } from '../__lib__/LegendApplicationEvent.js';\nimport { StorageStore } from './storage/StorageService.js';\nexport const collectSettingConfigurationEntriesFromConfig = (data) => Object.entries(data).map((entry) => ({\n key: entry[0],\n ...entry[1],\n}));\nconst APPLICATION_SETTING_STORAGE_KEY = 'application-settings-storage';\nexport class SettingService {\n applicationStore;\n storage;\n registry = new Map();\n constructor(applicationStore) {\n this.applicationStore = applicationStore;\n this.storage = new StorageStore(this.applicationStore.storageService, APPLICATION_SETTING_STORAGE_KEY);\n this.applicationStore.pluginManager\n .getApplicationPlugins()\n .flatMap((plugin) => plugin.getExtraSettingConfigurationEntries?.() ?? [])\n .forEach((entry) => {\n if (this.registry.has(entry.key)) {\n this.applicationStore.logService.warn(LogEvent.create(APPLICATION_EVENT.SETTING_CONFIGURATION_CHECK__FAILURE), `Found duplicated setting with key '${entry.key}'`);\n return;\n }\n // TODO: do validation check here\n // See https://github.com/finos/legend-studio/issues/407\n this.registry.set(entry.key, entry);\n });\n }\n getNumericValue(key) {\n const value = this.storage.getValue(key) ?? this.registry.get(key)?.defaultValue;\n if (value !== undefined && !isNumber(value)) {\n this.applicationStore.logService.warn(LogEvent.create(APPLICATION_EVENT.SETTING_RETRIVE_FAILURE), `Can't retrieve numeric value for setting '${key}'`);\n return undefined;\n }\n return value;\n }\n getStringValue(key) {\n const value = this.storage.getValue(key) ?? this.registry.get(key)?.defaultValue;\n if (value !== undefined && !isString(value)) {\n this.applicationStore.logService.warn(LogEvent.create(APPLICATION_EVENT.SETTING_RETRIVE_FAILURE), `Can't retrieve string value for setting '${key}'`);\n return undefined;\n }\n return value;\n }\n getBooleanValue(key) {\n const value = this.storage.getValue(key) ?? this.registry.get(key)?.defaultValue;\n if (value !== undefined && !isBoolean(value)) {\n this.applicationStore.logService.warn(LogEvent.create(APPLICATION_EVENT.SETTING_RETRIVE_FAILURE), `Can't retrieve boolean value for setting '${key}'`);\n return undefined;\n }\n return value;\n }\n getObjectValue(key) {\n const value = this.storage.getValue(key) ?? this.registry.get(key)?.defaultValue;\n if (value !== undefined && !isObject(value)) {\n this.applicationStore.logService.warn(LogEvent.create(APPLICATION_EVENT.SETTING_RETRIVE_FAILURE), `Can't retrieve object value for setting '${key}'`);\n return undefined;\n }\n return value;\n }\n persistValue(key, value) {\n const defaultValue = this.registry.get(key)?.defaultValue;\n this.storage.persistValue(key, \n // NOTE: if the value equals to default value, the value will be unset instead\n defaultValue !== undefined && deepEqual(defaultValue, value)\n ? undefined\n : value);\n }\n}\n//# sourceMappingURL=SettingService.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { UnsupportedOperationError } from '@finos/legend-shared';\nimport {} from './NavigationService.js';\nexport class DefaultNavigator {\n goToLocation(location, options) {\n throw new UnsupportedOperationError(`Navigator does not support this operation`);\n }\n reload(options) {\n throw new UnsupportedOperationError(`Navigator does not support this operation`);\n }\n goToAddress(address, options) {\n throw new UnsupportedOperationError(`Navigator does not support this operation`);\n }\n visitAddress(address) {\n throw new UnsupportedOperationError(`Navigator does not support this operation`);\n }\n generateAddress(location) {\n throw new UnsupportedOperationError(`Navigator does not support this operation`);\n }\n updateCurrentLocation(location) {\n throw new UnsupportedOperationError(`Navigator does not support this operation`);\n }\n updateCurrentZone(zone) {\n throw new UnsupportedOperationError(`Navigator does not support this operation`);\n }\n resetZone() {\n throw new UnsupportedOperationError(`Navigator does not support this operation`);\n }\n getCurrentBaseAddress(options) {\n throw new UnsupportedOperationError(`Navigator does not support this operation`);\n }\n getCurrentAddress() {\n throw new UnsupportedOperationError(`Navigator does not support this operation`);\n }\n getCurrentLocation() {\n throw new UnsupportedOperationError(`Navigator does not support this operation`);\n }\n getCurrentLocationParameters() {\n throw new UnsupportedOperationError(`Navigator does not support this operation`);\n }\n getCurrentLocationParameterValue(key) {\n throw new UnsupportedOperationError(`Navigator does not support this operation`);\n }\n getCurrentZone() {\n throw new UnsupportedOperationError(`Navigator does not support this operation`);\n }\n blockNavigation(blockCheckers, onBlock, onNativePlatformNavigationBlock) {\n throw new UnsupportedOperationError(`Navigator does not support this operation`);\n }\n unblockNavigation() {\n throw new UnsupportedOperationError(`Navigator does not support this operation`);\n }\n get isNavigationBlocked() {\n throw new UnsupportedOperationError(`Navigator does not support this operation`);\n }\n INTERNAL__internalizeTransientParameter(key) {\n throw new UnsupportedOperationError(`Navigator does not support this operation`);\n }\n}\n//# sourceMappingURL=DefaultNavigator.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { LogEvent, isBoolean, isNumber, isObject, isString, } from '@finos/legend-shared';\nimport { StorageStore } from './storage/StorageService.js';\nimport { APPLICATION_EVENT } from '../__lib__/LegendApplicationEvent.js';\nconst APPLICATION_USER_DATA_STORAGE_KEY = 'application-user-data-storage';\nexport class UserDataService {\n applicationStore;\n storage;\n constructor(applicationStore) {\n this.applicationStore = applicationStore;\n this.storage = new StorageStore(this.applicationStore.storageService, APPLICATION_USER_DATA_STORAGE_KEY);\n }\n getNumericValue(key) {\n const value = this.storage.getValue(key);\n if (value !== undefined && !isNumber(value)) {\n this.applicationStore.logService.warn(LogEvent.create(APPLICATION_EVENT.USER_DATA_RETRIEVE_FAILURE), `Can't retrieve numeric value for user data '${key}'`);\n return undefined;\n }\n return value;\n }\n getStringValue(key) {\n const value = this.storage.getValue(key);\n if (value !== undefined && !isString(value)) {\n this.applicationStore.logService.warn(LogEvent.create(APPLICATION_EVENT.USER_DATA_RETRIEVE_FAILURE), `Can't retrieve string value for user data '${key}'`);\n return undefined;\n }\n return value;\n }\n getBooleanValue(key) {\n const value = this.storage.getValue(key);\n if (value !== undefined && !isBoolean(value)) {\n this.applicationStore.logService.warn(LogEvent.create(APPLICATION_EVENT.USER_DATA_RETRIEVE_FAILURE), `Can't retrieve boolean value for user data '${key}'`);\n return undefined;\n }\n return value;\n }\n getObjectValue(key) {\n const value = this.storage.getValue(key);\n if (value !== undefined && !isObject(value)) {\n this.applicationStore.logService.warn(LogEvent.create(APPLICATION_EVENT.USER_DATA_RETRIEVE_FAILURE), `Can't retrieve object value for user data '${key}'`);\n return undefined;\n }\n return value;\n }\n persistValue(key, value) {\n this.storage.persistValue(key, value);\n }\n}\n//# sourceMappingURL=UserDataService.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Compare SemVer versions.\n *\n * NOTE: SemVer could have been the perfect library to use here but we can't use it since it's meant for `Node` only\n * `compare-versions` works for browser but seems way overkill, especially when the version format is very\n * standard, i.e. `x.y.z`, no prerelease, etc.\n * As such, we can use the lean comparison algo using `localeCompare` with numeric settings\n *\n * See https://stackoverflow.com/questions/55466274/simplify-semver-version-compare-logic/55466325#55466325\n * See omichelsen/compare-versions#45\n */\nexport const compareSemVerVersions = (val1, val2) => \n// TODO: verify if the version match certain patterns\nval1.localeCompare(val2, undefined, { numeric: true });\n// regex to validate semver: https://github.com/semver/semver/issues/232\nexport const isSemVer = (val) => /^(?:0|[1-9]\\d*)\\.(?:0|[1-9]\\d*)\\.(?:0|[1-9]\\d*)(?:-(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(?:\\+[0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*)?$/.test(val);\n//# sourceMappingURL=StringCompareUtil.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { compareSemVerVersions, guaranteeNonEmptyString, isSemVer, } from '@finos/legend-shared';\nimport { action, makeObservable, observable } from 'mobx';\nexport var RELEASE_UPDATE_TYPE;\n(function (RELEASE_UPDATE_TYPE) {\n RELEASE_UPDATE_TYPE[\"BUG_FIX\"] = \"BUG_FIX\";\n RELEASE_UPDATE_TYPE[\"ENHANCEMENT\"] = \"ENHANCEMENT\";\n})(RELEASE_UPDATE_TYPE || (RELEASE_UPDATE_TYPE = {}));\nexport const collectReleaseNotes = (releaseNotes) => releaseNotes.map((release) => {\n guaranteeNonEmptyString(release.version, \"Release notes 'version' is missing\");\n release.notes?.map((note) => {\n guaranteeNonEmptyString(note.type, \"Release note 'type' is missing\");\n guaranteeNonEmptyString(note.description, \"Release note 'description' is missing\");\n return note;\n });\n return release;\n});\nexport const APPLICATION_LAST_OPENED_VERSION = 'application.lastOpenedVersion';\nexport class ReleaseNotesService {\n applicationStore;\n releaseNotes;\n showCurrentReleaseModal = true;\n showReleaseLog = false;\n isConfigured = false;\n constructor(applicationStore) {\n makeObservable(this, {\n showCurrentReleaseModal: observable,\n showReleaseLog: observable,\n isConfigured: observable,\n setShowCurrentRelease: action,\n configure: action,\n setReleaseLog: action,\n });\n this.applicationStore = applicationStore;\n }\n configure(releaseNotes) {\n this.isConfigured = true;\n this.releaseNotes = collectReleaseNotes(releaseNotes);\n }\n setShowCurrentRelease(val) {\n this.showCurrentReleaseModal = val;\n }\n setReleaseLog(val) {\n this.showReleaseLog = val;\n }\n getViewedVersion() {\n return this.applicationStore.userDataService.getStringValue(APPLICATION_LAST_OPENED_VERSION);\n }\n updateViewedVersion() {\n this.applicationStore.userDataService.persistValue(APPLICATION_LAST_OPENED_VERSION, this.applicationStore.config.appVersion);\n }\n showVersion(versionNotes, lastOpenedVersion) {\n const version = versionNotes.version;\n if (isSemVer(version) && isSemVer(lastOpenedVersion)) {\n if (compareSemVerVersions(version, lastOpenedVersion) === 1) {\n return true;\n }\n }\n return false;\n }\n showableVersions() {\n const lastOpenedVersion = this.getViewedVersion();\n if (!lastOpenedVersion) {\n return undefined;\n }\n return this.releaseNotes?.filter((val) => this.showVersion(val, lastOpenedVersion));\n }\n}\n//# sourceMappingURL=ReleaseNotesService.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { TracerService, LogService, LogEvent, uuid, ActionState, assertErrorThrown, IllegalStateError, isNonNullable, } from '@finos/legend-shared';\nimport { APPLICATION_EVENT } from '../__lib__/LegendApplicationEvent.js';\nimport { DocumentationService } from './DocumentationService.js';\nimport { AssistantService } from './AssistantService.js';\nimport { EventService } from './event/EventService.js';\nimport { ApplicationNavigationContextService } from './ApplicationNavigationContextService.js';\nimport { CommandService } from './CommandService.js';\nimport { KeyboardShortcutsService } from './KeyboardShortcutsService.js';\nimport { TerminalService } from './TerminalService.js';\nimport { AlertService } from './AlertService.js';\nimport { NotificationService } from './NotificationService.js';\nimport { IdentityService } from './IdentityService.js';\nimport { StorageService } from './storage/StorageService.js';\nimport { TelemetryService } from './TelemetryService.js';\nimport { TimeService } from './TimeService.js';\nimport { LayoutService } from './LayoutService.js';\nimport { ClipboardService } from './ClipboardService.js';\nimport { NavigationService } from './navigation/NavigationService.js';\nimport { SettingService } from './SettingService.js';\nimport { DefaultNavigator } from './navigation/DefaultNavigator.js';\nimport { UserDataService } from './UserDataService.js';\nimport { ReleaseNotesService } from './ReleaseNotesService.js';\nexport class ApplicationExtensionState {\n /**\n * This helps to better type-check for this empty abtract type\n * See https://github.com/finos/legend-studio/blob/master/docs/technical/typescript-usage.md#understand-typescript-structual-type-system\n */\n _$nominalTypeBrand;\n}\nexport class ApplicationStore {\n uuid = uuid();\n /**\n * This is a mechanism to have the store holds references to extension states\n * so that we can refer back to these states when needed or do cross-extensions\n * operations\n */\n extensionStates = [];\n config;\n pluginManager;\n initState = ActionState.create();\n platform;\n // core\n timeService;\n logService;\n storageService;\n userDataService;\n settingService;\n alertService;\n notificationService;\n identityService;\n commandService;\n keyboardShortcutsService;\n layoutService;\n clipboardService;\n terminalService;\n navigationService;\n navigationContextService;\n // support\n documentationService;\n assistantService;\n // release\n releaseNotesService;\n // event\n eventService;\n telemetryService;\n tracerService;\n constructor(config, pluginManager) {\n this.config = config;\n this.pluginManager = pluginManager;\n this.timeService = new TimeService();\n // NOTE: set the logger first so other loading could use the configured logger\n this.logService = new LogService();\n this.logService.registerPlugins(pluginManager.getLoggerPlugins());\n this.storageService = new StorageService(this);\n this.settingService = new SettingService(this);\n this.userDataService = new UserDataService(this);\n this.alertService = new AlertService(this);\n this.notificationService = new NotificationService();\n this.identityService = new IdentityService(this);\n this.layoutService = new LayoutService(this);\n this.clipboardService = new ClipboardService(this);\n this.terminalService = new TerminalService(this);\n this.commandService = new CommandService(this);\n this.keyboardShortcutsService = new KeyboardShortcutsService(this);\n this.navigationService = new NavigationService(new DefaultNavigator());\n this.navigationContextService = new ApplicationNavigationContextService(this);\n this.documentationService = new DocumentationService(this);\n this.assistantService = new AssistantService(this);\n this.releaseNotesService = new ReleaseNotesService(this);\n this.eventService = new EventService();\n this.eventService.registerEventNotifierPlugins(pluginManager.getEventNotifierPlugins());\n this.telemetryService = new TelemetryService(this);\n this.telemetryService.registerPlugins(pluginManager.getTelemetryServicePlugins());\n this.telemetryService.setup();\n this.tracerService = new TracerService();\n this.tracerService.registerPlugins(pluginManager.getTracerServicePlugins());\n // extensions\n this.extensionStates = this.pluginManager\n .getApplicationPlugins()\n .flatMap((plugin) => plugin.getExtraApplicationExtensionStateBuilders?.() ?? [])\n .map((creator) => creator(this))\n .filter(isNonNullable);\n }\n async initialize(platform) {\n if (!this.initState.isInInitialState) {\n // eslint-disable-next-line no-process-env\n if (process.env.NODE_ENV === 'production') {\n this.notificationService.notifyIllegalState('Application store is re-initialized');\n }\n else {\n this.logService.debug(LogEvent.create(APPLICATION_EVENT.DEBUG), 'Application store is re-initialized');\n }\n return;\n }\n this.initState.inProgress();\n try {\n if (this.platform) {\n throw new IllegalStateError(`Platform is already configured`);\n }\n this.platform = platform;\n this.navigationService =\n new NavigationService(platform.getNavigator());\n await platform.initialize();\n this.initState.pass();\n }\n catch (error) {\n assertErrorThrown(error);\n this.notificationService.notifyError(error);\n this.logService.error(LogEvent.create(APPLICATION_EVENT.APPLICATION_LOAD__FAILURE), 'Failed to load Legend application');\n this.initState.fail();\n }\n }\n /**\n * When we call store/state functions from the component, we should handle error thrown at these functions instead\n * of throwing them to the UI. This enforces that by throwing `IllegalStateError`\n */\n alertUnhandledError = (error) => {\n this.logUnhandledError(error);\n this.notificationService.notifyIllegalState(error.message);\n };\n logUnhandledError = (error) => {\n this.logService.error(LogEvent.create(APPLICATION_EVENT.ILLEGAL_APPLICATION_STATE_OCCURRED), 'Encountered unhandled error in component tree', error);\n };\n /**\n * Guarantee that the action being used by the component does not throw unhandled errors\n */\n guardUnhandledError = (actionFn) => () => {\n actionFn().catch(this.alertUnhandledError);\n };\n}\n//# sourceMappingURL=ApplicationStore.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { downloadFileUsingDataURI, guaranteeNonNullable, } from '@finos/legend-shared';\nvar DOWNLOAD_EVENTS;\n(function (DOWNLOAD_EVENTS) {\n DOWNLOAD_EVENTS[\"TAG_REQUEST\"] = \"download-request\";\n DOWNLOAD_EVENTS[\"TAG_RESPONSE\"] = \"download-response\";\n DOWNLOAD_EVENTS[\"STREAM_CLOSED\"] = \"#stream-closed\";\n DOWNLOAD_EVENTS[\"STREAM_ABORTED\"] = \"#stream-aborted\";\n})(DOWNLOAD_EVENTS || (DOWNLOAD_EVENTS = {}));\nfunction createWritableStreamFromMessageChannel(channel) {\n return new WritableStream({\n write(chunk) {\n channel.port1.postMessage(chunk);\n },\n close() {\n channel.port1.postMessage(DOWNLOAD_EVENTS.STREAM_CLOSED);\n },\n abort() {\n channel.port1.postMessage(DOWNLOAD_EVENTS.STREAM_ABORTED);\n closeMessagePort(channel.port1);\n closeMessagePort(channel.port2);\n },\n });\n}\nfunction closeMessagePort(port) {\n port.onmessage = null;\n port.close();\n}\nasync function getServiceWorker() {\n if (!('serviceWorker' in navigator)) {\n return Promise.reject(new Error('Service worker is not available. Service Worker requires HTTPS protocol'));\n }\n return navigator.serviceWorker\n .getRegistration()\n .then((workerRegistration) => {\n if (workerRegistration === undefined) {\n return undefined;\n }\n const pending = workerRegistration.installing ?? workerRegistration.waiting;\n return (workerRegistration.active ??\n new Promise((resolve) => {\n // if not activated, add listener to waiting or installing registration\n const listener = () => {\n if (pending?.state === 'activated') {\n pending.removeEventListener('statechange', listener);\n resolve(workerRegistration.active ?? undefined);\n }\n };\n pending?.addEventListener('statechange', listener);\n }));\n });\n}\nfunction createDownloadRequest(filename) {\n const PREFIX = 6;\n const prefix = String(Math.random()).slice(-PREFIX);\n const url = new URL(`${prefix}/${filename}`, window.location.href).toString();\n return { tag: DOWNLOAD_EVENTS.TAG_REQUEST, filename, url };\n}\nfunction handleServiceWorkerDownloadResponse(event) {\n const data = event.data;\n if (data?.tag === DOWNLOAD_EVENTS.TAG_RESPONSE && data.downloadUrl.length) {\n openInIframe(data.downloadUrl);\n }\n}\nfunction openInIframe(src) {\n const iframe = document.createElement('iframe');\n iframe.hidden = true;\n iframe.src = src;\n document.body.appendChild(iframe);\n return iframe;\n}\nexport async function downloadStream(response, filename, contentType) {\n const responseBody = guaranteeNonNullable(response.body);\n // creates communication channel with service worker with response handler\n const channel = new MessageChannel();\n channel.port1.onmessage = handleServiceWorkerDownloadResponse;\n // grabs service worker and handles it download along with response channel port\n const serviceWorker = await getServiceWorker();\n if (!serviceWorker) {\n // TODO: remove once service worker workflow is tested\n const text = await response.text();\n // eslint-disable-next-line no-console\n console.debug('service worker not found. Using in memory file download');\n downloadFileUsingDataURI(filename, text, contentType);\n return;\n }\n // eslint-disable-next-line no-console\n console.debug('Service worker found. Continuing download');\n const downloadRequest = createDownloadRequest(filename);\n serviceWorker.postMessage(downloadRequest, [channel.port2]);\n // creates new data stream over communication channel and pipes given stream in it\n responseBody\n .pipeTo(createWritableStreamFromMessageChannel(channel))\n .then(() => {\n // TODO: trace success\n })\n .catch(() => {\n // TODO: fail\n });\n}\nexport function registerDownloadHelperServiceWorker(workerPath) {\n if ('serviceWorker' in navigator) {\n const path = workerPath ?? '/ServiceWorker.js';\n navigator.serviceWorker\n .register(path)\n .then((reg) => {\n // TODO: add trace\n // eslint-disable-next-line no-console\n console.debug(`register service worker success with path: ${path}`, reg);\n })\n .catch((error) => {\n // TODO: add trace\n // eslint-disable-next-line no-console\n console.debug(`register service worker error with path: ${path}`, error);\n });\n }\n}\n//# sourceMappingURL=DownloadHelperServiceWorker.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { assertErrorThrown, LogEvent, guaranteeNonEmptyString, assertNonNullable, NetworkClient, createRegExpPatternFromWildcardPattern, } from '@finos/legend-shared';\nimport { APPLICATION_EVENT } from '../__lib__/LegendApplicationEvent.js';\nimport { collectKeyedDocumentationEntriesFromConfig, } from '../stores/DocumentationService.js';\nimport { ApplicationStore, } from '../stores/ApplicationStore.js';\nimport { registerDownloadHelperServiceWorker } from '../util/DownloadHelperServiceWorker.js';\nexport class LegendApplicationLogger {\n}\nexport class LegendApplicationWebConsole extends LegendApplicationLogger {\n debug(event, ...data) {\n // eslint-disable-next-line no-console\n console.debug(`[${event.timestamp}] ${event.name} ${data.length ? ':' : ''}`, ...data);\n }\n info(event, ...data) {\n // eslint-disable-next-line no-console\n console.info(`[${event.timestamp}] ${event.name} ${data.length ? ':' : ''}`, ...data);\n }\n warn(event, ...data) {\n // eslint-disable-next-line no-console\n console.warn(`[${event.timestamp}] ${event.name} ${data.length ? ':' : ''}`, ...data);\n }\n error(event, ...data) {\n // eslint-disable-next-line no-console\n console.error(`[${event.timestamp}] ${event.name} ${data.length ? ':' : ''}`, ...data);\n }\n}\nexport class LegendApplication {\n config;\n logger;\n pluginManager;\n basePresets = [];\n basePlugins = [];\n baseAddress;\n pluginRegister;\n _isConfigured = false;\n downloadHelperServiceWorkerPath;\n downloadHelper = false;\n releaseNotes;\n constructor(pluginManager) {\n this.pluginManager = pluginManager;\n this.logger = new LegendApplicationWebConsole();\n }\n setup(options) {\n this.baseAddress = guaranteeNonEmptyString(options.baseAddress, `Can't setup application: 'baseAddress' is missing or empty`);\n this.pluginRegister = options.pluginRegister;\n this._isConfigured = true;\n return this;\n }\n withBasePresets(presets) {\n this.basePresets = presets;\n return this.withPresets([]); // this will reset the preset list and prepend with base presets\n }\n withBasePlugins(plugins) {\n this.basePlugins = plugins;\n return this.withPlugins([]); // this will reset the plugin list and prepend with base plugins\n }\n withPresets(presets) {\n this.pluginManager.usePresets([...this.basePresets, ...presets]);\n return this;\n }\n withPlugins(plugins) {\n this.pluginManager.usePlugins([...this.basePlugins, ...plugins]);\n return this;\n }\n withDownloadHelper(path) {\n this.downloadHelper = true;\n this.downloadHelperServiceWorkerPath = path;\n return this;\n }\n withReleaseNotes(releaseNotes) {\n this.releaseNotes = releaseNotes;\n return this;\n }\n setupApplicationStore(store) {\n if (this.releaseNotes) {\n store.releaseNotesService.configure(this.releaseNotes);\n }\n }\n async fetchApplicationConfiguration() {\n const client = new NetworkClient();\n // app config\n let configData;\n try {\n configData = await client.get(`${window.location.origin}${this.baseAddress}config.json`);\n }\n catch (error) {\n assertErrorThrown(error);\n this.logger.error(LogEvent.create(APPLICATION_EVENT.APPLICATION_CONFIGURATION__FAILURE), error);\n }\n assertNonNullable(configData, `Can't fetch Legend application configuration`);\n // app version\n let versionData;\n try {\n versionData = await client.get(`${window.location.origin}${this.baseAddress}version.json`);\n }\n catch (error) {\n assertErrorThrown(error);\n this.logger.error(LogEvent.create(APPLICATION_EVENT.APPLICATION_CONFIGURATION__FAILURE), error);\n }\n assertNonNullable(versionData, `Can't fetch Legend application version`);\n return [\n await this.configureApplication({\n configData,\n versionData,\n baseAddress: this.baseAddress,\n }),\n configData.extensions ?? {},\n ];\n }\n async loadDocumentationRegistryData(config) {\n const entries = {};\n await Promise.all([\n ...config.documentationRegistryEntries,\n ...this.pluginManager\n .getApplicationPlugins()\n .flatMap((plugin) => plugin.getExtraDocumentationRegistryEntries?.() ?? []),\n ].map(async (entry) => {\n try {\n const client = new NetworkClient(entry.simple\n ? {\n /**\n * NOTE: see the documentation for `simple` flag {@link DocumentationRegistryEntry}\n * here, basically, we expect to fetch just the JSON from an endpoint where `Access-Control-Allow-Origin\", \"*\"` is set\n * as such, we must not include the credential in our request\n * See https://stackoverflow.com/questions/19743396/cors-cannot-use-wildcard-in-access-control-allow-origin-when-credentials-flag-i\n */\n options: {\n credentials: 'omit',\n },\n }\n : {});\n const docData = await client.get(guaranteeNonEmptyString(entry.url, `Can't load documentation registry: 'url' field is missing or empty`));\n assertNonNullable(docData.entries, `Can't load documentation registry data: 'entries' field is missing`);\n const patterns = entry.includes?.map((filter) => createRegExpPatternFromWildcardPattern(filter));\n Object.entries(docData.entries).forEach(([key, docEntry]) => {\n if (!patterns || patterns.some((pattern) => pattern.test(key))) {\n // NOTE: entries will NOT override\n if (!entries[key]) {\n entries[key] = docEntry;\n }\n }\n });\n }\n catch (error) {\n assertErrorThrown(error);\n this.logger.warn(LogEvent.create(APPLICATION_EVENT.DOCUMENTATION_FETCH__FAILURE), error);\n }\n }));\n // NOTE: config entries will override\n config.keyedDocumentationEntries = [\n ...collectKeyedDocumentationEntriesFromConfig(entries),\n ...config.keyedDocumentationEntries,\n ];\n }\n async start() {\n assertNonNullable(this._isConfigured, 'Legend application has not been configured properly. Make sure to run setup() before start()');\n try {\n // fetch application config\n const [config, extensionConfigData] = await this.fetchApplicationConfiguration();\n this.config = config;\n // setup plugins\n this.pluginRegister?.(this.pluginManager, this.config);\n this.pluginManager.configure(extensionConfigData);\n this.pluginManager.install();\n // other setups\n await Promise.all(\n // NOTE: to be done in parallel to save time\n [this.loadDocumentationRegistryData(config)]);\n // setup application store\n const applicationStore = new ApplicationStore(this.config, this.pluginManager);\n await Promise.all(this.pluginManager\n .getApplicationPlugins()\n .flatMap((plugin) => plugin.getExtraApplicationSetups?.() ?? [])\n .map((setup) => setup(applicationStore)));\n // set up application\n this.setupApplicationStore(applicationStore);\n // load application\n await this.loadApplication(applicationStore);\n this.logger.info(LogEvent.create(APPLICATION_EVENT.APPLICATION_LOAD__SUCCESS), 'Legend application loaded');\n if (this.downloadHelper) {\n registerDownloadHelperServiceWorker(this.downloadHelperServiceWorkerPath);\n }\n }\n catch (error) {\n assertErrorThrown(error);\n this.logger.error(LogEvent.create(APPLICATION_EVENT.APPLICATION_LOAD__FAILURE), 'Failed to load Legend application');\n throw error;\n }\n }\n}\nexport const LEGEND_APPLICATION_ROOT_ELEMENT_TAG = 'legend-application-root';\n// NOTE: we use a special tag to mount the application to avoid styling conflicts\nexport const getApplicationRootElement = () => {\n let rootEl = document.getElementsByTagName(LEGEND_APPLICATION_ROOT_ELEMENT_TAG).length\n ? document.getElementsByTagName(LEGEND_APPLICATION_ROOT_ELEMENT_TAG)[0]\n : undefined;\n if (!rootEl) {\n rootEl = document.createElement(LEGEND_APPLICATION_ROOT_ELEMENT_TAG);\n document.body.appendChild(rootEl);\n }\n rootEl.setAttribute('style', 'height: 100%; width: 100%; display: block');\n return rootEl;\n};\n//# sourceMappingURL=LegendApplication.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport const createRegExpPatternFromWildcardPattern = (value) => new RegExp(\n// trim and add start/end regexp to make sure the wildcard pattern must be a full match\n`^${value\n .trim()\n // escape special characters except for wilcard *\n .replace(/[\\^$\\\\.+?()[\\]{}|]/g, '\\\\$&')\n // translate wildcard * to .*\n .replace(/\\*/g, '.*')}$`);\n//# sourceMappingURL=MatcherUtils.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { AbstractPlugin } from '@finos/legend-shared';\nexport class LegendApplicationPlugin extends AbstractPlugin {\n}\n//# sourceMappingURL=LegendApplicationPlugin.js.map","import { jsx as _jsx } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { clsx } from 'clsx';\nimport { ReflexContainer, ReflexElement, ReflexSplitter, } from 'react-reflex';\n/**\n * We need test-mocks for `react-reflex` or else some of our tests might fail since\n * the library does calculation using the rendering of flex boxes and could throw error\n * in test environment.\n *\n * Here, we have to use a very crude way to mock that is to use `process.env.NODE_ENV === 'test'`\n * Since, Typescript does not currently support subpath `exports` well, we can't really\n * use Jest `moduleNameMapper` to mock, e.g.\n *\n * '^@finos/legend-art/lib/ResizablePanel$': '@finos/legend-art/lib/testMocks/MockedResizablePanel.js'\n *\n * TODO: we should come back to the `moduleNameMaper` approach for mock when this issue is resolved\n * See https://github.com/microsoft/TypeScript/issues/33079\n */\nconst MockedReactComponent = (props) => {\n const { children } = props;\n return _jsx(\"div\", { children: children });\n};\nexport const ResizablePanelGroup = \n// eslint-disable-next-line no-process-env\nprocess.env.NODE_ENV === 'test'\n ? MockedReactComponent\n : ReflexContainer;\nconst RESIZABLE_COLLAPSED_PANEL_CLASS_NAME = 'resizable-panel--collapsed';\n/**\n * NOTE: there is a problem with `react-reflex` that is when a panel\n * is minimized, due to `flex-grow` not being set/round to 0, there is a little\n * of the panel still being shown. We are waiting to see when how we could address\n * this issue programmatically. But the following is an attempt to do this when\n * user manually resize the panel.\n *\n * We will see if we could get the library to support some rounding behavior for\n * flex-grow out of the box.\n *\n * See https://github.com/leefsmp/Re-Flex/issues/146\n */\nexport const getCollapsiblePanelGroupProps = (minimizeCondition, options) => ({\n collapsiblePanel: {\n className: clsx(...(options?.classes ?? []), {\n [RESIZABLE_COLLAPSED_PANEL_CLASS_NAME]: minimizeCondition,\n }),\n onStartResize: (handleProps) => {\n handleProps.domElement.classList.remove(RESIZABLE_COLLAPSED_PANEL_CLASS_NAME);\n options?.onStartResize?.(handleProps);\n },\n onStopResize: (handleProps) => {\n const flexGrow = Number(handleProps.domElement.style.flexGrow);\n if (flexGrow <= 0.01) {\n handleProps.domElement.style.flexGrow = '0';\n }\n else if (flexGrow >= 0.99) {\n handleProps.domElement.style.flexGrow = '1';\n }\n options?.onStopResize?.(handleProps);\n },\n size: !minimizeCondition && options?.size ? options.size : 0,\n /**\n * NOTE: When the panel is minimized we want to programatically\n * set `flex=0`, however, when minimization does not occur\n * we want to let `react-reflex` calculate the `flex` value\n * so that the panel is shown properly\n *\n * See https://github.com/finos/legend-studio/issues/1316\n */\n flex: minimizeCondition ? 0 : undefined,\n },\n remainingPanel: {\n /**\n * Somehow, if we don't set the flex=1 for the second panel when the first panel has flex=0\n * (i.e. collapsed), the first panel when toggled to display again will not respect the size\n * set to it programmatically\n *\n * See https://github.com/leefsmp/Re-Flex/issues/147\n */\n flex: minimizeCondition ? 1 : undefined,\n },\n});\nexport const ResizablePanel = \n// eslint-disable-next-line no-process-env\nprocess.env.NODE_ENV === 'test'\n ? MockedReactComponent\n : ReflexElement;\nexport const ResizablePanelSplitter = \n// eslint-disable-next-line no-process-env\nprocess.env.NODE_ENV === 'test'\n ? MockedReactComponent\n : ReflexSplitter;\nexport const ResizablePanelSplitterLine = (props) => (_jsx(\"div\", { className: \"resizable-panel__splitter-line\", style: {\n background: props.color,\n } }));\nexport const configureResizablePanelComponents = () => {\n /**\n * The following block is needed to inject `react-reflex` styling during development\n * as HMR makes stylesheet loaded after layout calculation, throwing off `react-reflex`\n * See https://github.com/leefsmp/Re-Flex/issues/27#issuecomment-718949629\n */\n // eslint-disable-next-line no-process-env\n if (process.env.NODE_ENV === 'development') {\n const stylesheet = document.createElement('style');\n stylesheet.innerHTML = `\n /* For development, this needs to be injected before stylesheet, else \\`react-reflex\\` panel dimension calculation will be off */\n .reflex-container { height: 100%; width: 100%; }\n /* NOTE: we have to leave the min dimension as \\`0.1rem\\` to avoid re-calculation bugs due to HMR style injection order */\n .reflex-container.horizontal { flex-direction: column; min-height: 0.1rem; }\n .reflex-container.vertical { flex-direction: row; min-width: 0.1rem; }\n .reflex-container > .reflex-element { height: 100%; width: 100%; }\n `;\n document.head.prepend(stylesheet);\n }\n};\n//# sourceMappingURL=ResizablePanel.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport packageJson from '../../package.json' with { type: 'json' };\nimport { LEGEND_APPLICATION_SETTING_CONFIG } from '../__lib__/LegendApplicationSetting.js';\nimport { HIGH_CONTRAST_DARK_COLOR_THEME, HIGH_CONTRAST_LIGHT_COLOR_THEME, LEGACY_LIGHT_COLOR_THEME, } from '../__lib__/LegendApplicationColorTheme.js';\nimport { LegendApplicationPlugin, } from './LegendApplicationPlugin.js';\nimport { collectSettingConfigurationEntriesFromConfig, } from './SettingService.js';\nimport { configureResizablePanelComponents } from '@finos/legend-art';\nexport class Core_LegendApplicationPlugin extends LegendApplicationPlugin {\n static NAME = packageJson.extensions.applicationPlugin;\n constructor() {\n super(Core_LegendApplicationPlugin.NAME, packageJson.version);\n }\n install(pluginManager) {\n pluginManager.registerApplicationPlugin(this);\n }\n getExtraApplicationSetups() {\n return [\n async (applicationStore) => {\n // configure UI components\n configureResizablePanelComponents();\n },\n ];\n }\n getExtraColorThemes() {\n return [\n LEGACY_LIGHT_COLOR_THEME,\n HIGH_CONTRAST_LIGHT_COLOR_THEME,\n HIGH_CONTRAST_DARK_COLOR_THEME,\n ];\n }\n getExtraSettingConfigurationEntries() {\n return collectSettingConfigurationEntriesFromConfig(LEGEND_APPLICATION_SETTING_CONFIG);\n }\n}\n//# sourceMappingURL=Core_LegendApplicationPlugin.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { guaranteeNonEmptyString, guaranteeNonNullable, URL_SEPARATOR, SerializationFactory, } from '@finos/legend-shared';\nimport { collectKeyedDocumentationEntriesFromConfig, collectContextualDocumentationEntries, collectDocumentationLinkEntryFromConfig, } from '../stores/DocumentationService.js';\nimport { createModelSchema, list, primitive } from 'serializr';\nexport class StereotypeConfig {\n profile;\n stereotype;\n static serialization = new SerializationFactory(createModelSchema(StereotypeConfig, {\n profile: primitive(),\n stereotype: primitive(),\n }));\n}\nexport class TaggedValueConfig {\n profile;\n value;\n static serialization = new SerializationFactory(createModelSchema(TaggedValueConfig, {\n profile: primitive(),\n value: list(primitive()),\n }));\n}\nexport class LegendApplicationConfig {\n appName;\n baseAddress;\n env;\n applicationStorageKey;\n // documentation\n documentationUrl;\n documentationLinkEntries = [];\n documentationRegistryEntries = [];\n keyedDocumentationEntries = [];\n contextualDocEntries = [];\n // version\n appVersion;\n appVersionBuildTime;\n appVersionCommitId;\n constructor(input) {\n this.baseAddress = input.baseAddress;\n this.appName = guaranteeNonEmptyString(input.configData.appName, `Can't configure application: 'appName' field is missing or empty`);\n this.env = guaranteeNonEmptyString(input.configData.env, `Can't configure application: 'env' field is missing or empty`);\n this.applicationStorageKey =\n input.configData.application?.storageKey ??\n this.getDefaultApplicationStorageKey();\n // Documentation\n this.documentationUrl = input.configData.documentation?.url;\n this.documentationLinkEntries = collectDocumentationLinkEntryFromConfig(input.configData.documentation?.links ?? {});\n this.documentationRegistryEntries =\n input.configData.documentation?.registry ?? [];\n this.keyedDocumentationEntries = collectKeyedDocumentationEntriesFromConfig(input.configData.documentation?.entries ?? {});\n this.contextualDocEntries = collectContextualDocumentationEntries(input.configData.documentation?.contextualEntries ?? {});\n // Version\n this.appVersion = guaranteeNonNullable(input.versionData.version, `Can't collect application version: 'version' field is missing`);\n this.appVersionBuildTime = input.versionData.buildTime;\n this.appVersionCommitId = input.versionData.commitSHA;\n }\n static resolveAbsoluteUrl(url) {\n if (url.trim().startsWith(URL_SEPARATOR)) {\n return window.location.origin + url;\n }\n return url;\n }\n}\n//# sourceMappingURL=LegendApplicationConfig.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { assertNonNullable, guaranteeNonEmptyString, } from '@finos/legend-shared';\nimport { LegendApplicationConfig, } from '@finos/legend-application';\nexport class LegendPureIDEApplicationConfig extends LegendApplicationConfig {\n pureUrl;\n useDynamicPureServer = false;\n constructor(input) {\n super(input);\n assertNonNullable(input.configData.pure, `Can't configure application: 'pure' field is missing`);\n this.pureUrl = LegendApplicationConfig.resolveAbsoluteUrl(guaranteeNonEmptyString(input.configData.pure.url, `Can't configure application: 'pure.url' field is missing or empty`));\n if (input.configData.pure.dynamic !== undefined) {\n this.useDynamicPureServer = Boolean(input.configData.pure.dynamic);\n }\n }\n getDefaultApplicationStorageKey() {\n return 'legend-pure-ide';\n }\n}\n//# sourceMappingURL=LegendPureIDEApplicationConfig.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { AbstractPluginManager, } from '@finos/legend-shared';\nexport class LegendApplicationPluginManager extends AbstractPluginManager {\n loggerPlugins = [];\n telemetryServicePlugins = [];\n tracerServicePlugins = [];\n eventNotifierPlugins = [];\n applicationPlugins = [];\n registerLoggerPlugin(plugin) {\n this.loggerPlugins.push(plugin);\n }\n registerTelemetryServicePlugin(plugin) {\n this.telemetryServicePlugins.push(plugin);\n }\n registerTracerServicePlugin(plugin) {\n this.tracerServicePlugins.push(plugin);\n }\n registerEventNotifierPlugin(plugin) {\n this.eventNotifierPlugins.push(plugin);\n }\n registerApplicationPlugin(plugin) {\n this.applicationPlugins.push(plugin);\n }\n getLoggerPlugins() {\n return [...this.loggerPlugins];\n }\n getTelemetryServicePlugins() {\n return [...this.telemetryServicePlugins];\n }\n getTracerServicePlugins() {\n return [...this.tracerServicePlugins];\n }\n getEventNotifierPlugins() {\n return [...this.eventNotifierPlugins];\n }\n getApplicationPlugins() {\n return [...this.applicationPlugins];\n }\n}\n//# sourceMappingURL=LegendApplicationPluginManager.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { LegendApplicationPluginManager } from '@finos/legend-application';\nexport class LegendPureIDEPluginManager extends LegendApplicationPluginManager {\n pureProtocolProcessorPlugins = [];\n pureGraphManagerPlugins = [];\n pureGraphPlugins = [];\n constructor() {\n super();\n }\n static create() {\n return new LegendPureIDEPluginManager();\n }\n registerPureProtocolProcessorPlugin(plugin) {\n this.pureProtocolProcessorPlugins.push(plugin);\n }\n registerPureGraphManagerPlugin(plugin) {\n this.pureGraphManagerPlugins.push(plugin);\n }\n registerPureGraphPlugin(plugin) {\n this.pureGraphPlugins.push(plugin);\n }\n getPureGraphManagerPlugins() {\n return [...this.pureGraphManagerPlugins];\n }\n getPureProtocolProcessorPlugins() {\n return [...this.pureProtocolProcessorPlugins];\n }\n getPureGraphPlugins() {\n return [...this.pureGraphPlugins];\n }\n}\n//# sourceMappingURL=LegendPureIDEPluginManager.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { generateGAVCoordinates } from '@finos/legend-storage';\nexport var LEGEND_APPLICATION_PARAM_TOKEN;\n(function (LEGEND_APPLICATION_PARAM_TOKEN) {\n LEGEND_APPLICATION_PARAM_TOKEN[\"INITIAL_COLOR_THEME\"] = \"initialColorTheme\";\n})(LEGEND_APPLICATION_PARAM_TOKEN || (LEGEND_APPLICATION_PARAM_TOKEN = {}));\n/**\n * @external_application_navigation This depends on Legend Studio routing and is hardcoded so it's potentially brittle\n */\nexport const EXTERNAL_APPLICATION_NAVIGATION__generateStudioProjectViewUrl = (studioApplicationUrl, groupId, artifactId, versionId, entityPath) => `${studioApplicationUrl}/view/archive/${generateGAVCoordinates(groupId, artifactId, versionId)}${entityPath ? `/entity/${entityPath}` : ''}`;\n/**\n * @external_application_navigation This depends on Legend DataCube routing and is hardcoded so it's potentially brittle\n */\nexport const EXTERNAL_APPLICATION_NAVIGATION__generateNewDataCubeUrl = (dataCubeApplicationUrl, sourceData) => `${dataCubeApplicationUrl}?sourceData=${encodeURIComponent(btoa(JSON.stringify(sourceData)))}`;\n//# sourceMappingURL=LegendApplicationNavigation.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { addQueryParametersToUrl, getQueryParameterValue, getQueryParameters, guaranteeNonNullable, noop, sanitizeURL, stringifyQueryParams, } from '@finos/legend-shared';\nimport { action, computed, makeObservable, observable } from 'mobx';\nimport { NAVIGATION_ZONE_PREFIX, } from './NavigationService.js';\nimport { Outlet, Route, Routes, matchPath, matchRoutes, generatePath, useParams, useLocation, useSearchParams, Navigate, } from 'react-router';\nexport { BrowserRouter } from 'react-router-dom';\nexport { Outlet, Route, Routes, useParams, useSearchParams, matchPath, matchRoutes, generatePath, Navigate, };\nexport const useNavigationZone = () => {\n const location = useLocation();\n return location.hash.substring(NAVIGATION_ZONE_PREFIX.length);\n};\n/**\n * Prefix URL patterns coming from extensions with `/extensions/`\n * to avoid potential conflicts with main routes.\n */\nexport const generateExtensionUrlPattern = (pattern) => `/extensions/${pattern}`.replace(/^\\/extensions\\/\\//, '/extensions/');\nexport function stripTrailingSlash(url) {\n let _url = url;\n while (_url.endsWith('/')) {\n _url = _url.slice(0, -1);\n }\n return _url;\n}\nexport class BrowserNavigator {\n navigate;\n baseUrl;\n _isNavigationBlocked = false;\n _forceBypassNavigationBlocking = false;\n _blockCheckers = [];\n _beforeUnloadListener = (event) => {\n if (this._forceBypassNavigationBlocking) {\n return;\n }\n if (this._blockCheckers.some((checker) => checker())) {\n // NOTE: there is no way to customize the alert message for now since Chrome removed support for it due to security concerns\n // See https://developer.mozilla.org/en-US/docs/Web/API/WindowEventHandlers/onbeforeunload#Browser_compatibility\n event.returnValue = '';\n event.preventDefault();\n }\n };\n onBlock;\n onNativePlatformNavigationBlock;\n constructor(navigate, baseUrl) {\n makeObservable(this, {\n _isNavigationBlocked: observable,\n isNavigationBlocked: computed,\n blockNavigation: action,\n unblockNavigation: action,\n });\n this.navigate = navigate;\n this.baseUrl = baseUrl;\n }\n get window() {\n return guaranteeNonNullable(window, `Window object is not available in non-web environment`);\n }\n goToLocation(location, options) {\n if (options?.ignoreBlocking) {\n this._forceBypassNavigationBlocking = true;\n }\n const onProceed = () => {\n this._forceBypassNavigationBlocking = true; // make sure to not trigger `BeforeUnloadEvent`\n this.window.location.href = this.generateAddress(location);\n };\n if (!this._forceBypassNavigationBlocking &&\n this._blockCheckers.some((checker) => checker())) {\n this.onBlock?.(onProceed);\n }\n else {\n onProceed();\n }\n }\n reload(options) {\n if (options?.ignoreBlocking) {\n this._forceBypassNavigationBlocking = true;\n }\n const onProceed = () => {\n this._forceBypassNavigationBlocking = true; // make sure to not trigger `BeforeUnloadEvent`\n this.window.location.reload();\n };\n if (!this._forceBypassNavigationBlocking &&\n this._blockCheckers.some((checker) => checker())) {\n this.onBlock?.(onProceed);\n }\n else {\n onProceed();\n }\n }\n goToAddress(address, options) {\n if (options?.ignoreBlocking) {\n this._forceBypassNavigationBlocking = true;\n }\n const onProceed = () => {\n this._forceBypassNavigationBlocking = true; // make sure to not trigger `BeforeUnloadEvent`\n this.window.location.href = address;\n };\n if (!this._forceBypassNavigationBlocking &&\n this._blockCheckers.some((checker) => checker())) {\n this.onBlock?.(onProceed);\n }\n else {\n onProceed();\n }\n }\n visitAddress(address) {\n this.window.open(address, '_blank');\n }\n generateAddress(location) {\n return this.window.location.origin + this.baseUrl + location;\n }\n updateCurrentLocation(location) {\n // `react-router` NavigateFunction returns promise and non-promise type, so we need to wrap it\n // to avoid unhandled promise rejection if any. This might get resolved in the future.\n // See https://github.com/remix-run/react-router/issues/12348\n Promise.resolve(this.navigate(location)).catch(noop());\n }\n updateCurrentZone(zone) {\n this.window.location.hash = NAVIGATION_ZONE_PREFIX + zone;\n }\n resetZone() {\n this.updateCurrentLocation(this.getCurrentLocation());\n }\n getCurrentBaseAddress(options) {\n if (options?.withAppRoot) {\n return this.generateAddress('');\n }\n return this.window.location.origin;\n }\n getCurrentAddress() {\n return this.window.location.href;\n }\n getCurrentLocation() {\n return this.window.location.pathname.substring(this.baseUrl.length);\n }\n getCurrentLocationParameters(options) {\n const result = {};\n const address = options?.sanitizeParametersInsteadOfUrl\n ? this.getCurrentAddress()\n : sanitizeURL(this.getCurrentAddress());\n const parameters = getQueryParameters(address, true);\n Object.keys(parameters).forEach((key) => {\n result[key] = getQueryParameterValue(key, parameters, options);\n });\n return result;\n }\n getCurrentLocationParameterValue(key, options) {\n return this.getCurrentLocationParameters(options)[key];\n }\n getCurrentZone() {\n return this.window.location.hash.substring(NAVIGATION_ZONE_PREFIX.length);\n }\n blockNavigation(blockCheckers, onBlock, onNativePlatformNavigationBlock) {\n this._isNavigationBlocked = true;\n this.onBlock = onBlock;\n this.onNativePlatformNavigationBlock = onNativePlatformNavigationBlock;\n // Attempt to cancel the effect of the back button. The mechanism is as follows:\n //\n // This makes the current location the last entry in the browser history and clears any forward history.\n // The popstate event is triggered every time the user clicks back/forward button, but since the forward\n // history has been cleared, if we call, we call `history.forward()`, which go 1 page forward,\n // but there's no page forward, so effectively, the user remains on the same page\n //\n // NOTE: this approach ideal in that, technically the pop state event still can happen for a brief moment,\n // and thus, unecesssary renderings are not avoidable.\n // e.g. we're at route A, then navigate to B\n // we hit back button, we will go back to route A and then immediately go back to B\n // another exploit is user can hit the back button consecutively quickly and this would also break this\n // workaround we have here.\n //\n // All in all, this is the kind of workaround that attempts to override browser capabilities\n // should be avoided\n if (this.onNativePlatformNavigationBlock) {\n this.window.history.pushState(null, '', this.getCurrentAddress());\n this.window.onpopstate = () => {\n this.window.history.forward();\n this.onNativePlatformNavigationBlock?.();\n };\n }\n // Block browser navigation: e.g. reload, setting `window.href` directly, etc.\n this._blockCheckers = blockCheckers;\n this.window.removeEventListener('beforeunload', this._beforeUnloadListener);\n this.window.addEventListener('beforeunload', this._beforeUnloadListener);\n }\n unblockNavigation() {\n this._isNavigationBlocked = false;\n this.onBlock = undefined;\n this.window.onpopstate = null;\n this._blockCheckers = [];\n this.window.removeEventListener('beforeunload', this._beforeUnloadListener);\n }\n get isNavigationBlocked() {\n return this._isNavigationBlocked;\n }\n INTERNAL__internalizeTransientParameter(key) {\n const currentZone = this.getCurrentZone();\n const parameters = this.getCurrentLocationParameters();\n delete parameters[key];\n this.updateCurrentLocation(addQueryParametersToUrl(this.getCurrentLocation(), stringifyQueryParams(parameters)));\n this.updateCurrentZone(currentZone);\n }\n}\n//# sourceMappingURL=BrowserNavigator.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport class ApplicationPlatform {\n applicationStore;\n constructor(applicationStore) {\n this.applicationStore = applicationStore;\n }\n async initialize() {\n // do nothing\n }\n}\n//# sourceMappingURL=ApplicationPlatform.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { BrowserNavigator } from '../navigation/BrowserNavigator.js';\nimport { ApplicationPlatform } from './ApplicationPlatform.js';\nimport { LEGEND_APPLICATION_PARAM_TOKEN } from '../../__lib__/LegendApplicationNavigation.js';\nexport class BrowserPlatform extends ApplicationPlatform {\n navigator;\n constructor(applicationStore, config) {\n super(applicationStore);\n this.navigator = new BrowserNavigator(config.navigate, config.baseUrl);\n }\n getNavigator() {\n return this.navigator;\n }\n async initialize() {\n // set initial color theme\n // NOTE: we allow this to avoid the flash of default color theme\n // when loading the page from another page/ when using the application in an iframe\n const initialColorTheme = this.applicationStore.navigationService.navigator.getCurrentLocationParameterValue(LEGEND_APPLICATION_PARAM_TOKEN.INITIAL_COLOR_THEME);\n if (initialColorTheme) {\n this.applicationStore.layoutService.setColorTheme(initialColorTheme);\n this.applicationStore.navigationService.navigator.INTERNAL__internalizeTransientParameter(LEGEND_APPLICATION_PARAM_TOKEN.INITIAL_COLOR_THEME);\n }\n }\n}\n//# sourceMappingURL=BrowserPlatform.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { guaranteeNonNullable } from '@finos/legend-shared';\nimport { createContext, useContext } from 'react';\nexport const ApplicationPlatformContext = createContext(undefined);\nexport const useApplicationPlatform = () => guaranteeNonNullable(useContext(ApplicationPlatformContext), `Can't find application platform in context`);\n//# sourceMappingURL=ApplicationPlatformProvider.js.map","import { jsx as _jsx } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { useLocalObservable } from 'mobx-react-lite';\nimport { useNavigate } from 'react-router';\nimport { BrowserRouter } from 'react-router-dom';\nimport { BrowserPlatform } from '../stores/platform/BrowserPlatform.js';\nimport { ApplicationPlatformContext } from './ApplicationPlatformProvider.js';\nimport { useApplicationStore } from './ApplicationStoreProvider.js';\nimport { stripTrailingSlash } from '../stores/navigation/BrowserNavigator.js';\nconst BrowserPlatformProvider = ({ children, baseUrl }) => {\n const applicationStore = useApplicationStore();\n const navigate = useNavigate();\n const platform = useLocalObservable(() => new BrowserPlatform(applicationStore, {\n navigate,\n baseUrl: stripTrailingSlash(baseUrl),\n }));\n return (_jsx(ApplicationPlatformContext.Provider, { value: platform, children: children }));\n};\nexport const BrowserEnvironmentProvider = ({ children, baseUrl }) => (_jsx(BrowserRouter, { basename: stripTrailingSlash(baseUrl), children: _jsx(BrowserPlatformProvider, { baseUrl: baseUrl, children: children }) }));\n//# sourceMappingURL=BrowserEnvironmentProvider.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport const WELCOME_FILE_PATH = '/welcome.pure';\nexport const HOME_DIRECTORY_PATH = '/';\nexport const ROOT_PACKAGE_PATH = '::';\nexport var ACTIVITY_MODE;\n(function (ACTIVITY_MODE) {\n ACTIVITY_MODE[\"CONCEPT_EXPLORER\"] = \"CONCEPT_EXPLORER\";\n ACTIVITY_MODE[\"FILE_EXPLORER\"] = \"FILE_EXPLORER\";\n})(ACTIVITY_MODE || (ACTIVITY_MODE = {}));\nexport var PANEL_MODE;\n(function (PANEL_MODE) {\n PANEL_MODE[\"TERMINAL\"] = \"TERMINAL\";\n PANEL_MODE[\"SEARCH\"] = \"SEARCH\";\n PANEL_MODE[\"REFERENCES\"] = \"REFERNECES\";\n PANEL_MODE[\"TEST_RUNNER\"] = \"TEST_RUNNER\";\n PANEL_MODE[\"CODE_FIX_SUGGESTION\"] = \"CODE_FIX_SUGGESTION\";\n})(PANEL_MODE || (PANEL_MODE = {}));\n//# sourceMappingURL=PureIDEConfig.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport var PURE_GRAMMAR_TOKEN;\n(function (PURE_GRAMMAR_TOKEN) {\n PURE_GRAMMAR_TOKEN[\"WHITESPACE\"] = \"\";\n PURE_GRAMMAR_TOKEN[\"KEYWORD\"] = \"keyword\";\n PURE_GRAMMAR_TOKEN[\"IDENTIFIER\"] = \"identifier\";\n PURE_GRAMMAR_TOKEN[\"OPERATOR\"] = \"operator\";\n PURE_GRAMMAR_TOKEN[\"DELIMITER\"] = \"delimiter\";\n PURE_GRAMMAR_TOKEN[\"PARSER\"] = \"parser\";\n PURE_GRAMMAR_TOKEN[\"NUMBER\"] = \"number\";\n PURE_GRAMMAR_TOKEN[\"DATE\"] = \"date\";\n PURE_GRAMMAR_TOKEN[\"COLOR\"] = \"color\";\n PURE_GRAMMAR_TOKEN[\"PACKAGE\"] = \"package\";\n PURE_GRAMMAR_TOKEN[\"STRING\"] = \"string\";\n PURE_GRAMMAR_TOKEN[\"COMMENT\"] = \"comment\";\n PURE_GRAMMAR_TOKEN[\"LANGUAGE_STRUCT\"] = \"language-struct\";\n PURE_GRAMMAR_TOKEN[\"MULTIPLICITY\"] = \"multiplicity\";\n PURE_GRAMMAR_TOKEN[\"GENERICS\"] = \"generics\";\n PURE_GRAMMAR_TOKEN[\"PROPERTY\"] = \"property\";\n PURE_GRAMMAR_TOKEN[\"PARAMETER\"] = \"parameter\";\n PURE_GRAMMAR_TOKEN[\"VARIABLE\"] = \"variable\";\n PURE_GRAMMAR_TOKEN[\"TYPE\"] = \"type\";\n PURE_GRAMMAR_TOKEN[\"INVALID\"] = \"invalid\";\n})(PURE_GRAMMAR_TOKEN || (PURE_GRAMMAR_TOKEN = {}));\n//# sourceMappingURL=PureLanguage.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { at, isNonNullable, isString } from '@finos/legend-shared';\nconst parseVSCodeTheme = (rawData) => {\n const rules = [];\n rawData.tokenColors.forEach((tokenColor) => {\n if (!tokenColor.settings) {\n return;\n }\n let scopes = [];\n if (isString(tokenColor.scope)) {\n scopes = tokenColor.scope\n .replace(/^[,]+/, '')\n .replace(/[,]+$/, '')\n .split(',')\n .map((scope) => scope.trim());\n }\n else if (Array.isArray(tokenColor.scope)) {\n scopes = tokenColor.scope;\n }\n else {\n scopes = [''];\n }\n const baseRule = {};\n if (tokenColor.settings.foreground &&\n isString(tokenColor.settings.foreground)) {\n baseRule.foreground = tokenColor.settings.foreground;\n }\n if (tokenColor.settings.background &&\n isString(tokenColor.settings.background)) {\n baseRule.background = tokenColor.settings.background;\n }\n if (tokenColor.settings.fontStyle &&\n isString(tokenColor.settings.fontStyle)) {\n baseRule.fontStyle = tokenColor.settings.fontStyle;\n }\n scopes.forEach((scope) => {\n if (isNonNullable(scope) || !Object.keys(baseRule).length) {\n return;\n }\n const rule = {\n ...baseRule,\n token: scope,\n };\n rules.push(rule);\n });\n });\n const colors = {};\n Object.entries(rawData.colors).forEach(([key, value]) => {\n if (Array.isArray(value)) {\n if (value.length) {\n colors[key] = at(value, 0);\n }\n }\n else {\n colors[key] = value;\n }\n });\n return {\n base: 'vs-dark',\n inherit: true,\n rules: rules,\n colors,\n };\n};\nexport const buildCodeEditorTheme = (vscodeThemeData, baseTheme, colorsOverride, rulesOverride) => {\n const baseThemeData = parseVSCodeTheme(vscodeThemeData);\n return {\n ...baseThemeData,\n base: baseTheme,\n colors: { ...baseThemeData.colors, ...colorsOverride },\n rules: [...baseThemeData.rules, ...rulesOverride],\n };\n};\n//# sourceMappingURL=MonacoEditorThemeUtils.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { PURE_GRAMMAR_TOKEN } from './PureLanguage.js';\nimport { buildCodeEditorTheme } from './themes/MonacoEditorThemeUtils.js';\nimport SOLARIZED_DARK_THEME_DATA from './themes/solarized-dark-color-theme.json' with { type: 'json' };\nimport GITHUB_DARK_THEME_DATA from './themes/Github-Theme-dark.json' with { type: 'json' };\nimport GITHUB_DARK_DIMMED_THEME_DATA from './themes/Github-Theme-dark-dimmed.json' with { type: 'json' };\nimport GITHUB_LIGHT_THEME_DATA from './themes/Github-Theme-light.json' with { type: 'json' };\nimport MATERIAL_DEFAULT_THEME_DATA from './themes/Material-Theme-Default.json' with { type: 'json' };\nimport MATERIAL_DARKER_THEME_DATA from './themes/Material-Theme-Darker.json' with { type: 'json' };\nimport ONE_DARK_PRO_THEME_DATA from './themes/OneDark-Pro.json' with { type: 'json' };\nimport ONE_DARK_PRO_DARKER_THEME_DATA from './themes/OneDark-Pro-darker.json' with { type: 'json' };\nconst BASE_PURE_LANGUAGE_COLOR_TOKENS = [\n // NOTE: `monaco-editor` only accepts HEX values, not CSS variables\n { token: PURE_GRAMMAR_TOKEN.IDENTIFIER, foreground: 'dcdcaa' },\n { token: PURE_GRAMMAR_TOKEN.NUMBER, foreground: 'b5cea8' },\n { token: PURE_GRAMMAR_TOKEN.DATE, foreground: 'b5cea8' },\n { token: PURE_GRAMMAR_TOKEN.COLOR, foreground: 'b5cea8' },\n { token: PURE_GRAMMAR_TOKEN.PACKAGE, foreground: '808080' },\n { token: PURE_GRAMMAR_TOKEN.PARSER, foreground: 'c586c0' },\n { token: PURE_GRAMMAR_TOKEN.LANGUAGE_STRUCT, foreground: 'c586c0' },\n { token: PURE_GRAMMAR_TOKEN.MULTIPLICITY, foreground: '2d796b' },\n { token: PURE_GRAMMAR_TOKEN.GENERICS, foreground: '2d796b' },\n { token: PURE_GRAMMAR_TOKEN.PROPERTY, foreground: '9cdcfe' },\n { token: PURE_GRAMMAR_TOKEN.PARAMETER, foreground: '9cdcfe' },\n { token: PURE_GRAMMAR_TOKEN.VARIABLE, foreground: '4fc1ff' },\n { token: PURE_GRAMMAR_TOKEN.TYPE, foreground: '3dc9b0' },\n { token: `${PURE_GRAMMAR_TOKEN.STRING}.escape`, foreground: 'd7ba7d' },\n];\nexport var CODE_EDITOR_THEME;\n(function (CODE_EDITOR_THEME) {\n CODE_EDITOR_THEME[\"DEFAULT_DARK\"] = \"default-dark\";\n CODE_EDITOR_THEME[\"GITHUB_LIGHT\"] = \"github-light\";\n CODE_EDITOR_THEME[\"GITHUB_DARK\"] = \"github-dark\";\n CODE_EDITOR_THEME[\"GITHUB_DARK_DIMMED\"] = \"github-dark-dimmed\";\n CODE_EDITOR_THEME[\"SOLARIZED_DARK\"] = \"solarized-dark\";\n CODE_EDITOR_THEME[\"ONE_DARK_PRO\"] = \"one-dark-pro\";\n CODE_EDITOR_THEME[\"ONE_DARK_PRO_DARKER\"] = \"one-dark-pro-darker\";\n CODE_EDITOR_THEME[\"MATERIAL_DEFAULT\"] = \"material-default\";\n CODE_EDITOR_THEME[\"MATERIAL_DARKER\"] = \"material-darker\";\n // default themes in Monaco editor\n // See https://github.com/microsoft/vscode/blob/main/src/vs/editor/standalone/common/themes.ts\n CODE_EDITOR_THEME[\"BUILT_IN__VSCODE_LIGHT\"] = \"vs\";\n CODE_EDITOR_THEME[\"BUILT_IN__VSCODE_DARK\"] = \"vs-dark\";\n CODE_EDITOR_THEME[\"BUILT_IN__VSCODE_HC_BLACK\"] = \"hc-black\";\n CODE_EDITOR_THEME[\"BUILT_IN__VSCODE_HC_LIGHT\"] = \"hc-light\";\n})(CODE_EDITOR_THEME || (CODE_EDITOR_THEME = {}));\nexport const DEFAULT_DARK_THEME = {\n base: 'vs-dark',\n inherit: true,\n colors: {},\n rules: [\n ...BASE_PURE_LANGUAGE_COLOR_TOKENS,\n // NOTE: correct a problem with syntax highlighting of string in SQL\n { token: 'string.sql', foreground: 'ce9178' },\n { token: 'white.sql', foreground: 'd4d4d4' },\n { token: 'identifier.sql', foreground: 'd4d4d4' },\n { token: 'operator.sql', foreground: 'd4d4d4' },\n ],\n};\nexport const SOLARIZED_DARK_THEME = buildCodeEditorTheme(SOLARIZED_DARK_THEME_DATA, CODE_EDITOR_THEME.BUILT_IN__VSCODE_DARK, {}, []);\nexport const GITHUB_DARK_THEME = buildCodeEditorTheme(GITHUB_DARK_THEME_DATA, CODE_EDITOR_THEME.BUILT_IN__VSCODE_DARK, {}, []);\nexport const GITHUB_LIGHT_THEME = buildCodeEditorTheme(GITHUB_LIGHT_THEME_DATA, CODE_EDITOR_THEME.BUILT_IN__VSCODE_LIGHT, {}, [\n// NOTE: `monaco-editor` only accepts HEX values, not CSS variables\n// { token: PURE_GRAMMAR_TOKEN.IDENTIFIER, foreground: '000000' },\n// { token: PURE_GRAMMAR_TOKEN.NUMBER, foreground: 'b5cea8' },\n// { token: PURE_GRAMMAR_TOKEN.DATE, foreground: 'b5cea8' },\n// { token: PURE_GRAMMAR_TOKEN.COLOR, foreground: 'b5cea8' },\n// { token: PURE_GRAMMAR_TOKEN.PACKAGE, foreground: '808080' },\n// { token: PURE_GRAMMAR_TOKEN.PARSER, foreground: 'c586c0' },\n// { token: PURE_GRAMMAR_TOKEN.LANGUAGE_STRUCT, foreground: 'c586c0' },\n// { token: PURE_GRAMMAR_TOKEN.MULTIPLICITY, foreground: '2d796b' },\n// { token: PURE_GRAMMAR_TOKEN.GENERICS, foreground: '2d796b' },\n// { token: PURE_GRAMMAR_TOKEN.PROPERTY, foreground: '9cdcfe' },\n// { token: PURE_GRAMMAR_TOKEN.PARAMETER, foreground: '9cdcfe' },\n// { token: PURE_GRAMMAR_TOKEN.VARIABLE, foreground: '4fc1ff' },\n// { token: PURE_GRAMMAR_TOKEN.TYPE, foreground: '3dc9b0' },\n// { token: `${PURE_GRAMMAR_TOKEN.STRING}.escape`, foreground: 'd7ba7d' },\n// TODO: handle SQL formatting like in dark theme?\n]);\nexport const GITHUB_DARK_DIMMED_THEME = buildCodeEditorTheme(GITHUB_DARK_DIMMED_THEME_DATA, CODE_EDITOR_THEME.BUILT_IN__VSCODE_DARK, {}, []);\nexport const MATERIAL_DEFAULT_THEME = buildCodeEditorTheme(MATERIAL_DEFAULT_THEME_DATA, CODE_EDITOR_THEME.BUILT_IN__VSCODE_DARK, {}, []);\nexport const MATERIAL_DARKER_THEME = buildCodeEditorTheme(MATERIAL_DARKER_THEME_DATA, CODE_EDITOR_THEME.BUILT_IN__VSCODE_DARK, {}, []);\nexport const ONE_DARK_PRO_THEME = buildCodeEditorTheme(ONE_DARK_PRO_THEME_DATA, CODE_EDITOR_THEME.BUILT_IN__VSCODE_DARK, {}, []);\nexport const ONE_DARK_PRO_DARKER_THEME = buildCodeEditorTheme(ONE_DARK_PRO_DARKER_THEME_DATA, CODE_EDITOR_THEME.BUILT_IN__VSCODE_DARK, {}, []);\n//# sourceMappingURL=CodeEditorTheme.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { editor as monacoEditorAPI, MarkerSeverity } from 'monaco-editor';\nimport { CODE_EDITOR_THEME, DEFAULT_DARK_THEME, GITHUB_DARK_DIMMED_THEME, GITHUB_DARK_THEME, GITHUB_LIGHT_THEME, MATERIAL_DARKER_THEME, MATERIAL_DEFAULT_THEME, ONE_DARK_PRO_DARKER_THEME, ONE_DARK_PRO_THEME, SOLARIZED_DARK_THEME, } from './CodeEditorTheme.js';\n/**\n * Get the text value with LF line ending.\n * This is needed since if there are CR `\\r` characters in the text input\n * (e.g. users of Windows doing copy/paste)\n * the default mode of `monaco-editor` is `TextDefined` which means if the text\n * contains CR character(s), it will automatically be treated as CRLF. As such, we want\n * an utility method to extract the text value with line ending option LF\n * to force omission of CR characters\n * See https://github.com/finos/legend-studio/issues/608\n */\nexport const getCodeEditorValue = (editor) => editor.getModel()?.getValue(monacoEditorAPI.EndOfLinePreference.LF) ?? '';\nexport const getBaseCodeEditorOptions = () => ({\n contextmenu: false,\n copyWithSyntaxHighlighting: false,\n // NOTE: These following font options are needed (and CSS font-size option `.monaco-editor * { font-size: ... }` as well)\n // in order to make the editor appear properly on multiple platform, the ligatures option is needed for Mac to display properly\n // otherwise the cursor position relatively to text would be off\n // Another potential cause for this misaligment is that the fonts are being lazy-loaded and made available after `monaco-editor`\n // calculated the font-width, for this, we can use `remeasureFonts`, but our case here, `fontLigatures: true` seems\n // to do the trick\n // See https://github.com/microsoft/monaco-editor/issues/392\n fontSize: 14,\n // Enforce a fixed font-family to make cross platform display consistent (i.e. Mac defaults to use `Menlo` which is bigger than\n // `Consolas` on Windows, etc.)\n fontFamily: 'Roboto Mono',\n // Enable font ligature: glyphs which combine the shapes of certain sequences of characters into a new form that makes for\n // a more harmonious reading experience.\n fontLigatures: true,\n // Make sure hover or widget shown near boundary are not truncated by setting their position to `fixed`\n fixedOverflowWidgets: true,\n detectIndentation: false, // i.e. so we can force tab-size\n tabSize: 2,\n // The typing is currently not correct for `bracketPairColorization`, until this is fixed, we will remove the cast\n // See https://github.com/microsoft/monaco-editor/issues/3013\n 'bracketPairColorization.enabled': false,\n automaticLayout: true,\n});\nexport const moveCursorToPosition = (editor, position) => {\n if (!editor.hasTextFocus()) {\n editor.focus();\n } // focus the editor first so that it can shows the cursor\n editor.revealPositionInCenter(position, 0);\n editor.setPosition(position);\n};\nconst INTERNAL__DUMMY_PROBLEM_MARKER_OWNER = 'dummy_problem_marker_owner';\nexport const setErrorMarkers = (editorModel, errors, ownerId) => {\n monacoEditorAPI.setModelMarkers(editorModel, ownerId ?? INTERNAL__DUMMY_PROBLEM_MARKER_OWNER, errors.map((error) => ({\n startLineNumber: error.startLineNumber,\n startColumn: error.startColumn,\n endLineNumber: error.endLineNumber,\n endColumn: error.endColumn + 1, // add a 1 to endColumn as monaco editor range is not inclusive\n // NOTE: when the message is empty, no error tooltip is shown, we want to avoid this\n message: error.message === '' ? '(no error message)' : error.message,\n severity: MarkerSeverity.Error,\n })));\n};\nexport const setWarningMarkers = (editorModel, warnings, ownerId) => {\n monacoEditorAPI.setModelMarkers(editorModel, ownerId ?? INTERNAL__DUMMY_PROBLEM_MARKER_OWNER, warnings.map((warning) => ({\n startLineNumber: warning.startLineNumber,\n startColumn: warning.startColumn,\n endColumn: warning.endColumn,\n endLineNumber: warning.endLineNumber,\n message: warning.message === '' ? '(no warning message)' : warning.message,\n severity: MarkerSeverity.Warning,\n })));\n};\nexport const clearMarkers = (ownerId) => {\n monacoEditorAPI.removeAllMarkers(ownerId ?? INTERNAL__DUMMY_PROBLEM_MARKER_OWNER);\n};\n/**\n * This method eliminates CR '\\r' character(s) in the provided text value.\n */\nexport const normalizeLineEnding = (val) => val.replace(/\\r/g, '');\n// We need to dynamically adjust the width of the line number gutter, otherwise as the document gets\n// larger, the left margin will start to shrink\n// See https://github.com/microsoft/monaco-editor/issues/2206\nexport const resetLineNumberGutterWidth = (editor) => {\n const currentValue = editor.getValue();\n editor.updateOptions({\n lineNumbersMinChars: Math.max(Math.floor(Math.log10(currentValue.split(/\\r\\n|\\r|\\n/g).length)) + 3, 5),\n });\n};\nexport const configureCodeEditor = async (fontFamily, onError) => {\n // themes\n monacoEditorAPI.defineTheme(CODE_EDITOR_THEME.DEFAULT_DARK, DEFAULT_DARK_THEME);\n monacoEditorAPI.defineTheme(CODE_EDITOR_THEME.SOLARIZED_DARK, SOLARIZED_DARK_THEME);\n monacoEditorAPI.defineTheme(CODE_EDITOR_THEME.GITHUB_DARK, GITHUB_DARK_THEME);\n monacoEditorAPI.defineTheme(CODE_EDITOR_THEME.GITHUB_DARK_DIMMED, GITHUB_DARK_DIMMED_THEME);\n monacoEditorAPI.defineTheme(CODE_EDITOR_THEME.GITHUB_LIGHT, GITHUB_LIGHT_THEME);\n monacoEditorAPI.defineTheme(CODE_EDITOR_THEME.MATERIAL_DEFAULT, MATERIAL_DEFAULT_THEME);\n monacoEditorAPI.defineTheme(CODE_EDITOR_THEME.MATERIAL_DARKER, MATERIAL_DARKER_THEME);\n monacoEditorAPI.defineTheme(CODE_EDITOR_THEME.ONE_DARK_PRO, ONE_DARK_PRO_THEME);\n monacoEditorAPI.defineTheme(CODE_EDITOR_THEME.ONE_DARK_PRO_DARKER, ONE_DARK_PRO_DARKER_THEME);\n /**\n * Since we use a custom fonts for text-editor, we want to make sure the font is loaded before any text-editor is opened\n * this is to ensure\n */\n const fontLoadFailureErrorMessage = `Monospaced font '${fontFamily}' has not been loaded properly, code editor might not display properly`;\n await Promise.all([400, 700].map((weight) => document.fonts.load(`${weight} 1em ${fontFamily}`)))\n .then(() => {\n if (document.fonts.check(`1em ${fontFamily}`)) {\n monacoEditorAPI.remeasureFonts();\n }\n else {\n onError(new Error(fontLoadFailureErrorMessage));\n }\n })\n .catch(() => onError(new Error(fontLoadFailureErrorMessage)));\n};\nexport var CODE_EDITOR_LANGUAGE;\n(function (CODE_EDITOR_LANGUAGE) {\n CODE_EDITOR_LANGUAGE[\"TEXT\"] = \"plaintext\";\n CODE_EDITOR_LANGUAGE[\"PURE\"] = \"pure\";\n CODE_EDITOR_LANGUAGE[\"JSON\"] = \"json\";\n CODE_EDITOR_LANGUAGE[\"JAVA\"] = \"java\";\n CODE_EDITOR_LANGUAGE[\"MARKDOWN\"] = \"markdown\";\n CODE_EDITOR_LANGUAGE[\"SQL\"] = \"sql\";\n CODE_EDITOR_LANGUAGE[\"XML\"] = \"xml\";\n CODE_EDITOR_LANGUAGE[\"YAML\"] = \"yaml\";\n CODE_EDITOR_LANGUAGE[\"GRAPHQL\"] = \"graphql\";\n})(CODE_EDITOR_LANGUAGE || (CODE_EDITOR_LANGUAGE = {}));\n//# sourceMappingURL=CodeEditorUtils.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport const MULTIPLICITY_INFINITE = '*';\nexport const ELEMENT_PATH_DELIMITER = '::';\nexport const MULTIPLICITY_RANGE_OPERATOR = '..';\nexport const PROPERTY_ACCESSOR = '.';\nexport const UNIT_PATH_DELIMITER = '~';\nexport const LAMBDA_PIPE = '|';\nexport const DEFAULT_SOURCE_PARAMETER_NAME = 'src';\nexport const DEFAULT_DATABASE_SCHEMA_NAME = 'default';\nexport const SECTION_INDEX_ELEMENT_PATH = '__internal__::SectionIndex';\nexport const VARIABLE_REFERENCE_TOKEN = '$';\nexport const TYPE_CAST_TOKEN = '@';\nexport const ARROW_FUNCTION_TOKEN = '->';\nexport const LATEST_DATE = '%latest';\nexport const PARSER_SECTION_MARKER = '###';\nexport const FUNCTION_SIGNATURE_MULTIPLICITY_INFINITE_TOKEN = 'MANY';\nexport const DIRECTORY_PATH_DELIMITER = '/';\nexport const SOURCE_INFORMATION_PROPERTY_KEY_SUFFIX = 'sourceInformation';\nexport const LET_TOKEN = 'let';\nexport const RESERVERD_PACKAGE_NAMES = ['$implicit'];\nexport var ROOT_PACKAGE_NAME;\n(function (ROOT_PACKAGE_NAME) {\n ROOT_PACKAGE_NAME[\"CORE\"] = \"CORE\";\n ROOT_PACKAGE_NAME[\"MAIN\"] = \"ROOT\";\n ROOT_PACKAGE_NAME[\"MODEL_GENERATION\"] = \"MODEL_GENERATION_ROOT\";\n ROOT_PACKAGE_NAME[\"SYSTEM\"] = \"SYSTEM_ROOT\";\n ROOT_PACKAGE_NAME[\"PROJECT_DEPENDENCY_ROOT\"] = \"PROJECT_DEPENDENCY_ROOT\";\n})(ROOT_PACKAGE_NAME || (ROOT_PACKAGE_NAME = {}));\nexport var PRIMITIVE_TYPE;\n(function (PRIMITIVE_TYPE) {\n PRIMITIVE_TYPE[\"STRING\"] = \"String\";\n PRIMITIVE_TYPE[\"BOOLEAN\"] = \"Boolean\";\n PRIMITIVE_TYPE[\"BINARY\"] = \"Binary\";\n PRIMITIVE_TYPE[\"NUMBER\"] = \"Number\";\n PRIMITIVE_TYPE[\"INTEGER\"] = \"Integer\";\n PRIMITIVE_TYPE[\"FLOAT\"] = \"Float\";\n PRIMITIVE_TYPE[\"DECIMAL\"] = \"Decimal\";\n PRIMITIVE_TYPE[\"DATE\"] = \"Date\";\n PRIMITIVE_TYPE[\"STRICTDATE\"] = \"StrictDate\";\n PRIMITIVE_TYPE[\"DATETIME\"] = \"DateTime\";\n PRIMITIVE_TYPE[\"STRICTTIME\"] = \"StrictTime\";\n // NOTE: `LatestDate` is a special type that is used for milestoning in store so its used in the body of function and lamdba but never should be exposed to users\n // as such, if there is a day we want to have `LatestDate` in the graph but not exposed to the users\n PRIMITIVE_TYPE[\"LATESTDATE\"] = \"LatestDate\";\n PRIMITIVE_TYPE[\"BYTE\"] = \"Byte\";\n})(PRIMITIVE_TYPE || (PRIMITIVE_TYPE = {}));\nexport var PRECISE_PRIMITIVE_TYPE;\n(function (PRECISE_PRIMITIVE_TYPE) {\n PRECISE_PRIMITIVE_TYPE[\"VARCHAR\"] = \"meta::pure::precisePrimitives::Varchar\";\n PRECISE_PRIMITIVE_TYPE[\"INT\"] = \"meta::pure::precisePrimitives::Int\";\n PRECISE_PRIMITIVE_TYPE[\"TINY_INT\"] = \"meta::pure::precisePrimitives::TinyInt\";\n PRECISE_PRIMITIVE_TYPE[\"U_TINY_INT\"] = \"meta::pure::precisePrimitives::UTinyInt\";\n PRECISE_PRIMITIVE_TYPE[\"SMALL_INT\"] = \"meta::pure::precisePrimitives::SmallInt\";\n PRECISE_PRIMITIVE_TYPE[\"U_SMALL_INT\"] = \"meta::pure::precisePrimitives::USmallInt\";\n PRECISE_PRIMITIVE_TYPE[\"U_INT\"] = \"meta::pure::precisePrimitives::UInt\";\n PRECISE_PRIMITIVE_TYPE[\"BIG_INT\"] = \"meta::pure::precisePrimitives::BigInt\";\n PRECISE_PRIMITIVE_TYPE[\"U_BIG_INT\"] = \"meta::pure::precisePrimitives::UBigInt\";\n PRECISE_PRIMITIVE_TYPE[\"FLOAT\"] = \"meta::pure::precisePrimitives::Float4\";\n PRECISE_PRIMITIVE_TYPE[\"DOUBLE\"] = \"meta::pure::precisePrimitives::Double\";\n PRECISE_PRIMITIVE_TYPE[\"DECIMAL\"] = \"meta::pure::precisePrimitives::Decimal\";\n PRECISE_PRIMITIVE_TYPE[\"STRICTDATE\"] = \"meta::pure::precisePrimitives::Date\";\n PRECISE_PRIMITIVE_TYPE[\"DATETIME\"] = \"meta::pure::precisePrimitives::Timestamp\";\n PRECISE_PRIMITIVE_TYPE[\"STRICTTIME\"] = \"meta::pure::precisePrimitives::Time\";\n PRECISE_PRIMITIVE_TYPE[\"NUMERIC\"] = \"meta::pure::precisePrimitives::Numeric\";\n PRECISE_PRIMITIVE_TYPE[\"TIMESTAMP\"] = \"meta::relational::metamodel::datatype::Timestamp\";\n})(PRECISE_PRIMITIVE_TYPE || (PRECISE_PRIMITIVE_TYPE = {}));\nexport var ATOMIC_TEST_TYPE;\n(function (ATOMIC_TEST_TYPE) {\n ATOMIC_TEST_TYPE[\"Service_Test\"] = \"serviceTest\";\n ATOMIC_TEST_TYPE[\"Mapping_Test\"] = \"mappingTest\";\n ATOMIC_TEST_TYPE[\"Function_Test\"] = \"functionTest\";\n})(ATOMIC_TEST_TYPE || (ATOMIC_TEST_TYPE = {}));\n// NOTE: the list of auto-import are kept in `m3.pure` file in `finos/legend-pure`,\n// this includes a more extensive list of packages which contain native functions, classes, etc.\n// See https://github.com/finos/legend-pure/blob/master/legend-pure-core/legend-pure-m3-core/src/main/resources/platform/pure/grammar/m3.pure\nexport const AUTO_IMPORTS = [\n // 'meta::pure::metamodel',\n 'meta::pure::metamodel::type',\n // 'meta::pure::metamodel::type::generics',\n // 'meta::pure::metamodel::relationship',\n // 'meta::pure::metamodel::valuespecification',\n // 'meta::pure::metamodel::multiplicity',\n // 'meta::pure::metamodel::function',\n // 'meta::pure::metamodel::function::property',\n // 'meta::pure::metamodel::extension',\n // 'meta::pure::metamodel::import',\n 'meta::pure::functions::date',\n // 'meta::pure::functions::string',\n // 'meta::pure::functions::collection',\n // 'meta::pure::functions::meta',\n // 'meta::pure::functions::constraints',\n // 'meta::pure::functions::lang',\n // 'meta::pure::functions::boolean',\n // 'meta::pure::functions::tools',\n // 'meta::pure::functions::io',\n // 'meta::pure::functions::math',\n // 'meta::pure::functions::asserts',\n // 'meta::pure::functions::test',\n // 'meta::pure::functions::multiplicity',\n // 'meta::pure::router',\n // 'meta::pure::service',\n // 'meta::pure::tds',\n // 'meta::pure::tools',\n 'meta::pure::profiles',\n 'meta::pure::metamodel::relation',\n 'meta::pure::metamodel::variant',\n];\nexport var CORE_PURE_PATH;\n(function (CORE_PURE_PATH) {\n // type\n CORE_PURE_PATH[\"ANY\"] = \"meta::pure::metamodel::type::Any\";\n CORE_PURE_PATH[\"NIL\"] = \"meta::pure::metamodel::type::Nil\";\n CORE_PURE_PATH[\"RELATION\"] = \"meta::pure::metamodel::relation::Relation\";\n CORE_PURE_PATH[\"TABULAR_DATASET\"] = \"meta::pure::tds::TabularDataSet\";\n CORE_PURE_PATH[\"VARIANT\"] = \"meta::pure::metamodel::variant::Variant\";\n // profile\n CORE_PURE_PATH[\"PROFILE_DOC\"] = \"meta::pure::profiles::doc\";\n CORE_PURE_PATH[\"PROFILE_TEMPORAL\"] = \"meta::pure::profiles::temporal\";\n // classifier paths\n CORE_PURE_PATH[\"PROFILE\"] = \"meta::pure::metamodel::extension::Profile\";\n CORE_PURE_PATH[\"ENUMERATION\"] = \"meta::pure::metamodel::type::Enumeration\";\n CORE_PURE_PATH[\"MEASURE\"] = \"meta::pure::metamodel::type::Measure\";\n CORE_PURE_PATH[\"CLASS\"] = \"meta::pure::metamodel::type::Class\";\n CORE_PURE_PATH[\"ASSOCIATION\"] = \"meta::pure::metamodel::relationship::Association\";\n CORE_PURE_PATH[\"FUNCTION\"] = \"meta::pure::metamodel::function::ConcreteFunctionDefinition\";\n CORE_PURE_PATH[\"FLAT_DATA\"] = \"meta::flatData::metamodel::FlatData\";\n CORE_PURE_PATH[\"DATABASE\"] = \"meta::relational::metamodel::Database\";\n CORE_PURE_PATH[\"MAPPING\"] = \"meta::pure::mapping::Mapping\";\n CORE_PURE_PATH[\"SERVICE\"] = \"meta::legend::service::metamodel::Service\";\n CORE_PURE_PATH[\"CONNECTION\"] = \"meta::pure::runtime::PackageableConnection\";\n CORE_PURE_PATH[\"RUNTIME\"] = \"meta::pure::runtime::PackageableRuntime\";\n CORE_PURE_PATH[\"EXECUTION_ENVIRONMENT\"] = \"meta::legend::service::metamodel::ExecutionEnvironmentInstance\";\n CORE_PURE_PATH[\"FILE_GENERATION\"] = \"meta::pure::generation::metamodel::GenerationConfiguration\";\n CORE_PURE_PATH[\"GENERATION_SPECIFICATION\"] = \"meta::pure::generation::metamodel::GenerationSpecification\";\n CORE_PURE_PATH[\"SECTION_INDEX\"] = \"meta::pure::metamodel::section::SectionIndex\";\n CORE_PURE_PATH[\"DATA_ELEMENT\"] = \"meta::pure::data::DataElement\";\n CORE_PURE_PATH[\"SNOWFLAKE_APP\"] = \"meta::external::function::activator::snowflakeApp::SnowflakeApp\";\n CORE_PURE_PATH[\"SNOWFLAKE_M2M_UDF\"] = \"meta::external::function::activator::snowflakeM2MUdf::SnowflakeM2MUdf\";\n CORE_PURE_PATH[\"HOSTED_SERVICE\"] = \"meta::external::function::activator::hostedService::HostedService\";\n CORE_PURE_PATH[\"MEM_SQL_FUNCTION\"] = \"meta::external::function::activator::memSqlFunction::MemSqlFunction\";\n CORE_PURE_PATH[\"TABULAR_RESULT\"] = \"meta::pure::mapping::Result\";\n CORE_PURE_PATH[\"DATA_PRODUCT\"] = \"meta::external::catalog::dataProduct::specification::metamodel::DataProduct\";\n CORE_PURE_PATH[\"INGEST_DEFINITION\"] = \"meta::external::ingest::specification::metamodel::IngestDefinition\";\n})(CORE_PURE_PATH || (CORE_PURE_PATH = {}));\nexport const PURE_DOC_TAG = 'doc';\nexport const PURE_DEPRECATED_STEREOTYPE = 'deprecated';\nexport var MILESTONING_STEREOTYPE;\n(function (MILESTONING_STEREOTYPE) {\n MILESTONING_STEREOTYPE[\"BUSINESS_TEMPORAL\"] = \"businesstemporal\";\n MILESTONING_STEREOTYPE[\"PROCESSING_TEMPORAL\"] = \"processingtemporal\";\n MILESTONING_STEREOTYPE[\"BITEMPORAL\"] = \"bitemporal\";\n})(MILESTONING_STEREOTYPE || (MILESTONING_STEREOTYPE = {}));\nexport var MILESTONING_VERSION_PROPERTY_SUFFIX;\n(function (MILESTONING_VERSION_PROPERTY_SUFFIX) {\n MILESTONING_VERSION_PROPERTY_SUFFIX[\"ALL_VERSIONS\"] = \"AllVersions\";\n MILESTONING_VERSION_PROPERTY_SUFFIX[\"ALL_VERSIONS_IN_RANGE\"] = \"AllVersionsInRange\";\n})(MILESTONING_VERSION_PROPERTY_SUFFIX || (MILESTONING_VERSION_PROPERTY_SUFFIX = {}));\nexport const MILESTONING_START_DATE_PARAMETER_NAME = 'startDate';\nexport const MILESTONING_END_DATE_PARAMETER_NAME = 'endDate';\nexport const PROCESSING_DATE_MILESTONING_PROPERTY_NAME = 'processingDate';\nexport const BUSINESS_DATE_MILESTONING_PROPERTY_NAME = 'businessDate';\nexport var PackageableElementPointerType;\n(function (PackageableElementPointerType) {\n PackageableElementPointerType[\"CLASS\"] = \"CLASS\";\n PackageableElementPointerType[\"STORE\"] = \"STORE\";\n PackageableElementPointerType[\"MAPPING\"] = \"MAPPING\";\n PackageableElementPointerType[\"RUNTIME\"] = \"RUNTIME\";\n PackageableElementPointerType[\"FUNCTION\"] = \"FUNCTION\";\n PackageableElementPointerType[\"FILE_GENERATION\"] = \"FILE_GENERATION\";\n PackageableElementPointerType[\"SERVICE\"] = \"SERVICE\";\n PackageableElementPointerType[\"DATA\"] = \"DATA\";\n PackageableElementPointerType[\"ENUMERATION\"] = \"ENUMERATION\";\n PackageableElementPointerType[\"ASSOCIATION\"] = \"ASSOCIATION\";\n PackageableElementPointerType[\"BINDING\"] = \"BINDING\";\n})(PackageableElementPointerType || (PackageableElementPointerType = {}));\nexport var SUPPORTED_FUNCTIONS;\n(function (SUPPORTED_FUNCTIONS) {\n SUPPORTED_FUNCTIONS[\"LET\"] = \"meta::pure::functions::lang::letFunction\";\n SUPPORTED_FUNCTIONS[\"NEW\"] = \"meta::pure::functions::meta::new\";\n // from\n SUPPORTED_FUNCTIONS[\"FROM\"] = \"meta::pure::mapping::from\";\n})(SUPPORTED_FUNCTIONS || (SUPPORTED_FUNCTIONS = {}));\nexport const DATE_TIME_FORMAT_WITH_MILLISECONDS = \"yyyy-MM-dd'T'HH:mm:ss.SSSxxxx\";\nexport const DATE_TIME_FORMAT = \"yyyy-MM-dd'T'HH:mm:ssxxxx\";\nexport const DATE_FORMAT = 'yyyy-MM-dd';\n// Generation Const\nexport const DEFAULT_GENERATION_PACKAGE = 'generated';\n// Query\nexport const QUERY_PROFILE_TAG_CLASS = 'class';\nexport const QUERY_PROFILE_PATH = 'meta::pure::profiles::query';\n//# sourceMappingURL=MetaModelConst.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { guaranteeType } from '@finos/legend-shared';\nimport { createModelSchema, primitive, custom, SKIP, deserialize, optional, } from 'serializr';\nexport var ConceptType;\n(function (ConceptType) {\n // PRIMITIVE = 'Primitive',\n ConceptType[\"PACKAGE\"] = \"Package\";\n ConceptType[\"PROFILE\"] = \"Profile\";\n ConceptType[\"TAG\"] = \"Tag\";\n ConceptType[\"STEREOTYPE\"] = \"Stereotype\";\n ConceptType[\"CLASS\"] = \"Class\";\n ConceptType[\"ASSOCIATION\"] = \"Association\";\n ConceptType[\"PROPERTY\"] = \"Property\";\n ConceptType[\"QUALIFIED_PROPERTY\"] = \"QualifiedProperty\";\n ConceptType[\"ENUMERATION\"] = \"Enumeration\";\n ConceptType[\"ENUM_VALUE\"] = \"Enum\";\n ConceptType[\"MEASURE\"] = \"Measure\";\n ConceptType[\"UNIT\"] = \"Unit\";\n ConceptType[\"FUNCTION\"] = \"ConcreteFunctionDefinition\";\n ConceptType[\"NATIVE_FUNCTION\"] = \"NativeFunction\";\n ConceptType[\"DIAGRAM\"] = \"Diagram\";\n ConceptType[\"DATABASE\"] = \"Database\";\n ConceptType[\"MAPPING\"] = \"Mapping\";\n})(ConceptType || (ConceptType = {}));\nclass ConceptAttribute {\n pureId;\n pureType;\n pureName;\n // test?: string; // boolean\n get id() {\n return this.pureId;\n }\n}\nexport class PackageConceptAttribute extends ConceptAttribute {\n deprecated;\n}\ncreateModelSchema(PackageConceptAttribute, {\n pureId: primitive(),\n pureType: primitive(),\n deprecated: primitive(),\n});\nexport class PropertyConceptAttribute extends ConceptAttribute {\n RO; // boolean\n classPath;\n file;\n line; // number\n column; // number\n get id() {\n return `${this.classPath}.${this.pureId}`;\n }\n}\ncreateModelSchema(PropertyConceptAttribute, {\n pureId: primitive(),\n pureName: primitive(),\n pureType: primitive(),\n RO: primitive(),\n classPath: primitive(),\n file: primitive(),\n line: primitive(),\n column: primitive(),\n});\nexport class ElementConceptAttribute extends ConceptAttribute {\n RO; // boolean\n notpublic;\n user; // boolean\n file;\n line; // number\n column; // number\n}\ncreateModelSchema(ElementConceptAttribute, {\n pureId: primitive(),\n pureName: optional(primitive()),\n pureType: primitive(),\n RO: primitive(),\n notpublic: primitive(),\n user: primitive(),\n file: primitive(),\n line: primitive(),\n column: primitive(),\n});\nexport class ConceptNode {\n li_attr;\n id;\n text;\n test;\n pct;\n icon;\n children;\n state;\n getNodeAttribute(clazz) {\n return guaranteeType(this.li_attr, clazz, `Expected concept node attribute to be of type '${clazz.name}'`);\n }\n}\ncreateModelSchema(ConceptNode, {\n li_attr: custom(() => SKIP, (value) => {\n if (value.classPath) {\n return deserialize(PropertyConceptAttribute, value);\n }\n else if (value.file) {\n return deserialize(ElementConceptAttribute, value);\n }\n else {\n return deserialize(PackageConceptAttribute, value);\n }\n }),\n id: primitive(),\n text: primitive(),\n test: optional(primitive()),\n pct: optional(primitive()),\n icon: primitive(),\n children: primitive(),\n state: primitive(),\n});\n//# sourceMappingURL=ConceptTree.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport hash from 'hash.js';\nimport { default as objectHash, } from 'object-hash';\nimport { assertTrue, isObject, isBoolean, isNumber, isString, isNonNullable, } from '../error/AssertionUtils.js';\nexport const hashValue = (val) => hash.sha1().update(val).digest('hex');\nexport const hashUnknownValue = (val) => {\n assertTrue(isString(val) || isBoolean(val) || isNumber(val), `Can't hash non-primitive value`);\n return hashValue(val);\n};\nexport const hashArray = (arr) => hashValue(arr\n .filter(isNonNullable)\n .map((val) => typeof val === 'string' ||\n typeof val === 'boolean' ||\n typeof val === 'number'\n ? hashValue(val)\n : val.hashCode)\n .join(','));\n/**\n * NOTE: `node-object-hash` seems to be the much more efficient library. But it's based on Node's `crypto` module\n * which is not supported in browser (so we have map `crypto` module to `crypto-browserify` or `crypto-js`).\n * If this object-hashing becomes the performance bottle-neck, we should think about adopting this hashing library\n * See https://www.npmjs.com/package/node-object-hash\n */\nexport const hashObject = (value, options) => {\n assertTrue(isObject(value), `Can't hash non-object value`);\n return objectHash(value, options);\n};\n/**\n * This method can be used to debug hashing.\n *\n * We have tried to come up with a more robust way to debug hash, such as to construct the hash tree, but that's not\n * quite feasible for the following reasons:\n * 1. Since sometimes there are properties we don't drill down like for a class, we just take the path, we don't have\n * a systematic way to construct the hash tree, so we have to rely on the implementation of the hashCode function\n * in each element, which defeats the purpose of having a generic approach for debugging hash\n * 2. If we ignore the implementation detail of `get hashCode` and expand the property if it has `hashCode` then we\n * might risk getting into an infinite loop\n * 3. The manual way to come up with the `get hashCode` is in order to reconcile the differences between metamodels and\n * protocol models. If we only compare metamodels to protocol models for example, the problem might be less complicated,\n * but we're dealing with 2 hash systems (in a way)\n * 4. As such, the best solution at the moment is to come up with a function like this\n * to debug hash where we can put it at a top level structure like `Mapping` and then choose which part of the hash\n * we would like to `explore`\n *\n * @param typesToExpand when we trickle down the object properties, we want to drill down so we want to choose\n * the property to drill down (by its type) since sometimes we don't need to compute the\n * actual hash code for the property (for example: a class, or an enumeration) while computing\n * the hash, just their path.\n */\nexport const debugHash = (obj, typesToExpand, depth = 0) => {\n let res = depth !== 0 ? `${obj.hashCode}` : '';\n res += ` {\\n`;\n Object.entries(obj)\n .filter(([key, value]) => typeof value === 'object' &&\n (!Array.isArray(value) ||\n (value.length !== 0 &&\n value.every((v) => typesToExpand.some((typeToExpand) => v instanceof typeToExpand)))) &&\n (Array.isArray(value) ||\n typesToExpand.some((typeToExpand) => value instanceof typeToExpand)))\n .forEach(([key, value]) => {\n res += `${' '.repeat(depth + 1)}${key}: ${Array.isArray(value)\n ? !value.length\n ? '[]'\n : `[\\n${' '.repeat(depth + 2)}${value\n .map((val, idx) => `${idx}: ${debugHash(val, typesToExpand, depth + 2)}`)\n .join(`\\n${' '.repeat(depth + 2)}`)}\\n${' '.repeat(depth + 1)}]`\n : debugHash(value, typesToExpand, depth + 1)}\\n`;\n });\n res += `${' '.repeat(depth)}}`;\n return res;\n};\n//# sourceMappingURL=HashUtils.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { hashValue } from '@finos/legend-shared';\nimport { action, computed, makeObservable, observable } from 'mobx';\nimport { createModelSchema, primitive } from 'serializr';\nexport const trimPathLeadingSlash = (path) => path.startsWith('/') ? path.substring(1, path.length) : path;\nexport class File {\n content;\n RO;\n constructor() {\n makeObservable(this, {\n content: observable,\n hashCode: computed,\n setContent: action,\n });\n }\n setContent(value) {\n this.content = value;\n }\n get hashCode() {\n return hashValue(this.content);\n }\n}\ncreateModelSchema(File, {\n content: primitive(),\n RO: primitive(),\n});\nexport class FileCoordinate {\n file;\n line;\n column;\n constructor(file, line, column) {\n this.file = file;\n this.line = line;\n this.column = column;\n }\n}\nexport class FileErrorCoordinate extends FileCoordinate {\n error;\n constructor(file, line, column, error) {\n super(file, line ?? 1, column ?? 1);\n this.error = error;\n }\n}\n//# sourceMappingURL=File.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { createModelSchema, list, object, primitive } from 'serializr';\nexport var FIND_USAGE_FUNCTION_PATH;\n(function (FIND_USAGE_FUNCTION_PATH) {\n FIND_USAGE_FUNCTION_PATH[\"ENUM\"] = \"meta::pure::ide::findusages::findUsagesForEnum_String_1__String_1__SourceInformation_MANY_\";\n FIND_USAGE_FUNCTION_PATH[\"PROPERTY\"] = \"meta::pure::ide::findusages::findUsagesForProperty_String_1__String_1__SourceInformation_MANY_\";\n FIND_USAGE_FUNCTION_PATH[\"ELEMENT\"] = \"meta::pure::ide::findusages::findUsagesForPath_String_1__SourceInformation_MANY_\";\n FIND_USAGE_FUNCTION_PATH[\"MULTIPLE_PATHS\"] = \"meta::pure::ide::findusages::findUsagesForMultiplePaths_String_1__Pair_MANY_\";\n})(FIND_USAGE_FUNCTION_PATH || (FIND_USAGE_FUNCTION_PATH = {}));\nexport const getConceptInfoLabel = (usageConcept) => `'${usageConcept.path}'${usageConcept.owner ? ` of '${usageConcept.owner}'` : ''}`;\nexport class Usage {\n source;\n line;\n column;\n startLine;\n startColumn;\n endLine;\n endColumn;\n}\ncreateModelSchema(Usage, {\n source: primitive(),\n line: primitive(),\n column: primitive(),\n startLine: primitive(),\n startColumn: primitive(),\n endLine: primitive(),\n endColumn: primitive(),\n});\nexport class PackageableElementUsage {\n first;\n second;\n}\ncreateModelSchema(PackageableElementUsage, {\n first: primitive(),\n second: list(object(Usage)),\n});\n//# sourceMappingURL=Usage.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { assertNonNullable, assertTrue, swapEntry, uuid, } from '@finos/legend-shared';\nimport { action, makeObservable, observable } from 'mobx';\nexport class TabState {\n uuid = uuid();\n isPinned = false;\n constructor() {\n makeObservable(this, {\n isPinned: observable,\n setPinned: action,\n });\n }\n get description() {\n return undefined;\n }\n setPinned(val) {\n this.isPinned = val;\n }\n match(tab) {\n return this === tab;\n }\n onOpen() {\n // do nothing\n }\n onClose() {\n // do nothing\n }\n}\nexport class TabManagerState {\n currentTab;\n tabs = [];\n constructor() {\n makeObservable(this, {\n currentTab: observable,\n setCurrentTab: action,\n tabs: observable,\n closeTab: action,\n closeAllTabs: action,\n closeAllOtherTabs: action,\n openTab: action,\n swapTabs: action,\n pinTab: action,\n unpinTab: action,\n });\n }\n setCurrentTab(val) {\n this.currentTab = val;\n }\n closeAllOtherTabs(tab) {\n assertNonNullable(this.tabs.find((e) => e === tab), 'Specified tab should be currently opened');\n this.setCurrentTab(tab);\n this.tabs = this.tabs.filter((_tab) => _tab.isPinned || _tab === tab);\n }\n closeAllTabs() {\n this.tabs = this.tabs.filter((tab) => tab.isPinned);\n if (!this.currentTab || !this.tabs.includes(this.currentTab)) {\n this.setCurrentTab(this.tabs.length ? this.tabs[0] : undefined);\n }\n }\n swapTabs(tab1, tab2) {\n if (tab1.isPinned !== tab2.isPinned) {\n // cannot swap pinned tab with unpinned tab or vice versa\n return;\n }\n swapEntry(this.tabs, tab1, tab2);\n }\n openTab(tab) {\n const existingTab = this.tabs.find((t) => t.match(tab));\n if (!existingTab) {\n if (this.currentTab) {\n const currIndex = this.tabs.findIndex((e) => e === this.currentTab);\n this.tabs.splice(Math.max(currIndex + 1, this.tabs.filter((t) => t.isPinned).length), 0, tab);\n }\n else {\n this.tabs.push(tab);\n }\n }\n this.setCurrentTab(tab);\n tab.onOpen();\n }\n closeTab(tab) {\n if (tab.isPinned) {\n return;\n }\n const tabIndex = this.tabs.findIndex((t) => t.match(tab));\n assertTrue(tabIndex !== -1, `Can't close a tab which is not opened`);\n this.tabs.splice(tabIndex, 1);\n if (this.currentTab === tab) {\n if (this.tabs.length) {\n const openIndex = tabIndex - 1;\n this.setCurrentTab(openIndex >= 0 ? this.tabs[openIndex] : this.tabs[0]);\n }\n else {\n this.setCurrentTab(undefined);\n }\n }\n tab.onClose();\n }\n pinTab(tab) {\n if (tab.isPinned) {\n return;\n }\n const tabIndex = this.tabs.findIndex((t) => t.match(tab));\n this.tabs.splice(tabIndex, 1);\n this.tabs.splice(this.tabs.filter((t) => t.isPinned).length, 0, tab);\n tab.setPinned(true);\n }\n unpinTab(tab) {\n if (!tab.isPinned) {\n return;\n }\n const tabIndex = this.tabs.findIndex((t) => t.match(tab));\n this.tabs.splice(tabIndex, 1);\n this.tabs.splice(this.tabs.filter((t) => t.isPinned).length, 0, tab);\n tab.setPinned(false);\n }\n}\n//# sourceMappingURL=TabManagerState.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { ActionAlertActionType, ActionAlertType, } from '@finos/legend-application';\nimport { flowResult } from 'mobx';\nimport { FileEditorState } from './FileEditorState.js';\nimport { TabManagerState, TabState } from '@finos/legend-lego/application';\nexport class PureIDETabState extends TabState {\n ideStore;\n constructor(ideStore) {\n super();\n this.ideStore = ideStore;\n }\n}\nexport class PureIDETabManagerState extends TabManagerState {\n ideStore;\n constructor(ideStore) {\n super();\n this.ideStore = ideStore;\n }\n get dndType() {\n return 'editor.tab-manager.tab';\n }\n closeTab(tab) {\n if (tab instanceof FileEditorState && tab.hasChanged) {\n this.ideStore.applicationStore.alertService.setActionAlertInfo({\n message: 'Unsaved changes will be lost if you continue. Do you still want to proceed?',\n prompt: 'To save changes, abort and compile',\n type: ActionAlertType.CAUTION,\n actions: [\n {\n label: 'Proceed',\n type: ActionAlertActionType.PROCEED_WITH_CAUTION,\n handler: () => super.closeTab(tab),\n },\n {\n label: 'Save changes',\n type: ActionAlertActionType.PROCEED_WITH_CAUTION,\n handler: () => {\n flowResult(this.ideStore.executeGo())\n .then(() => {\n super.closeTab(tab);\n })\n .catch(this.ideStore.applicationStore.alertUnhandledError);\n },\n },\n {\n label: 'Abort',\n type: ActionAlertActionType.PROCEED,\n default: true,\n },\n ],\n });\n }\n else {\n super.closeTab(tab);\n }\n }\n}\n//# sourceMappingURL=PureIDETabManagerState.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport var LEGEND_PURE_IDE_COMMAND_KEY;\n(function (LEGEND_PURE_IDE_COMMAND_KEY) {\n LEGEND_PURE_IDE_COMMAND_KEY[\"SEARCH_FILE\"] = \"editor.search.file\";\n LEGEND_PURE_IDE_COMMAND_KEY[\"SEARCH_TEXT\"] = \"editor.search.text\";\n LEGEND_PURE_IDE_COMMAND_KEY[\"GO_TO_FILE\"] = \"editor.go-to-file\";\n LEGEND_PURE_IDE_COMMAND_KEY[\"TOGGLE_TERMINAL_PANEL\"] = \"editor.toggle-terminal-panel\";\n LEGEND_PURE_IDE_COMMAND_KEY[\"EXECUTE\"] = \"editor.execute\";\n LEGEND_PURE_IDE_COMMAND_KEY[\"FULL_RECOMPILE\"] = \"editor.full-compile\";\n LEGEND_PURE_IDE_COMMAND_KEY[\"FULL_RECOMPILE_WITH_FULL_INIT\"] = \"editor.full-compile.with-init\";\n LEGEND_PURE_IDE_COMMAND_KEY[\"RUN_ALL_TESTS\"] = \"editor.run-all-tests\";\n LEGEND_PURE_IDE_COMMAND_KEY[\"RUN_RELAVANT_TESTS\"] = \"editor.run-relavant-tests\";\n})(LEGEND_PURE_IDE_COMMAND_KEY || (LEGEND_PURE_IDE_COMMAND_KEY = {}));\nexport const LEGEND_PURE_IDE_COMMAND_CONFIG = {\n [LEGEND_PURE_IDE_COMMAND_KEY.SEARCH_FILE]: {\n title: 'Search for file',\n defaultKeyboardShortcut: 'Control+Shift+KeyN',\n additionalKeyboardShortcuts: ['Control+KeyP', 'Meta+KeyP'],\n },\n [LEGEND_PURE_IDE_COMMAND_KEY.SEARCH_TEXT]: {\n title: 'Search text',\n defaultKeyboardShortcut: 'Control+Shift+KeyF',\n additionalKeyboardShortcuts: ['Meta+Shift+KeyF'],\n },\n [LEGEND_PURE_IDE_COMMAND_KEY.GO_TO_FILE]: {\n title: 'Go to file',\n defaultKeyboardShortcut: 'Control+F1',\n },\n [LEGEND_PURE_IDE_COMMAND_KEY.TOGGLE_TERMINAL_PANEL]: {\n title: 'Toggle terminal',\n defaultKeyboardShortcut: 'Control+Backquote',\n },\n [LEGEND_PURE_IDE_COMMAND_KEY.EXECUTE]: {\n title: 'Execute',\n defaultKeyboardShortcut: 'F9',\n },\n [LEGEND_PURE_IDE_COMMAND_KEY.FULL_RECOMPILE]: {\n title: 'Run full re-compilation',\n defaultKeyboardShortcut: 'F11',\n },\n [LEGEND_PURE_IDE_COMMAND_KEY.FULL_RECOMPILE_WITH_FULL_INIT]: {\n title: 'Run full re-compilation',\n defaultKeyboardShortcut: 'Shift+F11',\n },\n [LEGEND_PURE_IDE_COMMAND_KEY.RUN_ALL_TESTS]: {\n title: 'Run all tests',\n defaultKeyboardShortcut: 'F10',\n },\n [LEGEND_PURE_IDE_COMMAND_KEY.RUN_RELAVANT_TESTS]: {\n title: 'Run relavant tests',\n defaultKeyboardShortcut: 'Shift+F10',\n },\n};\nexport var LEGEND_PURE_IDE_DIAGRAM_EDITOR_COMMAND_KEY;\n(function (LEGEND_PURE_IDE_DIAGRAM_EDITOR_COMMAND_KEY) {\n LEGEND_PURE_IDE_DIAGRAM_EDITOR_COMMAND_KEY[\"RECENTER\"] = \"editor.diagram-editor.recenter\";\n LEGEND_PURE_IDE_DIAGRAM_EDITOR_COMMAND_KEY[\"USE_ZOOM_TOOL\"] = \"editor.diagram-editor.use-zoom-tool\";\n LEGEND_PURE_IDE_DIAGRAM_EDITOR_COMMAND_KEY[\"USE_VIEW_TOOL\"] = \"editor.diagram-editor.use-view-tool\";\n LEGEND_PURE_IDE_DIAGRAM_EDITOR_COMMAND_KEY[\"USE_PAN_TOOL\"] = \"editor.diagram-editor.use-pan-tool\";\n})(LEGEND_PURE_IDE_DIAGRAM_EDITOR_COMMAND_KEY || (LEGEND_PURE_IDE_DIAGRAM_EDITOR_COMMAND_KEY = {}));\nexport const LEGEND_PURE_IDE_DIAGRAM_EDITOR_COMMAND_CONFIG = {\n [LEGEND_PURE_IDE_DIAGRAM_EDITOR_COMMAND_KEY.RECENTER]: {\n title: 'Diagram Editor: Recenter',\n defaultKeyboardShortcut: 'KeyR',\n },\n [LEGEND_PURE_IDE_DIAGRAM_EDITOR_COMMAND_KEY.USE_ZOOM_TOOL]: {\n title: 'Diagram Editor: Use zoom tool',\n defaultKeyboardShortcut: 'KeyZ',\n },\n [LEGEND_PURE_IDE_DIAGRAM_EDITOR_COMMAND_KEY.USE_VIEW_TOOL]: {\n title: 'Diagram Editor: Use view tool',\n defaultKeyboardShortcut: 'KeyV',\n },\n [LEGEND_PURE_IDE_DIAGRAM_EDITOR_COMMAND_KEY.USE_PAN_TOOL]: {\n title: 'Diagram Editor: Use pan tool',\n defaultKeyboardShortcut: 'KeyM',\n },\n};\nexport var LEGEND_PURE_IDE_PURE_FILE_EDITOR_COMMAND_KEY;\n(function (LEGEND_PURE_IDE_PURE_FILE_EDITOR_COMMAND_KEY) {\n LEGEND_PURE_IDE_PURE_FILE_EDITOR_COMMAND_KEY[\"TOGGLE_TEXT_WRAP\"] = \"editor.file-editor.toggle-text-wrap\";\n LEGEND_PURE_IDE_PURE_FILE_EDITOR_COMMAND_KEY[\"REVEAL_CONCEPT_IN_TREE\"] = \"editor.file-editor.reveal-concept-in-tree\";\n LEGEND_PURE_IDE_PURE_FILE_EDITOR_COMMAND_KEY[\"GO_TO_DEFINITION\"] = \"editor.file-editor.go-to-definition\";\n LEGEND_PURE_IDE_PURE_FILE_EDITOR_COMMAND_KEY[\"GO_BACK\"] = \"editor.file-editor.go-back\";\n LEGEND_PURE_IDE_PURE_FILE_EDITOR_COMMAND_KEY[\"FIND_USAGES\"] = \"editor.file-editor.find-usage\";\n LEGEND_PURE_IDE_PURE_FILE_EDITOR_COMMAND_KEY[\"RENAME_CONCEPT\"] = \"editor.file-editor.rename-concept\";\n LEGEND_PURE_IDE_PURE_FILE_EDITOR_COMMAND_KEY[\"GO_TO_LINE\"] = \"editor.file-editor.go-to-line\";\n LEGEND_PURE_IDE_PURE_FILE_EDITOR_COMMAND_KEY[\"DELETE_LINE\"] = \"editor.file-editor.delete-line\";\n})(LEGEND_PURE_IDE_PURE_FILE_EDITOR_COMMAND_KEY || (LEGEND_PURE_IDE_PURE_FILE_EDITOR_COMMAND_KEY = {}));\nexport const LEGEND_PURE_IDE_PURE_FILE_EDITOR_COMMAND_CONFIG = {\n [LEGEND_PURE_IDE_PURE_FILE_EDITOR_COMMAND_KEY.TOGGLE_TEXT_WRAP]: {\n title: 'Toggle Text-wrap (File)',\n defaultKeyboardShortcut: 'Alt+KeyZ',\n },\n [LEGEND_PURE_IDE_PURE_FILE_EDITOR_COMMAND_KEY.REVEAL_CONCEPT_IN_TREE]: {\n title: 'Reveal Concept in Tree (File)',\n defaultKeyboardShortcut: 'Control+Shift+KeyB',\n },\n [LEGEND_PURE_IDE_PURE_FILE_EDITOR_COMMAND_KEY.GO_TO_DEFINITION]: {\n title: 'Go to Definition (File)',\n defaultKeyboardShortcut: 'Control+KeyB',\n },\n [LEGEND_PURE_IDE_PURE_FILE_EDITOR_COMMAND_KEY.GO_BACK]: {\n title: 'Go Back (File)',\n defaultKeyboardShortcut: 'Control+Alt+KeyB',\n },\n [LEGEND_PURE_IDE_PURE_FILE_EDITOR_COMMAND_KEY.FIND_USAGES]: {\n title: 'Find Usages (File)',\n defaultKeyboardShortcut: 'Alt+F7',\n },\n [LEGEND_PURE_IDE_PURE_FILE_EDITOR_COMMAND_KEY.RENAME_CONCEPT]: {\n title: 'Rename Concept (File)',\n defaultKeyboardShortcut: 'F2',\n },\n [LEGEND_PURE_IDE_PURE_FILE_EDITOR_COMMAND_KEY.GO_TO_LINE]: {\n title: 'Go to Line (File)',\n defaultKeyboardShortcut: 'Control+KeyG',\n },\n [LEGEND_PURE_IDE_PURE_FILE_EDITOR_COMMAND_KEY.DELETE_LINE]: {\n title: 'Delete Line (File)',\n defaultKeyboardShortcut: 'Control+KeyD',\n },\n};\nexport var LEGEND_PURE_IDE_TERMINAL_COMMAND;\n(function (LEGEND_PURE_IDE_TERMINAL_COMMAND) {\n LEGEND_PURE_IDE_TERMINAL_COMMAND[\"GO\"] = \"go\";\n LEGEND_PURE_IDE_TERMINAL_COMMAND[\"TEST\"] = \"test\";\n LEGEND_PURE_IDE_TERMINAL_COMMAND[\"REMOVE\"] = \"rm\";\n LEGEND_PURE_IDE_TERMINAL_COMMAND[\"MOVE\"] = \"mv\";\n LEGEND_PURE_IDE_TERMINAL_COMMAND[\"NEW_DIRECTORY\"] = \"mkdir\";\n LEGEND_PURE_IDE_TERMINAL_COMMAND[\"NEW_FILE\"] = \"touch\";\n LEGEND_PURE_IDE_TERMINAL_COMMAND[\"OPEN_FILE\"] = \"open\";\n LEGEND_PURE_IDE_TERMINAL_COMMAND[\"OPEN_DIRECTORY\"] = \"cd\";\n LEGEND_PURE_IDE_TERMINAL_COMMAND[\"LIST_DIRECTORY\"] = \"ls\";\n LEGEND_PURE_IDE_TERMINAL_COMMAND[\"WELCOME\"] = \"welcome\";\n LEGEND_PURE_IDE_TERMINAL_COMMAND[\"ECHO\"] = \"echo\";\n LEGEND_PURE_IDE_TERMINAL_COMMAND[\"CLEAR\"] = \"clear\";\n LEGEND_PURE_IDE_TERMINAL_COMMAND[\"ANSI\"] = \"ansi\";\n LEGEND_PURE_IDE_TERMINAL_COMMAND[\"HELP\"] = \"help\";\n LEGEND_PURE_IDE_TERMINAL_COMMAND[\"DEBUG\"] = \"debug\";\n})(LEGEND_PURE_IDE_TERMINAL_COMMAND || (LEGEND_PURE_IDE_TERMINAL_COMMAND = {}));\n//# sourceMappingURL=LegendPureIDECommand.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { ActionAlertActionType, ActionAlertType, } from '@finos/legend-application';\nimport { clearMarkers, setErrorMarkers, CODE_EDITOR_LANGUAGE, } from '@finos/legend-code-editor';\nimport { DIRECTORY_PATH_DELIMITER } from '@finos/legend-graph';\nimport { at, assertErrorThrown } from '@finos/legend-shared';\nimport { action, computed, flow, flowResult, makeObservable, observable, } from 'mobx';\nimport { editor as monacoEditorAPI, Uri, } from 'monaco-editor';\nimport { ConceptType } from '../server/models/ConceptTree.js';\nimport { FileCoordinate, trimPathLeadingSlash, } from '../server/models/File.js';\nimport { FIND_USAGE_FUNCTION_PATH, } from '../server/models/Usage.js';\nimport { PureIDETabState } from './PureIDETabManagerState.js';\nimport { LEGEND_PURE_IDE_PURE_FILE_EDITOR_COMMAND_KEY } from '../__lib__/LegendPureIDECommand.js';\nconst getFileEditorLanguage = (filePath) => {\n const extension = filePath.split('.').at(-1);\n switch (extension) {\n case 'pure':\n return CODE_EDITOR_LANGUAGE.PURE;\n case 'java':\n return CODE_EDITOR_LANGUAGE.JAVA;\n case 'md':\n return CODE_EDITOR_LANGUAGE.MARKDOWN;\n case 'sql':\n return CODE_EDITOR_LANGUAGE.SQL;\n case 'json':\n return CODE_EDITOR_LANGUAGE.JSON;\n case 'xml':\n return CODE_EDITOR_LANGUAGE.XML;\n case 'yml':\n case 'yaml':\n return CODE_EDITOR_LANGUAGE.YAML;\n case 'graphql':\n return CODE_EDITOR_LANGUAGE.GRAPHQL;\n default:\n return CODE_EDITOR_LANGUAGE.TEXT;\n }\n};\nclass FileTextEditorState {\n model;\n editor;\n _dummyCursorObservable = {};\n language;\n viewState;\n forcedCursorPosition;\n wrapText = false;\n constructor(fileEditorState) {\n makeObservable(this, {\n viewState: observable.ref,\n editor: observable.ref,\n _dummyCursorObservable: observable.ref,\n forcedCursorPosition: observable.ref,\n wrapText: observable,\n cursorObserver: computed,\n notifyCursorObserver: action,\n setViewState: action,\n setEditor: action,\n setForcedCursorPosition: action,\n setWrapText: action,\n });\n this.language = getFileEditorLanguage(fileEditorState.filePath);\n this.model = monacoEditorAPI.createModel('', this.language, Uri.file(`/${fileEditorState.uuid}.pure`));\n this.model.setValue(fileEditorState.file.content);\n }\n // trigger for the manual observer of editor cursor\n notifyCursorObserver() {\n this._dummyCursorObservable = {};\n }\n // subscriber for the manual observer of editor cursor\n get cursorObserver() {\n // eslint-disable-next-line @typescript-eslint/no-unused-expressions\n this._dummyCursorObservable; // manually trigger cursor observer\n return this.editor\n ? {\n position: this.editor.getPosition() ?? undefined,\n selection: this.editor.getSelection() ?? undefined,\n }\n : undefined;\n }\n setViewState(val) {\n this.viewState = val;\n }\n setEditor(val) {\n this.editor = val;\n }\n setForcedCursorPosition(val) {\n this.forcedCursorPosition = val;\n }\n setWrapText(val) {\n const oldVal = this.wrapText;\n this.wrapText = val;\n if (oldVal !== val && this.editor) {\n this.editor.updateOptions({\n wordWrap: val ? 'on' : 'off',\n });\n this.editor.focus();\n }\n }\n}\nexport class FileEditorRenameConceptState {\n fileEditorState;\n concept;\n coordinate;\n constructor(fileEditorState, concept, coordiate) {\n this.fileEditorState = fileEditorState;\n this.concept = concept;\n this.coordinate = coordiate;\n }\n}\nexport class FileEditorState extends PureIDETabState {\n filePath;\n textEditorState;\n _currentHashCode;\n file;\n renameConceptState;\n showGoToLinePrompt = false;\n constructor(ideStore, file, filePath) {\n super(ideStore);\n makeObservable(this, {\n _currentHashCode: observable,\n file: observable,\n renameConceptState: observable,\n showGoToLinePrompt: observable,\n hasChanged: computed,\n resetChangeDetection: action,\n setFile: action,\n setShowGoToLinePrompt: action,\n setConceptToRenameState: flow,\n runTest: flow,\n });\n this.file = file;\n this._currentHashCode = file.hashCode;\n this.filePath = filePath;\n this.textEditorState = new FileTextEditorState(this);\n }\n get label() {\n return trimPathLeadingSlash(this.filePath);\n }\n get description() {\n return `File: ${trimPathLeadingSlash(this.filePath)}${this.file.RO ? ' (readonly)' : ''}`;\n }\n get fileName() {\n return at(this.filePath.split(DIRECTORY_PATH_DELIMITER), -1);\n }\n match(tab) {\n return tab instanceof FileEditorState && this.filePath === tab.filePath;\n }\n onClose() {\n // dispose text model to avoid memory leak\n this.textEditorState.model.dispose();\n }\n get hasChanged() {\n return this._currentHashCode !== this.file.hashCode;\n }\n resetChangeDetection() {\n this._currentHashCode = this.file.hashCode;\n }\n setFile(val) {\n this.file = val;\n this.textEditorState.model.setValue(val.content);\n this.resetChangeDetection();\n }\n setShowGoToLinePrompt(val) {\n this.showGoToLinePrompt = val;\n }\n *setConceptToRenameState(coordinate) {\n if (!coordinate) {\n this.renameConceptState = undefined;\n return;\n }\n if (this.hasChanged) {\n this.ideStore.applicationStore.notificationService.notifyWarning(`Can't rename concept: source is not compiled`);\n return;\n }\n const concept = (yield this.ideStore.getConceptInfo(coordinate));\n this.renameConceptState = concept\n ? new FileEditorRenameConceptState(this, concept, coordinate)\n : undefined;\n }\n *runTest(coordinate) {\n if (!coordinate) {\n return;\n }\n if (this.hasChanged) {\n this.ideStore.applicationStore.notificationService.notifyWarning(`Can't run test: source is not compiled`);\n return;\n }\n const concept = (yield this.ideStore.getConceptInfo(coordinate));\n if (concept?.pureType === ConceptType.FUNCTION) {\n if (concept.pct) {\n this.ideStore.setPCTRunPath(concept.path);\n }\n else if (concept.test) {\n flowResult(this.ideStore.executeTests(concept.path, false)).catch(this.ideStore.applicationStore.alertUnhandledError);\n }\n else {\n this.ideStore.applicationStore.notificationService.notifyWarning(`Can't run test: function not marked as test`);\n }\n }\n else {\n this.ideStore.applicationStore.notificationService.notifyWarning(`Can't run test: not a function`);\n }\n }\n showError(coordinate) {\n setErrorMarkers(this.textEditorState.model, [\n {\n message: coordinate.error.message,\n startLineNumber: coordinate.line,\n startColumn: coordinate.column,\n endLineNumber: coordinate.line,\n endColumn: coordinate.column,\n },\n ], this.uuid);\n }\n clearError() {\n clearMarkers(this.uuid);\n }\n registerCommands() {\n if (this.textEditorState.language === CODE_EDITOR_LANGUAGE.PURE) {\n this.ideStore.applicationStore.commandService.registerCommand({\n key: LEGEND_PURE_IDE_PURE_FILE_EDITOR_COMMAND_KEY.GO_TO_DEFINITION,\n trigger: () => this.ideStore.tabManagerState.currentTab === this &&\n Boolean(this.textEditorState.editor?.hasTextFocus()),\n action: () => {\n const currentPosition = this.textEditorState.editor?.getPosition();\n if (currentPosition) {\n flowResult(this.ideStore.executeNavigation(new FileCoordinate(this.filePath, currentPosition.lineNumber, currentPosition.column))).catch(this.ideStore.applicationStore.alertUnhandledError);\n }\n },\n });\n this.ideStore.applicationStore.commandService.registerCommand({\n key: LEGEND_PURE_IDE_PURE_FILE_EDITOR_COMMAND_KEY.GO_BACK,\n action: () => {\n flowResult(this.ideStore.navigateBack()).catch(this.ideStore.applicationStore.alertUnhandledError);\n },\n });\n this.ideStore.applicationStore.commandService.registerCommand({\n key: LEGEND_PURE_IDE_PURE_FILE_EDITOR_COMMAND_KEY.REVEAL_CONCEPT_IN_TREE,\n trigger: () => this.ideStore.tabManagerState.currentTab === this &&\n Boolean(this.textEditorState.editor?.hasTextFocus()),\n action: () => {\n const currentPosition = this.textEditorState.editor?.getPosition();\n if (currentPosition) {\n this.ideStore\n .revealConceptInTree(new FileCoordinate(this.filePath, currentPosition.lineNumber, currentPosition.column))\n .catch(this.ideStore.applicationStore.alertUnhandledError);\n }\n },\n });\n this.ideStore.applicationStore.commandService.registerCommand({\n key: LEGEND_PURE_IDE_PURE_FILE_EDITOR_COMMAND_KEY.FIND_USAGES,\n trigger: () => this.ideStore.tabManagerState.currentTab === this &&\n Boolean(this.textEditorState.editor?.hasTextFocus()),\n action: () => {\n const currentPosition = this.textEditorState.editor?.getPosition();\n if (currentPosition) {\n const coordinate = new FileCoordinate(this.filePath, currentPosition.lineNumber, currentPosition.column);\n this.findConceptUsages(coordinate);\n }\n },\n });\n this.ideStore.applicationStore.commandService.registerCommand({\n key: LEGEND_PURE_IDE_PURE_FILE_EDITOR_COMMAND_KEY.RENAME_CONCEPT,\n trigger: () => this.ideStore.tabManagerState.currentTab === this &&\n Boolean(this.textEditorState.editor?.hasTextFocus()),\n action: () => {\n const currentPosition = this.textEditorState.editor?.getPosition();\n if (currentPosition) {\n const currentWord = this.textEditorState.model.getWordAtPosition(currentPosition);\n if (!currentWord) {\n return;\n }\n const coordinate = new FileCoordinate(this.filePath, currentPosition.lineNumber, currentPosition.column);\n flowResult(this.setConceptToRenameState(coordinate)).catch(this.ideStore.applicationStore.alertUnhandledError);\n }\n },\n });\n }\n this.ideStore.applicationStore.commandService.registerCommand({\n key: LEGEND_PURE_IDE_PURE_FILE_EDITOR_COMMAND_KEY.DELETE_LINE,\n trigger: () => this.ideStore.tabManagerState.currentTab === this &&\n Boolean(this.textEditorState.editor?.hasTextFocus()),\n action: () => {\n const currentPosition = this.textEditorState.editor?.getPosition();\n if (currentPosition) {\n this.textEditorState.model.pushEditOperations([], [\n {\n range: {\n startLineNumber: currentPosition.lineNumber,\n startColumn: 1,\n endLineNumber: currentPosition.lineNumber + 1,\n endColumn: 1,\n },\n text: '',\n forceMoveMarkers: true,\n },\n ], () => null);\n }\n },\n });\n this.ideStore.applicationStore.commandService.registerCommand({\n key: LEGEND_PURE_IDE_PURE_FILE_EDITOR_COMMAND_KEY.GO_TO_LINE,\n trigger: () => this.ideStore.tabManagerState.currentTab === this,\n action: () => {\n this.setShowGoToLinePrompt(true);\n },\n });\n this.ideStore.applicationStore.commandService.registerCommand({\n key: LEGEND_PURE_IDE_PURE_FILE_EDITOR_COMMAND_KEY.TOGGLE_TEXT_WRAP,\n trigger: () => this.ideStore.tabManagerState.currentTab === this,\n action: () => {\n this.textEditorState.setWrapText(!this.textEditorState.wrapText);\n },\n });\n }\n findConceptUsages(coordinate) {\n const proceed = () => {\n flowResult(this.ideStore.findUsagesFromCoordinate(coordinate)).catch(this.ideStore.applicationStore.alertUnhandledError);\n };\n if (this.hasChanged) {\n this.ideStore.applicationStore.alertService.setActionAlertInfo({\n message: 'Source is not compiled, finding concept usages might be inaccurate. Do you want compile to proceed?',\n type: ActionAlertType.CAUTION,\n actions: [\n {\n label: 'Compile and Proceed',\n type: ActionAlertActionType.PROCEED_WITH_CAUTION,\n handler: () => {\n flowResult(this.ideStore.executeGo())\n .then(proceed)\n .catch(this.ideStore.applicationStore.alertUnhandledError);\n },\n },\n {\n label: 'Abort',\n type: ActionAlertActionType.PROCEED,\n default: true,\n },\n ],\n });\n }\n else {\n proceed();\n }\n }\n async renameConcept(newName) {\n if (!this.renameConceptState) {\n return;\n }\n const concept = this.renameConceptState.concept;\n try {\n this.ideStore.applicationStore.alertService.setBlockingAlert({\n message: 'Finding concept usages...',\n showLoading: true,\n });\n const usages = await this.ideStore.findConceptUsages(concept.pureType === ConceptType.ENUM_VALUE\n ? FIND_USAGE_FUNCTION_PATH.ENUM\n : concept.pureType === ConceptType.PROPERTY ||\n concept.pureType === ConceptType.QUALIFIED_PROPERTY\n ? FIND_USAGE_FUNCTION_PATH.PROPERTY\n : FIND_USAGE_FUNCTION_PATH.ELEMENT, (concept.owner ? [`'${concept.owner}'`] : []).concat(`'${concept.path}'`));\n await flowResult(this.ideStore.renameConcept(concept.pureName, newName, concept.pureType, usages));\n this.textEditorState.setForcedCursorPosition({\n lineNumber: this.renameConceptState.coordinate.line,\n column: this.renameConceptState.coordinate.column,\n });\n }\n catch (error) {\n assertErrorThrown(error);\n this.ideStore.applicationStore.notificationService.notifyError(error);\n }\n finally {\n this.ideStore.applicationStore.alertService.setBlockingAlert(undefined);\n }\n }\n deregisterCommands() {\n if (this.textEditorState.language === CODE_EDITOR_LANGUAGE.PURE) {\n [\n LEGEND_PURE_IDE_PURE_FILE_EDITOR_COMMAND_KEY.GO_TO_DEFINITION,\n LEGEND_PURE_IDE_PURE_FILE_EDITOR_COMMAND_KEY.GO_BACK,\n LEGEND_PURE_IDE_PURE_FILE_EDITOR_COMMAND_KEY.REVEAL_CONCEPT_IN_TREE,\n LEGEND_PURE_IDE_PURE_FILE_EDITOR_COMMAND_KEY.FIND_USAGES,\n LEGEND_PURE_IDE_PURE_FILE_EDITOR_COMMAND_KEY.RENAME_CONCEPT,\n ].forEach((key) => this.ideStore.applicationStore.commandService.deregisterCommand(key));\n }\n [\n LEGEND_PURE_IDE_PURE_FILE_EDITOR_COMMAND_KEY.GO_TO_LINE,\n LEGEND_PURE_IDE_PURE_FILE_EDITOR_COMMAND_KEY.DELETE_LINE,\n LEGEND_PURE_IDE_PURE_FILE_EDITOR_COMMAND_KEY.TOGGLE_TEXT_WRAP,\n ].forEach((key) => this.ideStore.applicationStore.commandService.deregisterCommand(key));\n }\n}\n//# sourceMappingURL=FileEditorState.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { ActionState, assertErrorThrown, guaranteeNonNullable, } from '@finos/legend-shared';\nimport { action, observable, makeObservable, flow, flowResult } from 'mobx';\nexport class TreeState {\n ideStore;\n treeData;\n selectedNode;\n loadInitialDataState = ActionState.create();\n refreshDataState = ActionState.create();\n constructor(ideStore) {\n makeObservable(this, {\n treeData: observable.ref,\n loadInitialDataState: observable,\n refreshDataState: observable,\n initialize: flow,\n expandNode: flow,\n openNode: flow,\n refreshTreeData: flow,\n setTreeData: action,\n setSelectedNode: action,\n });\n this.ideStore = ideStore;\n }\n getTreeData() {\n return guaranteeNonNullable(this.treeData, 'Tree data has not been initialized');\n }\n *initialize() {\n if (this.loadInitialDataState.isInProgress) {\n this.ideStore.applicationStore.notificationService.notifyWarning('Tree state initialization is in progress');\n return;\n }\n this.loadInitialDataState.inProgress();\n try {\n this.treeData = this.buildTreeData((yield this.getRootNodes()));\n this.loadInitialDataState.pass();\n }\n catch (error) {\n assertErrorThrown(error);\n this.ideStore.applicationStore.notificationService.notifyError(error);\n this.loadInitialDataState.fail();\n }\n }\n setSelectedNode(node) {\n if (node !== this.selectedNode) {\n if (this.selectedNode) {\n this.selectedNode.isSelected = false;\n }\n if (node) {\n node.isSelected = true;\n }\n this.selectedNode = node;\n this.refreshTree();\n }\n }\n setTreeData(data) {\n this.treeData = data;\n }\n refreshTree() {\n this.setTreeData({ ...guaranteeNonNullable(this.treeData) });\n }\n *expandNode(node) {\n if (node.isLoading) {\n return;\n }\n if (this.getTreeData().nodes.has(node.id) && node.childrenIds) {\n node.isLoading = false;\n node.isOpen = true;\n this.refreshTree();\n }\n else {\n node.isLoading = true;\n try {\n const childNodes = (yield this.getChildNodes(node));\n this.processChildNodes(node, childNodes);\n node.isOpen = true;\n this.refreshTree();\n }\n catch (error) {\n assertErrorThrown(error);\n this.ideStore.applicationStore.notificationService.notifyError(error);\n }\n finally {\n node.isLoading = false;\n }\n }\n }\n *refreshTreeData() {\n if (!this.treeData) {\n return;\n }\n const openingNodeIds = new Set(Array.from(this.getTreeData().nodes.values())\n .filter((node) => node.isOpen)\n .map((node) => node.id));\n const selectedNodeId = this.selectedNode?.id;\n this.refreshDataState.inProgress();\n try {\n this.treeData = this.buildTreeData((yield this.getRootNodes()));\n }\n catch (error) {\n assertErrorThrown(error);\n this.ideStore.applicationStore.notificationService.notifyError(error);\n this.refreshDataState.fail();\n return;\n }\n const nodesToOpen = this.getTreeData()\n .rootIds.map((id) => guaranteeNonNullable(this.getTreeData().nodes.get(id)))\n .filter((node) => openingNodeIds.has(node.id));\n yield this.refreshOpenNodes(nodesToOpen, openingNodeIds);\n if (selectedNodeId && this.getTreeData().nodes.has(selectedNodeId)) {\n this.setSelectedNode(guaranteeNonNullable(this.getTreeData().nodes.get(selectedNodeId)));\n }\n }\n async refreshOpenNodes(nodesToOpen, openingNodeIds) {\n await Promise.all(nodesToOpen.map((node) => {\n openingNodeIds.delete(node.id);\n return flowResult(this.expandNode(node)).catch(() => undefined);\n }));\n nodesToOpen = nodesToOpen\n .flatMap((node) => node.childrenIds ?? [])\n .map((childId) => guaranteeNonNullable(this.getTreeData().nodes.get(childId)))\n .filter((node) => openingNodeIds.has(node.id));\n if (nodesToOpen.length) {\n return this.refreshOpenNodes(nodesToOpen, openingNodeIds);\n }\n return Promise.resolve();\n }\n}\n//# sourceMappingURL=TreeState.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { guaranteeType } from '@finos/legend-shared';\nimport { custom, SKIP, deserialize, createModelSchema, primitive, } from 'serializr';\nclass DirectoryAttribute {\n id;\n path;\n RO;\n}\nclass FileDirectoryAttribute extends DirectoryAttribute {\n file;\n statusType; // used for change detection\n}\ncreateModelSchema(FileDirectoryAttribute, {\n id: primitive(),\n path: primitive(),\n file: primitive(),\n statusType: primitive(),\n RO: primitive(),\n});\nclass FolderDirectoryAttribute extends DirectoryAttribute {\n repo;\n}\ncreateModelSchema(FolderDirectoryAttribute, {\n id: primitive(),\n path: primitive(),\n repo: primitive(),\n RO: primitive(),\n});\nexport class DirectoryNode {\n li_attr;\n text;\n icon;\n children;\n state;\n get isFolderNode() {\n return this.li_attr instanceof FolderDirectoryAttribute;\n }\n get isFileNode() {\n return this.li_attr instanceof FileDirectoryAttribute;\n }\n get isRepoNode() {\n return (this.li_attr instanceof FolderDirectoryAttribute &&\n Boolean(this.li_attr.repo));\n }\n getNodeAttribute(clazz) {\n return guaranteeType(this.li_attr, clazz, `Expected directory node attribute to be of type '${clazz.name}'`);\n }\n}\ncreateModelSchema(DirectoryNode, {\n li_attr: custom(() => SKIP, (value) => {\n if (value.file) {\n return deserialize(FileDirectoryAttribute, value);\n }\n else {\n return deserialize(FolderDirectoryAttribute, value);\n }\n }),\n text: primitive(),\n icon: primitive(),\n children: primitive(),\n state: primitive(),\n});\n//# sourceMappingURL=DirectoryTree.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { deserialize } from 'serializr';\nimport { TreeState } from './TreeState.js';\nimport { DirectoryNode, } from '../server/models/DirectoryTree.js';\nimport { action, flow, flowResult, makeObservable, observable } from 'mobx';\nimport { ACTIVITY_MODE } from './PureIDEConfig.js';\nimport { assertTrue, guaranteeNonNullable, } from '@finos/legend-shared';\nimport { DIRECTORY_PATH_DELIMITER } from '@finos/legend-graph';\nconst getParentPath = (path) => {\n const trimmedPath = path.trim();\n const idx = trimmedPath.lastIndexOf(DIRECTORY_PATH_DELIMITER);\n if (idx <= 0) {\n return undefined;\n }\n return trimmedPath.substring(0, idx);\n};\nconst pathToId = (path) => `file_${path}`;\nexport class DirectoryTreeState extends TreeState {\n nodeForCreateNewFile;\n nodeForCreateNewDirectory;\n nodeForRenameFile;\n constructor(ideStore) {\n super(ideStore);\n makeObservable(this, {\n nodeForCreateNewFile: observable,\n nodeForCreateNewDirectory: observable,\n nodeForRenameFile: observable,\n setNodeForCreateNewFile: action,\n setNodeForCreateNewDirectory: action,\n setNodeForRenameFile: action,\n revealPath: flow,\n });\n }\n setNodeForCreateNewFile = (value) => {\n assertTrue(!value || value.data.isFolderNode, 'Node selected for creating a new file from must be a directory');\n this.nodeForCreateNewFile = value;\n };\n setNodeForCreateNewDirectory = (value) => {\n assertTrue(!value || value.data.isFolderNode, 'Node selected for creating a new directory from must be a directory');\n this.nodeForCreateNewDirectory = value;\n };\n setNodeForRenameFile = (value) => {\n assertTrue(!value || value.data.isFileNode, 'Node selected for renaming must be a file');\n this.nodeForRenameFile = value;\n };\n async getRootNodes() {\n return (await this.ideStore.client.getDirectoryChildren()).map((node) => deserialize(DirectoryNode, node));\n }\n buildTreeData(rootNodes) {\n const rootIds = [];\n const nodes = new Map();\n rootNodes.forEach((node) => {\n const id = node.li_attr.id;\n rootIds.push(id);\n nodes.set(id, {\n data: node,\n id,\n label: node.text,\n isLoading: false,\n });\n });\n return { rootIds, nodes };\n }\n async getChildNodes(node) {\n return (await this.ideStore.client.getDirectoryChildren(node.data.li_attr.path)).map((child) => deserialize(DirectoryNode, child));\n }\n processChildNodes(node, childNodes) {\n const treeData = this.getTreeData();\n const childrenIds = [];\n childNodes.forEach((childNode) => {\n const id = childNode.li_attr.id;\n childrenIds.push(id);\n treeData.nodes.set(id, {\n data: childNode,\n id,\n label: childNode.text,\n isLoading: false,\n });\n });\n node.childrenIds = childrenIds;\n }\n *openNode(node) {\n if (node.data.isFileNode) {\n yield flowResult(this.ideStore.loadFile(node.data.li_attr.path));\n }\n }\n *revealPath(path, options) {\n if (options?.forceOpenExplorerPanel) {\n this.ideStore.setActiveActivity(ACTIVITY_MODE.FILE_EXPLORER, {\n keepShowingIfMatchedCurrent: true,\n });\n }\n const paths = [];\n let currentPath = path;\n while (currentPath) {\n paths.unshift(currentPath);\n currentPath = getParentPath(currentPath);\n }\n for (const _path of paths) {\n const node = guaranteeNonNullable(this.getTreeData().nodes.get(pathToId(_path)), `Can't find node with path '${_path}'`);\n if (node.data.isFolderNode) {\n yield flowResult(this.expandNode(node));\n }\n else {\n if (options?.directoryOnly) {\n throw new Error(`Can't reveal non-directory path`);\n }\n else {\n yield flowResult(this.ideStore.loadFile(_path, options?.coordinate));\n }\n }\n }\n const currentNode = guaranteeNonNullable(this.getTreeData().nodes.get(pathToId(path)), `Can't find node with path '${path}'`);\n this.setSelectedNode(currentNode);\n document.getElementById(currentNode.id)?.scrollIntoView({\n behavior: 'instant',\n block: 'center',\n });\n }\n}\n//# sourceMappingURL=DirectoryTreeState.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { CORE_PURE_PATH, ELEMENT_PATH_DELIMITER, SOURCE_INFORMATION_PROPERTY_KEY_SUFFIX, } from './MetaModelConst.js';\nimport { findLast, guaranteeNonNullable, isString, recursiveOmit, } from '@finos/legend-shared';\nexport const extractElementNameFromPath = (fullPath) => guaranteeNonNullable(findLast(fullPath.split(ELEMENT_PATH_DELIMITER)));\nexport const extractPackagePathFromPath = (fullPath) => {\n const idx = fullPath.lastIndexOf(ELEMENT_PATH_DELIMITER);\n return idx === -1 ? undefined : fullPath.substring(0, idx);\n};\nexport const isValidIdentifier = (input, allowDollarSymbol) => allowDollarSymbol\n ? Boolean(input.match(/^[a-z][\\w\\d$]*$/))\n : Boolean(input.match(/^[a-z][\\w\\d]*$/));\nexport const matchFunctionName = (functionName, functionFullPaths) => Array.isArray(functionFullPaths)\n ? functionFullPaths.some((functionFullPath) => matchFunctionName(functionName, functionFullPath))\n : functionName === functionFullPaths ||\n extractElementNameFromPath(functionFullPaths) === functionName;\n/**\n * This method concatenate 2 fully-qualified elementh paths to form a single one\n * and then extracts the name and package part from it.\n */\nexport const resolvePackagePathAndElementName = (path, defaultPath) => {\n const index = path.lastIndexOf(ELEMENT_PATH_DELIMITER);\n if (index === -1) {\n return [defaultPath ?? '', path];\n }\n return [\n path.substring(0, index),\n path.substring(index + ELEMENT_PATH_DELIMITER.length, path.length),\n ];\n};\nexport const buildPath = (packagePath, name) => `${guaranteeNonNullable(packagePath, 'Package path is required')}${ELEMENT_PATH_DELIMITER}${guaranteeNonNullable(name, 'Name is required')}`;\nexport const createPath = (packagePath, name) => `${packagePath ? `${packagePath}${ELEMENT_PATH_DELIMITER}` : ''}${name}`;\n// TODO: we might need to support quoted identifier in the future\nexport const isValidPathIdentifier = (val) => Boolean(val.match(/^\\w[\\w$_-]*$/));\nexport const isValidFullPath = (fullPath) => Boolean(fullPath.match(/^(?:\\w[\\w$_-]*)(?:::\\w[\\w$_-]*)+$/));\nexport const isValidPath = (path) => Boolean(path.match(/^(?:\\w[\\w$_-]*)(?:::\\w[\\w$_-]*)*$/));\nexport const fromElementPathToMappingElementId = (className) => className.split(ELEMENT_PATH_DELIMITER).join('_');\n/**\n * Prune source information from object such as raw lambda, raw value specification, etc.\n *\n * NOTE: currently, there is no exhaustive way to do this. Majority of the cases, the source information field\n * is suffixed with `sourceInformation` (e.g. `profileSourceInformation`, `propertyTypeSourceInformation`),\n * however, we have sometimes deviated from this pattern in our protocol model, so we have fields like `classSourceInformation`,\n * etc. So this is really an optimistic, non-exhaustive prune.\n *\n * To do this exhaustively, we need to tweak this method to also check for the structure of the (sub)object to make sure\n * it is structually equivalent to the shape of source information to prune it. However, this is computationally expensive.\n *\n * NOTE: That aside, We should cleanup these in the backend and use pointer instead so source information is coupled\n * with the value instead of having custom-name source information fields like these, polluting the protocol models.\n */\nexport const pruneSourceInformation = (object) => recursiveOmit(object, (obj, propKey) => isString(propKey) &&\n propKey\n .toLowerCase()\n .endsWith(SOURCE_INFORMATION_PROPERTY_KEY_SUFFIX.toLowerCase()));\nexport const TYPE_ARGUMENTS_TYPES = [CORE_PURE_PATH.RELATION];\nexport const requireTypeArugments = (type) => {\n return TYPE_ARGUMENTS_TYPES.includes(type.path);\n};\n//# sourceMappingURL=MetaModelUtils.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { deserialize } from 'serializr';\nimport { TreeState } from './TreeState.js';\nimport { ElementConceptAttribute, PropertyConceptAttribute, ConceptNode, ConceptType, PackageConceptAttribute, } from '../server/models/ConceptTree.js';\nimport { action, flow, flowResult, makeObservable, observable } from 'mobx';\nimport { FileCoordinate } from '../server/models/File.js';\nimport { ActionState, assertErrorThrown, assertTrue, assertType, guaranteeNonNullable, } from '@finos/legend-shared';\nimport { FIND_USAGE_FUNCTION_PATH, PackageableElementUsage, } from '../server/models/Usage.js';\nimport { ELEMENT_PATH_DELIMITER, extractPackagePathFromPath, } from '@finos/legend-graph';\nimport { ACTIVITY_MODE } from './PureIDEConfig.js';\nconst getParentPath = (path) => {\n const trimmedPath = path.trim();\n const idx = trimmedPath.lastIndexOf(ELEMENT_PATH_DELIMITER);\n if (idx <= 0) {\n return undefined;\n }\n return trimmedPath.substring(0, idx);\n};\nexport class ConceptTreeState extends TreeState {\n loadConceptActivity = ActionState.create();\n statusText;\n nodeForRenameConcept;\n nodeForMoveElement;\n constructor(ideStore) {\n super(ideStore);\n makeObservable(this, {\n statusText: observable,\n nodeForRenameConcept: observable,\n nodeForMoveElement: observable,\n setStatusText: action,\n setNodeForRenameConcept: action,\n setNodeForMoveElement: action,\n pullConceptsActivity: action,\n pollConceptsActivity: flow,\n revealConcept: flow,\n });\n }\n setStatusText(value) {\n this.statusText = value;\n }\n setNodeForRenameConcept(value) {\n this.nodeForRenameConcept = value;\n }\n setNodeForMoveElement(value) {\n this.nodeForMoveElement = value;\n }\n async getRootNodes() {\n await flowResult(this.pollConceptsActivity());\n return (await this.ideStore.client.getConceptChildren()).map((node) => deserialize(ConceptNode, node));\n }\n buildTreeData(rootNodes) {\n const rootIds = [];\n const nodes = new Map();\n rootNodes.forEach((node) => {\n const id = node.li_attr.id;\n rootIds.push(id);\n nodes.set(id, {\n data: node,\n id,\n label: node.text,\n isLoading: false,\n });\n });\n return { rootIds, nodes };\n }\n async getChildNodes(node) {\n return (await this.ideStore.client.getConceptChildren(node.data.li_attr.pureId)).map((child) => deserialize(ConceptNode, child));\n }\n processChildNodes(node, childNodes) {\n const treeData = this.getTreeData();\n const childrenIds = [];\n childNodes.forEach((childNode) => {\n const id = childNode.li_attr.id;\n childrenIds.push(id);\n treeData.nodes.set(id, {\n data: childNode,\n id,\n label: childNode.text,\n isLoading: false,\n parent: node,\n });\n });\n node.childrenIds = childrenIds;\n }\n *openNode(node) {\n if (node.data.li_attr instanceof PropertyConceptAttribute ||\n node.data.li_attr instanceof ElementConceptAttribute) {\n if (node.data.li_attr.pureType === 'Diagram') {\n yield flowResult(this.ideStore.loadDiagram(node.data.li_attr.file, node.data.li_attr.pureId, Number.parseInt(node.data.li_attr.line, 10), Number.parseInt(node.data.li_attr.column, 10)));\n }\n else {\n yield flowResult(this.ideStore.loadFile(node.data.li_attr.file, new FileCoordinate(node.data.li_attr.file, Number.parseInt(node.data.li_attr.line, 10), Number.parseInt(node.data.li_attr.column, 10))));\n }\n }\n }\n *pollConceptsActivity() {\n if (!this.loadConceptActivity.isInInitialState) {\n return;\n }\n this.loadConceptActivity.inProgress();\n this.setStatusText('Loading concepts activity...');\n try {\n yield this.pullConceptsActivity();\n }\n finally {\n this.setStatusText(undefined);\n this.loadConceptActivity.reset();\n }\n }\n async pullConceptsActivity() {\n const result = (await this.ideStore.client.getConceptActivity());\n if (result.text) {\n this.setStatusText(`Preparing - ${result.text}`);\n }\n if (result.initializing) {\n return new Promise((resolve, reject) => setTimeout(() => {\n try {\n resolve(this.pullConceptsActivity());\n }\n catch (error) {\n reject(error);\n }\n }, 1000));\n }\n return Promise.resolve();\n }\n *revealConcept(path, options) {\n if (options?.forceOpenExplorerPanel) {\n this.ideStore.setActiveActivity(ACTIVITY_MODE.CONCEPT_EXPLORER, {\n keepShowingIfMatchedCurrent: true,\n });\n }\n const paths = [];\n let currentPath = path;\n while (currentPath) {\n paths.unshift(currentPath);\n currentPath = getParentPath(currentPath);\n }\n for (const _path of paths) {\n const node = guaranteeNonNullable(this.getTreeData().nodes.get(_path), `Can't find node with path '${_path}'`);\n if (node.data.li_attr instanceof PackageConceptAttribute) {\n yield flowResult(this.expandNode(node));\n }\n else {\n if (options?.packageOnly) {\n throw new Error(`Can't reveal non-package path`);\n }\n // TODO: this is not needed so we haven't implemented this yet\n }\n }\n this.setSelectedNode(guaranteeNonNullable(this.getTreeData().nodes.get(path), `Can't find node with path '${path}'`));\n }\n async movePackageableElements(elementNodeAttributes, destinationPackage) {\n let elementsUsage = [];\n try {\n elementsUsage = (await this.ideStore.client.getPackageableElementsUsage(elementNodeAttributes.map((attr) => attr.pureId))).map((usage) => deserialize(PackageableElementUsage, usage));\n }\n catch {\n this.ideStore.applicationStore.notificationService.notifyError(`Can't find usage for child packageable elements`);\n return;\n }\n finally {\n this.ideStore.applicationStore.alertService.setBlockingAlert(undefined);\n }\n const inputs = [];\n assertTrue(elementsUsage.length === elementNodeAttributes.length, `Can't find matching usages for packageable elements`);\n for (let i = 0; i < elementsUsage.length; ++i) {\n const elementInfo = guaranteeNonNullable(elementNodeAttributes[i]);\n inputs.push({\n pureName: elementInfo.pureName,\n pureType: elementInfo.pureType,\n sourcePackage: guaranteeNonNullable(extractPackagePathFromPath(elementInfo.pureId)),\n destinationPackage,\n usages: guaranteeNonNullable(elementsUsage[i]).second,\n });\n }\n await flowResult(this.ideStore.movePackageableElements(inputs));\n }\n async renameConcept(node, newName) {\n const attr = node.data.li_attr;\n const oldName = attr.pureName ?? attr.pureId;\n let usages = [];\n try {\n this.ideStore.applicationStore.alertService.setBlockingAlert({\n message: 'Finding concept usages...',\n showLoading: true,\n });\n switch (attr.pureType) {\n case ConceptType.PROPERTY:\n case ConceptType.QUALIFIED_PROPERTY: {\n assertType(attr, PropertyConceptAttribute);\n usages = await this.ideStore.findConceptUsages(FIND_USAGE_FUNCTION_PATH.PROPERTY, [`'${attr.classPath}'`, `'${attr.pureId}'`]);\n break;\n }\n case ConceptType.PACKAGE: {\n let elementsUsage = [];\n let childElementsInfo = [];\n try {\n childElementsInfo =\n await this.ideStore.client.getChildPackageableElements(oldName);\n elementsUsage = (await this.ideStore.client.getPackageableElementsUsage(childElementsInfo.map((info) => info.pureId))).map((usage) => deserialize(PackageableElementUsage, usage));\n }\n catch {\n this.ideStore.applicationStore.notificationService.notifyError(`Can't find usage for child packageable elements`);\n return;\n }\n finally {\n this.ideStore.applicationStore.alertService.setBlockingAlert(undefined);\n }\n const inputs = [];\n assertTrue(elementsUsage.length === childElementsInfo.length, `Can't find matching usages for child packageable elements`);\n const newPackage = extractPackagePathFromPath(oldName)\n ?.concat(ELEMENT_PATH_DELIMITER)\n .concat(newName) ?? newName;\n for (let i = 0; i < elementsUsage.length; ++i) {\n const elementInfo = guaranteeNonNullable(childElementsInfo[i]);\n const sourcePackage = guaranteeNonNullable(extractPackagePathFromPath(elementInfo.pureId));\n const destinationPackage = newPackage.concat(sourcePackage.substring(sourcePackage.indexOf(oldName) + oldName.length));\n inputs.push({\n pureName: elementInfo.pureName,\n pureType: elementInfo.pureType,\n sourcePackage,\n destinationPackage,\n usages: guaranteeNonNullable(elementsUsage[i]).second,\n });\n }\n await flowResult(this.ideStore.movePackageableElements(inputs));\n return;\n }\n default: {\n usages = await this.ideStore.findConceptUsages(FIND_USAGE_FUNCTION_PATH.ELEMENT, [`'${attr.pureId}'`]);\n break;\n }\n }\n }\n catch (error) {\n assertErrorThrown(error);\n this.ideStore.applicationStore.notificationService.notifyError(error);\n return;\n }\n finally {\n this.ideStore.applicationStore.alertService.setBlockingAlert(undefined);\n }\n await flowResult(this.ideStore.renameConcept(oldName, newName, attr.pureType, usages));\n }\n}\n//# sourceMappingURL=ConceptTreeState.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { createModelSchema, deserialize, list, primitive } from 'serializr';\nexport class InitializationResult {\n cached;\n datamarts;\n text;\n}\ncreateModelSchema(InitializationResult, {\n cached: primitive(),\n datamarts: list(primitive()),\n text: primitive(),\n});\nexport class InitializationFailureResult extends InitializationResult {\n error;\n sessionError;\n}\ncreateModelSchema(InitializationFailureResult, {\n cached: primitive(),\n datamarts: list(primitive()),\n text: primitive(),\n error: primitive(),\n sessionError: primitive(),\n});\nexport class InitializationFailureWithSourceResult extends InitializationFailureResult {\n RO;\n line;\n column;\n source;\n}\ncreateModelSchema(InitializationFailureWithSourceResult, {\n cached: primitive(),\n datamarts: list(primitive()),\n text: primitive(),\n RO: primitive(),\n line: primitive(),\n column: primitive(),\n source: primitive(),\n error: primitive(),\n sessionError: primitive(),\n});\nexport const deserializeInitializationnResult = (value) => {\n if (value.error) {\n if (value.source) {\n return deserialize(InitializationFailureWithSourceResult, value);\n }\n return deserialize(InitializationFailureResult, value);\n }\n return deserialize(InitializationResult, value);\n};\n//# sourceMappingURL=Initialization.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { uuid } from '@finos/legend-shared';\nimport { createModelSchema, deserialize, list, object, optional, primitive, } from 'serializr';\nexport class ExecutionResult {\n text;\n // compiler!: string;\n reinit;\n}\nexport class ExecutionSuccessResult extends ExecutionResult {\n cache;\n modifiedFiles = [];\n}\ncreateModelSchema(ExecutionSuccessResult, {\n text: primitive(),\n cache: primitive(),\n modifiedFiles: list(primitive()),\n reinit: primitive(),\n});\nexport class ExecutionFailureResult extends ExecutionResult {\n RO;\n line;\n column;\n source;\n error;\n sessionError;\n}\ncreateModelSchema(ExecutionFailureResult, {\n text: primitive(),\n RO: primitive(),\n line: optional(primitive()),\n column: optional(primitive()),\n source: optional(primitive()),\n error: primitive(),\n sessionError: primitive(),\n});\nclass GetConceptJumpTo {\n RO;\n line;\n column;\n source;\n}\ncreateModelSchema(GetConceptJumpTo, {\n RO: primitive(),\n line: primitive(),\n column: primitive(),\n source: primitive(),\n});\nexport class GetConceptResult extends ExecutionResult {\n jumpTo;\n}\ncreateModelSchema(GetConceptResult, {\n text: primitive(),\n jumpTo: object(GetConceptJumpTo),\n});\nexport class CandidateWithPackageImported {\n uuid = uuid();\n sourceID;\n line;\n column;\n foundName;\n}\ncreateModelSchema(CandidateWithPackageImported, {\n sourceID: primitive(),\n line: primitive(),\n column: primitive(),\n foundName: primitive(),\n});\nexport class CandidateWithPackageNotImported {\n uuid = uuid();\n sourceID;\n line;\n column;\n foundName;\n add;\n messageToBeModified;\n fileToBeModified;\n lineToBeModified;\n columnToBeModified;\n}\ncreateModelSchema(CandidateWithPackageNotImported, {\n sourceID: primitive(),\n line: primitive(),\n column: primitive(),\n foundName: primitive(),\n add: primitive(),\n messageToBeModified: primitive(),\n fileToBeModified: primitive(),\n lineToBeModified: primitive(),\n columnToBeModified: primitive(),\n});\nexport class UnmatchedFunctionResult extends ExecutionFailureResult {\n candidateName;\n candidatesWithPackageImported = [];\n candidatesWithPackageNotImported = [];\n}\ncreateModelSchema(UnmatchedFunctionResult, {\n candidateName: primitive(),\n candidatesWithPackageImported: list(object(CandidateWithPackageImported)),\n candidatesWithPackageNotImported: list(object(CandidateWithPackageNotImported)),\n});\nexport class UnknownSymbolResult extends ExecutionFailureResult {\n candidateName;\n candidates = [];\n}\ncreateModelSchema(UnknownSymbolResult, {\n candidateName: primitive(),\n candidates: list(object(CandidateWithPackageNotImported)),\n});\nexport class TestAttribute {\n id;\n parentId;\n file;\n line; // number\n column; // number\n}\ncreateModelSchema(TestAttribute, {\n id: primitive(),\n parentId: primitive(),\n file: primitive(),\n line: primitive(),\n column: primitive(),\n});\nexport class TestInfo {\n children = [];\n li_attr;\n text;\n type; // presence indicate this is the leaf\n}\ncreateModelSchema(TestInfo, {\n children: list(object(TestInfo)),\n li_attr: object(TestAttribute),\n text: primitive(),\n type: primitive(),\n});\nexport class TestExecutionResult extends ExecutionResult {\n count;\n filterPaths = [];\n path;\n pctAdapter;\n relevantTestsOnly;\n runnerId;\n tests = [];\n}\ncreateModelSchema(TestExecutionResult, {\n count: primitive(),\n filterPaths: list(primitive()),\n path: primitive(),\n pctAdapter: optional(primitive()),\n relevantTestsOnly: primitive(),\n runnerId: primitive(),\n tests: list(object(TestInfo)),\n});\nexport const deserializeExecutionResult = (value) => {\n if (value.error) {\n if (value.candidateName && value.PureUnmatchedFunctionException) {\n return deserialize(UnmatchedFunctionResult, value);\n }\n else if (value.candidateName && value.candidates) {\n return deserialize(UnknownSymbolResult, value);\n }\n return deserialize(ExecutionFailureResult, value);\n }\n else if (value.jumpTo) {\n return deserialize(GetConceptResult, value);\n }\n else if (value.tests) {\n return deserialize(TestExecutionResult, value);\n }\n return deserialize(ExecutionSuccessResult, value);\n};\n//# sourceMappingURL=Execution.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { deleteEntry, uuid } from '@finos/legend-shared';\nimport { action, makeObservable, observable } from 'mobx';\nimport { createModelSchema, deserialize, list, object, optional, primitive, } from 'serializr';\nexport class SearchEntry {\n uuid = uuid();\n}\nexport class SearchResultPreview {\n before;\n found;\n after;\n}\ncreateModelSchema(SearchResultPreview, {\n after: primitive(),\n before: primitive(),\n found: primitive(),\n});\nexport class SearchResultCoordinate {\n uuid = uuid();\n sourceId;\n startLine;\n startColumn;\n endLine;\n endColumn;\n preview;\n constructor(sourceId, startLine, startColumn, endLine, endColumn) {\n this.sourceId = sourceId;\n this.startLine = startLine;\n this.startColumn = startColumn;\n this.endLine = endLine;\n this.endColumn = endColumn;\n }\n}\ncreateModelSchema(SearchResultCoordinate, {\n sourceId: primitive(),\n startLine: primitive(),\n startColumn: primitive(),\n endLine: primitive(),\n endColumn: primitive(),\n preview: optional(object(SearchResultPreview)),\n});\nexport class SearchResultEntry extends SearchEntry {\n sourceId;\n coordinates = [];\n isExpanded = true;\n constructor() {\n super();\n makeObservable(this, {\n coordinates: observable,\n isExpanded: observable,\n setIsExpanded: action,\n dismissCoordinate: action,\n });\n }\n setCoordinates(value) {\n this.coordinates = value;\n }\n setIsExpanded(val) {\n this.isExpanded = val;\n }\n dismissCoordinate(value) {\n deleteEntry(this.coordinates, value);\n }\n}\ncreateModelSchema(SearchResultEntry, {\n sourceId: primitive(),\n coordinates: list(object(SearchResultCoordinate)),\n});\nexport const getSearchResultEntry = (result) => deserialize(SearchResultEntry, result);\n//# sourceMappingURL=SearchEntry.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { createModelSchema, custom, deserialize, list, object, primitive, SKIP, } from 'serializr';\nexport class PCTAdapter {\n name;\n func;\n constructor(name, func) {\n this.name = name;\n this.func = func;\n }\n}\nexport var TestResultStatus;\n(function (TestResultStatus) {\n // PASSED = 'passed',\n TestResultStatus[\"PASSED\"] = \"Success\";\n TestResultStatus[\"FAILED\"] = \"AssertFail\";\n TestResultStatus[\"ERROR\"] = \"Error\";\n TestResultStatus[\"NOT_RUN\"] = \"notRan\";\n})(TestResultStatus || (TestResultStatus = {}));\nexport class TestResult {\n // console!: string;\n // compiler!: string;\n status;\n test;\n}\nexport class TestSuccessResult extends TestResult {\n test = [];\n}\ncreateModelSchema(TestSuccessResult, {\n status: primitive(),\n test: list(primitive()),\n});\nexport class TestFailureResultError {\n text;\n RO;\n line;\n column;\n source;\n error;\n}\ncreateModelSchema(TestFailureResultError, {\n text: primitive(),\n RO: primitive(),\n line: primitive(),\n column: primitive(),\n source: primitive(),\n error: primitive(),\n});\nexport class TestFailureResult extends TestResult {\n test = [];\n error;\n}\ncreateModelSchema(TestFailureResult, {\n status: primitive(),\n test: list(primitive()),\n error: object(TestFailureResultError),\n});\nexport class AbstractTestRunnerCheckResult {\n}\nexport class TestRunnerCheckResult extends AbstractTestRunnerCheckResult {\n finished;\n tests = [];\n}\ncreateModelSchema(TestRunnerCheckResult, {\n finished: primitive(),\n tests: list(custom(() => SKIP, (value) => {\n if (value.error) {\n return deserialize(TestFailureResult, value);\n }\n return deserialize(TestSuccessResult, value);\n })),\n});\nexport class TestRunnerCheckError extends AbstractTestRunnerCheckResult {\n error;\n text;\n}\ncreateModelSchema(TestRunnerCheckError, {\n error: primitive(),\n text: primitive(),\n});\nexport const deserializeTestRunnerCheckResult = (value) => {\n if (value.error) {\n return deserialize(TestRunnerCheckError, value);\n }\n return deserialize(TestRunnerCheckResult, value);\n};\n//# sourceMappingURL=Test.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { action, computed, flow, flowResult, makeObservable, observable, } from 'mobx';\nimport { ActionState, addUniqueEntry, assertErrorThrown, assertTrue, guaranteeNonNullable, guaranteeType, promisify, UnsupportedOperationError, } from '@finos/legend-shared';\nimport { deserializeTestRunnerCheckResult, PCTAdapter, TestFailureResult, TestResultStatus, TestRunnerCheckResult, } from '../server/models/Test.js';\nconst getFullParentId = (testInfo, testExecutionResult) => `test${testExecutionResult.runnerId}_${testInfo.li_attr.parentId}`;\nconst getFullTestId = (testResult, testExecutionResult) => `test${testExecutionResult.runnerId}_${testResult.test.join('_')}`;\nexport var TestSuiteStatus;\n(function (TestSuiteStatus) {\n TestSuiteStatus[\"PASSED\"] = \"PASSED\";\n TestSuiteStatus[\"FAILED\"] = \"FAILED\";\n TestSuiteStatus[\"NONE\"] = \"NONE\";\n})(TestSuiteStatus || (TestSuiteStatus = {}));\nexport var TestResultType;\n(function (TestResultType) {\n TestResultType[\"PASSED\"] = \"PASSED\";\n TestResultType[\"FAILED\"] = \"FAILED\";\n TestResultType[\"ERROR\"] = \"ERROR\";\n TestResultType[\"RUNNING\"] = \"RUNNING\";\n})(TestResultType || (TestResultType = {}));\nexport const getTestResultById = (id, testResultInfo) => testResultInfo.passedTests.has(id)\n ? TestResultType.PASSED\n : testResultInfo.failedTests.has(id)\n ? TestResultType.FAILED\n : testResultInfo.testsWithError.has(id)\n ? TestResultType.ERROR\n : TestResultType.RUNNING;\nexport const getTestTreeNodeStatus = (node, testResultInfo) => {\n const id = node.id;\n const isLeafNode = Boolean(node.data.type);\n if (isLeafNode) {\n return getTestResultById(id, testResultInfo);\n }\n // order matters here, also if one test fail/error the whole sub-tree (package) will be marked as failed\n // NOTE: here, we have to check `startsWith(`${id}_`)` to guarantee we grab the right package, if we just use `startsWith(id)`\n // we might mark `meta::test` and `meta::test2` both as failed when `meta::test::someTest` fails\n return testResultInfo.failedTestIds.some((i) => i.startsWith(`${id}_`)) ||\n testResultInfo.testWithErrorIds.some((i) => i.startsWith(`${id}_`))\n ? TestResultType.FAILED\n : testResultInfo.notRunTestIds.some((i) => i.startsWith(`${id}_`))\n ? TestResultType.RUNNING\n : TestResultType.PASSED;\n};\nexport class TestResultInfo {\n _START_TIME;\n total;\n time = 0; // ms\n passedTests = new Set();\n failedTests = new Map();\n testsWithError = new Map();\n notRunTests;\n results = new Map();\n constructor(allTestIds) {\n makeObservable(this, {\n total: observable,\n time: observable,\n passedTests: observable,\n failedTests: observable,\n testsWithError: observable,\n notRunTests: observable,\n results: observable,\n passed: computed,\n error: computed,\n failed: computed,\n passedTestIds: computed,\n failedTestIds: computed,\n testWithErrorIds: computed,\n notRunTestIds: computed,\n numberOfTestsRun: computed,\n runPercentage: computed,\n suiteStatus: computed,\n setTime: action,\n addResult: action,\n });\n this._START_TIME = Date.now();\n this.total = allTestIds.size;\n this.notRunTests = new Set(allTestIds);\n }\n get passed() {\n return this.passedTests.size;\n }\n get error() {\n return this.testsWithError.size;\n }\n get failed() {\n return this.failedTests.size;\n }\n get passedTestIds() {\n return Array.from(this.passedTests.values());\n }\n get failedTestIds() {\n return Array.from(this.failedTests.keys());\n }\n get testWithErrorIds() {\n return Array.from(this.testsWithError.keys());\n }\n get notRunTestIds() {\n return Array.from(this.notRunTests.values());\n }\n get numberOfTestsRun() {\n return this.passed + this.error + this.failed;\n }\n get runPercentage() {\n return Math.floor((this.numberOfTestsRun * 100) / this.total);\n }\n get suiteStatus() {\n return this.failed + this.error\n ? TestSuiteStatus.FAILED\n : this.passed\n ? TestSuiteStatus.PASSED\n : TestSuiteStatus.NONE;\n }\n setTime(val) {\n this.time = val;\n }\n addResult(result, testId) {\n this.results.set(testId, result);\n this.notRunTests.delete(testId);\n switch (result.status) {\n case TestResultStatus.PASSED: {\n this.passedTests.add(testId);\n break;\n }\n case TestResultStatus.FAILED: {\n this.failedTests.set(testId, guaranteeType(result, TestFailureResult));\n break;\n }\n case TestResultStatus.ERROR: {\n this.testsWithError.set(testId, guaranteeType(result, TestFailureResult));\n break;\n }\n default: {\n throw new UnsupportedOperationError(`Unsupported test result status '${result.status}'`);\n }\n }\n this.time = Date.now() - this._START_TIME;\n }\n}\nexport class TestRunnerState {\n ideStore;\n testExecutionResult;\n checkTestRunnerState = ActionState.create();\n testResultInfo;\n allTests = new Map();\n selectedTestId;\n // explorer tree\n treeBuildingState = ActionState.create();\n treeData;\n viewAsList = false;\n initState = ActionState.create();\n adapters = [];\n constructor(ideStore, testExecutionResult) {\n makeObservable(this, {\n testResultInfo: observable.ref,\n allTests: observable,\n selectedTestId: observable,\n treeData: observable.ref,\n viewAsList: observable,\n setViewAsList: action,\n setSelectedTestId: action,\n setTestResultInfo: action,\n setTreeData: action,\n refreshTree: action,\n collapseTree: action,\n expandTree: action,\n buildTreeDataByLayer: action,\n pullTestRunnerResult: action,\n initialize: flow,\n buildTestTreeData: flow,\n pollTestRunnerResult: flow,\n rerunTestSuite: flow,\n cancelTestRun: flow,\n });\n this.ideStore = ideStore;\n this.testExecutionResult = testExecutionResult;\n }\n getTreeData() {\n return guaranteeNonNullable(this.treeData, 'Test tree data has not been initialized');\n }\n setViewAsList(val) {\n this.viewAsList = val;\n }\n setSelectedTestId(val) {\n this.selectedTestId = val;\n }\n setTestResultInfo(val) {\n this.testResultInfo = val;\n }\n setTreeData(data) {\n this.treeData = data;\n }\n refreshTree() {\n this.setTreeData({ ...guaranteeNonNullable(this.treeData) });\n }\n *initialize() {\n if (this.initState.isInProgress) {\n this.ideStore.applicationStore.notificationService.notifyWarning('Test runner initialization is in progress');\n return;\n }\n this.initState.inProgress();\n try {\n this.adapters = (yield this.ideStore.client.getPCTAdapters()).map((adapter) => new PCTAdapter(adapter.first, adapter.second));\n this.initState.pass();\n }\n catch (error) {\n assertErrorThrown(error);\n this.ideStore.applicationStore.notificationService.notifyError(error);\n this.initState.fail();\n }\n }\n *buildTestTreeData() {\n if (this.treeBuildingState.isInProgress) {\n return;\n }\n this.treeBuildingState.inProgress();\n const rootIds = this.testExecutionResult.tests.map((test) => {\n const id = test.li_attr.id;\n if (test.type) {\n this.allTests.set(id, test);\n }\n return id;\n });\n const nodes = new Map();\n this.treeData = { rootIds, nodes };\n yield this.buildTreeDataByLayer(this.testExecutionResult.tests);\n this.treeBuildingState.reset();\n }\n collapseTree() {\n const treeData = this.getTreeData();\n treeData.nodes.forEach((node) => {\n node.isOpen = false;\n });\n this.refreshTree();\n }\n expandTree() {\n const treeData = this.getTreeData();\n treeData.nodes.forEach((node) => {\n node.isOpen = true;\n });\n this.refreshTree();\n }\n async buildTreeDataByLayer(tests) {\n const treeData = this.getTreeData();\n const childLevelTests = [];\n await Promise.all(tests.map((test) => new Promise((resolve, reject) => setTimeout(() => {\n const id = test.li_attr.id;\n const node = {\n id: id,\n label: test.text,\n data: test,\n childrenIds: test.type ? undefined : [],\n isLoading: false,\n };\n if (test.type) {\n this.allTests.set(id, test);\n }\n treeData.nodes.set(id, node);\n if (test.li_attr.parentId !== 'Root') {\n try {\n const parentNode = guaranteeNonNullable(treeData.nodes.get(getFullParentId(test, this.testExecutionResult)), `Can't find parent test node with ID '${test.li_attr.parentId}'`);\n if (parentNode.childrenIds) {\n addUniqueEntry(parentNode.childrenIds, id);\n }\n else {\n parentNode.childrenIds = [id];\n }\n }\n catch (error) {\n reject(error);\n return;\n }\n }\n childLevelTests.push(...test.children);\n resolve();\n }, 0))));\n if (childLevelTests.length) {\n return this.buildTreeDataByLayer(childLevelTests);\n }\n return Promise.resolve();\n }\n *pollTestRunnerResult() {\n if (!this.checkTestRunnerState.isInInitialState) {\n return;\n }\n this.checkTestRunnerState.inProgress();\n try {\n assertTrue(this.allTests.size === this.testExecutionResult.count, `Number of tests scanned in tree (${this.allTests.size}) does not match the number of total reported tests (${this.testExecutionResult.count})`);\n const testResultInfo = new TestResultInfo(new Set(this.allTests.keys()));\n this.testResultInfo = testResultInfo;\n yield this.pullTestRunnerResult(testResultInfo);\n }\n finally {\n this.checkTestRunnerState.reset();\n }\n }\n async pullTestRunnerResult(testResultInfo) {\n const result = deserializeTestRunnerCheckResult(await this.ideStore.client.checkTestRunner(this.testExecutionResult.runnerId));\n if (result instanceof TestRunnerCheckResult) {\n await Promise.all(result.tests.map((test) => promisify(() => testResultInfo.addResult(test, getFullTestId(test, this.testExecutionResult)))));\n if (!result.finished) {\n return new Promise((resolve, reject) => setTimeout(() => {\n try {\n resolve(this.pullTestRunnerResult(testResultInfo));\n }\n catch (error) {\n assertErrorThrown(error);\n this.ideStore.applicationStore.notificationService.notifyWarning(`Failed to run test${error.message ? `: ${error.message}` : ''}`);\n reject(error);\n }\n // NOTE: this call might take a while so we need to tune this depending on the performance of the app\n }, 1000));\n }\n return Promise.resolve();\n }\n // test runner check error -> runner has been cancelled\n this.setTestResultInfo(undefined);\n return Promise.resolve();\n }\n *rerunTestSuite() {\n if (this.ideStore.testRunState.isInProgress) {\n return;\n }\n yield flowResult(this.ideStore.executeTests(this.testExecutionResult.path, this.testExecutionResult.relevantTestsOnly, this.testExecutionResult.pctAdapter));\n }\n *cancelTestRun() {\n if (!this.ideStore.testRunState.isInProgress) {\n return;\n }\n yield this.ideStore.client.cancelTestRunner(this.testExecutionResult.runnerId);\n this.ideStore.applicationStore.notificationService.notifyWarning(`Stopped running test (id: ${this.testExecutionResult.runnerId}) successfully!`);\n }\n}\n//# sourceMappingURL=TestRunnerState.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { createModelSchema, deserialize, primitive } from 'serializr';\nexport class CommandResult {\n}\nexport class CommandFailureResult extends CommandResult {\n error;\n errorDialog;\n text;\n}\ncreateModelSchema(CommandFailureResult, {\n error: primitive(),\n errorDialog: primitive(),\n text: primitive(),\n});\nexport const deserializeCommandResult = (value) => {\n if (value.error) {\n return deserialize(CommandFailureResult, value);\n }\n return new CommandResult();\n};\n//# sourceMappingURL=Command.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport {} from '../server/models/Test.js';\nimport { FIND_USAGE_FUNCTION_PATH, } from '../server/models/Usage.js';\nimport { guaranteeNonNullable, } from '@finos/legend-shared';\nimport { ROOT_PACKAGE_PATH } from '../stores/PureIDEConfig.js';\nexport class PureServerClient {\n networkClient;\n // Pure IDE info\n userId = 'localuser';\n sessionId = `${this.userId}@${Date.now()}@abcd`; // dummy session ID\n compilerMode;\n mode;\n constructor(networkClient) {\n this.networkClient = networkClient;\n }\n get baseUrl() {\n return guaranteeNonNullable(this.networkClient.baseUrl, `Pure server client has not been configured properly`);\n }\n initialize = (requestCache) => this.networkClient.get(`${this.baseUrl}/initialize`, undefined, undefined, {\n requestCache,\n // checkFileConflict\n sessionId: this.sessionId,\n mode: this.mode,\n fastCompile: this.compilerMode,\n });\n getInitializationActivity = () => this.networkClient.get(`${this.baseUrl}/initializationActivity`, undefined, undefined, {\n sessionId: this.sessionId,\n });\n getConceptActivity = () => this.networkClient.get(`${this.baseUrl}/conceptsActivity`, undefined, undefined, {\n sessionId: this.sessionId,\n });\n execute = (openFiles, url, extraParams) => this.networkClient.post(`${this.baseUrl}/${url}`, {\n extraParams,\n openFiles,\n }, undefined, undefined, {\n sessionId: this.sessionId,\n mode: this.mode,\n fastCompile: this.compilerMode,\n });\n getExecutionActivity = () => this.networkClient.get(`${this.baseUrl}/executionActivity`, undefined, undefined, {\n sessionId: this.sessionId,\n });\n // ------------------------------------------- Search -------------------------------------------\n findFiles = (searchText, isRegExp) => this.networkClient.get(`${this.baseUrl}/findPureFiles`, undefined, undefined, {\n file: searchText,\n regex: isRegExp,\n });\n searchText = (searchText, isCaseSensitive, isRegExp, limit = 100) => this.networkClient.get(`${this.baseUrl}/findInSources`, undefined, undefined, {\n string: searchText,\n caseSensitive: isCaseSensitive,\n regex: isRegExp,\n limit,\n });\n getTextSearchPreview = (coordinates) => this.networkClient.post(`${this.baseUrl}/getTextSearchPreview`, coordinates);\n // ------------------------------------------- Test -------------------------------------------\n checkTestRunner = (testRunnerId) => this.networkClient.get(`${this.baseUrl}/testRunnerCheck`, undefined, undefined, {\n sessionId: this.sessionId,\n testRunnerId,\n });\n cancelTestRunner = (testRunnerId) => this.networkClient.get(`${this.baseUrl}/testRunnerCancel`, undefined, undefined, {\n sessionId: this.sessionId,\n testRunnerId,\n });\n getPCTAdapters = async () => {\n const result = await this.networkClient.get(`${this.baseUrl}/execute`, undefined, undefined, {\n func: 'meta::pure::ide::testing::getPCTAdapters__Pair_MANY_',\n });\n return (Array.isArray(result) ? result : [result]);\n };\n // ------------------------------------------- Concept -------------------------------------------\n getConceptChildren = (path) => this.networkClient.get(`${this.baseUrl}/execute`, undefined, undefined, {\n func: 'meta::pure::ide::display_ide(String[1]):String[1]',\n param: path ? `'${path}'` : `'${ROOT_PACKAGE_PATH}'`,\n format: 'raw',\n mode: this.mode,\n sessionId: this.sessionId,\n });\n getConceptInfo = async (file, line, column) => {\n const result = await this.networkClient.get(`${this.baseUrl}/getConceptInfo`, undefined, undefined, {\n file,\n line,\n column,\n });\n if (result.error) {\n throw new Error(result.text);\n }\n return result;\n };\n getUsages = async (func, param) => {\n const result = await this.networkClient.get(`${this.baseUrl}/execute`, undefined, undefined, {\n func,\n param,\n });\n return (Array.isArray(result) ? result : [result]);\n };\n renameConcept = (input) => this.networkClient.put(`${this.baseUrl}/renameConcept`, input);\n movePackageableElements = (inputs) => this.networkClient.put(`${this.baseUrl}/movePackageableElements`, inputs);\n getPackageableElementsUsage = async (paths) => {\n const result = await this.networkClient.get(`${this.baseUrl}/execute`, undefined, undefined, {\n func: FIND_USAGE_FUNCTION_PATH.MULTIPLE_PATHS,\n param: [`'${paths.join(',')}'`],\n });\n return (Array.isArray(result) ? result : [result]);\n };\n getChildPackageableElements = async (packagePath) => {\n const result = await this.networkClient.get(`${this.baseUrl}/execute`, undefined, undefined, {\n func: 'meta::pure::ide::getChildPackageableElements_String_1__String_MANY_',\n param: [`'${packagePath}'`],\n });\n return (Array.isArray(result) ? result : [result]).map((child) => JSON.parse(child));\n };\n // ------------------------------------------- IO / File Management -------------------------------------------\n getFile = (path) => this.networkClient.get(`${this.baseUrl}/fileAsJson/${path}`, undefined, undefined, {\n sessionId: this.sessionId,\n mode: this.mode,\n fastCompile: this.compilerMode,\n });\n getDirectoryChildren = (path) => this.networkClient.get(`${this.baseUrl}/dir`, undefined, undefined, {\n parameters: path ?? '/',\n mode: this.mode,\n sessionId: this.sessionId,\n });\n updateSource = (updateInputs) => this.networkClient.put(`${this.baseUrl}/updateSource`, updateInputs);\n createFile = (path) => this.networkClient.post(`${this.baseUrl}/newFile/${path}`, undefined, undefined, undefined, {\n sessionId: this.sessionId,\n mode: this.mode,\n fastCompile: this.compilerMode,\n });\n createFolder = (path) => this.networkClient.post(`${this.baseUrl}/newFolder/${path}`, undefined, undefined, undefined, {\n sessionId: this.sessionId,\n mode: this.mode,\n fastCompile: this.compilerMode,\n });\n renameFile = (oldPath, newPath) => this.networkClient.put(`${this.baseUrl}/renameFile`, {\n oldPath,\n newPath,\n }, undefined);\n deleteDirectoryOrFile = (path) => this.networkClient.delete(`${this.baseUrl}/deleteFile/${path}`, undefined, undefined, undefined, {\n sessionId: this.sessionId,\n });\n // ------------------------------------------- Diagram -------------------------------------------\n getDiagramInfo = async (diagramPath) => JSON.parse(await this.networkClient.get(`${this.baseUrl}/execute`, undefined, undefined, {\n func: 'meta::pure::ide::diagram::getDiagramInfo_String_1__String_1_',\n param: [`'${diagramPath}'`],\n }));\n getDiagramClassInfo = async (classPath) => JSON.parse(await this.networkClient.get(`${this.baseUrl}/execute`, undefined, undefined, {\n func: 'meta::pure::ide::diagram::getDiagramClassInfo_String_1__String_1_',\n param: [`'${classPath}'`],\n }));\n // ------------------------------------------- Suggestion -------------------------------------------\n getSuggestionsForIncompletePath = (currentPackagePath, types) => this.networkClient.post(`${this.baseUrl}/suggestion/incompletePath`, {\n path: currentPackagePath,\n types,\n });\n getSuggestionsForIdentifier = (importPaths, types) => this.networkClient.post(`${this.baseUrl}/suggestion/identifier`, {\n importPaths,\n types,\n });\n getSuggestionsForAttribute = (importPaths, path) => this.networkClient.post(`${this.baseUrl}/suggestion/attribute`, {\n importPaths,\n path,\n });\n getSuggestionsForClass = (importPaths) => this.networkClient.post(`${this.baseUrl}/suggestion/class`, {\n importPaths,\n });\n getSuggestionsForVariable = (sourceId, line, column) => this.networkClient.post(`${this.baseUrl}/suggestion/variable`, {\n sourceId,\n line,\n column,\n });\n}\n//# sourceMappingURL=PureServerClient.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { action, computed, makeObservable, observable } from 'mobx';\nexport class PanelDisplayState {\n _initialDefaultSize;\n _tempSize;\n size;\n defaultSize;\n snapSize;\n maxSize;\n constructor(size) {\n this.size = size.initial;\n this._tempSize = size.default;\n this.defaultSize = size.default;\n this._initialDefaultSize = size.default;\n this.snapSize = size.snap;\n makeObservable(this, {\n _tempSize: observable,\n size: observable,\n defaultSize: observable,\n snapSize: observable,\n maxSize: observable,\n isOpen: computed,\n isMaximizable: computed,\n isMaximized: computed,\n // open/close\n setSize: action,\n open: action,\n close: action,\n toggle: action,\n // maximize/minimize\n setMaxSize: action,\n maximize: action,\n minimize: action,\n toggleMaximize: action,\n });\n }\n get isOpen() {\n return this.size !== 0;\n }\n get isMaximizable() {\n return this.maxSize !== undefined;\n }\n get isMaximized() {\n return this.maxSize !== undefined && this.size === this.maxSize;\n }\n setSize(val) {\n // correct the value (cannot be less than 0 and greater than max size)\n val = Math.max(val, 0);\n if (this.maxSize) {\n val = Math.min(val, this.maxSize);\n }\n // do nothing if the size is the same as the value\n if (this.size === val) {\n return;\n }\n if (this.snapSize !== undefined) {\n if (val > this.size) {\n // expanding\n if (this.maxSize && val > this.maxSize - this.snapSize) {\n this.size = this.maxSize;\n }\n else {\n this.size = val < this.snapSize ? this.defaultSize : val;\n }\n }\n else {\n // shrinking\n this.size = val < this.snapSize ? 0 : val;\n }\n }\n else {\n this.size = val;\n }\n }\n open() {\n if (this.size === 0) {\n this.size = this._tempSize;\n }\n }\n close() {\n if (this.size !== 0) {\n this._tempSize = this.size || this.defaultSize;\n this.size = 0;\n }\n }\n toggle() {\n if (this.size === 0) {\n this.open();\n }\n else {\n this.close();\n }\n }\n setMaxSize(val) {\n this._tempSize = Math.min(this._tempSize, val);\n this.size = Math.min(this.size, val);\n this.defaultSize = Math.min(this._initialDefaultSize, val);\n this.maxSize = val;\n }\n maximize() {\n if (this.maxSize !== undefined) {\n if (this.size !== this.maxSize) {\n this._tempSize = this.size;\n this.size = this.maxSize;\n }\n }\n }\n minimize() {\n if (this.maxSize !== undefined) {\n if (this.size === this.maxSize) {\n this.size =\n this._tempSize === this.maxSize ? this.defaultSize : this._tempSize;\n }\n }\n }\n toggleMaximize() {\n if (this.maxSize !== undefined) {\n if (this.size === this.maxSize) {\n this.minimize();\n }\n else {\n this.maximize();\n }\n }\n }\n}\n//# sourceMappingURL=PanelDisplayState.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { hashArray, hashObject, hashValue } from '@finos/legend-shared';\nimport { SOURCE_INFORMATION_PROPERTY_KEY_SUFFIX } from './MetaModelConst.js';\n/**\n * The main point of maintaining this enum is to keep lessen magic string in hash computation\n * so that we are less error-prone in the process of defining hash.\n *\n * These tokens will be used in the definition of the hash as marker for the type of the strucure\n * arguably some of these can be redundant since this information is encoded in the resulting hash\n * code anyway, but sometimes when polymorphism manifests, such as when we have an array of structure\n * which are subclasses of an abstract stucture, hashing the marker is sometimes the only way to\n * discern between instances of different sub-structures\n *\n * TODO: when we refactor hashing, we could potentially move this to graphManager/changeDetection/\n */\nexport var CORE_HASH_STRUCTURE;\n(function (CORE_HASH_STRUCTURE) {\n CORE_HASH_STRUCTURE[\"INTERNAL__UNKNOWN_ELEMENT\"] = \"INTERNAL__UNKNOWN_ELEMENT\";\n CORE_HASH_STRUCTURE[\"INTERNAL__UNKNOWN_PACKAGEABLE_ELEMENT\"] = \"INTERNAL__UNKNOWN_PACKAGEABLE_ELEMENT\";\n CORE_HASH_STRUCTURE[\"INTERNAL__UNKNOWN_FUNCTION_ACTIVATOR\"] = \"INTERNAL__UNKNOWN_FUNCTION_ACTIVATOR\";\n CORE_HASH_STRUCTURE[\"PACKAGE\"] = \"PACKAGE\";\n CORE_HASH_STRUCTURE[\"PACKAGEABLE_ELEMENT\"] = \"PACKAGEABLE_ELEMENT\";\n CORE_HASH_STRUCTURE[\"PACKAGEABLE_ELEMENT_POINTER\"] = \"PACKAGEABLE_ELEMENT_POINTER\";\n // domain\n CORE_HASH_STRUCTURE[\"PROFILE\"] = \"PROFILE\";\n CORE_HASH_STRUCTURE[\"TAG_POINTER\"] = \"TAG_POINTER\";\n CORE_HASH_STRUCTURE[\"STEREOTYPE_POINTER\"] = \"STEREOTYPE_POINTER\";\n CORE_HASH_STRUCTURE[\"TAGGED_VALUE\"] = \"TAGGED_VALUE\";\n CORE_HASH_STRUCTURE[\"ENUMERATION\"] = \"ENUMERATION\";\n CORE_HASH_STRUCTURE[\"ENUM_VALUE\"] = \"ENUM_VALUE\";\n CORE_HASH_STRUCTURE[\"CLASS\"] = \"CLASS\";\n CORE_HASH_STRUCTURE[\"PROPERTY\"] = \"PROPERTY\";\n CORE_HASH_STRUCTURE[\"PROPERTY_DEFAULT_VALUE\"] = \"PROPERTY_DEFAULT_VALUE\";\n CORE_HASH_STRUCTURE[\"PROPERTY_POINTER\"] = \"PROPERTY_POINTER\";\n CORE_HASH_STRUCTURE[\"MULTIPLICITY\"] = \"MULTIPLICITY\";\n CORE_HASH_STRUCTURE[\"CONSTRAINT\"] = \"CONSTRAINT\";\n CORE_HASH_STRUCTURE[\"DERIVED_PROPERTY\"] = \"DERIVED_PROPERTY\";\n CORE_HASH_STRUCTURE[\"ASSOCIATION\"] = \"ASSOCIATION\";\n CORE_HASH_STRUCTURE[\"FUNCTION\"] = \"FUNCTION\";\n CORE_HASH_STRUCTURE[\"MEASURE\"] = \"MEASURE\";\n CORE_HASH_STRUCTURE[\"UNIT\"] = \"UNIT\";\n // function test\n CORE_HASH_STRUCTURE[\"FUNCTION_TEST_SUITE\"] = \"FUNCTION_TEST_SUITE\";\n CORE_HASH_STRUCTURE[\"FUNCTION_TEST\"] = \"FUNCTION_TEST\";\n CORE_HASH_STRUCTURE[\"FUNCTION_STORE_TEST_DATA\"] = \"FUNCTION_STORE_TEST_DATA\";\n CORE_HASH_STRUCTURE[\"FUNCTION_PARAMETER_VALUE\"] = \"FUNCTION_PARAMETER_VALUE\";\n // Function Activator\n CORE_HASH_STRUCTURE[\"FUNCTION_ACTIVATOR_POST_DEPLOYMENT_PROPERTIES\"] = \"FUNCTION_ACTIVATOR_POST_DEPLOYMENT_PROPERTIES\";\n // testable\n CORE_HASH_STRUCTURE[\"ASSERT_FAIL\"] = \"ASSERT_FAIL\";\n CORE_HASH_STRUCTURE[\"ASSERT_PASS\"] = \"ASSERT_PASS\";\n CORE_HASH_STRUCTURE[\"EQUAL_TO_JSON_ASSERT_FAIL\"] = \"EQUAL_TO_JSON_ASSERT_FAIL\";\n CORE_HASH_STRUCTURE[\"EQUAL_TO\"] = \"EQUAL_TO\";\n CORE_HASH_STRUCTURE[\"EQUAL_TO_JSON\"] = \"EQUAL_TO_JSON\";\n CORE_HASH_STRUCTURE[\"EQUAL_TO_TDS\"] = \"EQUAL_TO_TDS\";\n // section index\n CORE_HASH_STRUCTURE[\"SECTION_INDEX\"] = \"SECTION_INDEX\";\n CORE_HASH_STRUCTURE[\"SECTION\"] = \"SECTION\";\n CORE_HASH_STRUCTURE[\"IMPORT_AWARE_CODE_SECTION\"] = \"IMPORT_AWARE_CODE_SECTION\";\n CORE_HASH_STRUCTURE[\"DEFAULT_CODE_SECTION\"] = \"DEFAULT_CODE_SECTION\";\n // raw value specification\n CORE_HASH_STRUCTURE[\"RAW_LAMBDA\"] = \"RAW_LAMBDA\";\n CORE_HASH_STRUCTURE[\"RAW_VARIABLE\"] = \"RAW_VARIABLE\";\n CORE_HASH_STRUCTURE[\"RAW_INSTANCE_VALUE\"] = \"RAW_INSTANCE_VALUE\";\n CORE_HASH_STRUCTURE[\"BINDING_TRANSFORMER\"] = \"BINDING_TRANSFORMER\";\n // value specification\n CORE_HASH_STRUCTURE[\"INTERNAL__UNKNOWN_VALUE_SPECIFICATION\"] = \"INTERNAL__UNKNOWN_VALUE_SPECIFICATION\";\n CORE_HASH_STRUCTURE[\"INTERNAL__PROPAGATED_VALUE\"] = \"INTERNAL__PROPAGATED_VALUE\";\n CORE_HASH_STRUCTURE[\"VARIABLE_EXPRESSION\"] = \"VARIABLE_EXPRESSION\";\n CORE_HASH_STRUCTURE[\"EXPRESSION\"] = \"EXPRESSION\";\n CORE_HASH_STRUCTURE[\"FUNCTION_EXPRESSION\"] = \"FUNCTION_EXPRESSION\";\n CORE_HASH_STRUCTURE[\"SIMPLE_FUNCTION_EXPRESSION\"] = \"SIMPLE_FUNCTION_EXPRESSION\";\n CORE_HASH_STRUCTURE[\"ABSTRACT_PROPERTY_EXPRESSION\"] = \"ABSTRACT_PROPERTY_EXPRESSION\";\n CORE_HASH_STRUCTURE[\"INSTANCE_VALUE\"] = \"INSTANCE_VALUE\";\n CORE_HASH_STRUCTURE[\"PRIMITIVE_INSTANCE_VALUE\"] = \"PRIMITIVE_INSTANCE_VALUE\";\n CORE_HASH_STRUCTURE[\"ENUM_INSTANCE_VALUE\"] = \"ENUM_INSTANCE_VALUE\";\n CORE_HASH_STRUCTURE[\"KEY_EXPRESSION_INSTANCE_VALUE\"] = \"KEY_EXPRESSION_INSTANCE_VALUE\";\n CORE_HASH_STRUCTURE[\"KEY_EXPRESSION_VALUE\"] = \"KEY_EXPRESSION_VALUE\";\n CORE_HASH_STRUCTURE[\"RUNTIME_INSTANCE_VALUE\"] = \"RUNTIME_INSTANCE_VALUE\";\n CORE_HASH_STRUCTURE[\"PAIR_INSTANCE_VALUE\"] = \"PAIR_INSTANCE_VALUE\";\n CORE_HASH_STRUCTURE[\"MAPPING_INSTANCE_VALUE\"] = \"MAPPING_INSTANCE_VALUE\";\n CORE_HASH_STRUCTURE[\"PURE_LIST_INSTANCE_VALUE\"] = \"PURE_LIST_INSTANCE_VALUE\";\n CORE_HASH_STRUCTURE[\"COLLECTION_INSTANCE_VALUE\"] = \"COLLECTION_INSTANCE_VALUE\";\n CORE_HASH_STRUCTURE[\"LAMBDA_FUNCTION_INSTANCE_VALUE\"] = \"LAMBDA_FUNCTION_INSTANCE_VALUE\";\n CORE_HASH_STRUCTURE[\"FUNCTION_TYPE\"] = \"FUNCTION_TYPE\";\n CORE_HASH_STRUCTURE[\"LAMBDA_FUNCTION\"] = \"LAMBDA_FUNCTION\";\n CORE_HASH_STRUCTURE[\"ALLOY_SERIALIZATION_CONFIG_INSTANCE_VALUE\"] = \"ALLOY_SERIALIZATION_CONFIG_INSTANCE_VALUE\";\n CORE_HASH_STRUCTURE[\"ALLOY_SERIALIZATION_CONFIG\"] = \"ALLOY_SERIALIZATION_CONFIG\";\n CORE_HASH_STRUCTURE[\"ROOT_GRAPH_FETCH_TREE\"] = \"ROOT_GRAPH_FETCH_TREE\";\n CORE_HASH_STRUCTURE[\"PROPERTY_GRAPH_FETCH_TREE\"] = \"PROPERTY_GRAPH_FETCH_TREE\";\n CORE_HASH_STRUCTURE[\"SUBTYPE_GRAPH_FETCH_TREE\"] = \"SUBTYPE_GRAPH_FETCH_TREE\";\n CORE_HASH_STRUCTURE[\"SUBTYPE_GRAPH_FETCH_TREE_INSTANCE_VALUE\"] = \"SUBTYPE_GRAPH_FETCH_TREE_INSTANCE_VALUE\";\n CORE_HASH_STRUCTURE[\"PROPERTY_GRAPH_FETCH_TREE_INSTANCE_VALUE\"] = \"PROEPRTY_GRAPH_FETCH_TREE_INSTANCE_VALUE\";\n CORE_HASH_STRUCTURE[\"ROOT_GRAPH_FETCH_TREE_INSTANCE_VALUE\"] = \"ROOT_GRAPH_FETCH_TREE_INSTANCE_VALUE\";\n CORE_HASH_STRUCTURE[\"RELATION_COL_SPEC_ARRAY\"] = \"RELATION_COL_SPEC_ARRAY\";\n CORE_HASH_STRUCTURE[\"RELATION_COL_SPEC\"] = \"RELATION_COL_SPEC\";\n // ---------------------------------- DSL Mapping --------------------------------------\n CORE_HASH_STRUCTURE[\"INTERNAL__UNKNOWN_STORE\"] = \"INTERNAL__UNKNOWN_STORE\";\n CORE_HASH_STRUCTURE[\"INTERNAL__UNKNOWN_CONNECTION\"] = \"INTERNAL__UNKNOWN_CONNECTION\";\n CORE_HASH_STRUCTURE[\"INTERNAL__UNKNOWN_PROPERTY_MAPPING\"] = \"INTERNAL__UNKNOWN_PROPERTY_MAPPING\";\n CORE_HASH_STRUCTURE[\"INTERNAL__UNKNOWN_CLASS_MAPPING\"] = \"INTERNAL__UNKNOWN_CLASS_MAPPING\";\n CORE_HASH_STRUCTURE[\"INTERNAL__UNKNOWN_MAPPING_INCLUDE\"] = \"INTERNAL__UNKNOWN_MAPPING_INCLUDE\";\n CORE_HASH_STRUCTURE[\"MAPPING\"] = \"MAPPING\";\n CORE_HASH_STRUCTURE[\"MAPPING_INCLUDE_MAPPING\"] = \"MAPPING_INCLUDE_MAPPING\";\n CORE_HASH_STRUCTURE[\"ASSOCIATION_IMPLEMENTATION\"] = \"ASSOCIATION_IMPLEMENTATION\";\n CORE_HASH_STRUCTURE[\"RELATIONAL_ASSOCIATION_IMPLEMENTATION\"] = \"RELATIONAL_ASSOCIATION_IMPLEMENTATION\";\n CORE_HASH_STRUCTURE[\"XSTORE_ASSOCIATION_IMPLEMENTATION\"] = \"XSTORE_ASSOCIATION_IMPLEMENTATION\";\n CORE_HASH_STRUCTURE[\"ENUMERATION_MAPPING\"] = \"ENUMERATION_MAPPING\";\n CORE_HASH_STRUCTURE[\"ENUM_VALUE_MAPPING\"] = \"ENUM_VALUE_MAPPING\";\n CORE_HASH_STRUCTURE[\"SET_IMPLEMENTATION\"] = \"SET_IMPLEMENTATION\";\n CORE_HASH_STRUCTURE[\"OPERATION_SET_IMPLEMENTATION\"] = \"OPERATION_SET_IMPLEMENTATION\";\n CORE_HASH_STRUCTURE[\"PURE_INSTANCE_SET_IMPLEMENTATION\"] = \"PURE_INSTANCE_SET_IMPLEMENTATION\";\n CORE_HASH_STRUCTURE[\"PROPERTY_MAPPING\"] = \"PROPERTY_MAPPING\";\n CORE_HASH_STRUCTURE[\"LOCAL_MAPPING_PROPERTY\"] = \"LOCAL_MAPPING_PROPERTY\";\n CORE_HASH_STRUCTURE[\"PURE_PROPERTY_MAPPING\"] = \"PURE_PROPERTY_MAPPING\";\n CORE_HASH_STRUCTURE[\"XSTORE_PROPERTY_MAPPING\"] = \"XSTORE_PROPERTY_MAPPING\";\n CORE_HASH_STRUCTURE[\"MAPPING_TEST_LEGACY\"] = \"MAPPING_TEST_LEGACY\";\n CORE_HASH_STRUCTURE[\"MAPPING_TEST_SUITE\"] = \"MAPPING_TEST_SUITE\";\n CORE_HASH_STRUCTURE[\"MAPPING_TEST\"] = \"MAPPING_TEST\";\n CORE_HASH_STRUCTURE[\"STORE_TEST_DATA\"] = \"STORE_TEST_DATA\";\n CORE_HASH_STRUCTURE[\"INPUT_DATA\"] = \"INPUT_DATA\";\n CORE_HASH_STRUCTURE[\"FLAT_DATA_INPUT_DATA\"] = \"FLAT_DATA_INPUT_DATA\";\n CORE_HASH_STRUCTURE[\"RELATIONAL_INPUT_DATA\"] = \"RELATIONAL_INPUT_DATA\";\n CORE_HASH_STRUCTURE[\"OBJECT_INPUT_DATA\"] = \"OBJECT_INPUT_DATA\";\n CORE_HASH_STRUCTURE[\"MAPPING_TEST_ASSERT\"] = \"MAPPING_TEST_ASSERT\";\n CORE_HASH_STRUCTURE[\"EXPECTED_OUTPUT_MAPPING_TEST_ASSERT\"] = \"EXPECTED_OUTPUT_MAPPING_TEST_ASSERT\";\n CORE_HASH_STRUCTURE[\"FILTER_MAPPING\"] = \"FILTER_MAPPING\";\n CORE_HASH_STRUCTURE[\"COLUMN_MAPPING\"] = \"COLUMN_MAPPING\";\n CORE_HASH_STRUCTURE[\"GROUP_BY_MAPPING\"] = \"GROUP_BY_MAPPING\";\n // runtime\n CORE_HASH_STRUCTURE[\"RUNTIME\"] = \"RUNTIME\";\n CORE_HASH_STRUCTURE[\"PACKAGEABLE_RUNTIME\"] = \"PACKAGEABLE_RUNTIME\";\n CORE_HASH_STRUCTURE[\"ENGINE_RUNTIME\"] = \"ENGINE_RUNTIME\";\n CORE_HASH_STRUCTURE[\"SINGLE_ENGINE_RUNTIME\"] = \"SINGLE_ENGINE_RUNTIME\";\n CORE_HASH_STRUCTURE[\"LEGACY_RUNTIME\"] = \"LEGACY_RUNTIME\";\n CORE_HASH_STRUCTURE[\"LAKEHOUSE_RUNTIME\"] = \"LAKEHOUSE_RUNTIME\";\n CORE_HASH_STRUCTURE[\"RUNTIME_POINTER\"] = \"RUNTIME_POINTER\";\n CORE_HASH_STRUCTURE[\"STORE_CONNECTIONS\"] = \"STORE_CONNECTIONS\";\n CORE_HASH_STRUCTURE[\"IDENTIFIED_CONNECTION\"] = \"IDENTIFIED_CONNECTION\";\n // connection\n CORE_HASH_STRUCTURE[\"PACKAGEABLE_CONNECTION\"] = \"PACKAGEABLE_CONNECTION\";\n CORE_HASH_STRUCTURE[\"CONNECTION_POINTER\"] = \"CONNECTION_POINTER\";\n CORE_HASH_STRUCTURE[\"XML_MODEL_CONNECTION\"] = \"XML_MODEL_CONNECTION\";\n CORE_HASH_STRUCTURE[\"JSON_MODEL_CONNECTION\"] = \"JSON_MODEL_CONNECTION\";\n CORE_HASH_STRUCTURE[\"MODEL_CHAIN_CONNECTION\"] = \"MODEL_CHAIN_CONNECTION\";\n CORE_HASH_STRUCTURE[\"FLAT_DATA_CONNECTION\"] = \"FLAT_DATA_CONNECTION\";\n // aggregation aware mapping\n CORE_HASH_STRUCTURE[\"AGGREGATION_AWARE_MAPPING\"] = \"AGGREGATION_AWARE_MAPPING\";\n CORE_HASH_STRUCTURE[\"AGGREGATION_AWARE_SPECIFICATION\"] = \"AGGREGATION_AWARE_SPECIFICATION\";\n CORE_HASH_STRUCTURE[\"AGGREGATION_AWARE_SET_IMPLEMENTATION_CONTAINER\"] = \"AGGREGATION_AWARE_SET_IMPLEMENTATION_CONTAINER\";\n CORE_HASH_STRUCTURE[\"AGGREGATE_FUNCTION\"] = \"AGGREGATE_FUNCTION\";\n CORE_HASH_STRUCTURE[\"GROUP_BY_FUNCTION\"] = \"GROUP_BY_FUNCTION\";\n // ---------------------------------- DSL Generation --------------------------------------\n CORE_HASH_STRUCTURE[\"GENERATION_TREE\"] = \"GENERATION_TREE\";\n CORE_HASH_STRUCTURE[\"GENERATION_TREE_NODE\"] = \"GENERATION_TREE_NODE\";\n CORE_HASH_STRUCTURE[\"FILE_GENERATION\"] = \"FILE_GENERATION\";\n CORE_HASH_STRUCTURE[\"CONFIGURATION_PROPERTY\"] = \"CONFIGURATION_PROPERTY\";\n // ---------------------------------- DSL Data --------------------------------------\n CORE_HASH_STRUCTURE[\"INTERNAL__UNKNOWN_EMBEDDED_DATA\"] = \"INTERNAL__UNKNOWN_EMBEDDED_DATA\";\n CORE_HASH_STRUCTURE[\"EXTERNAL_FORMAT_DATA\"] = \"EXTERNAL_FORMAT_DATA\";\n CORE_HASH_STRUCTURE[\"MODEL_STORE_DATA\"] = \"MODEL_STORE_DATA\";\n CORE_HASH_STRUCTURE[\"MODEL_DATA\"] = \"MODEL_DATA\";\n CORE_HASH_STRUCTURE[\"MODEL_EMBEDDED_DATA\"] = \"MODEL_EMBEDDED_DATA\";\n CORE_HASH_STRUCTURE[\"MODEL_INSTANCE_DATA\"] = \"MODEL_INSTANCE_DATA\";\n CORE_HASH_STRUCTURE[\"RELATION_ELEMENTS_DATA\"] = \"RELATION_ELEMENTS_DATA\";\n CORE_HASH_STRUCTURE[\"RELATION_ELEMENT\"] = \"RELATION_ELEMENT\";\n CORE_HASH_STRUCTURE[\"RELATION_ROW_TEST_DATA\"] = \"RELATION_ROW_TEST_DATA\";\n CORE_HASH_STRUCTURE[\"DATA_ELEMENT_REFERENCE\"] = \"DATA_ELEMENT_REFERENCE\";\n CORE_HASH_STRUCTURE[\"DATA_ELEMENT\"] = \"DATA_ELEMENT\";\n CORE_HASH_STRUCTURE[\"RELATIONAL_CSV_DATA\"] = \"RELATIONAL_CSV_DATA\";\n CORE_HASH_STRUCTURE[\"RELATIONAL_TDS\"] = \"RELATIONAL_TDS\";\n CORE_HASH_STRUCTURE[\"RELATIONAL_CSV_DATA_TABLE\"] = \"RELATIONAL_CSV_DATA_TABLE\";\n // ---------------------------------- DSL External Format --------------------------------------\n CORE_HASH_STRUCTURE[\"BINDING\"] = \"BINDING\";\n CORE_HASH_STRUCTURE[\"SCHEMA_SET\"] = \"SCHEMA_SET\";\n CORE_HASH_STRUCTURE[\"SCHEMA\"] = \"SCHEMA\";\n CORE_HASH_STRUCTURE[\"MODEL_UNIT\"] = \"MODEL_UNIT\";\n CORE_HASH_STRUCTURE[\"URL_STREAM\"] = \"URL_STREAM\";\n CORE_HASH_STRUCTURE[\"EXTERNAL_FORMAT_CONNECTION\"] = \"EXTERNAL_FORMAT_CONNECTION\";\n // ---------------------------------- DSL Service --------------------------------------\n CORE_HASH_STRUCTURE[\"SERVICE\"] = \"SERVICE\";\n CORE_HASH_STRUCTURE[\"SERVICE_OWNER\"] = \"SERVICE_OWNER\";\n CORE_HASH_STRUCTURE[\"SERVICE_PURE_EXECUTION\"] = \"SERVICE_PURE_EXECUTION\";\n CORE_HASH_STRUCTURE[\"SERVICE_PURE_SINGLE_EXECUTION\"] = \"SERVICE_PURE_SINGLE_EXECUTION\";\n CORE_HASH_STRUCTURE[\"SERVICE_KEYED_EXECUTION_PARAMETER\"] = \"SERVICE_KEYED_EXECUTION_PARAMETER\";\n CORE_HASH_STRUCTURE[\"SERVICE_PURE_MULTI_EXECUTION\"] = \"SERVICE_PURE_MULTI_EXECUTION\";\n CORE_HASH_STRUCTURE[\"SERVICE_TEST_CONTAINER\"] = \"SERVICE_TEST_CONTAINER\";\n CORE_HASH_STRUCTURE[\"SERVICE_LEGACY_SINGLE_EXECUTION_TEST\"] = \"SERVICE_LEGACY_SINGLE_EXECUTION_TEST\";\n CORE_HASH_STRUCTURE[\"SERVICE_LEGACY_KEYED_SINGLE_EXECUTION_TEST\"] = \"SERVICE_LEGACY_KEYED_SINGLE_EXECUTION_TEST\";\n CORE_HASH_STRUCTURE[\"SERVICE_LEGACY_MULTI_EXECUTION_TEST\"] = \"SERVICE_LEGACY_MULTI_EXECUTION_TEST\";\n CORE_HASH_STRUCTURE[\"SERVICE_CONNECTION_TEST_DATA\"] = \"SERVICE_CONNECTION_TEST_DATA\";\n CORE_HASH_STRUCTURE[\"SERVICE_TEST_DATA\"] = \"SERVICE_TEST_DATA\";\n CORE_HASH_STRUCTURE[\"SERVICE_TEST_SUITE\"] = \"SERVICE_TEST_SUITE\";\n CORE_HASH_STRUCTURE[\"SERVICE_TEST\"] = \"SERVICE_TEST\";\n CORE_HASH_STRUCTURE[\"SERVICE_PARAMETER_VALUE\"] = \"SERVICE_PARAMETER_VALUE\";\n CORE_HASH_STRUCTURE[\"SERVICE_POST_VALIDATION\"] = \"SERVICE_POST_VALIDATION\";\n CORE_HASH_STRUCTURE[\"SERVICE_POST_VALIDATION_ASSERTION\"] = \"SERVICE_POST_VALIDATION_ASSERTION\";\n // execution environment instance\n CORE_HASH_STRUCTURE[\"EXECUTION_ENVIRONMENT_INSTANCE\"] = \"EXECUTION_ENVIRONMENT_INSTANCE\";\n CORE_HASH_STRUCTURE[\"SINGLE_EXECUTION_PARAMETER\"] = \"SINGLE_EXECUTION_PARAMETER\";\n CORE_HASH_STRUCTURE[\"MULTI_EXECUTION_PARAMETER\"] = \"MULTI_EXECUTION_PARAMETER\";\n CORE_HASH_STRUCTURE[\"RUNTIME_COMPONENTS\"] = \"RUNTIME_COMPONENTS\";\n // ---------------------------------- STO Relational --------------------------------------\n CORE_HASH_STRUCTURE[\"INTERNAL__UNKNOWN_DATASOURCE_SPECIFICATION\"] = \"INTERNAL__UNKNOWN_DATASOURCE_SPECIFICATION\";\n CORE_HASH_STRUCTURE[\"INTERNAL__UNKNOWN_AUTHENTICATION_STRATEGY\"] = \"INTERNAL__UNKNOWN_AUTHENTICATION_STRATEGY\";\n CORE_HASH_STRUCTURE[\"INTERNAL__UNKNOWN_POST_PROCESSOR\"] = \"INTERNAL__UNKNOWN_POST_PROCESSOR\";\n // database\n CORE_HASH_STRUCTURE[\"DATABASE\"] = \"DATABASE\";\n CORE_HASH_STRUCTURE[\"DATABASE_SCHEMA\"] = \"DATABASE_SCHEMA\";\n CORE_HASH_STRUCTURE[\"DATABASE_JOIN\"] = \"DATABASE_JOIN\";\n CORE_HASH_STRUCTURE[\"DATABASE_FILTER\"] = \"DATABASE_FILTER\";\n CORE_HASH_STRUCTURE[\"DATBASE_VIEW\"] = \"DATBASE_VIEW\";\n CORE_HASH_STRUCTURE[\"DATABASE_SCHEMA_TABLE\"] = \"DATABASE_SCHEMA_TABLE\";\n CORE_HASH_STRUCTURE[\"DATABASE_SCHEMA_TABULARFUNCTION\"] = \"DATABASE_SCHEMA_TABULARFUNCTION\";\n CORE_HASH_STRUCTURE[\"DATABASE_TABLE_COLUMN\"] = \"DATABASE_TABLE_COLUMN\";\n CORE_HASH_STRUCTURE[\"DATABASE_INCLUDE_STORE\"] = \"DATABASE_INCLUDE_STORE\";\n // relational operation element\n CORE_HASH_STRUCTURE[\"RELATIONAL\"] = \"RELATIONAL\";\n CORE_HASH_STRUCTURE[\"RELATIONAL_OPERATION_DYNA_FUNC\"] = \"RELATIONAL_OPERATION_DYNA_FUNC\";\n CORE_HASH_STRUCTURE[\"RELATIONAL_OPERATION_ELEMENTS_WITH_JOINS\"] = \"RELATIONAL_OPERATION_ELEMENTS_WITH_JOINS\";\n CORE_HASH_STRUCTURE[\"RELATIONAL_OPERATION_LITERAL\"] = \"RELATIONAL_OPERATION_LITERAL\";\n CORE_HASH_STRUCTURE[\"RELATIONAL_OPERATION_LITERAL_LIST\"] = \"RELATIONAL_OPERATION_LITERAL_LIST\";\n CORE_HASH_STRUCTURE[\"RELATIONAL_OPERATION_TABLE_ALIAS_COLUMN\"] = \"RELATIONAL_OPERATION_TABLE_ALIAS_COLUMN\";\n CORE_HASH_STRUCTURE[\"RELATIONAL_OPERATION_TABLE_POINTER\"] = \"RELATIONAL_OPERATION_TABLE_POINTER\";\n CORE_HASH_STRUCTURE[\"RELATIONAL_OPERATION_JOIN_POINTER\"] = \"RELATIONAL_OPERATION_JOIN_POINTER\";\n // relational data type\n CORE_HASH_STRUCTURE[\"RELATIONAL_DATATYPE_VARCHAR\"] = \"RELATIONAL_DATATYPE_VARCHAR\";\n CORE_HASH_STRUCTURE[\"RELATIONAL_DATATYPE_CHAR\"] = \"RELATIONAL_DATATYPE_CHAR\";\n CORE_HASH_STRUCTURE[\"RELATIONAL_DATATYPE_VARBINARY\"] = \"RELATIONAL_DATATYPE_VARBINARY\";\n CORE_HASH_STRUCTURE[\"RELATIONAL_DATATYPE_BINARY\"] = \"RELATIONAL_DATATYPE_BINARY\";\n CORE_HASH_STRUCTURE[\"RELATIONAL_DATATYPE_BIT\"] = \"RELATIONAL_DATATYPE_BIT\";\n CORE_HASH_STRUCTURE[\"RELATIONAL_DATATYPE_INTEGER\"] = \"RELATIONAL_DATATYPE_INTEGER\";\n CORE_HASH_STRUCTURE[\"RELATIONAL_DATATYPE_BIGINT\"] = \"RELATIONAL_DATATYPE_BIGINT\";\n CORE_HASH_STRUCTURE[\"RELATIONAL_DATATYPE_SMALLINT\"] = \"RELATIONAL_DATATYPE_SMALLINT\";\n CORE_HASH_STRUCTURE[\"RELATIONAL_DATATYPE_TINYINT\"] = \"RELATIONAL_DATATYPE_TINYINT\";\n CORE_HASH_STRUCTURE[\"RELATIONAL_DATATYPE_NUMERIC\"] = \"RELATIONAL_DATATYPE_NUMERIC\";\n CORE_HASH_STRUCTURE[\"RELATIONAL_DATATYPE_DECIMAL\"] = \"RELATIONAL_DATATYPE_DECIMAL\";\n CORE_HASH_STRUCTURE[\"RELATIONAL_DATATYPE_DOUBLE\"] = \"RELATIONAL_DATATYPE_DOUBLE\";\n CORE_HASH_STRUCTURE[\"RELATIONAL_DATATYPE_FLOAT\"] = \"RELATIONAL_DATATYPE_FLOAT\";\n CORE_HASH_STRUCTURE[\"RELATIONAL_DATATYPE_REAL\"] = \"RELATIONAL_DATATYPE_REAL\";\n CORE_HASH_STRUCTURE[\"RELATIONAL_DATATYPE_DATE\"] = \"RELATIONAL_DATATYPE_DATE\";\n CORE_HASH_STRUCTURE[\"RELATIONAL_DATATYPE_TIMESTAMP\"] = \"RELATIONAL_DATATYPE_TIMESTAMP\";\n CORE_HASH_STRUCTURE[\"RELATIONAL_DATATYPE_OTHER\"] = \"RELATIONAL_DATATYPE_OTHER\";\n CORE_HASH_STRUCTURE[\"RELATIONAL_DATATYPE_SEMISTRUCTURED\"] = \"RELATIONAL_DATATYPE_SEMISTRUCTURED\";\n CORE_HASH_STRUCTURE[\"RELATIONAL_DATATYPE_JSON\"] = \"RELATIONAL_DATATYPE_JSON\";\n // relational mapping\n CORE_HASH_STRUCTURE[\"ROOT_RELATIONAL_INSTANCE_SET_IMPLEMENTATION\"] = \"ROOT_RELATIONAL_INSTANCE_SET_IMPLEMENTATION\";\n CORE_HASH_STRUCTURE[\"RELATIONAL_INSTANCE_SET_IMPLEMENTATION\"] = \"RELATIONAL_INSTANCE_SET_IMPLEMENTATION\";\n CORE_HASH_STRUCTURE[\"REALTIONAL_PROPERTY_MAPPING\"] = \"REALTIONAL_PROPERTY_MAPPING\";\n CORE_HASH_STRUCTURE[\"EMBEDDED_REALTIONAL_PROPERTY_MAPPING\"] = \"EMBEDDED_REALTIONAL_PROPERTY_MAPPING\";\n CORE_HASH_STRUCTURE[\"INLINE_EMBEDDED_REALTIONAL_PROPERTY_MAPPING\"] = \"INLINE_EMBEDDED_REALTIONAL_PROPERTY_MAPPING\";\n CORE_HASH_STRUCTURE[\"OTHERWISE_EMBEDDED_REALTIONAL_PROPERTY_MAPPING\"] = \"OTHERWISE_EMBEDDED_REALTIONAL_PROPERTY_MAPPING\";\n CORE_HASH_STRUCTURE[\"RELATION_FUNCTION_INSTANCE_SET_IMPLEMENTATION\"] = \"RELATION_FUNCTION_INSTANCE_SET_IMPLEMENTATION\";\n CORE_HASH_STRUCTURE[\"RELATION_FUNCTION_PROPERTY_MAPPING\"] = \"RELATION_FUNCTION_PROPERTY_MAPPING\";\n // milestoning\n CORE_HASH_STRUCTURE[\"BUSINESS_MILESTONING\"] = \"BUSINESS_MILESTONING\";\n CORE_HASH_STRUCTURE[\"BUSINESS_SNAPSHOT_MILESTONING\"] = \"BUSINESS_SNAPSHOT_MILESTONING\";\n CORE_HASH_STRUCTURE[\"PROCESSING_MILESTONING\"] = \"PROCESSING_MILESTONING\";\n CORE_HASH_STRUCTURE[\"PROCESSING_SNAPSHOT_MILESTONING\"] = \"PROCESSING_SNAPSHOT_MILESTONING\";\n // relational database connection\n CORE_HASH_STRUCTURE[\"RELATIONAL_DATABASE_CONNECTION\"] = \"RELATIONAL_DATABASE_CONNECTION\";\n // relational database connection datasource specification\n CORE_HASH_STRUCTURE[\"STATIC_DATASOURCE_SPECIFICATION\"] = \"STATIC_DATASOURCE_SPECIFICATION\";\n CORE_HASH_STRUCTURE[\"LOCAL_H2_DATASOURCE_SPECIFICATION\"] = \"LOCAL_H2_DATASOURCE_SPECIFICATION\";\n CORE_HASH_STRUCTURE[\"EMBEDDED_H2_DATASOURCE_SPECIFICATION\"] = \"EMBEDDED_H2_DATASOURCE_SPECIFICATION\";\n CORE_HASH_STRUCTURE[\"SNOWFLAKE_DATASOURCE_SPECIFICATION\"] = \"SNOWFLAKE_DATASOURCE_SPECIFICATION\";\n CORE_HASH_STRUCTURE[\"REDSHIFT_DATASOURCE_SPECIFICATION\"] = \"REDSHIFT_DATASOURCE_SPECIFICATION\";\n CORE_HASH_STRUCTURE[\"BIGQUERY_DATASOURCE_SPECIFICATION\"] = \"BIGQUERY_DATASOURCE_SPECIFICATION\";\n CORE_HASH_STRUCTURE[\"DATABRICKS_DATASOURCE_SPECIFICATION\"] = \"DATABRICKS_DATASOURCE_SPECIFICATION\";\n CORE_HASH_STRUCTURE[\"SPANNER_DATASOURCE_SPECIFICATION\"] = \"SPANNER_DATASOURCE_SPECIFICATION\";\n CORE_HASH_STRUCTURE[\"TRINO_DATASOURCE_SPECIFICATION\"] = \"TRINO_DATASOURCE_SPECIFICATION\";\n CORE_HASH_STRUCTURE[\"DUCKDB_DATASOURCE_SPECIFICATION\"] = \"DUCKDB_DATASOURCE_SPECIFICATION\";\n CORE_HASH_STRUCTURE[\"TRINO_SSL_SPECIFICATION\"] = \"TRINO_SSL_SPECIFICATION\";\n // relational database connection authentication strategy\n CORE_HASH_STRUCTURE[\"DELEGRATED_KEREBEROS_AUTHENTICATION_STRATEGY\"] = \"DELEGRATED_KEREBEROS_AUTHENTICATION_STRATEGY\";\n CORE_HASH_STRUCTURE[\"DEFAULT_H2_AUTHENTICATION_STRATEGY\"] = \"DEFAULT_H2_AUTHENTICATION_STRATEGY\";\n CORE_HASH_STRUCTURE[\"TEST_AUTHENTICATION_STRATEGY\"] = \"TEST_AUTHENTICATION_STRATEGY\";\n CORE_HASH_STRUCTURE[\"SNOWFLAKE_PUBLIC_AUTHENTICATION_STRATEGY\"] = \"SNOWFLAKE_PUBLIC_AUTHENTICATION_STRATEGY\";\n CORE_HASH_STRUCTURE[\"API_TOKEN_AUTHENTICATION_STRATEGY\"] = \"API_TOKEN_AUTHENTICATION_STRATEGY\";\n CORE_HASH_STRUCTURE[\"GCP_APPLICATION_DEFAULT_CREDENTIALS_AUTHENTICATION_STRATEGY\"] = \"GCP_APPLICATION_DEFAULT_CREDENTIALS_AUTHENTICATION_STRATEGY\";\n CORE_HASH_STRUCTURE[\"USERNAME_PASSWORD_AUTHENTICATION_STRATEGY\"] = \"USERNAME_PASSWORD_AUTHENTICATION_STRATEGY\";\n CORE_HASH_STRUCTURE[\"OAUTH_AUTHENTICATION_STRATEGY\"] = \"OAUTH_AUTHENTICATION_STRATEGY\";\n CORE_HASH_STRUCTURE[\"GCP_WORKLOAD_IDENTITY_FEDERATION_AUTHENTICATION_STRATEGY\"] = \"GCP_WORKLOAD_IDENTITY_FEDERATION_AUTHENTICATION_STRATEGY\";\n CORE_HASH_STRUCTURE[\"MIDDLE_TIER_USERNAME_PASSWORD_AUTHENTICATION_STRATEGY\"] = \"MIDDLE_TIER_USERNAME_PASSWORD_AUTHENTICATION_STRATEGY\";\n CORE_HASH_STRUCTURE[\"TRINO_DELEGATED_KERBEROS_AUTHENTICATION_STRATEGY\"] = \"TRINO_KEREBEROS_AUTHENTICATION_STRATEGY\";\n // relational database connection post-processors\n CORE_HASH_STRUCTURE[\"MAPPER_POST_PROCESSOR\"] = \"MAPPER_POST_PROCESSOR\";\n CORE_HASH_STRUCTURE[\"SCHEMA_MAPPER\"] = \"SCHEMA_MAPPER\";\n CORE_HASH_STRUCTURE[\"TABLE_MAPPER\"] = \"TABLE_MAPPER\";\n // relational database connection query generation config\n CORE_HASH_STRUCTURE[\"GENERATION_FEATURES_CONFIG\"] = \"GENERATION_FEATURES_CONFIG\";\n // ---------------------------------- STO Flat-Data --------------------------------------\n CORE_HASH_STRUCTURE[\"FLAT_DATA\"] = \"FLAT_DATA\";\n CORE_HASH_STRUCTURE[\"FLAT_DATA_SECTION\"] = \"FLAT_DATA_SECTION\";\n CORE_HASH_STRUCTURE[\"FLAT_DATA_PROPERTY\"] = \"FLAT_DATA_PROPERTY\";\n CORE_HASH_STRUCTURE[\"FLAT_DATA_ROOT_RECORD_TYPE\"] = \"FLAT_DATA_ROOT_RECORD_TYPE\";\n CORE_HASH_STRUCTURE[\"FLAT_DATA_RECORD_TYPE\"] = \"FLAT_DATA_RECORD_TYPE\";\n CORE_HASH_STRUCTURE[\"FLAT_DATA_RECORD_FIELD\"] = \"FLAT_DATA_RECORD_FIELD\";\n CORE_HASH_STRUCTURE[\"FLAT_DATA_STRING\"] = \"FLAT_DATA_STRING\";\n CORE_HASH_STRUCTURE[\"FLAT_DATA_BOOLEAN\"] = \"FLAT_DATA_BOOLEAN\";\n CORE_HASH_STRUCTURE[\"FLAT_DATA_NUMBER\"] = \"FLAT_DATA_NUMBER\";\n CORE_HASH_STRUCTURE[\"FLAT_DATA_INTEGER\"] = \"FLAT_DATA_INTEGER\";\n CORE_HASH_STRUCTURE[\"FLAT_DATA_FLOAT\"] = \"FLAT_DATA_FLOAT\";\n CORE_HASH_STRUCTURE[\"FLAT_DATA_DECIMAL\"] = \"FLAT_DATA_DECIMAL\";\n CORE_HASH_STRUCTURE[\"FLAT_DATA_DATE\"] = \"FLAT_DATA_DATE\";\n CORE_HASH_STRUCTURE[\"FLAT_DATA_DATE_TIME\"] = \"FLAT_DATA_DATE_TIME\";\n CORE_HASH_STRUCTURE[\"FLAT_DATA_STRICT_DATE\"] = \"FLAT_DATA_STRICT_DATE\";\n CORE_HASH_STRUCTURE[\"FLAT_DATA_INSTANCE_SET_IMPLEMENTATION\"] = \"FLAT_DATA_INSTANCE_SET_IMPLEMENTATION\";\n CORE_HASH_STRUCTURE[\"FLAT_DATA_PROPERTY_MAPPING\"] = \"FLAT_DATA_PROPERTY_MAPPING\";\n CORE_HASH_STRUCTURE[\"FLAT_DATA_ASSOCIATION_IMPLEMENTATION\"] = \"FLAT_DATA_ASSOCIATION_IMPLEMENTATION\";\n CORE_HASH_STRUCTURE[\"FLAT_DATA_ASSOCIATION_PROPERTY_MAPPING\"] = \"FLAT_DATA_ASSOCIATION_PROPERTY_MAPPING\";\n CORE_HASH_STRUCTURE[\"EMBEDDED_FLAT_DATA_PROPERTY_MAPPING\"] = \"EMBEDDED_FLAT_DATA_PROPERTY_MAPPING\";\n CORE_HASH_STRUCTURE[\"FLAT_DATA_SECTION_POINTER\"] = \"FLAT_DATA_SECTION_POINTER\";\n // -------------------------------------- Function Activator --------------------------------------\n CORE_HASH_STRUCTURE[\"SNOWFLAKE_APP\"] = \"SNOWFLAKE_APP\";\n CORE_HASH_STRUCTURE[\"SNOWFLAKE_M2M_UDF\"] = \"SNOWFLAKE_M2M_UDF\";\n CORE_HASH_STRUCTURE[\"HOSTED_SERVICE\"] = \"HOSTED_SERVICE\";\n CORE_HASH_STRUCTURE[\"HOSTED_SERVICE_OWNER\"] = \"HOSTED_SERVICE_OWNER\";\n CORE_HASH_STRUCTURE[\"MEM_SQL_FUNCTION\"] = \"MEM_SQL_FUNCTION\";\n // ---------------------------------- Relation --------------------------------------\n CORE_HASH_STRUCTURE[\"RELATION_TYPE\"] = \"RELATION_TYPE\";\n CORE_HASH_STRUCTURE[\"RELATION_COLUMN\"] = \"RELATION_COLUMN\";\n // ---------------------------------- Data Product --------------------------------------\n CORE_HASH_STRUCTURE[\"DATA_PRODUCT\"] = \"DATA_PRODUCT\";\n CORE_HASH_STRUCTURE[\"DATA_PRODUCT_ACCESS_POINT_GROUP\"] = \"DATA_PRODUCT_ACCESS_POINT_GROUP\";\n CORE_HASH_STRUCTURE[\"DATA_PRODUCT_DEFAULT_ACCESS_POINT_GROUP\"] = \"DATA_PRODUCT_DEFAULT_ACCESS_POINT_GROUP\";\n CORE_HASH_STRUCTURE[\"DATA_PRODUCT_MODEL_ACCESS_POINT_GROUP\"] = \"DATA_PRODUCT_MODEL_ACCESS_POINT_GROUP\";\n CORE_HASH_STRUCTURE[\"DATA_PRODUCT_ACCESS_POINT\"] = \"DATA_PRODUCT_ACCESS_POINT\";\n CORE_HASH_STRUCTURE[\"SUPPORT_INFO\"] = \"SUPPORT_INFO\";\n CORE_HASH_STRUCTURE[\"DATA_PRODUCT_RUNTIME_INFO\"] = \"DATA_PRODUCT_RUNTIME_INFO\";\n CORE_HASH_STRUCTURE[\"DATA_PRODUCT_ELEMENT_SCOPE\"] = \"DATA_PRODUCT_ELEMENT_SCOPE\";\n CORE_HASH_STRUCTURE[\"DATA_PRODUCT_DIAGRAM\"] = \"DATA_PRODUCT_DIAGRAM\";\n CORE_HASH_STRUCTURE[\"DATA_PRODUCT_LINK\"] = \"DATA_PRODUCT_LINK\";\n CORE_HASH_STRUCTURE[\"DATA_PRODUCT_ICON_EMBEDDED_IMAGE\"] = \"DATA_PRODUCT_ICON_EMBEDDED_IMAGE\";\n CORE_HASH_STRUCTURE[\"DATA_PRODUCT_ICON_LIBRARY\"] = \"DATA_PRODUCT_ICON_LIBRARY\";\n CORE_HASH_STRUCTURE[\"INTERNAL__UNKNOWN_DATA_PRODUCT_ICON\"] = \"INTERNAL__UNKNOWN_DATA_PRODUCT_ICON\";\n CORE_HASH_STRUCTURE[\"EMAIL\"] = \"EMAIL\";\n CORE_HASH_STRUCTURE[\"LAKEHOUSE_ACCESS_POINT\"] = \"LAKEHOUSE_ACCESS_POINT\";\n CORE_HASH_STRUCTURE[\"UNKNOWN_ACCESS_POINT\"] = \"UNKNOWN_ACCESS_POINT\";\n CORE_HASH_STRUCTURE[\"FUNCTION_ACCESS_POINT\"] = \"FUNCTION_ACCESS_POINT\";\n CORE_HASH_STRUCTURE[\"DATA_PRODUCT_TYPE\"] = \"DATA_PRODUCT_TYPE\";\n CORE_HASH_STRUCTURE[\"MAPPING_INCLUDE_DATAPRODUCT\"] = \"MAPPING_INCLUDE_DATAPRODUCT\";\n CORE_HASH_STRUCTURE[\"DATA_PRODUCT_EXPERTISE\"] = \"DATA_PRODUCT_EXPERTISE\";\n CORE_HASH_STRUCTURE[\"DATA_PRODUCT_OPERATIONAL_METADATA\"] = \"DATA_PRODUCT_OPERATIONAL_METADATA\";\n})(CORE_HASH_STRUCTURE || (CORE_HASH_STRUCTURE = {}));\nexport const hashObjectWithoutSourceInformation = (val) => hashObject(val, {\n /**\n * NOTE: this is over-simplification as there could be source information fields with other names\n * see note in {@link pruneSourceInformation}\n */\n excludeKeys: (propKey) => propKey\n .toLowerCase()\n .endsWith(SOURCE_INFORMATION_PROPERTY_KEY_SUFFIX.toLowerCase()),\n});\nexport const hashRawLambda = (parameters, body) => hashArray([\n parameters ? hashObjectWithoutSourceInformation(parameters) : '',\n body ? hashObjectWithoutSourceInformation(body) : '',\n]);\nexport const hashElementPointer = (pointerType, path) => [CORE_HASH_STRUCTURE.PACKAGEABLE_ELEMENT_POINTER, pointerType ?? '', path]\n .map(hashValue)\n .join(',');\n//# sourceMappingURL=Core_HashUtils.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport class AnnotatedElement {\n stereotypes = [];\n taggedValues = [];\n}\n//# sourceMappingURL=AnnotatedElement.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { hashArray, IllegalStateError, uuid, } from '@finos/legend-shared';\nimport { ELEMENT_PATH_DELIMITER } from '../../../MetaModelConst.js';\nimport { CORE_HASH_STRUCTURE } from '../../../../graph/Core_HashUtils.js';\nimport { AnnotatedElement } from './domain/AnnotatedElement.js';\nclass ModelElement extends AnnotatedElement {\n name;\n}\nexport class PackageableElement extends ModelElement {\n _UUID = uuid();\n _isDeleted = false;\n _isDisposed = false;\n package;\n constructor(name) {\n super();\n this.name = name;\n }\n /**\n * This logic is specific to the codebase and this is not part of the native metamodel.\n * If needed, we can probably move this out as an utility or do type declaration merge\n * and define this externally using `Object.defineProperty`.\n *\n * @internal model logic\n */\n get isDeleted() {\n return this._isDeleted;\n }\n /**\n * This logic is specific to the codebase and this is not part of the native metamodel.\n * If needed, we can probably move this out as an utility or do type declaration merge\n * and define this externally using `Object.defineProperty`.\n *\n * @internal model logic\n */\n setIsDeleted(value) {\n this._isDeleted = value;\n }\n /**\n * This logic is specific to the codebase and this is not part of the native metamodel.\n * If needed, we can probably move this out as an utility or do type declaration merge\n * and define this externally using `Object.defineProperty`.\n *\n * @internal model logic\n */\n get path() {\n if (!this.package) {\n return this.name;\n }\n const parentPackagePath = this.package.path;\n return !parentPackagePath\n ? this.name\n : `${parentPackagePath}${ELEMENT_PATH_DELIMITER}${this.name}`;\n }\n /**\n * Dispose the element and its references to avoid memory leaks.\n *\n * This logic is specific to the codebase and this is not part of the native metamodel.\n * If needed, we can probably move this out as an utility or do type declaration merge\n * and define this externally using `Object.defineProperty`.\n *\n * @internal model logic\n */\n dispose() {\n this._isDisposed = true;\n /**\n * Trigger recomputation on `hashCode` so if the element is observed, hash code computation will now\n * remove itself from all observables it previously observed\n *\n * NOTE: for example, we used to do this since we decorate `hashCode` with\n * `computed({ keepAlive: true })` which poses a memory-leak threat.\n * However, since we're calling `keepAlive` actively now and dispose it right away to return `hashCode` to\n * a normal computed value, we might not need this step anymore. But we're being extremely defensive here\n * to avoid memory leak.\n * See https://mobx.js.org/computeds.html#keepalive\n */\n try {\n // eslint-disable-next-line @typescript-eslint/no-unused-expressions\n this.hashCode;\n }\n catch {\n /* do nothing */\n }\n }\n get _elementHashCode() {\n return hashArray([CORE_HASH_STRUCTURE.PACKAGEABLE_ELEMENT, this.path]);\n }\n get hashCode() {\n if (this._isDisposed) {\n throw new IllegalStateError(`Element '${this.path}' is already disposed`);\n }\n return this._elementHashCode;\n }\n}\n//# sourceMappingURL=PackageableElement.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport var DIAGRAM_HASH_STRUCTURE;\n(function (DIAGRAM_HASH_STRUCTURE) {\n DIAGRAM_HASH_STRUCTURE[\"DIAGRAM\"] = \"DIAGRAM\";\n DIAGRAM_HASH_STRUCTURE[\"CLASS_VIEW\"] = \"CLASS_VIEW\";\n DIAGRAM_HASH_STRUCTURE[\"PROPERTY_VIEW\"] = \"PROPERTY_VIEW\";\n DIAGRAM_HASH_STRUCTURE[\"ASSOCIATION_VIEW\"] = \"ASSOCIATION_VIEW\";\n DIAGRAM_HASH_STRUCTURE[\"PROPERTY_HOLDER_VIEW\"] = \"PROPERTY_HOLDER_VIEW\";\n DIAGRAM_HASH_STRUCTURE[\"GENERALIZATION_VIEW\"] = \"GENERALIZATION_VIEW\";\n DIAGRAM_HASH_STRUCTURE[\"RELATIONSHIP_VIEW\"] = \"RELATIONSHIP_VIEW\";\n DIAGRAM_HASH_STRUCTURE[\"POINT\"] = \"POINT\";\n DIAGRAM_HASH_STRUCTURE[\"RECTANGLE\"] = \"RECTANGLE\";\n DIAGRAM_HASH_STRUCTURE[\"POSITIONED_RECTANGLE\"] = \"POSITIONED_RECTANGLE\";\n})(DIAGRAM_HASH_STRUCTURE || (DIAGRAM_HASH_STRUCTURE = {}));\n//# sourceMappingURL=DSL_Diagram_HashUtils.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { hashArray } from '@finos/legend-shared';\nimport { PackageableElement, } from '@finos/legend-graph';\nimport { DIAGRAM_HASH_STRUCTURE } from '../../../../DSL_Diagram_HashUtils.js';\nexport class Diagram extends PackageableElement {\n classViews = [];\n associationViews = [];\n generalizationViews = [];\n propertyViews = [];\n get _elementHashCode() {\n return hashArray([\n DIAGRAM_HASH_STRUCTURE.DIAGRAM,\n this.path,\n hashArray(this.classViews),\n // TODO: association views\n hashArray(this.generalizationViews),\n hashArray(this.propertyViews),\n ]);\n }\n accept_PackageableElementVisitor(visitor) {\n return visitor.visit_PackageableElement(this);\n }\n}\n//# sourceMappingURL=DSL_Diagram_Diagram.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { hashArray } from '@finos/legend-shared';\nimport { DIAGRAM_HASH_STRUCTURE } from '../../../../../DSL_Diagram_HashUtils.js';\nexport class Point {\n x;\n y;\n constructor(x, y) {\n this.x = x;\n this.y = y;\n }\n get hashCode() {\n return hashArray([\n DIAGRAM_HASH_STRUCTURE.POINT,\n this.x.toString(),\n this.y.toString(),\n ]);\n }\n}\n//# sourceMappingURL=DSL_Diagram_Point.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { hashArray } from '@finos/legend-shared';\nimport { DIAGRAM_HASH_STRUCTURE } from '../../../../../DSL_Diagram_HashUtils.js';\nexport class Rectangle {\n width;\n height;\n constructor(width, height) {\n this.width = width;\n this.height = height;\n }\n get hashCode() {\n return hashArray([\n DIAGRAM_HASH_STRUCTURE.RECTANGLE,\n this.width.toString(),\n this.height.toString(),\n ]);\n }\n}\n//# sourceMappingURL=DSL_Diagram_Rectangle.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { hashArray } from '@finos/legend-shared';\nimport { Point } from './DSL_Diagram_Point.js';\nimport { Rectangle } from './DSL_Diagram_Rectangle.js';\nimport { DIAGRAM_HASH_STRUCTURE } from '../../../../../DSL_Diagram_HashUtils.js';\nexport class PositionedRectangle {\n _dummyObservable = {};\n position;\n rectangle;\n constructor(position, rectangle) {\n this.position = position;\n this.rectangle = rectangle;\n }\n // TODO: to be simplified out of metamodel\n // to be moved out when we move hashing out\n center = () => new Point(this.position.x + this.rectangle.width / 2, this.position.y + this.rectangle.height / 2);\n // TODO: to be simplified out of metamodel\n // to be moved out when we move hashing out\n contains(x, y) {\n const box = this.normalizeBox(this);\n return (x > box.position.x &&\n x < box.position.x + box.rectangle.width &&\n y > box.position.y &&\n y < box.position.y + box.rectangle.height);\n }\n // TODO: to be simplified out of metamodel\n // to be moved out when we move hashing out\n normalizeBox(box) {\n let newBox = box;\n if (box.rectangle.width < 0) {\n newBox = new PositionedRectangle(new Point(box.position.x + box.rectangle.width, box.position.y), new Rectangle(-box.rectangle.width, box.rectangle.height));\n }\n if (box.rectangle.height < 0) {\n newBox = new PositionedRectangle(new Point(box.position.x, box.position.y + box.rectangle.height), new Rectangle(box.rectangle.width, -box.rectangle.height));\n }\n return newBox;\n }\n get hashCode() {\n // eslint-disable-next-line @typescript-eslint/no-unused-expressions\n this._dummyObservable; // manually trigger class-view hash code recomputation\n return hashArray([\n DIAGRAM_HASH_STRUCTURE.POSITIONED_RECTANGLE,\n this.position,\n this.rectangle,\n ]);\n }\n}\n//# sourceMappingURL=DSL_Diagram_PositionedRectangle.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { hashArray } from '@finos/legend-shared';\nimport { PositionedRectangle } from './geometry/DSL_Diagram_PositionedRectangle.js';\nimport { Rectangle } from './geometry/DSL_Diagram_Rectangle.js';\nimport { Point } from './geometry/DSL_Diagram_Point.js';\nimport { DIAGRAM_HASH_STRUCTURE } from '../../../../DSL_Diagram_HashUtils.js';\nexport class ClassView extends PositionedRectangle {\n _OWNER;\n class;\n id;\n hideProperties;\n hideTaggedValues;\n hideStereotypes;\n constructor(owner, id, _class) {\n super(new Point(0, 0), new Rectangle(0, 0));\n this._OWNER = owner;\n this.id = id;\n this.class = _class;\n }\n get hashCode() {\n return hashArray([\n DIAGRAM_HASH_STRUCTURE.CLASS_VIEW,\n super.hashCode,\n this.id,\n this.class.valueForSerialization ?? '',\n this.hideProperties?.toString() ?? '',\n this.hideTaggedValues?.toString() ?? '',\n this.hideStereotypes?.toString() ?? '',\n ]);\n }\n}\n//# sourceMappingURL=DSL_Diagram_ClassView.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport class RelationshipViewEnd {\n /**\n * Offsets from the center of the class view.\n *\n * These offsets can be used to compute the end points of relationship views.\n */\n _offsetX;\n _offsetY;\n classView;\n constructor(classView) {\n this.classView = classView;\n }\n}\n//# sourceMappingURL=DSL_Diagram_RelationshipViewEnd.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { uuid } from '@finos/legend-shared';\n/**\n * Reference implies pointer-based relationship in the protocol. This means that during graph-building,\n * we figure out/infer the reference using pointer of some form. Take the following example:\n *\n * 1. For the properties that a class is holding, we don't need to have them as reference because the class actually\n * owns the properties, the relationship is direct, these properties definitions are contained within the class\n * definition\n * 2. On the other hand, if we have a property mapping, the property in this protocol is a pointer, because the specification\n * for the property is not contained within the mapping.\n *\n * There is more to reference than just a pointer. While building the graph, reference is also the result of a\n * deduction/inference process in identifying the right object to point. Many things could affect the decision as to\n * which object gets resolved in the reference, for example, the import statements, the section, the types, etc. These\n * information might be valuable to store because during serialization, we need to use them to derive user-intended input\n * (let's say the user put in an import statement and expect the pointer to just have name of class instead of its full-path,\n * we would like to keep the pointer as is during serialization if the class has not been changed).\n *\n * As such, this class `Reference` is kept to be as generic as possible, because we can extend it hold more\n * information. But regardless, only one thing we know for sure that is a reference must have a `value`, which is the actual\n * object-reference\n *\n * Given such meaning for reference, below are some guideline on how we modify the reference while modifying the metamodel:\n * 1. For property which is required and single (multiplicity: [1]):\n * NEVER change the reference instance: only change the value of the reference so other information (inference context)\n * are kept, so we can do proper serialization\n * 2. For property which is optional and single (multiplicity: [0..1]):\n * NEVER change the reference instance, unless the reference is removed (i.e. set to `undefined`).\n * If the reference is unset, and later on re-established, we will create a fresh new reference, even if it has the\n * same as the original's. This is intended so the behavior is consistent with case (3) below.\n * NOTE: We have considered another alternative to always keep the reference, just like case (1) using the\n * construct `OptionalReference`; this way we can keep the inference context. However, there are a few downsides to this:\n * i. it is complicated, it makes the code for reference complex for a small gain\n * ii. it makes our treatment of reference diverging from Pure and would make it hard to code-generate the metamodels\n * iii. it makes case (2) and case (3) treatment seem inconsistent.\n * 3. For property which can be multiple (multiplicity: [*] or similar):\n * ALWAYS change the reference instance, for DELETE or ADD, this is obvious, but for MODIFY, we can follow case (1),\n * but for simplicity sake, we will just swap out to use new a new reference\n */\nexport class Reference {\n _UUID = uuid();\n}\n/**\n * This can be used for references to sub-elements, such as property pointer, enum-value pointer, etc.\n * since those references are often resolved after we resolve the reference to the class or enumeration they belong to.\n * In other words, these reference has an owner reference.\n *\n * The rule for modifying these references is similar to that of `Reference` with one addition. That is\n * if we modify the child, we should ALWAYS modify the owner reference accordingly (except when we have a list, we will\n * trash the reference)\n */\nexport class ReferenceWithOwner extends Reference {\n ownerReference;\n constructor(ownerReference) {\n super();\n this.ownerReference = ownerReference;\n }\n}\n//# sourceMappingURL=Reference.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { Reference } from '../Reference.js';\nexport class PackageableElementReference extends Reference {\n value;\n constructor(value) {\n super();\n this.value = value;\n }\n}\nexport class PackageableElementExplicitReference extends PackageableElementReference {\n constructor(value) {\n super(value);\n }\n static create(value) {\n return new PackageableElementExplicitReference(value);\n }\n get valueForSerialization() {\n return this.value.path;\n }\n}\n/**\n * Explicit references should only be created when the value stored in the reference\n * is not obtained through resolution, usually this happens when the user\n * direclty modifies the graph and creates these references in the process.\n * Implicit references are used when we build the metamodel graph from protocols.\n * In other words, they are references whose values are obtained through resolution process.\n * An implicit reference comprises the resolved value and the\n * original input value in the protocol model(s). This way when we\n * transform the metamodel graph back to protocol, we keep the input as is.\n * This is needed to maintain hash-computation and round-trip stability.\n */\nexport class PackageableElementImplicitReference extends PackageableElementReference {\n initialResolvedPath;\n input;\n /**\n * Parent section information is only needed when the reference is resolved\n * by scanning the section imports.\n */\n parentSection;\n /**\n * This flag is set to `true` when section check is not needed when resolving the reference\n * For example: when the element is implied in context, when the element is imported\n * via auto imports, etc.\n */\n skipSectionCheck;\n constructor(value, input, parentSection, skipSectionCheck) {\n super(value);\n this.initialResolvedPath = value.path;\n this.input = input;\n this.parentSection = parentSection;\n this.skipSectionCheck = skipSectionCheck;\n }\n static create(value, input) {\n return new PackageableElementImplicitReference(value, input, undefined, true);\n }\n static resolveFromSection(value, input, parentSection) {\n return new PackageableElementImplicitReference(value, input, parentSection, false);\n }\n get valueForSerialization() {\n const currentElementPath = this.value.path;\n // NOTE: `skipSectionCheck` flag's effect should only kick in if the value\n // is not different than the original value\n if (this.skipSectionCheck &&\n this.initialResolvedPath === currentElementPath) {\n return this.input;\n }\n // when the parent section does not exist or has been deleted\n if (this.parentSection === undefined ||\n this.parentSection._OWNER.isDeleted) {\n return currentElementPath;\n }\n // the current element is the same as the inferred one\n if (this.initialResolvedPath === currentElementPath) {\n return this.input;\n }\n return currentElementPath;\n }\n}\n//# sourceMappingURL=PackageableElementReference.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { PackageableElementExplicitReference, ReferenceWithOwner, } from '@finos/legend-graph';\nexport class ClassViewReference extends ReferenceWithOwner {\n ownerReference;\n value;\n constructor(ownerReference, value) {\n super(ownerReference);\n this.ownerReference = ownerReference;\n this.value = value;\n }\n}\nexport class ClassViewExplicitReference extends ClassViewReference {\n ownerReference;\n constructor(value) {\n const ownerReference = PackageableElementExplicitReference.create(value._OWNER);\n super(ownerReference, value);\n this.ownerReference = ownerReference;\n }\n static create(value) {\n return new ClassViewExplicitReference(value);\n }\n}\nexport class ClassViewImplicitReference extends ClassViewReference {\n ownerReference;\n constructor(ownerReference, value) {\n super(ownerReference, value);\n this.ownerReference = ownerReference;\n }\n static create(ownerReference, value) {\n return new ClassViewImplicitReference(ownerReference, value);\n }\n}\n//# sourceMappingURL=DSL_Diagram_ClassViewReference.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { hashArray, assertTrue } from '@finos/legend-shared';\nimport { RelationshipViewEnd } from './DSL_Diagram_RelationshipViewEnd.js';\nimport { Point } from './geometry/DSL_Diagram_Point.js';\nimport { ClassViewExplicitReference } from './DSL_Diagram_ClassViewReference.js';\nimport { DIAGRAM_HASH_STRUCTURE } from '../../../../DSL_Diagram_HashUtils.js';\nexport class RelationshipView {\n _OWNER;\n from;\n to;\n /**\n * NOTE: Unlike in the protocol model, we don't store the end points in the path but only store the\n * offsets of that point from the center of the end/start classviews. The main purpose here is to\n * make less error. We don't need to bother maintaining these points in the path. They are\n * auto-managed. Even if an erroneous path is set (e.g. an empty list of points), this logic\n * that we have will rectify that and create a sensible path.\n *\n * In exchange, this logic is a little complicated, we have tried to document as much about it as we could\n * but the logic is not straight forward. Perhaps, we could simplify this in the future.\n */\n path = [];\n constructor(owner, from, to) {\n this._OWNER = owner;\n this.from = new RelationshipViewEnd(ClassViewExplicitReference.create(from));\n this.to = new RelationshipViewEnd(ClassViewExplicitReference.create(to));\n }\n // TODO: to be simplified out of metamodel\n // we will move these when we move hashing out of metamodel\n /**\n * Calculate the end points of the edge using offset, otherwise, use the center\n */\n computeEdgeEndpoint(edgeView, allowChange = true) {\n const box = edgeView.classView.value;\n const center = edgeView.classView.value.center();\n const newX = center.x + (edgeView._offsetX ?? 0);\n const newY = center.y + (edgeView._offsetY ?? 0);\n if (box.contains(newX, newY)) {\n return new Point(newX, newY);\n }\n if (allowChange) {\n edgeView._offsetX = 0;\n edgeView._offsetY = 0;\n }\n return new Point(center.x, center.y);\n }\n // TODO: to be simplified out of metamodel\n // we will move these when we move hashing out of metamodel\n /**\n * Compute the full path for the relationship view (including the ends even if these\n * ends lie inside of the classviews)\n *\n * Notice here that the end points are recomputed every time, as such\n * `path` only stores point that matters to the edge but are not end points\n */\n buildFullPath(allowChange = true) {\n return [\n this.computeEdgeEndpoint(this.from, allowChange),\n ...this.path,\n this.computeEdgeEndpoint(this.to, allowChange),\n ];\n }\n // TODO: to be simplified out of metamodel\n // we will move these when we move hashing out of metamodel\n /**\n * For a path, only keep **at most** 1 point at each end that lies inside the class view.\n * If there is no inside points, none of kept, so the path only contains outside points.\n */\n static pruneUnnecessaryInsidePoints = (path, from, to) => {\n assertTrue(Boolean(path.length), 'Path requires at least 1 point');\n let start = 0;\n let startPoint = path[start];\n while (start < path.length - 1 &&\n from.contains(startPoint.x, startPoint.y)) {\n start++;\n startPoint = path[start];\n }\n // NOTE: due to the usage path, we could make sure `end > start`, but maybe this\n // is an improvement to be done\n let end = path.length - 1;\n let endPoint = path[end];\n while (end > 0 && to.contains(endPoint.x, endPoint.y)) {\n end--;\n endPoint = path[end];\n }\n // NOTE: slice upper bound is exclusive, hence the +2 instead of +1\n const newPath = path.slice(start - 1, end + 2);\n // In the event we have trimmed all paths, we will return start and end point to ensure the path still contains 2 points\n return newPath.length < 2 ? [startPoint, endPoint] : newPath;\n };\n // TODO: to be simplified out of metamodel\n // we will move these when we move hashing out of metamodel\n /**\n * This method will compute the full path from the offset within class view for serialization and persistence purpose\n */\n get pathForSerialization() {\n return RelationshipView.pruneUnnecessaryInsidePoints(this.buildFullPath(), this.from.classView.value, this.to.classView.value);\n }\n get hashCode() {\n return hashArray([\n DIAGRAM_HASH_STRUCTURE.RELATIONSHIP_VIEW,\n this.from.classView.value.id,\n this.to.classView.value.id,\n hashArray(this.pathForSerialization),\n ]);\n }\n}\n//# sourceMappingURL=DSL_Diagram_RelationshipView.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { hashArray } from '@finos/legend-shared';\nimport { RelationshipView } from './DSL_Diagram_RelationshipView.js';\nimport { DIAGRAM_HASH_STRUCTURE } from '../../../../DSL_Diagram_HashUtils.js';\nexport class PropertyHolderView extends RelationshipView {\n property;\n constructor(owner, property, from, to) {\n super(owner, from, to);\n this.property = property;\n }\n get hashCode() {\n return hashArray([\n DIAGRAM_HASH_STRUCTURE.PROPERTY_HOLDER_VIEW,\n super.hashCode,\n this.property.pointerHashCode,\n ]);\n }\n}\n//# sourceMappingURL=DSL_Diagram_PropertyHolderView.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { hashArray } from '@finos/legend-shared';\nimport { PropertyHolderView } from './DSL_Diagram_PropertyHolderView.js';\nimport { DIAGRAM_HASH_STRUCTURE } from '../../../../DSL_Diagram_HashUtils.js';\nexport class PropertyView extends PropertyHolderView {\n get hashCode() {\n return hashArray([DIAGRAM_HASH_STRUCTURE.PROPERTY_VIEW, super.hashCode]);\n }\n}\n//# sourceMappingURL=DSL_Diagram_PropertyView.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { RelationshipView } from '../metamodel/pure/packageableElements/diagram/DSL_Diagram_RelationshipView.js';\nimport { Point } from '../metamodel/pure/packageableElements/diagram/geometry/DSL_Diagram_Point.js';\nimport { Class, getAllOwnClassProperties, } from '@finos/legend-graph';\nimport { deleteEntry, guaranteeNonNullable } from '@finos/legend-shared';\nimport { PositionedRectangle } from '../metamodel/pure/packageableElements/diagram/geometry/DSL_Diagram_PositionedRectangle.js';\nimport { Rectangle } from '../metamodel/pure/packageableElements/diagram/geometry/DSL_Diagram_Rectangle.js';\nexport class Vector {\n x;\n y;\n constructor(x, y) {\n this.x = x;\n this.y = y;\n }\n static fromPoints(a, b) {\n return new Vector(b.x - a.x, b.y - a.y);\n }\n unit() {\n const norm = Math.sqrt(this.x * this.x + this.y * this.y);\n return new Vector(this.x / norm, this.y / norm);\n }\n normal(other) {\n return new Vector(other.y - this.y, -(other.x - this.x));\n }\n dotProduct(other) {\n return this.x * other.x + this.y * other.y;\n }\n}\n/**\n * Get absolute position of element on the screen by recursively walking up element tree\n */\nexport const getElementPosition = (element) => {\n let xPosition = 0;\n let yPosition = 0;\n while (element.offsetParent) {\n xPosition += element.offsetLeft - element.scrollLeft + element.clientLeft;\n yPosition += element.offsetTop - element.scrollTop + element.clientTop;\n element = element.offsetParent;\n }\n return new Point(xPosition, yPosition);\n};\nexport const getClassView = (diagram, sourceViewId) => diagram.classViews.find((classView) => classView.id === sourceViewId);\nexport const cleanUpDeadReferencesInDiagram = (diagram, graph) => {\n // Delete orphan property views\n const propertyViewsToRemove = diagram.propertyViews.filter((propertyView) => !(propertyView.property.ownerReference.value instanceof Class\n ? getAllOwnClassProperties(propertyView.property.ownerReference.value)\n : propertyView.property.ownerReference.value.properties)\n .map((property) => property.name)\n .includes(propertyView.property.value.name));\n propertyViewsToRemove.forEach((propertyView) => deleteEntry(diagram.propertyViews, propertyView));\n // Fix orphan class views\n const classViewsToRemove = diagram.classViews.filter((cv) => !graph.getNullableClass(cv.class.value.path));\n classViewsToRemove.forEach((cw) => deleteEntry(diagram.classViews, cw));\n // Fix orphan gneralization views\n const generalizationViewsToRemove = diagram.generalizationViews.filter((g) => {\n const srcClass = g.from.classView.value.class.value;\n const targetClass = g.to.classView.value.class.value;\n return (!graph.getNullableClass(srcClass.path) ||\n !graph.getNullableClass(targetClass.path) ||\n srcClass.generalizations.filter((c) => c.value.rawType === targetClass)\n .length === 0);\n });\n generalizationViewsToRemove.forEach((g) => deleteEntry(diagram.generalizationViews, g));\n};\nexport const _relationshipView_setPath = (relationshipView, val) => {\n relationshipView.path = val;\n};\n/**\n * Simplify the path.\n *\n * Flatten the path if the angle is wide enough between 3 consecutive points\n * Also remove unnecessary inside points\n */\nexport const _relationshipView_simplifyPath = (relationshipView) => {\n const fullPath = relationshipView.buildFullPath();\n // NOTE: this method here will `swallow` up points inside of the boxes\n const newPath = RelationshipView.pruneUnnecessaryInsidePoints(fullPath, relationshipView.from.classView.value, relationshipView.to.classView.value);\n // recompute the offset point from center inside of `from` and `to` classviews.\n // for each, we first check if `manageInsidePointsDynamically` removes any points from the full path\n // if it does we will update the offset\n if (newPath[0] !== fullPath[0]) {\n const center = relationshipView.from.classView.value.center();\n relationshipView.from._offsetX =\n guaranteeNonNullable(newPath[0], 'Diagram path expected to have at least 2 points').x - center.x;\n relationshipView.from._offsetY =\n guaranteeNonNullable(newPath[0], 'Diagram path expected to have at least 2 points').y - center.y;\n }\n if (newPath[newPath.length - 1] !== fullPath[fullPath.length - 1]) {\n const center = relationshipView.to.classView.value.center();\n relationshipView.to._offsetX =\n newPath[newPath.length - 1].x - center.x;\n relationshipView.to._offsetY =\n newPath[newPath.length - 1].y - center.y;\n }\n // find the point which can be flattened due to its wide angle\n const result = [];\n for (let i = 0; i < newPath.length - 2; i++) {\n const v1 = Vector.fromPoints(newPath[i + 1], newPath[i]).unit();\n const v2 = Vector.fromPoints(newPath[i + 1], newPath[i + 2]).unit();\n const dot = v1.dotProduct(v2);\n const angle = (Math.acos(dot) * 180) / Math.PI;\n if (Math.abs(angle - 180) > 5) {\n result.push(newPath[i + 1]);\n }\n }\n // NOTE: this new path does not contain the 2 end points\n _relationshipView_setPath(relationshipView, result);\n};\n/**\n * Based on the location, find the point on the path that matches or create new point\n * (within a threshold of proximity) from the coordinate and put this in the path array\n * so it doesn't look too weird\n */\nexport const _findOrBuildPoint = (relationshipView, x, y, zoom, allowChange) => {\n for (const pt of relationshipView.path) {\n if (Math.sqrt((x - pt.x) * (x - pt.x) + (y - pt.y) * (y - pt.y)) <\n 10 / zoom) {\n return pt;\n }\n }\n const fullPath = relationshipView.buildFullPath(allowChange);\n const newPath = [];\n let point;\n for (let i = 0; i < fullPath.length - 1; i++) {\n const a = fullPath[i];\n const b = fullPath[i + 1];\n const u = new Vector(a.x, a.y).normal(new Vector(b.x, b.y)).unit();\n const v = Vector.fromPoints(a, new Point(x, y));\n // if the selection point is not too far from the segment\n // of the path, create a new point and make it part of the path\n if (Math.abs(u.dotProduct(v)) < 5 / zoom) {\n const lx = (a.x < b.x ? a.x : b.x) - 5 / zoom;\n const hx = (a.x < b.x ? b.x : a.x) + 5 / zoom;\n const ly = (a.y < b.y ? a.y : b.y) - 5 / zoom;\n const hy = (a.y < b.y ? b.y : a.y) + 5 / zoom;\n if (lx <= x && x <= hx && ly <= y && y <= hy) {\n point = new Point(x, y);\n newPath.push(point);\n }\n }\n if (i < fullPath.length - 2) {\n newPath.push(fullPath[i + 1]);\n }\n }\n if (point && allowChange) {\n // NOTE: this new path does not contain the 2 end points\n _relationshipView_setPath(relationshipView, newPath);\n }\n return point;\n};\nexport const rotatePointX = (point, angle) => point.x * Math.cos(angle) - point.y * Math.sin(angle);\nexport const rotatePointY = (point, angle) => point.x * Math.sin(angle) + point.y * Math.cos(angle);\nexport const getBottomRightCornerPoint = (pR) => new Point(pR.position.x + pR.rectangle.width, pR.position.y + pR.rectangle.height);\n/**\n * Build a small box at the bottom right corner of the rectangle so we\n * can use that for selection to resize the box\n */\nexport const buildBottomRightCornerBox = (pR) => {\n const bottomRightCornerPoint = getBottomRightCornerPoint(pR);\n const boxSize = 10;\n return new PositionedRectangle(new Point(bottomRightCornerPoint.x - boxSize / 2, bottomRightCornerPoint.y - boxSize / 2), new Rectangle(boxSize, boxSize));\n};\n/**\n * Check if a box contains another box\n */\nexport const boxContains = (box, otherBox) => {\n otherBox = box.normalizeBox(otherBox);\n return (box.contains(otherBox.position.x, otherBox.position.y) ||\n box.contains(otherBox.position.x + otherBox.rectangle.width, otherBox.position.y) ||\n box.contains(otherBox.position.x, otherBox.position.y + otherBox.rectangle.height) ||\n box.contains(otherBox.position.x + otherBox.rectangle.width, otherBox.position.y + otherBox.rectangle.height));\n};\n//# sourceMappingURL=DSL_Diagram_Helper.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { hashArray } from '@finos/legend-shared';\nimport { RelationshipView } from './DSL_Diagram_RelationshipView.js';\nimport { DIAGRAM_HASH_STRUCTURE } from '../../../../DSL_Diagram_HashUtils.js';\nexport class GeneralizationView extends RelationshipView {\n get hashCode() {\n return hashArray([\n DIAGRAM_HASH_STRUCTURE.GENERALIZATION_VIEW,\n super.hashCode,\n ]);\n }\n}\n//# sourceMappingURL=DSL_Diagram_GeneralizationView.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { PackageableElement } from '../PackageableElement.js';\nexport class Type extends PackageableElement {\n}\n//# sourceMappingURL=Type.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { hashArray } from '@finos/legend-shared';\nimport { CORE_HASH_STRUCTURE } from '../../../../../graph/Core_HashUtils.js';\nimport { Type } from './Type.js';\nexport class Class extends Type {\n /**\n * We can also call this `specifications` (i.e. vs. `generalizations`)\n *\n * If this belongs to immutable elements: i.e. in system, project dependency, etc.\n * we have to make sure to remove of disposed classes from this when we reprocess the graph\n *\n * @risk memory-leak\n */\n _subclasses = [];\n /**\n * To store the abstract properties generated while processing the milestoning properties. The properties\n * generated are `allVersions`, `allVersionsInRange` and derived property with date parameter.\n *\n * TODO: process new property added while editing the graph\n */\n _generatedMilestonedProperties = [];\n properties = [];\n propertiesFromAssociations = [];\n derivedProperties = [];\n // derivedPropertiesFromAssociations: DerivedProperty[] = [];\n generalizations = [];\n constraints = [];\n /**\n * Make sure to remove the disposed class from being referenced in other elements\n * e.g. subclass analytics is great, but it causes the class being referred to by classes\n * coming from system or dependencies\n *\n * This logic is specific to the codebase and this is not part of the native metamodel.\n * If needed, we can probably move this out as an utility or do type declaration merge\n * and define this externally using `Object.defineProperty`.\n *\n * @internal model logic\n */\n dispose() {\n super.dispose();\n this._subclasses = [];\n // cleanup subclasses analytics on superclasses\n this.generalizations.forEach((genericType) => {\n const superclass = genericType.value.rawType;\n if (!superclass._isDisposed) {\n superclass._subclasses = superclass._subclasses.filter((subclass) => !subclass._isDisposed);\n }\n });\n }\n get _elementHashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.CLASS,\n this.path,\n hashArray(this.properties),\n hashArray(this.derivedProperties),\n hashArray(this.generalizations.map((gen) => gen.ownerReference.valueForSerialization ?? '')),\n hashArray(this.constraints),\n hashArray(this.stereotypes.map((val) => val.pointerHashCode)),\n hashArray(this.taggedValues),\n ]);\n }\n accept_PackageableElementVisitor(visitor) {\n return visitor.visit_Class(this);\n }\n}\n//# sourceMappingURL=Class.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { PackageableElement, } from '../PackageableElement.js';\nexport class Package extends PackageableElement {\n children = [];\n /**\n * This logic is specific to the codebase and this is not part of the native metamodel.\n * If needed, we can probably move this out as an utility or do type declaration merge\n * and define this externally using `Object.defineProperty`.\n *\n * @internal model logic\n */\n get path() {\n return !this.package ? '' : super.path;\n }\n get hashCode() {\n return '';\n }\n accept_PackageableElementVisitor(visitor) {\n return visitor.visit_Package(this);\n }\n}\n//# sourceMappingURL=Package.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { Class } from '../metamodel/pure/packageableElements/domain/Class.js';\nimport { CORE_PURE_PATH, ELEMENT_PATH_DELIMITER, RESERVERD_PACKAGE_NAMES, MILESTONING_STEREOTYPE, PRIMITIVE_TYPE, MULTIPLICITY_INFINITE, PURE_DEPRECATED_STEREOTYPE, ROOT_PACKAGE_NAME, MILESTONING_VERSION_PROPERTY_SUFFIX, FUNCTION_SIGNATURE_MULTIPLICITY_INFINITE_TOKEN, PURE_DOC_TAG, } from '../MetaModelConst.js';\nimport { Package } from '../metamodel/pure/packageableElements/domain/Package.js';\nimport { AssertionError, assertNonEmptyString, assertTrue, guaranteeNonNullable, guaranteeType, uniqBy, UnsupportedOperationError, returnUndefOnError, filterByType, } from '@finos/legend-shared';\nimport { createPath } from '../MetaModelUtils.js';\nimport { Measure, Unit, } from '../metamodel/pure/packageableElements/domain/Measure.js';\nimport { Enumeration } from '../metamodel/pure/packageableElements/domain/Enumeration.js';\nimport { PrimitiveType } from '../metamodel/pure/packageableElements/domain/PrimitiveType.js';\nimport { Property } from '../metamodel/pure/packageableElements/domain/Property.js';\nimport { DerivedProperty } from '../metamodel/pure/packageableElements/domain/DerivedProperty.js';\nimport { GenericType } from '../metamodel/pure/packageableElements/domain/GenericType.js';\nimport { Multiplicity } from '../metamodel/pure/packageableElements/domain/Multiplicity.js';\nimport { extractDependencyGACoordinateFromRootPackageName } from '../DependencyManager.js';\nimport { FunctionAnalysisInfo, FunctionAnalysisParameterInfo, } from './FunctionAnalysis.js';\nimport { generateFunctionPrettyName } from './PureLanguageHelper.js';\nexport const addElementToPackage = (parent, element) => {\n // To improve performance we won't do duplication check here\n parent.children.push(element);\n element.package = parent;\n};\nexport const deleteElementFromPackage = (parent, packageableElement) => {\n parent.children = parent.children.filter((child) => child !== packageableElement);\n};\nconst getDescendantsOfPackage = (parent) => {\n const descendants = new Set();\n parent.children.forEach((c) => {\n if (c instanceof Package) {\n getDescendantsOfPackage(c).forEach((e) => descendants.add(e));\n }\n else {\n descendants.add(c);\n }\n });\n return descendants;\n};\nexport const getAllDescendantsOfPackage = (parent, graph) => new Set(graph\n .getPackages(parent.path)\n .map((p) => [...getDescendantsOfPackage(p)])\n .flat());\nexport const elementBelongsToPackage = (element, parent) => {\n const elementPackage = element instanceof Package ? element : element.package;\n if (!elementPackage) {\n return false;\n }\n const elementPackagePath = elementPackage.path;\n const parentPackage = parent.path;\n return (elementPackagePath + ELEMENT_PATH_DELIMITER).startsWith(parentPackage + ELEMENT_PATH_DELIMITER);\n};\nexport const getElementRootPackage = (element) => !element.package\n ? guaranteeType(element, Package)\n : getElementRootPackage(element.package);\n/**\n * If package name is a path, continue to recursively\n * traverse the package chain to find the leaf package\n *\n * NOTE: if we do not allow create new packages, errorcould be\n * thrown if a package with the specified path is not found\n */\nconst _getOrCreatePackage = (parentPackage, relativePackagePath, createNewPackageIfNotFound, cache) => {\n const index = relativePackagePath.indexOf(ELEMENT_PATH_DELIMITER);\n const packageName = index === -1\n ? relativePackagePath\n : relativePackagePath.substring(0, index);\n // try to resolve when there is a cache miss\n let pkg;\n pkg = parentPackage.children.find((child) => child instanceof Package && child.name === packageName);\n if (!pkg) {\n if (!createNewPackageIfNotFound) {\n throw new AssertionError(`Can't find child package '${packageName}' in package '${parentPackage.path}'`);\n }\n // create the node if it is not in parent package\n assertTrue(!RESERVERD_PACKAGE_NAMES.includes(packageName), `Can't create package with reserved name '${packageName}'`);\n pkg = new Package(packageName);\n pkg.package = parentPackage;\n // NOTE: here we directly push the element to the children array without any checks rather than use `addUniqueEntry` to improve performance.\n // Duplication checks should be handled separately for speed\n parentPackage.children.push(pkg);\n }\n // populate cache after resolving the package\n if (cache) {\n cache.set(createPath(parentPackage.path, packageName), pkg);\n }\n // traverse the package chain\n if (index !== -1) {\n return _getOrCreatePackage(pkg, relativePackagePath.substring(index + ELEMENT_PATH_DELIMITER.length), createNewPackageIfNotFound, cache);\n }\n return pkg;\n};\nexport const getOrCreatePackage = (parentPackage, relativePackagePath, createNewPackageIfNotFound, cache) => {\n // check cache to find the shortest chain of packages to find/build\n if (cache) {\n // short-circuit\n const cachedPackage = cache.get(createPath(parentPackage.path, relativePackagePath));\n if (cachedPackage) {\n return cachedPackage;\n }\n // NOTE: to check the cache, we need to traverse from the full package path\n // up its ancestor chain till we find a cache hit\n let immediateParentPackageRelativePath = relativePackagePath;\n while (immediateParentPackageRelativePath !== '') {\n const fullPath = createPath(parentPackage.path, immediateParentPackageRelativePath);\n const cachedParentPackage = cache.get(fullPath);\n if (cachedParentPackage) {\n return _getOrCreatePackage(cachedParentPackage, relativePackagePath.substring(immediateParentPackageRelativePath.length +\n ELEMENT_PATH_DELIMITER.length, relativePackagePath.length), createNewPackageIfNotFound, cache);\n }\n const index = immediateParentPackageRelativePath.lastIndexOf(ELEMENT_PATH_DELIMITER);\n immediateParentPackageRelativePath =\n index !== -1\n ? immediateParentPackageRelativePath.substring(0, index)\n : '';\n }\n }\n return _getOrCreatePackage(parentPackage, relativePackagePath, createNewPackageIfNotFound, cache);\n};\nexport const getOrCreateGraphPackage = (graph, packagePath, cache) => {\n assertNonEmptyString(packagePath, 'Package path is required');\n return getOrCreatePackage(graph.root, packagePath, true, cache);\n};\nexport const getRawGenericType = (genericType, clazz) => guaranteeType(genericType.rawType, clazz);\nexport const isMainGraphElement = (element) => returnUndefOnError(() => getElementRootPackage(element))?.name ===\n ROOT_PACKAGE_NAME.MAIN;\nexport const isElementReadOnly = (element) => !isMainGraphElement(element);\nexport const isDependencyElement = (element) => {\n const rootPackage = returnUndefOnError(() => getElementRootPackage(element));\n return (rootPackage?.name === ROOT_PACKAGE_NAME.PROJECT_DEPENDENCY_ROOT ||\n (rootPackage !== undefined &&\n Boolean(extractDependencyGACoordinateFromRootPackageName(rootPackage.name))));\n};\nexport const isGeneratedElement = (element) => returnUndefOnError(() => getElementRootPackage(element))?.name ===\n ROOT_PACKAGE_NAME.MODEL_GENERATION;\nexport const isSystemElement = (element) => {\n const elementRootPackageName = returnUndefOnError(() => getElementRootPackage(element))?.name;\n return (element instanceof PrimitiveType ||\n elementRootPackageName === ROOT_PACKAGE_NAME.SYSTEM ||\n elementRootPackageName === ROOT_PACKAGE_NAME.CORE);\n};\n/**\n * Extract the type of temporal milestone the class is associated with (using stereotype).\n *\n * Whatever the type, it means the class is milestoned, which means:\n * 1. properties of this type will now be considered milestoned, and will be automatically\n * converted into a derived property which accept some temporal parameters (depending\n * on the milestoning type)\n * 2. when we query properties of this type, we can provide the values for these parameters\n */\nexport const getMilestoneTemporalStereotype = (val, graph) => {\n const milestonedProfile = graph.getProfile(CORE_PURE_PATH.PROFILE_TEMPORAL);\n let stereotype;\n const profile = val.stereotypes.find((st) => st.ownerReference.value === milestonedProfile);\n stereotype = Object.values(MILESTONING_STEREOTYPE).find((value) => value === profile?.value.value);\n if (stereotype !== undefined) {\n return stereotype;\n }\n val.generalizations.forEach((generalization) => {\n const superType = generalization.value.rawType;\n if (superType instanceof Class) {\n const milestonedStereotype = getMilestoneTemporalStereotype(superType, graph);\n if (milestonedStereotype !== undefined) {\n stereotype = Object.values(MILESTONING_STEREOTYPE).find((value) => value === milestonedStereotype);\n }\n }\n });\n return stereotype;\n};\nexport const getTag = (profile, value) => guaranteeNonNullable(profile.p_tags.find((tag) => tag.value === value), `Can't find tag '${value}' in profile '${profile.path}'`);\nexport const getStereotype = (profile, value) => guaranteeNonNullable(profile.p_stereotypes.find((stereotype) => stereotype.value === value), `Can't find stereotype '${value}' in profile '${profile.path}'`);\nexport const getEnumValueNames = (enumeration) => enumeration.values.map((value) => value.name).filter(Boolean);\nexport const getEnumValue = (enumeration, name) => guaranteeNonNullable(enumeration.values.find((value) => value.name === name), `Can't find enum value '${name}' in enumeration '${enumeration.path}'`);\nexport const getFirstAssociatedProperty = (association) => guaranteeNonNullable(association.properties[0]);\nexport const getSecondAssociatedProperty = (association) => guaranteeNonNullable(association.properties[1]);\nexport const getOtherAssociatedProperty = (association, property) => {\n const idx = association.properties.findIndex((p) => p === property);\n assertTrue(idx !== -1, `Can't find property '${property.name}' in association '${association.path}'`);\n return guaranteeNonNullable(association.properties[(idx + 1) % 2]);\n};\nexport const getAssociatedPropertyClass = (association, property) => {\n if (property instanceof Property) {\n return guaranteeType(getOtherAssociatedProperty(association, property).genericType\n .ownerReference.value, Class, `Association property '${property.name}' must be of type 'class'`);\n }\n else if (property instanceof DerivedProperty) {\n throw new UnsupportedOperationError(`Derived property is not currently supported in association`);\n }\n throw new UnsupportedOperationError(`Can't get associated class of property`, property);\n};\n/**\n * Get all superclasses of a class, accounted for loop and duplication (which should be caught by compiler)\n * NOTE: we intentionally leave out `Any`\n */\nexport const getAllSuperclasses = (c) => {\n const visitedClasses = new Set();\n visitedClasses.add(c);\n const resolveSuperTypes = (_class) => {\n _class.generalizations.forEach((gen) => {\n const superType = getRawGenericType(gen.value, Class);\n if (!visitedClasses.has(superType)) {\n visitedClasses.add(superType);\n resolveSuperTypes(superType);\n }\n });\n };\n resolveSuperTypes(c);\n visitedClasses.delete(c);\n return Array.from(visitedClasses);\n};\n/**\n * Get all subclasses of a class, accounted for loop and duplication (which should be caught by compiler)\n * NOTE: we intentionally leave out `Any`\n */\nexport const getAllSubclasses = (c) => {\n const visitedClasses = new Set();\n visitedClasses.add(c);\n const resolveSubclasses = (_class) => {\n _class._subclasses.forEach((subclass) => {\n if (!visitedClasses.has(subclass)) {\n visitedClasses.add(subclass);\n resolveSubclasses(subclass);\n }\n });\n };\n resolveSubclasses(c);\n visitedClasses.delete(c);\n return Array.from(visitedClasses);\n};\nexport const getMilestoningGeneratedProperties = (_class) => _class._generatedMilestonedProperties.filter(filterByType(Property));\n/**\n * Get class and its supertypes' properties recursively, duplications and loops are handled (Which should be caught by compiler)\n */\nexport const getAllClassProperties = (_class, includeGeneratedMilestoning) => uniqBy(getAllSuperclasses(_class)\n .concat(_class)\n .map((c) => c.propertiesFromAssociations.concat(c.properties))\n .flat()\n .concat(includeGeneratedMilestoning\n ? getMilestoningGeneratedProperties(_class)\n : []), (property) => property.name);\nexport const getAllClassDerivedProperties = (_class) => uniqBy(getAllSuperclasses(_class)\n .concat(_class)\n .map((c) => c.derivedProperties)\n .flat(), (property) => property.name);\nexport const getClassProperty = (_class, name) => guaranteeNonNullable(getAllClassProperties(_class, true).find((property) => property.name === name), `Can't find property '${name}' in class '${_class.path}'`);\nexport const getAllOwnClassProperties = (_class) => _class.properties\n .concat(_class.propertiesFromAssociations)\n .concat(_class.derivedProperties);\nexport const getOwnClassProperty = (_class, name) => guaranteeNonNullable(getAllOwnClassProperties(_class).find((property) => property.name === name), `Can't find property '${name}' in class '${_class.path}'`);\nexport const getAllClassConstraints = (_class) => \n// Perhaps we don't need to care about deduping constraints here like for properties\ngetAllSuperclasses(_class)\n .concat(_class)\n .map((c) => c.constraints)\n .flat();\nexport const getOwnProperty = (propertyOwner, name) => guaranteeNonNullable(propertyOwner instanceof Class\n ? getAllOwnClassProperties(propertyOwner).find((property) => property.name === name)\n : propertyOwner.properties.find((property) => property.name === name), `Can't find property '${name}' of '${propertyOwner.path}'`);\n/**\n * Check if the first type subtype of the second type\n *\n * NOTE: Use this for contravariant and covariant check\n * See https://www.originate.com/cheat-codes-for-contravariance-and-covariance\n * See https://en.wikipedia.org/wiki/Covariance_and_contravariance_of_vectors\n */\nexport const isSubType = (type1, type2) => {\n if (type1 === type2) {\n return true;\n }\n if (type1 instanceof Unit) {\n return type1.measure === type2;\n }\n else if (type1 instanceof Measure) {\n return false;\n }\n else if (type1 instanceof Enumeration) {\n return false;\n }\n else if (type1 instanceof PrimitiveType) {\n if (!(type2 instanceof PrimitiveType)) {\n return false;\n }\n if (type2.name === PRIMITIVE_TYPE.NUMBER) {\n return (type1.name === PRIMITIVE_TYPE.INTEGER ||\n type1.name === PRIMITIVE_TYPE.FLOAT ||\n type1.name === PRIMITIVE_TYPE.DECIMAL);\n }\n if (type2.name === PRIMITIVE_TYPE.DATE) {\n return (type1.name === PRIMITIVE_TYPE.STRICTDATE ||\n type1.name === PRIMITIVE_TYPE.DATETIME ||\n type1.name === PRIMITIVE_TYPE.LATESTDATE);\n }\n }\n else if (type1 instanceof Class) {\n return (type1.path === CORE_PURE_PATH.ANY ||\n (type2 instanceof Class && getAllSuperclasses(type2).includes(type1)));\n }\n return false;\n};\n/**\n * Check if the first type supertype of the second type\n *\n * NOTE: Use this for contravariant and covariant check\n * See https://www.originate.com/cheat-codes-for-contravariance-and-covariance\n * See https://en.wikipedia.org/wiki/Covariance_and_contravariance_of_vectors\n */\nexport const isSuperType = (type1, type2) => {\n if (type1 === type2) {\n return true;\n }\n if (type1 instanceof Unit) {\n return false;\n }\n else if (type1 instanceof Measure) {\n return type2 instanceof Unit && type2.measure === type1;\n }\n else if (type1 instanceof Enumeration) {\n return false;\n }\n else if (type1 instanceof PrimitiveType) {\n if (!(type2 instanceof PrimitiveType)) {\n return false;\n }\n if (type1.name === PRIMITIVE_TYPE.NUMBER) {\n return (type2.name === PRIMITIVE_TYPE.INTEGER ||\n type2.name === PRIMITIVE_TYPE.FLOAT ||\n type2.name === PRIMITIVE_TYPE.DECIMAL);\n }\n if (type1.name === PRIMITIVE_TYPE.DATE) {\n return (type2.name === PRIMITIVE_TYPE.STRICTDATE ||\n type2.name === PRIMITIVE_TYPE.DATETIME ||\n type2.name === PRIMITIVE_TYPE.LATESTDATE);\n }\n }\n else if (type1 instanceof Class) {\n return (type2.path === CORE_PURE_PATH.ANY ||\n (type2 instanceof Class && getAllSubclasses(type2).includes(type1)));\n }\n return false;\n};\nexport const getMultiplicityDescription = (multiplicity) => {\n if (multiplicity.lowerBound === multiplicity.upperBound) {\n return `[${multiplicity.lowerBound.toString()}] - Must have exactly ${multiplicity.lowerBound.toString()} value(s)`;\n }\n else if (multiplicity.lowerBound === 0 &&\n multiplicity.upperBound === undefined) {\n return `[${MULTIPLICITY_INFINITE}] - May have many values`;\n }\n return `[${multiplicity.lowerBound}..${multiplicity.upperBound ?? MULTIPLICITY_INFINITE}] - ${multiplicity.upperBound\n ? `Must have from ${multiplicity.lowerBound} to ${multiplicity.upperBound} value(s)`\n : `Must have at least ${multiplicity.lowerBound} values(s)`}`;\n};\nexport const getMultiplicityPrettyDescription = (multiplicity) => {\n if (multiplicity === Multiplicity.ONE) {\n return `[${multiplicity.lowerBound.toString()}] - Required`;\n }\n else if (multiplicity === Multiplicity.ZERO_MANY) {\n return `[${MULTIPLICITY_INFINITE}] - List`;\n }\n else if (multiplicity === Multiplicity.ZERO_ONE) {\n return `[${multiplicity.lowerBound}..${multiplicity.upperBound ?? MULTIPLICITY_INFINITE}] - Optional`;\n }\n return `[${multiplicity.lowerBound}..${multiplicity.upperBound ?? MULTIPLICITY_INFINITE}] - ${multiplicity.upperBound\n ? `Must have from ${multiplicity.lowerBound} to ${multiplicity.upperBound} value(s)`\n : `Must have at least ${multiplicity.lowerBound} values(s)`}`;\n};\nexport const areMultiplicitiesEqual = (mul1, mul2) => mul1.upperBound === mul2.upperBound && mul1.lowerBound === mul2.lowerBound;\nexport const isElementDeprecated = (element, graph) => element.stereotypes.some((st) => st.value ===\n graph\n .getProfile(CORE_PURE_PATH.PROFILE_DOC)\n .p_stereotypes.find((s) => s.value === PURE_DEPRECATED_STEREOTYPE));\nexport const extractAnnotatedElementDocumentation = (el) => {\n let result = undefined;\n for (const taggedValue of el.taggedValues) {\n if (taggedValue.tag.ownerReference.value.path ===\n CORE_PURE_PATH.PROFILE_DOC &&\n taggedValue.tag.value.value === PURE_DOC_TAG) {\n result = taggedValue.value;\n break;\n }\n }\n return result;\n};\n/**\n * Gets the generated milestoned properties of a property owner\n */\nexport const getGeneratedMilestonedPropertiesForAssociation = (propertyOwner, property) => propertyOwner._generatedMilestonedProperties.filter((prop) => prop.name !== property.name &&\n prop.name !==\n `${property.name}${MILESTONING_VERSION_PROPERTY_SUFFIX.ALL_VERSIONS}` &&\n prop.name !==\n `${property.name}${MILESTONING_VERSION_PROPERTY_SUFFIX.ALL_VERSIONS_IN_RANGE}`);\nconst getMultiplicityString = (lowerBound, upperBound) => {\n if (lowerBound === upperBound) {\n return lowerBound.toString();\n }\n else if (lowerBound === 0 && upperBound === undefined) {\n return FUNCTION_SIGNATURE_MULTIPLICITY_INFINITE_TOKEN;\n }\n return `$${lowerBound}_${upperBound ?? 'MANY'}$`;\n};\nexport const getFunctionSignature = (func) => `_${func.parameters\n .map((p) => `${p.type.value.name}_${getMultiplicityString(p.multiplicity.lowerBound, p.multiplicity.upperBound)}_`)\n .join('_')}_${func.returnType.value.rawType.name}_${getMultiplicityString(func.returnMultiplicity.lowerBound, func.returnMultiplicity.upperBound)}_`;\nexport const getFunctionName = (func, name) => name.substring(0, name.indexOf(getFunctionSignature(func)));\nexport const getFunctionNameWithPath = (func) => func.package?.path + ELEMENT_PATH_DELIMITER + func.functionName;\nexport const buildFunctionAnalysisInfoFromConcreteFunctionDefinition = (funcs, graph) => {\n const functionInfos = funcs.map((func) => {\n const functionInfo = new FunctionAnalysisInfo();\n functionInfo.functionPath = func.path;\n functionInfo.name = func.name;\n functionInfo.functionName = func.functionName;\n functionInfo.functionPrettyName = generateFunctionPrettyName(func, {\n fullPath: true,\n spacing: false,\n });\n functionInfo.packagePath = func.package?.path ?? '';\n functionInfo.returnType = func.returnType.value.rawType.name;\n functionInfo.parameterInfoList = func.parameters.map((param) => {\n const paramInfo = new FunctionAnalysisParameterInfo();\n paramInfo.multiplicity = graph.getMultiplicity(param.multiplicity.lowerBound, param.multiplicity.upperBound);\n paramInfo.name = param.name;\n paramInfo.type = param.type.value.name;\n return paramInfo;\n });\n return functionInfo;\n });\n return functionInfos;\n};\nconst _classHasCycle = (_class, __classesIndex, options) => {\n if (__classesIndex.has(_class.path)) {\n return true;\n }\n const excludedProperties = options?.excludedPaths?.get(_class.path) ?? [];\n const properties = options?.traverseNonRequiredProperties\n ? getAllClassProperties(_class)\n : getAllClassProperties(_class).filter((property) => property.multiplicity.lowerBound);\n const complexPropertyTypes = properties\n .filter((property) => !excludedProperties.includes(property.name))\n .map((property) => property.genericType.value.rawType)\n .filter(filterByType(Class));\n if (complexPropertyTypes.length > 0) {\n // we only count classes with complex properties in the cycle\n __classesIndex.add(_class.path);\n }\n // we only check unique complex property classes; 2 same property classes on the same level do not count as a cycle\n return Boolean(Array.from(new Set(complexPropertyTypes)).find((type) => _classHasCycle(type, __classesIndex, options)));\n};\nexport const classHasCycle = (_class, options) => _classHasCycle(_class, new Set(), options);\nexport const getElementOrigin = (element, graph) => {\n if (isSystemElement(element)) {\n return 'system elements';\n }\n else if (isGeneratedElement(element)) {\n return 'generation elements';\n }\n else if (isDependencyElement(element)) {\n const name = graph.dependencyManager.getElementOrigin(element);\n if (name) {\n return `project dependency ${name}`;\n }\n }\n return '';\n};\nexport const newGenericType = (rawType, typeArguments) => {\n const genericType = new GenericType(rawType);\n genericType.typeArguments = typeArguments;\n return genericType;\n};\n//# sourceMappingURL=DomainHelper.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { CORE_HASH_STRUCTURE } from '../../../../../graph/Core_HashUtils.js';\nimport { hashArray } from '@finos/legend-shared';\nexport class Multiplicity {\n lowerBound;\n upperBound;\n constructor(lowerBound, upperBound) {\n this.lowerBound = lowerBound;\n this.upperBound = upperBound;\n }\n get hashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.MULTIPLICITY,\n this.lowerBound.toString(),\n this.upperBound?.toString() ?? '',\n ]);\n }\n // common multiplicities\n static ZERO = new Multiplicity(0, 0);\n static ZERO_ONE = new Multiplicity(0, 1);\n static ZERO_MANY = new Multiplicity(0, undefined);\n static ONE = new Multiplicity(1, 1);\n static ONE_MANY = new Multiplicity(1, undefined);\n}\n//# sourceMappingURL=Multiplicity.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { hashArray, uuid } from '@finos/legend-shared';\nimport { CORE_HASH_STRUCTURE } from '../../../../../graph/Core_HashUtils.js';\nexport class TaggedValue {\n _UUID = uuid();\n tag;\n value;\n constructor(tag, value) {\n this.tag = tag;\n this.value = value;\n }\n get hashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.TAGGED_VALUE,\n this.tag.pointerHashCode,\n this.value,\n ]);\n }\n}\n//# sourceMappingURL=TaggedValue.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { CORE_HASH_STRUCTURE } from '../../../../../graph/Core_HashUtils.js';\nimport { hashValue } from '@finos/legend-shared';\nimport { PackageableElementExplicitReference, } from '../PackageableElementReference.js';\nimport { ReferenceWithOwner } from '../../Reference.js';\nexport class TagReference extends ReferenceWithOwner {\n ownerReference;\n value;\n constructor(ownerReference, value) {\n super(ownerReference);\n this.ownerReference = ownerReference;\n this.value = value;\n }\n get pointerHashCode() {\n return [\n CORE_HASH_STRUCTURE.TAG_POINTER,\n this.value.value,\n this.ownerReference.valueForSerialization ?? '',\n ]\n .map(hashValue)\n .join(',');\n }\n}\nexport class TagExplicitReference extends TagReference {\n ownerReference;\n constructor(value) {\n const ownerReference = PackageableElementExplicitReference.create(value._OWNER);\n super(ownerReference, value);\n this.ownerReference = ownerReference;\n }\n static create(value) {\n return new TagExplicitReference(value);\n }\n}\nexport class TagImplicitReference extends TagReference {\n ownerReference;\n constructor(ownerReference, value) {\n super(ownerReference, value);\n this.ownerReference = ownerReference;\n }\n static create(ownerReference, value) {\n return new TagImplicitReference(ownerReference, value);\n }\n}\n//# sourceMappingURL=TagReference.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { CORE_HASH_STRUCTURE } from '../../../../../graph/Core_HashUtils.js';\nimport { hashValue } from '@finos/legend-shared';\nimport { PackageableElementExplicitReference, } from '../PackageableElementReference.js';\nimport { ReferenceWithOwner } from '../../Reference.js';\nexport class StereotypeReference extends ReferenceWithOwner {\n ownerReference;\n value;\n constructor(ownerReference, value) {\n super(ownerReference);\n this.ownerReference = ownerReference;\n this.value = value;\n }\n get pointerHashCode() {\n return [\n CORE_HASH_STRUCTURE.STEREOTYPE_POINTER,\n this.value.value,\n this.ownerReference.valueForSerialization ?? '',\n ]\n .map(hashValue)\n .join(',');\n }\n}\nexport class StereotypeExplicitReference extends StereotypeReference {\n ownerReference;\n constructor(value) {\n const ownerReference = PackageableElementExplicitReference.create(value._OWNER);\n super(ownerReference, value);\n this.ownerReference = ownerReference;\n }\n static create(value) {\n return new StereotypeExplicitReference(value);\n }\n}\nexport class StereotypeImplicitReference extends StereotypeReference {\n ownerReference;\n constructor(ownerReference, value) {\n super(ownerReference, value);\n this.ownerReference = ownerReference;\n }\n static create(ownerReference, value) {\n return new StereotypeImplicitReference(ownerReference, value);\n }\n}\n//# sourceMappingURL=StereotypeReference.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { PackageableElementExplicitReference, } from '../PackageableElementReference.js';\nimport { ReferenceWithOwner } from '../../Reference.js';\nexport class GenericTypeReference extends ReferenceWithOwner {\n ownerReference;\n value;\n constructor(ownerReference, value) {\n super(ownerReference);\n this.ownerReference = ownerReference;\n this.value = value;\n }\n}\nexport class GenericTypeExplicitReference extends GenericTypeReference {\n ownerReference;\n constructor(value) {\n const ownerReference = PackageableElementExplicitReference.create(value.rawType);\n super(ownerReference, value);\n this.ownerReference = ownerReference;\n }\n static create(value) {\n return new GenericTypeExplicitReference(value);\n }\n}\nexport class GenericTypeImplicitReference extends GenericTypeReference {\n ownerReference;\n constructor(ownerReference, value) {\n super(ownerReference, value);\n this.ownerReference = ownerReference;\n }\n static create(ownerReference, value) {\n return new GenericTypeImplicitReference(ownerReference, value);\n }\n}\n//# sourceMappingURL=GenericTypeReference.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { UnsupportedOperationError } from '@finos/legend-shared';\nimport { PackageableElement, } from '../PackageableElement.js';\nexport class Function extends PackageableElement {\n functionName;\n constructor(name) {\n super(name);\n this.functionName = name;\n }\n}\nexport class FunctionDefinition extends Function {\n}\nexport class NativeFunctiion extends Function {\n accept_PackageableElementVisitor(visitor) {\n throw new UnsupportedOperationError();\n }\n}\nexport class LambdaFunction extends FunctionDefinition {\n accept_PackageableElementVisitor(visitor) {\n throw new UnsupportedOperationError();\n }\n}\n//# sourceMappingURL=Function.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { Type } from '../domain/Type.js';\nimport { Function } from '../domain/Function.js';\nimport { Multiplicity } from '../domain/Multiplicity.js';\nimport { hashArray } from '@finos/legend-shared';\nimport { CORE_HASH_STRUCTURE } from '../../../../Core_HashUtils.js';\nexport class RelationColumn extends Function {\n genericType;\n multiplicity = Multiplicity.ONE;\n constructor(name, type) {\n super(name);\n this.genericType = type;\n }\n accept_PackageableElementVisitor(visitor) {\n throw new Error('Method not implemented.');\n }\n get hashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.RELATION_TYPE,\n this.name,\n this.genericType.value,\n ]);\n }\n}\nexport class RelationType extends Type {\n static ID = 'RelationType';\n columns = [];\n accept_PackageableElementVisitor(visitor) {\n throw new Error('Method not implemented.');\n }\n get hashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.RELATION_TYPE,\n hashArray(this.columns),\n ]);\n }\n}\n//# sourceMappingURL=RelationType.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { hashArray, uuid } from '@finos/legend-shared';\nimport { RelationType } from '../relation/RelationType.js';\nexport class GenericType {\n _UUID = uuid();\n rawType;\n typeArguments;\n typeVariableValues;\n constructor(rawType) {\n this.rawType = rawType;\n }\n get hashCode() {\n return hashArray([\n this.rawType instanceof RelationType\n ? this.rawType.hashCode\n : this.rawType.path,\n hashArray(this.typeArguments?.map((e) => e.value) ?? []),\n hashArray(this.typeVariableValues ?? []),\n ]);\n }\n}\n//# sourceMappingURL=GenericType.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { hashArray, uuid } from '@finos/legend-shared';\nimport { CORE_HASH_STRUCTURE } from '../../../../../graph/Core_HashUtils.js';\nexport class Property {\n _UUID = uuid();\n _OWNER;\n name;\n multiplicity;\n genericType;\n aggregation;\n defaultValue;\n stereotypes = [];\n taggedValues = [];\n constructor(name, multiplicity, genericType, owner) {\n this.name = name;\n this.multiplicity = multiplicity;\n this.genericType = genericType;\n this._OWNER = owner;\n }\n get hashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.PROPERTY,\n this.name,\n this.multiplicity,\n this.genericType.ownerReference.valueForSerialization ?? '',\n this.aggregation ?? '',\n this.defaultValue ?? '',\n hashArray(this.stereotypes.map((val) => val.pointerHashCode)),\n hashArray(this.taggedValues),\n ]);\n }\n}\n//# sourceMappingURL=Property.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport var AggregationKind;\n(function (AggregationKind) {\n AggregationKind[\"NONE\"] = \"NONE\";\n AggregationKind[\"SHARED\"] = \"SHARED\";\n AggregationKind[\"COMPOSITE\"] = \"COMPOSITE\";\n})(AggregationKind || (AggregationKind = {}));\n//# sourceMappingURL=AggregationKind.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { hashArray, uuid, } from '@finos/legend-shared';\nimport { PackageableElement, } from '../packageableElements/PackageableElement.js';\nimport { CORE_HASH_STRUCTURE, hashObjectWithoutSourceInformation, } from '../../../Core_HashUtils.js';\nimport { AnnotatedElement } from '../packageableElements/domain/AnnotatedElement.js';\nexport class AccessPoint {\n id;\n title;\n description;\n constructor(id) {\n this.id = id;\n }\n get hashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.DATA_PRODUCT_ACCESS_POINT,\n this.id,\n this.title ?? '',\n this.description ?? '',\n ]);\n }\n}\nexport class FunctionAccessPoint extends AccessPoint {\n query;\n constructor(id, query) {\n super(id);\n this.query = query;\n }\n get hashCode() {\n return hashArray([\n super.hashCode,\n CORE_HASH_STRUCTURE.FUNCTION_ACCESS_POINT,\n this.query,\n ]);\n }\n}\nexport var LakehouseTargetEnv;\n(function (LakehouseTargetEnv) {\n LakehouseTargetEnv[\"Snowflake\"] = \"Snowflake\";\n LakehouseTargetEnv[\"Databricks\"] = \"Databricks\";\n LakehouseTargetEnv[\"BigQuery\"] = \"BigQuery\";\n LakehouseTargetEnv[\"DuckDb\"] = \"DuckDb\";\n})(LakehouseTargetEnv || (LakehouseTargetEnv = {}));\nexport class LakehouseAccessPoint extends AccessPoint {\n targetEnvironment;\n classification;\n func;\n reproducible;\n constructor(id, targetEnv, func) {\n super(id);\n this.targetEnvironment = targetEnv;\n this.func = func;\n }\n get hashCode() {\n return hashArray([\n super.hashCode,\n CORE_HASH_STRUCTURE.LAKEHOUSE_ACCESS_POINT,\n this.targetEnvironment,\n this.classification ?? '',\n this.func,\n this.reproducible ?? '',\n ]);\n }\n}\nexport class UnknownAccessPoint extends AccessPoint {\n content;\n get hashCode() {\n return hashArray([\n super.hashCode,\n CORE_HASH_STRUCTURE.UNKNOWN_ACCESS_POINT,\n hashObjectWithoutSourceInformation(this.content),\n ]);\n }\n}\nexport class DataProductRuntimeInfo {\n id;\n description;\n runtime;\n get hashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.DATA_PRODUCT_RUNTIME_INFO,\n this.id,\n this.description ?? '',\n this.runtime.valueForSerialization ?? '',\n ]);\n }\n}\nexport class DataProductElementScope {\n exclude;\n element;\n get hashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.DATA_PRODUCT_ELEMENT_SCOPE,\n this.exclude ?? '',\n this.element.valueForSerialization ?? '',\n ]);\n }\n}\nexport class DataProductDiagram {\n title;\n description;\n diagram;\n get hashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.DATA_PRODUCT_DIAGRAM,\n this.title,\n this.description ?? '',\n this.diagram,\n ]);\n }\n}\nexport class AccessPointGroup extends AnnotatedElement {\n id;\n title;\n description;\n accessPoints = [];\n get hashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.DATA_PRODUCT_ACCESS_POINT_GROUP,\n this.id,\n this.title ?? '',\n this.description ?? '',\n hashArray(this.accessPoints),\n hashArray(this.stereotypes.map((val) => val.pointerHashCode)),\n ]);\n }\n}\nexport class ModelAccessPointGroup extends AccessPointGroup {\n mapping;\n featuredElements = [];\n diagrams = [];\n get hashCode() {\n return hashArray([\n super.hashCode,\n CORE_HASH_STRUCTURE.DATA_PRODUCT_MODEL_ACCESS_POINT_GROUP,\n this.mapping.valueForSerialization ?? '',\n hashArray(this.featuredElements),\n hashArray(this.diagrams),\n ]);\n }\n}\nexport class Email {\n title;\n address;\n constructor(address, title) {\n this.address = address;\n this.title = title;\n }\n get hashCode() {\n return hashArray([CORE_HASH_STRUCTURE.EMAIL, this.title, this.address]);\n }\n}\nexport class DataProductLink {\n label;\n url;\n constructor(url, label) {\n this.url = url;\n this.label = label;\n }\n get hashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.DATA_PRODUCT_LINK,\n this.label ?? '',\n this.url,\n ]);\n }\n}\nexport class SupportInfo {\n documentation;\n website;\n faqUrl;\n supportUrl;\n emails = [];\n expertise;\n get hashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.SUPPORT_INFO,\n this.documentation ?? '',\n this.website ?? '',\n this.faqUrl ?? '',\n this.supportUrl ?? '',\n hashArray(this.emails),\n hashArray(this.expertise ?? []),\n ]);\n }\n}\nexport var DataProduct_DeliveryFrequency;\n(function (DataProduct_DeliveryFrequency) {\n DataProduct_DeliveryFrequency[\"DAILY\"] = \"DAILY\";\n DataProduct_DeliveryFrequency[\"WEEKLY\"] = \"WEEKLY\";\n DataProduct_DeliveryFrequency[\"MONTHLY\"] = \"MONTHLY\";\n DataProduct_DeliveryFrequency[\"QUARTERLY\"] = \"QUARTERLY\";\n DataProduct_DeliveryFrequency[\"YEARLY\"] = \"YEARLY\";\n DataProduct_DeliveryFrequency[\"ON_DEMAND\"] = \"ON_DEMAND\";\n DataProduct_DeliveryFrequency[\"INTRA_DAY\"] = \"INTRADAY\";\n})(DataProduct_DeliveryFrequency || (DataProduct_DeliveryFrequency = {}));\nexport var DataProduct_Region;\n(function (DataProduct_Region) {\n DataProduct_Region[\"APAC\"] = \"APAC\";\n DataProduct_Region[\"EMEA\"] = \"EMEA\";\n DataProduct_Region[\"LAMR\"] = \"LAMR\";\n DataProduct_Region[\"NAMR\"] = \"NAMR\";\n})(DataProduct_Region || (DataProduct_Region = {}));\nexport class DataProductIcon {\n}\nexport class DataProductLibraryIcon extends DataProductIcon {\n libraryId;\n iconId;\n constructor(libraryId, iconId) {\n super();\n this.libraryId = libraryId;\n this.iconId = iconId;\n }\n get hashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.DATA_PRODUCT_ICON_LIBRARY,\n this.libraryId,\n this.iconId,\n ]);\n }\n}\nexport class DataProductEmbeddedImageIcon extends DataProductIcon {\n imageUrl;\n constructor(imageUrl) {\n super();\n this.imageUrl = imageUrl;\n }\n get hashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.DATA_PRODUCT_ICON_EMBEDDED_IMAGE,\n this.imageUrl,\n ]);\n }\n}\n// handle incoming icons not yet modeled\nexport class UnknownDataProductIcon extends DataProductIcon {\n content;\n constructor(content) {\n super();\n this.content = content;\n }\n get hashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.INTERNAL__UNKNOWN_DATA_PRODUCT_ICON,\n hashObjectWithoutSourceInformation(this.content),\n ]);\n }\n}\nexport class DataProductType {\n get hashCode() {\n return hashArray([CORE_HASH_STRUCTURE.DATA_PRODUCT_TYPE]);\n }\n}\nexport class InternalDataProductType extends DataProductType {\n}\nexport class ExternalDataProductType extends DataProductType {\n link;\n get hashCode() {\n return hashArray([CORE_HASH_STRUCTURE.DATA_PRODUCT_TYPE, this.link]);\n }\n}\nexport class Expertise {\n uuid = uuid();\n description;\n expertIds;\n get hashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.DATA_PRODUCT_EXPERTISE,\n this.description ?? '',\n hashArray(this.expertIds ?? []),\n ]);\n }\n}\nexport class DataProductOperationalMetadata {\n coverageRegions;\n updateFrequency;\n get hashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.DATA_PRODUCT_OPERATIONAL_METADATA,\n hashArray(this.coverageRegions ?? []),\n this.updateFrequency ?? '',\n ]);\n }\n}\nexport class DataProduct extends PackageableElement {\n title;\n description;\n icon;\n accessPointGroups = [];\n supportInfo;\n type;\n sampleValues;\n operationalMetadata;\n accept_PackageableElementVisitor(visitor) {\n return visitor.visit_DataProduct(this);\n }\n get _elementHashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.DATA_PRODUCT,\n this.title ?? '',\n this.description ?? '',\n this.icon ?? '',\n hashArray(this.accessPointGroups),\n this.supportInfo ?? '',\n this.type ?? '',\n hashArray(this.stereotypes.map((val) => val.pointerHashCode)),\n hashArray(this.taggedValues),\n hashArray(this.sampleValues ?? []),\n this.operationalMetadata ?? '',\n ]);\n }\n}\n//# sourceMappingURL=DataProduct.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { hashArray, uuid } from '@finos/legend-shared';\nimport { CORE_HASH_STRUCTURE, hashRawLambda, } from '../../../../../graph/Core_HashUtils.js';\nexport class DerivedProperty {\n _UUID = uuid();\n _OWNER;\n name;\n genericType;\n multiplicity;\n stereotypes = [];\n taggedValues = [];\n /**\n * Studio does not process value specification, they are left in raw JSON form\n *\n * @discrepancy model\n */\n body;\n /**\n * Studio does not process value specification, they are left in raw JSON form\n *\n * @discrepancy model\n */\n parameters;\n defaultValue = undefined;\n constructor(name, multiplicity, genericType, owner) {\n this.name = name;\n this.multiplicity = multiplicity;\n this.genericType = genericType;\n this._OWNER = owner;\n }\n get hashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.DERIVED_PROPERTY,\n this.name,\n this.multiplicity,\n this.genericType.ownerReference.valueForSerialization ?? '',\n hashArray(this.stereotypes.map((val) => val.pointerHashCode)),\n hashArray(this.taggedValues),\n hashRawLambda(this.parameters, this.body),\n ]);\n }\n}\n//# sourceMappingURL=DerivedProperty.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { Type } from './Type.js';\nexport class DataType extends Type {\n}\n//# sourceMappingURL=DataType.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { DataType } from './DataType.js';\nimport { PRECISE_PRIMITIVE_TYPE, PRIMITIVE_TYPE, } from '../../../../MetaModelConst.js';\nimport { extractElementNameFromPath } from '../../../../MetaModelUtils.js';\nexport class PrimitiveType extends DataType {\n accept_PackageableElementVisitor(visitor) {\n return visitor.visit_PrimitiveType(this);\n }\n static STRING = new PrimitiveType(PRIMITIVE_TYPE.STRING);\n static BOOLEAN = new PrimitiveType(PRIMITIVE_TYPE.BOOLEAN);\n static BINARY = new PrimitiveType(PRIMITIVE_TYPE.BINARY);\n static NUMBER = new PrimitiveType(PRIMITIVE_TYPE.NUMBER);\n static INTEGER = new PrimitiveType(PRIMITIVE_TYPE.INTEGER);\n static FLOAT = new PrimitiveType(PRIMITIVE_TYPE.FLOAT);\n static DECIMAL = new PrimitiveType(PRIMITIVE_TYPE.DECIMAL);\n static DATE = new PrimitiveType(PRIMITIVE_TYPE.DATE);\n static STRICTDATE = new PrimitiveType(PRIMITIVE_TYPE.STRICTDATE);\n static DATETIME = new PrimitiveType(PRIMITIVE_TYPE.DATETIME);\n static STRICTTIME = new PrimitiveType(PRIMITIVE_TYPE.STRICTTIME);\n static LATESTDATE = new PrimitiveType(PRIMITIVE_TYPE.LATESTDATE);\n static BYTE = new PrimitiveType(PRIMITIVE_TYPE.BYTE);\n}\nexport class PrecisePrimitiveType extends DataType {\n static VARCHAR = new PrecisePrimitiveType(extractElementNameFromPath(PRECISE_PRIMITIVE_TYPE.VARCHAR));\n static INT = new PrecisePrimitiveType(extractElementNameFromPath(PRECISE_PRIMITIVE_TYPE.INT));\n static TINY_INT = new PrecisePrimitiveType(extractElementNameFromPath(PRECISE_PRIMITIVE_TYPE.TINY_INT));\n static U_TINY_INT = new PrecisePrimitiveType(extractElementNameFromPath(PRECISE_PRIMITIVE_TYPE.U_TINY_INT));\n static SMALL_INT = new PrecisePrimitiveType(extractElementNameFromPath(PRECISE_PRIMITIVE_TYPE.SMALL_INT));\n static U_SMALL_INT = new PrecisePrimitiveType(extractElementNameFromPath(PRECISE_PRIMITIVE_TYPE.U_SMALL_INT));\n static U_INT = new PrecisePrimitiveType(extractElementNameFromPath(PRECISE_PRIMITIVE_TYPE.U_INT));\n static BIG_INT = new PrecisePrimitiveType(extractElementNameFromPath(PRECISE_PRIMITIVE_TYPE.BIG_INT));\n static U_BIG_INT = new PrecisePrimitiveType(extractElementNameFromPath(PRECISE_PRIMITIVE_TYPE.U_BIG_INT));\n static FLOAT = new PrecisePrimitiveType(extractElementNameFromPath(PRECISE_PRIMITIVE_TYPE.FLOAT));\n static DOUBLE = new PrecisePrimitiveType(extractElementNameFromPath(PRECISE_PRIMITIVE_TYPE.DOUBLE));\n static NUMERIC = new PrecisePrimitiveType(extractElementNameFromPath(PRECISE_PRIMITIVE_TYPE.NUMERIC));\n static TIMESTAMP = new PrecisePrimitiveType(extractElementNameFromPath(PRECISE_PRIMITIVE_TYPE.TIMESTAMP));\n accept_PackageableElementVisitor(visitor) {\n throw new Error('Method not implemented.');\n }\n}\nexport const getPrimitiveTypeInstanceFromEnum = (type) => {\n switch (type) {\n case PRIMITIVE_TYPE.STRING:\n return PrimitiveType.STRING;\n case PRIMITIVE_TYPE.BOOLEAN:\n return PrimitiveType.BOOLEAN;\n case PRIMITIVE_TYPE.BINARY:\n return PrimitiveType.BINARY;\n case PRIMITIVE_TYPE.NUMBER:\n return PrimitiveType.NUMBER;\n case PRIMITIVE_TYPE.INTEGER:\n return PrimitiveType.INTEGER;\n case PRIMITIVE_TYPE.FLOAT:\n return PrimitiveType.FLOAT;\n case PRIMITIVE_TYPE.DECIMAL:\n return PrimitiveType.DECIMAL;\n case PRIMITIVE_TYPE.DATE:\n return PrimitiveType.DATE;\n case PRIMITIVE_TYPE.STRICTDATE:\n return PrimitiveType.STRICTDATE;\n case PRIMITIVE_TYPE.DATETIME:\n return PrimitiveType.DATETIME;\n case PRIMITIVE_TYPE.STRICTTIME:\n return PrimitiveType.STRICTTIME;\n case PRIMITIVE_TYPE.LATESTDATE:\n return PrimitiveType.LATESTDATE;\n case PRIMITIVE_TYPE.BYTE:\n return PrimitiveType.BYTE;\n default:\n throw new Error(`Unable to get PrimitiveType class for type ${type}`);\n }\n};\n//# sourceMappingURL=PrimitiveType.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { hashArray } from '@finos/legend-shared';\nimport { CORE_HASH_STRUCTURE } from '../../../../../graph/Core_HashUtils.js';\nimport { DataType } from './DataType.js';\nexport class Enumeration extends DataType {\n values = [];\n get _elementHashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.ENUMERATION,\n this.path,\n hashArray(this.values),\n hashArray(this.stereotypes.map((stereotype) => stereotype.pointerHashCode)),\n hashArray(this.taggedValues),\n ]);\n }\n accept_PackageableElementVisitor(visitor) {\n return visitor.visit_Enumeration(this);\n }\n}\n//# sourceMappingURL=Enumeration.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { hashArray, guaranteeType, } from '@finos/legend-shared';\nimport { CORE_HASH_STRUCTURE } from '../../../../../graph/Core_HashUtils.js';\nimport { PackageableElement, } from '../PackageableElement.js';\nimport { Property } from './Property.js';\nimport { Class } from './Class.js';\nimport { Multiplicity } from './Multiplicity.js';\nimport { GenericTypeExplicitReference } from './GenericTypeReference.js';\nimport { GenericType } from './GenericType.js';\n/**\n * Assocation needs exactly 2 properties (for 2 classes, not enumeration, not primitive), e.g.\n * employees: Person[*]\n * firm: Firm[1]\n * -> inside of Person, we will see a property firm: Firm[1] and vice versa\n *\n * NOTE: This is a very important note on the usage of `Association`. Association allows a very\n * nice trick that is without modifying some classes that you don't own, you can `create` property\n * on them by using association, but this can also be misused and accidentally create tangled cycles\n * of dependency between project. Imagine we create association between classes in project and system\n * or project dependencies. As such, in the app, we have to make it very clear that we prohibits this.\n *\n * TODO: We probably should change backend to do compilation check whether association refers\n * to a class from a different projects. Here, while building the graph, we can make use of the\n * root package to verify this in the UI and make this a validation error in a way.\n * See https://github.com/finos/legend-studio/issues/282\n */\nexport class Association extends PackageableElement {\n /**\n * To store the abstract properties generated while processing the milestoning properties. The properties\n * generated are `allVersions`, `allVersionsInRange` and derived property with date parameter.\n *\n * TODO: process new property added while editing the graph\n */\n _generatedMilestonedProperties = [];\n properties;\n derivedProperties = [];\n constructor(name) {\n super(name);\n // NOTE: we might want to revisit this decision to initialize to association properties to stubs\n const properties = [\n new Property('', Multiplicity.ONE, GenericTypeExplicitReference.create(new GenericType(new Class(''))), new Class('')),\n new Property('', Multiplicity.ONE, GenericTypeExplicitReference.create(new GenericType(new Class(''))), new Class('')),\n ];\n properties[0]._OWNER = this;\n properties[1]._OWNER = this;\n this.properties = properties;\n }\n /**\n * Make sure we clean up the properties added to classes through\n * this association\n *\n * @internal model logic\n */\n dispose() {\n super.dispose();\n // cleanup property classes' properties which were added through this association\n const [propertyA, propertyB] = this.properties;\n if (propertyA.genericType.value.rawType instanceof Class &&\n propertyB.genericType.value.rawType instanceof Class) {\n const classA = guaranteeType(propertyA.genericType.value.rawType, Class);\n const classB = guaranteeType(propertyB.genericType.value.rawType, Class);\n classA.propertiesFromAssociations =\n classA.propertiesFromAssociations.filter((property) => property !== propertyB);\n classB.propertiesFromAssociations =\n classB.propertiesFromAssociations.filter((property) => property !== propertyA);\n }\n }\n get _elementHashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.ASSOCIATION,\n this.path,\n hashArray(this.properties),\n hashArray(this.derivedProperties),\n hashArray(this.stereotypes.map((val) => val.pointerHashCode)),\n hashArray(this.taggedValues),\n ]);\n }\n accept_PackageableElementVisitor(visitor) {\n return visitor.visit_Association(this);\n }\n}\n//# sourceMappingURL=Association.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { CORE_HASH_STRUCTURE } from '../../../../../graph/Core_HashUtils.js';\nimport { hashArray } from '@finos/legend-shared';\nimport { PackageableElement, } from '../PackageableElement.js';\nexport class Mapping extends PackageableElement {\n includes = [];\n classMappings = [];\n enumerationMappings = [];\n associationMappings = [];\n test = [];\n tests = [];\n get _elementHashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.MAPPING,\n this.path,\n hashArray(this.classMappings),\n hashArray(this.enumerationMappings),\n hashArray(this.associationMappings),\n hashArray(this.test),\n hashArray(this.includes),\n hashArray(this.tests),\n ]);\n }\n accept_PackageableElementVisitor(visitor) {\n return visitor.visit_Mapping(this);\n }\n}\n//# sourceMappingURL=Mapping.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { hashArray } from '@finos/legend-shared';\nimport { CORE_HASH_STRUCTURE } from '../../../../../graph/Core_HashUtils.js';\nimport { PackageableElement, } from '../PackageableElement.js';\nexport class Profile extends PackageableElement {\n p_stereotypes = [];\n p_tags = [];\n get _elementHashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.PROFILE,\n this.path,\n hashArray(this.p_stereotypes.map((st) => st.value)),\n hashArray(this.p_tags.map((st) => st.value)),\n ]);\n }\n accept_PackageableElementVisitor(visitor) {\n return visitor.visit_Profile(this);\n }\n}\n//# sourceMappingURL=Profile.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { hashArray, uniq } from '@finos/legend-shared';\nimport { CORE_HASH_STRUCTURE } from '../../../../../graph/Core_HashUtils.js';\nimport { PackageableElement, } from '../PackageableElement.js';\nexport const DEFAULT_SERVICE_PATTERN = '/';\nexport class Service extends PackageableElement {\n pattern = '/';\n owners = [];\n ownership;\n documentation = '';\n autoActivateUpdates = true;\n execution;\n test;\n tests = [];\n postValidations = [];\n get patternParameters() {\n return uniq((this.pattern.match(/\\{\\w+\\}/gu) ?? []).map((parameter) => parameter.substring(1, parameter.length - 1)));\n }\n get _elementHashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.SERVICE,\n hashArray(this.stereotypes.map((stereotype) => stereotype.pointerHashCode)),\n hashArray(this.taggedValues),\n this.path,\n this.pattern,\n hashArray(this.owners),\n this.ownership,\n this.documentation,\n this.autoActivateUpdates.toString(),\n this.execution,\n this.test ?? '',\n hashArray(this.tests),\n hashArray(this.postValidations),\n hashArray(this.taggedValues),\n hashArray(this.stereotypes.map((val) => val.pointerHashCode)),\n ]);\n }\n accept_PackageableElementVisitor(visitor) {\n return visitor.visit_Service(this);\n }\n}\n//# sourceMappingURL=Service.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { hashArray } from '@finos/legend-shared';\nimport { CORE_HASH_STRUCTURE, hashRawLambda, } from '../../../../Core_HashUtils.js';\nimport { FunctionDefinition } from '../domain/Function.js';\nexport class ConcreteFunctionDefinition extends FunctionDefinition {\n returnType;\n returnMultiplicity;\n /**\n * Studio does not process value specification, they are left in raw JSON form\n *\n * @discrepancy model\n */\n parameters = [];\n /**\n * Studio does not process value specification, they are left in raw JSON form\n *\n * @discrepancy model\n */\n expressionSequence = [];\n tests = [];\n constructor(name, returnType, returnMultiplicity) {\n super(name);\n this.returnType = returnType;\n this.returnMultiplicity = returnMultiplicity;\n }\n get _elementHashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.FUNCTION,\n this.path,\n hashArray(this.parameters),\n this.returnType.ownerReference.valueForSerialization ?? '',\n this.returnType.value.typeArguments?.length &&\n this.returnType.value.typeVariableValues?.length\n ? this.returnType.value\n : '',\n hashArray(this.taggedValues),\n hashArray(this.stereotypes.map((val) => val.pointerHashCode)),\n hashRawLambda(undefined, this.expressionSequence),\n this.tests.length ? hashArray(this.tests) : '',\n ]);\n }\n accept_PackageableElementVisitor(visitor) {\n return visitor.visit_ConcreteFunctionDefinition(this);\n }\n}\n//# sourceMappingURL=ConcreteFunctionDefinition.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { PackageableElement } from '../PackageableElement.js';\nexport class Store extends PackageableElement {\n includes = [];\n}\n//# sourceMappingURL=Store.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { hashArray } from '@finos/legend-shared';\nimport { CORE_HASH_STRUCTURE } from '../../../../../../../graph/Core_HashUtils.js';\nimport { Store } from '../../Store.js';\nexport class FlatData extends Store {\n sections = [];\n get _elementHashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.FLAT_DATA,\n this.path,\n hashArray(this.includes.map((include) => include.valueForSerialization ?? '')),\n hashArray(this.sections),\n ]);\n }\n accept_PackageableElementVisitor(visitor) {\n return visitor.visit_FlatData(this);\n }\n}\n//# sourceMappingURL=FlatData.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { hashArray } from '@finos/legend-shared';\nimport { CORE_HASH_STRUCTURE } from '../../../../../graph/Core_HashUtils.js';\nimport { PackageableElement, } from '../PackageableElement.js';\nexport class PackageableRuntime extends PackageableElement {\n runtimeValue;\n get _elementHashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.PACKAGEABLE_RUNTIME,\n this.path,\n this.runtimeValue,\n ]);\n }\n accept_PackageableElementVisitor(visitor) {\n return visitor.visit_PackageableRuntime(this);\n }\n}\n//# sourceMappingURL=PackageableRuntime.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { hashArray } from '@finos/legend-shared';\nimport { CORE_HASH_STRUCTURE } from '../../../../../graph/Core_HashUtils.js';\nimport { PackageableElement, } from '../PackageableElement.js';\nexport class PackageableConnection extends PackageableElement {\n connectionValue;\n get _elementHashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.PACKAGEABLE_CONNECTION,\n this.path,\n this.connectionValue,\n ]);\n }\n accept_PackageableElementVisitor(visitor) {\n return visitor.visit_PackageableConnection(this);\n }\n}\n//# sourceMappingURL=PackageableConnection.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { PackageableElement } from '../PackageableElement.js';\nexport class AbstractGenerationSpecification extends PackageableElement {\n}\n//# sourceMappingURL=AbstractGenerationSpecification.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { hashArray } from '@finos/legend-shared';\nimport { CORE_HASH_STRUCTURE } from '../../../../../graph/Core_HashUtils.js';\nimport { PackageableElementReference } from '../PackageableElementReference.js';\nimport { AbstractGenerationSpecification } from '../generationSpecification/AbstractGenerationSpecification.js';\nexport class FileGenerationSpecification extends AbstractGenerationSpecification {\n type;\n generationOutputPath;\n scopeElements = [];\n configurationProperties = [];\n get _elementHashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.FILE_GENERATION,\n this.path,\n this.type,\n this.generationOutputPath ?? '',\n hashArray(this.scopeElements.map((element) => element instanceof PackageableElementReference\n ? (element.valueForSerialization ?? '')\n : element)),\n hashArray(this.configurationProperties),\n ]);\n }\n accept_PackageableElementVisitor(visitor) {\n return visitor.visit_FileGenerationSpecification(this);\n }\n}\n//# sourceMappingURL=FileGenerationSpecification.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { CORE_HASH_STRUCTURE, hashElementPointer, } from '../../../../../graph/Core_HashUtils.js';\nimport { hashArray } from '@finos/legend-shared';\nimport { PackageableElement, } from '../PackageableElement.js';\nimport { PackageableElementPointerType } from '../../../../MetaModelConst.js';\n// NOTE: As of now the tree only supports a linear order of generation. This is because the only use case is linear,\n// but the shape has been left as a tree to support 'branching' off in the future.\nexport class GenerationTreeNode {\n generationElement;\n id;\n constructor(generationElement, id) {\n this.generationElement = generationElement;\n this.id = id ?? generationElement.value.path;\n }\n get hashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.GENERATION_TREE_NODE,\n this.generationElement.valueForSerialization ?? '',\n this.id,\n ]);\n }\n}\nexport class GenerationSpecification extends PackageableElement {\n generationNodes = [];\n fileGenerations = [];\n findGenerationElementById(id) {\n return this.generationNodes.find((node) => node.id === id)\n ?.generationElement.value;\n }\n get _elementHashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.GENERATION_TREE,\n this.path,\n hashArray(this.generationNodes),\n hashArray(this.fileGenerations.map((fileGeneration) => hashElementPointer(PackageableElementPointerType.FILE_GENERATION, fileGeneration.valueForSerialization ?? ''))),\n ]);\n }\n accept_PackageableElementVisitor(visitor) {\n return visitor.visit_GenerationSpecification(this);\n }\n}\n//# sourceMappingURL=GenerationSpecification.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { hashArray, UnsupportedOperationError, } from '@finos/legend-shared';\nimport { CORE_HASH_STRUCTURE } from '../../../../../graph/Core_HashUtils.js';\nimport { Type } from './Type.js';\nimport { DataType } from './DataType.js';\nexport class Unit extends DataType {\n measure;\n /**\n * Studio does not process value specification, they are left in raw JSON form\n *\n * @discrepancy model\n */\n conversionFunction;\n constructor(name, measure, conversionFunction) {\n super(name);\n this.measure = measure;\n this.conversionFunction = conversionFunction;\n }\n get hashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.UNIT,\n this.measure.path,\n this.conversionFunction ?? '',\n ]);\n }\n accept_PackageableElementVisitor(visitor) {\n throw new UnsupportedOperationError();\n }\n}\nexport class Measure extends Type {\n canonicalUnit;\n nonCanonicalUnits = [];\n get _elementHashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.MEASURE,\n this.path,\n this.canonicalUnit ?? '',\n hashArray(this.nonCanonicalUnits),\n ]);\n }\n accept_PackageableElementVisitor(visitor) {\n return visitor.visit_Measure(this);\n }\n}\n//# sourceMappingURL=Measure.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { hashArray } from '@finos/legend-shared';\nimport { CORE_HASH_STRUCTURE } from '../../../../../../../graph/Core_HashUtils.js';\nimport { Store } from '../../Store.js';\nexport class Database extends Store {\n schemas = [];\n joins = [];\n filters = [];\n includedStoreSpecifications = [];\n get _elementHashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.DATABASE,\n this.path,\n hashArray(this.includes.map((include) => include.valueForSerialization ?? '')),\n hashArray(this.schemas),\n hashArray(this.joins),\n hashArray(this.filters),\n hashArray(this.stereotypes.map((val) => val.pointerHashCode)),\n hashArray(this.taggedValues),\n hashArray(this.includedStoreSpecifications),\n ]);\n }\n accept_PackageableElementVisitor(visitor) {\n return visitor.visit_Database(this);\n }\n}\nexport class INTERNAL__LakehouseGeneratedDatabase extends Database {\n generatorElement;\n OWNER;\n constructor(generatorElement, owner) {\n super(owner.name);\n this.generatorElement = generatorElement;\n this.OWNER = owner;\n }\n accept_PackageableElementVisitor(visitor) {\n return visitor.visit_Database(this);\n }\n get path() {\n return `${this.generatorElement.path}`;\n }\n}\n//# sourceMappingURL=Database.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport class PureGraphExtension {\n _class;\n index = new Map();\n constructor(_class) {\n this._class = _class;\n }\n getElementClass() {\n return this._class;\n }\n get elements() {\n return Array.from(this.index.values());\n }\n getElement(path) {\n return this.index.get(path);\n }\n setElement(path, val) {\n this.index.set(path, val);\n }\n deleteElement(path) {\n this.index.delete(path);\n }\n renameElement(oldPath, newPath) {\n const element = this.getElement(oldPath);\n if (element) {\n this.deleteElement(oldPath);\n this.setElement(newPath, element);\n }\n }\n}\n//# sourceMappingURL=PureGraphExtension.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { hashArray } from '@finos/legend-shared';\nimport { CORE_HASH_STRUCTURE } from '../../../../../graph/Core_HashUtils.js';\nimport { PackageableElement, } from '../PackageableElement.js';\nexport class DataElement extends PackageableElement {\n data;\n get hashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.DATA_ELEMENT,\n this.path,\n hashArray(this.stereotypes.map((stereotype) => stereotype.pointerHashCode)),\n hashArray(this.taggedValues),\n this.data,\n ]);\n }\n accept_PackageableElementVisitor(visitor) {\n return visitor.visit_DataElement(this);\n }\n}\n//# sourceMappingURL=DataElement.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { hashArray } from '@finos/legend-shared';\nimport { CORE_HASH_STRUCTURE } from '../../../../../graph/Core_HashUtils.js';\nimport { PackageableElement, } from '../PackageableElement.js';\nexport class ExecutionEnvironmentInstance extends PackageableElement {\n executionParameters = [];\n get _elementHashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.EXECUTION_ENVIRONMENT_INSTANCE,\n this.path,\n hashArray(this.executionParameters),\n ]);\n }\n accept_PackageableElementVisitor(visitor) {\n return visitor.visit_ExecutionEnvironmentInstance(this);\n }\n}\nexport class ExecutionParameters {\n}\nexport class RuntimeComponents {\n runtime;\n binding;\n clazz;\n get hashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.RUNTIME_COMPONENTS,\n this.binding.valueForSerialization ?? '',\n this.clazz.valueForSerialization ?? '',\n this.runtime,\n ]);\n }\n}\nexport class SingleExecutionParameters {\n key;\n mapping;\n runtime;\n runtimeComponents;\n get hashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.SINGLE_EXECUTION_PARAMETER,\n this.key,\n this.mapping.valueForSerialization ?? '',\n this.runtime ?? '',\n this.runtimeComponents ?? '',\n ]);\n }\n}\nexport class MultiExecutionParameters {\n masterKey;\n singleExecutionParameters = [];\n get hashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.MULTI_EXECUTION_PARAMETER,\n this.masterKey,\n hashArray(this.singleExecutionParameters),\n ]);\n }\n}\n//# sourceMappingURL=ExecutionEnvironmentInstance.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { hashArray, } from '@finos/legend-shared';\nimport { PackageableElement, } from './PackageableElement.js';\nimport { CORE_HASH_STRUCTURE, hashObjectWithoutSourceInformation, } from '../../../Core_HashUtils.js';\nexport class INTERNAL__UnknownPackageableElement extends PackageableElement {\n content;\n get _elementHashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.INTERNAL__UNKNOWN_PACKAGEABLE_ELEMENT,\n this.path,\n hashObjectWithoutSourceInformation(this.content),\n ]);\n }\n accept_PackageableElementVisitor(visitor) {\n return visitor.visit_INTERNAL__UnknownPackageableElement(this);\n }\n}\n//# sourceMappingURL=INTERNAL__UnknownPackageableElement.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { PackageableElement } from '../PackageableElement.js';\nexport class FunctionActivator extends PackageableElement {\n /**\n * This should be a reference to PackageableFunction but we haven't done that yet\n * See https://github.com/finos/legend-studio/issues/1070\n *\n * @discrepancy model\n */\n function;\n activationConfiguration;\n ownership;\n actions = [];\n}\n//# sourceMappingURL=FunctionActivator.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { hashArray, } from '@finos/legend-shared';\nimport { FunctionActivator } from './FunctionActivator.js';\nimport { CORE_HASH_STRUCTURE, hashObjectWithoutSourceInformation, } from '../../../../Core_HashUtils.js';\nexport class INTERNAL__UnknownFunctionActivator extends FunctionActivator {\n content;\n get _elementHashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.INTERNAL__UNKNOWN_FUNCTION_ACTIVATOR,\n this.path,\n // TODO: for simplicity, we won't allow changing the function\n // for unknown function activator, this is also due to\n // the fact that to properly compute the hash, we need to\n // use an utility function to generate the function pretty name\n //\n // generateFunctionPrettyName(this.function.value, {\n // fullPath: true,\n // spacing: false,\n // }),\n hashObjectWithoutSourceInformation(this.content),\n ]);\n }\n accept_PackageableElementVisitor(visitor) {\n return visitor.visit_INTERNAL__UnknownFunctionActivator(this);\n }\n}\n//# sourceMappingURL=INTERNAL__UnknownFunctionActivator.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { hashArray, } from '@finos/legend-shared';\nimport { Store } from './Store.js';\nimport { CORE_HASH_STRUCTURE, hashObjectWithoutSourceInformation, } from '../../../../Core_HashUtils.js';\nexport class INTERNAL__UnknownStore extends Store {\n content;\n get _elementHashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.INTERNAL__UNKNOWN_STORE,\n this.path,\n hashObjectWithoutSourceInformation(this.content),\n ]);\n }\n accept_PackageableElementVisitor(visitor) {\n return visitor.visit_INTERNAL__UnknownStore(this);\n }\n}\n//# sourceMappingURL=INTERNAL__UnknownStore.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { hashArray, } from '@finos/legend-shared';\nimport { PackageableElement, } from './PackageableElement.js';\nimport { CORE_HASH_STRUCTURE, hashObjectWithoutSourceInformation, } from '../../../Core_HashUtils.js';\nexport class INTERNAL__UnknownElement extends PackageableElement {\n content;\n classifierPath;\n get _elementHashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.INTERNAL__UNKNOWN_ELEMENT,\n this.path,\n hashObjectWithoutSourceInformation(this.content),\n this.classifierPath,\n ]);\n }\n accept_PackageableElementVisitor(visitor) {\n return visitor.visit_INTERNAL__UnknownElement(this);\n }\n}\n//# sourceMappingURL=INTERNAL__UnknownElement.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { INTERNAL__UnknownPackageableElement } from '../INTERNAL__UnknownPackageableElement.js';\nexport class AppDirNode {\n appDirId;\n level;\n}\n// will extend UnknownPackageableElement for now until we want to expose more of the forms\nexport class IngestDefinition extends INTERNAL__UnknownPackageableElement {\n appDirDeployment;\n TEMPORARY_MATVIEW_FUNCTION_DATA_SETS;\n accept_PackageableElementVisitor(visitor) {\n return visitor.visit_IngestDefinition(this);\n }\n}\n//# sourceMappingURL=IngestDefinition.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { UnsupportedOperationError, getClass, IllegalStateError, returnUndefOnError, promisify, filterByType, guaranteeNonNullable, guaranteeType, isNonNullable, isType, } from '@finos/legend-shared';\nimport { Package } from '../graph/metamodel/pure/packageableElements/domain/Package.js';\nimport { Type } from '../graph/metamodel/pure/packageableElements/domain/Type.js';\nimport { Association } from '../graph/metamodel/pure/packageableElements/domain/Association.js';\nimport { Mapping } from '../graph/metamodel/pure/packageableElements/mapping/Mapping.js';\nimport { Class } from '../graph/metamodel/pure/packageableElements/domain/Class.js';\nimport { Enumeration } from '../graph/metamodel/pure/packageableElements/domain/Enumeration.js';\nimport { PackageableElement } from '../graph/metamodel/pure/packageableElements/PackageableElement.js';\nimport { Profile } from '../graph/metamodel/pure/packageableElements/domain/Profile.js';\nimport { Service } from '../graph/metamodel/pure/packageableElements/service/Service.js';\nimport { ConcreteFunctionDefinition } from './metamodel/pure/packageableElements/function/ConcreteFunctionDefinition.js';\nimport { Store } from '../graph/metamodel/pure/packageableElements/store/Store.js';\nimport { FlatData } from '../graph/metamodel/pure/packageableElements/store/flatData/model/FlatData.js';\nimport { PackageableRuntime } from '../graph/metamodel/pure/packageableElements/runtime/PackageableRuntime.js';\nimport { PackageableConnection } from '../graph/metamodel/pure/packageableElements/connection/PackageableConnection.js';\nimport { FileGenerationSpecification } from '../graph/metamodel/pure/packageableElements/fileGeneration/FileGenerationSpecification.js';\nimport { GenerationSpecification } from '../graph/metamodel/pure/packageableElements/generationSpecification/GenerationSpecification.js';\nimport { Unit, Measure, } from '../graph/metamodel/pure/packageableElements/domain/Measure.js';\nimport { Database } from '../graph/metamodel/pure/packageableElements/store/relational/model/Database.js';\nimport { SectionIndex } from '../graph/metamodel/pure/packageableElements/section/SectionIndex.js';\nimport { PureGraphExtension } from './PureGraphExtension.js';\nimport { PrimitiveType } from '../graph/metamodel/pure/packageableElements/domain/PrimitiveType.js';\nimport { DataType } from '../graph/metamodel/pure/packageableElements/domain/DataType.js';\nimport { isValidFullPath, isValidPath, resolvePackagePathAndElementName, } from '../graph/MetaModelUtils.js';\nimport { addElementToPackage, deleteElementFromPackage, getFunctionName, getOrCreateGraphPackage, getOrCreatePackage, } from '../graph/helpers/DomainHelper.js';\nimport { DataElement } from '../graph/metamodel/pure/packageableElements/data/DataElement.js';\nimport { ExecutionEnvironmentInstance } from './metamodel/pure/packageableElements/service/ExecutionEnvironmentInstance.js';\nimport { INTERNAL__UnknownPackageableElement } from './metamodel/pure/packageableElements/INTERNAL__UnknownPackageableElement.js';\nimport { FunctionActivator } from './metamodel/pure/packageableElements/function/FunctionActivator.js';\nimport { INTERNAL__UnknownFunctionActivator } from './metamodel/pure/packageableElements/function/INTERNAL__UnknownFunctionActivator.js';\nimport { INTERNAL__UnknownStore } from './metamodel/pure/packageableElements/store/INTERNAL__UnknownStore.js';\nimport { INTERNAL__UnknownElement } from './metamodel/pure/packageableElements/INTERNAL__UnknownElement.js';\nimport { DataProduct } from './metamodel/pure/dataProduct/DataProduct.js';\nimport { IngestDefinition } from './metamodel/pure/packageableElements/ingest/IngestDefinition.js';\nconst FORBIDDEN_EXTENSION_ELEMENT_CLASS = new Set([\n PackageableElement,\n Type,\n DataType,\n PrimitiveType,\n Class,\n Association,\n Enumeration,\n ConcreteFunctionDefinition,\n Profile,\n Measure,\n Unit,\n DataElement,\n Store,\n Mapping,\n PackageableConnection,\n PackageableRuntime,\n GenerationSpecification,\n FileGenerationSpecification,\n Service, // to be modularized\n ExecutionEnvironmentInstance,\n SectionIndex,\n INTERNAL__UnknownPackageableElement,\n INTERNAL__UnknownStore,\n]);\n/**\n * Since this is the basis of the Pure graph itself, it shares many methods with the graph.\n * But the graph holds references to many basic graphs and expose those to outside consumers\n * as if it is one graph.\n *\n * As such, to avoid confusion, we add `Own` to methods in basic graph for methods that only\n * deal with elements belonging to the basic graph.\n */\nexport class BasicModel {\n root;\n _origin;\n extensions = [];\n graphPlugins = [];\n elementSectionIndex = new Map();\n sectionIndicesIndex = new Map();\n profilesIndex = new Map();\n typesIndex = new Map();\n associationsIndex = new Map();\n functionsIndex = new Map();\n functionActivatorsIndex = new Map();\n storesIndex = new Map();\n mappingsIndex = new Map();\n connectionsIndex = new Map();\n runtimesIndex = new Map();\n servicesIndex = new Map();\n generationSpecificationsIndex = new Map();\n fileGenerationsIndex = new Map();\n productsIndex = new Map();\n dataElementsIndex = new Map();\n executionEnvironmentsIndex = new Map();\n INTERNAL__unknownElementsIndex = new Map();\n INTERNAL__unknownIndex = new Map();\n constructor(rootPackageName, graphPlugins, origin) {\n this.root = new Package(rootPackageName);\n const extensionElementClasses = graphPlugins.flatMap((plugin) => plugin.getExtraPureGraphExtensionClasses?.() ?? []);\n this.extensions = this.createGraphExtensions(extensionElementClasses);\n this._origin = origin;\n }\n createGraphExtensions(extensionElementClasses) {\n return extensionElementClasses.map((extensionElementClass) => {\n if (FORBIDDEN_EXTENSION_ELEMENT_CLASS.has(extensionElementClass)) {\n throw new IllegalStateError(`Pure graph extension not allowed for the specified class. Consider removing this extension from plugins.`);\n }\n return new PureGraphExtension(extensionElementClass);\n });\n }\n get ownSectionIndices() {\n return Array.from(this.sectionIndicesIndex.values());\n }\n get ownProfiles() {\n return Array.from(this.profilesIndex.values());\n }\n get ownEnumerations() {\n return Array.from(this.typesIndex.values()).filter(filterByType(Enumeration));\n }\n get ownMeasures() {\n return Array.from(this.typesIndex.values()).filter(filterByType(Measure));\n }\n get ownClasses() {\n return Array.from(this.typesIndex.values()).filter(filterByType(Class));\n }\n get ownTypes() {\n return Array.from(this.typesIndex.values());\n }\n get ownAssociations() {\n return Array.from(this.associationsIndex.values());\n }\n get ownFunctions() {\n return Array.from(this.functionsIndex.values());\n }\n get ownFunctionActivators() {\n return Array.from(this.functionActivatorsIndex.values());\n }\n get ownStores() {\n return Array.from(this.storesIndex.values());\n }\n get ownFlatDatas() {\n return Array.from(this.storesIndex.values()).filter(filterByType(FlatData));\n }\n get ownDatabases() {\n return Array.from(this.storesIndex.values()).filter(filterByType(Database));\n }\n get ownMappings() {\n return Array.from(this.mappingsIndex.values());\n }\n get ownServices() {\n return Array.from(this.servicesIndex.values());\n }\n get ownRuntimes() {\n return Array.from(this.runtimesIndex.values());\n }\n get ownConnections() {\n return Array.from(this.connectionsIndex.values());\n }\n get ownFileGenerations() {\n return Array.from(this.fileGenerationsIndex.values());\n }\n get ownProducts() {\n return Array.from(this.productsIndex.values());\n }\n get ownDataElements() {\n return Array.from(this.dataElementsIndex.values());\n }\n get ownExecutionEnvironments() {\n return Array.from(this.executionEnvironmentsIndex.values());\n }\n get ownIngests() {\n return Array.from(this.INTERNAL__unknownElementsIndex.values()).filter(filterByType(IngestDefinition));\n }\n get ownGenerationSpecifications() {\n return Array.from(this.generationSpecificationsIndex.values());\n }\n get ownTestables() {\n const coreTestables = [\n ...this.ownServices,\n ...this.ownMappings,\n // TODO: re-add functions once function test runner has been completed in backend\n // ...this.ownFunctions,\n ];\n const filters = this.graphPlugins.flatMap((plugin) => plugin.getExtraTestablesCollectors?.() ?? []);\n const extraTestables = this.allOwnElements\n .map((element) => filters.find((elementFilter) => Boolean(elementFilter(element)))?.(element))\n .filter(isNonNullable);\n return [...coreTestables, ...extraTestables];\n }\n get origin() {\n return this._origin;\n }\n setOrigin(val) {\n if (this._origin) {\n throw new IllegalStateError(`Graph origin has already been set`);\n }\n else {\n this._origin = val;\n }\n }\n getExtensionElements(extensionElementClass) {\n return this.getExtensionForElementClass(extensionElementClass).elements;\n }\n getExtensionForElementClass(_class) {\n const extensions = this.extensions.filter((extension) => extension.getElementClass() === _class);\n if (extensions.length === 0) {\n throw new UnsupportedOperationError(`Can't find graph extension for the specified element class: no compatible graph extensions available from plugins`);\n }\n else if (extensions.length > 1) {\n throw new IllegalStateError(`Found multiple extensions for the specified element class`);\n }\n return extensions[0];\n }\n getOwnNullableSection = (path) => this.elementSectionIndex.get(path);\n getOwnNullableSectionIndex = (path) => this.sectionIndicesIndex.get(path);\n getOwnNullableProfile = (path) => this.profilesIndex.get(path);\n getOwnNullableType(path) {\n return this.typesIndex.get(path);\n }\n getOwnNullableClass = (path) => {\n const el = this.getOwnNullableType(path);\n return el instanceof Class ? el : undefined;\n };\n getOwnNullableEnumeration = (path) => {\n const el = this.getOwnNullableType(path);\n return el instanceof Enumeration ? el : undefined;\n };\n getOwnNullableMeasure = (path) => {\n const el = this.getOwnNullableType(path);\n return el instanceof Measure ? el : undefined;\n };\n getOwnNullableAssociation = (path) => this.associationsIndex.get(path);\n getOwnNullableFunction = (path) => this.functionsIndex.get(path);\n getOwnNullableFunctionActivator = (path) => this.functionActivatorsIndex.get(path);\n getOwnNullableStore = (path) => this.storesIndex.get(path);\n getOwnNullableMapping = (path) => this.mappingsIndex.get(path);\n getOwnNullableConnection = (path) => this.connectionsIndex.get(path);\n getOwnNullableRuntime = (path) => this.runtimesIndex.get(path);\n getOwnNullableService = (path) => this.servicesIndex.get(path);\n getOwnNullableGenerationSpecification = (path) => this.generationSpecificationsIndex.get(path);\n getOwnNullableFileGeneration = (path) => this.fileGenerationsIndex.get(path);\n getOwnNullableDataElement = (path) => this.dataElementsIndex.get(path);\n getOwnNullableExecutionEnviornment = (path) => this.executionEnvironmentsIndex.get(path);\n getOwnNullableDataProduct = (path) => this.productsIndex.get(path);\n getOwnNullableIngestDefinition = (path) => this.ownIngests.find((ingest) => ingest.path === path);\n getOwnSectionIndex = (path) => guaranteeNonNullable(this.getOwnNullableSectionIndex(path), `Can't find section index '${path}'`);\n getOwnProfile = (path) => guaranteeNonNullable(this.getOwnNullableProfile(path), `Can't find profile '${path}'`);\n getOwnType = (path) => guaranteeNonNullable(this.getOwnNullableType(path), `Can't find type '${path}'`);\n getOwnClass = (path) => guaranteeNonNullable(this.getOwnNullableClass(path), `Can't find class '${path}'`);\n getOwnEnumeration = (path) => guaranteeNonNullable(this.getOwnNullableEnumeration(path), `Can't find enumeration '${path}'`);\n getOwnMeasure = (path) => guaranteeNonNullable(this.getOwnNullableMeasure(path), `Can't find measure '${path}'`);\n getOwnAssociation = (path) => guaranteeNonNullable(this.getOwnNullableAssociation(path), `Can't find association '${path}'`);\n getOwnFunction = (path) => guaranteeNonNullable(this.getOwnNullableFunction(path), `Can't find function '${path}'`);\n getOwnFunctionActivator = (path) => guaranteeNonNullable(this.getOwnNullableFunctionActivator(path), `Can't find function activator '${path}'`);\n getOwnStore = (path) => guaranteeNonNullable(this.getOwnNullableStore(path), `Can't find store '${path}'`);\n getOwnDatabase = (path) => guaranteeType(this.getOwnNullableStore(path), Database, `Can't find database '${path}'`);\n getOwnFlatDataStore = (path) => guaranteeType(this.getOwnNullableStore(path), FlatData, `Can't find flat-data store '${path}'`);\n getOwnMapping = (path) => guaranteeNonNullable(this.getOwnNullableMapping(path), `Can't find mapping '${path}'`);\n getOwnConnection = (path) => guaranteeNonNullable(this.getOwnNullableConnection(path), `Can't find connection '${path}'`);\n getOwnRuntime = (path) => guaranteeNonNullable(this.getOwnNullableRuntime(path), `Can't find runtime '${path}'`);\n getOwnService = (path) => guaranteeNonNullable(this.getOwnNullableService(path), `Can't find service '${path}'`);\n getOwnGenerationSpecification = (path) => guaranteeNonNullable(this.getOwnNullableGenerationSpecification(path), `Can't find generation specification '${path}'`);\n getOwnFileGeneration = (path) => guaranteeNonNullable(this.getOwnNullableFileGeneration(path), `Can't find file generation '${path}'`);\n getOwnDataElement = (path) => guaranteeNonNullable(this.getOwnNullableDataElement(path), `Can't find data element '${path}'`);\n getOwnExecutionEnvironment = (path) => guaranteeNonNullable(this.getOwnNullableExecutionEnviornment(path), `Can't find execution environment element '${path}'`);\n getOwnDataProduct = (path) => guaranteeNonNullable(this.getOwnNullableDataProduct(path), `Can't find data product element '${path}'`);\n getOwnNullableExtensionElement(path, extensionElementClass) {\n const extension = this.getExtensionForElementClass(extensionElementClass);\n return extension.getElement(path);\n }\n setOwnSection(path, val) {\n this.elementSectionIndex.set(path, val);\n }\n setOwnSectionIndex(path, val) {\n this.sectionIndicesIndex.set(path, val);\n }\n setOwnProfile(path, val) {\n this.profilesIndex.set(path, val);\n }\n setOwnType(path, val) {\n this.typesIndex.set(path, val);\n }\n setOwnAssociation(path, val) {\n this.associationsIndex.set(path, val);\n }\n setOwnFunction(path, val) {\n this.functionsIndex.set(path, val);\n }\n setOwnFunctionActivator(path, val) {\n this.functionActivatorsIndex.set(path, val);\n }\n setOwnStore(path, val) {\n this.storesIndex.set(path, val);\n }\n setOwnMapping(path, val) {\n this.mappingsIndex.set(path, val);\n }\n setOwnConnection(path, val) {\n this.connectionsIndex.set(path, val);\n }\n setOwnRuntime(path, val) {\n this.runtimesIndex.set(path, val);\n }\n setOwnService(path, val) {\n this.servicesIndex.set(path, val);\n }\n setOwnGenerationSpecification(path, val) {\n this.generationSpecificationsIndex.set(path, val);\n }\n setOwnFileGeneration(path, val) {\n this.fileGenerationsIndex.set(path, val);\n }\n setOwnDataElement(path, val) {\n this.dataElementsIndex.set(path, val);\n }\n setOwnExecutionEnvironment(path, val) {\n this.executionEnvironmentsIndex.set(path, val);\n }\n setOwnDataProduct(path, val) {\n this.productsIndex.set(path, val);\n }\n INTERNAL__setOwnUnknown(path, val) {\n this.INTERNAL__unknownIndex.set(path, val);\n }\n INTERNAL__setOwnUnknownElement(path, val) {\n this.INTERNAL__unknownElementsIndex.set(path, val);\n }\n setOwnElementInExtension(path, val, extensionElementClass) {\n const extension = this.getExtensionForElementClass(extensionElementClass);\n extension.setElement(path, val);\n }\n get allOwnElements() {\n return [\n ...this.ownProfiles,\n ...this.ownEnumerations,\n ...this.ownMeasures,\n ...this.ownClasses,\n ...this.ownAssociations,\n ...this.ownFunctions,\n ...this.ownFunctionActivators,\n ...this.ownStores,\n ...this.ownMappings,\n ...this.ownServices,\n ...this.ownRuntimes,\n ...this.ownConnections,\n ...this.ownGenerationSpecifications,\n ...this.ownFileGenerations,\n ...this.ownProducts,\n ...this.ownDataElements,\n ...this.ownExecutionEnvironments,\n ...Array.from(this.INTERNAL__unknownElementsIndex.values()),\n ...Array.from(this.INTERNAL__unknownIndex.values()),\n ...this.extensions.flatMap((extension) => extension.elements),\n ];\n }\n get knownAllOwnElements() {\n return this.allOwnElements.filter((element) => !isType(element, INTERNAL__UnknownElement));\n }\n /**\n * Dispose the current graph and any potential reference from parts outside of the graph to the graph\n * This is a MUST to prevent memory-leak as we might have references between metamodels from this graph\n * and other graphs\n */\n async dispose() {\n if (this.allOwnElements.length) {\n await Promise.all(this.allOwnElements.map((element) => promisify(() => {\n element.dispose();\n })));\n }\n }\n getNullablePackage = (path) => !path\n ? this.root\n : returnUndefOnError(() => getOrCreatePackage(this.root, path, false, undefined));\n getOwnNullableElement(path, includePackage) {\n let element = this.sectionIndicesIndex.get(path) ??\n this.INTERNAL__unknownIndex.get(path) ??\n this.INTERNAL__unknownElementsIndex.get(path) ??\n this.typesIndex.get(path) ??\n this.profilesIndex.get(path) ??\n this.associationsIndex.get(path) ??\n this.functionsIndex.get(path) ??\n this.functionActivatorsIndex.get(path) ??\n this.storesIndex.get(path) ??\n this.mappingsIndex.get(path) ??\n this.servicesIndex.get(path) ??\n this.runtimesIndex.get(path) ??\n this.connectionsIndex.get(path) ??\n this.fileGenerationsIndex.get(path) ??\n this.productsIndex.get(path) ??\n this.dataElementsIndex.get(path) ??\n this.executionEnvironmentsIndex.get(path) ??\n this.generationSpecificationsIndex.get(path);\n if (!element) {\n for (const extension of this.extensions) {\n const extensionElement = extension.getElement(path);\n if (extensionElement) {\n element = extensionElement;\n break;\n }\n }\n }\n if (includePackage && !element) {\n return this.getNullablePackage(path);\n }\n return element;\n }\n addOwnElement(element, packagePath) {\n addElementToPackage(packagePath\n ? getOrCreateGraphPackage(this, packagePath, undefined)\n : this.root, element);\n if (element instanceof Mapping) {\n this.setOwnMapping(element.path, element);\n }\n else if (element instanceof Store) {\n this.setOwnStore(element.path, element);\n }\n else if (element instanceof Type) {\n this.setOwnType(element.path, element);\n }\n else if (element instanceof Association) {\n this.setOwnAssociation(element.path, element);\n }\n else if (element instanceof Profile) {\n this.setOwnProfile(element.path, element);\n }\n else if (element instanceof ConcreteFunctionDefinition) {\n this.setOwnFunction(element.path, element);\n }\n else if (element instanceof FunctionActivator) {\n this.setOwnFunctionActivator(element.path, element);\n }\n else if (element instanceof Service) {\n this.setOwnService(element.path, element);\n }\n else if (element instanceof PackageableConnection) {\n this.setOwnConnection(element.path, element);\n }\n else if (element instanceof PackageableRuntime) {\n this.setOwnRuntime(element.path, element);\n }\n else if (element instanceof FileGenerationSpecification) {\n this.setOwnFileGeneration(element.path, element);\n }\n else if (element instanceof GenerationSpecification) {\n this.setOwnGenerationSpecification(element.path, element);\n }\n else if (element instanceof DataElement) {\n this.setOwnDataElement(element.path, element);\n }\n else if (element instanceof ExecutionEnvironmentInstance) {\n this.setOwnExecutionEnvironment(element.path, element);\n }\n else if (element instanceof DataProduct) {\n this.setOwnDataProduct(element.path, element);\n }\n else if (element instanceof Package) {\n // do nothing\n }\n else {\n const extension = this.getExtensionForElementClass(getClass(element));\n extension.setElement(element.path, element);\n }\n }\n deleteOwnElement(element) {\n if (element.package) {\n deleteElementFromPackage(element.package, element);\n }\n if (element instanceof INTERNAL__UnknownElement) {\n this.INTERNAL__unknownIndex.delete(element.path);\n }\n else if (element instanceof INTERNAL__UnknownPackageableElement) {\n this.INTERNAL__unknownElementsIndex.delete(element.path);\n }\n else if (element instanceof Mapping) {\n this.mappingsIndex.delete(element.path);\n }\n else if (element instanceof Store) {\n this.storesIndex.delete(element.path);\n }\n else if (element instanceof Type) {\n this.typesIndex.delete(element.path);\n if (element instanceof Measure) {\n if (element.canonicalUnit) {\n this.typesIndex.delete(element.canonicalUnit.path);\n }\n element.nonCanonicalUnits.forEach((unit) => this.typesIndex.delete(unit.path));\n }\n }\n else if (element instanceof Association) {\n this.associationsIndex.delete(element.path);\n }\n else if (element instanceof Profile) {\n this.profilesIndex.delete(element.path);\n }\n else if (element instanceof ConcreteFunctionDefinition) {\n this.functionsIndex.delete(element.path);\n }\n else if (element instanceof FunctionActivator) {\n this.functionActivatorsIndex.delete(element.path);\n }\n else if (element instanceof Service) {\n this.servicesIndex.delete(element.path);\n }\n else if (element instanceof PackageableRuntime) {\n this.runtimesIndex.delete(element.path);\n }\n else if (element instanceof PackageableConnection) {\n this.connectionsIndex.delete(element.path);\n }\n else if (element instanceof FileGenerationSpecification) {\n this.fileGenerationsIndex.delete(element.path);\n }\n else if (element instanceof GenerationSpecification) {\n this.generationSpecificationsIndex.delete(element.path);\n }\n else if (element instanceof DataElement) {\n this.dataElementsIndex.delete(element.path);\n }\n else if (element instanceof ExecutionEnvironmentInstance) {\n this.executionEnvironmentsIndex.delete(element.path);\n }\n else if (element instanceof DataProduct) {\n this.productsIndex.delete(element.path);\n }\n else if (element instanceof Package) {\n element.children.forEach((child) => this.deleteOwnElement(child));\n }\n else {\n const extension = this.getExtensionForElementClass(getClass(element));\n extension.deleteElement(element.path);\n }\n }\n /**\n * NOTE: this method has to do with graph modification\n * and as of the current set up, we should not allow it to be called\n * on any immutable graphs. As such, we protect it and let the main graph\n * expose it. The other benefit of exposing this in the main graph is that we could\n * do better duplicated path check\n */\n renameOwnElement(element, oldPath, newPath) {\n // validation before renaming\n if (oldPath === newPath) {\n return;\n }\n if (!newPath) {\n throw new UnsupportedOperationError(`Can't rename element '${oldPath} to '${newPath}': path is empty'`);\n }\n if ((element instanceof Package && !isValidPath(newPath)) ||\n (!(element instanceof Package) && !isValidFullPath(newPath))) {\n throw new UnsupportedOperationError(`Can't rename element '${oldPath} to '${newPath}': invalid path'`);\n }\n const existingElement = this.getOwnNullableElement(newPath, true);\n if (existingElement) {\n throw new UnsupportedOperationError(`Can't rename element '${oldPath} to '${newPath}': another element with the same path already existed'`);\n }\n const [newPackagePath, newElementName] = resolvePackagePathAndElementName(newPath);\n // if we're not renaming package, we can simply add new package\n // if the element new package does not exist. For renaming package\n // it's a little bit more complicated as we need to rename its children\n // we will handle this case later\n if (!(element instanceof Package)) {\n const newParentPackage = this.getNullablePackage(newPackagePath) ??\n (newPackagePath !== ''\n ? getOrCreateGraphPackage(this, newPackagePath, undefined)\n : this.root);\n // update element name\n element.name = newElementName;\n if (element instanceof ConcreteFunctionDefinition) {\n element.functionName = getFunctionName(element, element.name);\n }\n // update element package if needed\n if (element.package !== newParentPackage) {\n if (element.package) {\n deleteElementFromPackage(element.package, element);\n }\n addElementToPackage(newParentPackage, element);\n }\n }\n // update index in the graph\n if (element instanceof INTERNAL__UnknownElement) {\n this.INTERNAL__unknownIndex.delete(oldPath);\n this.INTERNAL__unknownIndex.set(newPath, element);\n element.content = {\n ...element.content,\n name: element.name,\n package: element.package?.path,\n };\n }\n else if (element instanceof INTERNAL__UnknownPackageableElement) {\n this.INTERNAL__unknownElementsIndex.delete(oldPath);\n this.INTERNAL__unknownElementsIndex.set(newPath, element);\n element.content = {\n ...element.content,\n name: element.name,\n package: element.package?.path,\n };\n }\n else if (element instanceof INTERNAL__UnknownFunctionActivator) {\n this.functionActivatorsIndex.delete(oldPath);\n this.functionActivatorsIndex.set(newPath, element);\n element.content = {\n ...element.content,\n name: element.name,\n package: element.package?.path,\n };\n }\n else if (element instanceof INTERNAL__UnknownStore) {\n this.storesIndex.delete(oldPath);\n this.storesIndex.set(newPath, element);\n element.content = {\n ...element.content,\n name: element.name,\n package: element.package?.path,\n };\n }\n else if (element instanceof Mapping) {\n this.mappingsIndex.delete(oldPath);\n this.mappingsIndex.set(newPath, element);\n }\n else if (element instanceof Store) {\n this.storesIndex.delete(oldPath);\n this.storesIndex.set(newPath, element);\n }\n else if (element instanceof Type) {\n this.typesIndex.delete(oldPath);\n this.typesIndex.set(newPath, element);\n if (element instanceof Measure) {\n if (element.canonicalUnit) {\n this.typesIndex.delete(element.canonicalUnit.path);\n this.typesIndex.set(element.canonicalUnit.path.replace(oldPath, newPath), element.canonicalUnit);\n }\n element.nonCanonicalUnits.forEach((unit) => {\n this.typesIndex.delete(unit.path);\n this.typesIndex.set(unit.path.replace(oldPath, newPath), unit);\n });\n }\n }\n else if (element instanceof Association) {\n this.associationsIndex.delete(oldPath);\n this.associationsIndex.set(newPath, element);\n }\n else if (element instanceof Profile) {\n this.profilesIndex.delete(oldPath);\n this.profilesIndex.set(newPath, element);\n }\n else if (element instanceof ConcreteFunctionDefinition) {\n this.functionsIndex.delete(oldPath);\n this.functionsIndex.set(newPath, element);\n }\n else if (element instanceof FunctionActivator) {\n this.functionActivatorsIndex.delete(oldPath);\n this.functionActivatorsIndex.set(newPath, element);\n }\n else if (element instanceof Service) {\n this.servicesIndex.delete(oldPath);\n this.servicesIndex.set(newPath, element);\n }\n else if (element instanceof PackageableRuntime) {\n this.runtimesIndex.delete(oldPath);\n this.runtimesIndex.set(newPath, element);\n }\n else if (element instanceof PackageableConnection) {\n this.connectionsIndex.delete(oldPath);\n this.connectionsIndex.set(newPath, element);\n }\n else if (element instanceof FileGenerationSpecification) {\n this.fileGenerationsIndex.delete(oldPath);\n this.fileGenerationsIndex.set(newPath, element);\n }\n else if (element instanceof DataElement) {\n this.dataElementsIndex.delete(oldPath);\n this.dataElementsIndex.set(newPath, element);\n }\n else if (element instanceof ExecutionEnvironmentInstance) {\n this.executionEnvironmentsIndex.delete(oldPath);\n this.executionEnvironmentsIndex.set(newPath, element);\n }\n else if (element instanceof GenerationSpecification) {\n this.generationSpecificationsIndex.delete(oldPath);\n this.generationSpecificationsIndex.set(newPath, element);\n }\n else if (element instanceof Package) {\n // Since we will modify the package name, we need to first store the original\n // paths of all of its children\n const childElements = new Map();\n element.children.forEach((childElement) => {\n childElements.set(childElement.path, childElement);\n });\n // update element name\n element.name = newElementName;\n if (!element.package) {\n throw new IllegalStateError(`Can't rename root package`);\n }\n /**\n * Update element package if needed.\n *\n * NOTE: to be clean, first completely remove the package from its parent package\n * Only then would we find or create the new parent package. This way, if we rename\n * package `example::something` to `example::something::somethingElse`, we will not\n * end up in a loop. If we did not first remove the package from its parent package\n * we would end up having the `somethingElse` package containing itself as a child.\n */\n const currentParentPackage = element.package;\n if (currentParentPackage !== this.getNullablePackage(newPackagePath)) {\n deleteElementFromPackage(currentParentPackage, element);\n const newParentPackage = newPackagePath !== ''\n ? getOrCreateGraphPackage(this, newPackagePath, undefined)\n : this.root;\n addElementToPackage(newParentPackage, element);\n }\n childElements.forEach((childElement, childElementOriginalPath) => {\n // NOTE: since we already modified the parent package path, we need to pass in the child element's original path\n // here to be sure we're properly, if we rely on the `childElement.path` that would cause a bug\n this.renameOwnElement(childElement, childElementOriginalPath, childElementOriginalPath.replace(oldPath, newPath));\n });\n }\n else {\n const extension = this.getExtensionForElementClass(getClass(element));\n extension.renameElement(oldPath, newPath);\n }\n }\n /**\n * TODO: this will be removed once we have full support for section index\n * See https://github.com/finos/legend-studio/issues/1067\n */\n TEMPORARY__deleteOwnSectionIndex() {\n this.sectionIndicesIndex.forEach((sectionIndex) => {\n sectionIndex.setIsDeleted(true);\n this.sectionIndicesIndex.delete(sectionIndex.path);\n });\n // NOTE: we have to do this because right now we don't add section index to the package tree\n // as such `this.sectionIndicesIndex.delete(sectionIndex.path)` won't work because the path\n // is without the package\n this.sectionIndicesIndex = new Map();\n this.elementSectionIndex = new Map();\n }\n}\n//# sourceMappingURL=BasicModel.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { hashArray } from '@finos/legend-shared';\nimport { CORE_HASH_STRUCTURE } from '../../../../../graph/Core_HashUtils.js';\nimport { PackageableElement, } from '../PackageableElement.js';\nexport class SectionIndex extends PackageableElement {\n sections = [];\n get _elementHashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.SECTION_INDEX,\n this.path,\n hashArray(this.sections),\n ]);\n }\n accept_PackageableElementVisitor(visitor) {\n return visitor.visit_SectionIndex(this);\n }\n}\n//# sourceMappingURL=SectionIndex.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport class GraphDataOrigin {\n}\nexport class LegendSDLC extends GraphDataOrigin {\n groupId;\n artifactId;\n versionId;\n constructor(groupId, artifactId, versionId) {\n super();\n this.groupId = groupId;\n this.artifactId = artifactId;\n this.versionId = versionId;\n }\n}\nexport class GraphEntities extends GraphDataOrigin {\n entities;\n constructor(entities) {\n super();\n this.entities = entities;\n }\n}\n//# sourceMappingURL=GraphDataOrigin.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { guaranteeNonNullable, IllegalStateError, isNonNullable, } from '@finos/legend-shared';\nimport { Package } from '../graph/metamodel/pure/packageableElements/domain/Package.js';\nimport { BasicModel } from '../graph/BasicModel.js';\nimport { GAV_DELIMITER } from '@finos/legend-storage';\nimport { LegendSDLC } from './GraphDataOrigin.js';\nexport const DEPENDENCY_ROOT_PACKAGE_PREFIX = '@dependency__';\nexport const generateDependencyRootPackageName = (dependencyKey) => `${DEPENDENCY_ROOT_PACKAGE_PREFIX}${dependencyKey}`;\nexport const extractDependencyGACoordinateFromRootPackageName = (packageName) => {\n const idx = packageName.indexOf(DEPENDENCY_ROOT_PACKAGE_PREFIX);\n if (idx !== 0) {\n return undefined;\n }\n return packageName.substring(DEPENDENCY_ROOT_PACKAGE_PREFIX.length);\n};\nexport class DependencyModel extends BasicModel {\n constructor(extensionElementClasses, root, origin) {\n super(root.name, extensionElementClasses, origin);\n this.root = root;\n }\n}\nconst buildDependencyElementGetter = (dependencyManager, elementGetter) => (path) => {\n for (const dependencyGraph of dependencyManager.dependencyGraphs) {\n const element = elementGetter(dependencyGraph, path);\n if (element) {\n return element;\n }\n }\n return undefined;\n};\nexport class DependencyManager {\n graphPlugins;\n _origin;\n roots = [];\n projectDependencyModelsIndex = new Map();\n constructor(graphPlugins) {\n this.graphPlugins = graphPlugins;\n }\n /**\n * Here we create and index a graph for each dependency\n */\n initialize(dependencyEntitiesIndex) {\n Array.from(dependencyEntitiesIndex.entries()).forEach(([dependencyKey, entitiesWithOrigin]) => {\n const pkg = new Package(generateDependencyRootPackageName(dependencyKey));\n this.roots.push(pkg);\n // NOTE: all dependency models will share the dependency manager root package.\n this.projectDependencyModelsIndex.set(dependencyKey, new DependencyModel(this.graphPlugins, pkg, new LegendSDLC(entitiesWithOrigin.groupId, entitiesWithOrigin.artifactId, entitiesWithOrigin.versionId)));\n });\n }\n get numberOfDependencies() {\n return this.projectDependencyModelsIndex.size;\n }\n get hasDependencies() {\n return Boolean(this.projectDependencyModelsIndex.size);\n }\n get dependencyGraphs() {\n return Array.from(this.projectDependencyModelsIndex.values());\n }\n get allOwnElements() {\n return this.dependencyGraphs.flatMap((dep) => dep.allOwnElements);\n }\n get origin() {\n return this._origin;\n }\n setOrigin(val) {\n if (this._origin) {\n throw new IllegalStateError(`Graph origin has already been set`);\n }\n else {\n this._origin = val;\n }\n }\n getOwnNullableSectionIndex = buildDependencyElementGetter(this, (dep, path) => dep.getOwnNullableSectionIndex(path));\n getOwnNullableProfile = buildDependencyElementGetter(this, (dep, path) => dep.getOwnNullableProfile(path));\n getOwnNullableType = buildDependencyElementGetter(this, (dep, path) => dep.getOwnNullableType(path));\n getOwnNullableClass = buildDependencyElementGetter(this, (dep, path) => dep.getOwnNullableClass(path));\n getOwnNullableEnumeration = buildDependencyElementGetter(this, (dep, path) => dep.getOwnNullableEnumeration(path));\n getOwnNullableMeasure = buildDependencyElementGetter(this, (dep, path) => dep.getOwnNullableMeasure(path));\n getOwnNullableAssociation = buildDependencyElementGetter(this, (dep, path) => dep.getOwnNullableAssociation(path));\n getOwnNullableFunction = buildDependencyElementGetter(this, (dep, path) => dep.getOwnNullableFunction(path));\n getOwnNullableFunctionActivator = buildDependencyElementGetter(this, (dep, path) => dep.getOwnNullableFunctionActivator(path));\n getOwnNullableStore = buildDependencyElementGetter(this, (dep, path) => dep.getOwnNullableStore(path));\n getOwnNullableDataProduct = buildDependencyElementGetter(this, (dep, path) => dep.getOwnNullableDataProduct(path));\n getOwnNullableIngestDefinition = buildDependencyElementGetter(this, (dep, path) => dep.getOwnNullableIngestDefinition(path));\n getOwnNullableMapping = buildDependencyElementGetter(this, (dep, path) => dep.getOwnNullableMapping(path));\n getOwnNullableConnection = buildDependencyElementGetter(this, (dep, path) => dep.getOwnNullableConnection(path));\n getOwnNullableRuntime = buildDependencyElementGetter(this, (dep, path) => dep.getOwnNullableRuntime(path));\n getOwnNullableService = buildDependencyElementGetter(this, (dep, path) => dep.getOwnNullableService(path));\n getOwnNullableGenerationSpecification = buildDependencyElementGetter(this, (dep, path) => dep.getOwnNullableGenerationSpecification(path));\n getOwnNullableFileGeneration = buildDependencyElementGetter(this, (dep, path) => dep.getOwnNullableFileGeneration(path));\n getOwnNullableDataElement = buildDependencyElementGetter(this, (dep, path) => dep.getOwnNullableDataElement(path));\n getOwnExecutionEnvironment = buildDependencyElementGetter(this, (dep, path) => dep.getOwnNullableExecutionEnviornment(path));\n getOwnNullableExtensionElement(path, extensionElementClass) {\n for (const dependencyGraph of this.dependencyGraphs) {\n const element = dependencyGraph\n .getExtensionForElementClass(extensionElementClass)\n .getElement(path);\n if (element) {\n return element;\n }\n }\n return undefined;\n }\n get sectionIndices() {\n return this.dependencyGraphs.flatMap((dep) => dep.ownSectionIndices);\n }\n get profiles() {\n return this.dependencyGraphs.flatMap((dep) => dep.ownProfiles);\n }\n get enumerations() {\n return this.dependencyGraphs.flatMap((dep) => dep.ownEnumerations);\n }\n get measures() {\n return this.dependencyGraphs.flatMap((dep) => dep.ownMeasures);\n }\n get classes() {\n return this.dependencyGraphs.flatMap((dep) => dep.ownClasses);\n }\n get types() {\n return this.dependencyGraphs.flatMap((dep) => dep.ownTypes);\n }\n get associations() {\n return this.dependencyGraphs.flatMap((dep) => dep.ownAssociations);\n }\n get functions() {\n return this.dependencyGraphs.flatMap((dep) => dep.ownFunctions);\n }\n get functionActivators() {\n return this.dependencyGraphs.flatMap((dep) => dep.ownFunctionActivators);\n }\n get stores() {\n return this.dependencyGraphs.flatMap((dep) => dep.ownStores);\n }\n get databases() {\n return this.dependencyGraphs.flatMap((dep) => dep.ownDatabases);\n }\n get mappings() {\n return this.dependencyGraphs.flatMap((dep) => dep.ownMappings);\n }\n get services() {\n return this.dependencyGraphs.flatMap((dep) => dep.ownServices);\n }\n get runtimes() {\n return this.dependencyGraphs.flatMap((dep) => dep.ownRuntimes);\n }\n get connections() {\n return this.dependencyGraphs.flatMap((dep) => dep.ownConnections);\n }\n get dataElements() {\n return this.dependencyGraphs.flatMap((dep) => dep.ownDataElements);\n }\n get generationSpecifications() {\n return this.dependencyGraphs.flatMap((dep) => dep.ownGenerationSpecifications);\n }\n get fileGenerations() {\n return this.dependencyGraphs.flatMap((dep) => dep.ownFileGenerations);\n }\n get testables() {\n return this.dependencyGraphs.flatMap((dep) => dep.ownTestables);\n }\n get executionEnvironments() {\n return this.dependencyGraphs.flatMap((dep) => dep.ownExecutionEnvironments);\n }\n get ingests() {\n return this.dependencyGraphs.flatMap((dep) => dep.ownIngests);\n }\n getExtensionElements(extensionElementClass) {\n return this.dependencyGraphs.flatMap((dep) => dep.getExtensionElements(extensionElementClass));\n }\n getModel(projectId) {\n return guaranteeNonNullable(this.projectDependencyModelsIndex.get(projectId), `Can't find dependency model with project ID '${projectId}'`);\n }\n getNullableElement(path, includePackage) {\n const model = this.dependencyGraphs.find((dep) => Boolean(dep.getOwnNullableElement(path, includePackage)));\n return model?.getOwnNullableElement(path, includePackage);\n }\n getPackages(path) {\n return this.dependencyGraphs\n .map((dep) => dep.getNullablePackage(path))\n .filter(isNonNullable);\n }\n getElementOrigin(element) {\n const model = this.dependencyGraphs.find((dep) => Boolean(dep.getOwnNullableElement(element.path)));\n return model?.origin instanceof LegendSDLC\n ? `${model.origin.groupId}${GAV_DELIMITER}${model.origin.artifactId}`\n : undefined;\n }\n}\n//# sourceMappingURL=DependencyManager.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { UnsupportedOperationError } from '@finos/legend-shared';\nimport { Store } from '../../Store.js';\n/**\n * NOTE: Since this is a dummy store used for model connections, we can have this\n * as a singleton.\n */\nexport class ModelStore extends Store {\n static NAME = 'ModelStore';\n static INSTANCE = new ModelStore();\n constructor() {\n super(ModelStore.NAME);\n }\n accept_PackageableElementVisitor(visitor) {\n throw new UnsupportedOperationError();\n }\n}\n//# sourceMappingURL=ModelStore.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { ROOT_PACKAGE_NAME, AUTO_IMPORTS, PRECISE_PRIMITIVE_TYPE, } from '../graph/MetaModelConst.js';\nimport { guaranteeNonNullable, guaranteeType, returnUndefOnError, IllegalStateError, isNonNullable, } from '@finos/legend-shared';\nimport { PrecisePrimitiveType, PrimitiveType, } from '../graph/metamodel/pure/packageableElements/domain/PrimitiveType.js';\nimport { Enumeration } from '../graph/metamodel/pure/packageableElements/domain/Enumeration.js';\nimport { Multiplicity } from '../graph/metamodel/pure/packageableElements/domain/Multiplicity.js';\nimport { Package } from '../graph/metamodel/pure/packageableElements/domain/Package.js';\nimport { Class } from '../graph/metamodel/pure/packageableElements/domain/Class.js';\nimport { DependencyManager } from '../graph/DependencyManager.js';\nimport { ConcreteFunctionDefinition } from './metamodel/pure/packageableElements/function/ConcreteFunctionDefinition.js';\nimport { BasicModel } from './BasicModel.js';\nimport { FlatData } from '../graph/metamodel/pure/packageableElements/store/flatData/model/FlatData.js';\nimport { Database } from '../graph/metamodel/pure/packageableElements/store/relational/model/Database.js';\nimport { ModelStore } from '../graph/metamodel/pure/packageableElements/store/modelToModel/model/ModelStore.js';\nimport { Measure, Unit, } from '../graph/metamodel/pure/packageableElements/domain/Measure.js';\nimport { createPath, extractElementNameFromPath, } from '../graph/MetaModelUtils.js';\nimport { FunctionActivator } from './metamodel/pure/packageableElements/function/FunctionActivator.js';\n/**\n * CoreModel holds meta models which are constant and basic building block of the graph. Since throughout the lifetime\n * of the application, we rebuild PureModel many times, we cannot have these basic building blocks as part of PureModel\n * as that will throw off referential equality.\n *\n * Also, since project dependency uses primitive types, it might even\n * cause the dependency model and system model to depend on PureModel which is bad, as it could potentially cause memory leak\n * as we rebuild the graph.\n */\nexport class CoreModel extends BasicModel {\n primitiveTypesIndex = new Map();\n precisePrimitiveTypesIndex = new Map();\n get primitiveTypes() {\n return Array.from(this.primitiveTypesIndex.values());\n }\n get precisePrimitiveTypes() {\n return Array.from(this.precisePrimitiveTypesIndex.values());\n }\n constructor(graphPlugins) {\n super(ROOT_PACKAGE_NAME.CORE, graphPlugins);\n this.initializePrimitiveTypes();\n this.initializePrecisePrimitiveTypes();\n // index model store singleton\n this.setOwnStore(ModelStore.NAME, ModelStore.INSTANCE);\n }\n get allOwnElements() {\n return [...super.allOwnElements, ...this.primitiveTypes];\n }\n getOwnNullableType(path) {\n let resolvedPath = path;\n if (Object.values(PRECISE_PRIMITIVE_TYPE).includes(path)) {\n // for precise primitive types, we use the name as the path\n resolvedPath = extractElementNameFromPath(path);\n }\n return super.getOwnNullableType(resolvedPath);\n }\n /**\n * NOTE: primitive types are special, they are not put in any package (i.e. they are not linked to `Root` package at all)\n */\n initializePrimitiveTypes() {\n [\n PrimitiveType.STRING,\n PrimitiveType.BOOLEAN,\n PrimitiveType.BINARY,\n PrimitiveType.NUMBER,\n PrimitiveType.INTEGER,\n PrimitiveType.FLOAT,\n PrimitiveType.DECIMAL,\n PrimitiveType.DATE,\n PrimitiveType.STRICTDATE,\n PrimitiveType.DATETIME,\n PrimitiveType.STRICTTIME,\n PrimitiveType.LATESTDATE,\n PrimitiveType.BYTE,\n ].forEach((primitiveType) => {\n this.primitiveTypesIndex.set(primitiveType.path, primitiveType);\n this.setOwnType(primitiveType.path, primitiveType);\n });\n }\n initializePrecisePrimitiveTypes() {\n [\n PrecisePrimitiveType.VARCHAR,\n PrecisePrimitiveType.INT,\n PrecisePrimitiveType.TINY_INT,\n PrecisePrimitiveType.U_TINY_INT,\n PrecisePrimitiveType.SMALL_INT,\n PrecisePrimitiveType.U_SMALL_INT,\n PrecisePrimitiveType.U_INT,\n PrecisePrimitiveType.BIG_INT,\n PrecisePrimitiveType.U_BIG_INT,\n PrecisePrimitiveType.FLOAT,\n PrecisePrimitiveType.DOUBLE,\n PrecisePrimitiveType.NUMERIC,\n PrecisePrimitiveType.TIMESTAMP,\n ].forEach((precisePrimitiveType) => {\n this.precisePrimitiveTypesIndex.set(precisePrimitiveType.path, precisePrimitiveType);\n this.setOwnType(precisePrimitiveType.path, precisePrimitiveType);\n });\n }\n}\nexport class SystemModel extends BasicModel {\n autoImports = [];\n constructor(graphPlugins) {\n super(ROOT_PACKAGE_NAME.SYSTEM, graphPlugins);\n }\n /**\n * NOTE: auto imports are for special types and profiles from system model\n * such as `Any` or `doc` profiles. We don't actually build the packages here\n * just resolving them, so we have to make sure whatever package we have as\n * auto imports, we must have built some elements with such package, e.g.\n *\n * `meta::pure::metamodel::type::Any` covers `meta::pure::metamodel::type`\n * `meta::pure::profiles::doc` covers `meta::pure::profiles`\n * `meta::pure::metamodel::relation::Relation` covers `meta::pure::metamodel::relation`\n * `meta::pure::metamodel::variant::Variant` covers `meta::pure::metamodel::variant`\n */\n initializeAutoImports() {\n this.autoImports = AUTO_IMPORTS.map((_package) => guaranteeType(this.getOwnNullableElement(_package, true), Package, `Can't find auto-import package '${_package}'`));\n }\n}\nexport class GenerationModel extends BasicModel {\n constructor(graphPlugins) {\n super(ROOT_PACKAGE_NAME.MODEL_GENERATION, graphPlugins);\n }\n}\n/**\n * The model of Pure, a.k.a the Pure graph\n */\nexport class PureModel extends BasicModel {\n coreModel;\n systemModel;\n generationModel;\n dependencyManager; // used to manage the elements from dependency projects\n constructor(coreModel, systemModel, graphPlugins) {\n super(ROOT_PACKAGE_NAME.MAIN, graphPlugins);\n this.coreModel = coreModel;\n this.systemModel = systemModel;\n this.generationModel = new GenerationModel(graphPlugins);\n this.dependencyManager = new DependencyManager(graphPlugins);\n }\n get autoImports() {\n return this.systemModel.autoImports;\n }\n get primitiveTypes() {\n return this.coreModel.primitiveTypes;\n }\n get sectionIndices() {\n return [\n ...this.coreModel.ownSectionIndices,\n ...this.systemModel.ownSectionIndices,\n ...this.dependencyManager.sectionIndices,\n ...this.ownSectionIndices,\n ...this.generationModel.ownSectionIndices,\n ];\n }\n get profiles() {\n return [\n ...this.coreModel.ownProfiles,\n ...this.systemModel.ownProfiles,\n ...this.dependencyManager.profiles,\n ...this.ownProfiles,\n ...this.generationModel.ownProfiles,\n ];\n }\n get enumerations() {\n return [\n ...this.coreModel.ownEnumerations,\n ...this.systemModel.ownEnumerations,\n ...this.dependencyManager.enumerations,\n ...this.ownEnumerations,\n ...this.generationModel.ownEnumerations,\n ];\n }\n get measures() {\n return [\n ...this.coreModel.ownMeasures,\n ...this.systemModel.ownMeasures,\n ...this.dependencyManager.measures,\n ...this.ownMeasures,\n ...this.generationModel.ownMeasures,\n ];\n }\n get classes() {\n return [\n ...this.coreModel.ownClasses,\n ...this.systemModel.ownClasses,\n ...this.dependencyManager.classes,\n ...this.ownClasses,\n ...this.generationModel.ownClasses,\n ];\n }\n get types() {\n return [\n ...this.coreModel.ownTypes,\n ...this.systemModel.ownTypes,\n ...this.dependencyManager.types,\n ...this.ownTypes,\n ...this.generationModel.ownTypes,\n ];\n }\n get associations() {\n return [\n ...this.coreModel.ownAssociations,\n ...this.systemModel.ownAssociations,\n ...this.dependencyManager.associations,\n ...this.ownAssociations,\n ...this.generationModel.ownAssociations,\n ];\n }\n get functions() {\n return [\n ...this.coreModel.ownFunctions,\n ...this.systemModel.ownFunctions,\n ...this.dependencyManager.functions,\n ...this.ownFunctions,\n ...this.generationModel.ownFunctions,\n ];\n }\n get functionActivators() {\n return [\n ...this.coreModel.ownFunctionActivators,\n ...this.systemModel.ownFunctionActivators,\n ...this.dependencyManager.functionActivators,\n ...this.ownFunctionActivators,\n ...this.generationModel.ownFunctionActivators,\n ];\n }\n get stores() {\n return [\n ...this.coreModel.ownStores,\n ...this.systemModel.ownStores,\n ...this.dependencyManager.stores,\n ...this.ownStores,\n ...this.generationModel.ownStores,\n ];\n }\n get databases() {\n return [\n ...this.coreModel.ownDatabases,\n ...this.systemModel.ownDatabases,\n ...this.dependencyManager.databases,\n ...this.ownDatabases,\n ...this.generationModel.ownDatabases,\n ];\n }\n get mappings() {\n return [\n ...this.coreModel.ownMappings,\n ...this.systemModel.ownMappings,\n ...this.dependencyManager.mappings,\n ...this.ownMappings,\n ...this.generationModel.ownMappings,\n ];\n }\n get services() {\n return [\n ...this.coreModel.ownServices,\n ...this.systemModel.ownServices,\n ...this.dependencyManager.services,\n ...this.ownServices,\n ...this.generationModel.ownServices,\n ];\n }\n get runtimes() {\n return [\n ...this.coreModel.ownRuntimes,\n ...this.systemModel.ownRuntimes,\n ...this.dependencyManager.runtimes,\n ...this.ownRuntimes,\n ...this.generationModel.ownRuntimes,\n ];\n }\n get connections() {\n return [\n ...this.coreModel.ownConnections,\n ...this.systemModel.ownConnections,\n ...this.dependencyManager.connections,\n ...this.ownConnections,\n ...this.generationModel.ownConnections,\n ];\n }\n get dataElements() {\n return [\n ...this.coreModel.ownDataElements,\n ...this.systemModel.ownDataElements,\n ...this.dependencyManager.dataElements,\n ...this.ownDataElements,\n ...this.generationModel.ownDataElements,\n ];\n }\n get executionEnvironments() {\n return [\n ...this.coreModel.ownExecutionEnvironments,\n ...this.systemModel.ownExecutionEnvironments,\n ...this.dependencyManager.executionEnvironments,\n ...this.ownExecutionEnvironments,\n ...this.generationModel.ownExecutionEnvironments,\n ];\n }\n get generationSpecifications() {\n return [\n ...this.coreModel.ownGenerationSpecifications,\n ...this.systemModel.ownGenerationSpecifications,\n ...this.dependencyManager.generationSpecifications,\n ...this.ownGenerationSpecifications,\n ...this.generationModel.ownGenerationSpecifications,\n ];\n }\n get fileGenerations() {\n return [\n ...this.coreModel.ownFileGenerations,\n ...this.systemModel.ownFileGenerations,\n ...this.dependencyManager.fileGenerations,\n ...this.ownFileGenerations,\n ...this.generationModel.ownFileGenerations,\n ];\n }\n get ingests() {\n return [\n ...this.coreModel.ownIngests,\n ...this.systemModel.ownIngests,\n ...this.dependencyManager.ingests,\n ...this.ownIngests,\n ...this.generationModel.ownIngests,\n ];\n }\n get allElements() {\n return [\n ...this.coreModel.allOwnElements,\n ...this.systemModel.allOwnElements,\n ...this.dependencyManager.allOwnElements,\n ...this.allOwnElements,\n ...this.generationModel.allOwnElements,\n ];\n }\n get testables() {\n return [\n ...this.coreModel.ownTestables,\n ...this.systemModel.ownTestables,\n ...this.dependencyManager.testables,\n ...this.ownTestables,\n ...this.generationModel.ownTestables,\n ];\n }\n getPrimitiveType = (type) => guaranteeNonNullable(this.coreModel.primitiveTypesIndex.get(type), `Can't find primitive type '${type}'`);\n getType = (path) => guaranteeNonNullable(this.getOwnNullableType(path) ??\n this.generationModel.getOwnNullableType(path) ??\n this.dependencyManager.getOwnNullableType(path) ??\n this.systemModel.getOwnNullableType(path) ??\n this.coreModel.getOwnNullableType(path), `Can't find type '${path}'`);\n getProfile = (path) => guaranteeNonNullable(this.getOwnNullableProfile(path) ??\n this.generationModel.getOwnNullableProfile(path) ??\n this.dependencyManager.getOwnNullableProfile(path) ??\n this.systemModel.getOwnNullableProfile(path), `Can't find profile '${path}'`);\n getEnumeration = (path) => guaranteeType(this.getType(path), Enumeration, `Can't find enumeration '${path}'`);\n getMeasure = (path) => guaranteeType(this.getType(path), Measure, `Can't find measure '${path}'`);\n getUnit = (path) => guaranteeType(this.getType(path), Unit, `Can't find unit '${path}'`);\n getClass = (path) => guaranteeType(this.getType(path), Class, `Can't find class '${path}'`);\n getAssociation = (path) => guaranteeNonNullable(this.getOwnNullableAssociation(path) ??\n this.generationModel.getOwnNullableAssociation(path) ??\n this.dependencyManager.getOwnNullableAssociation(path) ??\n this.systemModel.getOwnNullableAssociation(path), `Can't find association '${path}'`);\n getPropertyOwner = (path) => guaranteeNonNullable(this.getOwnNullableAssociation(path) ??\n this.generationModel.getOwnNullableAssociation(path) ??\n this.dependencyManager.getOwnNullableAssociation(path) ??\n this.systemModel.getOwnNullableAssociation(path) ??\n guaranteeType(this.getType(path), Class), `Can't find property owner '${path}'`);\n getFunction = (path) => guaranteeType(this.getOwnNullableFunction(path) ??\n this.generationModel.getOwnNullableFunction(path) ??\n this.dependencyManager.getOwnNullableFunction(path) ??\n this.systemModel.getOwnNullableFunction(path), ConcreteFunctionDefinition, `Can't find function '${path}'`);\n getFunctionActivator = (path) => guaranteeType(this.getOwnNullableFunctionActivator(path) ??\n this.generationModel.getOwnNullableFunctionActivator(path) ??\n this.dependencyManager.getOwnNullableFunctionActivator(path) ??\n this.systemModel.getOwnNullableFunctionActivator(path), FunctionActivator, `Can't find function activator '${path}'`);\n getStore = (path) => guaranteeNonNullable(this.getOwnNullableStore(path) ??\n this.generationModel.getOwnNullableStore(path) ??\n this.dependencyManager.getOwnNullableStore(path) ??\n this.systemModel.getOwnNullableStore(path) ??\n this.coreModel.getOwnNullableStore(path), `Can't find store '${path}'`);\n getDataProduct = (path) => guaranteeNonNullable(this.getOwnNullableDataProduct(path) ??\n this.generationModel.getOwnNullableDataProduct(path) ??\n this.dependencyManager.getOwnNullableDataProduct(path) ??\n this.systemModel.getOwnNullableDataProduct(path) ??\n this.coreModel.getOwnNullableDataProduct(path), `Can't find data product '${path}'`);\n getIngestDefinition = (path) => guaranteeNonNullable(this.getOwnNullableIngestDefinition(path) ??\n this.generationModel.getOwnNullableIngestDefinition(path) ??\n this.dependencyManager.getOwnNullableIngestDefinition(path) ??\n this.systemModel.getOwnNullableIngestDefinition(path) ??\n this.coreModel.getOwnNullableIngestDefinition(path), `Can't find ingest definition '${path}'`);\n getFlatDataStore = (path) => guaranteeType(this.getStore(path), FlatData, `Can't find flat-data store '${path}'`);\n getDatabase = (path) => guaranteeType(this.getStore(path), Database, `Can't find database store '${path}'`);\n getMapping = (path) => guaranteeNonNullable(this.getOwnNullableMapping(path) ??\n this.generationModel.getOwnNullableMapping(path) ??\n this.dependencyManager.getOwnNullableMapping(path) ??\n this.systemModel.getOwnNullableMapping(path), `Can't find mapping '${path}'`);\n getService = (path) => guaranteeNonNullable(this.getOwnNullableService(path) ??\n this.generationModel.getOwnNullableService(path) ??\n this.dependencyManager.getOwnNullableService(path) ??\n this.systemModel.getOwnNullableService(path), `Can't find service '${path}'`);\n getConnection = (path) => guaranteeNonNullable(this.getOwnNullableConnection(path) ??\n this.generationModel.getOwnNullableConnection(path) ??\n this.dependencyManager.getOwnNullableConnection(path) ??\n this.systemModel.getOwnNullableConnection(path), `Can't find connection '${path}'`);\n getRuntime = (path) => guaranteeNonNullable(this.getOwnNullableRuntime(path) ??\n this.generationModel.getOwnNullableRuntime(path) ??\n this.dependencyManager.getOwnNullableRuntime(path) ??\n this.systemModel.getOwnNullableRuntime(path), `Can't find runtime '${path}'`);\n getGenerationSpecification = (path) => guaranteeNonNullable(this.getOwnNullableGenerationSpecification(path) ??\n this.generationModel.getOwnNullableGenerationSpecification(path) ??\n this.dependencyManager.getOwnNullableGenerationSpecification(path) ??\n this.systemModel.getOwnNullableGenerationSpecification(path), `Can't find generation specification '${path}'`);\n getFileGeneration = (path) => guaranteeNonNullable(this.getOwnNullableFileGeneration(path) ??\n this.generationModel.getOwnNullableFileGeneration(path) ??\n this.dependencyManager.getOwnNullableFileGeneration(path) ??\n this.systemModel.getOwnNullableFileGeneration(path), `Can't find file generation '${path}'`);\n getDataElement = (path) => guaranteeNonNullable(this.getOwnNullableDataElement(path) ??\n this.generationModel.getOwnNullableDataElement(path) ??\n this.dependencyManager.getOwnNullableDataElement(path) ??\n this.systemModel.getOwnNullableDataElement(path), `Can't find data element '${path}'`);\n getExtensionElement(path, extensionElementClass, notFoundErrorMessage) {\n // NOTE: beware that this method will favor main graph elements over those of subgraphs when resolving\n return guaranteeNonNullable(this.getOwnNullableExtensionElement(path, extensionElementClass) ??\n this.generationModel.getOwnNullableExtensionElement(path, extensionElementClass) ??\n this.dependencyManager.getOwnNullableExtensionElement(path, extensionElementClass) ??\n this.systemModel.getOwnNullableExtensionElement(path, extensionElementClass), notFoundErrorMessage ?? `Can't find element '${path}'`);\n }\n getElement = (path, includePackage) => guaranteeNonNullable(this.getNullableElement(path, includePackage), `Can't find element '${path}'`);\n getNullableClass = (path) => returnUndefOnError(() => this.getClass(path));\n getNullableMapping = (path) => returnUndefOnError(() => this.getMapping(path));\n getNullableService = (path) => returnUndefOnError(() => this.getService(path));\n getNullableRuntime = (path) => returnUndefOnError(() => this.getRuntime(path));\n getNullableFileGeneration = (path) => returnUndefOnError(() => this.getFileGeneration(path));\n getNullableElement(path, includePackage) {\n // NOTE: beware that this method will favor main graph elements over those of subgraphs when resolving\n const element = super.getOwnNullableElement(path) ??\n this.dependencyManager.getNullableElement(path) ??\n this.generationModel.getOwnNullableElement(path) ??\n this.systemModel.getOwnNullableElement(path) ??\n this.coreModel.getOwnNullableElement(path);\n if (includePackage && !element) {\n return (this.getNullablePackage(path) ??\n this.dependencyManager.getNullableElement(path, true) ??\n this.generationModel.getNullablePackage(path) ??\n this.systemModel.getNullablePackage(path));\n }\n return element;\n }\n getPackages(path) {\n return [\n this.getNullablePackage(path),\n ...this.dependencyManager.getPackages(path),\n this.generationModel.getNullablePackage(path),\n this.systemModel.getNullablePackage(path),\n ].filter(isNonNullable);\n }\n getMultiplicity(lowerBound, upperBound) {\n let multiplicity;\n if (lowerBound === 1 && upperBound === 1) {\n multiplicity = Multiplicity.ONE;\n }\n else if (lowerBound === 0 && upperBound === 1) {\n multiplicity = Multiplicity.ZERO_ONE;\n }\n else if (lowerBound === 0 && upperBound === undefined) {\n multiplicity = Multiplicity.ZERO_MANY;\n }\n else if (lowerBound === 1 && upperBound === undefined) {\n multiplicity = Multiplicity.ONE_MANY;\n }\n else if (lowerBound === 0 && upperBound === 0) {\n multiplicity = Multiplicity.ZERO;\n }\n return multiplicity ?? new Multiplicity(lowerBound, upperBound);\n }\n addElement(element, packagePath) {\n const fullPath = createPath(packagePath ?? '', element.name);\n // check for duplication first, but skip package\n const existingElement = this.getNullableElement(fullPath, false);\n if (existingElement) {\n throw new IllegalStateError(`Can't create element '${fullPath}': another element with the same path already existed`);\n }\n super.addOwnElement(element, packagePath);\n }\n deleteElement(element) {\n super.deleteOwnElement(element);\n const deadReferencesCleaners = this.graphPlugins.flatMap((plugin) => plugin.getExtraDeadReferencesCleaners?.() ?? []);\n for (const cleaner of deadReferencesCleaners) {\n cleaner(this);\n }\n }\n renameElement(element, newPath) {\n // check for duplication first, but skip package\n const existingElement = this.getNullableElement(newPath, false);\n if (existingElement) {\n throw new IllegalStateError(`Can't rename element '${element.path}' to '${newPath}': another element with the same path already existed`);\n }\n super.renameOwnElement(element, element.path, newPath);\n }\n}\n//# sourceMappingURL=PureModel.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { uuid } from '@finos/legend-shared';\n// NOTE: in Pure metamodel, this extends `Annotation`\nexport class Tag {\n _UUID = uuid();\n _OWNER;\n value;\n constructor(owner, value) {\n this._OWNER = owner;\n this.value = value;\n }\n}\n//# sourceMappingURL=Tag.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { uuid } from '@finos/legend-shared';\n// NOTE: in Pure metamodel, this extends `Annotation`\nexport class Stereotype {\n _UUID = uuid();\n _OWNER;\n value;\n constructor(owner, value) {\n this._OWNER = owner;\n this.value = value;\n }\n}\n//# sourceMappingURL=Stereotype.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { CORE_HASH_STRUCTURE } from '../../../../../graph/Core_HashUtils.js';\nimport { hashValue } from '@finos/legend-shared';\nimport { PackageableElementExplicitReference, } from '../PackageableElementReference.js';\nimport { ReferenceWithOwner } from '../../Reference.js';\nexport class PropertyReference extends ReferenceWithOwner {\n ownerReference;\n value;\n constructor(ownerReference, value) {\n super(ownerReference);\n this.ownerReference = ownerReference;\n this.value = value;\n }\n get pointerHashCode() {\n return [\n CORE_HASH_STRUCTURE.PROPERTY_POINTER,\n this.value.name,\n this.ownerReference.valueForSerialization ?? '',\n ]\n .map(hashValue)\n .join(',');\n }\n}\nexport class PropertyExplicitReference extends PropertyReference {\n ownerReference;\n constructor(value) {\n const ownerReference = PackageableElementExplicitReference.create(value._OWNER);\n super(ownerReference, value);\n this.ownerReference = ownerReference;\n }\n static create(property) {\n return new PropertyExplicitReference(property);\n }\n}\nexport class PropertyImplicitReference extends PropertyReference {\n ownerReference;\n constructor(ownerReference, value) {\n super(ownerReference, value);\n this.ownerReference = ownerReference;\n }\n static create(ownerReference, value) {\n return new PropertyImplicitReference(ownerReference, value);\n }\n}\n//# sourceMappingURL=PropertyReference.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { createModelSchema, primitive } from 'serializr';\nexport class SourceInformation {\n sourceId;\n line;\n column;\n startLine;\n startColumn;\n endLine;\n endColumn;\n}\ncreateModelSchema(SourceInformation, {\n column: primitive(),\n endLine: primitive(),\n endColumn: primitive(),\n line: primitive(),\n sourceId: primitive(),\n startLine: primitive(),\n startColumn: primitive(),\n});\n//# sourceMappingURL=SourceInformation.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { ClassView, Diagram, GeneralizationView, Point, PropertyView, Rectangle, _relationshipView_simplifyPath, } from '@finos/legend-extension-dsl-diagram/graph';\nimport { Class, CoreModel, DerivedProperty, ELEMENT_PATH_DELIMITER, Enumeration, GenericType, GenericTypeExplicitReference, Multiplicity, PackageableElementExplicitReference, Profile, Property, PropertyExplicitReference, PureModel, resolvePackagePathAndElementName, Stereotype, StereotypeExplicitReference, SystemModel, Tag, TaggedValue, TagExplicitReference, getOrCreatePackage, addElementToPackage, getTag, getStereotype, getOwnProperty, AggregationKind, } from '@finos/legend-graph';\nimport { addUniqueEntry, guaranteeNonNullable, } from '@finos/legend-shared';\nimport { createModelSchema, primitive, object, list, optional, deserialize, custom, SKIP, } from 'serializr';\nimport { SourceInformation } from './SourceInformation.js';\n// ----------------------------------- Shared PURE serialization model ---------------------------------------\n//\n// We don't intend to build Pure graph from these serialization models, hence, we never really want to export them\n// to use outside of this file; their sole purpose is to get the result from the diagram info endpoints\n// to convert to Legend protocol model to use in Legend Studio diagram renderer\n/**\n * Unfortunately, diagram analysis endpoint now return malformed source-information so we need to have this hacky\n * surgery before properly deserialize it.\n */\nconst TEMPORARY__diagramInfoSourceInformationSerializationSchema = custom(() => SKIP, (json) => {\n json.sourceId = json.source;\n return deserialize(SourceInformation, json);\n});\nclass PURE__Profile {\n package;\n name;\n tags = [];\n stereotypes = [];\n}\ncreateModelSchema(PURE__Profile, {\n name: primitive(),\n package: primitive(),\n stereotypes: list(primitive()),\n tags: list(primitive()),\n});\nclass PURE__Steoreotype {\n profile;\n value;\n}\ncreateModelSchema(PURE__Steoreotype, {\n profile: primitive(),\n value: primitive(),\n});\nclass PURE__Tag {\n profile;\n value;\n}\ncreateModelSchema(PURE__Tag, {\n profile: primitive(),\n value: primitive(),\n});\nclass PURE__TaggedValue {\n tag;\n value;\n}\ncreateModelSchema(PURE__TaggedValue, {\n tag: object(PURE__Tag),\n value: primitive(),\n});\nclass PURE__GenericType {\n rawType;\n typeParameter; // this will be specified when for generics case\n}\ncreateModelSchema(PURE__GenericType, {\n rawType: optional(primitive()),\n typeParameter: optional(primitive()),\n});\nclass PURE__Property {\n name;\n stereotypes = [];\n taggedValues = [];\n aggregation;\n multiplicity;\n // parameters // this is meant for qualified properties only\n genericType;\n}\ncreateModelSchema(PURE__Property, {\n aggregation: primitive(),\n genericType: object(PURE__GenericType),\n multiplicity: primitive(),\n name: primitive(),\n stereotypes: list(object(PURE__Steoreotype)),\n taggedValues: list(object(PURE__TaggedValue)),\n});\nclass PURE__PackageableElementPointer {\n package;\n name;\n sourceInformation;\n}\ncreateModelSchema(PURE__PackageableElementPointer, {\n name: primitive(),\n package: primitive(),\n sourceInformation: TEMPORARY__diagramInfoSourceInformationSerializationSchema,\n});\nclass PURE__Class {\n package;\n name;\n sourceInformation;\n stereotypes = [];\n taggedValues = [];\n // typeParameters: string[] = [];\n generalizations = [];\n properties = [];\n qualifiedProperties = [];\n}\ncreateModelSchema(PURE__Class, {\n generalizations: list(object(PURE__GenericType)),\n name: primitive(),\n package: primitive(),\n properties: list(object(PURE__Property)),\n qualifiedProperties: list(object(PURE__Property)),\n sourceInformation: TEMPORARY__diagramInfoSourceInformationSerializationSchema,\n stereotypes: list(object(PURE__Steoreotype)),\n taggedValues: list(object(PURE__TaggedValue)),\n});\nclass PURE__Enumeration {\n package;\n name;\n // sourceInformation!: SourceInformation;\n enumValues = [];\n}\ncreateModelSchema(PURE__Enumeration, {\n name: primitive(),\n package: primitive(),\n enumValues: list(primitive()),\n});\n// -------------------------------------- Diagram -----------------------------------------\nclass PURE__Point {\n x;\n y;\n}\ncreateModelSchema(PURE__Point, {\n x: primitive(),\n y: primitive(),\n});\nclass PURE__Rectangle {\n height;\n width;\n}\ncreateModelSchema(PURE__Rectangle, {\n height: primitive(),\n width: primitive(),\n});\nclass PURE__Geometry {\n points = [];\n}\ncreateModelSchema(PURE__Geometry, {\n points: list(object(PURE__Point)),\n});\nclass PURE__GeneralizationView {\n id;\n source;\n target;\n geometry;\n}\ncreateModelSchema(PURE__GeneralizationView, {\n geometry: object(PURE__Geometry),\n id: primitive(),\n source: primitive(),\n target: primitive(),\n});\nclass PURE__PropertyViewPropertyPointer {\n name;\n owningType;\n}\ncreateModelSchema(PURE__PropertyViewPropertyPointer, {\n name: primitive(),\n owningType: primitive(),\n});\nclass PURE__PropertyView {\n id;\n source;\n target;\n property;\n geometry;\n}\ncreateModelSchema(PURE__PropertyView, {\n geometry: object(PURE__Geometry),\n id: primitive(),\n property: object(PURE__PropertyViewPropertyPointer),\n source: primitive(),\n target: primitive(),\n});\nclass PURE__TypeView {\n id;\n type;\n position;\n rectangleGeometry;\n}\ncreateModelSchema(PURE__TypeView, {\n id: primitive(),\n position: object(PURE__Point),\n rectangleGeometry: object(PURE__Rectangle),\n type: primitive(),\n});\nclass PURE__Diagram {\n package;\n name;\n stereotypes = [];\n taggedValues = [];\n // associationViews\n generalizationViews = [];\n propertyViews = [];\n typeViews = [];\n sourceInformation;\n}\ncreateModelSchema(PURE__Diagram, {\n name: primitive(),\n generalizationViews: list(object(PURE__GeneralizationView)),\n package: primitive(),\n propertyViews: list(object(PURE__PropertyView)),\n sourceInformation: TEMPORARY__diagramInfoSourceInformationSerializationSchema,\n stereotypes: list(object(PURE__Steoreotype)),\n taggedValues: list(object(PURE__TaggedValue)),\n typeViews: list(object(PURE__TypeView)),\n});\n// ----------------------------------- Diagram Info ---------------------------------------\nclass DiagramDomainInfo {\n // associations // skip these for now as we don't support association views\n classes = [];\n enumerations = [];\n profiles = [];\n}\ncreateModelSchema(DiagramDomainInfo, {\n // associations\n classes: list(object(PURE__Class)),\n enumerations: list(object(PURE__Enumeration)),\n profiles: list(object(PURE__Profile)),\n});\nexport class DiagramInfo {\n name;\n diagram;\n domainInfo;\n}\ncreateModelSchema(DiagramInfo, {\n diagram: object(PURE__Diagram),\n name: primitive(),\n domainInfo: optional(object(DiagramDomainInfo)),\n});\nexport class DiagramClassInfo {\n // associations\n class;\n enumerations = [];\n profiles = [];\n specializations = [];\n}\ncreateModelSchema(DiagramClassInfo, {\n // associations\n class: object(PURE__Class),\n enumerations: list(object(PURE__Enumeration)),\n profiles: list(object(PURE__Profile)),\n specializations: list(object(PURE__PackageableElementPointer)),\n});\n// ----------------------------------------- Serializer --------------------------------------------\n/**\n * Serialize the diagram in Studio to Pure grammar for M2 DSL Diagram\n * so we can persist it.\n */\nexport const serializeDiagram = (diagram) => {\n const typeViews = diagram.classViews.map((cv) => ` TypeView ${cv.id}(\\n` +\n ` type=${cv.class.value.path},\\n` +\n ` position=(${cv.position.x.toFixed(5)}, ${cv.position.y.toFixed(5)}),\\n` +\n ` width=${cv.rectangle.width.toFixed(5)},\\n` +\n ` height=${cv.rectangle.height.toFixed(5)},\\n` +\n ` stereotypesVisible=true,\\n` +\n ` attributesVisible=true,\\n` +\n ` attributeStereotypesVisible=true,\\n` +\n ` attributeTypesVisible=true,\\n` +\n ` color=#FFFFCC,\\n` +\n ` lineWidth=1.0)`);\n const generalizationViews = diagram.generalizationViews.map((gv, idx) => \n // NOTE: the relationship views in Diagram protocols don't have an ID\n ` GeneralizationView gview_${idx}(\\n` +\n ` source=${gv.from.classView.value.id},\\n` +\n ` target=${gv.to.classView.value.id},\\n` +\n ` points=[${gv\n .buildFullPath()\n .map((pos) => `(${pos.x.toFixed(5)},${pos.y.toFixed(5)})`)\n .join(',')}],\\n` +\n ` label='',\\n` +\n ` color=#000000,\\n` +\n ` lineWidth=-1.0,\\n` +\n ` lineStyle=SIMPLE)`);\n const propertyViews = diagram.propertyViews.map((pv, idx) => ` PropertyView pview_${idx}(\\n` +\n ` property=${pv.property.value._OWNER.path}.${pv.property.value.name},\\n` +\n ` source=${pv.from.classView.value.id},\\n` +\n ` target=${pv.to.classView.value.id},\\n` +\n ` points=[${pv\n .buildFullPath()\n .map((pos) => `(${pos.x.toFixed(5)},${pos.y.toFixed(5)})`)\n .join(',')}],\\n` +\n ` label='',\\n` +\n ` propertyPosition=(0.0,0.0),\\n` +\n ` multiplicityPosition=(0.0,0.0),\\n` +\n ` color=#000000,\\n` +\n ` lineWidth=-1.0,\\n` +\n ` stereotypesVisible=true,\\n` +\n ` nameVisible=true,\\n` +\n ` lineStyle=SIMPLE)`);\n return (`Diagram ${diagram.path}(width=0.0, height=0.0)\\n` +\n `{\\n` +\n `${[...typeViews, ...generalizationViews, ...propertyViews].join('\\n\\n')}\\n` +\n `}`);\n};\nconst getOrCreateClass = (path, graph, diagramClasses, sourceInformation) => {\n const existingClass = graph.getOwnNullableClass(path);\n if (!existingClass) {\n const [_package, name] = resolvePackagePathAndElementName(path);\n const _class = new Class(name);\n addElementToPackage(getOrCreatePackage(graph.root, _package, true, new Map()), _class);\n graph.setOwnType(path, _class);\n diagramClasses.set(path, {\n isStubbed: true,\n sourceInformation,\n });\n return _class;\n }\n return existingClass;\n};\nconst parseMultiplicty = (text) => {\n if (text === '*') {\n return new Multiplicity(0, undefined);\n }\n else {\n const parts = text.split('..');\n if (parts.length === 1) {\n return new Multiplicity(parseInt(guaranteeNonNullable(parts[0]), 10), parseInt(guaranteeNonNullable(parts[0]), 10));\n }\n else if (parts.length === 2) {\n return new Multiplicity(parseInt(guaranteeNonNullable(parts[0]), 10), parts[1] === '*'\n ? undefined\n : parseInt(guaranteeNonNullable(parts[1]), 10));\n }\n throw new Error(`Can't parse multiplicity value '${text}'`);\n }\n};\nconst buildClass = (_class, classData, graph, diagramClasses) => {\n classData.taggedValues.forEach((taggedValueData) => {\n addUniqueEntry(_class.taggedValues, new TaggedValue(TagExplicitReference.create(getTag(graph.getProfile(taggedValueData.tag.profile), taggedValueData.tag.value)), taggedValueData.value));\n });\n classData.stereotypes.forEach((stereotypeData) => {\n addUniqueEntry(_class.stereotypes, StereotypeExplicitReference.create(getStereotype(graph.getProfile(stereotypeData.profile), stereotypeData.value)));\n });\n classData.generalizations\n .filter((superTypeData) => Boolean(superTypeData.rawType))\n .forEach((superTypeData) => {\n const superClass = getOrCreateClass(guaranteeNonNullable(superTypeData.rawType), graph, diagramClasses, undefined);\n addUniqueEntry(_class.generalizations, GenericTypeExplicitReference.create(new GenericType(superClass)));\n addUniqueEntry(superClass._subclasses, _class);\n });\n classData.properties\n .filter((propertyData) => Boolean(propertyData.genericType.rawType))\n .forEach((propertyData) => {\n const newProperty = new Property(propertyData.name, parseMultiplicty(propertyData.multiplicity), GenericTypeExplicitReference.create(new GenericType(graph.getOwnNullableEnumeration(guaranteeNonNullable(propertyData.genericType.rawType)) ??\n getOrCreateClass(guaranteeNonNullable(propertyData.genericType.rawType), graph, diagramClasses, undefined))), _class);\n newProperty.aggregation =\n propertyData.aggregation === 'Composite'\n ? AggregationKind.COMPOSITE\n : propertyData.aggregation === 'Shared'\n ? AggregationKind.SHARED\n : undefined;\n addUniqueEntry(_class.properties, newProperty);\n });\n classData.qualifiedProperties\n .filter((propertyData) => propertyData.genericType.rawType)\n .forEach((propertyData) => {\n addUniqueEntry(_class.derivedProperties, new DerivedProperty(propertyData.name, parseMultiplicty(propertyData.multiplicity), GenericTypeExplicitReference.create(new GenericType(graph.getOwnNullableEnumeration(guaranteeNonNullable(propertyData.genericType.rawType)) ??\n getOrCreateClass(guaranteeNonNullable(propertyData.genericType.rawType), graph, diagramClasses, undefined))), _class));\n });\n};\n/**\n * Since the diagram renderer uses Studio metamodel, here we build\n * Studio metamodel graph and diagram from the Pure IDE diagram info\n * to make use of the renderer.\n */\nexport const buildGraphFromDiagramInfo = (diagramInfo) => {\n const graph = new PureModel(new CoreModel([]), new SystemModel([]), []);\n const diagramClasses = new Map();\n // domain\n if (diagramInfo.domainInfo) {\n const domain = diagramInfo.domainInfo;\n // first pass: add all the listed types and do really basic processing\n domain.classes.forEach((classData) => {\n const _class = new Class(classData.name);\n addElementToPackage(getOrCreatePackage(graph.root, classData.package, true, new Map()), _class);\n graph.setOwnType(_class.path, _class);\n diagramClasses.set(_class.path, {\n sourceInformation: classData.sourceInformation,\n isStubbed: false,\n });\n });\n domain.profiles.forEach((profileData) => {\n const profile = new Profile(profileData.name);\n addElementToPackage(getOrCreatePackage(graph.root, profileData.package, true, new Map()), profile);\n graph.setOwnProfile(profile.path, profile);\n profileData.tags.forEach((value) => addUniqueEntry(profile.p_tags, new Tag(profile, value)));\n profileData.stereotypes.forEach((value) => addUniqueEntry(profile.p_stereotypes, new Stereotype(profile, value)));\n });\n domain.enumerations.forEach((enumerationData) => {\n const enumeration = new Enumeration(enumerationData.name);\n addElementToPackage(getOrCreatePackage(graph.root, enumerationData.package, true, new Map()), enumeration);\n graph.setOwnType(enumeration.path, enumeration);\n // NOTE: there is no need to pocess enumeration enum values since diagram does not need them\n });\n // second pass\n domain.classes.forEach((classData) => {\n const fullPath = `${classData.package}${classData.package === '' ? '' : ELEMENT_PATH_DELIMITER}${classData.name}`;\n const _class = graph.getClass(fullPath);\n buildClass(_class, classData, graph, diagramClasses);\n });\n }\n // diagram\n const diagramData = diagramInfo.diagram;\n const diagram = new Diagram(diagramData.name);\n addElementToPackage(getOrCreatePackage(graph.root, diagramData.package, true, new Map()), diagram);\n diagramData.typeViews.forEach((typeViewData) => {\n const classView = new ClassView(diagram, typeViewData.id, PackageableElementExplicitReference.create(graph.getClass(typeViewData.type)));\n classView.position = new Point(typeViewData.position.x, typeViewData.position.y);\n classView.rectangle = new Rectangle(typeViewData.rectangleGeometry.width, typeViewData.rectangleGeometry.height);\n addUniqueEntry(diagram.classViews, classView);\n });\n diagramData.propertyViews.forEach((propertyViewData) => {\n const propertyView = new PropertyView(diagram, PropertyExplicitReference.create(getOwnProperty(graph.getClass(propertyViewData.property.owningType), propertyViewData.property.name)), guaranteeNonNullable(diagram.classViews.find((cv) => cv.id === propertyViewData.source)), guaranteeNonNullable(diagram.classViews.find((cv) => cv.id === propertyViewData.target)));\n propertyView.path = propertyViewData.geometry.points.map((pointData) => new Point(pointData.x, pointData.y));\n _relationshipView_simplifyPath(propertyView); // transform the line because we store only 2 end points that are inside points and we will calculate the offset\n addUniqueEntry(diagram.propertyViews, propertyView);\n });\n diagramData.generalizationViews.forEach((generationViewData) => {\n const generalizationView = new GeneralizationView(diagram, guaranteeNonNullable(diagram.classViews.find((cv) => cv.id === generationViewData.source)), guaranteeNonNullable(diagram.classViews.find((cv) => cv.id === generationViewData.target)));\n generalizationView.path = generationViewData.geometry.points.map((pointData) => new Point(pointData.x, pointData.y));\n _relationshipView_simplifyPath(generalizationView); // transform the line because we store only 2 end points that are inside points and we will calculate the offset\n addUniqueEntry(diagram.generalizationViews, generalizationView);\n });\n return [diagram, graph, diagramClasses];\n};\nexport const addClassToGraph = (diagramClassInfo, graph, diagramClasses) => {\n // profiles\n diagramClassInfo.profiles.forEach((profileData) => {\n const profilePath = `${profileData.package}${profileData.package === '' ? '' : ELEMENT_PATH_DELIMITER}${profileData.name}`;\n if (!graph.getOwnNullableProfile(profilePath)) {\n const profile = new Profile(profileData.name);\n addElementToPackage(getOrCreatePackage(graph.root, profileData.package, true, new Map()), profile);\n graph.setOwnProfile(profile.path, profile);\n profileData.tags.forEach((value) => addUniqueEntry(profile.p_tags, new Tag(profile, value)));\n profileData.stereotypes.forEach((value) => addUniqueEntry(profile.p_stereotypes, new Stereotype(profile, value)));\n }\n });\n // enumerations\n diagramClassInfo.enumerations.forEach((enumerationData) => {\n const enumerationPath = `${enumerationData.package}${enumerationData.package === '' ? '' : ELEMENT_PATH_DELIMITER}${enumerationData.name}`;\n if (!graph.getOwnNullableEnumeration(enumerationPath)) {\n const enumeration = new Enumeration(enumerationData.name);\n addElementToPackage(getOrCreatePackage(graph.root, enumerationData.package, true, new Map()), enumeration);\n graph.setOwnType(enumeration.path, enumeration);\n // NOTE: there is no need to pocess enumeration enum values since diagram does not need them\n }\n });\n const classData = diagramClassInfo.class;\n const classPath = `${classData.package}${classData.package === '' ? '' : ELEMENT_PATH_DELIMITER}${classData.name}`;\n let _class = graph.getOwnNullableClass(classPath);\n if (!_class) {\n _class = new Class(classData.name);\n addElementToPackage(getOrCreatePackage(graph.root, classData.package, true, new Map()), _class);\n graph.setOwnType(_class.path, _class);\n }\n const isCurrentlyStubbed = diagramClasses.get(_class.path)?.isStubbed ?? true;\n diagramClasses.set(_class.path, {\n sourceInformation: classData.sourceInformation,\n isStubbed: false,\n });\n diagramClassInfo.specializations.forEach((subTypePointer) => {\n const currentClass = guaranteeNonNullable(_class);\n const subClass = getOrCreateClass(guaranteeNonNullable(`${subTypePointer.package}${subTypePointer.package === '' ? '' : ELEMENT_PATH_DELIMITER}${subTypePointer.name}`), graph, diagramClasses, subTypePointer.sourceInformation);\n addUniqueEntry(currentClass._subclasses, subClass);\n if (!subClass.generalizations\n .map((generalization) => generalization.value.rawType)\n .includes(currentClass)) {\n addUniqueEntry(subClass.generalizations, GenericTypeExplicitReference.create(new GenericType(currentClass)));\n }\n });\n if (isCurrentlyStubbed) {\n buildClass(_class, classData, graph, diagramClasses);\n }\n return _class;\n};\n//# sourceMappingURL=DiagramInfo.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { DATE_FORMAT, ELEMENT_PATH_DELIMITER, MULTIPLICITY_INFINITE, MULTIPLICITY_RANGE_OPERATOR, PRIMITIVE_TYPE, } from '../MetaModelConst.js';\nimport { PrimitiveType } from '../metamodel/pure/packageableElements/domain/PrimitiveType.js';\nimport { Enumeration } from '../metamodel/pure/packageableElements/domain/Enumeration.js';\nimport { formatDate } from '@finos/legend-shared';\nexport var PURE_ELEMENT_NAME;\n(function (PURE_ELEMENT_NAME) {\n PURE_ELEMENT_NAME[\"PROFILE\"] = \"Profile\";\n PURE_ELEMENT_NAME[\"CLASS\"] = \"Class\";\n PURE_ELEMENT_NAME[\"ENUMERATION\"] = \"Enum\";\n PURE_ELEMENT_NAME[\"MEASURE\"] = \"Measure\";\n PURE_ELEMENT_NAME[\"ASSOCIATION\"] = \"Association\";\n PURE_ELEMENT_NAME[\"FUNCTION\"] = \"function\";\n PURE_ELEMENT_NAME[\"MAPPING\"] = \"Mapping\";\n PURE_ELEMENT_NAME[\"FLAT_DATA\"] = \"FlatData\";\n PURE_ELEMENT_NAME[\"DATABASE\"] = \"Database\";\n PURE_ELEMENT_NAME[\"SERVICE\"] = \"Service\";\n PURE_ELEMENT_NAME[\"RUNTIME\"] = \"Runtime\";\n PURE_ELEMENT_NAME[\"CONNECTION\"] = \"Connection\";\n PURE_ELEMENT_NAME[\"FILE_GENERATION\"] = \"FileGeneration\";\n PURE_ELEMENT_NAME[\"GENERATION_SPECIFICATION\"] = \"GenerationSpecification\";\n PURE_ELEMENT_NAME[\"DATA_ELEMENT\"] = \"Data\";\n PURE_ELEMENT_NAME[\"EXECUTION_ENVIRONMENT\"] = \"ExecutionEnvironment\";\n})(PURE_ELEMENT_NAME || (PURE_ELEMENT_NAME = {}));\nexport var PURE_CONNECTION_NAME;\n(function (PURE_CONNECTION_NAME) {\n PURE_CONNECTION_NAME[\"JSON_MODEL_CONNECTION\"] = \"JsonModelConnection\";\n PURE_CONNECTION_NAME[\"XML_MODEL_CONNECTION\"] = \"XmlModelConnection\";\n PURE_CONNECTION_NAME[\"MODEL_CHAIN_CONNECTION\"] = \"ModelChainConnection\";\n PURE_CONNECTION_NAME[\"RELATIONAL_DATABASE_CONNECTION\"] = \"RelationalDatabaseConnection\";\n PURE_CONNECTION_NAME[\"FLAT_DATA_CONNECTION\"] = \"FlatDataConnection\";\n})(PURE_CONNECTION_NAME || (PURE_CONNECTION_NAME = {}));\nexport var PURE_PARSER;\n(function (PURE_PARSER) {\n PURE_PARSER[\"PURE\"] = \"Pure\";\n PURE_PARSER[\"CONNECTION\"] = \"Connection\";\n PURE_PARSER[\"RUNTIME\"] = \"Runtime\";\n PURE_PARSER[\"MAPPING\"] = \"Mapping\";\n PURE_PARSER[\"SERVICE\"] = \"Service\";\n PURE_PARSER[\"FLATDATA\"] = \"FlatData\";\n PURE_PARSER[\"RELATIONAL\"] = \"Relational\";\n PURE_PARSER[\"GENERATION_SPECIFICATION\"] = \"GenerationSpecification\";\n PURE_PARSER[\"FILE_GENERATION_SPECIFICATION\"] = \"FileGeneration\";\n PURE_PARSER[\"DATA\"] = \"Data\";\n})(PURE_PARSER || (PURE_PARSER = {}));\nexport const generateMultiplicityString = (lowerBound, upperBound) => {\n if (lowerBound === upperBound) {\n return lowerBound.toString();\n }\n else if (lowerBound === 0 && upperBound === undefined) {\n return MULTIPLICITY_INFINITE;\n }\n return `${lowerBound}${MULTIPLICITY_RANGE_OPERATOR}${upperBound ?? MULTIPLICITY_INFINITE}`;\n};\nexport const generateDefaultParameterValueForType = (type, index) => {\n if (!type) {\n return `param${index}`;\n }\n if (type instanceof Enumeration) {\n return type.values.length !== 0\n ? `${type.path}.${type.values[0]?.name}`\n : `param${index}`;\n }\n else if (type instanceof PrimitiveType) {\n switch (type.name) {\n case PRIMITIVE_TYPE.BOOLEAN:\n return true;\n case PRIMITIVE_TYPE.FLOAT:\n case PRIMITIVE_TYPE.DECIMAL:\n return 0.0;\n case PRIMITIVE_TYPE.NUMBER:\n case PRIMITIVE_TYPE.INTEGER:\n return 0;\n case PRIMITIVE_TYPE.DATE:\n case PRIMITIVE_TYPE.STRICTDATE:\n return `%${formatDate(new Date(), DATE_FORMAT)}`;\n case PRIMITIVE_TYPE.DATETIME:\n return `%${formatDate(new Date(), DATE_FORMAT)}T00:00:00`;\n case PRIMITIVE_TYPE.STRICTTIME:\n return `%00:00:00`;\n case PRIMITIVE_TYPE.STRING:\n return \"''\";\n default:\n return `param${index}`;\n }\n }\n // Other non-primitive types, e.g. Class\n return `param${index}`;\n};\nexport const generateFunctionCallString = (element) => {\n let lambdaString = '';\n if (element.parameters.length > 0) {\n for (let i = 0; i < element.parameters.length; i++) {\n const paramType = element.parameters[i]?.type.value;\n const separator = i !== element.parameters.length - 1 ? ', ' : '';\n lambdaString =\n lambdaString +\n generateDefaultParameterValueForType(paramType, i) +\n separator;\n }\n }\n return `${element.package?.path}${ELEMENT_PATH_DELIMITER}${element.functionName}(${lambdaString})`;\n};\nexport const generateFunctionCallStringFromFunctionAnalysisInfo = (graph, functionInfo) => {\n let lambdaString = '';\n const parameterLength = functionInfo.parameterInfoList.length;\n if (parameterLength > 0) {\n for (let i = 0; i < parameterLength; i++) {\n const info = functionInfo.parameterInfoList[i];\n let paramType;\n if (info !== undefined) {\n try {\n paramType = graph.getType(info.type);\n }\n catch {\n // graph might not contain classes used as type, do nothing here\n }\n }\n const separator = i !== parameterLength - 1 ? ', ' : '';\n lambdaString =\n lambdaString +\n generateDefaultParameterValueForType(paramType, i) +\n separator;\n }\n }\n return `${functionInfo.packagePath}${ELEMENT_PATH_DELIMITER}${functionInfo.functionName}(${lambdaString})`;\n};\nexport const generateGenericTypeString = (type) => {\n return (type.rawType.name +\n (type.typeArguments?.length\n ? `<${type.typeArguments.map((t) => generateGenericTypeString(t.value)).join(', ')}>`\n : ''));\n};\nexport const generateFunctionPrettyName = (element, options) => `${options?.fullPath ? `${element.package?.path}${ELEMENT_PATH_DELIMITER}` : ''}${element.functionName}(${element.parameters\n .map((p) => !options?.notIncludeParamName\n ? `${p.name}: ${p.type.value.name}[${generateMultiplicityString(p.multiplicity.lowerBound, p.multiplicity.upperBound)}]`\n : `${p.type.value.name}[${generateMultiplicityString(p.multiplicity.lowerBound, p.multiplicity.upperBound)}]`)\n .join(', ')}): ${generateGenericTypeString(element.returnType.value)}[${generateMultiplicityString(element.returnMultiplicity.lowerBound, element.returnMultiplicity.upperBound)}]`.replaceAll(/\\s*/gu, (val) => {\n if (options?.spacing) {\n return val;\n }\n return '';\n});\n//# sourceMappingURL=PureLanguageHelper.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { hashArray } from '@finos/legend-shared';\nimport { PropertyHolderView } from './DSL_Diagram_PropertyHolderView.js';\nimport { DIAGRAM_HASH_STRUCTURE } from '../../../../DSL_Diagram_HashUtils.js';\nexport class AssociationView extends PropertyHolderView {\n association;\n constructor(owner, association, property, from, to) {\n super(owner, property, from, to);\n this.association = association;\n }\n get hashCode() {\n return hashArray([\n DIAGRAM_HASH_STRUCTURE.ASSOCIATION_VIEW,\n super.hashCode,\n this.association.valueForSerialization ?? '',\n ]);\n }\n}\n//# sourceMappingURL=DSL_Diagram_AssociationView.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { uuid, noop, UnsupportedOperationError, IllegalStateError, guaranteeNonNullable, findLast, uniqBy, } from '@finos/legend-shared';\nimport { Class, Enumeration, PrimitiveType, DerivedProperty, PackageableElementExplicitReference, PropertyExplicitReference, GenericTypeExplicitReference, GenericType, Property, Multiplicity, getAllSuperclasses, getAllOwnClassProperties, generateMultiplicityString, getRawGenericType, AggregationKind, } from '@finos/legend-graph';\nimport { action, makeObservable, observable } from 'mobx';\nimport { Rectangle } from '../graph/metamodel/pure/packageableElements/diagram/geometry/DSL_Diagram_Rectangle.js';\nimport { Point } from '../graph/metamodel/pure/packageableElements/diagram/geometry/DSL_Diagram_Point.js';\nimport { PositionedRectangle } from '../graph/metamodel/pure/packageableElements/diagram/geometry/DSL_Diagram_PositionedRectangle.js';\nimport { ClassView } from '../graph/metamodel/pure/packageableElements/diagram/DSL_Diagram_ClassView.js';\nimport { GeneralizationView } from '../graph/metamodel/pure/packageableElements/diagram/DSL_Diagram_GeneralizationView.js';\nimport { RelationshipView } from '../graph/metamodel/pure/packageableElements/diagram/DSL_Diagram_RelationshipView.js';\nimport { PropertyView } from '../graph/metamodel/pure/packageableElements/diagram/DSL_Diagram_PropertyView.js';\nimport { boxContains, buildBottomRightCornerBox, getBottomRightCornerPoint, getElementPosition, rotatePointX, rotatePointY, } from '../graph/helpers/DSL_Diagram_Helper.js';\nimport { AssociationView } from '../graph/metamodel/pure/packageableElements/diagram/DSL_Diagram_AssociationView.js';\nexport class DiagramAnalysisResult {\n uuid = uuid();\n title;\n description;\n diagram;\n}\nexport var DIAGRAM_INTERACTION_MODE;\n(function (DIAGRAM_INTERACTION_MODE) {\n DIAGRAM_INTERACTION_MODE[DIAGRAM_INTERACTION_MODE[\"LAYOUT\"] = 0] = \"LAYOUT\";\n DIAGRAM_INTERACTION_MODE[DIAGRAM_INTERACTION_MODE[\"PAN\"] = 1] = \"PAN\";\n DIAGRAM_INTERACTION_MODE[DIAGRAM_INTERACTION_MODE[\"ZOOM_IN\"] = 2] = \"ZOOM_IN\";\n DIAGRAM_INTERACTION_MODE[DIAGRAM_INTERACTION_MODE[\"ZOOM_OUT\"] = 3] = \"ZOOM_OUT\";\n DIAGRAM_INTERACTION_MODE[DIAGRAM_INTERACTION_MODE[\"ADD_RELATIONSHIP\"] = 4] = \"ADD_RELATIONSHIP\";\n DIAGRAM_INTERACTION_MODE[DIAGRAM_INTERACTION_MODE[\"ADD_CLASS\"] = 5] = \"ADD_CLASS\";\n})(DIAGRAM_INTERACTION_MODE || (DIAGRAM_INTERACTION_MODE = {}));\nexport var DIAGRAM_RELATIONSHIP_EDIT_MODE;\n(function (DIAGRAM_RELATIONSHIP_EDIT_MODE) {\n // ASSOCIATION,\n DIAGRAM_RELATIONSHIP_EDIT_MODE[DIAGRAM_RELATIONSHIP_EDIT_MODE[\"PROPERTY\"] = 0] = \"PROPERTY\";\n DIAGRAM_RELATIONSHIP_EDIT_MODE[DIAGRAM_RELATIONSHIP_EDIT_MODE[\"INHERITANCE\"] = 1] = \"INHERITANCE\";\n DIAGRAM_RELATIONSHIP_EDIT_MODE[DIAGRAM_RELATIONSHIP_EDIT_MODE[\"NONE\"] = 2] = \"NONE\";\n})(DIAGRAM_RELATIONSHIP_EDIT_MODE || (DIAGRAM_RELATIONSHIP_EDIT_MODE = {}));\nexport var DIAGRAM_ALIGNER_OPERATOR;\n(function (DIAGRAM_ALIGNER_OPERATOR) {\n DIAGRAM_ALIGNER_OPERATOR[DIAGRAM_ALIGNER_OPERATOR[\"ALIGN_LEFT\"] = 0] = \"ALIGN_LEFT\";\n DIAGRAM_ALIGNER_OPERATOR[DIAGRAM_ALIGNER_OPERATOR[\"ALIGN_CENTER\"] = 1] = \"ALIGN_CENTER\";\n DIAGRAM_ALIGNER_OPERATOR[DIAGRAM_ALIGNER_OPERATOR[\"ALIGN_RIGHT\"] = 2] = \"ALIGN_RIGHT\";\n DIAGRAM_ALIGNER_OPERATOR[DIAGRAM_ALIGNER_OPERATOR[\"ALIGN_TOP\"] = 3] = \"ALIGN_TOP\";\n DIAGRAM_ALIGNER_OPERATOR[DIAGRAM_ALIGNER_OPERATOR[\"ALIGN_MIDDLE\"] = 4] = \"ALIGN_MIDDLE\";\n DIAGRAM_ALIGNER_OPERATOR[DIAGRAM_ALIGNER_OPERATOR[\"ALIGN_BOTTOM\"] = 5] = \"ALIGN_BOTTOM\";\n DIAGRAM_ALIGNER_OPERATOR[DIAGRAM_ALIGNER_OPERATOR[\"SPACE_HORIZONTALLY\"] = 6] = \"SPACE_HORIZONTALLY\";\n DIAGRAM_ALIGNER_OPERATOR[DIAGRAM_ALIGNER_OPERATOR[\"SPACE_VERTICALLY\"] = 7] = \"SPACE_VERTICALLY\";\n})(DIAGRAM_ALIGNER_OPERATOR || (DIAGRAM_ALIGNER_OPERATOR = {}));\nconst MIN_ZOOM_LEVEL = 0.05; // 5%\nconst FIT_ZOOM_PADDING = 10;\nexport const DIAGRAM_ZOOM_LEVELS = [\n 50, 75, 90, 100, 110, 125, 150, 200, 250, 300, 400,\n];\nconst getPropertyDisplayName = (property) => (property instanceof DerivedProperty ? '/ ' : '') + property.name;\nexport class DiagramRenderer {\n diagram;\n isReadOnly;\n enableLayoutAutoAdjustment;\n div;\n canvas;\n ctx;\n // Rendering elements\n canvasDimension; // dimension of the canvas, i.e. the dimension of the container element that hosts the canvas\n canvasCenter;\n /**\n * The screen or artboard that contains all parts of the diagram. It's important to understand that this is indeed a virtual screen\n * because it is constructed by constructing the smallest possible bounding rectangle around the diagram. As such, information about\n * the screen is not persisted (in the protocol JSON)\n */\n virtualScreen;\n /**\n * This refers the offset of the virtual screen with respect to the canvas. We have 2 types of coordinate:\n * `stored` (in the JSON protocol of class and relationship views) vs. `rendering`.\n *\n * There are 2 important facts about stored coordinates:\n * 1. Zoom is not taken into account (unlike rendering coordinates which change as we zoom)\n * 2. They are with respect to the canvas, not the screen (because the screen is virtual - see above)\n *\n * As such, when we debug, let's say we have a position (x,y), if we want to find that coordinate in the coordiante system of the canvas, we have to\n * add the offset, so the coordinate of (x, y) is (x + screenOffset.x, y + screenOffset.y) when we refer to the canvas coordinate system\n * So if we turn on debug mode and try to move the top left corner of the screen to the `offset crosshair` the screen coordinate system should align\n * with the canvas coordinate system. Of course due to centering and moving the screen around there is still an offset between the 2 coordinate system,\n * but we know for a fact that the top left of the screen will have stored coordinate (0,0)\n */\n screenOffset;\n zoom;\n // edit modes\n // NOTE: we keep the edit mode separated like this\n // becase we anticipate more complex interactions in the future\n interactionMode;\n relationshipMode;\n // UML specific shapes\n triangle;\n diamond;\n // Font\n fontFamily;\n fontSize;\n lineHeight;\n // Wrap text\n truncateText;\n maxLineLength;\n // TODO: we might want to do text wrapping as well\n // Spacing\n screenPadding; // the padding of the diagram (art board)\n classViewSpaceX;\n classViewSpaceY;\n propertySpacing;\n // Screen Grid (for debugging)\n showScreenGrid; // show the screen coordinate system\n showScreenBoxGuide; // show the screen border box and center\n screenGridAxisTickLength;\n screenGridSpacingX;\n screenGridSpacingY;\n screenGridLineWidth;\n screenGridLineColor;\n screenGridLabelTextColor;\n screenGuideLineColor;\n screenGuideLabelTextColor;\n // Canvas Grid (for debugging)\n showCanvasGrid; // show the canvas coordinate system\n showCanvasBoxGuide; // show the canvas border box and center\n showScreenOffsetGuide; // show the offset of the screen with respect to the canvas\n canvasGridAxisTickLength;\n canvasGridSpacingX;\n canvasGridSpacingY;\n canvasGridLineWidth;\n canvasGridLineColor;\n canvasGridLabelTextColor;\n canvasGuideLineColor;\n canvasGuideLabelTextColor;\n screenOffsetGuideLineColor;\n screenOffsetGuideLabelTextColor;\n // Line\n defaultLineWidth;\n // Color\n defaultLineColor;\n canvasColor;\n backgroundColor;\n classViewFillColor;\n classViewHeaderTextColor;\n classViewPropertyTextColor;\n classViewPrimitivePropertyTextColor;\n classViewDerivedPropertyTextColor;\n relationshipViewTextColor;\n propertyViewOwnedDiamondColor;\n propertyViewSharedDiamondColor;\n generalizationViewInheritanceTriangeFillColor;\n selectionBoxBorderColor;\n // Selection\n selection;\n selectionStart;\n selectedClassCorner; // the class view which we currently select the bottom right corner\n selectedClassProperty;\n selectedClasses;\n selectedPropertyOrAssociation;\n selectedInheritance;\n selectedPoint;\n _selectedClassesInitialPositions;\n // Relationship\n startClassView;\n handleAddRelationship;\n mouseOverClassCorner;\n mouseOverClassName;\n mouseOverClassView;\n mouseOverClassProperty;\n mouseOverPropertyHolderViewLabel;\n cursorPosition;\n callbacks;\n leftClick;\n middleClick;\n rightClick;\n clickX;\n clickY;\n positionBeforeLastMove;\n // interactions\n onAddClassViewClick = noop();\n onClassViewRightClick = noop();\n onBackgroundDoubleClick;\n onClassViewDoubleClick;\n onClassNameDoubleClick;\n onClassPropertyDoubleClick;\n handleEditClassView = noop();\n handleEditProperty = noop();\n handleAddSimpleProperty = noop();\n constructor(div, diagram, callbacks) {\n makeObservable(this, {\n isReadOnly: observable,\n enableLayoutAutoAdjustment: observable,\n interactionMode: observable,\n relationshipMode: observable,\n zoom: observable,\n mouseOverClassView: observable,\n mouseOverClassName: observable,\n mouseOverClassCorner: observable,\n mouseOverClassProperty: observable,\n mouseOverPropertyHolderViewLabel: observable,\n selectionStart: observable,\n selectedClassCorner: observable,\n selectedClasses: observable,\n selectedPropertyOrAssociation: observable,\n selectedInheritance: observable,\n leftClick: observable,\n middleClick: observable,\n rightClick: observable,\n changeMode: action,\n setIsReadOnly: action,\n setEnableLayoutAutoAdjustment: action,\n setMouseOverClassView: action,\n setMouseOverClassName: action,\n setMouseOverClassCorner: action,\n setMouseOverClassProperty: action,\n setMouseOverPropertyHolderViewLabel: action,\n setSelectionStart: action,\n setSelectedClassCorner: action,\n setSelectedClasses: action,\n setSelectedPropertyOrAssociation: action,\n setSelectedInheritance: action,\n setLeftClick: action,\n setMiddleClick: action,\n setRightClick: action,\n setZoomLevel: action,\n align: action,\n });\n this.diagram = diagram;\n this.callbacks = callbacks;\n // Container and canvas\n this.div = div;\n this.div.childNodes.forEach((node) => this.div.removeChild(node)); // Clear the <div> container\n this.canvas = document.createElement('canvas');\n this.canvasDimension = new Rectangle(this.div.offsetWidth, this.div.offsetHeight);\n this.canvasCenter = new Point(this.canvasDimension.width / 2, this.canvasDimension.height / 2);\n this.canvas.width = this.canvasDimension.width;\n this.canvas.height = this.canvasDimension.height;\n this.canvas.style.position = 'absolute';\n this.canvas.style.left = '0';\n this.canvas.style.top = '0';\n this.div.appendChild(this.canvas);\n this.ctx = this.canvas.getContext('2d');\n this.screenOffset = new Point(0, 0);\n this.virtualScreen = new PositionedRectangle(new Point(0, 0), new Rectangle(0, 0));\n this.zoom = 1;\n // UML specific shapes\n this.triangle = [new Point(0, 0), new Point(-15, -10), new Point(-15, 10)];\n this.diamond = [\n new Point(0, 0),\n new Point(-10, -5),\n new Point(-20, 0),\n new Point(-10, 5),\n ];\n // Font\n // this.fontFamily = 'Roboto Mono'; // intentionally choose a monospaced font so it's easier for calculation (such as text wrapping)\n this.fontFamily = 'Arial'; // convert this back to non-monospaced font for now since monospaced fonts look rather off\n this.fontSize = 12;\n this.lineHeight = 14;\n // Wrap text\n this.truncateText = true;\n this.maxLineLength = 40;\n // Screen Grid (for debugging purpose)\n this.showScreenGrid = false;\n this.showScreenBoxGuide = true;\n this.screenGridAxisTickLength = 50;\n this.screenGridSpacingX = 100;\n this.screenGridSpacingY = 100;\n this.screenGridLineWidth = 0.5;\n // Canvas Grid\n this.showCanvasGrid = false;\n this.showCanvasBoxGuide = true;\n this.showScreenOffsetGuide = true;\n this.canvasGridAxisTickLength = 50;\n this.canvasGridSpacingX = 100;\n this.canvasGridSpacingY = 100;\n this.canvasGridLineWidth = 0.5;\n // Line\n this.defaultLineWidth = 1;\n // Color\n this.screenGridLineColor = 'rgba(61,126,154,0.56)';\n this.screenGridLabelTextColor = 'rgba(61,126,154,0.56)';\n this.screenGuideLineColor = 'red';\n this.screenGuideLabelTextColor = 'red';\n this.canvasGridLineColor = 'green';\n this.canvasGridLabelTextColor = 'green';\n this.canvasGuideLineColor = 'orange';\n this.canvasGuideLabelTextColor = 'orange';\n this.screenOffsetGuideLineColor = 'purple';\n this.screenOffsetGuideLabelTextColor = 'purple';\n this.defaultLineColor = 'rgb(0,0,0)';\n this.canvasColor = 'rgb(220,220,220)';\n this.backgroundColor = 'rgb(255,255,255)';\n this.classViewFillColor = 'rgb(185,185,185)';\n this.classViewHeaderTextColor = 'rgb(0,0,0)';\n this.classViewPropertyTextColor = 'rgb(0,0,0)';\n this.classViewPrimitivePropertyTextColor = 'rgb(255,255,255)';\n this.classViewDerivedPropertyTextColor = 'rgb(100,100,100)';\n this.relationshipViewTextColor = 'rgb(0,0,0)';\n this.propertyViewSharedDiamondColor = 'rgb(255,255,255)';\n this.propertyViewOwnedDiamondColor = 'rgb(0,0,0)';\n this.generalizationViewInheritanceTriangeFillColor = 'rgb(255,255,255)';\n this.selectionBoxBorderColor = 'rgba(0,0,0, 0.02)';\n // Preferences\n this.interactionMode = DIAGRAM_INTERACTION_MODE.LAYOUT;\n this.relationshipMode = DIAGRAM_RELATIONSHIP_EDIT_MODE.NONE;\n this.isReadOnly = false;\n this.enableLayoutAutoAdjustment = false;\n this.screenPadding = 20;\n this.classViewSpaceX = 10;\n this.classViewSpaceY = 4;\n this.propertySpacing = 10;\n // Event handlers\n this.selectionStart = undefined;\n this.selection = undefined;\n this.selectedClasses = [];\n this._selectedClassesInitialPositions = [];\n this.cursorPosition = new Point(0, 0);\n this.leftClick = false;\n this.middleClick = false;\n this.rightClick = false;\n this.clickX = 0;\n this.clickY = 0;\n this.positionBeforeLastMove = new Point(0, 0);\n this.div.onwheel = this.mousewheel.bind(this);\n this.div.onmousedown = this.mousedown.bind(this);\n this.div.onkeydown = this.keydown.bind(this);\n this.div.ondblclick = this.mousedblclick.bind(this);\n this.div.onmouseup = this.mouseup.bind(this);\n this.div.onmousemove = this.mousemove.bind(this);\n }\n setIsReadOnly(val) {\n this.isReadOnly = val;\n }\n setEnableLayoutAutoAdjustment(val) {\n this.enableLayoutAutoAdjustment = val;\n }\n setMouseOverClassView(val) {\n this.mouseOverClassView = val;\n }\n setMouseOverClassName(val) {\n this.mouseOverClassName = val;\n }\n setMouseOverClassCorner(val) {\n this.mouseOverClassCorner = val;\n }\n setMouseOverClassProperty(val) {\n this.mouseOverClassProperty = val;\n }\n setMouseOverPropertyHolderViewLabel(val) {\n this.mouseOverPropertyHolderViewLabel = val;\n }\n setSelectionStart(val) {\n this.selectionStart = val;\n }\n setSelectedClassCorner(val) {\n this.selectedClassCorner = val;\n }\n setSelectedClasses(val) {\n this.selectedClasses = val;\n }\n setSelectedPropertyOrAssociation(val) {\n this.selectedPropertyOrAssociation = val;\n }\n setSelectedInheritance(val) {\n this.selectedInheritance = val;\n }\n setLeftClick(val) {\n this.leftClick = val;\n }\n setMiddleClick(val) {\n this.middleClick = val;\n }\n setRightClick(val) {\n this.rightClick = val;\n }\n setZoomLevel(val) {\n this.zoom = val;\n }\n render(options) {\n this.diagram.classViews.forEach((classView) => this.ensureClassViewMeetMinDimensions(classView));\n this.refresh();\n if (options?.initial) {\n this.autoRecenter();\n // only zoom to fit if needed\n if (this.canvas.width <\n this.virtualScreen.rectangle.width +\n this.screenPadding * 2 +\n FIT_ZOOM_PADDING * 2 ||\n this.canvas.height <\n this.virtualScreen.rectangle.height +\n this.screenPadding * 2 +\n FIT_ZOOM_PADDING * 2) {\n this.zoomToFit();\n }\n }\n }\n refresh() {\n this.refreshCanvas();\n this.drawScreen();\n }\n refreshCanvas() {\n this.canvasDimension = new Rectangle(this.div.offsetWidth, this.div.offsetHeight);\n this.canvasCenter = new Point(this.canvasDimension.width / 2, this.canvasDimension.height / 2);\n this.canvas.width = this.canvasDimension.width;\n this.canvas.height = this.canvasDimension.height;\n }\n clearScreen() {\n this.ctx.fillStyle = this.canvasColor;\n this.ctx.fillRect(0, 0, this.canvasDimension.width, this.canvasDimension.height);\n }\n drawScreen() {\n this.manageVirtualScreen();\n this.clearScreen();\n this.drawAll();\n }\n autoRecenter() {\n this.center(this.virtualScreen.position.x + this.virtualScreen.rectangle.width / 2, this.virtualScreen.position.y + this.virtualScreen.rectangle.height / 2);\n }\n /**\n * Reset the screen offset\n */\n center(x, y) {\n this.screenOffset = new Point(-x + this.canvasCenter.x, -y + this.canvasCenter.y);\n this.refresh();\n }\n changeMode(editMode, relationshipMode) {\n switch (editMode) {\n case DIAGRAM_INTERACTION_MODE.LAYOUT:\n case DIAGRAM_INTERACTION_MODE.PAN:\n case DIAGRAM_INTERACTION_MODE.ZOOM_IN:\n case DIAGRAM_INTERACTION_MODE.ZOOM_OUT:\n case DIAGRAM_INTERACTION_MODE.ADD_CLASS: {\n if (relationshipMode !== DIAGRAM_RELATIONSHIP_EDIT_MODE.NONE) {\n throw new IllegalStateError(`Can't change to '${editMode}' mode: relationship mode should not be specified in layout mode`);\n }\n break;\n }\n case DIAGRAM_INTERACTION_MODE.ADD_RELATIONSHIP: {\n if (relationshipMode === DIAGRAM_RELATIONSHIP_EDIT_MODE.NONE) {\n throw new IllegalStateError(`Can't switch to relationship mode: relationship mode is not specified`);\n }\n break;\n }\n default:\n throw new UnsupportedOperationError(`Can't switch to mode '${editMode}': unsupported mode`);\n }\n this.interactionMode = editMode;\n this.relationshipMode = relationshipMode;\n if (editMode === DIAGRAM_INTERACTION_MODE.ADD_RELATIONSHIP) {\n switch (relationshipMode) {\n case DIAGRAM_RELATIONSHIP_EDIT_MODE.INHERITANCE: {\n this.handleAddRelationship = (startClassView, targetClassView) => {\n if (\n // Do not allow creating self-inheritance\n startClassView.class.value !== targetClassView.class.value &&\n // Avoid creating inhertance that already existed\n !getAllSuperclasses(startClassView.class.value).includes(targetClassView.class.value) &&\n // Avoid loop (might be expensive)\n !getAllSuperclasses(targetClassView.class.value).includes(startClassView.class.value)) {\n this.callbacks?.onClass_addSuperType?.(startClassView.class.value, GenericTypeExplicitReference.create(new GenericType(targetClassView.class.value)));\n }\n // only add an inheritance relationship view if the start class\n // has already had the target class as its supertype\n if (startClassView.class.value.generalizations.find((generalization) => generalization.value.rawType === targetClassView.class.value)) {\n const gview = new GeneralizationView(this.diagram, startClassView, targetClassView);\n this.callbacks?.onDiagram_addGeneralizationView?.(this.diagram, gview);\n return gview;\n }\n return undefined;\n };\n break;\n }\n case DIAGRAM_RELATIONSHIP_EDIT_MODE.PROPERTY: {\n this.handleAddRelationship = (startClassView, targetClassView) => {\n const property = new Property(`property_${startClassView.class.value.properties.length + 1}`, Multiplicity.ONE, GenericTypeExplicitReference.create(new GenericType(targetClassView.class.value)), startClassView.class.value);\n this.callbacks?.onClass_addProperty?.(startClassView.class.value, property);\n // only create property view if the classviews are different\n // else we end up with a weird rendering where the property view\n // is not targetable\n if (startClassView !== targetClassView) {\n const pView = new PropertyView(this.diagram, PropertyExplicitReference.create(property), startClassView, targetClassView);\n this.callbacks?.onDiagram_addPropertyView?.(this.diagram, pView);\n return pView;\n }\n return undefined;\n };\n break;\n }\n default:\n throw new UnsupportedOperationError(`Can't switch to relationship mode '${relationshipMode}': unsupported mode`);\n }\n }\n }\n align(op) {\n if (this.selectedClasses.length < 2) {\n return;\n }\n switch (op) {\n case DIAGRAM_ALIGNER_OPERATOR.ALIGN_LEFT: {\n const leftBound = this.selectedClasses.reduce((val, view) => Math.min(val, view.position.x), Number.MAX_SAFE_INTEGER);\n this.selectedClasses.forEach((view) => {\n this.callbacks?.onPositionedRectangle_setPosition?.(view, new Point(leftBound, view.position.y));\n });\n break;\n }\n case DIAGRAM_ALIGNER_OPERATOR.ALIGN_CENTER: {\n const center = this.selectedClasses.reduce((val, view) => val + view.position.x + view.rectangle.width / 2, 0) / this.selectedClasses.length;\n this.selectedClasses.forEach((view) => this.callbacks?.onPositionedRectangle_setPosition?.(view, new Point(center - view.rectangle.width / 2, view.position.y)));\n break;\n }\n case DIAGRAM_ALIGNER_OPERATOR.ALIGN_RIGHT: {\n const rightBound = this.selectedClasses.reduce((val, view) => Math.max(val, view.position.x + view.rectangle.width), -Number.MAX_SAFE_INTEGER);\n this.selectedClasses.forEach((view) => this.callbacks?.onPositionedRectangle_setPosition?.(view, new Point(rightBound - view.rectangle.width, view.position.y)));\n break;\n }\n case DIAGRAM_ALIGNER_OPERATOR.ALIGN_TOP: {\n const topBound = this.selectedClasses.reduce((val, view) => Math.min(val, view.position.y), Number.MAX_SAFE_INTEGER);\n this.selectedClasses.forEach((view) => this.callbacks?.onPositionedRectangle_setPosition?.(view, new Point(view.position.x, topBound)));\n break;\n }\n case DIAGRAM_ALIGNER_OPERATOR.ALIGN_MIDDLE: {\n const middle = this.selectedClasses.reduce((val, view) => val + view.position.y + view.rectangle.height / 2, 0) / this.selectedClasses.length;\n this.selectedClasses.forEach((view) => this.callbacks?.onPositionedRectangle_setPosition?.(view, new Point(view.position.x, middle - view.rectangle.height / 2)));\n break;\n }\n case DIAGRAM_ALIGNER_OPERATOR.ALIGN_BOTTOM: {\n const bottomBound = this.selectedClasses.reduce((val, view) => Math.max(val, view.position.y + view.rectangle.height), -Number.MAX_SAFE_INTEGER);\n this.selectedClasses.forEach((view) => this.callbacks?.onPositionedRectangle_setPosition?.(view, new Point(view.position.x, bottomBound - view.rectangle.height)));\n break;\n }\n case DIAGRAM_ALIGNER_OPERATOR.SPACE_HORIZONTALLY: {\n const sorted = this.selectedClasses.toSorted((a, b) => a.position.x - b.position.x);\n // NOTE: handle special case where there are only 2 views, make them adjacent\n if (sorted.length === 2) {\n const previousView = sorted[0];\n const currentView = sorted[1];\n this.callbacks?.onPositionedRectangle_setPosition?.(currentView, new Point(previousView.position.x + previousView.rectangle.width, currentView.position.y));\n }\n else {\n const spacings = [];\n for (let idx = 1; idx < sorted.length; idx++) {\n const previousView = sorted[idx - 1];\n const currentView = sorted[idx];\n spacings.push(currentView.position.x -\n (previousView.position.x + previousView.rectangle.width));\n }\n const averageSpacing = spacings.reduce((val, distance) => val + distance, 0) /\n spacings.length;\n for (let idx = 1; idx < sorted.length; idx++) {\n const previousView = sorted[idx - 1];\n const currentView = sorted[idx];\n this.callbacks?.onPositionedRectangle_setPosition?.(currentView, new Point(previousView.position.x +\n previousView.rectangle.width +\n averageSpacing, currentView.position.y));\n }\n }\n break;\n }\n case DIAGRAM_ALIGNER_OPERATOR.SPACE_VERTICALLY: {\n const sorted = this.selectedClasses.toSorted((a, b) => a.position.y - b.position.y);\n // NOTE: handle special case where there are only 2 views, make them adjacent\n if (sorted.length === 2) {\n const previousView = sorted[0];\n const currentView = sorted[1];\n this.callbacks?.onPositionedRectangle_setPosition?.(currentView, new Point(currentView.position.x, previousView.position.y + previousView.rectangle.height));\n }\n else {\n const spacings = [];\n for (let idx = 1; idx < sorted.length; idx++) {\n const previousView = sorted[idx - 1];\n const currentView = sorted[idx];\n spacings.push(currentView.position.y -\n (previousView.position.y + previousView.rectangle.height));\n }\n const averageSpacing = spacings.reduce((val, distance) => val + distance, 0) /\n spacings.length;\n for (let idx = 1; idx < sorted.length; idx++) {\n const previousView = sorted[idx - 1];\n const currentView = sorted[idx];\n this.callbacks?.onPositionedRectangle_setPosition?.(currentView, new Point(currentView.position.x, previousView.position.y +\n previousView.rectangle.height +\n averageSpacing));\n }\n }\n break;\n }\n default:\n break;\n }\n this.drawScreen();\n }\n truncateTextWithEllipsis(val, limit = this.maxLineLength) {\n const ellipsis = '...';\n return val.length > limit\n ? `${val.substring(0, limit + 1 - ellipsis.length)}${ellipsis}`\n : val;\n }\n canvasCoordinateToModelCoordinate(point) {\n return new Point((point.x - this.canvasCenter.x) / this.zoom -\n this.screenOffset.x +\n this.canvasCenter.x, (point.y - this.canvasCenter.y) / this.zoom -\n this.screenOffset.y +\n this.canvasCenter.y);\n }\n modelCoordinateToCanvasCoordinate(point) {\n return new Point((point.x - this.canvasCenter.x + this.screenOffset.x) * this.zoom +\n this.canvasCenter.x, (point.y - this.canvasCenter.y + this.screenOffset.y) * this.zoom +\n this.canvasCenter.y);\n }\n /**\n * Mouse events' coordinate x,y are relative to the viewport, not the canvas element\n * so we need to calculate them relative to the canvas element\n */\n resolveMouseEventCoordinate(e) {\n if (e.target instanceof HTMLElement) {\n const targetEl = getElementPosition(e.target);\n return new Point(targetEl.x + e.offsetX, targetEl.y + e.offsetY);\n }\n // NOTE: this is a fallback, should not happen\n // since all mouse events shoud target the canvas element\n return new Point(e.x, e.y);\n }\n eventCoordinateToCanvasCoordinate(point) {\n return new Point(point.x - this.divPosition.x + this.div.scrollLeft, point.y - this.divPosition.y + this.div.scrollTop);\n }\n canvasCoordinateToEventCoordinate(point) {\n return new Point(point.x - this.div.scrollLeft + this.divPosition.x, point.y - this.div.scrollTop + this.divPosition.y);\n }\n hasPropertyView(classView, property) {\n return (this.diagram.propertyViews.filter((p) => p.property.value === property && p.from.classView.value === classView).length > 0);\n }\n get divPosition() {\n return getElementPosition(this.div);\n }\n manageVirtualScreen() {\n if (this.diagram.classViews.length) {\n const firstClassView = guaranteeNonNullable(this.diagram.classViews[0]);\n let minX = firstClassView.position.x;\n let minY = firstClassView.position.y;\n let maxX = firstClassView.position.x + firstClassView.rectangle.width;\n let maxY = firstClassView.position.y + firstClassView.rectangle.height;\n for (const classView of this.diagram.classViews) {\n minX = Math.min(minX, classView.position.x);\n minY = Math.min(minY, classView.position.y);\n maxX = Math.max(maxX, classView.position.x + classView.rectangle.width);\n maxY = Math.max(maxY, classView.position.y + classView.rectangle.height);\n }\n const relationshipViews = this.diagram.associationViews\n .concat(this.diagram.generalizationViews)\n .concat(this.diagram.propertyViews);\n for (const relationshipView of relationshipViews) {\n const fullPath = RelationshipView.pruneUnnecessaryInsidePoints(relationshipView.buildFullPath(), relationshipView.from.classView.value, relationshipView.to.classView.value);\n if (relationshipView instanceof PropertyView) {\n const box = this.drawLinePropertyText(\n // NOTE: by the way we compute the full path, it would guarantee\n // to always have at least 2 points\n guaranteeNonNullable(fullPath[fullPath.length - 2], 'Diagram path expected to have at least 2 points'), guaranteeNonNullable(fullPath[fullPath.length - 1], 'Diagram path expected to have at least 2 points'), relationshipView.to.classView.value, relationshipView.property.value, false);\n minX = Math.min(minX, box.position.x);\n minY = Math.min(minY, box.position.y);\n maxX = Math.max(maxX, getBottomRightCornerPoint(box).x);\n maxY = Math.max(maxY, getBottomRightCornerPoint(box).y);\n }\n // if (relationshipView.from.name) {\n // var box = this.displayText(fullPath[1], fullPath[0], relationshipView.from.classView, relationshipView.property, this.ctx);\n // minX = Math.min(minX, box.x);\n // minY = Math.min(minY, box.y);\n // maxX = Math.max(maxX, box.x2);\n // maxY = Math.max(maxY, box.y2);\n // }\n for (const point of relationshipView.path) {\n minX = Math.min(minX, point.x);\n minY = Math.min(minY, point.y);\n maxX = Math.max(maxX, point.x);\n maxY = Math.max(maxY, point.y);\n }\n }\n this.virtualScreen = new PositionedRectangle(new Point(minX, minY), new Rectangle(maxX - minX, maxY - minY));\n }\n else {\n this.setZoomLevel(1);\n this.screenOffset = new Point(0, 0);\n this.virtualScreen = new PositionedRectangle(new Point(this.canvasDimension.width / 2, this.canvasDimension.height / 2), new Rectangle(0, 0));\n }\n }\n /**\n * Here we zoom with respect to the point the mouse is currently pointing at.\n * The idea is fairly simple. We convert the coordinate of the zoom point\n * to the model coordinate and find a way to alter `screenOffset` in response\n * to change in zoom level to ensure the model coordinate stays constant.\n */\n executeZoom(newZoomLevel, point) {\n // NOTE: we cap the minimum zoom level to avoid negative zoom\n newZoomLevel = Math.max(newZoomLevel, MIN_ZOOM_LEVEL);\n const currentZoomLevel = this.zoom;\n this.setZoomLevel(newZoomLevel);\n this.screenOffset = new Point(((point.x - this.canvasCenter.x) * (currentZoomLevel - newZoomLevel) +\n this.screenOffset.x * currentZoomLevel) /\n newZoomLevel, ((point.y - this.canvasCenter.y) * (currentZoomLevel - newZoomLevel) +\n this.screenOffset.y * currentZoomLevel) /\n newZoomLevel);\n this.clearScreen();\n this.drawAll();\n }\n zoomPoint(zoomLevel, zoomPoint) {\n this.executeZoom(zoomLevel, zoomPoint);\n }\n zoomCenter(zoomLevel) {\n // NOTE: we cap the minimum zoom level to avoid negative zoom\n this.setZoomLevel(Math.max(zoomLevel, MIN_ZOOM_LEVEL));\n this.clearScreen();\n this.drawAll();\n }\n zoomToFit() {\n this.autoRecenter();\n this.zoomCenter(Math.max(Math.min(this.canvas.width /\n (this.virtualScreen.rectangle.width +\n this.screenPadding * 2 +\n FIT_ZOOM_PADDING * 2), this.canvas.height /\n (this.virtualScreen.rectangle.height +\n this.screenPadding * 2 +\n FIT_ZOOM_PADDING * 2)), MIN_ZOOM_LEVEL));\n }\n /**\n * Add a classview to current diagram and draw it.\n * This function is intended to be used with drag and drop, hence the position paramter, which must be relative to the screen/window\n */\n addClassView(addedClass, classViewModelCoordinate) {\n if (!this.isReadOnly) {\n // NOTE: Using `uuid` might be overkill since the `id` is only required to be unique\n // across the diagram, but maintaining a counter has its own downside\n // NOTE: checking for collision to guarantee stability, especially since class view is usually manually added\n const existingIds = this.diagram.classViews.map((classView) => classView.id);\n let id = uuid();\n while (existingIds.includes(id)) {\n id = uuid();\n }\n const newClassView = new ClassView(this.diagram, id, PackageableElementExplicitReference.create(addedClass));\n this.callbacks?.onPositionedRectangle_setPosition?.(newClassView, classViewModelCoordinate ??\n this.canvasCoordinateToModelCoordinate(new Point(this.virtualScreen.position.x +\n this.virtualScreen.rectangle.width / 2, this.virtualScreen.position.y +\n this.virtualScreen.rectangle.height / 2)));\n this.callbacks?.onDiagram_addClassView?.(this.diagram, newClassView);\n // Refresh hash since ClassView position is not observable\n // NOTE: here we refresh after adding the class view to the diagram, that way the diagram hash is refreshed\n this.callbacks?.onPositionedRectangle_forceRefreshHash?.(newClassView);\n this.diagram.classViews\n .filter((classView) => classView.class.value !== addedClass)\n .forEach((classView) => {\n const _class = classView.class.value;\n // Add supertype\n if (addedClass.generalizations\n .map((generalization) => generalization.value.rawType)\n .includes(_class)) {\n this.callbacks?.onDiagram_addGeneralizationView?.(this.diagram, new GeneralizationView(this.diagram, newClassView, classView));\n }\n if (_class.generalizations\n .map((generalization) => generalization.value.rawType)\n .includes(addedClass)) {\n this.callbacks?.onDiagram_addGeneralizationView?.(this.diagram, new GeneralizationView(this.diagram, classView, newClassView));\n }\n // Add property view\n getAllOwnClassProperties(addedClass).forEach((property) => {\n if (property.genericType.value.rawType === _class) {\n this.callbacks?.onDiagram_addPropertyView?.(this.diagram, new PropertyView(this.diagram, PropertyExplicitReference.create(property), newClassView, classView));\n }\n });\n getAllOwnClassProperties(_class).forEach((property) => {\n if (property.genericType.value.rawType === addedClass) {\n this.callbacks?.onDiagram_addPropertyView?.(this.diagram, new PropertyView(this.diagram, PropertyExplicitReference.create(property), classView, newClassView));\n }\n });\n });\n this.drawClassView(newClassView);\n this.drawScreen();\n return newClassView;\n }\n return undefined;\n }\n drawBoundingBox() {\n this.ctx.fillStyle = this.backgroundColor;\n this.ctx.lineWidth = 1;\n this.ctx.fillRect((this.virtualScreen.position.x +\n this.screenOffset.x -\n this.canvasCenter.x -\n this.screenPadding) *\n this.zoom +\n this.canvasCenter.x, (this.virtualScreen.position.y +\n this.screenOffset.y -\n this.canvasCenter.y -\n this.screenPadding) *\n this.zoom +\n this.canvasCenter.y, (this.virtualScreen.rectangle.width + this.screenPadding * 2) * this.zoom, (this.virtualScreen.rectangle.height + this.screenPadding * 2) *\n this.zoom);\n this.ctx.strokeRect((this.virtualScreen.position.x +\n this.screenOffset.x -\n this.canvasCenter.x -\n this.screenPadding) *\n this.zoom +\n this.canvasCenter.x, (this.virtualScreen.position.y +\n this.screenOffset.y -\n this.canvasCenter.y -\n this.screenPadding) *\n this.zoom +\n this.canvasCenter.y, (this.virtualScreen.rectangle.width + this.screenPadding * 2) * this.zoom, (this.virtualScreen.rectangle.height + this.screenPadding * 2) *\n this.zoom);\n }\n drawDiagram() {\n this.diagram.associationViews.forEach((associationView) => this.drawPropertyOrAssociation(associationView));\n this.diagram.generalizationViews.forEach((generalizationView) => this.drawInheritance(generalizationView));\n this.diagram.propertyViews.forEach((propertyView) => this.drawPropertyOrAssociation(propertyView));\n this.diagram.classViews.forEach((classView) => this.drawClassView(classView));\n if (this.showCanvasGrid) {\n this.drawCanvasGrid();\n }\n if (this.showScreenGrid) {\n this.drawScreenGrid();\n }\n }\n drawAll() {\n this.drawBoundingBox();\n this.drawDiagram();\n }\n drawScreenGrid() {\n const startX = (this.virtualScreen.position.x +\n this.screenOffset.x -\n this.canvasCenter.x) *\n this.zoom +\n this.canvasCenter.x;\n const startY = (this.virtualScreen.position.y +\n this.screenOffset.y -\n this.canvasCenter.y) *\n this.zoom +\n this.canvasCenter.y;\n const width = (this.virtualScreen.rectangle.width + this.screenPadding * 2) * this.zoom;\n const height = (this.virtualScreen.rectangle.height + this.screenPadding * 2) *\n this.zoom;\n this.ctx.beginPath();\n this.ctx.fillStyle = this.screenGridLabelTextColor;\n this.ctx.strokeStyle = this.screenGridLineColor;\n this.ctx.lineWidth = this.screenGridLineWidth;\n this.ctx.font = `${(this.fontSize - 1) * this.zoom}px ${this.fontFamily}`;\n const labelPadding = 5;\n // draw vertical grid lines\n let gridX = 0;\n for (let x = startX; x < startX + width - this.screenPadding * 2; x += this.screenGridSpacingX * this.zoom) {\n this.ctx.fillText(`${gridX}`, x + labelPadding * this.zoom, startY -\n (this.screenGridAxisTickLength + this.screenPadding) * this.zoom);\n this.ctx.fillText(`[${Math.round(this.virtualScreen.position.x + gridX)}]`, x + labelPadding * this.zoom, startY -\n (this.screenGridAxisTickLength +\n this.screenPadding -\n this.lineHeight) *\n this.zoom);\n this.ctx.moveTo(x, startY -\n (this.screenGridAxisTickLength + this.screenPadding) * this.zoom);\n this.ctx.lineTo(x, startY + height - this.screenPadding * this.zoom);\n this.ctx.stroke();\n gridX += this.screenGridSpacingX;\n }\n // draw horizontal grid lines\n let gridY = 0;\n for (let y = startY; y < startY + height - this.screenPadding * 2; y += this.screenGridSpacingY * this.zoom) {\n this.ctx.fillText(`${gridY}`, startX -\n (this.screenGridAxisTickLength + this.screenPadding) * this.zoom, y + labelPadding * this.zoom);\n this.ctx.fillText(`[${Math.round(this.virtualScreen.position.y + gridY)}]`, startX -\n (this.screenGridAxisTickLength + this.screenPadding) * this.zoom, y + (labelPadding + this.lineHeight) * this.zoom);\n this.ctx.moveTo(startX -\n (this.screenGridAxisTickLength + this.screenPadding) * this.zoom, y);\n this.ctx.lineTo(startX + width - this.screenPadding * this.zoom, y);\n this.ctx.stroke();\n gridY += this.screenGridSpacingY;\n }\n // draw screen padding border grid line\n if (this.showScreenBoxGuide) {\n this.ctx.beginPath();\n this.ctx.fillStyle = this.screenGuideLabelTextColor;\n this.ctx.strokeStyle = this.screenGuideLineColor;\n this.ctx.moveTo(startX, startY);\n this.ctx.lineTo(startX, startY + height - this.screenPadding * 2 * this.zoom);\n this.ctx.stroke();\n this.ctx.lineTo(startX, startY + height - this.screenPadding * 2 * this.zoom);\n this.ctx.lineTo(startX + width - this.screenPadding * 2 * this.zoom, startY + height - this.screenPadding * 2 * this.zoom);\n this.ctx.stroke();\n this.ctx.lineTo(startX + width - this.screenPadding * 2 * this.zoom, startY + height - this.screenPadding * 2 * this.zoom);\n this.ctx.lineTo(startX + width - this.screenPadding * 2 * this.zoom, startY);\n this.ctx.stroke();\n this.ctx.lineTo(startX + width - this.screenPadding * 2 * this.zoom, startY);\n this.ctx.lineTo(startX, startY);\n this.ctx.stroke();\n // draw center guides\n this.ctx.fillText(`${Math.round(this.virtualScreen.rectangle.width / 2)}`, startX + width / 2 - (this.screenPadding - labelPadding) * this.zoom, startY + labelPadding * this.zoom);\n this.ctx.fillText(`[${Math.round(this.virtualScreen.position.x +\n this.virtualScreen.rectangle.width / 2)}]`, startX + width / 2 - (this.screenPadding - labelPadding) * this.zoom, startY + (labelPadding + this.lineHeight) * this.zoom);\n this.ctx.lineTo(startX + width / 2 - this.screenPadding * this.zoom, startY);\n this.ctx.lineTo(startX + width / 2 - this.screenPadding * this.zoom, startY + height - this.screenPadding * 2 * this.zoom);\n this.ctx.stroke();\n this.ctx.fillText(`${Math.round(this.virtualScreen.rectangle.height / 2)}`, startX + labelPadding * this.zoom, startY + height / 2 - (this.screenPadding - labelPadding) * this.zoom);\n this.ctx.fillText(`[${Math.round(this.virtualScreen.position.y +\n this.virtualScreen.rectangle.height / 2)}]`, startX + labelPadding * this.zoom, startY +\n height / 2 -\n (this.screenPadding - labelPadding - this.lineHeight) * this.zoom);\n this.ctx.lineTo(startX, startY + height / 2 - this.screenPadding * this.zoom);\n this.ctx.lineTo(startX + width - this.screenPadding * 2 * this.zoom, startY + height / 2 - this.screenPadding * this.zoom);\n this.ctx.stroke();\n }\n this.ctx.strokeStyle = this.defaultLineColor;\n this.ctx.lineWidth = this.defaultLineWidth;\n }\n drawCanvasGrid() {\n const startX = -this.canvasCenter.x * this.zoom + this.canvasCenter.x;\n const startY = -this.canvasCenter.y * this.zoom + this.canvasCenter.y;\n const width = this.canvasDimension.width;\n const height = this.canvasDimension.height;\n this.ctx.setLineDash([5, 5]);\n this.ctx.fillStyle = this.canvasGridLabelTextColor;\n this.ctx.strokeStyle = this.canvasGridLineColor;\n this.ctx.lineWidth = this.canvasGridLineWidth;\n this.ctx.font = `${(this.fontSize - 1) * this.zoom}px ${this.fontFamily}`;\n const labelPadding = 5;\n this.ctx.beginPath();\n // draw vertical grid lines\n let gridX = 0;\n for (let x = startX; x < width; x += this.canvasGridSpacingX * this.zoom) {\n if (x !== 0) {\n this.ctx.fillText(`[${Math.round(gridX)}]`, x + labelPadding * this.zoom, labelPadding * this.zoom);\n }\n this.ctx.moveTo(x, 0);\n this.ctx.lineTo(x, height);\n this.ctx.stroke();\n gridX += this.canvasGridSpacingX;\n }\n // draw horizontal grid lines\n let gridY = 0;\n for (let y = startY; y < height; y += this.canvasGridSpacingY * this.zoom) {\n if (y !== 0) {\n this.ctx.fillText(`[${Math.round(gridY)}]`, labelPadding * this.zoom, y + labelPadding * this.zoom);\n }\n this.ctx.moveTo(0, y);\n this.ctx.lineTo(width, y);\n this.ctx.stroke();\n gridY += this.canvasGridSpacingY;\n }\n // draw canvas padding border grid line\n if (this.showCanvasBoxGuide) {\n this.ctx.beginPath();\n this.ctx.fillStyle = this.canvasGuideLabelTextColor;\n this.ctx.strokeStyle = this.canvasGuideLineColor;\n // draw center guides\n this.ctx.fillText(`[${Math.round(width / 2)}]`, width / 2 + labelPadding * this.zoom, labelPadding * this.zoom);\n this.ctx.moveTo(width / 2, 0);\n this.ctx.lineTo(width / 2, height);\n this.ctx.stroke();\n this.ctx.fillText(`[${Math.round(height / 2)}]`, labelPadding * this.zoom, height / 2 + labelPadding * this.zoom);\n this.ctx.moveTo(0, height / 2);\n this.ctx.lineTo(width, height / 2);\n this.ctx.stroke();\n }\n // draw offset guides\n if (this.showScreenOffsetGuide) {\n const offsetPointRadius = 5;\n const thresholdToHideOffsetTickLabel = 35;\n this.ctx.beginPath();\n this.ctx.setLineDash([]); // return solid line\n this.ctx.fillStyle = this.screenOffsetGuideLabelTextColor;\n this.ctx.strokeStyle = this.screenOffsetGuideLineColor;\n // draw the crosshair\n this.ctx.arc(startX + this.screenOffset.x * this.zoom, startY + this.screenOffset.y * this.zoom, offsetPointRadius * this.zoom, 0, 2 * Math.PI);\n this.ctx.moveTo(startX + (this.screenOffset.x - offsetPointRadius) * this.zoom, startY + this.screenOffset.y * this.zoom);\n this.ctx.lineTo(startX + (this.screenOffset.x + offsetPointRadius * 2) * this.zoom, startY + this.screenOffset.y * this.zoom);\n this.ctx.moveTo(startX + this.screenOffset.x * this.zoom, startY + (this.screenOffset.y - offsetPointRadius) * this.zoom);\n this.ctx.lineTo(startX + this.screenOffset.x * this.zoom, startY + (this.screenOffset.y + offsetPointRadius * 2) * this.zoom);\n this.ctx.stroke();\n // draw the offset distance\n this.ctx.setLineDash([5, 5]);\n this.ctx.moveTo(startX, startY + this.screenOffset.y * this.zoom);\n this.ctx.lineTo(startX + (this.screenOffset.x - offsetPointRadius) * this.zoom, startY + this.screenOffset.y * this.zoom);\n this.ctx.moveTo(startX + this.screenOffset.x * this.zoom, startY + 0);\n this.ctx.lineTo(startX + this.screenOffset.x * this.zoom, startY + (this.screenOffset.y - offsetPointRadius) * this.zoom);\n this.ctx.stroke();\n this.ctx.beginPath();\n if (this.screenOffset.x >= thresholdToHideOffsetTickLabel &&\n this.screenOffset.y >= thresholdToHideOffsetTickLabel) {\n this.ctx.fillText(`[${Math.round(this.screenOffset.x)}]`, startX + (this.screenOffset.x + labelPadding) * this.zoom, startY + labelPadding * this.zoom);\n this.ctx.fillText(`[${Math.round(this.screenOffset.y)}]`, startX + labelPadding * this.zoom, startY + (this.screenOffset.y + labelPadding) * this.zoom);\n }\n else if (this.screenOffset.x >= 0 && this.screenOffset.y >= 0) {\n this.ctx.fillText(`\\u0394 [${Math.round(this.screenOffset.x)},${Math.round(this.screenOffset.y)}]`, startX +\n (this.screenOffset.x + offsetPointRadius + labelPadding) *\n this.zoom, startY +\n (this.screenOffset.y + offsetPointRadius + labelPadding) *\n this.zoom);\n }\n else {\n this.ctx.fillText(`\\u0394 [${Math.round(this.screenOffset.x)},${Math.round(this.screenOffset.y)}]`, startX + (offsetPointRadius + labelPadding) * this.zoom, startY + (offsetPointRadius + labelPadding) * this.zoom);\n }\n }\n this.ctx.setLineDash([]); // return solid line\n this.ctx.strokeStyle = this.defaultLineColor;\n this.ctx.lineWidth = this.defaultLineWidth;\n }\n drawClassViewProperty(classView, property, propX, propY, measureOnly) {\n this.ctx.font =\n this.mouseOverClassView === classView &&\n this.mouseOverClassProperty === property\n ? `bold ${(this.fontSize - 1) * (measureOnly ? 1 : this.zoom)}px ${this.fontFamily}`\n : `${measureOnly ? 'bold' : ''} ${(this.fontSize - 1) * (measureOnly ? 1 : this.zoom)}px ${this.fontFamily}`;\n const propertyName = getPropertyDisplayName(property);\n let txtMeasure = this.ctx.measureText(`${propertyName} : `).width;\n if (!measureOnly) {\n this.ctx.fillText(`${propertyName} : `, propX, propY);\n this.ctx.fillText(property.genericType.value.rawType.name, propX + txtMeasure, propY);\n // Draw Enumeration Property - with underscore\n if (property.genericType.value.rawType instanceof Enumeration) {\n this.ctx.beginPath();\n this.ctx.moveTo(propX + txtMeasure, propY + (this.fontSize - 1) * this.zoom);\n this.ctx.lineTo(propX +\n txtMeasure +\n this.ctx.measureText(property.genericType.value.rawType.name).width, propY + (this.fontSize - 1) * this.zoom);\n this.ctx.stroke();\n }\n }\n txtMeasure += this.ctx.measureText(property.genericType.value.rawType.name).width;\n this.ctx.font = `${(this.fontSize - 1) * (measureOnly ? 1 : this.zoom)}px ${this.fontFamily}`;\n const multiplicityString = generateMultiplicityString(property.multiplicity.lowerBound, property.multiplicity.upperBound);\n if (!measureOnly) {\n this.ctx.fillText(`[${multiplicityString}]`, propX + txtMeasure, propY);\n }\n txtMeasure += this.ctx.measureText(`[${multiplicityString}]`).width;\n return txtMeasure;\n }\n computeClassNameWidth(classView) {\n this.ctx.font = `bold ${this.fontSize}px ${this.fontFamily}`;\n this.ctx.textBaseline = 'top'; // Compute min dimensions\n // Calculate the box for the class name header\n return this.ctx.measureText(this.truncateTextWithEllipsis(classView.class.value.name)).width;\n }\n ensureClassViewMeetMinDimensions(classView) {\n // Calculate the box for the class name header\n let classMinWidth = this.computeClassNameWidth(classView);\n let classMinHeight = this.lineHeight + this.classViewSpaceY * 2; // padding top and bottom fo the header\n // Calculate box for Stereotypes\n if (!classView.hideStereotypes) {\n this.ctx.font = `${this.fontSize}px ${this.fontFamily}`;\n for (const stereotype of classView.class.value.stereotypes) {\n const stereotypeTxt = `<< ${this.truncateTextWithEllipsis(stereotype.value.value, this.maxLineLength - 6)} >>`;\n const stereoWidth = this.ctx.measureText(stereotypeTxt).width;\n classMinWidth = Math.max(classMinWidth, stereoWidth);\n classMinHeight = classMinHeight + this.lineHeight;\n }\n }\n // Calculate box for TaggedValues\n if (!classView.hideTaggedValues) {\n this.ctx.font = `${this.fontSize}px ${this.fontFamily}`;\n this.ctx.textBaseline = 'top'; // Compute min dimensions\n for (const taggedValue of classView.class.value.taggedValues) {\n const taggedValueTxt = `{ ${this.truncateTextWithEllipsis(`${taggedValue.tag.value.value} = ${taggedValue.value}`, this.maxLineLength - 4)} }`;\n const taggedValueWidth = this.ctx.measureText(taggedValueTxt).width;\n classMinWidth = Math.max(classMinWidth, taggedValueWidth);\n classMinHeight = classMinHeight + this.lineHeight;\n }\n }\n // Calculate box for properties\n if (!classView.hideProperties) {\n getAllOwnClassProperties(classView.class.value).forEach((property) => {\n if (!this.hasPropertyView(classView, property)) {\n const propertyTextMeasure = this.drawClassViewProperty(classView, property, \n // these means nothing since we only need to measure here\n 0, 0, true);\n classMinWidth = Math.max(classMinWidth, propertyTextMeasure);\n classMinHeight = classMinHeight + this.lineHeight;\n }\n });\n classMinHeight = classMinHeight + this.classViewSpaceY * 2;\n }\n classMinWidth = classMinWidth + this.classViewSpaceX * 2;\n // Modify the dimension according to the newly computed height and width\n if (!this.isReadOnly || this.enableLayoutAutoAdjustment) {\n const width = classView.rectangle.width && classView.rectangle.width > classMinWidth\n ? classView.rectangle.width\n : classMinWidth;\n const height = classView.rectangle.height &&\n classView.rectangle.height > classMinHeight\n ? classView.rectangle.height\n : classMinHeight;\n this.callbacks?.onPositionedRectangle_setRectangle?.(classView, new Rectangle(width, height));\n }\n }\n drawClassView(classView) {\n const classMinWidth = this.computeClassNameWidth(classView);\n this.ensureClassViewMeetMinDimensions(classView);\n this.ctx.fillStyle = this.classViewFillColor;\n // Draw the Box\n const position = this.modelCoordinateToCanvasCoordinate(classView.position);\n this.ctx.fillRect(position.x, position.y, classView.rectangle.width * this.zoom, classView.rectangle.height * this.zoom);\n this.ctx.lineWidth =\n this.selectedClasses.length !== 0 &&\n this.selectedClasses.indexOf(classView) !== -1\n ? 2\n : 1;\n this.ctx.strokeRect(position.x, position.y, classView.rectangle.width * this.zoom, classView.rectangle.height * this.zoom);\n const startX = classView.position.x;\n const startY = classView.position.y;\n this.ctx.lineWidth = 1;\n this.ctx.fillStyle = this.classViewHeaderTextColor;\n let cursorY = startY;\n this.ctx.font = `${this.fontSize * this.zoom}px ${this.fontFamily}`;\n // Print Stereotypes\n if (!classView.hideStereotypes) {\n for (const stereotype of classView.class.value.stereotypes) {\n this.ctx.font = `${this.fontSize}px ${this.fontFamily}`;\n const stereotypeTxt = `<< ${this.truncateTextWithEllipsis(stereotype.value.value, this.maxLineLength - 6)} >>`;\n const stereoWidth = this.ctx.measureText(stereotypeTxt).width;\n this.ctx.font = `${this.fontSize * this.zoom}px ${this.fontFamily}`;\n this.ctx.fillText(stereotypeTxt, (startX +\n this.screenOffset.x +\n (classView.rectangle.width - stereoWidth) / 2 -\n this.canvasCenter.x) *\n this.zoom +\n this.canvasCenter.x, (cursorY +\n this.screenOffset.y +\n this.classViewSpaceY -\n this.canvasCenter.y) *\n this.zoom +\n this.canvasCenter.y);\n cursorY = cursorY + this.lineHeight;\n }\n }\n // Print Class Name\n this.ctx.font = `bold ${this.fontSize * this.zoom}px ${this.fontFamily}`;\n const classNameText = this.truncateTextWithEllipsis(classView.class.value.name);\n this.ctx.fillText(classNameText, (startX +\n this.screenOffset.x +\n (classView.rectangle.width - classMinWidth) / 2 -\n this.canvasCenter.x) *\n this.zoom +\n this.canvasCenter.x, (cursorY +\n this.screenOffset.y +\n this.classViewSpaceY -\n this.canvasCenter.y) *\n this.zoom +\n this.canvasCenter.y);\n cursorY = cursorY + this.lineHeight;\n // Print Tagges Values\n if (!classView.hideTaggedValues) {\n for (const taggedValue of classView.class.value.taggedValues) {\n this.ctx.font = `${this.fontSize}px ${this.fontFamily}`;\n const taggedValueTxt = `{ ${this.truncateTextWithEllipsis(`${taggedValue.tag.value.value} = ${taggedValue.value}`, this.maxLineLength - 4)} }`;\n const taggedValueWidth = this.ctx.measureText(taggedValueTxt).width;\n this.ctx.font = `${this.fontSize * this.zoom}px ${this.fontFamily}`;\n this.ctx.fillText(taggedValueTxt, (startX +\n this.screenOffset.x +\n (classView.rectangle.width - taggedValueWidth) / 2 -\n this.canvasCenter.x) *\n this.zoom +\n this.canvasCenter.x, (cursorY +\n this.screenOffset.y +\n this.classViewSpaceY -\n this.canvasCenter.y) *\n this.zoom +\n this.canvasCenter.y);\n cursorY = cursorY + this.lineHeight;\n }\n }\n // 2 spaces (above and below for class name) and 1 space (above) for properties block\n cursorY = cursorY + this.classViewSpaceY * 3;\n // Draw properties\n if (!classView.hideProperties) {\n // Draw Line the line that separate header and property list\n this.ctx.beginPath();\n const yLineCoord = (startY +\n this.screenOffset.y +\n this.lineHeight +\n (!classView.hideStereotypes\n ? classView.class.value.stereotypes.length * this.lineHeight\n : 0) +\n (!classView.hideTaggedValues\n ? classView.class.value.taggedValues.length * this.lineHeight\n : 0) +\n this.classViewSpaceY -\n this.canvasCenter.y) *\n this.zoom +\n this.canvasCenter.y;\n this.ctx.moveTo((startX + this.screenOffset.x - this.canvasCenter.x) * this.zoom +\n this.canvasCenter.x, yLineCoord);\n this.ctx.lineTo((startX +\n this.screenOffset.x +\n classView.rectangle.width -\n this.canvasCenter.x) *\n this.zoom +\n this.canvasCenter.x, yLineCoord);\n this.ctx.stroke();\n for (const property of getAllOwnClassProperties(classView.class.value)) {\n if (!this.hasPropertyView(classView, property)) {\n this.ctx.fillStyle =\n property instanceof DerivedProperty\n ? this.classViewDerivedPropertyTextColor\n : property.genericType.value.rawType instanceof PrimitiveType\n ? this.classViewPrimitivePropertyTextColor\n : this.classViewPropertyTextColor;\n const propX = (startX +\n this.screenOffset.x +\n this.classViewSpaceX -\n this.canvasCenter.x) *\n this.zoom +\n this.canvasCenter.x;\n const propY = (cursorY + this.screenOffset.y - this.canvasCenter.y) * this.zoom +\n this.canvasCenter.y;\n this.drawClassViewProperty(classView, property, propX, propY, false);\n cursorY = cursorY + this.lineHeight;\n }\n }\n }\n // NOTE: force hash reload when we redraw class view; this would help with cases where\n // we auto add new properties to the class view, causing the box to expand, hence we need\n // to recompute hash\n this.callbacks?.onPositionedRectangle_forceRefreshHash?.(classView);\n }\n drawLinePropertyNameAndMultiplicity(property, textPositionX, textPositionY, multiplicityPositionX, multiplicityPositionY, measureOnly) {\n this.ctx.font = `${this.fontSize}px ${this.fontFamily}`;\n const propertyName = getPropertyDisplayName(property);\n const multiplictyString = generateMultiplicityString(property.multiplicity.lowerBound, property.multiplicity.upperBound);\n const textSize = this.ctx.measureText(propertyName).width;\n const mulSize = this.ctx.measureText(multiplictyString).width;\n this.ctx.font = `${this.fontSize * this.zoom}px ${this.fontFamily}`;\n const posX = textPositionX(textSize);\n const posY = textPositionY(textSize);\n const propertyPosition = this.modelCoordinateToCanvasCoordinate(new Point(textPositionX(textSize), textPositionY(textSize)));\n if (!measureOnly) {\n this.ctx.fillText(propertyName, propertyPosition.x, propertyPosition.y);\n }\n const mulPosX = multiplicityPositionX(mulSize);\n const mulPosY = multiplicityPositionY(mulSize);\n const multiplicityPosition = this.modelCoordinateToCanvasCoordinate(new Point(multiplicityPositionX(mulSize), multiplicityPositionY(mulSize)));\n if (!measureOnly) {\n this.ctx.fillText(multiplictyString, multiplicityPosition.x, multiplicityPosition.y);\n }\n const position = new Point(Math.min(posX, mulPosX), Math.min(posY, mulPosY));\n return new PositionedRectangle(position, new Rectangle(Math.max(posX, mulPosX) + Math.max(textSize, mulSize) - position.x, Math.max(posY, mulPosY) + this.lineHeight - position.y));\n }\n drawLinePropertyText(from, to, viewSide, property, measureOnly) {\n this.ctx.textBaseline = 'top';\n this.ctx.fillStyle = this.relationshipViewTextColor;\n const startX = from.x;\n const startY = from.y;\n const endX = to.x;\n const endY = to.y;\n const rect = viewSide.rectangle;\n if (startY < endY) {\n const x = startX +\n ((endX - startX) / (endY - startY)) * (viewSide.position.y - startY);\n if (x > viewSide.position.x && x < viewSide.position.x + rect.width) {\n return this.drawLinePropertyNameAndMultiplicity(property, (textSize) => x < viewSide.position.x + rect.width / 2\n ? x + this.propertySpacing\n : x - textSize - this.propertySpacing, (textSize) => viewSide.position.y - this.lineHeight - this.propertySpacing, (mulSize) => x < viewSide.position.x + rect.width / 2\n ? x - mulSize - this.propertySpacing\n : x + this.propertySpacing, (mulSize) => viewSide.position.y - this.lineHeight - this.propertySpacing, measureOnly);\n }\n }\n else {\n const x = startX +\n ((endX - startX) / (endY - startY)) *\n (viewSide.position.y + rect.height - startY);\n if (x > viewSide.position.x && x < viewSide.position.x + rect.width) {\n return this.drawLinePropertyNameAndMultiplicity(property, (textSize) => x < viewSide.position.x + rect.width / 2\n ? x + this.propertySpacing\n : x - textSize - this.propertySpacing, (textSize) => viewSide.position.y + rect.height + this.propertySpacing, (mulSize) => x < viewSide.position.x + rect.width / 2\n ? x - mulSize - this.propertySpacing\n : x + this.propertySpacing, (mulSize) => viewSide.position.y + rect.height + this.propertySpacing, measureOnly);\n }\n }\n if (startX < endX) {\n const y = startY +\n ((endY - startY) / (endX - startX)) * (viewSide.position.x - startX);\n if (y > viewSide.position.y && y < viewSide.position.y + rect.height) {\n return this.drawLinePropertyNameAndMultiplicity(property, (textSize) => viewSide.position.x - textSize - this.propertySpacing, (textSize) => y < viewSide.position.y + viewSide.rectangle.height / 2\n ? y + this.propertySpacing\n : y - this.lineHeight - this.propertySpacing, (mulSize) => viewSide.position.x - mulSize - this.propertySpacing, (mulSize) => y < viewSide.position.y + viewSide.rectangle.height / 2\n ? y - this.lineHeight - this.propertySpacing\n : y + this.propertySpacing, measureOnly);\n }\n }\n else {\n const y = startY +\n ((endY - startY) / (endX - startX)) *\n (viewSide.position.x + viewSide.rectangle.width - startX);\n if (y > viewSide.position.y &&\n y < viewSide.position.y + viewSide.rectangle.height) {\n return this.drawLinePropertyNameAndMultiplicity(property, (textSize) => viewSide.position.x +\n viewSide.rectangle.width +\n this.propertySpacing, (textSize) => y < viewSide.position.y + viewSide.rectangle.height / 2\n ? y + this.propertySpacing\n : y - this.lineHeight - this.propertySpacing, (mulSize) => viewSide.position.x +\n viewSide.rectangle.width +\n this.propertySpacing, (mulSize) => y < viewSide.position.y + viewSide.rectangle.height / 2\n ? y - this.lineHeight - this.propertySpacing\n : y + this.propertySpacing, measureOnly);\n }\n }\n return new PositionedRectangle(new Point(0, 0), new Rectangle(0, 0));\n }\n drawPropertyOrAssociation(propertyView) {\n const fullPath = RelationshipView.pruneUnnecessaryInsidePoints(propertyView.buildFullPath(), propertyView.from.classView.value, propertyView.to.classView.value);\n // const toProperty = asso instanceof.property ? asso.property : asso.association.properties[1];\n const toProperty = propertyView.property.value;\n this.drawLinePropertyText(\n // NOTE: by the way we compute the full path, it would guarantee\n // to always have at least 2 points\n guaranteeNonNullable(fullPath[fullPath.length - 2], 'Diagram path expected to have at least 2 points'), guaranteeNonNullable(fullPath[fullPath.length - 1], 'Diagram path expected to have at least 2 points'), propertyView.to.classView.value, toProperty, false);\n // if (asso.association) {\n // this.displayText(fullPath[1], fullPath[0], asso.from.classView, asso.association.properties[0], this.ctx);\n // }\n this.ctx.beginPath();\n this.ctx.lineWidth =\n propertyView === this.selectedPropertyOrAssociation ? 2 : 1;\n fullPath.forEach((point, idx) => {\n const position = this.modelCoordinateToCanvasCoordinate(point);\n if (idx === 0) {\n this.ctx.moveTo(position.x, position.y);\n }\n else {\n this.ctx.lineTo(position.x, position.y);\n }\n });\n this.ctx.stroke();\n this.ctx.lineWidth = 1;\n if (toProperty instanceof Property) {\n const startPoint = fullPath[1];\n const endPoint = fullPath[0];\n const startX = startPoint.x;\n const startY = startPoint.y;\n const endX = endPoint.x;\n const endY = endPoint.y;\n const to = propertyView.from;\n let resultX = 0;\n let resultY = 0;\n if (endY > startY) {\n const x = startX +\n ((endX - startX) / (endY - startY)) *\n (to.classView.value.position.y - startY);\n if (x > to.classView.value.position.x &&\n x < to.classView.value.position.x + to.classView.value.rectangle.width) {\n resultX = (x - this.canvasCenter.x) * this.zoom + this.canvasCenter.x;\n resultY =\n (to.classView.value.position.y - this.canvasCenter.y) * this.zoom +\n this.canvasCenter.y;\n }\n }\n else {\n const x = startX +\n ((endX - startX) / (endY - startY)) *\n (to.classView.value.position.y +\n to.classView.value.rectangle.height -\n startY);\n if (x > to.classView.value.position.x &&\n x < to.classView.value.position.x + to.classView.value.rectangle.width) {\n resultX = (x - this.canvasCenter.x) * this.zoom + this.canvasCenter.x;\n resultY =\n (to.classView.value.position.y +\n to.classView.value.rectangle.height -\n this.canvasCenter.y) *\n this.zoom +\n this.canvasCenter.y;\n }\n }\n if (endX > startX) {\n const y = startY +\n ((endY - startY) / (endX - startX)) *\n (to.classView.value.position.x - startX);\n if (y > to.classView.value.position.y &&\n y <\n to.classView.value.position.y + to.classView.value.rectangle.height) {\n resultX =\n (to.classView.value.position.x - this.canvasCenter.x) * this.zoom +\n this.canvasCenter.x;\n resultY = (y - this.canvasCenter.y) * this.zoom + this.canvasCenter.y;\n }\n }\n else {\n const y = startY +\n ((endY - startY) / (endX - startX)) *\n (to.classView.value.position.x +\n to.classView.value.rectangle.width -\n startX);\n if (y > to.classView.value.position.y &&\n y <\n to.classView.value.position.y + to.classView.value.rectangle.height) {\n resultX =\n (to.classView.value.position.x +\n to.classView.value.rectangle.width -\n this.canvasCenter.x) *\n this.zoom +\n this.canvasCenter.x;\n resultY = (y - this.canvasCenter.y) * this.zoom + this.canvasCenter.y;\n }\n }\n if (toProperty.aggregation === AggregationKind.COMPOSITE ||\n toProperty.aggregation === AggregationKind.SHARED) {\n // Draw Diamond\n let angle = Math.atan((endY - startY) / (endX - startX));\n angle = endX >= startX ? angle : angle + Math.PI;\n this.ctx.beginPath();\n this.ctx.moveTo(resultX +\n (this.screenOffset.x + rotatePointX(this.diamond[0], angle)) *\n this.zoom, resultY +\n (this.screenOffset.y + rotatePointY(this.diamond[0], angle)) *\n this.zoom);\n this.ctx.lineTo(resultX +\n (this.screenOffset.x + rotatePointX(this.diamond[1], angle)) *\n this.zoom, resultY +\n (this.screenOffset.y + rotatePointY(this.diamond[1], angle)) *\n this.zoom);\n this.ctx.lineTo(resultX +\n (this.screenOffset.x + rotatePointX(this.diamond[2], angle)) *\n this.zoom, resultY +\n (this.screenOffset.y + rotatePointY(this.diamond[2], angle)) *\n this.zoom);\n this.ctx.lineTo(resultX +\n (this.screenOffset.x + rotatePointX(this.diamond[3], angle)) *\n this.zoom, resultY +\n (this.screenOffset.y + rotatePointY(this.diamond[3], angle)) *\n this.zoom);\n this.ctx.lineTo(resultX +\n (this.screenOffset.x + rotatePointX(this.diamond[0], angle)) *\n this.zoom, resultY +\n (this.screenOffset.y + rotatePointY(this.diamond[0], angle)) *\n this.zoom);\n if (toProperty.aggregation === AggregationKind.SHARED) {\n this.ctx.fillStyle = this.propertyViewSharedDiamondColor;\n }\n if (toProperty.aggregation === AggregationKind.COMPOSITE) {\n this.ctx.fillStyle = this.propertyViewOwnedDiamondColor;\n }\n this.ctx.fill();\n this.ctx.stroke();\n this.ctx.lineWidth = 1;\n }\n }\n }\n drawInheritance(inheritance) {\n const rect = inheritance.to.classView.value.rectangle;\n const fullPath = RelationshipView.pruneUnnecessaryInsidePoints(inheritance.buildFullPath(), inheritance.from.classView.value, inheritance.to.classView.value);\n // NOTE: by the way we compute the full path, it would guarantee\n // to always have at least 2 points\n const startX = guaranteeNonNullable(fullPath[fullPath.length - 2], 'Diagram path expected to have at least 2 points').x;\n const startY = guaranteeNonNullable(fullPath[fullPath.length - 2], 'Diagram path expected to have at least 2 points').y;\n const endX = guaranteeNonNullable(fullPath[fullPath.length - 1], 'Diagram path expected to have at least 2 points').x;\n const endY = guaranteeNonNullable(fullPath[fullPath.length - 1], 'Diagram path expected to have at least 2 points').y;\n let resultX = 0;\n let resultY = 0;\n if (endY > startY) {\n const x = startX +\n ((endX - startX) / (endY - startY)) *\n (inheritance.to.classView.value.position.y - startY);\n if (x > inheritance.to.classView.value.position.x &&\n x < inheritance.to.classView.value.position.x + rect.width) {\n resultX = (x - this.canvasCenter.x) * this.zoom + this.canvasCenter.x;\n resultY =\n (inheritance.to.classView.value.position.y - this.canvasCenter.y) *\n this.zoom +\n this.canvasCenter.y;\n }\n }\n else {\n const x = startX +\n ((endX - startX) / (endY - startY)) *\n (inheritance.to.classView.value.position.y + rect.height - startY);\n if (x > inheritance.to.classView.value.position.x &&\n x < inheritance.to.classView.value.position.x + rect.width) {\n resultX = (x - this.canvasCenter.x) * this.zoom + this.canvasCenter.x;\n resultY =\n (inheritance.to.classView.value.position.y +\n rect.height -\n this.canvasCenter.y) *\n this.zoom +\n this.canvasCenter.y;\n }\n }\n if (endX > startX) {\n const y = startY +\n ((endY - startY) / (endX - startX)) *\n (inheritance.to.classView.value.position.x - startX);\n if (y > inheritance.to.classView.value.position.y &&\n y < inheritance.to.classView.value.position.y + rect.height) {\n resultX =\n (inheritance.to.classView.value.position.x - this.canvasCenter.x) *\n this.zoom +\n this.canvasCenter.x;\n resultY = (y - this.canvasCenter.y) * this.zoom + this.canvasCenter.y;\n }\n }\n else {\n const y = startY +\n ((endY - startY) / (endX - startX)) *\n (inheritance.to.classView.value.position.x + rect.width - startX);\n if (y > inheritance.to.classView.value.position.y &&\n y < inheritance.to.classView.value.position.y + rect.height) {\n resultX =\n (inheritance.to.classView.value.position.x +\n rect.width -\n this.canvasCenter.x) *\n this.zoom +\n this.canvasCenter.x;\n resultY = (y - this.canvasCenter.y) * this.zoom + this.canvasCenter.y;\n }\n }\n this.ctx.beginPath();\n this.ctx.lineWidth = inheritance === this.selectedInheritance ? 2 : 1;\n fullPath.forEach((point, idx) => {\n const position = this.modelCoordinateToCanvasCoordinate(point);\n if (idx === 0) {\n this.ctx.moveTo(position.x, position.y);\n }\n else {\n this.ctx.lineTo(position.x, position.y);\n }\n });\n this.ctx.stroke(); // Draw Triangle\n let angle = Math.atan((endY - startY) / (endX - startX));\n angle = endX >= startX ? angle : angle + Math.PI;\n this.ctx.beginPath();\n this.ctx.moveTo(resultX +\n (this.screenOffset.x + rotatePointX(this.triangle[0], angle)) *\n this.zoom, resultY +\n (this.screenOffset.y + rotatePointY(this.triangle[0], angle)) *\n this.zoom);\n this.ctx.lineTo(resultX +\n (this.screenOffset.x + rotatePointX(this.triangle[1], angle)) *\n this.zoom, resultY +\n (this.screenOffset.y + rotatePointY(this.triangle[1], angle)) *\n this.zoom);\n this.ctx.lineTo(resultX +\n (this.screenOffset.x + rotatePointX(this.triangle[2], angle)) *\n this.zoom, resultY +\n (this.screenOffset.y + rotatePointY(this.triangle[2], angle)) *\n this.zoom);\n this.ctx.lineTo(resultX +\n (this.screenOffset.x + rotatePointX(this.triangle[0], angle)) *\n this.zoom, resultY +\n (this.screenOffset.y + rotatePointY(this.triangle[0], angle)) *\n this.zoom);\n this.ctx.fillStyle = this.generalizationViewInheritanceTriangeFillColor;\n this.ctx.fill();\n this.ctx.stroke();\n this.ctx.lineWidth = 1;\n }\n /**\n * Reorder will move the class view to the top of the class view array of the diagram,\n * This will bring it to front.\n */\n reorderDiagramDomain(firstClass, diagram) {\n const newClasses = diagram.classViews.filter((classView) => classView !== firstClass);\n newClasses.push(firstClass);\n return newClasses;\n }\n /**\n * Shift relationship views if both ends' classviews are moved.\n */\n potentiallyShiftRelationships(relationshipViews, selectedClasses, newMovingDeltaX, newMovingDeltaY) {\n relationshipViews.forEach((view) => {\n if (selectedClasses.indexOf(view.from.classView.value) !== -1 &&\n selectedClasses.indexOf(view.to.classView.value) !== -1) {\n this.callbacks?.onRelationshipView_setPath?.(view, view.path.map((point) => new Point(point.x - newMovingDeltaX, point.y - newMovingDeltaY)));\n }\n });\n }\n // -------------------------------- Actions ------------------------------\n recenter() {\n if (this.selectedClasses.length !== 0) {\n const firstClass = this.selectedClasses[0];\n if (firstClass) {\n this.center(firstClass.position.x + firstClass.rectangle.width / 2, firstClass.position.y + firstClass.rectangle.height / 2);\n }\n }\n else {\n this.autoRecenter();\n }\n }\n switchToZoomMode() {\n this.changeMode(this.interactionMode !== DIAGRAM_INTERACTION_MODE.ZOOM_IN\n ? DIAGRAM_INTERACTION_MODE.ZOOM_IN\n : DIAGRAM_INTERACTION_MODE.ZOOM_OUT, DIAGRAM_RELATIONSHIP_EDIT_MODE.NONE);\n }\n switchToViewMode() {\n this.changeMode(DIAGRAM_INTERACTION_MODE.LAYOUT, DIAGRAM_RELATIONSHIP_EDIT_MODE.NONE);\n }\n switchToPanMode() {\n this.changeMode(DIAGRAM_INTERACTION_MODE.PAN, DIAGRAM_RELATIONSHIP_EDIT_MODE.NONE);\n }\n switchToAddPropertyMode() {\n if (!this.isReadOnly) {\n this.changeMode(DIAGRAM_INTERACTION_MODE.ADD_RELATIONSHIP, DIAGRAM_RELATIONSHIP_EDIT_MODE.PROPERTY);\n }\n }\n switchToAddInheritanceMode() {\n if (!this.isReadOnly) {\n this.changeMode(DIAGRAM_INTERACTION_MODE.ADD_RELATIONSHIP, DIAGRAM_RELATIONSHIP_EDIT_MODE.INHERITANCE);\n }\n }\n switchToAddClassMode() {\n if (!this.isReadOnly) {\n this.changeMode(DIAGRAM_INTERACTION_MODE.ADD_CLASS, DIAGRAM_RELATIONSHIP_EDIT_MODE.NONE);\n }\n }\n ejectProperty() {\n if (!this.isReadOnly) {\n if (this.mouseOverClassProperty) {\n if (this.mouseOverClassProperty.genericType.value.rawType instanceof Class) {\n this.addClassView(this.mouseOverClassProperty.genericType.value.rawType, this.canvasCoordinateToModelCoordinate(this.eventCoordinateToCanvasCoordinate(new Point(this.cursorPosition.x, this.cursorPosition.y))));\n }\n }\n else if (this.selectedClassProperty) {\n if (this.selectedClassProperty.property.genericType.value\n .rawType instanceof Class) {\n this.addClassView(this.selectedClassProperty.property.genericType.value.rawType, this.selectedClassProperty.selectionPoint);\n }\n this.selectedClassProperty = undefined;\n }\n }\n }\n getSuperTypeLevels(classViews, diagram, currentDepth, recurseMaxDepth) {\n if (classViews.length) {\n const res = uniqBy(classViews.flatMap((classView) => classView.class.value.generalizations.map((generation) => new ClassView(diagram, uuid(), PackageableElementExplicitReference.create(getRawGenericType(generation.value, Class))))), (a) => a.class.value);\n res.forEach((classView) => this.ensureClassViewMeetMinDimensions(classView));\n if (recurseMaxDepth === -1 || currentDepth < recurseMaxDepth) {\n const rec = this.getSuperTypeLevels(res, diagram, currentDepth + 1, recurseMaxDepth);\n rec.push(classViews);\n return rec;\n }\n else {\n return [classViews];\n }\n }\n return [];\n }\n layoutTaxonomy(classViewLevels, diagram, positionInitialClass, superType) {\n // Offsets\n const spaceY = 30;\n const spaceX = 10;\n classViewLevels.reverse();\n const classViews = classViewLevels.flatMap((levels, currentLevelIndex) => {\n // Get the bounding box of the precedent level\n let precedentTotalWidth = 0;\n let precedentTotalHeight = 0;\n let precedentX = 0;\n let precedentY = 0;\n if (currentLevelIndex > 0) {\n const precedent = classViewLevels[currentLevelIndex - 1];\n if (precedent.length) {\n const precedentByX = [...precedent].sort((a, b) => a.position.x - b.position.x);\n precedentX = precedentByX[0].position.x;\n precedentTotalWidth =\n precedentByX[precedentByX.length - 1].position.x +\n precedentByX[precedentByX.length - 1].rectangle\n .width -\n precedentByX[0].position.x;\n const precedentByY = [...precedent].sort((a, b) => a.position.y - b.position.y);\n precedentY = precedentByY[0].position.y;\n precedentTotalHeight =\n precedentByY[precedentByY.length - 1].position.y +\n precedentByY[precedentByY.length - 1].rectangle\n .height -\n precedentByY[0].position.y;\n }\n }\n // Get the bounding box of current Level\n const maxHeight = Math.max(...levels.map((classView) => classView.rectangle.height));\n const totalWidth = levels\n .map((classView) => classView.rectangle.width)\n .reduce((a, b) => a + b + spaceX);\n // Get the starting position\n const startX = precedentX + precedentTotalWidth / 2 - totalWidth / 2;\n const currentLevelY = superType\n ? precedentY - maxHeight - spaceY\n : precedentY + precedentTotalHeight + spaceY;\n // Set layout of current level\n if (positionInitialClass || currentLevelIndex > 0) {\n this.callbacks?.onPositionedRectangle_setPosition?.(levels[0], new Point(startX, currentLevelY));\n levels.forEach((view, idx) => {\n if (idx > 0) {\n const precedent = levels[idx - 1];\n this.callbacks?.onPositionedRectangle_setPosition?.(view, new Point(precedent.position.x + precedent.rectangle.width + spaceX, currentLevelY));\n }\n });\n }\n return levels;\n });\n const generalizationViews = (superType ? classViewLevels : classViewLevels.slice().reverse())\n .slice(0, classViewLevels.length - 1)\n .flatMap((level, idx) => level.flatMap((fromClassView) => classViewLevels[idx + 1].flatMap((toClassView) => {\n if (fromClassView.class.value.generalizations\n .map((g) => g.value.rawType)\n .includes(toClassView.class.value)) {\n return new GeneralizationView(diagram, fromClassView, toClassView);\n }\n return [];\n })));\n return [classViews, generalizationViews];\n }\n // --------------------------------- Event handler --------------------------\n keydown(e) {\n // Remove selected view(s)\n if ('Delete' === e.code) {\n if (!this.isReadOnly) {\n this.selectedClasses.forEach((classView) => {\n this.callbacks?.onDiagram_deleteClassView?.(this.diagram, classView);\n this.callbacks?.onDiagram_setAssociationViews?.(this.diagram, this.diagram.associationViews.filter((associationView) => !(associationView.from.classView.value === classView ||\n associationView.to.classView.value === classView)));\n this.callbacks?.onDiagram_setGeneralizationViews?.(this.diagram, this.diagram.generalizationViews.filter((generalizationView) => !(generalizationView.from.classView.value === classView ||\n generalizationView.to.classView.value === classView)));\n this.callbacks?.onDiagram_setPropertyViews?.(this.diagram, this.diagram.propertyViews.filter((propertyView) => !(propertyView.from.classView.value === classView ||\n propertyView.to.classView.value === classView)));\n });\n if (this.selectedPropertyOrAssociation instanceof AssociationView) {\n this.callbacks?.onDiagram_deleteAssociationView?.(this.diagram, this.selectedPropertyOrAssociation);\n }\n else if (this.selectedPropertyOrAssociation instanceof PropertyView) {\n this.callbacks?.onDiagram_deletePropertyView?.(this.diagram, this.selectedPropertyOrAssociation);\n }\n if (this.selectedInheritance) {\n if (this.diagram.generalizationViews.find((generalizationView) => generalizationView === this.selectedInheritance)) {\n this.callbacks?.onDiagram_deleteGeneralizationView?.(this.diagram, this.selectedInheritance);\n }\n }\n this.setSelectedClasses([]);\n this.drawScreen();\n }\n }\n // Edit selected view\n // NOTE: since the current behavior when editing property is to immediately\n // focus on the property name input when the inline editor pops up\n // we need to call `preventDefault` to avoid typing `e` in the property name input\n else if ('KeyE' === e.code) {\n if (this.selectedClassProperty) {\n this.handleEditProperty(this.selectedClassProperty.property, this.selectedClassProperty.selectionPoint, undefined);\n e.preventDefault();\n }\n else if (this.selectedPropertyOrAssociation) {\n // TODO: we might want to revise this to allow edit property holder view\n // on the side panel instead of showing the inline property editor\n this.handleEditProperty(this.selectedPropertyOrAssociation.property.value, this.selectedPoint ??\n (this.selectedPropertyOrAssociation.path.length\n ? this.selectedPropertyOrAssociation.path[0]\n : this.selectedPropertyOrAssociation.from.classView.value.center()), this.selectedPropertyOrAssociation);\n e.preventDefault();\n }\n else if (this.selectedClasses.length === 1) {\n this.handleEditClassView(this.selectedClasses[0]);\n }\n }\n // Hide/show properties for selected element(s)\n else if (e.altKey && 'KeyP' === e.code) {\n if (!this.isReadOnly) {\n if (this.selectedClasses.length !== 0) {\n this.selectedClasses.forEach((classView) => {\n this.callbacks?.onClassView_setHideProperties?.(classView, !classView.hideProperties);\n });\n this.drawScreen();\n }\n }\n }\n // Hide/show stereotypes for selected element(s)\n else if (e.altKey && 'KeyS' === e.code) {\n if (!this.isReadOnly) {\n if (this.selectedClasses.length !== 0) {\n this.selectedClasses.forEach((classView) => {\n this.callbacks?.onClassView_setHideStereotypes?.(classView, !classView.hideStereotypes);\n });\n this.drawScreen();\n }\n }\n }\n // Hide/show tagged values for selected element(s)\n else if (e.altKey && 'KeyT' === e.code) {\n if (!this.isReadOnly) {\n if (this.selectedClasses.length !== 0) {\n this.selectedClasses.forEach((classView) => {\n this.callbacks?.onClassView_setHideTaggedValues?.(classView, !classView.hideTaggedValues);\n });\n this.drawScreen();\n }\n }\n }\n // Add a new simple property to selected class\n else if (e.altKey && 'ArrowDown' === e.code) {\n if (!this.isReadOnly && this.selectedClasses.length === 1) {\n this.handleAddSimpleProperty(this.selectedClasses[0]);\n }\n }\n // Add supertypes of selected classes to the diagram\n else if ('ArrowUp' === e.code) {\n const views = this.getSuperTypeLevels(this.selectedClasses, this.diagram, 0, 1);\n const res = this.layoutTaxonomy(views, this.diagram, false, true);\n res[0].forEach((cv) => {\n this.callbacks?.onDiagram_addClassView?.(this.diagram, cv);\n });\n res[1].forEach((gv) => {\n this.callbacks?.onDiagram_addGeneralizationView?.(this.diagram, gv);\n });\n this.drawScreen();\n }\n // Add subtypes of selected classes to the diagram\n else if ('ArrowDown' === e.code) {\n const views = uniqBy(this.selectedClasses.flatMap((x) => x.class.value._subclasses.flatMap((c) => new ClassView(this.diagram, uuid(), PackageableElementExplicitReference.create(c)))), (cv) => cv.class.value);\n if (views.length > 0) {\n views.forEach((classView) => this.ensureClassViewMeetMinDimensions(classView));\n const res = this.layoutTaxonomy([views, this.selectedClasses], this.diagram, false, false);\n res[0].forEach((cv) => {\n this.callbacks?.onDiagram_addClassView?.(this.diagram, cv);\n });\n res[1].forEach((gv) => {\n this.callbacks?.onDiagram_addGeneralizationView?.(this.diagram, gv);\n });\n }\n this.drawScreen();\n }\n }\n mouseup(e) {\n const mouseEventCoordinate = this.resolveMouseEventCoordinate(e);\n switch (this.interactionMode) {\n case DIAGRAM_INTERACTION_MODE.ZOOM_IN: {\n // Rounding up the current zoom level to make sure floating point precision\n // does not come into play when comparing with recommended zoom levels:\n // e.g. in Javascript, 110 === 110.000000000000001\n const currentZoomLevel = Math.round(this.zoom * 100);\n let nextZoomLevel;\n // NOTE: below the smallest recommended zoom level, we will start decrement by 10\n // and increment by 100 beyond the largest recommended zoom level.\n if (currentZoomLevel <= DIAGRAM_ZOOM_LEVELS[0] - 10) {\n nextZoomLevel = Math.floor(currentZoomLevel / 10) * 10 + 10;\n }\n else if (currentZoomLevel >=\n DIAGRAM_ZOOM_LEVELS[DIAGRAM_ZOOM_LEVELS.length - 1]) {\n nextZoomLevel = Math.floor(currentZoomLevel / 100) * 100 + 100;\n }\n else {\n nextZoomLevel = guaranteeNonNullable(DIAGRAM_ZOOM_LEVELS.find((zoomLevel) => zoomLevel > currentZoomLevel));\n }\n this.zoomPoint(nextZoomLevel / 100, this.canvasCoordinateToModelCoordinate(this.eventCoordinateToCanvasCoordinate(mouseEventCoordinate)));\n break;\n }\n case DIAGRAM_INTERACTION_MODE.ZOOM_OUT: {\n const currentZoomLevel = Math.round(this.zoom * 100);\n let nextZoomLevel;\n if (currentZoomLevel <= DIAGRAM_ZOOM_LEVELS[0]) {\n nextZoomLevel = Math.ceil(currentZoomLevel / 10) * 10 - 10;\n }\n else if (currentZoomLevel >=\n DIAGRAM_ZOOM_LEVELS[DIAGRAM_ZOOM_LEVELS.length - 1] + 100) {\n nextZoomLevel = Math.ceil(currentZoomLevel / 100) * 100 - 100;\n }\n else {\n nextZoomLevel = guaranteeNonNullable(findLast(DIAGRAM_ZOOM_LEVELS, (zoomLevel) => zoomLevel < currentZoomLevel));\n }\n this.zoomPoint(nextZoomLevel / 100, this.canvasCoordinateToModelCoordinate(this.eventCoordinateToCanvasCoordinate(mouseEventCoordinate)));\n break;\n }\n default:\n break;\n }\n if (!this.isReadOnly) {\n switch (this.interactionMode) {\n case DIAGRAM_INTERACTION_MODE.LAYOUT: {\n this.diagram.generalizationViews.forEach((generalizationView) => {\n this.callbacks?.onRelationshipView_simplifyPath?.(generalizationView);\n });\n this.diagram.associationViews.forEach((associationView) => {\n this.callbacks?.onRelationshipView_simplifyPath?.(associationView);\n });\n this.diagram.propertyViews.forEach((propertyView) => {\n this.callbacks?.onRelationshipView_simplifyPath?.(propertyView);\n });\n break;\n }\n case DIAGRAM_INTERACTION_MODE.ADD_CLASS: {\n const eventPointInModelCoordinate = this.canvasCoordinateToModelCoordinate(this.eventCoordinateToCanvasCoordinate(mouseEventCoordinate));\n this.onAddClassViewClick(eventPointInModelCoordinate);\n this.changeMode(DIAGRAM_INTERACTION_MODE.LAYOUT, DIAGRAM_RELATIONSHIP_EDIT_MODE.NONE);\n break;\n }\n case DIAGRAM_INTERACTION_MODE.ADD_RELATIONSHIP: {\n if (this.startClassView &&\n this.selectionStart &&\n this.handleAddRelationship) {\n const eventPointInModelCoordinate = this.canvasCoordinateToModelCoordinate(this.eventCoordinateToCanvasCoordinate(mouseEventCoordinate));\n for (let i = this.diagram.classViews.length - 1; i >= 0; i--) {\n const targetClassView = this.diagram.classViews[i];\n if (targetClassView.contains(eventPointInModelCoordinate.x, eventPointInModelCoordinate.y)) {\n const gview = this.handleAddRelationship(this.startClassView, targetClassView);\n if (gview) {\n this.callbacks?.onRelationshipEdgeView_setOffsetX?.(gview.from, -(this.startClassView.position.x +\n this.startClassView.rectangle.width / 2 -\n this.selectionStart.x));\n this.callbacks?.onRelationshipEdgeView_setOffsetY?.(gview.from, -(this.startClassView.position.y +\n this.startClassView.rectangle.height / 2 -\n this.selectionStart.y));\n this.callbacks?.onRelationshipEdgeView_setOffsetX?.(gview.to, -(targetClassView.position.x +\n targetClassView.rectangle.width / 2 -\n eventPointInModelCoordinate.x));\n this.callbacks?.onRelationshipEdgeView_setOffsetY?.(gview.to, -(targetClassView.position.y +\n targetClassView.rectangle.height / 2 -\n eventPointInModelCoordinate.y));\n }\n }\n }\n this.changeMode(DIAGRAM_INTERACTION_MODE.LAYOUT, DIAGRAM_RELATIONSHIP_EDIT_MODE.NONE);\n }\n break;\n }\n default:\n break;\n }\n }\n this.setLeftClick(false);\n this.setMiddleClick(false);\n this.setRightClick(false);\n this.setSelectedClassCorner(undefined);\n this.setSelectionStart(undefined);\n this.drawScreen();\n }\n mousedblclick(e) {\n const mouseEventCoordinate = this.resolveMouseEventCoordinate(e);\n if ([\n DIAGRAM_INTERACTION_MODE.ADD_RELATIONSHIP,\n DIAGRAM_INTERACTION_MODE.ADD_CLASS,\n DIAGRAM_INTERACTION_MODE.ZOOM_IN,\n DIAGRAM_INTERACTION_MODE.ZOOM_OUT,\n ].includes(this.interactionMode)) {\n return;\n }\n const eventPointInModelCoordinate = this.canvasCoordinateToModelCoordinate(this.eventCoordinateToCanvasCoordinate(mouseEventCoordinate));\n // Check double click on class property\n if (this.mouseOverClassProperty) {\n if (this.onClassPropertyDoubleClick) {\n this.onClassPropertyDoubleClick(this.mouseOverClassProperty, eventPointInModelCoordinate, undefined);\n return;\n }\n }\n // Check double click on class name\n if (this.mouseOverClassName) {\n if (this.onClassNameDoubleClick) {\n this.onClassNameDoubleClick(this.mouseOverClassName, eventPointInModelCoordinate);\n return;\n }\n }\n // Check double click on class view\n const selectedClass = this.diagram.classViews.find((classView) => classView.contains(eventPointInModelCoordinate.x, eventPointInModelCoordinate.y));\n if (selectedClass) {\n if (this.onClassViewDoubleClick) {\n this.onClassViewDoubleClick(selectedClass, eventPointInModelCoordinate);\n return;\n }\n }\n // Check double click on line property label\n if (this.mouseOverPropertyHolderViewLabel) {\n if (this.onClassPropertyDoubleClick) {\n this.onClassPropertyDoubleClick(this.mouseOverPropertyHolderViewLabel.property.value, eventPointInModelCoordinate, this.mouseOverPropertyHolderViewLabel);\n return;\n }\n }\n // Check double click on background\n if (this.onBackgroundDoubleClick) {\n this.onBackgroundDoubleClick(eventPointInModelCoordinate);\n }\n }\n mousedown(e) {\n const mouseEventCoordinate = this.resolveMouseEventCoordinate(e);\n this.setSelectionStart(undefined);\n this.setSelectedClassCorner(undefined);\n this.setSelectedPropertyOrAssociation(undefined);\n this.setSelectedInheritance(undefined);\n this.selection = undefined;\n this.selectedClassProperty = undefined;\n this.selectedPoint = undefined;\n this.startClassView = undefined;\n const eventPointInCanvasCoordinate = this.eventCoordinateToCanvasCoordinate(mouseEventCoordinate);\n const eventPointInModelCoordinate = this.canvasCoordinateToModelCoordinate(eventPointInCanvasCoordinate);\n // left click\n if (e.button === 0) {\n this.setLeftClick(true);\n switch (this.interactionMode) {\n case DIAGRAM_INTERACTION_MODE.PAN: {\n this.positionBeforeLastMove = mouseEventCoordinate;\n return;\n }\n case DIAGRAM_INTERACTION_MODE.LAYOUT: {\n // Check if the selection lies within the bottom right corner box of a box (so we can do resize of box here)\n // NOTE: Traverse backwards the class views to preserve z-index buffer\n for (let i = this.diagram.classViews.length - 1; i >= 0; i--) {\n const targetClassView = this.diagram.classViews[i];\n if (buildBottomRightCornerBox(targetClassView).contains(eventPointInModelCoordinate.x, eventPointInModelCoordinate.y)) {\n this.setSelectedClasses([]);\n this.setSelectedClassCorner(this.diagram.classViews[i]);\n if (!this.isReadOnly) {\n // Bring the class view to front\n this.callbacks?.onDiagram_setClassViews?.(this.diagram, this.reorderDiagramDomain(guaranteeNonNullable(this.selectedClassCorner), this.diagram));\n }\n break;\n }\n }\n if (!this.selectedClassCorner) {\n if (this.mouseOverClassProperty) {\n // Check for selection of property within a class view\n this.selectedClassProperty = {\n property: this.mouseOverClassProperty,\n selectionPoint: eventPointInModelCoordinate,\n };\n this.setSelectedClasses([]);\n }\n else {\n // Check for selection of class view(s)\n let anyClassesSelected = false;\n // Traverse backwards the class views to preserve z-index buffer\n for (let i = this.diagram.classViews.length - 1; i >= 0; i--) {\n const targetClassView = this.diagram.classViews[i];\n if (targetClassView.contains(eventPointInModelCoordinate.x, eventPointInModelCoordinate.y)) {\n if (this.selectedClasses.length === 0 ||\n this.selectedClasses.indexOf(targetClassView) === -1) {\n this.setSelectedClasses([targetClassView]);\n }\n if (!this.isReadOnly) {\n // Bring the class view to front\n this.callbacks?.onDiagram_setClassViews?.(this.diagram, this.reorderDiagramDomain(this.selectedClasses[0], this.diagram));\n }\n this.clickX =\n eventPointInCanvasCoordinate.x / this.zoom -\n this.screenOffset.x;\n this.clickY =\n eventPointInCanvasCoordinate.y / this.zoom -\n this.screenOffset.y;\n // Set this here so we can keep moving the classviews\n // NOTE: in the past we tried to reset this every time after we reset `this.selectedClasses`\n // and that causes the selected classviews janks and jumps to a weird position during zoom.\n this._selectedClassesInitialPositions =\n this.selectedClasses.map((cv) => ({\n classView: cv,\n oldPos: new Point(cv.position.x, cv.position.y),\n }));\n anyClassesSelected = true;\n break;\n }\n }\n if (!anyClassesSelected) {\n this.setSelectedClasses([]);\n }\n if (!this.selectedClasses.length) {\n // NOTE: we start checking for the selected point to decide\n // whether or not to set a selection (selected inheritance view, property view, etc.)\n // the order really matters here as each selection does set the selection point\n // which causes the next selection to not happen\n // check for selection of inheritance view\n for (const generalizationView of this.diagram\n .generalizationViews) {\n const val = this.callbacks?.onFindOrBuildPoint?.(generalizationView, eventPointInModelCoordinate.x, eventPointInModelCoordinate.y, this.zoom, !this.isReadOnly);\n if (val) {\n this.selectedPoint = val;\n this.setSelectedInheritance(generalizationView);\n break;\n }\n }\n // check for selection of association view\n if (!this.selectedPoint) {\n for (const associationView of this.diagram.associationViews) {\n const val = this.callbacks?.onFindOrBuildPoint?.(associationView, eventPointInModelCoordinate.x, eventPointInModelCoordinate.y, this.zoom, !this.isReadOnly);\n if (val) {\n this.selectedPoint = val;\n this.setSelectedPropertyOrAssociation(associationView);\n break;\n }\n }\n }\n // check for selection of property view\n if (!this.selectedPoint) {\n for (const propertyView of this.diagram.propertyViews) {\n const val = this.callbacks?.onFindOrBuildPoint?.(propertyView, eventPointInModelCoordinate.x, eventPointInModelCoordinate.y, this.zoom, !this.isReadOnly);\n if (val) {\n this.selectedPoint = val;\n this.setSelectedPropertyOrAssociation(propertyView);\n break;\n }\n }\n }\n // if the selected point is not identified then it is consider the start of a selection\n if (!this.selectedPoint) {\n this.setSelectionStart(eventPointInModelCoordinate);\n }\n }\n }\n }\n break;\n }\n case DIAGRAM_INTERACTION_MODE.ADD_RELATIONSHIP: {\n this.setSelectionStart(eventPointInModelCoordinate);\n this.startClassView = undefined;\n for (let i = this.diagram.classViews.length - 1; i >= 0; i--) {\n const targetClassView = this.diagram.classViews[i];\n if (targetClassView.contains(eventPointInModelCoordinate.x, eventPointInModelCoordinate.y)) {\n this.startClassView = targetClassView;\n }\n }\n if (!this.startClassView) {\n this.changeMode(DIAGRAM_INTERACTION_MODE.LAYOUT, DIAGRAM_RELATIONSHIP_EDIT_MODE.NONE);\n }\n break;\n }\n default:\n break;\n }\n }\n // middle click\n else if (e.button === 1) {\n this.setMiddleClick(true);\n this.positionBeforeLastMove = mouseEventCoordinate;\n return;\n }\n // right click\n else if (e.button === 2) {\n this.setRightClick(true);\n this.positionBeforeLastMove = mouseEventCoordinate;\n if (this.mouseOverClassView) {\n this.onClassViewRightClick(this.mouseOverClassView, eventPointInModelCoordinate);\n this.setRightClick(false);\n }\n return;\n }\n this.clearScreen();\n this.drawAll();\n }\n mousewheel(e) {\n const mouseEventCoordinate = this.resolveMouseEventCoordinate(e);\n // no scrolling to be done since we want to convert scroll into zoom\n e.preventDefault();\n e.stopImmediatePropagation();\n // if scrolling is more horizontal than vertical, i.e. zoom using trackpad\n // we don't want to treat this as zooming\n if (Math.abs(e.deltaY) <= Math.abs(e.deltaX)) {\n return;\n }\n // scroll down to zoom in and up to zoom out\n const newZoomLevel = this.zoom - (e.deltaY / 120) * 0.05;\n this.executeZoom(newZoomLevel, this.canvasCoordinateToModelCoordinate(this.eventCoordinateToCanvasCoordinate(mouseEventCoordinate)));\n }\n mousemove(e) {\n const mouseEventCoordinate = this.resolveMouseEventCoordinate(e);\n this.cursorPosition = mouseEventCoordinate;\n // Pan/Move\n if (this.rightClick ||\n this.middleClick ||\n (this.leftClick && this.interactionMode === DIAGRAM_INTERACTION_MODE.PAN)) {\n this.screenOffset = new Point(this.screenOffset.x +\n (mouseEventCoordinate.x - this.positionBeforeLastMove.x) / this.zoom, this.screenOffset.y +\n (mouseEventCoordinate.y - this.positionBeforeLastMove.y) / this.zoom);\n this.positionBeforeLastMove = mouseEventCoordinate;\n this.clearScreen();\n this.drawAll();\n }\n else if (this.leftClick) {\n const eventPointInCanvasCoordinate = this.eventCoordinateToCanvasCoordinate(mouseEventCoordinate);\n const eventPointInModelCoordinate = this.canvasCoordinateToModelCoordinate(eventPointInCanvasCoordinate);\n switch (this.interactionMode) {\n case DIAGRAM_INTERACTION_MODE.LAYOUT: {\n // Resize class view\n if (this.selectedClassCorner) {\n // Make sure width and height are in range!\n this.callbacks?.onPositionedRectangle_setRectangle?.(this.selectedClassCorner, new Rectangle(eventPointInModelCoordinate.x -\n this.selectedClassCorner.position.x, eventPointInModelCoordinate.y -\n this.selectedClassCorner.position.y));\n // Refresh hash since ClassView rectangle is not observable\n this.callbacks?.onPositionedRectangle_forceRefreshHash?.(this.selectedClassCorner);\n this.drawClassView(this.selectedClassCorner);\n this.drawScreen();\n }\n // Move class view\n if (!this.selectionStart && this.selectedClasses.length) {\n if (!this.isReadOnly) {\n let newMovingDeltaX = 0;\n let newMovingDeltaY = 0;\n this.selectedClasses.forEach((selectedClass, idx) => {\n const selectedClassOldPosition = this._selectedClassesInitialPositions.length > idx\n ? this._selectedClassesInitialPositions[idx]\n : undefined;\n if (selectedClassOldPosition) {\n const newMovingX = eventPointInCanvasCoordinate.x / this.zoom -\n this.screenOffset.x -\n (this.clickX - selectedClassOldPosition.oldPos.x);\n const newMovingY = eventPointInCanvasCoordinate.y / this.zoom -\n this.screenOffset.y -\n (this.clickY - selectedClassOldPosition.oldPos.y);\n newMovingDeltaX = selectedClass.position.x - newMovingX;\n newMovingDeltaY = selectedClass.position.y - newMovingY;\n this.callbacks?.onPositionedRectangle_setPosition?.(selectedClass, new Point(newMovingX, newMovingY));\n // Refresh hash since ClassView position is not observable\n this.callbacks?.onPositionedRectangle_forceRefreshHash?.(selectedClass);\n }\n });\n this.potentiallyShiftRelationships(this.diagram.associationViews, this.selectedClasses, newMovingDeltaX, newMovingDeltaY);\n this.potentiallyShiftRelationships(this.diagram.propertyViews, this.selectedClasses, newMovingDeltaX, newMovingDeltaY);\n this.potentiallyShiftRelationships(this.diagram.generalizationViews, this.selectedClasses, newMovingDeltaX, newMovingDeltaY);\n this.drawScreen();\n }\n }\n // Change line (add a new point to the line)\n if (this.selectedPoint) {\n if (this.selectedPropertyOrAssociation) {\n this.callbacks?.onRelationshipView_changePoint?.(this.selectedPropertyOrAssociation, this.selectedPoint, eventPointInModelCoordinate);\n }\n else if (this.selectedInheritance) {\n this.callbacks?.onRelationshipView_changePoint?.(this.selectedInheritance, this.selectedPoint, eventPointInModelCoordinate);\n }\n this.selectedPoint = eventPointInModelCoordinate;\n this.drawScreen();\n }\n // Draw selection box\n if (this.selectionStart) {\n this.clearScreen();\n this.drawAll();\n const selectionStartPointInCanvasCoordinate = this.modelCoordinateToCanvasCoordinate(this.selectionStart);\n this.ctx.fillStyle = this.selectionBoxBorderColor;\n this.ctx.fillRect(selectionStartPointInCanvasCoordinate.x, selectionStartPointInCanvasCoordinate.y, eventPointInCanvasCoordinate.x -\n selectionStartPointInCanvasCoordinate.x, eventPointInCanvasCoordinate.y -\n selectionStartPointInCanvasCoordinate.y);\n this.ctx.strokeRect(selectionStartPointInCanvasCoordinate.x, selectionStartPointInCanvasCoordinate.y, eventPointInCanvasCoordinate.x -\n selectionStartPointInCanvasCoordinate.x, eventPointInCanvasCoordinate.y -\n selectionStartPointInCanvasCoordinate.y);\n const selectionBoxWidth = (eventPointInCanvasCoordinate.x -\n selectionStartPointInCanvasCoordinate.x) /\n this.zoom;\n const selectionBoxHeight = (eventPointInCanvasCoordinate.y -\n selectionStartPointInCanvasCoordinate.y) /\n this.zoom;\n this.selection = new PositionedRectangle(new Point(selectionBoxWidth > 0\n ? this.selectionStart.x\n : this.selectionStart.x + selectionBoxWidth, selectionBoxHeight > 0\n ? this.selectionStart.y\n : this.selectionStart.y + selectionBoxHeight), new Rectangle(Math.abs(selectionBoxWidth), Math.abs(selectionBoxHeight)));\n this.setSelectedClasses([]);\n for (const classView of this.diagram.classViews) {\n if (boxContains(this.selection, classView) ||\n boxContains(classView, this.selection)) {\n this.setSelectedClasses([...this.selectedClasses, classView]);\n }\n }\n }\n break;\n }\n case DIAGRAM_INTERACTION_MODE.ADD_RELATIONSHIP: {\n if (this.selectionStart && this.startClassView) {\n this.clearScreen();\n this.drawBoundingBox();\n const selectionStartPointInCanvasCoordinate = this.modelCoordinateToCanvasCoordinate(this.selectionStart);\n // Draw Line ------\n this.ctx.moveTo(selectionStartPointInCanvasCoordinate.x, selectionStartPointInCanvasCoordinate.y);\n this.ctx.lineTo(eventPointInCanvasCoordinate.x, eventPointInCanvasCoordinate.y);\n this.ctx.stroke();\n // Draw Line ------\n this.drawDiagram();\n }\n break;\n }\n default:\n break;\n }\n }\n else {\n this.drawScreen();\n const eventPointInCanvasCoordinate = this.eventCoordinateToCanvasCoordinate(mouseEventCoordinate);\n const eventPointInModelCoordinate = this.canvasCoordinateToModelCoordinate(eventPointInCanvasCoordinate);\n // Check for hovering state\n this.setMouseOverClassView(undefined);\n this.setMouseOverClassName(undefined);\n this.setMouseOverClassCorner(undefined);\n this.setMouseOverClassProperty(undefined);\n this.setMouseOverPropertyHolderViewLabel(undefined);\n for (const classView of this.diagram.classViews.slice().reverse()) {\n if (classView.contains(eventPointInModelCoordinate.x, eventPointInModelCoordinate.y)) {\n this.setMouseOverClassView(classView);\n // Check hover class corner\n if (buildBottomRightCornerBox(classView).contains(eventPointInModelCoordinate.x, eventPointInModelCoordinate.y)) {\n this.setMouseOverClassCorner(classView);\n }\n // TODO: we probably should make this a shared function so we don't need to maintain\n // this computation in both places: here and when we draw class view properties\n const _class = classView.class.value;\n let cursorY = classView.position.y + this.classViewSpaceY;\n // account for height of stereotypes\n cursorY =\n cursorY +\n (classView.hideStereotypes\n ? 0\n : _class.stereotypes.length * this.lineHeight);\n // Check hover class name\n const classNameWidth = this.computeClassNameWidth(classView);\n if (new PositionedRectangle(this.modelCoordinateToCanvasCoordinate(new Point(classView.position.x +\n (classView.rectangle.width - classNameWidth) / 2, cursorY)), new Rectangle(classNameWidth, this.lineHeight)).contains(eventPointInCanvasCoordinate.x, eventPointInCanvasCoordinate.y)) {\n this.setMouseOverClassName(classView);\n }\n // account for height of class name\n cursorY += this.lineHeight;\n // account for height of tagged values\n cursorY =\n cursorY +\n (classView.hideTaggedValues\n ? 0\n : _class.taggedValues.length * this.lineHeight);\n // 2 spaces: 1 space (below for class name) and 1 space (above) for properties block\n cursorY += this.classViewSpaceY * 2;\n // Check hover class property\n for (const property of getAllOwnClassProperties(_class)) {\n if (!this.hasPropertyView(classView, property)) {\n this.ctx.font = `${(this.fontSize - 1) * this.zoom}px ${this.fontFamily}`;\n if (new PositionedRectangle(this.modelCoordinateToCanvasCoordinate(new Point(classView.position.x + this.classViewSpaceX, cursorY)), new Rectangle(this.drawClassViewProperty(classView, property, \n // these dimensions mean nothing since we only measure here\n 0, 0, true) * this.zoom, this.lineHeight * this.zoom)).contains(eventPointInCanvasCoordinate.x, eventPointInCanvasCoordinate.y)) {\n this.setMouseOverClassProperty(property);\n }\n cursorY = cursorY + this.lineHeight;\n }\n }\n break;\n }\n }\n const propertyHolderViews = [\n ...this.diagram.propertyViews,\n ...this.diagram.associationViews,\n ];\n for (const propertyHolderView of propertyHolderViews) {\n const fullPath = RelationshipView.pruneUnnecessaryInsidePoints(propertyHolderView.buildFullPath(), propertyHolderView.from.classView.value, propertyHolderView.to.classView.value);\n const propertyInfoBox = this.drawLinePropertyText(\n // NOTE: by the way we compute the full path, it would guarantee\n // to always have at least 2 points\n guaranteeNonNullable(fullPath[fullPath.length - 2], 'Diagram path expected to have at least 2 points'), guaranteeNonNullable(fullPath[fullPath.length - 1], 'Diagram path expected to have at least 2 points'), propertyHolderView.to.classView.value, propertyHolderView.property.value, false);\n if (propertyInfoBox.contains(eventPointInModelCoordinate.x, eventPointInModelCoordinate.y)) {\n this.setMouseOverPropertyHolderViewLabel(propertyHolderView);\n break;\n }\n }\n }\n }\n}\n//# sourceMappingURL=DiagramRenderer.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport {} from '@finos/legend-extension-dsl-diagram/graph';\nimport { extractElementNameFromPath, } from '@finos/legend-graph';\nimport { generateEnumerableNameFromToken, guaranteeNonNullable, } from '@finos/legend-shared';\nimport { action, computed, flow, flowResult, makeObservable, observable, } from 'mobx';\nimport { deserialize } from 'serializr';\nimport { DiagramClassInfo, addClassToGraph, buildGraphFromDiagramInfo, } from '../server/models/DiagramInfo.js';\nimport { FileCoordinate, trimPathLeadingSlash } from '../server/models/File.js';\nimport { PureIDETabState } from './PureIDETabManagerState.js';\nimport { LEGEND_PURE_IDE_DIAGRAM_EDITOR_COMMAND_KEY } from '../__lib__/LegendPureIDECommand.js';\nimport { DIAGRAM_INTERACTION_MODE, } from '@finos/legend-extension-dsl-diagram/application';\nexport class DiagramEditorState extends PureIDETabState {\n diagramInfo;\n _renderer;\n diagram;\n diagramClasses;\n graph;\n diagramPath;\n filePath;\n fileLine;\n fileColumn;\n constructor(ideStore, diagramInfo, diagramPath, filePath, fileLine, fileColumn) {\n super(ideStore);\n makeObservable(this, {\n _renderer: observable,\n diagram: observable,\n diagramInfo: observable,\n diagramName: computed,\n diagramCursorClass: computed,\n addClassView: flow,\n rebuild: action,\n setRenderer: action,\n });\n this.diagramPath = diagramPath;\n this.filePath = filePath;\n this.fileLine = fileLine;\n this.fileColumn = fileColumn;\n this.diagramInfo = diagramInfo;\n const [diagram, graph, diagramClasses] = buildGraphFromDiagramInfo(diagramInfo);\n this.diagram = diagram;\n this.graph = graph;\n this.diagramClasses = diagramClasses;\n }\n get label() {\n return trimPathLeadingSlash(this.diagramPath);\n }\n get description() {\n return `Diagram: ${trimPathLeadingSlash(this.diagramPath)}`;\n }\n get diagramName() {\n return extractElementNameFromPath(this.diagramPath);\n }\n match(tab) {\n return (tab instanceof DiagramEditorState && this.diagramPath === tab.diagramPath);\n }\n get renderer() {\n return guaranteeNonNullable(this._renderer, `Diagram renderer must be initialized (this is likely caused by calling this method at the wrong place)`);\n }\n get isDiagramRendererInitialized() {\n return Boolean(this._renderer);\n }\n // NOTE: we have tried to use React to control the cursor and\n // could not overcome the jank/lag problem, so we settle with CSS-based approach\n // See https://css-tricks.com/using-css-cursors/\n // See https://developer.mozilla.org/en-US/docs/Web/CSS/cursor\n get diagramCursorClass() {\n if (!this.isDiagramRendererInitialized) {\n return '';\n }\n if (this.renderer.middleClick || this.renderer.rightClick) {\n return 'diagram-editor__cursor--grabbing';\n }\n switch (this.renderer.interactionMode) {\n case DIAGRAM_INTERACTION_MODE.PAN: {\n return this.renderer.leftClick\n ? 'diagram-editor__cursor--grabbing'\n : 'diagram-editor__cursor--grab';\n }\n case DIAGRAM_INTERACTION_MODE.ZOOM_IN: {\n return 'diagram-editor__cursor--zoom-in';\n }\n case DIAGRAM_INTERACTION_MODE.ZOOM_OUT: {\n return 'diagram-editor__cursor--zoom-out';\n }\n case DIAGRAM_INTERACTION_MODE.LAYOUT: {\n if (this.renderer.selectionStart) {\n return 'diagram-editor__cursor--crosshair';\n }\n else if (this.renderer.mouseOverClassCorner ||\n this.renderer.selectedClassCorner) {\n return 'diagram-editor__cursor--resize';\n }\n else if (this.renderer.mouseOverClassView) {\n return 'diagram-editor__cursor--pointer';\n }\n return '';\n }\n default:\n return '';\n }\n }\n rebuild(value) {\n this.diagramInfo = value;\n const [diagram, graph, diagramClasses] = buildGraphFromDiagramInfo(value);\n this.diagram = diagram;\n this.graph = graph;\n this.diagramClasses = diagramClasses;\n this.fileLine = value.diagram.sourceInformation.line;\n this.fileColumn = value.diagram.sourceInformation.column;\n }\n setupRenderer() {\n this.renderer.onClassViewDoubleClick = (classView) => {\n const sourceInformation = this.diagramClasses.get(classView.class.value.path)?.sourceInformation;\n if (sourceInformation) {\n const coordinate = new FileCoordinate(sourceInformation.sourceId, sourceInformation.startLine, sourceInformation.startColumn);\n flowResult(this.ideStore.executeNavigation(coordinate)).catch(this.ideStore.applicationStore.alertUnhandledError);\n }\n };\n }\n setRenderer(val) {\n this._renderer = val;\n }\n *addClassView(path, position) {\n const diagramClassInfo = deserialize(DiagramClassInfo, yield this.ideStore.client.getDiagramClassInfo(path));\n const _class = addClassToGraph(diagramClassInfo, this.graph, this.diagramClasses);\n const classView = this.renderer.addClassView(_class, position);\n // NOTE: The auto-generated ID by diagram renderer will cause a parser error in Pure\n // so we need to rewrite it accordingly\n if (classView) {\n classView.id = generateEnumerableNameFromToken(this.diagram.classViews.map((cv) => cv.id), 'cview');\n }\n }\n registerCommands() {\n const DEFAULT_TRIGGER = () => \n // make sure the current active editor is this diagram editor\n this.ideStore.tabManagerState.currentTab === this &&\n // make sure the renderer is initialized\n this.isDiagramRendererInitialized;\n this.ideStore.applicationStore.commandService.registerCommand({\n key: LEGEND_PURE_IDE_DIAGRAM_EDITOR_COMMAND_KEY.RECENTER,\n trigger: DEFAULT_TRIGGER,\n action: () => this.renderer.recenter(),\n });\n this.ideStore.applicationStore.commandService.registerCommand({\n key: LEGEND_PURE_IDE_DIAGRAM_EDITOR_COMMAND_KEY.USE_ZOOM_TOOL,\n trigger: DEFAULT_TRIGGER,\n action: () => this.renderer.switchToZoomMode(),\n });\n this.ideStore.applicationStore.commandService.registerCommand({\n key: LEGEND_PURE_IDE_DIAGRAM_EDITOR_COMMAND_KEY.USE_VIEW_TOOL,\n trigger: DEFAULT_TRIGGER,\n action: () => this.renderer.switchToViewMode(),\n });\n this.ideStore.applicationStore.commandService.registerCommand({\n key: LEGEND_PURE_IDE_DIAGRAM_EDITOR_COMMAND_KEY.USE_PAN_TOOL,\n trigger: DEFAULT_TRIGGER,\n action: () => this.renderer.switchToPanMode(),\n });\n }\n deregisterCommands() {\n [\n LEGEND_PURE_IDE_DIAGRAM_EDITOR_COMMAND_KEY.RECENTER,\n LEGEND_PURE_IDE_DIAGRAM_EDITOR_COMMAND_KEY.USE_ZOOM_TOOL,\n LEGEND_PURE_IDE_DIAGRAM_EDITOR_COMMAND_KEY.USE_VIEW_TOOL,\n LEGEND_PURE_IDE_DIAGRAM_EDITOR_COMMAND_KEY.USE_PAN_TOOL,\n ].forEach((commandKey) => this.ideStore.applicationStore.commandService.deregisterCommand(commandKey));\n }\n}\n//# sourceMappingURL=DiagramEditorState.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { action, makeObservable, observable } from 'mobx';\nexport class FileSearchCommandState {\n text = '';\n isCaseSensitive = false;\n isRegExp = false;\n constructor() {\n makeObservable(this, {\n text: observable,\n isCaseSensitive: observable,\n isRegExp: observable,\n reset: action,\n setText: action,\n setCaseSensitive: action,\n setRegExp: action,\n });\n }\n reset() {\n this.setText('');\n this.setCaseSensitive(false);\n this.setRegExp(false);\n }\n setText(value) {\n this.text = value;\n }\n setCaseSensitive(value) {\n this.isCaseSensitive = value;\n }\n setRegExp(value) {\n this.isRegExp = value;\n }\n}\n//# sourceMappingURL=FileSearchCommandState.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { ApplicationError } from '@finos/legend-shared';\nexport class ExecutionError extends ApplicationError {\n}\n//# sourceMappingURL=ExecutionError.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { DISPLAY_ANSI_ESCAPE } from '@finos/legend-application';\nimport { assertErrorThrown } from '@finos/legend-shared';\nimport { flowResult } from 'mobx';\nimport { deserialize } from 'serializr';\nimport { ConceptNode, PackageConceptAttribute, } from '../server/models/ConceptTree.js';\nimport { DirectoryNode } from '../server/models/DirectoryTree.js';\nimport { FileCoordinate } from '../server/models/File.js';\nimport { HOME_DIRECTORY_PATH, ROOT_PACKAGE_PATH, WELCOME_FILE_PATH, } from './PureIDEConfig.js';\nimport { LEGEND_PURE_IDE_TERMINAL_COMMAND } from '../__lib__/LegendPureIDECommand.js';\nconst PACKAGE_PATH_PATTERN = /^(?:(?:\\w[\\w$]*)::)*\\w[\\w$]*$/;\nconst FILE_PATH_PATTERN = /^\\/?(?:\\w+\\/)*\\w+(?:\\.\\w+)*$/;\nconst LEGEND_PURE_IDE_TERMINAL_WEBLINK_REGEX = /(?:(?<url>https?:[/]{2}[^\\s\"'!*(){}|\\\\^<>`]*[^\\s\"':,.!?{}|\\\\^~[\\]`()<>])|(?<path>resource:(?<path_sourceId>\\/?(?:\\w+\\/)*\\w+(?:\\.\\w+)*) (?:line:(?<path_line>\\d+)) (?:column:(?<path_column>\\d+))))/;\nexport const setupTerminal = (ideStore) => {\n ideStore.applicationStore.terminalService.terminal.setup({\n webLinkProvider: {\n handler: (event, text) => {\n const match = text.match(LEGEND_PURE_IDE_TERMINAL_WEBLINK_REGEX);\n if (match?.groups?.url) {\n ideStore.applicationStore.navigationService.navigator.visitAddress(match.groups.url);\n }\n else if (match?.groups?.path &&\n match.groups.path_sourceId &&\n match.groups.path_column &&\n match.groups.path_line) {\n flowResult(ideStore.loadFile(match.groups.path_sourceId, new FileCoordinate(match.groups.path_sourceId, Number.parseInt(match.groups.path_line, 10), Number.parseInt(match.groups.path_column, 10)))).catch(ideStore.applicationStore.alertUnhandledError);\n }\n },\n regex: LEGEND_PURE_IDE_TERMINAL_WEBLINK_REGEX,\n },\n // TODO: for these, we can potentially use `runCommand`, but we need to refactor\n // command to return promises\n // that is the cleaner way to do this and make us able to move terminal plugins/extension mechanism\n // to LegendApplicationPlugin for example, rather than being application specific like this\n // as for example, this requires access to `EditorStore` right now\n commands: [\n {\n command: LEGEND_PURE_IDE_TERMINAL_COMMAND.GO,\n description: 'Run the go() function in welcome file',\n usage: 'go',\n aliases: ['compile', 'executeGo'],\n handler: async (args) => flowResult(ideStore.executeGo()).catch(ideStore.applicationStore.alertUnhandledError),\n },\n {\n command: LEGEND_PURE_IDE_TERMINAL_COMMAND.TEST,\n description: 'Run the test suite (by path if specified)',\n usage: 'test [/some/path]',\n handler: async (args) => {\n const path = args[0];\n if (path) {\n if (!path.match(PACKAGE_PATH_PATTERN)) {\n ideStore.applicationStore.terminalService.terminal.fail(`command requires a valid package/concept path`);\n return;\n }\n }\n await flowResult(ideStore.executeTests(path ?? ROOT_PACKAGE_PATH)).catch(ideStore.applicationStore.alertUnhandledError);\n },\n },\n // io\n {\n command: LEGEND_PURE_IDE_TERMINAL_COMMAND.REMOVE,\n description: 'Remove a file or directory',\n usage: 'rm /some/path',\n handler: async (args) => {\n const path = args[0];\n if (!path?.match(FILE_PATH_PATTERN)) {\n ideStore.applicationStore.terminalService.terminal.fail(`rm command requires a valid file/directory path`);\n return;\n }\n await flowResult(ideStore.deleteDirectoryOrFile(path, undefined, undefined)).catch(ideStore.applicationStore.alertUnhandledError);\n },\n },\n {\n command: LEGEND_PURE_IDE_TERMINAL_COMMAND.MOVE,\n description: 'Move a file',\n usage: 'mv /old/path /new/path',\n handler: async (args) => {\n const oldPath = args[0];\n if (!oldPath?.match(FILE_PATH_PATTERN)) {\n ideStore.applicationStore.terminalService.terminal.fail(`command requires a valid old file path`);\n return;\n }\n const newPath = args[1];\n if (!newPath?.match(FILE_PATH_PATTERN)) {\n ideStore.applicationStore.terminalService.terminal.fail(`command requires a valid new file path`);\n return;\n }\n await flowResult(ideStore.renameFile(oldPath, newPath)).catch(ideStore.applicationStore.alertUnhandledError);\n },\n },\n {\n command: LEGEND_PURE_IDE_TERMINAL_COMMAND.NEW_DIRECTORY,\n description: 'Create a new directory',\n usage: 'mkdir /some/path',\n handler: async (args) => {\n const path = args[0];\n if (!path?.match(FILE_PATH_PATTERN)) {\n ideStore.applicationStore.terminalService.terminal.fail(`command requires a valid directory path`);\n return;\n }\n await flowResult(ideStore.createNewDirectory(path)).catch(ideStore.applicationStore.alertUnhandledError);\n },\n },\n {\n command: LEGEND_PURE_IDE_TERMINAL_COMMAND.NEW_FILE,\n description: 'Create a new file',\n usage: 'touch /some/path',\n handler: async (args) => {\n const path = args[0];\n if (!path?.match(FILE_PATH_PATTERN)) {\n ideStore.applicationStore.terminalService.terminal.fail(`command requires a valid path`);\n return;\n }\n await flowResult(ideStore.createNewDirectory(path)).catch(ideStore.applicationStore.alertUnhandledError);\n },\n },\n // navigation\n {\n command: LEGEND_PURE_IDE_TERMINAL_COMMAND.WELCOME,\n description: 'Open the welcome file',\n usage: 'welcome',\n aliases: ['start'],\n handler: async () => {\n await flowResult(ideStore.loadFile(WELCOME_FILE_PATH)).catch(ideStore.applicationStore.alertUnhandledError);\n },\n },\n {\n command: LEGEND_PURE_IDE_TERMINAL_COMMAND.OPEN_FILE,\n description: 'Open a file',\n usage: 'open /some/file/path',\n aliases: ['edit', 'code', 'vi'],\n handler: async (args) => {\n const path = args[0];\n if (!path?.match(PACKAGE_PATH_PATTERN)) {\n ideStore.applicationStore.terminalService.terminal.fail(`command requires a valid file path`);\n return;\n }\n await flowResult(ideStore.loadFile(path)).catch(ideStore.applicationStore.alertUnhandledError);\n },\n },\n {\n command: LEGEND_PURE_IDE_TERMINAL_COMMAND.OPEN_DIRECTORY,\n description: 'Open a directory or a package',\n usage: 'cd /some/directory/path | cd some::package::path',\n handler: async (args) => {\n const path = args[0];\n if (!path ||\n !(path.match(FILE_PATH_PATTERN) ?? path.match(PACKAGE_PATH_PATTERN))) {\n ideStore.applicationStore.terminalService.terminal.fail(`command requires a valid directory or concept path`);\n return;\n }\n try {\n // NOTE: favor concept/package path over directory path\n if (path.match(PACKAGE_PATH_PATTERN)) {\n await flowResult(ideStore.conceptTreeState.revealConcept(path, {\n forceOpenExplorerPanel: true,\n packageOnly: true,\n }));\n }\n else {\n await flowResult(ideStore.directoryTreeState.revealPath(path, {\n forceOpenExplorerPanel: true,\n directoryOnly: true,\n }));\n }\n }\n catch (error) {\n assertErrorThrown(error);\n ideStore.applicationStore.terminalService.terminal.fail(error.message);\n }\n },\n },\n {\n command: LEGEND_PURE_IDE_TERMINAL_COMMAND.LIST_DIRECTORY,\n description: 'List children of a directory or package',\n usage: 'cd /some/directory/path | cd some::package::path | cd ::',\n handler: async (args) => {\n const path = args[0];\n if (!path ||\n !(path.match(FILE_PATH_PATTERN) ??\n path.match(PACKAGE_PATH_PATTERN) ??\n [HOME_DIRECTORY_PATH, ROOT_PACKAGE_PATH].includes(path))) {\n ideStore.applicationStore.terminalService.terminal.fail(`command requires a valid directory or package path`);\n return;\n }\n try {\n // NOTE: favor concept/package path over directory path\n if (path.match(PACKAGE_PATH_PATTERN) ||\n path === ROOT_PACKAGE_PATH) {\n ideStore.applicationStore.terminalService.terminal.output((await ideStore.client.getConceptChildren(path))\n .map((child) => deserialize(ConceptNode, child))\n .map((child) => child.li_attr instanceof PackageConceptAttribute\n ? `${DISPLAY_ANSI_ESCAPE.BRIGHT_CYAN}${child.text}${DISPLAY_ANSI_ESCAPE.RESET}`\n : child.text)\n .join('\\n'));\n }\n else {\n ideStore.applicationStore.terminalService.terminal.output((await ideStore.client.getDirectoryChildren(path))\n .map((child) => deserialize(DirectoryNode, child))\n .map((child) => child.isFolderNode\n ? `${DISPLAY_ANSI_ESCAPE.BRIGHT_CYAN}${child.text}${DISPLAY_ANSI_ESCAPE.RESET}`\n : child.text)\n .join('\\n'));\n }\n }\n catch (error) {\n assertErrorThrown(error);\n ideStore.applicationStore.terminalService.terminal.fail(error.message);\n }\n },\n },\n // utility\n {\n command: LEGEND_PURE_IDE_TERMINAL_COMMAND.CLEAR,\n description: 'Clear the terminal',\n usage: 'clear',\n handler: async (args) => {\n ideStore.applicationStore.terminalService.terminal.clear();\n },\n },\n {\n command: LEGEND_PURE_IDE_TERMINAL_COMMAND.ECHO,\n description: 'Print text',\n usage: `echo 'some string'`,\n handler: async (args, command, text) => {\n const content = text\n .substring(text.indexOf(command) + command.length)\n .trim();\n ideStore.applicationStore.terminalService.terminal.output(content.replaceAll(/\\\\u001b/g, '\\u001b'));\n },\n },\n {\n command: LEGEND_PURE_IDE_TERMINAL_COMMAND.ANSI,\n description: 'Show common ANSI escape sequences used for styling',\n usage: 'ansi',\n handler: async (args) => {\n ideStore.applicationStore.terminalService.terminal.showCommonANSIEscapeSequences();\n return Promise.resolve();\n },\n },\n {\n command: LEGEND_PURE_IDE_TERMINAL_COMMAND.DEBUG,\n description: 'Introspect debug state. When passing no parameters, will display summary of available variables',\n usage: 'debug [summary | abort | <expression to evaluate> ]',\n aliases: [],\n handler: async (args) => {\n flowResult(ideStore.runDebugger({ args })).catch(ideStore.applicationStore.alertUnhandledError);\n },\n },\n {\n command: LEGEND_PURE_IDE_TERMINAL_COMMAND.HELP,\n description: 'Show help',\n usage: 'help',\n handler: async (args) => {\n ideStore.applicationStore.terminalService.terminal.showHelp();\n return Promise.resolve();\n },\n },\n ],\n });\n};\n//# sourceMappingURL=LegendPureIDETerminal.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport class CodeFixSuggestion {\n ideStore;\n constructor(ideStore) {\n this.ideStore = ideStore;\n }\n}\nexport class UnmatchedFunctionCodeFixSuggestion extends CodeFixSuggestion {\n result;\n constructor(ideStore, result) {\n super(ideStore);\n this.result = result;\n }\n}\nexport class UnknownSymbolCodeFixSuggestion extends CodeFixSuggestion {\n result;\n constructor(ideStore, result) {\n super(ideStore);\n this.result = result;\n }\n}\n//# sourceMappingURL=CodeFixSuggestion.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { computed, makeObservable, observable } from 'mobx';\nimport { SearchResultCoordinate, SearchResultEntry, } from '../server/models/SearchEntry.js';\nimport { deleteEntry, guaranteeNonNullable } from '@finos/legend-shared';\nexport class ReferenceUsageResult {\n ideStore;\n usageConcept;\n searchEntries = [];\n constructor(ideStore, usageConcept, references, searchResultCoordinates) {\n makeObservable(this, {\n searchEntries: observable,\n numberOfFiles: computed,\n numberOfResults: computed,\n });\n this.ideStore = ideStore;\n this.usageConcept = usageConcept;\n const fileMap = new Map();\n references.forEach((ref, idx) => {\n let entry;\n if (fileMap.has(ref.source)) {\n entry = guaranteeNonNullable(fileMap.get(ref.source));\n }\n else {\n entry = new SearchResultEntry();\n entry.sourceId = ref.source;\n fileMap.set(ref.source, entry);\n }\n const coordinates = new SearchResultCoordinate(ref.source, ref.startLine, ref.startColumn, ref.endLine, ref.endColumn);\n coordinates.preview = searchResultCoordinates.find((result) => result.sourceId === ref.source &&\n result.startLine === ref.startLine &&\n result.startColumn === ref.startColumn &&\n result.endLine === ref.endLine &&\n result.endColumn === ref.endColumn)?.preview;\n entry.coordinates.push(coordinates);\n });\n this.searchEntries = Array.from(fileMap.keys())\n .sort((f1, f2) => f1.localeCompare(f2))\n .map((file) => {\n const entry = guaranteeNonNullable(fileMap.get(file));\n // NOTE: sorting the list of coordinates (line has higher precendence than column)\n entry.setCoordinates(entry.coordinates\n .sort((c1, c2) => c1.startColumn - c2.startColumn)\n .sort((c1, c2) => c1.startLine - c2.startLine));\n return entry;\n });\n }\n dismissSearchEntry(value) {\n deleteEntry(this.searchEntries, value);\n if (!this.searchEntries.length) {\n this.ideStore.setReferenceUsageResult(undefined);\n }\n }\n get numberOfFiles() {\n return this.searchEntries.length;\n }\n get numberOfResults() {\n return this.searchEntries.flatMap((entry) => entry.coordinates).length;\n }\n}\n//# sourceMappingURL=ReferenceUsageResult.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { ActionState, assertErrorThrown, deleteEntry, } from '@finos/legend-shared';\nimport { action, computed, flow, makeObservable, observable } from 'mobx';\nimport { getSearchResultEntry, } from '../server/models/SearchEntry.js';\nexport class TextSearchResult {\n searchState;\n searchEntries = [];\n constructor(searchState, searchEntries) {\n makeObservable(this, {\n searchEntries: observable,\n numberOfFiles: computed,\n numberOfResults: computed,\n });\n this.searchState = searchState;\n this.searchEntries = searchEntries;\n }\n dismissSearchEntry(value) {\n deleteEntry(this.searchEntries, value);\n if (!this.searchEntries.length) {\n this.searchState.setResult(undefined);\n }\n }\n get numberOfFiles() {\n return this.searchEntries.length;\n }\n get numberOfResults() {\n return this.searchEntries.flatMap((entry) => entry.coordinates).length;\n }\n}\nexport class TextSearchState {\n ideStore;\n loadState = ActionState.create();\n searchInput;\n text = '';\n isCaseSensitive = false;\n isRegExp = false;\n result;\n constructor(ideStore) {\n makeObservable(this, {\n text: observable,\n isCaseSensitive: observable,\n isRegExp: observable,\n result: observable,\n setText: action,\n setCaseSensitive: action,\n setRegExp: action,\n setResult: action,\n search: flow,\n });\n this.ideStore = ideStore;\n }\n setSearchInput(el) {\n this.searchInput = el;\n }\n focus() {\n this.searchInput?.focus();\n }\n select() {\n this.searchInput?.select();\n }\n *search() {\n if (this.loadState.isInProgress || this.text.length <= 3) {\n return;\n }\n this.loadState.inProgress();\n try {\n const results = (yield this.ideStore.client.searchText(this.text, this.isCaseSensitive, this.isRegExp)).map((result) => getSearchResultEntry(result));\n this.setResult(new TextSearchResult(this, results));\n this.loadState.pass();\n }\n catch (error) {\n assertErrorThrown(error);\n this.ideStore.applicationStore.notificationService.notifyError(error);\n this.loadState.fail();\n }\n }\n setText(value) {\n this.text = value;\n }\n setCaseSensitive(value) {\n this.isCaseSensitive = value;\n }\n setRegExp(value) {\n this.isRegExp = value;\n }\n setResult(val) {\n this.result = val;\n }\n}\n//# sourceMappingURL=TextSearchState.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { action, flow, flowResult, makeObservable, observable, runInAction, } from 'mobx';\nimport { ACTIVITY_MODE, PANEL_MODE, ROOT_PACKAGE_PATH, WELCOME_FILE_PATH, } from './PureIDEConfig.js';\nimport { FileEditorState } from './FileEditorState.js';\nimport { serialize, deserialize } from 'serializr';\nimport { FileCoordinate, FileErrorCoordinate, File, trimPathLeadingSlash, } from '../server/models/File.js';\nimport { DirectoryTreeState } from './DirectoryTreeState.js';\nimport { ConceptTreeState } from './ConceptTreeState.js';\nimport { InitializationFailureWithSourceResult, InitializationFailureResult, deserializeInitializationnResult, } from '../server/models/Initialization.js';\nimport { TestExecutionResult, UnmatchedFunctionResult, UnknownSymbolResult, GetConceptResult, deserializeExecutionResult, ExecutionFailureResult, ExecutionSuccessResult, } from '../server/models/Execution.js';\nimport { SearchResultCoordinate } from '../server/models/SearchEntry.js';\nimport { TestRunnerState } from './TestRunnerState.js';\nimport { getConceptInfoLabel, Usage, FIND_USAGE_FUNCTION_PATH, } from '../server/models/Usage.js';\nimport { CommandFailureResult, deserializeCommandResult, } from '../server/models/Command.js';\nimport { ActionAlertActionType, ActionAlertType, } from '@finos/legend-application';\nimport { isNonNullable, NetworkClient, ActionState, assertErrorThrown, guaranteeNonNullable, uniq, filterByType, } from '@finos/legend-shared';\nimport { PureServerClient as PureServerClient } from '../server/PureServerClient.js';\nimport { PanelDisplayState } from '@finos/legend-art';\nimport { DiagramEditorState } from './DiagramEditorState.js';\nimport { DiagramInfo, serializeDiagram } from '../server/models/DiagramInfo.js';\nimport { FileSearchCommandState } from './FileSearchCommandState.js';\nimport { PureIDETabManagerState } from './PureIDETabManagerState.js';\nimport { LEGEND_PURE_IDE_COMMAND_KEY, LEGEND_PURE_IDE_TERMINAL_COMMAND, } from '../__lib__/LegendPureIDECommand.js';\nimport { ExecutionError } from '../server/models/ExecutionError.js';\nimport { ELEMENT_PATH_DELIMITER } from '@finos/legend-graph';\nimport { ConceptType } from '../server/models/ConceptTree.js';\nimport { setupTerminal } from './LegendPureIDETerminal.js';\nimport { UnknownSymbolCodeFixSuggestion, UnmatchedFunctionCodeFixSuggestion, } from './CodeFixSuggestion.js';\nimport { ReferenceUsageResult } from './ReferenceUsageResult.js';\nimport { TextSearchState } from './TextSearchState.js';\nimport { PCTAdapter } from '../server/models/Test.js';\nexport class PureIDEStore {\n applicationStore;\n initState = ActionState.create();\n directoryTreeState;\n conceptTreeState;\n client;\n // Layout\n activePanelMode = PANEL_MODE.TERMINAL;\n panelGroupDisplayState = new PanelDisplayState({\n initial: 0,\n default: 300,\n snap: 100,\n });\n activeActivity = ACTIVITY_MODE.CONCEPT_EXPLORER;\n sideBarDisplayState = new PanelDisplayState({\n initial: 300,\n default: 300,\n snap: 150,\n });\n tabManagerState = new PureIDETabManagerState(this);\n executionState = ActionState.create();\n navigationStack = []; // TODO?: we might want to limit the number of items in this stack\n // File Search Command\n fileSearchCommandLoadState = ActionState.create();\n fileSearchCommandState = new FileSearchCommandState();\n openFileSearchCommand = false;\n fileSearchCommandResults = [];\n // Code-fix Suggestions Panel\n codeFixSuggestion;\n // Reference Usage Panel\n referenceUsageLoadState = ActionState.create();\n referenceUsageResult;\n // Text Search Panel\n textSearchState;\n // Test Runner Panel\n testRunState = ActionState.create();\n testRunnerState;\n PCTAdapters = [];\n selectedPCTAdapter;\n PCTRunPath;\n constructor(applicationStore) {\n makeObservable(this, {\n activePanelMode: observable,\n activeActivity: observable,\n navigationStack: observable,\n openFileSearchCommand: observable,\n fileSearchCommandResults: observable,\n fileSearchCommandState: observable,\n codeFixSuggestion: observable,\n referenceUsageResult: observable,\n testRunnerState: observable,\n PCTAdapters: observable.struct,\n selectedPCTAdapter: observable,\n setSelectedPCTAdapter: action,\n PCTRunPath: observable,\n setPCTRunPath: action,\n setCodeFixSuggestion: action,\n setReferenceUsageResult: action,\n setOpenFileSearchCommand: action,\n setActivePanelMode: action,\n setActiveActivity: action,\n setTestRunnerState: action,\n pullInitializationActivity: action,\n pullExecutionStatus: action,\n initialize: flow,\n checkIfSessionWakingUp: flow,\n loadDiagram: flow,\n loadFile: flow,\n execute: flow,\n executeGo: flow,\n runDebugger: flow,\n manageExecuteGoResult: flow,\n executeTests: flow,\n executeFullTestSuite: flow,\n executeNavigation: flow,\n navigateBack: flow,\n fullReCompile: flow,\n command: flow,\n findUsagesFromCoordinate: flow,\n findUsages: flow,\n renameConcept: flow,\n movePackageableElements: flow,\n updateFileUsingSuggestionCandidate: flow,\n updateFile: flow,\n searchFile: flow,\n createNewDirectory: flow,\n createNewFile: flow,\n renameFile: flow,\n deleteDirectoryOrFile: flow,\n });\n this.applicationStore = applicationStore;\n this.textSearchState = new TextSearchState(this);\n this.directoryTreeState = new DirectoryTreeState(this);\n this.conceptTreeState = new ConceptTreeState(this);\n this.client = new PureServerClient(new NetworkClient({\n baseUrl: this.applicationStore.config.useDynamicPureServer\n ? window.location.origin\n : this.applicationStore.config.pureUrl,\n }));\n setupTerminal(this);\n }\n setOpenFileSearchCommand(val) {\n this.openFileSearchCommand = val;\n }\n setSelectedPCTAdapter(val) {\n this.selectedPCTAdapter = val;\n }\n setPCTRunPath(val) {\n this.PCTRunPath = val;\n }\n setActivePanelMode(val) {\n this.activePanelMode = val;\n }\n setCodeFixSuggestion(val) {\n this.codeFixSuggestion = val;\n }\n setReferenceUsageResult(val) {\n this.referenceUsageResult = val;\n }\n setTestRunnerState(val) {\n this.testRunnerState = val;\n }\n cleanUp() {\n // dismiss all the alerts as these are parts of application, if we don't do this, we might\n // end up blocking other parts of the app\n // e.g. trying going to an unknown workspace, we will be redirected to the home page\n // but the blocking alert for not-found workspace will still block the app\n this.applicationStore.alertService.setBlockingAlert(undefined);\n this.applicationStore.alertService.setActionAlertInfo(undefined);\n // dispose the terminal\n this.applicationStore.terminalService.terminal.dispose();\n }\n /**\n * This is the entry of the app logic where initialization of editor states happens\n * Here, we ensure the order of calls after checking existence of current project and workspace\n * If either of them does not exist, we cannot proceed.\n */\n *initialize(fullInit, func, mode, fastCompile) {\n if (!this.initState.isInInitialState) {\n this.applicationStore.notificationService.notifyIllegalState('Editor store is re-initialized');\n return;\n }\n // set PURE IDE mode\n this.client.mode = mode;\n this.client.compilerMode = fastCompile;\n // initialize editor\n this.initState.inProgress();\n try {\n this.applicationStore.alertService.setBlockingAlert({\n message: 'Loading Pure IDE...',\n prompt: 'Please be patient as we are building the initial application state',\n showLoading: true,\n });\n const initializationPromise = this.client\n .initialize(!fullInit)\n .catch((error) => {\n assertErrorThrown(error);\n this.applicationStore.notificationService.notifyError(error);\n this.initState.fail();\n this.applicationStore.alertService.setBlockingAlert({\n message: `Failed to initialize IDE`,\n prompt: `Before debugging, make sure the server is running then restart the application`,\n });\n });\n yield this.pullInitializationActivity();\n this.applicationStore.alertService.setBlockingAlert(undefined);\n const openWelcomeFilePromise = flowResult(this.loadFile(WELCOME_FILE_PATH)).then(() => {\n const welcomeFileTab = this.tabManagerState.tabs.find((tab) => tab instanceof FileEditorState &&\n tab.filePath === WELCOME_FILE_PATH);\n if (welcomeFileTab) {\n this.tabManagerState.pinTab(welcomeFileTab);\n }\n });\n const directoryTreeInitPromise = this.directoryTreeState.initialize();\n const conceptTreeInitPromise = this.conceptTreeState.initialize();\n const getPCTAdaptersPromise = this.client\n .getPCTAdapters()\n .then((result) => {\n runInAction(() => {\n this.PCTAdapters = result.map((adapter) => new PCTAdapter(adapter.first, adapter.second));\n this.selectedPCTAdapter =\n this.PCTAdapters.find((adapter) => adapter.name === 'In-Memory') ?? (this.PCTAdapters.length ? this.PCTAdapters[0] : undefined);\n });\n });\n const result = deserializeInitializationnResult((yield initializationPromise));\n if (result.text) {\n this.applicationStore.terminalService.terminal.output(result.text, {\n systemCommand: 'initialize application',\n });\n }\n this.setActivePanelMode(PANEL_MODE.TERMINAL);\n this.panelGroupDisplayState.open();\n if (result instanceof InitializationFailureResult) {\n if (result.sessionError) {\n this.applicationStore.alertService.setBlockingAlert({\n message: 'Session corrupted',\n prompt: result.sessionError,\n });\n }\n else if (result instanceof InitializationFailureWithSourceResult) {\n yield flowResult(this.loadFile(result.source, new FileErrorCoordinate(result.source, result.line, result.column, new ExecutionError((result.text ?? '').split('\\n').filter(Boolean)[0]))));\n }\n }\n else {\n if (func) {\n yield func();\n }\n yield Promise.all([\n openWelcomeFilePromise,\n directoryTreeInitPromise,\n conceptTreeInitPromise,\n getPCTAdaptersPromise,\n ]);\n }\n this.initState.pass();\n }\n catch (error) {\n assertErrorThrown(error);\n this.applicationStore.notificationService.notifyError(error);\n this.initState.fail();\n this.applicationStore.alertService.setActionAlertInfo({\n message: `Failed to initialize IDE`,\n prompt: `This can either due to an internal server error, which you would need to manually resolve; or a compilation, which you can proceed to debug`,\n type: ActionAlertType.CAUTION,\n actions: [\n {\n label: 'Compile to debug',\n type: ActionAlertActionType.PROCEED_WITH_CAUTION,\n default: true,\n handler: () => {\n flowResult(this.executeGo()).catch(this.applicationStore.alertUnhandledError);\n },\n },\n ],\n });\n }\n finally {\n // initialize the terminal\n this.applicationStore.terminalService.terminal.clear();\n }\n }\n *checkIfSessionWakingUp(message) {\n this.applicationStore.alertService.setBlockingAlert({\n message: message ?? 'Checking IDE session...',\n showLoading: true,\n });\n yield this.pullInitializationActivity((activity) => {\n if (activity.text) {\n this.applicationStore.alertService.setBlockingAlert({\n message: message ?? 'Checking IDE session...',\n prompt: activity.text,\n showLoading: true,\n });\n }\n });\n this.applicationStore.alertService.setBlockingAlert(undefined);\n }\n async pullInitializationActivity(fn) {\n const result = (await this.client.getInitializationActivity());\n if (result.initializing) {\n return new Promise((resolve, reject) => setTimeout(() => {\n try {\n resolve(this.pullInitializationActivity());\n }\n catch (error) {\n reject(error);\n }\n }, 1000));\n }\n return Promise.resolve();\n }\n registerCommands() {\n this.applicationStore.commandService.registerCommand({\n key: LEGEND_PURE_IDE_COMMAND_KEY.SEARCH_FILE,\n action: () => this.setOpenFileSearchCommand(true),\n });\n this.applicationStore.commandService.registerCommand({\n key: LEGEND_PURE_IDE_COMMAND_KEY.SEARCH_TEXT,\n action: () => {\n this.setActivePanelMode(PANEL_MODE.SEARCH);\n this.panelGroupDisplayState.open();\n this.textSearchState.focus();\n this.textSearchState.select();\n },\n });\n this.applicationStore.commandService.registerCommand({\n key: LEGEND_PURE_IDE_COMMAND_KEY.GO_TO_FILE,\n action: () => {\n if (this.tabManagerState.currentTab instanceof FileEditorState) {\n this.directoryTreeState.revealPath(this.tabManagerState.currentTab.filePath, {\n forceOpenExplorerPanel: true,\n });\n }\n },\n });\n this.applicationStore.commandService.registerCommand({\n key: LEGEND_PURE_IDE_COMMAND_KEY.TOGGLE_TERMINAL_PANEL,\n action: () => {\n // toggle the panel and activate terminal tab if needs be\n // if the terminal is already open, and not yet focused, focus on it\n // else, close it\n if (this.panelGroupDisplayState.isOpen) {\n if (this.activePanelMode !== PANEL_MODE.TERMINAL) {\n this.setActivePanelMode(PANEL_MODE.TERMINAL);\n this.applicationStore.terminalService.terminal.focus();\n }\n else {\n if (!this.applicationStore.terminalService.terminal.isFocused()) {\n this.applicationStore.terminalService.terminal.focus();\n }\n else {\n this.panelGroupDisplayState.close();\n }\n }\n }\n else {\n this.setActivePanelMode(PANEL_MODE.TERMINAL);\n this.panelGroupDisplayState.open();\n }\n },\n });\n this.applicationStore.commandService.registerCommand({\n key: LEGEND_PURE_IDE_COMMAND_KEY.EXECUTE,\n action: () => {\n flowResult(this.executeGo()).catch(this.applicationStore.alertUnhandledError);\n },\n });\n this.applicationStore.commandService.registerCommand({\n key: LEGEND_PURE_IDE_COMMAND_KEY.FULL_RECOMPILE,\n action: () => {\n flowResult(this.fullReCompile(false)).catch(this.applicationStore.alertUnhandledError);\n },\n });\n this.applicationStore.commandService.registerCommand({\n key: LEGEND_PURE_IDE_COMMAND_KEY.FULL_RECOMPILE_WITH_FULL_INIT,\n action: () => {\n flowResult(this.fullReCompile(true)).catch(this.applicationStore.alertUnhandledError);\n },\n });\n this.applicationStore.commandService.registerCommand({\n key: LEGEND_PURE_IDE_COMMAND_KEY.RUN_ALL_TESTS,\n action: () => {\n flowResult(this.executeFullTestSuite(false)).catch(this.applicationStore.alertUnhandledError);\n },\n });\n this.applicationStore.commandService.registerCommand({\n key: LEGEND_PURE_IDE_COMMAND_KEY.RUN_RELAVANT_TESTS,\n action: () => {\n flowResult(this.executeFullTestSuite(true)).catch(this.applicationStore.alertUnhandledError);\n },\n });\n }\n deregisterCommands() {\n [\n LEGEND_PURE_IDE_COMMAND_KEY.SEARCH_FILE,\n LEGEND_PURE_IDE_COMMAND_KEY.SEARCH_TEXT,\n LEGEND_PURE_IDE_COMMAND_KEY.GO_TO_FILE,\n LEGEND_PURE_IDE_COMMAND_KEY.TOGGLE_TERMINAL_PANEL,\n LEGEND_PURE_IDE_COMMAND_KEY.EXECUTE,\n LEGEND_PURE_IDE_COMMAND_KEY.FULL_RECOMPILE,\n LEGEND_PURE_IDE_COMMAND_KEY.FULL_RECOMPILE_WITH_FULL_INIT,\n LEGEND_PURE_IDE_COMMAND_KEY.RUN_ALL_TESTS,\n LEGEND_PURE_IDE_COMMAND_KEY.RUN_RELAVANT_TESTS,\n ].forEach((key) => this.applicationStore.commandService.deregisterCommand(key));\n }\n setActiveActivity(activity, options) {\n if (!this.sideBarDisplayState.isOpen) {\n this.sideBarDisplayState.open();\n }\n else if (activity === this.activeActivity &&\n !options?.keepShowingIfMatchedCurrent) {\n this.sideBarDisplayState.close();\n }\n this.activeActivity = activity;\n }\n *loadDiagram(filePath, diagramPath, line, column) {\n let editorState = this.tabManagerState.tabs.find((tab) => tab instanceof DiagramEditorState && tab.diagramPath === diagramPath);\n if (!editorState) {\n yield flowResult(this.checkIfSessionWakingUp());\n editorState = new DiagramEditorState(this, deserialize(DiagramInfo, yield this.client.getDiagramInfo(diagramPath)), diagramPath, filePath, line, column);\n }\n this.tabManagerState.openTab(editorState);\n }\n *loadFile(filePath, coordinate) {\n try {\n let editorState = this.tabManagerState.tabs.find((tab) => tab instanceof FileEditorState && tab.filePath === filePath);\n if (!editorState) {\n yield flowResult(this.checkIfSessionWakingUp());\n editorState = new FileEditorState(this, deserialize(File, yield this.client.getFile(filePath)), filePath);\n }\n this.tabManagerState.openTab(editorState);\n if (coordinate) {\n editorState.textEditorState.setForcedCursorPosition({\n lineNumber: coordinate.line,\n column: coordinate.column,\n });\n if (coordinate instanceof FileErrorCoordinate) {\n editorState.showError(coordinate);\n }\n }\n }\n catch (error) {\n assertErrorThrown(error);\n this.applicationStore.terminalService.terminal.fail(error.message, {\n systemCommand: `load file ${filePath}`,\n });\n }\n }\n async reloadFile(filePath) {\n const tabsToClose = [];\n await Promise.all(this.tabManagerState.tabs.map(async (tab) => {\n if (tab instanceof FileEditorState && tab.filePath === filePath) {\n tab.setFile(deserialize(File, await this.client.getFile(filePath)));\n }\n else if (tab instanceof DiagramEditorState &&\n tab.filePath === filePath) {\n try {\n tab.rebuild(deserialize(DiagramInfo, await this.client.getDiagramInfo(tab.diagramPath)));\n }\n catch {\n // something happened, most likely the diagram has been removed or renamed,\n // we should close the tab then\n tabsToClose.push(tab);\n }\n }\n }));\n tabsToClose.forEach((tab) => this.tabManagerState.closeTab(tab));\n }\n *execute(url, extraParams, checkExecutionStatus, manageResult, command, options) {\n if (!this.initState.hasCompleted) {\n this.applicationStore.notificationService.notifyWarning(`Can't execute while initializing application`);\n return;\n }\n if (this.executionState.isInProgress) {\n this.applicationStore.notificationService.notifyWarning('Another execution is already in progress!');\n return;\n }\n // reset suggestions before execution\n this.setCodeFixSuggestion(undefined);\n this.executionState.inProgress();\n const potentiallyAffectedFiles = this.tabManagerState.tabs\n .filter(filterByType(FileEditorState))\n .map((tab) => tab.filePath);\n try {\n const openedFiles = this.tabManagerState.tabs\n .map((tab) => {\n if (tab instanceof FileEditorState) {\n return {\n path: tab.filePath,\n code: tab.file.content,\n };\n }\n else if (tab instanceof DiagramEditorState) {\n return {\n diagram: tab.diagramPath,\n code: serializeDiagram(tab.diagram),\n };\n }\n return undefined;\n })\n .filter(isNonNullable);\n const executionPromise = this.client.execute(openedFiles, url, extraParams);\n // NOTE: when we execute, it could take a while, and by default, we run a status check which potentially\n // blocks the screen, as such, to be less disruptive to the UX and to avoid creating the illusion of slowness\n // we will have a wait time, if execution is below this threshold, we will not conduct the check.\n // The current threshold we choose is 1000ms, i.e. the execution should be sub-second\n const WAIT_TIME_TO_TRIGGER_STATUS_CHECK = 1000;\n let executionPromiseFinished = false;\n let executionPromiseResult;\n yield Promise.all([\n executionPromise.then((value) => {\n executionPromiseFinished = true;\n executionPromiseResult = value;\n }),\n new Promise((resolve, reject) => setTimeout(() => {\n if (!executionPromiseFinished && checkExecutionStatus) {\n this.applicationStore.alertService.setBlockingAlert({\n message: 'Executing...',\n prompt: 'Please do not refresh the application',\n showLoading: true,\n });\n resolve(this.pullExecutionStatus().finally(() => {\n this.applicationStore.alertService.setBlockingAlert(undefined);\n }));\n }\n resolve();\n }, WAIT_TIME_TO_TRIGGER_STATUS_CHECK, true)),\n ]);\n const result = deserializeExecutionResult(guaranteeNonNullable(executionPromiseResult));\n this.applicationStore.alertService.setBlockingAlert(undefined);\n if (result instanceof ExecutionFailureResult) {\n this.applicationStore.notificationService.notifyError(`Execution failed${result.text ? `: ${result.text}` : ''}`);\n this.applicationStore.terminalService.terminal.fail(result.text, {\n systemCommand: command ?? 'execute',\n });\n if (result.sessionError) {\n this.applicationStore.alertService.setBlockingAlert({\n message: 'Session corrupted',\n prompt: result.sessionError,\n });\n }\n else {\n yield flowResult(manageResult(result, potentiallyAffectedFiles));\n }\n }\n else {\n if (!options?.silentTerminalOnSuccess) {\n this.applicationStore.terminalService.terminal.output(result.text ?? '', {\n clear: options?.clearTerminal,\n systemCommand: command ?? 'execute',\n });\n }\n if (result instanceof ExecutionSuccessResult) {\n this.applicationStore.notificationService.notifySuccess('Execution succeeded!');\n if (result.reinit) {\n this.applicationStore.alertService.setBlockingAlert({\n message: 'Reinitializing...',\n prompt: 'Please do not refresh the application',\n showLoading: true,\n });\n this.initState.reset();\n yield flowResult(this.initialize(false, () => flowResult(this.execute(url, extraParams, checkExecutionStatus, manageResult, command)), this.client.mode, this.client.compilerMode));\n }\n else {\n yield flowResult(manageResult(result, potentiallyAffectedFiles));\n }\n }\n else {\n yield flowResult(manageResult(result, potentiallyAffectedFiles));\n }\n }\n }\n catch (error) {\n assertErrorThrown(error);\n this.applicationStore.notificationService.notifyError(error);\n this.applicationStore.terminalService.terminal.fail(error.message, {\n systemCommand: command ?? 'execute',\n });\n }\n finally {\n this.applicationStore.alertService.setBlockingAlert(undefined);\n this.executionState.reset();\n }\n }\n // NOTE: currently backend do not suppor this operation, so we temporarily disable it, but\n // in theory, this will pull up a blocking modal to show the execution status to user\n async pullExecutionStatus() {\n const result = (await this.client.getExecutionActivity());\n this.applicationStore.alertService.setBlockingAlert({\n message: 'Executing...',\n prompt: result.text\n ? result.text\n : 'Please do not refresh the application',\n showLoading: true,\n });\n if (result.executing) {\n return new Promise((resolve, reject) => setTimeout(() => {\n try {\n resolve(this.pullExecutionStatus());\n }\n catch (error) {\n reject(error);\n }\n // NOTE: tune this slightly lower for better experience, also for sub-second execution, setting a high number\n // might create the illusion that the system is slow\n }, 500));\n }\n this.applicationStore.alertService.setBlockingAlert({\n message: 'Executing...',\n prompt: 'Please do not refresh the application',\n showLoading: true,\n });\n return Promise.resolve();\n }\n *executeGo() {\n yield flowResult(this.execute('executeGo', {}, true, (result, potentiallyAffectedFiles) => flowResult(this.manageExecuteGoResult(result, potentiallyAffectedFiles)), LEGEND_PURE_IDE_TERMINAL_COMMAND.GO, {\n clearTerminal: true,\n }));\n }\n *runDebugger(command) {\n yield flowResult(this.client\n .execute([], 'debugging', command)\n .then((r) => {\n const execResult = deserializeExecutionResult(guaranteeNonNullable(r));\n if (execResult.text) {\n this.applicationStore.terminalService.terminal.output(execResult.text);\n }\n })\n .catch((er) => {\n this.applicationStore.terminalService.terminal.fail(er.message);\n }));\n }\n *manageExecuteGoResult(result, potentiallyAffectedFiles) {\n const refreshTreesPromise = this.refreshTrees();\n // reset errors on all tabs before potentially show the latest error\n this.tabManagerState.tabs\n .filter(filterByType(FileEditorState))\n .filter((tab) => potentiallyAffectedFiles.includes(tab.filePath))\n .forEach((tab) => tab.clearError());\n if (result instanceof ExecutionFailureResult) {\n if (result.source) {\n yield flowResult(this.loadFile(result.source, new FileErrorCoordinate(result.source, result.line, result.column, new ExecutionError(result.text.split('\\n').filter(Boolean)[0]))));\n }\n if (result instanceof UnmatchedFunctionResult) {\n this.setCodeFixSuggestion(new UnmatchedFunctionCodeFixSuggestion(this, result));\n this.setActivePanelMode(PANEL_MODE.CODE_FIX_SUGGESTION);\n this.panelGroupDisplayState.open();\n }\n else if (result instanceof UnknownSymbolResult) {\n this.setCodeFixSuggestion(new UnknownSymbolCodeFixSuggestion(this, result));\n this.setActivePanelMode(PANEL_MODE.CODE_FIX_SUGGESTION);\n this.panelGroupDisplayState.open();\n }\n this.resetChangeDetection(potentiallyAffectedFiles);\n }\n else if (result instanceof ExecutionSuccessResult) {\n if (result.modifiedFiles.length) {\n for (const path of result.modifiedFiles) {\n yield this.reloadFile(path);\n }\n }\n this.resetChangeDetection(potentiallyAffectedFiles.concat(result.modifiedFiles));\n // NOTE: this is for the case where compilation failed during IDE initialization\n // this is when we fix the compilation and execute for the first time, which in turn\n // will properly `initialize` the application\n // therefore, we will need to re-initialize the concept tree which was not initialized\n // before\n if (this.initState.hasFailed || !this.conceptTreeState.treeData) {\n yield flowResult(this.conceptTreeState.initialize());\n this.initState.pass();\n }\n }\n yield refreshTreesPromise;\n }\n *executeTests(path, relevantTestsOnly, pctAdapter) {\n if (relevantTestsOnly) {\n this.applicationStore.notificationService.notifyUnsupportedFeature(`Run relevant tests! (reason: VCS required)`);\n return;\n }\n if (this.testRunState.isInProgress) {\n this.applicationStore.notificationService.notifyWarning('Test runner is working. Please try again later');\n return;\n }\n this.testRunState.inProgress();\n yield flowResult(this.execute('executeTests', {\n path,\n pctAdapter,\n relevantTestsOnly,\n }, false, async (result, potentiallyAffectedFiles) => {\n const refreshTreesPromise = this.refreshTrees();\n if (result instanceof ExecutionFailureResult) {\n if (result.source) {\n await flowResult(this.loadFile(result.source, new FileErrorCoordinate(result.source, result.line, result.column, new ExecutionError(result.text.split('\\n').filter(Boolean)[0]))));\n }\n this.setActivePanelMode(PANEL_MODE.TERMINAL);\n this.panelGroupDisplayState.open();\n this.testRunState.fail();\n }\n else if (result instanceof TestExecutionResult) {\n this.setActivePanelMode(PANEL_MODE.TEST_RUNNER);\n this.panelGroupDisplayState.open();\n const testRunnerState = new TestRunnerState(this, result);\n this.setTestRunnerState(testRunnerState);\n await flowResult(testRunnerState.buildTestTreeData());\n if (testRunnerState.testExecutionResult.count <= 100) {\n testRunnerState.expandTree();\n }\n // make sure we refresh tree so it is shown in the explorer panel\n // NOTE: we could potentially expand the tree here, but this operation is expensive since we have all nodes observable\n // so it will lag the UI if we have too many nodes open\n testRunnerState.refreshTree();\n await flowResult(testRunnerState.pollTestRunnerResult());\n this.testRunState.pass();\n }\n this.resetChangeDetection(potentiallyAffectedFiles);\n // do nothing?\n await refreshTreesPromise;\n }, `${LEGEND_PURE_IDE_TERMINAL_COMMAND.TEST} ${path}`));\n }\n *executeFullTestSuite(relevantTestsOnly) {\n yield flowResult(this.executeTests(ROOT_PACKAGE_PATH, relevantTestsOnly));\n }\n *executeNavigation(coordinate) {\n this.navigationStack.push(coordinate);\n yield flowResult(this.execute('getConcept', {\n file: coordinate.file,\n line: coordinate.line,\n column: coordinate.column,\n }, false, async (result, potentiallyAffectedFiles) => {\n if (result instanceof GetConceptResult) {\n await flowResult(this.loadFile(result.jumpTo.source, new FileCoordinate(result.jumpTo.source, result.jumpTo.line, result.jumpTo.column)));\n }\n this.resetChangeDetection(potentiallyAffectedFiles);\n }, `navigate`, { silentTerminalOnSuccess: true }));\n }\n *navigateBack() {\n if (this.navigationStack.length === 0) {\n this.applicationStore.notificationService.notifyWarning(`Can't navigate back any further - navigation stack is empty`);\n return;\n }\n if (this.navigationStack.length > 0) {\n const coordinate = this.navigationStack.pop();\n if (coordinate) {\n yield flowResult(this.loadFile(coordinate.file, coordinate));\n }\n }\n }\n *fullReCompile(fullInit) {\n this.applicationStore.alertService.setActionAlertInfo({\n message: 'Are you sure you want to perform a full re-compile?',\n prompt: 'This may take a long time to complete',\n type: ActionAlertType.CAUTION,\n actions: [\n {\n label: 'Perform full re-compile',\n type: ActionAlertActionType.PROCEED_WITH_CAUTION,\n handler: () => {\n flowResult(this.execute('executeSaveAndReset', {}, true, async (result, potentiallyAffectedFiles) => {\n this.initState.reset();\n await flowResult(this.initialize(fullInit, undefined, this.client.mode, this.client.compilerMode));\n this.resetChangeDetection(potentiallyAffectedFiles);\n this.setActiveActivity(ACTIVITY_MODE.CONCEPT_EXPLORER, {\n keepShowingIfMatchedCurrent: true,\n });\n }, `recompile`)).catch(this.applicationStore.alertUnhandledError);\n },\n },\n {\n label: 'Abort',\n type: ActionAlertActionType.PROCEED,\n default: true,\n },\n ],\n });\n }\n resetChangeDetection(files) {\n this.tabManagerState.tabs\n .filter(filterByType(FileEditorState))\n .filter((tab) => files.includes(tab.filePath))\n .forEach((tab) => tab.resetChangeDetection());\n }\n async refreshTrees() {\n await Promise.all([\n this.directoryTreeState.refreshTreeData(),\n this.conceptTreeState.refreshTreeData(),\n ]);\n if (this.directoryTreeState.selectedNode) {\n document\n .getElementById(this.directoryTreeState.selectedNode.id)\n ?.scrollIntoView({\n behavior: 'instant',\n block: 'center',\n });\n }\n if (this.conceptTreeState.selectedNode) {\n document\n .getElementById(this.conceptTreeState.selectedNode.id)\n ?.scrollIntoView({\n behavior: 'instant',\n block: 'center',\n });\n }\n }\n async revealConceptInTree(coordinate) {\n const errorMessage = 'Error revealing concept. Please make sure that the code compiles and that you are looking for a valid concept';\n let concept;\n try {\n concept = await this.client.getConceptInfo(coordinate.file, coordinate.line, coordinate.column);\n }\n catch {\n this.applicationStore.notificationService.notifyWarning(`Can't find concept info. Please make sure that the code compiles and that you are looking for references of non primitive types!`);\n return;\n }\n if (!concept.path) {\n return;\n }\n this.applicationStore.alertService.setBlockingAlert({\n message: 'Revealing concept in tree...',\n showLoading: true,\n });\n try {\n if (this.activeActivity !== ACTIVITY_MODE.CONCEPT_EXPLORER) {\n this.setActiveActivity(ACTIVITY_MODE.CONCEPT_EXPLORER);\n }\n const parts = concept.path.split(ELEMENT_PATH_DELIMITER);\n let currentPath = guaranteeNonNullable(parts[0]);\n let currentNode = guaranteeNonNullable(this.conceptTreeState.getTreeData().nodes.get(currentPath));\n for (let i = 1; i < parts.length; ++i) {\n currentPath = `${currentPath}${ELEMENT_PATH_DELIMITER}${parts[i]}`;\n if (!this.conceptTreeState.getTreeData().nodes.get(currentPath)) {\n await flowResult(this.conceptTreeState.expandNode(currentNode));\n }\n currentNode = guaranteeNonNullable(this.conceptTreeState.getTreeData().nodes.get(currentPath));\n }\n this.conceptTreeState.setSelectedNode(currentNode);\n document.getElementById(currentNode.id)?.scrollIntoView({\n behavior: 'instant',\n block: 'center',\n });\n }\n catch {\n this.applicationStore.notificationService.notifyWarning(errorMessage);\n }\n finally {\n this.applicationStore.alertService.setBlockingAlert(undefined);\n }\n }\n *command(fn, command) {\n try {\n const result = deserializeCommandResult((yield fn()));\n if (result instanceof CommandFailureResult) {\n if (result.errorDialog) {\n this.applicationStore.notificationService.notifyWarning(`Can't run command '${command}': ${result.text}`);\n }\n else {\n this.applicationStore.terminalService.terminal.output(result.text, {\n systemCommand: command,\n });\n }\n return false;\n }\n return true;\n }\n catch (error) {\n assertErrorThrown(error);\n this.applicationStore.notificationService.notifyError(error);\n this.applicationStore.terminalService.terminal.fail(error.message, {\n systemCommand: command,\n });\n return false;\n }\n }\n async getConceptInfo(coordinate, options) {\n try {\n const concept = await this.client.getConceptInfo(coordinate.file, coordinate.line, coordinate.column);\n return concept;\n }\n catch {\n if (!options?.silent) {\n this.applicationStore.notificationService.notifyWarning(`Can't find concept info. Please make sure that the code compiles and that you are looking for references of non primitive types!`);\n }\n return undefined;\n }\n }\n async findConceptUsages(func, param) {\n return (await this.client.getUsages(func, param)).map((usage) => deserialize(Usage, usage));\n }\n *findUsagesFromCoordinate(coordinate) {\n const concept = (yield this.getConceptInfo(coordinate));\n if (!concept) {\n return;\n }\n yield flowResult(this.findUsages(concept));\n }\n *findUsages(concept) {\n try {\n this.referenceUsageLoadState.inProgress();\n this.applicationStore.alertService.setBlockingAlert({\n message: 'Finding concept usages...',\n prompt: `Finding references of ${getConceptInfoLabel(concept)}`,\n showLoading: true,\n });\n const usages = (yield this.findConceptUsages(concept.pureType === ConceptType.ENUM_VALUE\n ? FIND_USAGE_FUNCTION_PATH.ENUM\n : concept.pureType === ConceptType.PROPERTY ||\n concept.pureType === ConceptType.QUALIFIED_PROPERTY\n ? FIND_USAGE_FUNCTION_PATH.PROPERTY\n : FIND_USAGE_FUNCTION_PATH.ELEMENT, (concept.owner ? [`'${concept.owner}'`] : []).concat(`'${concept.path}'`)));\n const searchResultCoordinates = (yield this.client.getTextSearchPreview(usages.map((usage) => serialize(SearchResultCoordinate, new SearchResultCoordinate(usage.source, usage.startLine, usage.startColumn, usage.endLine, usage.endColumn))))).map((preview) => deserialize(SearchResultCoordinate, preview));\n this.setReferenceUsageResult(new ReferenceUsageResult(this, concept, usages, searchResultCoordinates));\n this.setActivePanelMode(PANEL_MODE.REFERENCES);\n this.panelGroupDisplayState.open();\n }\n catch (error) {\n assertErrorThrown(error);\n this.applicationStore.notificationService.notifyError(error);\n }\n finally {\n this.applicationStore.alertService.setBlockingAlert(undefined);\n this.referenceUsageLoadState.complete();\n }\n }\n *renameConcept(oldName, newName, pureType, usages) {\n try {\n yield this.client.renameConcept({\n oldName,\n newName,\n pureType,\n sourceInformations: usages.map((usage) => ({\n sourceId: usage.source,\n line: usage.line,\n column: usage.column,\n })),\n });\n const potentiallyModifiedFiles = usages.map((usage) => usage.source);\n for (const file of potentiallyModifiedFiles) {\n yield this.reloadFile(file);\n }\n yield this.refreshTrees();\n this.applicationStore.notificationService.notifyWarning(`Please re-compile the code after refacting`);\n }\n catch (error) {\n assertErrorThrown(error);\n this.applicationStore.notificationService.notifyError(`Can't rename concept '${oldName}'`);\n }\n }\n *movePackageableElements(inputs) {\n try {\n yield this.client.movePackageableElements(inputs.map((input) => ({\n pureName: input.pureName,\n pureType: input.pureType,\n sourcePackage: input.sourcePackage,\n destinationPackage: input.destinationPackage,\n sourceInformations: input.usages.map((usage) => ({\n sourceId: usage.source,\n line: usage.line,\n column: usage.column,\n })),\n })));\n const potentiallyModifiedFiles = uniq(inputs.flatMap((input) => input.usages.map((usage) => usage.source)));\n for (const file of potentiallyModifiedFiles) {\n yield this.reloadFile(file);\n }\n yield this.refreshTrees();\n this.applicationStore.notificationService.notifyWarning(`Please re-compile the code after refacting`);\n }\n catch (error) {\n assertErrorThrown(error);\n this.applicationStore.notificationService.notifyError(`Can't move packageable elements:\\n${error.message}`);\n }\n }\n *updateFileUsingSuggestionCandidate(candidate) {\n this.setCodeFixSuggestion(undefined);\n yield flowResult(this.updateFile(candidate.fileToBeModified, candidate.lineToBeModified, candidate.columnToBeModified, candidate.add, candidate.messageToBeModified));\n this.setActivePanelMode(PANEL_MODE.TERMINAL);\n this.panelGroupDisplayState.open();\n }\n *updateFile(path, line, column, add, message) {\n try {\n const result = (yield this.client.updateSource([\n {\n path,\n line,\n column,\n message,\n add,\n },\n ]));\n if (result.modifiedFiles.length) {\n for (const file of result.modifiedFiles) {\n yield this.reloadFile(file);\n }\n }\n this.applicationStore.notificationService.notifyWarning(`Please re-compile the code after refacting`);\n }\n catch (error) {\n assertErrorThrown(error);\n this.applicationStore.notificationService.notifyError(`Can't update file '${path}'`);\n }\n }\n *searchFile() {\n if (this.fileSearchCommandLoadState.isInProgress ||\n this.fileSearchCommandState.text.length <= 3) {\n return;\n }\n this.fileSearchCommandLoadState.inProgress();\n this.fileSearchCommandResults = (yield this.client.findFiles(this.fileSearchCommandState.text, this.fileSearchCommandState.isRegExp));\n this.fileSearchCommandLoadState.pass();\n }\n *createNewDirectory(path) {\n try {\n yield flowResult(this.command(() => this.client.createFolder(trimPathLeadingSlash(path)), LEGEND_PURE_IDE_TERMINAL_COMMAND.NEW_DIRECTORY));\n yield flowResult(this.directoryTreeState.refreshTreeData());\n }\n catch (error) {\n assertErrorThrown(error);\n this.applicationStore.notificationService.notifyError(error);\n }\n }\n *createNewFile(path) {\n try {\n const result = (yield flowResult(this.command(() => this.client.createFile(trimPathLeadingSlash(path)), LEGEND_PURE_IDE_TERMINAL_COMMAND.NEW_FILE)));\n yield flowResult(this.directoryTreeState.refreshTreeData());\n if (result) {\n yield flowResult(this.loadFile(path));\n }\n }\n catch (error) {\n assertErrorThrown(error);\n this.applicationStore.notificationService.notifyError(error);\n }\n }\n *renameFile(oldPath, newPath) {\n try {\n yield flowResult(this.command(() => this.client.renameFile(oldPath, newPath), LEGEND_PURE_IDE_TERMINAL_COMMAND.MOVE));\n yield flowResult(this.directoryTreeState.refreshTreeData());\n const openTab = this.tabManagerState.tabs.find((tab) => tab instanceof FileEditorState && tab.filePath === oldPath);\n if (openTab) {\n this.tabManagerState.closeTab(openTab);\n }\n }\n catch (error) {\n assertErrorThrown(error);\n this.applicationStore.notificationService.notifyError(error);\n }\n }\n *deleteDirectoryOrFile(path, isDirectory, hasChildContent) {\n const _delete = async () => {\n await flowResult(this.command(() => this.client.deleteDirectoryOrFile(trimPathLeadingSlash(path)), LEGEND_PURE_IDE_TERMINAL_COMMAND.REMOVE));\n const editorStatesToClose = this.tabManagerState.tabs.filter((tab) => tab instanceof FileEditorState &&\n (isDirectory === undefined || isDirectory\n ? tab.filePath.startsWith(`${path}/`)\n : tab.filePath === path));\n editorStatesToClose.forEach((tab) => this.tabManagerState.closeTab(tab));\n await flowResult(this.directoryTreeState.refreshTreeData());\n };\n if (isDirectory === undefined || hasChildContent === undefined) {\n _delete().catch(this.applicationStore.alertUnhandledError);\n }\n else {\n this.applicationStore.alertService.setActionAlertInfo({\n message: `Are you sure you would like to delete this ${isDirectory ? 'directory' : 'file'}?`,\n prompt: hasChildContent\n ? 'Beware! This directory is not empty, this action is not undo-able, you have to manually revert using VCS'\n : 'Beware! This action is not undo-able, you have to manually revert using VCS',\n type: ActionAlertType.CAUTION,\n actions: [\n {\n label: 'Delete anyway',\n type: ActionAlertActionType.PROCEED_WITH_CAUTION,\n handler: () => {\n _delete().catch(this.applicationStore.alertUnhandledError);\n },\n },\n {\n label: 'Abort',\n type: ActionAlertActionType.PROCEED,\n default: true,\n },\n ],\n });\n }\n }\n}\n//# sourceMappingURL=PureIDEStore.js.map","import { jsx as _jsx } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { createContext, useContext } from 'react';\nimport { useLocalObservable } from 'mobx-react-lite';\nimport { PureIDEStore } from '../stores/PureIDEStore.js';\nimport { guaranteeNonNullable } from '@finos/legend-shared';\nimport { useApplicationStore } from '@finos/legend-application';\nconst PureIDEStoreContext = createContext(undefined);\nexport const PureIDEStoreProvider = (props) => {\n const { children } = props;\n const applicationStore = useApplicationStore();\n const store = useLocalObservable(() => new PureIDEStore(applicationStore));\n return (_jsx(PureIDEStoreContext.Provider, { value: store, children: children }));\n};\nexport const usePureIDEStore = () => guaranteeNonNullable(useContext(PureIDEStoreContext), `Can't find editor store in context`);\nexport const withEditorStore = (WrappedComponent) => function WithEditorStore() {\n return (_jsx(PureIDEStoreProvider, { children: _jsx(WrappedComponent, {}) }));\n};\n//# sourceMappingURL=PureIDEStoreProvider.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { useApplicationStore } from '@finos/legend-application';\nimport { ArrowDownIcon, ArrowUpIcon, BlankPanelContent, CaseSensitiveIcon, CloseIcon, clsx, ContextMenu, CopyIcon, HistoryIcon, MenuContent, MenuContentItem, QuestionCircleIcon, RegexIcon, TrashIcon, useResizeDetector, WholeWordMatchIcon, } from '@finos/legend-art';\nimport { observer } from 'mobx-react-lite';\nimport { useEffect, useRef } from 'react';\nimport { PANEL_MODE } from '../../stores/PureIDEConfig.js';\nimport { usePureIDEStore } from '../PureIDEStoreProvider.js';\nexport const Console = observer(() => {\n const ideStore = usePureIDEStore();\n const applicationStore = useApplicationStore();\n const terminal = applicationStore.terminalService.terminal;\n const searchInputRef = useRef(null);\n const { ref, width, height } = useResizeDetector();\n useEffect(() => {\n if (searchInputRef.current) {\n terminal.searchConfig.setSearchInput(searchInputRef.current);\n }\n return () => terminal.searchConfig.setSearchInput(undefined);\n }, [terminal]);\n useEffect(() => {\n if (ref.current) {\n terminal.mount(ref.current);\n }\n }, [terminal, ref]);\n // auto-focus on the terminal when the console tab is open\n useEffect(() => {\n if (ideStore.panelGroupDisplayState.isOpen &&\n ideStore.activePanelMode === PANEL_MODE.TERMINAL) {\n terminal.focus();\n }\n }, [\n terminal,\n ideStore.panelGroupDisplayState.isOpen,\n ideStore.activePanelMode,\n ]);\n useEffect(() => {\n terminal.autoResize();\n }, [terminal, width, height]);\n const onSearchTextChange = (event) => {\n const value = event.target.value;\n terminal.setSearchText(value);\n terminal.search(value);\n };\n const goToPreviousSearchMatch = () => {\n terminal.findPrevious();\n };\n const goToNextSearchMatch = () => {\n terminal.findNext();\n };\n const onSearchNavigation = (event) => {\n if (event.code === 'Enter') {\n if (event.shiftKey) {\n terminal.findPrevious();\n }\n else {\n terminal.findNext();\n }\n }\n else if (event.code === 'Escape') {\n terminal.clearSearch();\n terminal.focus();\n }\n };\n const clear = () => {\n terminal.clear();\n terminal.focus();\n };\n const copy = () => terminal.copy();\n const copyAll = () => terminal.copyAll();\n if (!terminal.isSetup) {\n return (_jsx(\"div\", { className: \"terminal-panel\", children: _jsx(BlankPanelContent, { children: \"Terminal is not set up yet\" }) }));\n }\n return (_jsxs(\"div\", { className: \"terminal-panel\", children: [_jsxs(\"div\", { className: \"terminal-panel__header\", children: [_jsxs(\"div\", { className: \"terminal-panel__header__group\", children: [_jsxs(\"div\", { className: \"terminal-panel__header__searcher__input__container\", children: [_jsx(\"input\", { ref: searchInputRef, className: \"terminal-panel__header__searcher__input input--dark\", spellCheck: false, value: terminal.searchConfig.searchText, onChange: onSearchTextChange, onKeyDown: onSearchNavigation, placeholder: \"Find\" }), _jsxs(\"div\", { className: \"terminal-panel__header__searcher__input__actions\", children: [_jsx(\"button\", { className: \"terminal-panel__header__searcher__input__action\", tabIndex: -1, title: \"Clear Search\", onClick: () => terminal.clearSearch(), children: _jsx(CloseIcon, {}) }), _jsx(\"button\", { className: clsx('terminal-panel__header__searcher__input__action', {\n 'terminal-panel__header__searcher__input__action--active': terminal.searchConfig.matchCaseSensitive,\n }), tabIndex: -1, title: \"Match Case\", onClick: () => terminal.setSearchCaseSensitive(!terminal.searchConfig.matchCaseSensitive), children: _jsx(CaseSensitiveIcon, {}) }), _jsx(\"button\", { className: clsx('terminal-panel__header__searcher__input__action', {\n 'terminal-panel__header__searcher__input__action--active': terminal.searchConfig.matchWholeWord,\n }), tabIndex: -1, title: \"Match Whole Word\", onClick: () => terminal.setSearchWholeWord(!terminal.searchConfig.matchWholeWord), children: _jsx(WholeWordMatchIcon, {}) }), _jsx(\"button\", { className: clsx('terminal-panel__header__searcher__input__action', {\n 'terminal-panel__header__searcher__input__action--active': terminal.searchConfig.useRegex,\n }), tabIndex: -1, title: \"Use Regular Expression\", onClick: () => terminal.setSearchRegex(!terminal.searchConfig.useRegex), children: _jsx(RegexIcon, {}) })] })] }), _jsx(\"div\", { className: \"terminal-panel__header__searcher__result\", children: terminal.searchConfig.resultCount\n ? `${terminal.searchConfig.currentResultIndex !== undefined\n ? terminal.searchConfig.currentResultIndex + 1\n : 0} of ${terminal.searchConfig.resultCount}`\n : 'No results' }), _jsx(\"button\", { className: \"terminal-panel__header__action terminal-panel__header__group__action\", title: \"Previous Match (Shift+Enter)\", disabled: !terminal.searchConfig.resultCount, tabIndex: -1, onClick: goToPreviousSearchMatch, children: _jsx(ArrowUpIcon, { className: \"terminal-panel__header__action__icon\" }) }), _jsx(\"button\", { className: \"terminal-panel__header__action terminal-panel__header__group__action\", title: \"Next Match (Enter)\", disabled: !terminal.searchConfig.resultCount, tabIndex: -1, onClick: goToNextSearchMatch, children: _jsx(ArrowDownIcon, { className: \"terminal-panel__header__action__icon\" }) })] }), _jsx(\"div\", { className: \"terminal-panel__header__group__separator\" }), _jsxs(\"div\", { className: \"terminal-panel__header__group\", children: [_jsx(\"button\", { className: clsx('terminal-panel__header__action terminal-panel__header__group__action', {\n 'terminal-panel__header__action--active': terminal.preserveLog,\n }), title: \"Toggle Preserve Console\", tabIndex: -1, onClick: () => terminal.setPreserveLog(!terminal.preserveLog), children: _jsx(HistoryIcon, { className: \"terminal-panel__header__action__icon\" }) }), _jsx(\"button\", { className: \"terminal-panel__header__action terminal-panel__header__group__action\", title: \"Copy Text Content\", tabIndex: -1, onClick: copyAll, children: _jsx(CopyIcon, { className: \"terminal-panel__header__action__icon\" }) }), _jsx(\"button\", { className: \"terminal-panel__header__action terminal-panel__header__group__action\", title: \"Clear Console\", tabIndex: -1, onClick: clear, children: _jsx(TrashIcon, { className: \"terminal-panel__header__action__icon\" }) }), _jsx(\"button\", { className: \"terminal-panel__header__action terminal-panel__header__group__action\", title: \"Show Help\", tabIndex: -1, onClick: () => {\n terminal.showHelp();\n terminal.focus();\n }, children: _jsx(QuestionCircleIcon, { className: \"terminal-panel__header__action__icon\" }) })] })] }), _jsx(ContextMenu, { className: \"terminal-panel__content\", content: _jsxs(MenuContent, { children: [_jsx(MenuContentItem, { onClick: copy, children: \"Copy\" }), _jsx(MenuContentItem, { onClick: copyAll, children: \"Copy All\" }), _jsx(MenuContentItem, { onClick: clear, children: \"Clear\" })] }), menuProps: { elevation: 7 }, children: _jsx(\"div\", { ref: ref, className: \"terminal-panel__container\" }) })] }));\n});\n//# sourceMappingURL=TerminalPanel.js.map","import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { observer } from 'mobx-react-lite';\nimport { FileCoordinate, trimPathLeadingSlash, } from '../../server/models/File.js';\nimport { flowResult } from 'mobx';\nimport { CaseSensitiveIcon, ChevronDownIcon, ChevronRightIcon, CloseIcon, clsx, CollapseTreeIcon, ExpandTreeIcon, FileAltIcon, PanelLoadingIndicator, RefreshIcon, RegexIcon, TimesIcon, } from '@finos/legend-art';\nimport { useApplicationStore } from '@finos/legend-application';\nimport { usePureIDEStore } from '../PureIDEStoreProvider.js';\nimport { useEffect, useMemo, useRef } from 'react';\nimport { debounce } from '@finos/legend-shared';\nimport { PANEL_MODE } from '../../stores/PureIDEConfig.js';\nconst TextSearchResultEntryDisplay = observer((props) => {\n const { searchResult, result } = props;\n const ideStore = usePureIDEStore();\n const applicationStore = useApplicationStore();\n const goToResult = (coordinate) => () => flowResult(ideStore.loadFile(result.sourceId, new FileCoordinate(result.sourceId, coordinate.startLine, coordinate.startColumn))).catch(applicationStore.alertUnhandledError);\n const dismissResultForFile = () => searchResult.dismissSearchEntry(result);\n const dismissCoordinate = (coordinate) => () => {\n result.dismissCoordinate(coordinate);\n if (!result.coordinates.length) {\n searchResult.dismissSearchEntry(result);\n }\n };\n return (_jsxs(\"div\", { className: \"text-search-panel__entry\", children: [_jsxs(\"div\", { className: \"text-search-panel__entry__header\", onClick: () => result.setIsExpanded(!result.isExpanded), children: [_jsxs(\"div\", { className: \"text-search-panel__entry__header__title\", children: [_jsx(\"div\", { className: \"text-search-panel__entry__header__title__expander\", children: result.isExpanded ? _jsx(ChevronDownIcon, {}) : _jsx(ChevronRightIcon, {}) }), _jsx(\"div\", { className: \"text-search-panel__entry__header__title__label\", children: _jsx(FileAltIcon, {}) }), _jsx(\"div\", { className: \"text-search-panel__entry__header__title__content\", children: trimPathLeadingSlash(result.sourceId) })] }), _jsxs(\"div\", { className: \"text-search-panel__entry__header__actions\", children: [_jsx(\"div\", { className: \"text-search-panel__entry__header__action text-search-panel__entry__header__action--with-counter\", children: _jsx(\"div\", { className: \"text-search-panel__entry__header__action__counter\", children: result.coordinates.length }) }), _jsx(\"button\", { className: \"text-search-panel__entry__header__action text-search-panel__entry__header__action--hidden\", tabIndex: -1, title: \"Dismiss\", onClick: dismissResultForFile, children: _jsx(TimesIcon, {}) })] })] }), result.isExpanded && (_jsx(\"div\", { className: \"text-search-panel__entry__content\", children: result.coordinates.map((coordinate) => (_jsxs(\"div\", { className: \"text-search-panel__entry__content__item\", children: [_jsxs(\"div\", { className: \"text-search-panel__entry__content__item__label text-search-panel__entry__content__item__label--full\", title: coordinate.preview\n ? `${coordinate.preview.before}${coordinate.preview.found.replaceAll(/\\n/g, '\\u21B5')}${coordinate.preview.after}`\n : 'Go To Result', onClick: goToResult(coordinate), children: [coordinate.preview && (_jsxs(\"div\", { className: \"text-search-panel__entry__content__item__label__content\", children: [_jsx(\"div\", { className: \"text-search-panel__entry__content__item__label__coordinates\", children: `[${coordinate.startLine}:${coordinate.startColumn}]` }), _jsxs(\"div\", { className: \"text-search-panel__entry__content__item__label__preview\", children: [_jsx(\"span\", { className: \"text-search-panel__entry__content__item__label__preview__text\", children: coordinate.preview.before }), _jsx(\"span\", { className: \"text-search-panel__entry__content__item__label__preview__text text-search-panel__entry__content__item__label__preview__text--found\", children: coordinate.preview.found.replaceAll(/\\n/g, '\\u21B5') }), _jsx(\"span\", { className: \"text-search-panel__entry__content__item__label__preview__text\", children: coordinate.preview.after })] })] })), !coordinate.preview && (_jsx(_Fragment, { children: `line: ${coordinate.startLine} - column: ${coordinate.startColumn}` }))] }), _jsx(\"div\", { className: \"text-search-panel__entry__content__item__actions\", children: _jsx(\"button\", { className: \"text-search-panel__entry__content__item__action text-search-panel__entry__content__item__action--hidden\", tabIndex: -1, title: \"Dismiss\", onClick: dismissCoordinate(coordinate), children: _jsx(TimesIcon, {}) }) })] }, coordinate.uuid))) }))] }));\n});\nconst TextSearchResultDisplay = observer((props) => {\n const { searchResult } = props;\n const ideStore = usePureIDEStore();\n const applicationStore = useApplicationStore();\n const showExpandAction = searchResult.searchEntries.some((entry) => !entry.isExpanded);\n const refresh = () => {\n flowResult(ideStore.textSearchState.search()).catch(applicationStore.alertUnhandledError);\n };\n const clear = () => {\n ideStore.textSearchState.setText('');\n ideStore.textSearchState.setResult(undefined);\n };\n const expandAll = () => {\n searchResult.searchEntries.forEach((entry) => entry.setIsExpanded(true));\n };\n const collapseAll = () => {\n searchResult.searchEntries.forEach((entry) => entry.setIsExpanded(false));\n };\n return (_jsxs(\"div\", { className: \"text-search-panel__content\", children: [_jsxs(\"div\", { className: \"text-search-panel__content__header\", children: [_jsx(\"div\", { className: \"text-search-panel__content__header__title\", children: !searchResult.searchEntries.length\n ? `No result`\n : `${searchResult.numberOfResults} result(s) in ${searchResult.numberOfFiles} files` }), _jsxs(\"div\", { className: \"text-search-panel__content__header__actions\", children: [_jsx(\"button\", { className: \"text-search-panel__content__header__action\", tabIndex: -1, title: \"Refresh\", onClick: refresh, children: _jsx(RefreshIcon, {}) }), _jsx(\"button\", { className: \"text-search-panel__content__header__action\", tabIndex: -1, title: \"Clear\", onClick: clear, children: _jsx(CloseIcon, {}) }), !showExpandAction && (_jsx(\"button\", { className: \"text-search-panel__content__header__action\", tabIndex: -1, title: \"Collapse All\", onClick: collapseAll, children: _jsx(CollapseTreeIcon, {}) })), showExpandAction && (_jsx(\"button\", { className: \"text-search-panel__content__header__action\", tabIndex: -1, title: \"Expand All\", onClick: expandAll, children: _jsx(ExpandTreeIcon, {}) }))] })] }), _jsx(\"div\", { className: \"text-search-panel__content__results\", children: searchResult.searchEntries.map((searchEntry) => (_jsx(TextSearchResultEntryDisplay, { searchResult: searchResult, result: searchEntry }, searchEntry.uuid))) })] }));\n});\nexport const TextSearchPanel = observer(() => {\n const ideStore = usePureIDEStore();\n const searchInputRef = useRef(null);\n const searchState = ideStore.textSearchState;\n const toggleCaseSensitive = () => searchState.setCaseSensitive(!searchState.isCaseSensitive);\n const toggleRegExp = () => searchState.setRegExp(!searchState.isRegExp);\n const debouncedSearch = useMemo(() => debounce(() => searchState.search(), 300), [searchState]);\n const onSearchTextChange = (event) => {\n const value = event.target.value;\n searchState.setText(value);\n debouncedSearch.cancel();\n if (!value) {\n searchState.setResult(undefined);\n }\n else {\n debouncedSearch();\n }\n };\n const onSearchKeyDown = (event) => {\n if (event.code === 'Enter') {\n debouncedSearch.cancel();\n if (searchState.text) {\n debouncedSearch();\n }\n }\n else if (event.code === 'Escape') {\n searchInputRef.current?.select();\n }\n };\n useEffect(() => {\n if (searchInputRef.current) {\n searchState.setSearchInput(searchInputRef.current);\n }\n return () => searchState.setSearchInput(undefined);\n }, [searchState]);\n useEffect(() => {\n if (ideStore.panelGroupDisplayState.isOpen &&\n ideStore.activePanelMode === PANEL_MODE.SEARCH) {\n searchState.focus();\n }\n }, [\n searchState,\n ideStore.panelGroupDisplayState.isOpen,\n ideStore.activePanelMode,\n ]);\n return (_jsxs(\"div\", { className: \"text-search-panel\", children: [_jsx(PanelLoadingIndicator, { isLoading: ideStore.textSearchState.loadState.isInProgress }), _jsx(\"div\", { className: \"text-search-panel__header\", children: _jsxs(\"div\", { className: \"text-search-panel__searcher__input__container\", children: [_jsx(\"input\", { ref: searchInputRef, autoFocus: true, className: \"text-search-panel__searcher__input input--dark\", onChange: onSearchTextChange, onKeyDown: onSearchKeyDown, value: searchState.text, placeholder: \"Search\" }), _jsxs(\"div\", { className: \"text-search-panel__searcher__input__actions\", children: [_jsx(\"button\", { className: clsx('text-search-panel__searcher__input__action', {\n 'text-search-panel__searcher__input__action--active': searchState.isCaseSensitive,\n }), tabIndex: -1, title: \"Match Case\", onClick: toggleCaseSensitive, children: _jsx(CaseSensitiveIcon, {}) }), _jsx(\"button\", { className: clsx('text-search-panel__searcher__input__action', {\n 'text-search-panel__searcher__input__action--active': searchState.isRegExp,\n }), tabIndex: -1, title: \"Use Regular Expression\", onClick: toggleRegExp, children: _jsx(RegexIcon, {}) })] })] }) }), ideStore.textSearchState.result && (_jsx(TextSearchResultDisplay, { searchResult: ideStore.textSearchState.result }))] }));\n});\n//# sourceMappingURL=TextSearchPanel.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { ChevronDownIcon, ChevronRightIcon } from '../icon/Icon.js';\nimport { isNonNullable } from '@finos/legend-shared';\nimport { clsx } from 'clsx';\nconst DEFAULT_STEP_PADDING_IN_REM = 1;\nconst DefaultTreeNodeContainer = (props) => {\n const { node, level, stepPaddingInRem, classPrefix, onNodeSelect } = props;\n const selectNode = () => onNodeSelect?.(node);\n return (_jsxs(\"div\", { className: clsx('tree-view__node__container', {\n [`${classPrefix}__tree-view__node__container`]: classPrefix,\n }), onClick: selectNode, style: {\n paddingLeft: `${(level - 1) * (stepPaddingInRem ?? DEFAULT_STEP_PADDING_IN_REM)}rem`,\n display: 'flex',\n }, children: [_jsx(\"div\", { className: clsx('tree-view__node__icon', {\n [`${classPrefix}__tree-view__node__icon`]: classPrefix,\n }), children: Boolean(node.childrenIds?.length) &&\n (node.isOpen ? _jsx(ChevronDownIcon, {}) : _jsx(ChevronRightIcon, {})) }), _jsx(\"div\", { className: clsx('tree-view__node__label', {\n [`${classPrefix}__tree-view__node__label`]: classPrefix,\n }), children: node.label })] }));\n};\nconst DefaultTreeNodeView = (props) => {\n const { node, level, onNodeSelect, getChildNodes, classPrefix, components, stepPaddingInRem, innerProps, } = props;\n const defaultTreeComponents = {\n TreeNodeView: DefaultTreeNodeView,\n TreeNodeContainer: DefaultTreeNodeContainer,\n };\n const treeComponents = components\n ? { ...defaultTreeComponents, ...components }\n : defaultTreeComponents;\n return (\n // NOTE: if we want block-tree instead of padded tree, we can set the padding for it and zero out the step padding for each container\n _jsxs(\"div\", { className: clsx('tree-view__node__block', {\n [`${classPrefix}__tree-view__node__block`]: classPrefix,\n }), children: [_jsx(treeComponents.TreeNodeContainer, { node: node, level: level + 1, stepPaddingInRem: stepPaddingInRem, classPrefix: classPrefix, onNodeSelect: onNodeSelect, innerProps: innerProps }), node.isOpen &&\n getChildNodes(node).map((childNode) => (_jsx(treeComponents.TreeNodeView, { node: childNode, level: level + 1, components: components, classPrefix: classPrefix, onNodeSelect: onNodeSelect, getChildNodes: getChildNodes, innerProps: innerProps }, childNode.id)))] }));\n};\nexport const TreeView = (props) => {\n const { treeData, className, classPrefix, components, onNodeSelect, getChildNodes, getRootNodes, innerProps, } = props;\n const rootNodes = getRootNodes?.(treeData) ??\n treeData.rootIds\n .map((rootId) => treeData.nodes.get(rootId))\n .filter(isNonNullable);\n const defaultTreeComponents = {\n TreeNodeView: DefaultTreeNodeView,\n TreeNodeContainer: DefaultTreeNodeContainer,\n };\n const treeComponents = components\n ? { ...defaultTreeComponents, ...components }\n : defaultTreeComponents;\n return (_jsx(\"div\", { className: clsx('tree-view__node__root', className ?? '', {\n [`${classPrefix}__tree-view__node__root`]: classPrefix,\n }), children: rootNodes.map((node) => (_jsx(treeComponents.TreeNodeView, { level: 0, node: node, getChildNodes: getChildNodes, components: treeComponents, onNodeSelect: onNodeSelect, classPrefix: classPrefix, innerProps: innerProps }, node.id))) }));\n};\n//# sourceMappingURL=TreeView.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { capitalize, prettyCONSTName, toTitleCase } from '@finos/legend-shared';\nimport { clsx } from 'clsx';\nimport { observer } from 'mobx-react-lite';\nimport { forwardRef, useEffect, useState } from 'react';\nimport { CheckSquareIcon, LockIcon, SquareIcon } from '../icon/Icon.js';\nimport { generateSimpleDIVComponent } from '../utils/ComponentCreatorUtils.js';\nexport const Panel = generateSimpleDIVComponent('Panel', 'panel');\nexport const PanelFullContent = generateSimpleDIVComponent('PanelFullContent', 'panel__content--full');\nexport const PanelHeader = (props) => {\n const { title, titleContent, keepTitleFormat, labelClassName, contentClassName, darkMode, className, isReadOnly, children, } = props;\n const isDarkMode = Boolean(darkMode);\n const isKeepTitleFormat = Boolean(keepTitleFormat);\n return (_jsxs(\"div\", { className: clsx('panel__header', { 'panel__header--dark': isDarkMode }, className), children: [title && (_jsxs(\"div\", { className: \"panel__header__title\", children: [isReadOnly && (_jsx(\"div\", { className: \"uml-element-editor__header__lock\", children: _jsx(LockIcon, {}) })), _jsx(\"div\", { className: clsx('panel__header__title__label', {\n 'panel__header__title__label--light': !isDarkMode,\n }, labelClassName), children: isKeepTitleFormat ? title : title.toLowerCase() }), titleContent && (_jsx(\"div\", { className: clsx('panel__header__title__content', { 'panel__header__title__content--light': !isDarkMode }, contentClassName), children: titleContent }))] })), children] }));\n};\nexport const PanelSideBarHeader = (props) => {\n const { title, children, className, darkMode } = props;\n return (_jsxs(\"div\", { className: clsx('panel__header side-bar__header', className, {\n 'panel__header--dark': darkMode,\n }), children: [title && (_jsx(\"div\", { className: \"panel__header__title\", children: _jsx(\"div\", { className: \"panel__header__title__content side-bar__header__title__content\", children: title.toUpperCase() }) })), children] }));\n};\nexport const PanelHeaderActions = generateSimpleDIVComponent('PanelHeaderActions', 'panel__header__actions');\nexport const PanelHeaderActionItem = (props) => {\n const { className, onClick, children, disabled, title } = props;\n return (_jsx(\"button\", { className: clsx('panel__header__action', className), disabled: Boolean(disabled), onClick: onClick, title: title, tabIndex: -1, children: children }));\n};\nexport const PanelTabs = (props) => {\n const { tabs, changeTab, selectedTab, tabClassName } = props;\n return (_jsx(\"div\", { className: \"panel__header panel__header--dark\", children: _jsx(\"div\", { className: \"panel__header__tabs\", children: tabs.map((tab) => (_jsx(\"div\", { onClick: changeTab(tab), className: clsx(tabClassName, {\n [`${tabClassName}--active`]: tab === selectedTab,\n }), children: toTitleCase(prettyCONSTName(tab)) }, tab))) }) }));\n};\nexport const PanelContent = (props) => {\n const { className, darkMode, children } = props;\n return (_jsx(\"div\", { className: clsx('panel__content', className, {\n 'panel__content--dark': darkMode,\n }), children: children }));\n};\nexport const PanelContentLists = generateSimpleDIVComponent('PanelContentLists', 'panel__content__lists');\nexport const PanelList = generateSimpleDIVComponent('PanelList', 'panel__content__form__list');\nexport const PanelListItem = generateSimpleDIVComponent('PanelListItem', 'panel__content__form__list__item');\nexport const PanelListItemTitle = generateSimpleDIVComponent('PanelListItemTitle', 'panel__content__form__list__item__title');\nexport const PanelListItemLabel = generateSimpleDIVComponent('PanelListItemLabel', 'panel__content__form__list__item__label');\nexport const PanelForm = generateSimpleDIVComponent('PanelForm', 'panel__content__form');\nexport const PanelDivider = generateSimpleDIVComponent('PanelDivider', 'panel__content__form__divider');\nexport const PanelFormDescription = generateSimpleDIVComponent('PanelFormDescription', 'panel__content__form__description');\nexport const PanelFormSection = generateSimpleDIVComponent('PanelFormSection', 'panel__content__form__section');\nexport const PanelFormValidatedTextField = forwardRef(function PanelFormValidatedTextField(props, ref) {\n const { name, value, update, prompt, errorMessageClassName, placeholder, validate, onValidate, onBlur, isReadOnly, className, darkMode, fullWidth, inputType, } = props;\n const [inputValue, setInputValue] = useState(value ?? '');\n const validationErrorMessage = validate?.(inputValue) ?? undefined;\n const changeValue = (event) => {\n setInputValue(event.target.value);\n };\n useEffect(() => {\n if (!validationErrorMessage && value !== inputValue) {\n update(inputValue);\n }\n onValidate?.(validationErrorMessage);\n }, [value, inputValue, validationErrorMessage, onValidate, update]);\n return (_jsxs(PanelFormSection, { children: [name && (_jsx(\"div\", { className: \"panel__content__form__section__header__label\", children: capitalize(name) })), prompt && (_jsx(\"div\", { className: \"panel__content__form__section__header__prompt\", children: prompt })), _jsxs(\"div\", { className: \"input-group\", children: [_jsx(\"input\", { className: clsx('input input-group__input panel__content__form__section__input', className, { 'input--dark': darkMode ? darkMode : true }, { 'input--small': !fullWidth }), ref: ref, type: inputType ? inputType : 'text', spellCheck: false, disabled: isReadOnly, placeholder: placeholder, value: inputValue, onChange: changeValue, onBlur: onBlur }), validationErrorMessage && (_jsx(\"div\", { className: clsx('panel__content__form__section__input-group__error-message input-group__error-message', { 'input--small': !fullWidth }, errorMessageClassName), children: validationErrorMessage }))] })] }));\n});\nexport const PanelFormTextField = forwardRef(function PanelFormTextField(props, ref) {\n const { name, value, update, prompt, placeholder, isReadOnly, errorMessage, className, darkMode, fullWidth, inputType, hasError, errorClassName, } = props;\n const inputValue = value ?? '';\n const changeValue = (event) => {\n const stringValue = event.target.value;\n const updatedValue = stringValue ? stringValue : undefined;\n update(updatedValue);\n };\n return (_jsxs(PanelFormSection, { children: [_jsx(\"div\", { className: \"panel__content__form__section__header__label\", children: capitalize(name) }), _jsx(\"div\", { className: clsx('panel__content__form__section__header__prompt', hasError && errorClassName), children: prompt }), _jsxs(\"div\", { className: \"input-group\", children: [_jsx(\"input\", { className: clsx('input input-group__input panel__content__form__section__input', className, { 'input--dark': darkMode ? darkMode : true }, { 'input--small': !fullWidth }, hasError && errorClassName), ref: ref, type: inputType ? inputType : 'text', spellCheck: false, disabled: isReadOnly, placeholder: placeholder, value: inputValue, onChange: changeValue }), errorMessage && (_jsx(\"div\", { className: clsx('panel__content__form__section__input-group__error-message input-group__error-message', { 'input--small': !fullWidth }), children: errorMessage }))] }), errorMessage && _jsx(PanelDivider, {})] }));\n});\n/**\n * NOTE: this is a WIP we did to quickly assemble a modular UI for relational database connection editor\n * This is subjected to change and review, especially in terms in UX.\n */\nexport const PanelFormBooleanField = observer((props) => {\n const { value, name, prompt, children, isReadOnly, update } = props;\n const toggle = () => {\n if (!isReadOnly) {\n update(!value);\n }\n };\n return (_jsxs(PanelFormSection, { children: [name && (_jsx(\"div\", { className: \"panel__content__form__section__header__label\", children: capitalize(name) })), _jsxs(\"div\", { className: clsx('panel__content__form__section__toggler', {\n 'panel__content__form__section__toggler--disabled': isReadOnly,\n }), onClick: toggle, children: [_jsx(\"button\", { type: \"button\", className: clsx('panel__content__form__section__toggler__btn', {\n 'panel__content__form__section__toggler__btn--toggled': value,\n }), disabled: isReadOnly, tabIndex: -1, children: value ? _jsx(CheckSquareIcon, {}) : _jsx(SquareIcon, {}) }), _jsxs(\"div\", { className: \"panel__content__form__section__toggler__prompt\", children: [prompt, \" \", children] })] })] }));\n});\nexport const PanelFormListItems = (props) => {\n const { children, title, prompt } = props;\n return (_jsxs(PanelFormSection, { children: [title && (_jsx(\"div\", { className: \"panel__content__form__section__header__label\", children: title })), prompt && (_jsx(\"div\", { className: \"panel__content__form__section__header__prompt\", children: prompt })), _jsx(\"div\", { className: \"panel__content__form__section__list__items\", children: children })] }));\n};\nexport const PanelFormActions = generateSimpleDIVComponent('PanelFormActions', 'panel__content__form__actions');\n//# sourceMappingURL=Panel.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { useState, useRef, useEffect } from 'react';\nimport { editor as monacoEditorAPI, KeyCode, KeyMod, } from 'monaco-editor';\nimport { getBaseCodeEditorOptions, resetLineNumberGutterWidth, getCodeEditorValue, normalizeLineEnding, setErrorMarkers, clearMarkers, CODE_EDITOR_THEME, configureCodeEditor, } from '@finos/legend-code-editor';\nimport { DEFAULT_TAB_SIZE, useApplicationStore, APPLICATION_EVENT, DEFAULT_MONOSPACED_FONT_FAMILY, } from '@finos/legend-application';\nimport { clsx, WordWrapIcon } from '@finos/legend-art';\nimport { LogEvent } from '@finos/legend-shared';\nexport const configureCodeEditorComponent = async (applicationStore) => {\n await configureCodeEditor(DEFAULT_MONOSPACED_FONT_FAMILY, (error) => applicationStore.logService.error(LogEvent.create(APPLICATION_EVENT.APPLICATION_SETUP__FAILURE), error.message));\n // override native hotkeys supported by monaco-editor\n // here we map these keys to a dummy command that would just dispatch the key combination\n // to the application keyboard shortcut service, effectively bypassing the command associated\n // with the native keybinding\n const OVERRIDE_DEFAULT_KEYBINDING_COMMAND = 'legend.code-editor.override-default-keybinding';\n monacoEditorAPI.registerCommand(OVERRIDE_DEFAULT_KEYBINDING_COMMAND, (accessor, ...args) => {\n applicationStore.keyboardShortcutsService.dispatch(args[0]);\n });\n const hotkeyMapping = [\n [KeyCode.F1, 'F1'], // show command center\n [KeyCode.F8, 'F8'], // show error\n [KeyCode.F9, 'F9'], // toggle debugger breakpoint\n [KeyMod.WinCtrl | KeyCode.KeyG, 'Control+KeyG'], // go-to line command\n [KeyMod.WinCtrl | KeyCode.KeyB, 'Control+KeyB'], // cursor move (core command)\n [KeyMod.WinCtrl | KeyCode.KeyO, 'Control+KeyO'], // cursor move (core command)\n [KeyMod.WinCtrl | KeyCode.KeyD, 'Control+KeyD'], // cursor move (core command)\n [KeyMod.WinCtrl | KeyCode.KeyP, 'Control+KeyP'], // cursor move (core command)\n [KeyMod.Shift | KeyCode.F10, 'Shift+F10'], // show editor context menu\n [KeyMod.WinCtrl | KeyCode.F2, 'Control+F2'], // change all instances\n [KeyMod.WinCtrl | KeyCode.F12, 'Control+F12'], // go-to definition\n ];\n monacoEditorAPI.addKeybindingRules(hotkeyMapping.map(([nativeCodeEditorKeyBinding, keyCombination]) => ({\n keybinding: nativeCodeEditorKeyBinding,\n command: OVERRIDE_DEFAULT_KEYBINDING_COMMAND,\n commandArgs: keyCombination,\n })));\n};\n/**\n * Normally `monaco-editor` worker disposes after 5 minutes staying idle, but we fasten\n * this pace just in case the usage of the editor causes memory-leak somehow\n */\nexport const disposeCodeEditor = (editor) => {\n editor.dispose();\n // NOTE: just to be sure, we dispose the model after disposing the editor\n editor.getModel()?.dispose();\n};\nexport const CodeEditor = (props) => {\n const { inputValue, updateInput, lightTheme, language, isReadOnly, hideMinimap, hideGutter, hidePadding, hideActionBar, lineToScroll, extraEditorOptions, error, } = props;\n const applicationStore = useApplicationStore();\n const [editor, setEditor] = useState();\n const [isWordWrap, setIsWordWrap] = useState(false);\n const onDidChangeModelContentEventDisposer = useRef(undefined);\n /**\n * NOTE: we want to normalize line ending here since if the original\n * input value includes CR '\\r' character, it will get normalized, calling\n * the updateInput method and cause a rerender. With the way we setup\n * `onChange` method, React will warn about `setState` being called in\n * `render` method.\n * See https://github.com/finos/legend-studio/issues/608\n */\n const value = normalizeLineEnding(inputValue);\n const textInputRef = useRef(null);\n const toggleWordWrap = () => {\n const updatedWordWrap = !isWordWrap;\n setIsWordWrap(updatedWordWrap);\n editor?.updateOptions({\n wordWrap: updatedWordWrap ? 'on' : 'off',\n });\n };\n useEffect(() => {\n if (!editor && textInputRef.current) {\n const element = textInputRef.current;\n const _editor = monacoEditorAPI.create(element, {\n ...getBaseCodeEditorOptions(),\n theme: applicationStore.layoutService\n .TEMPORARY__isLightColorThemeEnabled\n ? (lightTheme ?? CODE_EDITOR_THEME.BUILT_IN__VSCODE_LIGHT)\n : CODE_EDITOR_THEME.DEFAULT_DARK,\n // layout\n glyphMargin: !hidePadding,\n padding: !hidePadding ? { top: 20, bottom: 20 } : { top: 0, bottom: 0 },\n formatOnType: true,\n formatOnPaste: true,\n });\n setEditor(_editor);\n }\n }, [applicationStore, lightTheme, hidePadding, editor]);\n useEffect(() => {\n if (editor) {\n resetLineNumberGutterWidth(editor);\n const model = editor.getModel();\n if (model) {\n monacoEditorAPI.setModelLanguage(model, language);\n }\n }\n }, [editor, language]);\n useEffect(() => {\n if (editor && lineToScroll !== undefined) {\n editor.revealLineInCenter(lineToScroll);\n }\n }, [editor, lineToScroll]);\n if (editor) {\n // dispose the old editor content setter in case the `updateInput` handler changes\n // for a more extensive note on this, see `LambdaEditor`\n onDidChangeModelContentEventDisposer.current?.dispose();\n onDidChangeModelContentEventDisposer.current =\n editor.onDidChangeModelContent(() => {\n const currentVal = getCodeEditorValue(editor);\n if (currentVal !== value) {\n updateInput?.(currentVal);\n }\n });\n // Set the text value and editor options\n const currentValue = getCodeEditorValue(editor);\n if (currentValue !== value) {\n editor.setValue(value);\n }\n editor.updateOptions({\n readOnly: Boolean(isReadOnly),\n minimap: { enabled: !hideMinimap },\n // Hide the line number gutter\n // See https://github.com/microsoft/vscode/issues/30795\n ...(hideGutter\n ? {\n glyphMargin: !hidePadding,\n folding: false,\n lineNumbers: 'off',\n lineDecorationsWidth: 0,\n }\n : {}),\n ...(extraEditorOptions ?? {}),\n });\n const model = editor.getModel();\n model?.updateOptions({ tabSize: DEFAULT_TAB_SIZE });\n if (model) {\n if (error?.sourceInformation) {\n setErrorMarkers(model, [\n {\n message: error.message,\n startLineNumber: error.sourceInformation.startLine,\n startColumn: error.sourceInformation.startColumn,\n endLineNumber: error.sourceInformation.endLine,\n endColumn: error.sourceInformation.endColumn,\n },\n ]);\n }\n else {\n clearMarkers();\n }\n }\n }\n // dispose editor\n useEffect(() => () => {\n if (editor) {\n disposeCodeEditor(editor);\n onDidChangeModelContentEventDisposer.current?.dispose();\n }\n }, [editor]);\n return (_jsxs(\"div\", { className: \"code-editor\", children: [!hideActionBar && (_jsx(\"div\", { className: \"code-editor__header\", children: _jsx(\"button\", { tabIndex: -1, className: clsx('code-editor__header__action', {\n 'code-editor__header__action--active': isWordWrap,\n }), onClick: toggleWordWrap, title: `[${isWordWrap ? 'on' : 'off'}] Toggle word wrap`, children: _jsx(WordWrapIcon, {}) }) })), _jsx(\"div\", { className: clsx('code-editor__content', {\n 'code-editor__content--padding': !hidePadding,\n 'code-editor__content--with__header': !hideActionBar,\n }), children: _jsx(\"div\", { className: \"code-editor__body\", ref: textInputRef }) })] }));\n};\n//# sourceMappingURL=CodeEditor.js.map","import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { observer } from 'mobx-react-lite';\nimport { getTestTreeNodeStatus, TestResultType, TestSuiteStatus, } from '../../stores/TestRunnerState.js';\nimport { TestFailureResult, TestSuccessResult, } from '../../server/models/Test.js';\nimport { flowResult } from 'mobx';\nimport { clsx, ResizablePanel, ResizablePanelGroup, ResizablePanelSplitter, BlankPanelContent, PanelLoadingIndicator, TreeView, ProgressBar, QuestionCircleIcon, CheckCircleIcon, ExclamationCircleIcon, TimesCircleIcon, CircleNotchIcon, ChevronDownIcon, ChevronRightIcon, ExpandIcon, CompressIcon, BanIcon, PlayIcon, PlusIcon, ResizablePanelSplitterLine, GoToFileIcon, SubjectIcon, ViewHeadlineIcon, TimesIcon, WordWrapIcon, Panel, PanelContent, PanelHeader, PanelHeaderActions, PanelHeaderActionItem, } from '@finos/legend-art';\nimport { guaranteeNonNullable, isNonNullable, noop, } from '@finos/legend-shared';\nimport { useApplicationStore } from '@finos/legend-application';\nimport { usePureIDEStore } from '../PureIDEStoreProvider.js';\nimport { FileCoordinate } from '../../server/models/File.js';\nimport { ELEMENT_PATH_DELIMITER } from '@finos/legend-graph';\nimport { useEffect, useRef, useState } from 'react';\nimport { editor as monacoEditorAPI, languages as monacoLanguagesAPI, } from 'monaco-editor';\nimport { CODE_EDITOR_LANGUAGE, CODE_EDITOR_THEME, getBaseCodeEditorOptions, } from '@finos/legend-code-editor';\nimport { disposeCodeEditor } from '@finos/legend-lego/code-editor';\nconst TestTreeNodeContainer = observer((props) => {\n const { node, level, stepPaddingInRem, onNodeSelect, innerProps } = props;\n const { testRunnerState, onNodeOpen, onNodeExpand, onNodeCompress, renderNodeLabel, } = innerProps;\n const ideStore = usePureIDEStore();\n const applicationStore = useApplicationStore();\n const testResultInfo = testRunnerState.testResultInfo;\n const isExpandable = !node.data.type;\n // NOTE: the quirky thing here is since we make the node container an `observer`, effectively, we wrap `memo`\n // around this component, so since we use `isSelected = node.isSelected`, changing selection will not trigger\n // a re-render, hence, we have to make it observes the currently selected node to derive its `isSelected` state\n const isSelected = node.id === testRunnerState.selectedTestId;\n const nodeTestStatus = testResultInfo\n ? getTestTreeNodeStatus(node, testResultInfo)\n : undefined;\n let nodeIcon;\n switch (nodeTestStatus) {\n case TestResultType.PASSED: {\n nodeIcon = (_jsx(\"div\", { className: \"test-runner-panel__explorer__package-tree__status test-runner-panel__explorer__package-tree__status--passed\", children: _jsx(CheckCircleIcon, {}) }));\n break;\n }\n case TestResultType.FAILED: {\n nodeIcon = (_jsx(\"div\", { className: \"test-runner-panel__explorer__package-tree__status test-runner-panel__explorer__package-tree__status--failed\", children: _jsx(ExclamationCircleIcon, {}) }));\n break;\n }\n case TestResultType.ERROR: {\n nodeIcon = (_jsx(\"div\", { className: \"test-runner-panel__explorer__package-tree__status test-runner-panel__explorer__package-tree__status--error\", children: _jsx(TimesCircleIcon, {}) }));\n break;\n }\n case TestResultType.RUNNING: {\n nodeIcon = (_jsx(\"div\", { className: \"test-runner-panel__explorer__package-tree__status test-runner-panel__explorer__package-tree__status--running\", children: _jsx(CircleNotchIcon, {}) }));\n break;\n }\n default: {\n nodeIcon = _jsx(QuestionCircleIcon, {});\n break;\n }\n }\n const toggleExpansion = () => {\n if (node.isOpen) {\n onNodeCompress(node);\n }\n else {\n onNodeExpand(node);\n }\n };\n const selectNode = (event) => {\n event.stopPropagation();\n event.preventDefault();\n onNodeSelect?.(node);\n if (isExpandable) {\n toggleExpansion();\n }\n else {\n onNodeOpen(node);\n }\n };\n const onDoubleClick = () => {\n if (isExpandable) {\n toggleExpansion();\n }\n else {\n flowResult(ideStore.loadFile(node.data.li_attr.file, new FileCoordinate(node.data.li_attr.file, Number.parseInt(node.data.li_attr.line, 10), Number.parseInt(node.data.li_attr.column, 10)))).catch(applicationStore.alertUnhandledError);\n }\n };\n return (_jsxs(\"div\", { className: clsx('tree-view__node__container explorer__package-tree__node__container', { 'explorer__package-tree__node__container--selected': isSelected }), onClick: selectNode, onDoubleClick: onDoubleClick, style: {\n paddingLeft: `${level * (stepPaddingInRem ?? 1)}rem`,\n display: 'flex',\n }, children: [_jsxs(\"div\", { className: \"tree-view__node__icon explorer__package-tree__node__icon\", children: [_jsx(\"div\", { className: \"explorer__package-tree__node__icon__expand\", onClick: (event) => {\n event.stopPropagation();\n toggleExpansion();\n }, children: !isExpandable ? (_jsx(\"div\", {})) : node.isOpen ? (_jsx(ChevronDownIcon, {})) : (_jsx(ChevronRightIcon, {})) }), _jsx(\"div\", { className: \"explorer__package-tree__node__icon__type\", children: nodeIcon })] }), _jsx(\"button\", { className: \"tree-view__node__label explorer__package-tree__node__label\", tabIndex: -1, children: renderNodeLabel?.(node) ?? node.label })] }));\n});\nconst TestRunnerList = observer((props) => {\n const { testRunnerState } = props;\n const treeData = testRunnerState.getTreeData();\n const onNodeOpen = (node) => testRunnerState.setSelectedTestId(node.id);\n const renderNodeLabel = (node) => {\n let path = node.id.split('__')[0];\n if (!path) {\n return node.label;\n }\n const parts = path.split('_');\n path = parts.slice(1, parts.length).join(ELEMENT_PATH_DELIMITER);\n return (_jsxs(\"div\", { className: \"test-runner-list__item__label\", children: [_jsx(\"div\", { className: \"test-runner-list__item__label__name\", children: node.label }), _jsx(\"div\", { className: \"test-runner-list__item__label__path\", children: path })] }));\n };\n return (_jsx(\"div\", { className: \"explorer__content\", children: Array.from(testRunnerState.allTests.keys())\n .map((id) => treeData.nodes.get(id))\n .filter(isNonNullable)\n .map((node) => (_jsx(TestTreeNodeContainer, { node: node, level: 0, onNodeSelect: noop(), innerProps: {\n testRunnerState,\n onNodeOpen,\n renderNodeLabel,\n onNodeExpand: noop(),\n onNodeCompress: noop(),\n } }, node.id))) }));\n});\nconst TestRunnerTree = observer((props) => {\n const { testRunnerState } = props;\n const treeData = testRunnerState.getTreeData();\n const isEmptyTree = treeData.nodes.size === 0;\n const onNodeOpen = (node) => testRunnerState.setSelectedTestId(node.id);\n const onNodeExpand = (node) => {\n node.isOpen = true;\n testRunnerState.refreshTree();\n };\n const onNodeCompress = (node) => {\n node.isOpen = false;\n testRunnerState.refreshTree();\n };\n const getChildNodes = (node) => {\n if (node.isLoading || !node.childrenIds) {\n return [];\n }\n return node.childrenIds\n .map((childId) => treeData.nodes.get(childId))\n .filter(isNonNullable);\n };\n return (_jsxs(\"div\", { className: \"explorer__content\", children: [isEmptyTree && _jsx(BlankPanelContent, { children: \"No tests found\" }), !isEmptyTree && (_jsx(TreeView, { components: {\n TreeNodeContainer: TestTreeNodeContainer,\n }, treeData: treeData, onNodeSelect: noop(), getChildNodes: getChildNodes, innerProps: {\n testRunnerState,\n onNodeOpen,\n onNodeExpand,\n onNodeCompress,\n } }))] }));\n});\n// NOTE: we need the global match hence, including /g in the regexp\nconst TEST_ERROR_LOCATION_PATTERN = /(?<path>resource:(?<path_sourceId>\\/?(?:\\w+\\/)*\\w+(?:\\.\\w+)*) (?:line:(?<path_line>\\d+)) (?:column:(?<path_column>\\d+)))/g;\nconst TestResultConsole = (props) => {\n const { wrapText, result } = props;\n const ideStore = usePureIDEStore();\n const applicationStore = useApplicationStore();\n const [editor, setEditor] = useState();\n const locationLinkProviderDisposer = useRef(undefined);\n const textInputRef = useRef(null);\n useEffect(() => {\n if (!editor && textInputRef.current) {\n const element = textInputRef.current;\n const newEditor = monacoEditorAPI.create(element, {\n ...getBaseCodeEditorOptions(),\n fontSize: 12,\n extraEditorClassName: 'monaco-editor--small-font',\n readOnly: true,\n glyphMargin: false,\n folding: false,\n lineNumbers: 'off',\n lineDecorationsWidth: 10,\n lineNumbersMinChars: 0,\n minimap: {\n enabled: false,\n },\n guides: {\n bracketPairs: false,\n bracketPairsHorizontal: false,\n highlightActiveBracketPair: false,\n indentation: false,\n highlightActiveIndentation: false,\n },\n renderLineHighlight: 'none',\n theme: CODE_EDITOR_THEME.DEFAULT_DARK,\n language: CODE_EDITOR_LANGUAGE.TEXT,\n });\n setEditor(newEditor);\n }\n }, [applicationStore, editor]);\n if (editor) {\n locationLinkProviderDisposer.current?.dispose();\n locationLinkProviderDisposer.current =\n monacoLanguagesAPI.registerLinkProvider(CODE_EDITOR_LANGUAGE.TEXT, {\n provideLinks: (model) => {\n const links = [];\n for (let i = 1; i <= model.getLineCount(); ++i) {\n Array.from(model.getLineContent(i).matchAll(TEST_ERROR_LOCATION_PATTERN)).forEach((match) => {\n if (match.groups?.path &&\n match.groups.path_sourceId &&\n match.groups.path_column &&\n match.groups.path_line) {\n links.push({\n range: {\n startLineNumber: i,\n startColumn: match.index + 1,\n endLineNumber: i,\n endColumn: match.index + 1 + match.groups.path.length,\n },\n tooltip: 'Click to go to location',\n sourceId: match.groups.path_sourceId,\n line: match.groups.path_line,\n column: match.groups.path_column,\n });\n }\n });\n }\n return {\n links,\n };\n },\n // NOTE: this is a hacky way to customize the behavior of clicking on a link\n // there is no good solution right now to intercept this cleanly and prevent the default behavior\n // this will produce a warning in the console since link resolved is not navigatable by monaco-editor\n resolveLink: (link) => {\n const locationLink = link;\n flowResult(ideStore.loadFile(locationLink.sourceId, new FileCoordinate(locationLink.sourceId, Number.parseInt(locationLink.line, 10), Number.parseInt(locationLink.column, 10)))).catch(ideStore.applicationStore.alertUnhandledError);\n return undefined;\n },\n });\n }\n useEffect(() => {\n if (editor) {\n const value = result instanceof TestSuccessResult\n ? 'Test passed!'\n : result instanceof TestFailureResult\n ? result.error.text\n : 'Running...';\n editor.setValue(value);\n // color text based on test result/status\n if (result instanceof TestSuccessResult ||\n result instanceof TestFailureResult) {\n editor.createDecorationsCollection([\n {\n range: {\n startLineNumber: 1,\n startColumn: 1,\n endLineNumber: Number.MAX_SAFE_INTEGER,\n endColumn: Number.MAX_SAFE_INTEGER,\n },\n options: {\n inlineClassName: result instanceof TestSuccessResult\n ? 'test-runner-panel__result__content--success'\n : 'test-runner-panel__result__content--failure',\n },\n },\n ]);\n }\n }\n }, [editor, result]);\n useEffect(() => {\n if (editor) {\n editor.updateOptions({\n wordWrap: wrapText ? 'on' : 'off',\n });\n }\n }, [editor, wrapText]);\n // dispose editor\n useEffect(() => () => {\n if (editor) {\n disposeCodeEditor(editor);\n locationLinkProviderDisposer.current?.dispose();\n }\n }, [editor]);\n return (_jsx(\"div\", { className: \"code-editor__container\", children: _jsx(\"div\", { className: \"code-editor__body\", ref: textInputRef }) }));\n};\nconst TestResultViewer = observer((props) => {\n const { testRunnerState, selectedTestId, testResultInfo } = props;\n const ideStore = usePureIDEStore();\n const applicationStore = useApplicationStore();\n const [wrapText, setWrapText] = useState(false);\n const result = testResultInfo.results.get(selectedTestId);\n const testInfo = guaranteeNonNullable(testRunnerState.allTests.get(selectedTestId), `Can't find info for test with ID '${selectedTestId}'`);\n const goToFile = () => {\n flowResult(ideStore.loadFile(testInfo.li_attr.file, new FileCoordinate(testInfo.li_attr.file, Number.parseInt(testInfo.li_attr.line, 10), Number.parseInt(testInfo.li_attr.column, 10)))).catch(applicationStore.alertUnhandledError);\n };\n return (_jsxs(Panel, { children: [_jsx(PanelHeader, { title: testInfo.text, children: _jsxs(PanelHeaderActions, { children: [_jsx(PanelHeaderActionItem, { className: clsx({\n 'panel__header__action--active': wrapText,\n }), onClick: () => setWrapText(!wrapText), title: \"Toggle Text Wrap\", children: _jsx(WordWrapIcon, { className: \"test-runner-panel__result__header__icon--text-wrap\" }) }), _jsx(PanelHeaderActionItem, { title: \"Open File\", onClick: goToFile, children: _jsx(GoToFileIcon, {}) })] }) }), _jsx(PanelContent, { className: \"test-runner-panel__result\", children: _jsx(TestResultConsole, { result: result, wrapText: wrapText }) })] }));\n});\nconst TestRunnerResultDisplay = observer((props) => {\n const { testRunnerState } = props;\n const ideStore = usePureIDEStore();\n const applicationStore = useApplicationStore();\n const numberOfTests = testRunnerState.testExecutionResult.count;\n const pctAdapter = ideStore.PCTAdapters.find((adapter) => adapter.func === testRunnerState.testExecutionResult.pctAdapter);\n const testResultInfo = testRunnerState.testResultInfo;\n const overallResult = testResultInfo?.suiteStatus ?? TestSuiteStatus.NONE;\n const runPercentage = testResultInfo?.runPercentage ?? 0;\n const collapseTree = () => testRunnerState.collapseTree();\n const expandTree = () => testRunnerState.expandTree();\n const runSuite = () => {\n flowResult(testRunnerState.rerunTestSuite()).catch(applicationStore.alertUnhandledError);\n };\n const cancelTestRun = () => {\n flowResult(testRunnerState.cancelTestRun()).catch(applicationStore.alertUnhandledError);\n };\n const toggleViewMode = () => testRunnerState.setViewAsList(!testRunnerState.viewAsList);\n const removeTestResult = () => {\n flowResult(testRunnerState.cancelTestRun())\n .catch(applicationStore.alertUnhandledError)\n .finally(() => {\n ideStore.setTestRunnerState(undefined);\n });\n };\n return (_jsx(\"div\", { className: \"test-runner-panel__content\", children: _jsxs(ResizablePanelGroup, { orientation: \"vertical\", children: [_jsx(ResizablePanel, { minSize: 400, children: _jsxs(\"div\", { className: \"panel test-runner-panel__explorer\", children: [_jsx(PanelLoadingIndicator, { isLoading: testRunnerState.treeBuildingState.isInProgress }), _jsxs(\"div\", { className: \"panel__header\", children: [_jsx(\"div\", { className: \"panel__header__title\", children: _jsxs(\"div\", { className: \"panel__header__title__content test-runner-panel__explorer__report\", children: [_jsxs(\"div\", { className: \"test-runner-panel__explorer__report__overview\", children: [_jsxs(\"div\", { className: \"test-runner-panel__explorer__report__overview__stat test-runner-panel__explorer__report__overview__stat--total\", children: [numberOfTests, \" total\"] }), _jsxs(\"div\", { className: \"test-runner-panel__explorer__report__overview__stat test-runner-panel__explorer__report__overview__stat--passed\", children: [testResultInfo?.passed ?? 0, \" \", _jsx(CheckCircleIcon, {})] }), _jsxs(\"div\", { className: \"test-runner-panel__explorer__report__overview__stat test-runner-panel__explorer__report__overview__stat--failed\", children: [testResultInfo?.failed ?? 0, \" \", _jsx(ExclamationCircleIcon, {})] }), _jsxs(\"div\", { className: \"test-runner-panel__explorer__report__overview__stat test-runner-panel__explorer__report__overview__stat--error\", children: [testResultInfo?.error ?? 0, \" \", _jsx(TimesCircleIcon, {})] })] }), testResultInfo && (_jsxs(\"div\", { className: \"test-runner-panel__explorer__report__time\", children: [testResultInfo.time, \"ms\"] })), pctAdapter !== undefined && (_jsx(\"div\", { className: \"test-runner-panel__explorer__report__pct\", children: `PCT: ${pctAdapter.name}` }))] }) }), _jsxs(\"div\", { className: \"panel__header__actions\", children: [_jsx(\"button\", { className: \"panel__header__action\", onClick: toggleViewMode, title: testRunnerState.viewAsList\n ? 'View As Tree'\n : 'View As List', children: testRunnerState.viewAsList ? (_jsx(SubjectIcon, { className: \"test-runner-panel__icon--tree-view\" })) : (_jsx(ViewHeadlineIcon, { className: \"test-runner-panel__icon--list-view\" })) }), _jsx(\"button\", { className: \"panel__header__action\", onClick: expandTree, title: \"Expand All\", children: _jsx(ExpandIcon, {}) }), _jsx(\"button\", { className: \"panel__header__action\", onClick: collapseTree, title: \"Collapse All\", children: _jsx(CompressIcon, {}) }), _jsx(\"button\", { className: \"panel__header__action\", tabIndex: -1, disabled: !ideStore.testRunState.isInProgress, onClick: cancelTestRun, title: \"Stop\", children: _jsx(BanIcon, {}) }), _jsx(\"button\", { className: \"panel__header__action\", tabIndex: -1, onClick: runSuite, disabled: ideStore.testRunState.isInProgress, title: \"Run Suite\", children: _jsx(PlayIcon, {}) }), _jsx(\"button\", { className: \"panel__header__action\", tabIndex: -1, onClick: removeTestResult, title: \"Reset\", children: _jsx(TimesIcon, {}) })] })] }), _jsx(\"div\", { className: \"test-runner-panel__header__status\", children: _jsx(ProgressBar, { className: `test-runner-panel__progress-bar test-runner-panel__progress-bar--${overallResult.toLowerCase()}`, classes: {\n bar: `test-runner-panel__progress-bar__bar test-runner-panel__progress-bar__bar--${overallResult.toLowerCase()}`,\n }, variant: \"determinate\", value: runPercentage }) }), _jsx(\"div\", { className: \"panel__content\", children: testRunnerState.treeData && (_jsxs(_Fragment, { children: [!testRunnerState.viewAsList && (_jsx(TestRunnerTree, { testRunnerState: testRunnerState })), testRunnerState.viewAsList && (_jsx(TestRunnerList, { testRunnerState: testRunnerState }))] })) })] }) }), _jsx(ResizablePanelSplitter, { children: _jsx(ResizablePanelSplitterLine, { color: ideStore.panelGroupDisplayState.isMaximized\n ? 'transparent'\n : 'var(--color-dark-grey-250)' }) }), _jsxs(ResizablePanel, { minSize: 400, children: [testRunnerState.selectedTestId && !testResultInfo && _jsx(\"div\", {}), testRunnerState.selectedTestId && testResultInfo && (_jsx(TestResultViewer, { testRunnerState: testRunnerState, selectedTestId: testRunnerState.selectedTestId, testResultInfo: testResultInfo })), !testRunnerState.selectedTestId && (_jsxs(\"div\", { className: \"panel\", children: [_jsx(\"div\", { className: \"panel__header\" }), _jsx(\"div\", { className: \"panel__content\", children: _jsx(BlankPanelContent, { children: \"No test selected\" }) })] })), _jsx(\"div\", {})] })] }) }));\n});\nexport const TestRunnerPanel = observer(() => {\n const ideStore = usePureIDEStore();\n const testRunnerState = ideStore.testRunnerState;\n return (_jsxs(\"div\", { className: \"test-runner-panel\", children: [!testRunnerState && (_jsx(BlankPanelContent, { children: _jsx(\"div\", { className: \"panel-group__splash-screen\", children: _jsxs(\"div\", { className: \"panel-group__splash-screen__content\", children: [_jsxs(\"div\", { className: \"panel-group__splash-screen__content__item\", children: [_jsx(\"div\", { className: \"panel-group__splash-screen__content__item__label\", children: \"Run full test suite\" }), _jsx(\"div\", { className: \"panel-group__splash-screen__content__item__hot-keys\", children: _jsx(\"div\", { className: \"hotkey__key\", children: \"F10\" }) })] }), _jsxs(\"div\", { className: \"panel-group__splash-screen__content__item\", children: [_jsx(\"div\", { className: \"panel-group__splash-screen__content__item__label\", children: \"Run relevant tests only\" }), _jsxs(\"div\", { className: \"panel-group__splash-screen__content__item__hot-keys\", children: [_jsx(\"div\", { className: \"hotkey__key\", children: \"Shift\" }), _jsx(\"div\", { className: \"hotkey__plus\", children: _jsx(PlusIcon, {}) }), _jsx(\"div\", { className: \"hotkey__key\", children: \"F10\" })] })] })] }) }) })), testRunnerState && (_jsx(TestRunnerResultDisplay, { testRunnerState: testRunnerState }))] }));\n});\n//# sourceMappingURL=TestRunnerPanel.js.map","import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { observer } from 'mobx-react-lite';\nimport { FileCoordinate, trimPathLeadingSlash, } from '../../server/models/File.js';\nimport { flowResult } from 'mobx';\nimport { ArrowCircleRightIcon } from '@finos/legend-art';\nimport { useApplicationStore } from '@finos/legend-application';\nimport { usePureIDEStore } from '../PureIDEStoreProvider.js';\nimport { UnknownSymbolCodeFixSuggestion, UnmatchedFunctionCodeFixSuggestion, } from '../../stores/CodeFixSuggestion.js';\nconst CandidateWithPackageImportedDisplay = observer((props) => {\n const { candidate } = props;\n const ideStore = usePureIDEStore();\n const applicationStore = useApplicationStore();\n const goToResult = () => {\n flowResult(ideStore.loadFile(candidate.sourceID, new FileCoordinate(candidate.sourceID, candidate.line, candidate.column))).catch(applicationStore.alertUnhandledError);\n };\n return (_jsxs(\"div\", { className: \"suggestions-panel__entry__content__item\", children: [_jsxs(\"div\", { className: \"suggestions-panel__entry__content__item__label__candidate\", title: \"Go to Result\", onClick: goToResult, children: [_jsx(\"div\", { className: \"suggestions-panel__entry__content__item__label__candidate-name\", children: candidate.foundName }), _jsx(\"div\", { className: \"suggestions-panel__entry__content__item__label__candidate-location\", children: `${trimPathLeadingSlash(candidate.sourceID)} [${candidate.line}:${candidate.column}]` })] }), _jsx(\"div\", { className: \"suggestions-panel__entry__content__item__actions\", children: _jsx(\"button\", { className: \"suggestions-panel__entry__content__item__action\", tabIndex: -1, title: \"Go to Result\", onClick: goToResult, children: _jsx(ArrowCircleRightIcon, {}) }) })] }));\n});\nconst CandidateWithPackageNotImportedDisplay = observer((props) => {\n const { candidate } = props;\n const ideStore = usePureIDEStore();\n const applicationStore = useApplicationStore();\n const goToResult = () => {\n flowResult(ideStore.loadFile(candidate.sourceID, new FileCoordinate(candidate.sourceID, candidate.line, candidate.column))).catch(applicationStore.alertUnhandledError);\n };\n const useCandidate = () => {\n flowResult(ideStore.updateFileUsingSuggestionCandidate(candidate)).catch(applicationStore.alertUnhandledError);\n };\n return (_jsxs(\"div\", { className: \"suggestions-panel__entry__content__item\", children: [_jsxs(\"div\", { className: \"suggestions-panel__entry__content__item__label__candidate\", title: \"Add Suggested Import\", onClick: useCandidate, children: [_jsx(\"div\", { className: \"suggestions-panel__entry__content__item__label__candidate-name\", children: candidate.foundName }), _jsx(\"div\", { className: \"suggestions-panel__entry__content__item__label__candidate-location\", children: `${trimPathLeadingSlash(candidate.sourceID)} [${candidate.line}:${candidate.column}]` })] }), _jsx(\"div\", { className: \"suggestions-panel__entry__content__item__actions\", children: _jsx(\"button\", { className: \"suggestions-panel__entry__content__item__action\", tabIndex: -1, title: \"Go to Result\", onClick: goToResult, children: _jsx(ArrowCircleRightIcon, {}) }) })] }));\n});\nconst UnmatchedFunctionExecutionResultDisplay = observer((props) => {\n const { suggestionState } = props;\n const result = suggestionState.result;\n return (_jsxs(\"div\", { className: \"suggestions-panel__content\", children: [!result.candidatesWithPackageImported.length && (_jsx(\"div\", { className: \"suggestions-panel__content__header\", children: `No functions, in packages already imported, match the function '${result.candidateName}'` })), Boolean(result.candidatesWithPackageImported.length) && (_jsxs(_Fragment, { children: [_jsx(\"div\", { className: \"suggestions-panel__content__header\", children: `These functions, in packages already imported, would match the function '${result.candidateName}' if you changed the parameters` }), _jsx(\"div\", { className: \"suggestions-panel__entry\", children: result.candidatesWithPackageImported.map((candidate) => (_jsx(CandidateWithPackageImportedDisplay, { candidate: candidate }, candidate.uuid))) })] })), !result.candidatesWithPackageNotImported.length && (_jsx(\"div\", { className: \"suggestions-panel__content__header\", children: `No functions, in packages not imported, match the function '${result.candidateName}'` })), Boolean(result.candidatesWithPackageNotImported.length) && (_jsxs(_Fragment, { children: [_jsx(\"div\", { className: \"suggestions-panel__content__header\", children: `These functions, in packages not imported, match the function '${result.candidateName}'. Click on result to import the necessary package` }), _jsx(\"div\", { className: \"suggestions-panel__entry\", children: result.candidatesWithPackageNotImported.map((candidate) => (_jsx(CandidateWithPackageNotImportedDisplay, { candidate: candidate }, candidate.uuid))) })] }))] }));\n});\nconst UnmatchExecutionResultDisplay = observer((props) => {\n const { suggestionState } = props;\n const result = suggestionState.result;\n return (_jsxs(\"div\", { className: \"suggestions-panel__content\", children: [!result.candidates.length && (_jsx(\"div\", { className: \"suggestions-panel__content__header\", children: `No possible matches found for '${result.candidateName}'` })), Boolean(result.candidates.length) && (_jsxs(_Fragment, { children: [_jsx(\"div\", { className: \"suggestions-panel__content__header\", children: `Found possible matches for '${result.candidateName}'. Click on result to import the necessary package` }), _jsx(\"div\", { className: \"suggestions-panel__entry\", children: result.candidates.map((candidate) => (_jsx(CandidateWithPackageNotImportedDisplay, { candidate: candidate }, candidate.uuid))) })] }))] }));\n});\nexport const CodeFixSuggestionsPanel = observer(() => {\n const ideStore = usePureIDEStore();\n return (_jsxs(\"div\", { className: \"suggestions-panel\", children: [ideStore.codeFixSuggestion instanceof\n UnmatchedFunctionCodeFixSuggestion && (_jsx(UnmatchedFunctionExecutionResultDisplay, { suggestionState: ideStore.codeFixSuggestion })), ideStore.codeFixSuggestion instanceof UnknownSymbolCodeFixSuggestion && (_jsx(UnmatchExecutionResultDisplay, { suggestionState: ideStore.codeFixSuggestion }))] }));\n});\n//# sourceMappingURL=CodeFixSuggestionsPanel.js.map","import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { observer } from 'mobx-react-lite';\nimport { FileCoordinate, trimPathLeadingSlash, } from '../../server/models/File.js';\nimport { flowResult } from 'mobx';\nimport { getConceptInfoLabel } from '../../server/models/Usage.js';\nimport { BlankPanelContent, ChevronDownIcon, ChevronRightIcon, CloseIcon, CollapseTreeIcon, ExpandTreeIcon, FileAltIcon, PanelLoadingIndicator, PlusIcon, RefreshIcon, TimesIcon, } from '@finos/legend-art';\nimport { useApplicationStore } from '@finos/legend-application';\nimport { usePureIDEStore } from '../PureIDEStoreProvider.js';\nconst ReferenceUsageSearchResultEntryDisplay = observer((props) => {\n const { referenceUsageResult, result } = props;\n const ideStore = usePureIDEStore();\n const applicationStore = useApplicationStore();\n const goToResult = (coordinate) => () => flowResult(ideStore.loadFile(result.sourceId, new FileCoordinate(result.sourceId, coordinate.startLine, coordinate.startColumn))).catch(applicationStore.alertUnhandledError);\n const dismissResultForFile = () => referenceUsageResult.dismissSearchEntry(result);\n const dismissCoordinate = (coordinate) => () => {\n result.dismissCoordinate(coordinate);\n if (!result.coordinates.length) {\n referenceUsageResult.dismissSearchEntry(result);\n }\n };\n return (_jsxs(\"div\", { className: \"references-panel__entry\", children: [_jsxs(\"div\", { className: \"references-panel__entry__header\", onClick: () => result.setIsExpanded(!result.isExpanded), children: [_jsxs(\"div\", { className: \"references-panel__entry__header__title\", children: [_jsx(\"div\", { className: \"references-panel__entry__header__title__expander\", children: result.isExpanded ? _jsx(ChevronDownIcon, {}) : _jsx(ChevronRightIcon, {}) }), _jsx(\"div\", { className: \"references-panel__entry__header__title__label\", children: _jsx(FileAltIcon, {}) }), _jsx(\"div\", { className: \"references-panel__entry__header__title__content\", children: trimPathLeadingSlash(result.sourceId) })] }), _jsxs(\"div\", { className: \"references-panel__entry__header__actions\", children: [_jsx(\"div\", { className: \"references-panel__entry__header__action references-panel__entry__header__action--with-counter\", children: _jsx(\"div\", { className: \"references-panel__entry__header__action__counter\", children: result.coordinates.length }) }), _jsx(\"button\", { className: \"references-panel__entry__header__action references-panel__entry__header__action--hidden\", tabIndex: -1, title: \"Dismiss\", onClick: dismissResultForFile, children: _jsx(TimesIcon, {}) })] })] }), result.isExpanded && (_jsx(\"div\", { className: \"references-panel__entry__content\", children: result.coordinates.map((coordinate) => (_jsxs(\"div\", { className: \"references-panel__entry__content__item\", children: [_jsxs(\"div\", { className: \"references-panel__entry__content__item__label references-panel__entry__content__item__label--full\", title: coordinate.preview\n ? `${coordinate.preview.before}${coordinate.preview.found.replaceAll(/\\n/g, '\\u21B5')}${coordinate.preview.after}`\n : 'Go To Result', onClick: goToResult(coordinate), children: [coordinate.preview && (_jsxs(\"div\", { className: \"references-panel__entry__content__item__label__content\", children: [_jsx(\"div\", { className: \"references-panel__entry__content__item__label__coordinates\", children: `[${coordinate.startLine}:${coordinate.startColumn}]` }), _jsxs(\"div\", { className: \"references-panel__entry__content__item__label__preview\", children: [_jsx(\"span\", { className: \"references-panel__entry__content__item__label__preview__text\", children: coordinate.preview.before }), _jsx(\"span\", { className: \"references-panel__entry__content__item__label__preview__text references-panel__entry__content__item__label__preview__text--found\", children: coordinate.preview.found.replaceAll(/\\n/g, '\\u21B5') }), _jsx(\"span\", { className: \"references-panel__entry__content__item__label__preview__text\", children: coordinate.preview.after })] })] })), !coordinate.preview && (_jsx(_Fragment, { children: `line: ${coordinate.startLine} - column: ${coordinate.startColumn}` }))] }), _jsx(\"div\", { className: \"references-panel__entry__content__item__actions\", children: _jsx(\"button\", { className: \"references-panel__entry__content__item__action references-panel__entry__content__item__action--hidden\", tabIndex: -1, title: \"Dismiss\", onClick: dismissCoordinate(coordinate), children: _jsx(TimesIcon, {}) }) })] }, coordinate.uuid))) }))] }));\n});\nconst UsageResultDisplay = observer((props) => {\n const { referenceUsageState } = props;\n const ideStore = usePureIDEStore();\n const applicationStore = useApplicationStore();\n const showExpandAction = referenceUsageState.searchEntries.some((entry) => !entry.isExpanded);\n const refresh = () => {\n flowResult(ideStore.findUsages(referenceUsageState.usageConcept)).catch(applicationStore.alertUnhandledError);\n };\n const clear = () => ideStore.setReferenceUsageResult(undefined);\n const expandAll = () => {\n referenceUsageState.searchEntries.forEach((entry) => entry.setIsExpanded(true));\n };\n const collapseAll = () => {\n referenceUsageState.searchEntries.forEach((entry) => entry.setIsExpanded(false));\n };\n return (_jsxs(\"div\", { className: \"references-panel__content\", children: [_jsxs(\"div\", { className: \"references-panel__content__header\", children: [_jsx(\"div\", { className: \"references-panel__content__header__title\", children: !referenceUsageState.searchEntries.length\n ? `No usages found for ${getConceptInfoLabel(referenceUsageState.usageConcept)}`\n : `${referenceUsageState.numberOfResults} usages(s) in ${referenceUsageState.numberOfFiles} files for ${getConceptInfoLabel(referenceUsageState.usageConcept)}` }), _jsxs(\"div\", { className: \"references-panel__content__header__actions\", children: [_jsx(\"button\", { className: \"references-panel__content__header__action\", tabIndex: -1, title: \"Refresh\", onClick: refresh, children: _jsx(RefreshIcon, {}) }), _jsx(\"button\", { className: \"references-panel__content__header__action\", tabIndex: -1, title: \"Clear\", onClick: clear, children: _jsx(CloseIcon, {}) }), !showExpandAction && (_jsx(\"button\", { className: \"references-panel__content__header__action\", tabIndex: -1, title: \"Collapse All\", onClick: collapseAll, children: _jsx(CollapseTreeIcon, {}) })), showExpandAction && (_jsx(\"button\", { className: \"references-panel__content__header__action\", tabIndex: -1, title: \"Expand All\", onClick: expandAll, children: _jsx(ExpandTreeIcon, {}) }))] })] }), _jsx(\"div\", { className: \"references-panel__content__results\", children: referenceUsageState.searchEntries.map((searchEntry) => (_jsx(ReferenceUsageSearchResultEntryDisplay, { referenceUsageResult: referenceUsageState, result: searchEntry }, searchEntry.uuid))) })] }));\n});\nexport const ReferenceUsagePanel = observer(() => {\n const ideStore = usePureIDEStore();\n return (_jsxs(\"div\", { className: \"references-panel\", children: [_jsx(PanelLoadingIndicator, { isLoading: ideStore.referenceUsageLoadState.isInProgress }), !ideStore.referenceUsageResult && (_jsx(BlankPanelContent, { children: _jsx(\"div\", { className: \"panel-group__splash-screen\", children: _jsx(\"div\", { className: \"panel-group__splash-screen__content\", children: _jsxs(\"div\", { className: \"panel-group__splash-screen__content__item\", children: [_jsx(\"div\", { className: \"panel-group__splash-screen__content__item__label\", children: \"Find Concept References\" }), _jsxs(\"div\", { className: \"panel-group__splash-screen__content__item__hot-keys\", children: [_jsx(\"div\", { className: \"hotkey__key\", children: \"Alt\" }), _jsx(\"div\", { className: \"hotkey__plus\", children: _jsx(PlusIcon, {}) }), _jsx(\"div\", { className: \"hotkey__key\", children: \"F7\" })] })] }) }) }) })), ideStore.referenceUsageResult && (_jsx(UsageResultDisplay, { referenceUsageState: ideStore.referenceUsageResult }))] }));\n});\n//# sourceMappingURL=ReferenceUsagePanel.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { useEffect } from 'react';\nimport { observer } from 'mobx-react-lite';\nimport { Console } from './TerminalPanel.js';\nimport { PANEL_MODE } from '../../stores/PureIDEConfig.js';\nimport { TextSearchPanel } from './TextSearchPanel.js';\nimport { TestRunnerPanel } from './TestRunnerPanel.js';\nimport { isNonNullable } from '@finos/legend-shared';\nimport { ChevronDownIcon, ChevronUpIcon, clsx, FlaskIcon, Panel, PanelContent, PanelHeader, ReferencesIcon, SearchIcon, TerminalIcon, WandIcon, XIcon, } from '@finos/legend-art';\nimport { usePureIDEStore } from '../PureIDEStoreProvider.js';\nimport { CodeFixSuggestionsPanel } from './CodeFixSuggestionsPanel.js';\nimport { ReferenceUsagePanel } from './ReferenceUsagePanel.js';\nexport const PanelGroup = observer(() => {\n const ideStore = usePureIDEStore();\n const changeMode = (mode) => () => ideStore.setActivePanelMode(mode);\n const closePanel = () => ideStore.panelGroupDisplayState.toggle();\n const toggleExpandPanel = () => ideStore.panelGroupDisplayState.toggleMaximize();\n const tabs = {\n [PANEL_MODE.TERMINAL]: {\n mode: PANEL_MODE.TERMINAL,\n name: 'TERMINAL',\n icon: (_jsx(TerminalIcon, { className: \"panel-group__header__tab__icon--terminal\" })),\n isVisible: true,\n },\n [PANEL_MODE.SEARCH]: {\n mode: PANEL_MODE.SEARCH,\n name: 'SEARCH',\n icon: _jsx(SearchIcon, { className: \"panel-group__header__tab__icon--search\" }),\n isVisible: true,\n },\n [PANEL_MODE.TEST_RUNNER]: {\n mode: PANEL_MODE.TEST_RUNNER,\n name: 'TEST',\n icon: _jsx(FlaskIcon, { className: \"panel-group__header__tab__icon--test\" }),\n isVisible: true,\n },\n [PANEL_MODE.REFERENCES]: {\n mode: PANEL_MODE.REFERENCES,\n name: 'REFERENCES',\n icon: (_jsx(ReferencesIcon, { className: \"panel-group__header__tab__icon--references\" })),\n isVisible: true,\n },\n [PANEL_MODE.CODE_FIX_SUGGESTION]: {\n mode: PANEL_MODE.CODE_FIX_SUGGESTION,\n name: 'SUGGESTIONS',\n icon: _jsx(WandIcon, { className: \"panel-group__header__tab__icon--suggestion\" }),\n isVisible: Boolean(ideStore.codeFixSuggestion),\n },\n };\n const tabsToShow = Object.values(PANEL_MODE).filter((tab) => isNonNullable(tabs[tab]) && tabs[tab].isVisible);\n const isTabVisible = (tabType) => ideStore.activePanelMode === tabType && tabsToShow.includes(tabType);\n useEffect(() => {\n if (!tabsToShow.includes(ideStore.activePanelMode)) {\n ideStore.setActivePanelMode(PANEL_MODE.TERMINAL);\n }\n }, [ideStore, tabsToShow, ideStore.activePanelMode]);\n return (_jsxs(Panel, { className: \"panel-group\", children: [_jsxs(PanelHeader, { children: [_jsx(\"div\", { className: \"panel-group__header__tabs\", children: tabsToShow\n .map((tab) => tabs[tab])\n .filter(isNonNullable)\n .map((tab) => (_jsxs(\"button\", { tabIndex: -1, className: clsx('panel-group__header__tab', {\n 'panel-group__header__tab--active': ideStore.activePanelMode === tab.mode,\n }), onClick: changeMode(tab.mode), children: [_jsx(\"div\", { className: \"panel-group__header__tab__icon\", children: tab.icon }), _jsx(\"div\", { className: \"panel-group__header__tab__title\", children: tab.name })] }, tab.mode))) }), _jsxs(\"div\", { className: \"panel-group__header__actions\", children: [_jsx(\"button\", { className: \"panel-group__header__action\", onClick: toggleExpandPanel, tabIndex: -1, title: \"Toggle Expand/Collapse\", children: ideStore.panelGroupDisplayState.isMaximized ? (_jsx(ChevronDownIcon, {})) : (_jsx(ChevronUpIcon, {})) }), _jsx(\"button\", { className: \"panel-group__header__action\", onClick: closePanel, tabIndex: -1, title: \"Close\", children: _jsx(XIcon, {}) })] })] }), _jsxs(PanelContent, { children: [isTabVisible(PANEL_MODE.TERMINAL) && (_jsx(\"div\", { className: \"panel-group__content__tab\", children: _jsx(Console, {}) })), isTabVisible(PANEL_MODE.SEARCH) && (_jsx(\"div\", { className: \"panel-group__content__tab\", children: _jsx(TextSearchPanel, {}) })), isTabVisible(PANEL_MODE.TEST_RUNNER) && (_jsx(\"div\", { className: \"panel-group__content__tab\", children: _jsx(TestRunnerPanel, {}) })), isTabVisible(PANEL_MODE.CODE_FIX_SUGGESTION) && (_jsx(\"div\", { className: \"panel-group__content__tab\", children: _jsx(CodeFixSuggestionsPanel, {}) })), isTabVisible(PANEL_MODE.REFERENCES) && (_jsx(\"div\", { className: \"panel-group__content__tab\", children: _jsx(ReferenceUsagePanel, {}) }))] })] }));\n});\n//# sourceMappingURL=PanelGroup.js.map","import { jsx as _jsx } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { AccessPointIcon, BusinessTimeIcon, DatabaseIcon, FileCodeIcon, FunctionIcon, LayerGroupIcon, LinkIcon, MapIcon, PackageIcon, QuestionSquareIcon, RobotIcon, ServerIcon, ShapeLineIcon, Snowflake_BrandIcon, TableIcon, TabulatedDataFileIcon, PiFunctionBoldIcon, DatabaseImportIcon, SinglestoreIcon, } from './Icon.js';\nexport const PURE_PrimitiveTypeIcon = () => (_jsx(\"div\", { className: \"icon icon--primitive color--primitive\", children: \"p\" }));\nexport const PURE_PackageIcon = () => (_jsx(\"div\", { className: \"icon color--package\", children: _jsx(PackageIcon, {}) }));\nexport const PURE_ClassIcon = () => (_jsx(\"div\", { className: \"icon color--class\", children: \"C\" }));\nexport const PURE_AssociationIcon = () => (_jsx(\"div\", { className: \"icon color--association\", children: \"A\" }));\nexport const PURE_EnumValueIcon = () => (_jsx(\"div\", { className: \"icon icon--enum-value color--enum-value\", children: \"e\" }));\nexport const PURE_EnumerationIcon = () => (_jsx(\"div\", { className: \"icon color--enumeration\", children: \"E\" }));\nexport const PURE_MeasureIcon = () => (_jsx(\"div\", { className: \"icon color--measure\", children: \"M\" }));\nexport const PURE_UnitIcon = () => (_jsx(\"div\", { className: \"icon color--unit\", children: \"u\" }));\nexport const PURE_ProfileIcon = () => (_jsx(\"div\", { className: \"icon color--profile\", children: \"P\" }));\nexport const PURE_FunctionIcon = () => (_jsx(\"div\", { className: \"icon icon--function color--function\", children: _jsx(FunctionIcon, {}) }));\nexport const PURE_FlatDataStoreIcon = () => (_jsx(\"div\", { className: \"icon icon--flat-data color--flat-data\", children: _jsx(LayerGroupIcon, {}) }));\nexport const PURE_DatabaseIcon = () => (_jsx(\"div\", { className: \"icon icon--database color--database\", children: _jsx(DatabaseIcon, {}) }));\nexport const PURE_DatabaseSchemaIcon = () => (_jsx(\"div\", { className: \"icon icon--schema color--schema\", children: _jsx(ServerIcon, {}) }));\nexport const PURE_DatabaseTableIcon = () => (_jsx(\"div\", { className: \"icon icon--table color--table\", children: _jsx(TableIcon, {}) }));\nexport const PURE_DatabaseTabularFunctionIcon = () => (_jsx(\"div\", { className: \"icon icon--tabular-function color--table\", children: _jsx(PiFunctionBoldIcon, {}) }));\nexport const PURE_DatabaseTableJoinIcon = () => (_jsx(\"div\", { className: \"icon icon--table-join color--primitive\", children: \"@\" }));\nexport const PURE_MappingIcon = () => (_jsx(\"div\", { className: \"icon color--mapping\", children: _jsx(MapIcon, {}) }));\nexport const PURE_GenerationSpecificationIcon = () => (_jsx(\"div\", { className: \"icon\", children: \"G\" }));\nexport const PURE_FileGenerationIcon = () => (_jsx(\"div\", { className: \"icon color--file-generation\", children: _jsx(FileCodeIcon, {}) }));\nexport const PURE_ServiceIcon = () => (_jsx(\"div\", { className: \"icon color--service\", children: _jsx(RobotIcon, {}) }));\nexport const PURE_ConnectionIcon = () => (_jsx(\"div\", { className: \"icon icon--connection color--connection\", children: _jsx(LinkIcon, {}) }));\nexport const PURE_RuntimeIcon = () => (_jsx(\"div\", { className: \"icon color--runtime\", children: _jsx(BusinessTimeIcon, {}) }));\nexport const PURE_ModelStoreIcon = () => (_jsx(\"div\", { className: \"icon color--class\", children: _jsx(ShapeLineIcon, {}) }));\nexport const PURE_DataIcon = () => (_jsx(\"div\", { className: \"icon color--data\", children: _jsx(TabulatedDataFileIcon, {}) }));\nexport const PURE_SnowflakeAppIcon = () => (_jsx(\"div\", { className: \"icon color--snowflake-app\", children: _jsx(Snowflake_BrandIcon, {}) }));\nexport const PURE_SnowflakeM2MUdfIcon = () => (_jsx(\"div\", { className: \"icon color--snowflake-app\", children: _jsx(Snowflake_BrandIcon, {}) }));\nexport const PURE_DataProductIcon = () => (_jsx(\"div\", { className: \"icon color--snowflake-app\", children: _jsx(AccessPointIcon, {}) }));\nexport const PURE_UnknownElementTypeIcon = () => (_jsx(\"div\", { className: \"icon icon--unknown\", children: _jsx(QuestionSquareIcon, {}) }));\nexport const PURE_IngestIcon = () => (_jsx(\"div\", { className: \"icon color--data\", children: _jsx(DatabaseImportIcon, {}) }));\nexport const PURE_MemSQLFunctionIcon = () => (_jsx(\"div\", { className: \"icon color--mem-sql-function\", children: _jsx(SinglestoreIcon, {}) }));\n//# sourceMappingURL=TypeIcon.js.map","import { jsx as _jsx } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { AtomIcon, DatabaseIcon, FunctionIcon, PURE_ClassIcon, PURE_EnumerationIcon, PURE_FunctionIcon, PURE_MappingIcon, PURE_MeasureIcon, PURE_PackageIcon, PURE_ProfileIcon, PURE_UnitIcon, PURE_UnknownElementTypeIcon, ShapesIcon, } from '@finos/legend-art';\nimport { ConceptType } from '../../server/models/ConceptTree.js';\nconst PURE_NativeFunctionIcon = () => (_jsx(\"div\", { className: \"icon icon--function color--native-function\", children: _jsx(FunctionIcon, {}) }));\nconst PURE_PropertyIcon = () => (_jsx(\"div\", { className: \"icon icon--property color--property\", children: _jsx(AtomIcon, {}) }));\nexport const PURE_DiagramIcon = () => (_jsx(\"div\", { className: \"icon color--diagram\", children: _jsx(ShapesIcon, {}) }));\nconst PURE_DatabaseIcon = () => (_jsx(\"div\", { className: \"icon icon--database\", children: _jsx(DatabaseIcon, {}) }));\nexport const PURE_AssociationIcon = () => (_jsx(\"div\", { className: \"icon color--association color--pure-association\", children: \"A\" }));\nexport const getConceptIcon = (type) => {\n switch (type) {\n case ConceptType.PACKAGE:\n return _jsx(PURE_PackageIcon, {});\n case ConceptType.PROFILE:\n return _jsx(PURE_ProfileIcon, {});\n case ConceptType.CLASS:\n return _jsx(PURE_ClassIcon, {});\n case ConceptType.ASSOCIATION:\n return _jsx(PURE_AssociationIcon, {});\n case ConceptType.PROPERTY:\n case ConceptType.QUALIFIED_PROPERTY:\n return _jsx(PURE_PropertyIcon, {});\n case ConceptType.ENUMERATION:\n return _jsx(PURE_EnumerationIcon, {});\n case ConceptType.MEASURE:\n return _jsx(PURE_MeasureIcon, {});\n case ConceptType.UNIT:\n return _jsx(PURE_UnitIcon, {});\n case ConceptType.FUNCTION:\n return _jsx(PURE_FunctionIcon, {});\n case ConceptType.NATIVE_FUNCTION:\n return _jsx(PURE_NativeFunctionIcon, {});\n case ConceptType.DIAGRAM:\n return _jsx(PURE_DiagramIcon, {});\n case ConceptType.DATABASE:\n return _jsx(PURE_DatabaseIcon, {});\n case ConceptType.MAPPING:\n return _jsx(PURE_MappingIcon, {});\n default:\n return _jsx(PURE_UnknownElementTypeIcon, {});\n }\n};\n//# sourceMappingURL=ConceptIconUtils.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { useRef, useState } from 'react';\nimport { observer } from 'mobx-react-lite';\nimport { useApplicationStore } from '@finos/legend-application';\nimport { usePureIDEStore } from '../PureIDEStoreProvider.js';\nimport { Dialog } from '@finos/legend-art';\nimport { ConceptType, } from '../../server/models/ConceptTree.js';\nimport { extractElementNameFromPath } from '@finos/legend-graph';\nconst IDENTIFIER_PATTERN = /^\\w[\\w$]*$/;\nconst PACKAGE_PATH_PATTERN = /^(?:(?:\\w[\\w$]*)::)*\\w[\\w$]*$/;\nexport const RenameConceptPrompt = observer((props) => {\n const { node } = props;\n const ideStore = usePureIDEStore();\n const applicationStore = useApplicationStore();\n const conceptName = node.data.li_attr.pureName ?? node.data.li_attr.pureId;\n const isPackage = node.data.li_attr.pureType === ConceptType.PACKAGE;\n const [value, setValue] = useState(isPackage ? extractElementNameFromPath(conceptName) : conceptName);\n const inputRef = useRef(null);\n // validation\n const isValidValue = Boolean(value.match(isPackage ? PACKAGE_PATH_PATTERN : IDENTIFIER_PATTERN));\n const isSameValue = (isPackage ? extractElementNameFromPath(conceptName) : conceptName) ===\n value;\n const error = !isValidValue ? 'Invalid path' : undefined;\n // actions\n const closeModal = () => ideStore.conceptTreeState.setNodeForRenameConcept(undefined);\n const onValueChange = (event) => setValue(event.target.value);\n const rename = (event) => {\n event.preventDefault();\n if (isSameValue) {\n return;\n }\n ideStore.conceptTreeState\n .renameConcept(node, value)\n .catch(applicationStore.alertUnhandledError)\n .finally(() => closeModal());\n };\n const handleEnter = () => inputRef.current?.focus();\n return (_jsx(Dialog, { open: true, onClose: closeModal, classes: { container: 'command-modal__container' }, slotProps: {\n transition: {\n onEnter: handleEnter,\n },\n paper: {\n classes: { root: 'command-modal__inner-container' },\n },\n }, children: _jsxs(\"div\", { className: \"modal modal--dark command-modal\", children: [_jsx(\"div\", { className: \"modal__title\", children: \"Rename concept\" }), _jsxs(\"div\", { className: \"command-modal__content\", children: [_jsx(\"form\", { className: \"command-modal__content__form\", onSubmit: rename, children: _jsxs(\"div\", { className: \"input-group command-modal__content__input\", children: [_jsx(\"input\", { ref: inputRef, className: \"input input--dark\", onChange: onValueChange, value: value, spellCheck: false }), error && (_jsx(\"div\", { className: \"input-group__error-message\", children: error }))] }) }), _jsx(\"button\", { className: \"command-modal__content__submit-btn btn--dark\", disabled: Boolean(error), onClick: rename, children: \"Rename\" })] })] }) }));\n});\n//# sourceMappingURL=RenameConceptPrompt.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { useRef, useState } from 'react';\nimport { observer } from 'mobx-react-lite';\nimport { useApplicationStore } from '@finos/legend-application';\nimport { usePureIDEStore } from '../PureIDEStoreProvider.js';\nimport { Dialog } from '@finos/legend-art';\nimport { ElementConceptAttribute, } from '../../server/models/ConceptTree.js';\nimport { extractPackagePathFromPath } from '@finos/legend-graph';\nimport { guaranteeType } from '@finos/legend-shared';\nconst PACKAGE_PATH_PATTERN = /^(?:(?:\\w[\\w$]*)::)*\\w[\\w$]*$/;\nexport const MoveElementPrompt = observer((props) => {\n const { node } = props;\n const ideStore = usePureIDEStore();\n const applicationStore = useApplicationStore();\n const packagePath = extractPackagePathFromPath(node.data.li_attr.pureId) ?? '';\n const [value, setValue] = useState(packagePath);\n const inputRef = useRef(null);\n // validation\n const isValidValue = Boolean(value.match(PACKAGE_PATH_PATTERN));\n const isSameValue = packagePath === value;\n const error = !isValidValue ? 'Invalid path' : undefined;\n // actions\n const closeModal = () => ideStore.conceptTreeState.setNodeForMoveElement(undefined);\n const onValueChange = (event) => setValue(event.target.value);\n const rename = (event) => {\n event.preventDefault();\n if (isSameValue) {\n return;\n }\n ideStore.conceptTreeState\n .movePackageableElements([guaranteeType(node.data.li_attr, ElementConceptAttribute)], value)\n .catch(applicationStore.alertUnhandledError)\n .finally(() => closeModal());\n };\n const handleEnter = () => inputRef.current?.focus();\n return (_jsx(Dialog, { open: true, onClose: closeModal, classes: { container: 'command-modal__container' }, slotProps: {\n transition: {\n onEnter: handleEnter,\n },\n paper: {\n classes: { root: 'command-modal__inner-container' },\n },\n }, children: _jsxs(\"div\", { className: \"modal modal--dark command-modal\", children: [_jsx(\"div\", { className: \"modal__title\", children: \"Move element\" }), _jsxs(\"div\", { className: \"command-modal__content\", children: [_jsx(\"form\", { className: \"command-modal__content__form\", onSubmit: rename, children: _jsxs(\"div\", { className: \"input-group command-modal__content__input\", children: [_jsx(\"input\", { ref: inputRef, className: \"input input--dark\", onChange: onValueChange, value: value, spellCheck: false }), error && (_jsx(\"div\", { className: \"input-group__error-message\", children: error }))] }) }), _jsx(\"button\", { className: \"command-modal__content__submit-btn btn--dark\", disabled: Boolean(error), onClick: rename, children: \"Move\" })] })] }) }));\n});\n//# sourceMappingURL=MoveElementPrompt.js.map","import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { forwardRef, useRef, useState } from 'react';\nimport { observer } from 'mobx-react-lite';\nimport { ElementConceptAttribute, PropertyConceptAttribute, ConceptType, } from '../../server/models/ConceptTree.js';\nimport { flowResult } from 'mobx';\nimport { FileCoordinate } from '../../server/models/File.js';\nimport { useApplicationStore } from '@finos/legend-application';\nimport { BlankPanelContent, clsx, ContextMenu, PanelLoadingIndicator, TreeView, ChevronDownIcon, ChevronRightIcon, CircleNotchIcon, RefreshIcon, CompressIcon, MenuContent, MenuContentItem, MenuContentDivider, } from '@finos/legend-art';\nimport { guaranteeType, isNonNullable } from '@finos/legend-shared';\nimport { useDrag } from 'react-dnd';\nimport { usePureIDEStore } from '../PureIDEStoreProvider.js';\nimport { getConceptIcon } from '../shared/ConceptIconUtils.js';\nimport { RenameConceptPrompt } from './RenameConceptPrompt.js';\nimport { extractElementNameFromPath } from '@finos/legend-graph';\nimport { MoveElementPrompt } from './MoveElementPrompt.js';\nconst ConceptExplorerContextMenu = observer(forwardRef(function ConceptExplorerContextMenu(props, ref) {\n const { node, viewConceptSource } = props;\n const nodeAttribute = node.data.li_attr;\n const nodeType = nodeAttribute.pureType;\n const ideStore = usePureIDEStore();\n const applicationStore = useApplicationStore();\n const renameConcept = () => ideStore.conceptTreeState.setNodeForRenameConcept(node);\n const moveElement = () => ideStore.conceptTreeState.setNodeForMoveElement(node);\n const runTests = () => {\n flowResult(ideStore.executeTests(node.data.li_attr.pureId)).catch(applicationStore.alertUnhandledError);\n };\n const findUsages = () => {\n if (nodeAttribute instanceof ElementConceptAttribute ||\n nodeAttribute instanceof PropertyConceptAttribute) {\n ideStore.findUsagesFromCoordinate(new FileCoordinate(nodeAttribute.file, Number.parseInt(nodeAttribute.line, 10), Number.parseInt(nodeAttribute.column, 10)));\n }\n };\n const viewSource = () => viewConceptSource(node);\n const serviceJSON = () => {\n applicationStore.navigationService.navigator.visitAddress(`${ideStore.client.baseUrl}/execute?func=${nodeAttribute.pureId}&mode=${ideStore.client.mode}`);\n };\n const copyPath = () => {\n applicationStore.clipboardService\n .copyTextToClipboard(nodeAttribute.pureId)\n .catch(applicationStore.alertUnhandledError);\n };\n return (_jsxs(MenuContent, { ref: ref, children: [nodeAttribute.pureType !== ConceptType.PROPERTY &&\n nodeAttribute.pureType !== ConceptType.QUALIFIED_PROPERTY && (_jsx(MenuContentItem, { onClick: copyPath, children: \"Copy Path\" })), nodeType === ConceptType.PACKAGE && (_jsxs(_Fragment, { children: [_jsx(MenuContentItem, { onClick: runTests, children: \"Run Tests\" }), _jsx(MenuContentItem, { onClick: () => ideStore.setPCTRunPath(node.data.li_attr.pureId), children: \"Run PCTs\" })] })), nodeType === ConceptType.FUNCTION && (_jsxs(_Fragment, { children: [_jsx(MenuContentItem, { onClick: serviceJSON, children: \"Service (JSON)\" }), _jsx(MenuContentItem, { onClick: () => {\n if (node.data.pct) {\n ideStore.setPCTRunPath(node.data.li_attr.pureId);\n }\n else {\n runTests();\n }\n }, disabled: !node.data.test, children: \"Run Test\" })] })), (nodeAttribute instanceof PropertyConceptAttribute ||\n nodeAttribute instanceof ElementConceptAttribute) && (_jsx(MenuContentItem, { onClick: findUsages, children: \"Find Usages\" })), nodeType !== ConceptType.PACKAGE && (_jsx(MenuContentItem, { onClick: viewSource, children: \"View Source\" })), _jsx(MenuContentDivider, {}), _jsx(MenuContentItem, { onClick: renameConcept, children: \"Rename\" }), nodeAttribute instanceof ElementConceptAttribute && (_jsx(MenuContentItem, { onClick: moveElement, children: \"Move\" }))] }));\n}));\nexport var CONCEPT_TREE_DND_TYPE;\n(function (CONCEPT_TREE_DND_TYPE) {\n CONCEPT_TREE_DND_TYPE[\"UNSUPPORTED\"] = \"UNSUPPORTED\";\n CONCEPT_TREE_DND_TYPE[\"CLASS\"] = \"CLASS\";\n})(CONCEPT_TREE_DND_TYPE || (CONCEPT_TREE_DND_TYPE = {}));\nconst ConceptTreeNodeContainer = (props) => {\n const { node, level, stepPaddingInRem, onNodeSelect, innerProps } = props;\n const [isSelectedFromContextMenu, setIsSelectedFromContextMenu] = useState(false);\n const { onNodeOpen, onNodeExpand, onNodeCompress, viewConceptSource } = innerProps;\n const isAssociationPropertyNode = node.parent &&\n node.data.li_attr instanceof PropertyConceptAttribute &&\n node.data.li_attr.classPath !== node.parent.id;\n const isExpandable = [ConceptType.PACKAGE, ConceptType.CLASS].includes(node.data.li_attr.pureType);\n const nodeLabel = node.data.li_attr.pureType === ConceptType.QUALIFIED_PROPERTY ? (_jsxs(_Fragment, { children: [node.label, _jsx(\"span\", { className: \"explorer__package-tree__node__label__tag\", children: \"(...)\" })] })) : isAssociationPropertyNode ? (_jsxs(_Fragment, { children: [node.label, _jsx(\"span\", { className: \"explorer__package-tree__node__label__tag\", children: extractElementNameFromPath(guaranteeType(node.data.li_attr, PropertyConceptAttribute)\n .classPath) })] })) : node.label.includes('(') ? (_jsxs(_Fragment, { children: [node.label.substring(0, node.label.indexOf('(')), _jsx(\"span\", { className: \"explorer__package-tree__node__label__tag\", children: node.label.substring(node.label.indexOf('(')) })] })) : (node.label);\n const selectNode = (event) => {\n event.stopPropagation();\n event.preventDefault();\n onNodeSelect?.(node);\n };\n const onContextMenuOpen = () => setIsSelectedFromContextMenu(true);\n const onContextMenuClose = () => setIsSelectedFromContextMenu(false);\n const toggleExpansion = () => {\n if (node.isLoading) {\n return;\n }\n if (node.isOpen) {\n onNodeCompress(node);\n }\n else {\n onNodeExpand(node);\n }\n };\n const onDoubleClick = () => {\n if (node.isLoading) {\n return;\n }\n if (isExpandable) {\n toggleExpansion();\n }\n onNodeSelect?.(node);\n onNodeOpen(node);\n };\n const [, dragConnector] = useDrag(() => ({\n type: node.data.li_attr.pureType === 'Class'\n ? CONCEPT_TREE_DND_TYPE.CLASS\n : CONCEPT_TREE_DND_TYPE.UNSUPPORTED,\n item: node.data,\n }), [node]);\n const ref = useRef(null);\n dragConnector(ref);\n return (_jsx(ContextMenu, { content: _jsx(ConceptExplorerContextMenu, { node: node, viewConceptSource: viewConceptSource }), menuProps: { elevation: 7 }, onOpen: onContextMenuOpen, onClose: onContextMenuClose, children: _jsxs(\"div\", { id: node.id, className: clsx('tree-view__node__container explorer__package-tree__node__container', {\n 'explorer__package-tree__node__container--selected-from-context-menu': !node.isSelected && isSelectedFromContextMenu,\n }, {\n 'explorer__package-tree__node__container--selected': node.isSelected,\n }), onClick: selectNode, ref: ref, onDoubleClick: onDoubleClick, style: {\n paddingLeft: `${level * (stepPaddingInRem ?? 1)}rem`,\n display: 'flex',\n }, children: [_jsxs(\"div\", { className: \"tree-view__node__icon explorer__package-tree__node__icon\", children: [node.isLoading && (_jsx(\"div\", { className: \"explorer__package-tree__node__icon__expand explorer__package-tree__node__icon__expand--is-loading\", children: _jsx(CircleNotchIcon, {}) })), !node.isLoading && (_jsx(\"div\", { className: \"explorer__package-tree__node__icon__expand\", onClick: toggleExpansion, children: !isExpandable ? (_jsx(\"div\", {})) : node.isOpen ? (_jsx(ChevronDownIcon, {})) : (_jsx(ChevronRightIcon, {})) })), _jsx(\"div\", { className: clsx('explorer__package-tree__node__icon__type', {\n 'explorer__package-tree__node__icon__type--property-from-association': isAssociationPropertyNode,\n }), children: getConceptIcon(node.data.li_attr.pureType) })] }), _jsx(\"button\", { className: \"tree-view__node__label explorer__package-tree__node__label\", tabIndex: -1, children: nodeLabel })] }) }));\n};\nconst FileExplorerTree = observer(() => {\n const ideStore = usePureIDEStore();\n const applicationStore = useApplicationStore();\n const treeState = ideStore.conceptTreeState;\n const treeData = ideStore.conceptTreeState.getTreeData();\n const onNodeSelect = (node) => treeState.setSelectedNode(node);\n const onNodeOpen = (node) => {\n flowResult(treeState.openNode(node)).catch(applicationStore.alertUnhandledError);\n };\n const onNodeExpand = (node) => {\n flowResult(treeState.expandNode(node)).catch(applicationStore.alertUnhandledError);\n };\n const onNodeCompress = (node) => {\n node.isOpen = false;\n treeState.refreshTree();\n };\n const getChildNodes = (node) => {\n if (node.isLoading || !node.childrenIds) {\n return [];\n }\n return node.childrenIds\n .map((childId) => treeData.nodes.get(childId))\n .filter(isNonNullable);\n };\n const deselectTreeNode = () => treeState.setSelectedNode(undefined);\n const viewConceptSource = (node) => {\n const nodeAttribute = node.data.li_attr;\n if (nodeAttribute instanceof ElementConceptAttribute ||\n nodeAttribute instanceof PropertyConceptAttribute) {\n flowResult(ideStore.directoryTreeState.revealPath(nodeAttribute.file, {\n forceOpenExplorerPanel: true,\n coordinate: new FileCoordinate(nodeAttribute.file, Number.parseInt(nodeAttribute.line, 10), Number.parseInt(nodeAttribute.column, 10)),\n })).catch(applicationStore.alertUnhandledError);\n }\n };\n return (_jsxs(\"div\", { className: \"explorer__content\", onClick: deselectTreeNode, children: [_jsx(TreeView, { components: {\n TreeNodeContainer: ConceptTreeNodeContainer,\n }, treeData: treeData, onNodeSelect: onNodeSelect, getChildNodes: getChildNodes, innerProps: {\n onNodeOpen,\n onNodeExpand,\n onNodeCompress,\n viewConceptSource,\n } }), treeState.nodeForRenameConcept && (_jsx(RenameConceptPrompt, { node: treeState.nodeForRenameConcept })), treeState.nodeForMoveElement && (_jsx(MoveElementPrompt, { node: treeState.nodeForMoveElement }))] }));\n});\nexport const ConceptTreeExplorer = observer(() => {\n const ideStore = usePureIDEStore();\n const applicationStore = useApplicationStore();\n const treeState = ideStore.conceptTreeState;\n const refreshTree = () => {\n flowResult(treeState.refreshTreeData()).catch(applicationStore.alertUnhandledError);\n };\n const collapseTree = () => {\n const treeData = treeState.getTreeData();\n treeData.nodes.forEach((node) => {\n node.isOpen = false;\n });\n treeState.setSelectedNode(undefined);\n treeState.refreshTree();\n };\n return (_jsxs(\"div\", { className: \"panel explorer\", children: [_jsx(\"div\", { className: \"panel__header side-bar__header\", children: _jsx(\"div\", { className: \"panel__header__title\", children: _jsx(\"div\", { className: \"panel__header__title__content side-bar__header__title__content\", children: \"CONCEPTS\" }) }) }), _jsx(\"div\", { className: \"panel__content side-bar__content\", children: _jsxs(\"div\", { className: \"panel explorer\", children: [_jsxs(\"div\", { className: \"panel__header explorer__header\", children: [_jsx(\"div\", { className: \"panel__header__title\" }), _jsxs(\"div\", { className: \"panel__header__actions\", children: [_jsx(\"button\", { className: \"panel__header__action explorer__btn__refresh\", onClick: refreshTree, title: \"Refresh Tree\", children: _jsx(RefreshIcon, {}) }), _jsx(\"button\", { className: \"panel__header__action\", onClick: collapseTree, title: \"Collapse All\", children: _jsx(CompressIcon, {}) })] })] }), _jsxs(\"div\", { className: \"panel__content explorer__content__container\", children: [_jsx(PanelLoadingIndicator, { isLoading: treeState.loadInitialDataState.isInProgress }), treeState.loadInitialDataState.hasSucceeded && (_jsx(FileExplorerTree, {})), !treeState.loadInitialDataState.hasSucceeded &&\n treeState.statusText && (_jsx(\"div\", { className: \"explorer__content__container__message\", children: treeState.statusText })), treeState.loadInitialDataState.hasFailed && (_jsx(BlankPanelContent, { children: \"Failed to build concept tree. Make sure graph compiles\" }))] })] }) })] }));\n});\n//# sourceMappingURL=ConceptTreeExplorer.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { useRef, useState } from 'react';\nimport { observer } from 'mobx-react-lite';\nimport { flowResult } from 'mobx';\nimport { useApplicationStore } from '@finos/legend-application';\nimport { usePureIDEStore } from '../PureIDEStoreProvider.js';\nimport { Dialog } from '@finos/legend-art';\nconst FILE_NAME_PATTERN = /^\\w+(?:\\.\\w+)*$/;\nconst DEFAULT_FILE_NAME = 'untitled.pure';\nexport const CreateNewFilePrompt = observer((props) => {\n const { node } = props;\n const ideStore = usePureIDEStore();\n const applicationStore = useApplicationStore();\n const [value, setValue] = useState(DEFAULT_FILE_NAME);\n const inputRef = useRef(null);\n // validation\n const isValidValue = Boolean(value.match(FILE_NAME_PATTERN));\n const isUnique = !node.childrenIds\n ?.map((id) => ideStore.directoryTreeState.getTreeData().nodes.get(id))\n .filter((n) => n?.data.text === value).length;\n const error = !isValidValue\n ? 'Invalid file name'\n : !isUnique\n ? 'Already existed'\n : undefined;\n // actions\n const closeModal = () => ideStore.directoryTreeState.setNodeForCreateNewFile(undefined);\n const onValueChange = (event) => setValue(event.target.value);\n const create = (event) => {\n event.preventDefault();\n closeModal();\n flowResult(ideStore.createNewFile(`${node.data.li_attr.path}/${value}`)).catch(applicationStore.alertUnhandledError);\n };\n const handleEnter = () => inputRef.current?.focus();\n return (_jsx(Dialog, { open: true, onClose: closeModal, classes: { container: 'command-modal__container' }, slotProps: {\n transition: {\n onEnter: handleEnter,\n },\n paper: {\n classes: { root: 'command-modal__inner-container' },\n },\n }, children: _jsxs(\"div\", { className: \"modal modal--dark command-modal\", children: [_jsx(\"div\", { className: \"modal__title\", children: \"Create a new file\" }), _jsxs(\"div\", { className: \"command-modal__content\", children: [_jsx(\"form\", { className: \"command-modal__content__form\", onSubmit: create, children: _jsxs(\"div\", { className: \"input-group command-modal__content__input\", children: [_jsx(\"input\", { ref: inputRef, className: \"input input--dark\", onChange: onValueChange, value: value, spellCheck: false }), error && (_jsx(\"div\", { className: \"input-group__error-message\", children: error }))] }) }), _jsx(\"button\", { className: \"command-modal__content__submit-btn btn--dark\", disabled: Boolean(error), onClick: create, children: \"Create\" })] })] }) }));\n});\n//# sourceMappingURL=CreateNewFilePrompt.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { useRef, useState } from 'react';\nimport { observer } from 'mobx-react-lite';\nimport { flowResult } from 'mobx';\nimport { useApplicationStore } from '@finos/legend-application';\nimport { usePureIDEStore } from '../PureIDEStoreProvider.js';\nimport { Dialog } from '@finos/legend-art';\nconst DIRECTORY_NAME_PATTERN = /^\\w+$/;\nconst DEFAULT_DIRECTORY_NAME = 'untitled';\nexport const CreateNewDirectoryPrompt = observer((props) => {\n const { node } = props;\n const ideStore = usePureIDEStore();\n const applicationStore = useApplicationStore();\n const [value, setValue] = useState(DEFAULT_DIRECTORY_NAME);\n const inputRef = useRef(null);\n // validation\n const isValidValue = Boolean(value.match(DIRECTORY_NAME_PATTERN));\n const isUnique = !node.childrenIds\n ?.map((id) => ideStore.directoryTreeState.getTreeData().nodes.get(id))\n .filter((n) => n?.data.text === value).length;\n const error = !isValidValue\n ? 'Invalid directory name'\n : !isUnique\n ? 'Already existed'\n : undefined;\n // actions\n const closeModal = () => ideStore.directoryTreeState.setNodeForCreateNewDirectory(undefined);\n const onValueChange = (event) => setValue(event.target.value);\n const create = (event) => {\n event.preventDefault();\n closeModal();\n flowResult(ideStore.createNewDirectory(`${node.data.li_attr.path}/${value}`)).catch(applicationStore.alertUnhandledError);\n };\n const handleEnter = () => inputRef.current?.focus();\n return (_jsx(Dialog, { open: true, onClose: closeModal, classes: { container: 'command-modal__container' }, slotProps: {\n transition: {\n onEnter: handleEnter,\n },\n paper: {\n classes: { root: 'command-modal__inner-container' },\n },\n }, children: _jsxs(\"div\", { className: \"modal modal--dark command-modal\", children: [_jsx(\"div\", { className: \"modal__title\", children: \"Create a new directory\" }), _jsxs(\"div\", { className: \"command-modal__content\", children: [_jsx(\"form\", { className: \"command-modal__content__form\", onSubmit: create, children: _jsxs(\"div\", { className: \"input-group command-modal__content__input\", children: [_jsx(\"input\", { ref: inputRef, className: \"input input--dark\", onChange: onValueChange, value: value, spellCheck: false }), error && (_jsx(\"div\", { className: \"input-group__error-message\", children: error }))] }) }), _jsx(\"button\", { className: \"command-modal__content__submit-btn btn--dark\", disabled: Boolean(error), onClick: create, children: \"Create\" })] })] }) }));\n});\n//# sourceMappingURL=CreateNewDirectoryPrompt.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { useRef, useState } from 'react';\nimport { observer } from 'mobx-react-lite';\nimport { flowResult } from 'mobx';\nimport { useApplicationStore } from '@finos/legend-application';\nimport { usePureIDEStore } from '../PureIDEStoreProvider.js';\nimport { Dialog } from '@finos/legend-art';\nconst FILE_PATH_PATTERN = /^\\/?(?:\\w+\\/)*\\w+(?:\\.\\w+)*$/;\nexport const RenameFilePrompt = observer((props) => {\n const { node } = props;\n const ideStore = usePureIDEStore();\n const applicationStore = useApplicationStore();\n const [value, setValue] = useState(node.data.li_attr.path);\n const inputRef = useRef(null);\n // validation\n const isValidValue = Boolean(value.match(FILE_PATH_PATTERN));\n const isSameValue = node.data.li_attr.path === value;\n const error = !isValidValue ? 'Invalid path' : undefined;\n // actions\n const closeModal = () => ideStore.directoryTreeState.setNodeForRenameFile(undefined);\n const onValueChange = (event) => setValue(event.target.value);\n const rename = (event) => {\n event.preventDefault();\n if (isSameValue) {\n return;\n }\n closeModal();\n flowResult(ideStore.renameFile(node.data.li_attr.path, value)).catch(applicationStore.alertUnhandledError);\n };\n const handleEnter = () => inputRef.current?.focus();\n return (_jsx(Dialog, { open: true, onClose: closeModal, classes: { container: 'command-modal__container' }, slotProps: {\n transition: {\n onEnter: handleEnter,\n },\n paper: {\n classes: { root: 'command-modal__inner-container' },\n },\n }, children: _jsxs(\"div\", { className: \"modal modal--dark command-modal\", children: [_jsx(\"div\", { className: \"modal__title\", children: \"Rename file\" }), _jsxs(\"div\", { className: \"command-modal__content\", children: [_jsx(\"form\", { className: \"command-modal__content__form\", onSubmit: rename, children: _jsxs(\"div\", { className: \"input-group command-modal__content__input\", children: [_jsx(\"input\", { ref: inputRef, className: \"input input--dark\", onChange: onValueChange, value: value, spellCheck: false }), error && (_jsx(\"div\", { className: \"input-group__error-message\", children: error }))] }) }), _jsx(\"button\", { className: \"command-modal__content__submit-btn btn--dark\", disabled: Boolean(error), onClick: rename, children: \"Rename\" })] })] }) }));\n});\n//# sourceMappingURL=RenameFilePrompt.js.map","import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { forwardRef, useState } from 'react';\nimport { observer } from 'mobx-react-lite';\nimport { flowResult } from 'mobx';\nimport { FileEditorState } from '../../stores/FileEditorState.js';\nimport { CreateNewFilePrompt } from './CreateNewFilePrompt.js';\nimport { CreateNewDirectoryPrompt } from './CreateNewDirectoryPrompt.js';\nimport { useApplicationStore } from '@finos/legend-application';\nimport { clsx, BlankPanelContent, ContextMenu, PanelLoadingIndicator, TreeView, ChevronDownIcon, ChevronRightIcon, CircleNotchIcon, RefreshIcon, CrosshairsIcon, CompressIcon, FileAltIcon, FolderIcon, FolderOpenIcon, WrenchIcon, MenuContent, MenuContentItem, MenuContentDivider, } from '@finos/legend-art';\nimport { isNonNullable } from '@finos/legend-shared';\nimport { DirectoryNode, } from '../../server/models/DirectoryTree.js';\nimport { usePureIDEStore } from '../PureIDEStoreProvider.js';\nimport { RenameFilePrompt } from './RenameFilePrompt.js';\nconst FileExplorerContextMenu = observer(forwardRef(function FileExplorerContextMenu(props, ref) {\n const { node } = props;\n const applicationStore = useApplicationStore();\n const ideStore = usePureIDEStore();\n const isDir = node.data.isFolderNode;\n const hasChildContent = Boolean(node.data.children);\n const createNewFile = () => ideStore.directoryTreeState.setNodeForCreateNewFile(node);\n const createNewDirectory = () => ideStore.directoryTreeState.setNodeForCreateNewDirectory(node);\n const deleteFileOrDirectory = () => {\n flowResult(ideStore.deleteDirectoryOrFile(node.data.li_attr.path, isDir, hasChildContent)).catch(applicationStore.alertUnhandledError);\n };\n const renameFile = () => ideStore.directoryTreeState.setNodeForRenameFile(node);\n const copyPath = () => {\n applicationStore.clipboardService\n .copyTextToClipboard(node.data.li_attr.path)\n .catch(applicationStore.alertUnhandledError);\n };\n return (_jsxs(MenuContent, { ref: ref, children: [_jsx(MenuContentItem, { onClick: copyPath, children: \"Copy Path\" }), !node.data.li_attr.RO && (_jsxs(_Fragment, { children: [_jsx(MenuContentDivider, {}), isDir && (_jsx(MenuContentItem, { onClick: createNewFile, children: \"New File\" })), isDir && (_jsx(MenuContentItem, { onClick: createNewDirectory, children: \"New Directory\" })), !isDir && (_jsx(MenuContentItem, { onClick: renameFile, children: \"Rename\" })), _jsx(MenuContentItem, { disabled: Boolean(node.data instanceof DirectoryNode && node.data.children), onClick: deleteFileOrDirectory, children: \"Delete\" })] }))] }));\n}));\nconst FileTreeNodeContainer = (props) => {\n const { node, level, stepPaddingInRem, onNodeSelect, innerProps } = props;\n const [isSelectedFromContextMenu, setIsSelectedFromContextMenu] = useState(false);\n const { onNodeOpen, onNodeExpand, onNodeCompress } = innerProps;\n const isPlatformDirectory = node.data instanceof DirectoryNode &&\n node.data.isRepoNode &&\n node.data.li_attr.path === '/platform';\n const isReadOnly = node.data.li_attr.RO;\n const isDirectory = node.data.isFolderNode;\n const isChildlessDirectory = node.data instanceof DirectoryNode && !node.data.children;\n const nodeIcon = isPlatformDirectory ||\n (node.data.isRepoNode &&\n node.data.li_attr.path.startsWith('/platform_')) ? (_jsx(WrenchIcon, { className: \"explorer__icon--readonly\" })) : isDirectory ? (isChildlessDirectory ? (_jsx(FolderIcon, { className: clsx('explorer__icon--folder', {\n 'explorer__icon--readonly': isReadOnly,\n }) })) : node.isOpen ? (_jsx(FolderOpenIcon, { className: clsx('explorer__icon--folder', {\n 'explorer__icon--readonly': isReadOnly,\n }) })) : (_jsx(FolderIcon, { className: clsx('explorer__icon--folder', {\n 'explorer__icon--readonly': isReadOnly,\n }) }))) : (_jsx(FileAltIcon, { className: clsx('explorer__icon--file', {\n 'explorer__icon--readonly': isReadOnly,\n }) }));\n const selectNode = (event) => {\n event.stopPropagation();\n event.preventDefault();\n onNodeSelect?.(node);\n };\n const onContextMenuOpen = () => setIsSelectedFromContextMenu(true);\n const onContextMenuClose = () => setIsSelectedFromContextMenu(false);\n const toggleExpansion = () => {\n if (isChildlessDirectory) {\n return;\n }\n if (node.isLoading) {\n return;\n }\n if (node.isOpen) {\n onNodeCompress(node);\n }\n else {\n onNodeExpand(node);\n }\n };\n const onDoubleClick = () => {\n if (node.isLoading) {\n return;\n }\n if (isDirectory) {\n toggleExpansion();\n }\n else {\n onNodeOpen(node);\n }\n };\n return (_jsx(ContextMenu, { content: _jsx(FileExplorerContextMenu, { node: node }), menuProps: { elevation: 7 }, onOpen: onContextMenuOpen, onClose: onContextMenuClose, children: _jsxs(\"div\", { id: node.id, className: clsx('tree-view__node__container explorer__package-tree__node__container', {\n 'explorer__package-tree__node__container--selected-from-context-menu': !node.isSelected && isSelectedFromContextMenu,\n }, {\n 'explorer__package-tree__node__container--selected': node.isSelected,\n }), onClick: selectNode, onDoubleClick: onDoubleClick, style: {\n paddingLeft: `${level * (stepPaddingInRem ?? 1)}rem`,\n display: 'flex',\n }, children: [_jsxs(\"div\", { className: \"tree-view__node__icon explorer__package-tree__node__icon\", children: [node.isLoading && (_jsx(\"div\", { className: \"explorer__package-tree__node__icon__expand explorer__package-tree__node__icon__expand--is-loading\", children: _jsx(CircleNotchIcon, {}) })), !node.isLoading && (_jsx(\"div\", { className: \"explorer__package-tree__node__icon__expand\", onClick: toggleExpansion, children: !isDirectory || isChildlessDirectory ? (_jsx(\"div\", {})) : node.isOpen ? (_jsx(ChevronDownIcon, {})) : (_jsx(ChevronRightIcon, {})) })), _jsx(\"div\", { className: \"explorer__package-tree__node__icon__type\", children: nodeIcon })] }), _jsx(\"button\", { className: \"tree-view__node__label explorer__package-tree__node__label\", tabIndex: -1, children: isPlatformDirectory ? 'platform' : node.label })] }) }));\n};\nconst FileExplorerTree = observer(() => {\n const ideStore = usePureIDEStore();\n const applicationStore = useApplicationStore();\n const treeState = ideStore.directoryTreeState;\n const treeData = ideStore.directoryTreeState.getTreeData();\n const onNodeSelect = (node) => treeState.setSelectedNode(node);\n const onNodeOpen = (node) => {\n flowResult(treeState.openNode(node)).catch(applicationStore.alertUnhandledError);\n };\n const onNodeExpand = (node) => {\n flowResult(treeState.expandNode(node)).catch(applicationStore.alertUnhandledError);\n };\n const onNodeCompress = (node) => {\n node.isOpen = false;\n treeState.refreshTree();\n };\n const getChildNodes = (node) => {\n if (node.isLoading || !node.childrenIds) {\n return [];\n }\n return node.childrenIds\n .map((childId) => treeData.nodes.get(childId))\n .filter(isNonNullable);\n };\n const deselectTreeNode = () => treeState.setSelectedNode(undefined);\n return (_jsxs(\"div\", { className: \"explorer__content\", onClick: deselectTreeNode, children: [_jsx(TreeView, { components: {\n TreeNodeContainer: FileTreeNodeContainer,\n }, treeData: treeData, onNodeSelect: onNodeSelect, getChildNodes: getChildNodes, innerProps: {\n onNodeOpen,\n onNodeExpand,\n onNodeCompress,\n } }), treeState.nodeForCreateNewFile && (_jsx(CreateNewFilePrompt, { node: treeState.nodeForCreateNewFile })), treeState.nodeForCreateNewDirectory && (_jsx(CreateNewDirectoryPrompt, { node: treeState.nodeForCreateNewDirectory })), treeState.nodeForRenameFile && (_jsx(RenameFilePrompt, { node: treeState.nodeForRenameFile }))] }));\n});\nexport const DirectoryTreeExplorer = observer(() => {\n const ideStore = usePureIDEStore();\n const applicationStore = useApplicationStore();\n const treeState = ideStore.directoryTreeState;\n const refreshTree = () => {\n flowResult(treeState.refreshTreeData()).catch(applicationStore.alertUnhandledError);\n };\n const focus = () => {\n const currentTab = ideStore.tabManagerState.currentTab;\n if (currentTab instanceof FileEditorState) {\n flowResult(treeState.revealPath(currentTab.filePath)).catch(applicationStore.alertUnhandledError);\n }\n };\n const collapseTree = () => {\n const treeData = treeState.getTreeData();\n treeData.nodes.forEach((node) => {\n node.isOpen = false;\n });\n treeState.setSelectedNode(undefined);\n treeState.refreshTree();\n };\n return (_jsxs(\"div\", { className: \"panel explorer\", children: [_jsx(\"div\", { className: \"panel__header side-bar__header\", children: _jsx(\"div\", { className: \"panel__header__title\", children: _jsx(\"div\", { className: \"panel__header__title__content side-bar__header__title__content\", children: \"FILES\" }) }) }), _jsx(\"div\", { className: \"panel__content side-bar__content\", children: _jsxs(\"div\", { className: \"panel explorer\", children: [_jsxs(\"div\", { className: \"panel__header explorer__header\", children: [_jsx(\"div\", { className: \"panel__header__title\" }), _jsxs(\"div\", { className: \"panel__header__actions\", children: [_jsx(\"button\", { className: \"panel__header__action explorer__btn__refresh\", onClick: refreshTree, title: \"Refresh Tree\", children: _jsx(RefreshIcon, {}) }), _jsx(\"button\", { className: \"panel__header__action\", onClick: focus, title: \"Focus\", children: _jsx(CrosshairsIcon, {}) }), _jsx(\"button\", { className: \"panel__header__action\", onClick: collapseTree, title: \"Collapse All\", children: _jsx(CompressIcon, {}) })] })] }), _jsxs(\"div\", { className: \"panel__content explorer__content__container\", children: [_jsx(PanelLoadingIndicator, { isLoading: treeState.loadInitialDataState.isInProgress }), treeState.loadInitialDataState.hasSucceeded && (_jsx(FileExplorerTree, {})), treeState.loadInitialDataState.hasFailed && (_jsx(BlankPanelContent, { children: \"Failed to build directory tree\" }))] })] }) })] }));\n});\n//# sourceMappingURL=DirectoryTreeExplorer.js.map","import { jsx as _jsx } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { observer } from 'mobx-react-lite';\nimport { ACTIVITY_MODE } from '../../stores/PureIDEConfig.js';\nimport { ConceptTreeExplorer } from './ConceptTreeExplorer.js';\nimport { DirectoryTreeExplorer } from './DirectoryTreeExplorer.js';\nimport { clsx } from '@finos/legend-art';\nimport { usePureIDEStore } from '../PureIDEStoreProvider.js';\n/**\n * Wrapper component around different implementations of sidebar, such as to view domain, to manage SDLC, etc.\n */\nexport const SideBar = observer(() => {\n const ideStore = usePureIDEStore();\n const renderSideBar = () => {\n switch (ideStore.activeActivity) {\n case ACTIVITY_MODE.CONCEPT_EXPLORER:\n return _jsx(ConceptTreeExplorer, {});\n case ACTIVITY_MODE.FILE_EXPLORER:\n return _jsx(DirectoryTreeExplorer, {});\n default:\n return null;\n }\n };\n return (_jsx(\"div\", { className: \"side-bar\", children: _jsx(\"div\", { className: clsx('side-bar__view', 'side-bar__view--active'), children: renderSideBar() }, ideStore.activeActivity) }));\n});\n//# sourceMappingURL=SideBar.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { clsx } from 'clsx';\nexport const LegendLogo = (props) => {\n const { className } = props;\n return (_jsx(\"div\", { className: clsx('logo', className), children: _jsxs(\"svg\", { stroke: \"currentColor\", fill: \"currentColor\", strokeWidth: \"0\", width: \"1em\", height: \"1em\", viewBox: \"0 0 215 215\", xmlns: \"https://www.w3.org/2000/svg\", children: [_jsx(\"g\", { transform: \"matrix(1.0246,0,0,0.999998,1.03751,2.43115)\", children: _jsx(\"path\", { d: \"M141.9,86.5L141.9,68.1C141.9,66.5 140.7,65.2 139.1,65.2L66.5,65.2C64.9,65.2 63.7,66.5 63.7,68.1L63.7,86.5C63.7,88.1 64.9,89.4 66.5,89.4L139.1,89.4C140.7,89.4 141.9,88.1 141.9,86.5Z\" }) }), _jsx(\"g\", { transform: \"matrix(1.0246,0,0,0.999998,1.03751,2.43115)\", children: _jsx(\"path\", { d: \"M118.4,116.9L118.4,98.5C118.4,96.9 117.5,95.6 116.4,95.6L65.7,95.6C64.6,95.6 63.7,96.9 63.7,98.5L63.7,116.9C63.7,118.5 64.6,119.8 65.7,119.8L116.5,119.8C117.6,119.8 118.4,118.6 118.4,116.9Z\" }) }), _jsx(\"g\", { transform: \"matrix(1.0246,0,0,0.999998,1.03751,2.43115)\", children: _jsx(\"path\", { d: \"M141.9,147.3L141.9,129C141.9,127.4 140.7,126.1 139.1,126.1L66.5,126.1C64.9,126.1 63.7,127.4 63.7,129L63.7,147.4C63.7,149 64.9,150.3 66.5,150.3L139.1,150.3C140.7,150.3 141.9,149 141.9,147.3Z\" }) }), _jsx(\"g\", { transform: \"matrix(1.0246,0,0,0.999998,1.03751,2.43115)\", children: _jsx(\"path\", { d: \"M205,170.7L152.7,139.1C150,137.4 147.7,138.7 147.7,141.9L147.7,157.9L55.8,157.9L55.8,59.4L67.2,59.4C70.4,59.4 71.7,57.2 70,54.4L38.4,2.1C36.7,-0.6 34.1,-0.6 32.4,2.1L0.7,54.4C-1,57.1 0.3,59.4 3.5,59.4L15.6,59.4L15.6,185.5C15.6,188.5 18,190.9 21,190.9L147.7,190.9L147.7,205.7C147.7,208.9 149.9,210.1 152.7,208.5L205,176.9C207.7,175.1 207.7,172.4 205,170.7Z\" }) })] }) }));\n};\n//# sourceMappingURL=LegendLogo.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { observer } from 'mobx-react-lite';\nimport { ACTIVITY_MODE } from '../stores/PureIDEConfig.js';\nimport { clsx, FileAltIcon, LegendLogo, ListIcon } from '@finos/legend-art';\nimport { usePureIDEStore } from './PureIDEStoreProvider.js';\nexport const ActivityBar = observer(() => {\n const ideStore = usePureIDEStore();\n const changeActivity = (activity) => () => ideStore.setActiveActivity(activity);\n const activities = [\n {\n mode: ACTIVITY_MODE.CONCEPT_EXPLORER,\n title: 'Concept Explorer',\n icon: _jsx(ListIcon, {}),\n },\n {\n mode: ACTIVITY_MODE.FILE_EXPLORER,\n title: 'File Explorer',\n icon: _jsx(FileAltIcon, {}),\n },\n ].filter((activity) => Boolean(activity));\n return (_jsxs(\"div\", { className: \"activity-bar\", children: [_jsx(\"div\", { className: \"activity-bar__logo\", children: _jsx(LegendLogo, {}) }), _jsx(\"div\", { className: \"activity-bar__items\", children: activities.map((activity) => (_jsx(\"button\", { className: clsx('activity-bar__item', {\n 'activity-bar__item--active': ideStore.sideBarDisplayState.isOpen &&\n ideStore.activeActivity === activity.mode,\n }), onClick: changeActivity(activity.mode), tabIndex: -1, title: activity.title, children: activity.icon }, activity.mode))) })] }));\n});\n//# sourceMappingURL=ActivityBar.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { observer } from 'mobx-react-lite';\nimport { flowResult } from 'mobx';\nimport { useApplicationStore } from '@finos/legend-application';\nimport { clsx, HammerIcon, TerminalIcon } from '@finos/legend-art';\nimport { usePureIDEStore } from './PureIDEStoreProvider.js';\nimport { FileEditorState } from '../stores/FileEditorState.js';\nconst FileEditorStatusBar = observer((props) => {\n const { fileEditorState } = props;\n const currentCursorInfo = fileEditorState.textEditorState.cursorObserver;\n const selectionLength = currentCursorInfo?.selection\n ? fileEditorState.textEditorState.model.getValueInRange(currentCursorInfo.selection).length\n : 0;\n // actions\n const goToLine = () => fileEditorState.setShowGoToLinePrompt(true);\n return (_jsx(\"div\", { className: \"file-editor__status-bar\", children: currentCursorInfo?.position && (_jsx(\"button\", { className: \"editor__status-bar__action file-editor__status-bar__cursor-info\", onClick: goToLine, tabIndex: -1, title: \"Go to Line/Column\", children: `Ln ${currentCursorInfo.position.lineNumber}, Col ${currentCursorInfo.position.column} ${selectionLength ? ` (${selectionLength} selected)` : ''}` })) }));\n});\nexport const StatusBar = observer(() => {\n const ideStore = usePureIDEStore();\n const applicationStore = useApplicationStore();\n // actions\n const togglePanelGroup = () => ideStore.panelGroupDisplayState.toggle();\n const executeGo = () => {\n flowResult(ideStore.executeGo()).catch(applicationStore.alertUnhandledError);\n };\n return (_jsxs(\"div\", { className: \"editor__status-bar\", children: [_jsx(\"div\", { className: \"editor__status-bar__left\", children: _jsx(\"div\", { className: \"editor__status-bar__workspace\" }) }), _jsxs(\"div\", { className: \"editor__status-bar__right\", children: [ideStore.tabManagerState.currentTab instanceof FileEditorState && (_jsx(FileEditorStatusBar, { fileEditorState: ideStore.tabManagerState.currentTab })), _jsx(\"button\", { className: clsx('editor__status-bar__action editor__status-bar__compile-btn', {\n 'editor__status-bar__compile-btn--wiggling': ideStore.executionState.isInProgress,\n }), disabled: ideStore.initState.isInInitialState ||\n ideStore.executionState.isInProgress, onClick: executeGo, tabIndex: -1, title: \"Execute (F9)\", children: _jsx(HammerIcon, {}) }), _jsx(\"button\", { className: clsx('editor__status-bar__action editor__status-bar__action__toggler', {\n 'editor__status-bar__action__toggler--active': Boolean(ideStore.panelGroupDisplayState.isOpen),\n }), onClick: togglePanelGroup, tabIndex: -1, title: \"Toggle panel\", children: _jsx(TerminalIcon, {}) })] })] }));\n});\n//# sourceMappingURL=StatusBar.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { useEffect } from 'react';\nexport const useCommands = (registrar) => {\n useEffect(() => {\n registrar.registerCommands();\n return () => registrar.deregisterCommands();\n }, [registrar]);\n};\n//# sourceMappingURL=useCommands.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { useEffect, useRef, useState } from 'react';\nimport { observer } from 'mobx-react-lite';\nimport { editor as monacoEditorAPI } from 'monaco-editor';\nimport { useApplicationStore, useCommands } from '@finos/legend-application';\nimport { clsx, Dialog, WordWrapIcon } from '@finos/legend-art';\nimport { usePureIDEStore } from '../PureIDEStoreProvider.js';\nimport { at, returnUndefOnError } from '@finos/legend-shared';\nimport { CODE_EDITOR_THEME, getBaseCodeEditorOptions, moveCursorToPosition, } from '@finos/legend-code-editor';\nconst POSITION_PATTERN = /[0-9]+(?::[0-9]+)?/;\nconst getPositionFromGoToLinePromptInputValue = (val) => {\n const parts = val.split(':');\n if (parts.length < 1 || parts.length > 2) {\n return [1, undefined];\n }\n return [\n returnUndefOnError(() => parseInt(at(parts, 0))) ?? 1,\n returnUndefOnError(() => parseInt(at(parts, -1))),\n ];\n};\nexport const GoToLinePrompt = observer((props) => {\n const { fileEditorState } = props;\n const [value, setValue] = useState('');\n const inputRef = useRef(null);\n // validation\n const isValidValue = Boolean(value.match(POSITION_PATTERN));\n const currentEditorCursorPosition = fileEditorState.textEditorState.editor?.getPosition();\n const [currentLine, currentColumn] = getPositionFromGoToLinePromptInputValue(value);\n const isValidLineNumber = 1 <= currentLine &&\n currentLine <= fileEditorState.textEditorState.model.getLineCount();\n const error = !isValidValue\n ? 'Invalid value (format [line:column] - e.g. 123:45)'\n : !isValidLineNumber\n ? `Invalid line number`\n : undefined;\n // actions\n const closeModal = () => fileEditorState.setShowGoToLinePrompt(false);\n const onValueChange = (event) => setValue(event.target.value);\n const create = (event) => {\n event.preventDefault();\n closeModal();\n fileEditorState.textEditorState.setForcedCursorPosition({\n lineNumber: currentLine,\n column: currentColumn ?? 1,\n });\n };\n const handleEnter = () => inputRef.current?.focus();\n return (_jsx(Dialog, { open: true, onClose: closeModal, classes: { container: 'command-modal__container' }, slotProps: {\n transition: { onEnter: handleEnter },\n paper: { classes: { root: 'command-modal__inner-container' } },\n }, children: _jsxs(\"div\", { className: \"modal modal--dark command-modal\", children: [_jsx(\"div\", { className: \"modal__title\", children: \"Go to...\" }), _jsxs(\"div\", { className: \"command-modal__content\", children: [_jsx(\"form\", { className: \"command-modal__content__form\", onSubmit: create, children: _jsxs(\"div\", { className: \"input-group command-modal__content__input\", children: [_jsx(\"input\", { ref: inputRef, className: \"input input--dark\", onChange: onValueChange, placeholder: currentEditorCursorPosition\n ? `Current Line: ${currentEditorCursorPosition.lineNumber}, Col: ${currentEditorCursorPosition.column}. Type a line between 1 and ${fileEditorState.textEditorState.model.getLineCount()} to navigate to`\n : undefined, value: value, spellCheck: false }), value !== '' && error && (_jsx(\"div\", { className: \"input-group__error-message\", children: error }))] }) }), _jsx(\"button\", { className: \"command-modal__content__submit-btn btn--dark\", disabled: value === '' || Boolean(error), onClick: create, children: \"Go\" })] })] }) }));\n});\nexport const GenericFileEditor = observer((props) => {\n const { editorState } = props;\n const ideStore = usePureIDEStore();\n const applicationStore = useApplicationStore();\n const textInputRef = useRef(null);\n const [editor, setEditor] = useState();\n useEffect(() => {\n if (!editor && textInputRef.current) {\n const element = textInputRef.current;\n const newEditor = monacoEditorAPI.create(element, {\n ...getBaseCodeEditorOptions(),\n theme: CODE_EDITOR_THEME.DEFAULT_DARK,\n wordWrap: editorState.textEditorState.wrapText ? 'on' : 'off',\n readOnly: editorState.file.RO,\n });\n newEditor.onDidChangeModelContent(() => {\n const currentVal = newEditor.getValue();\n if (currentVal !== editorState.file.content) {\n // the assertion above is to ensure we don't accidentally clear error on initialization of the editor\n editorState.clearError(); // clear error on content change/typing\n }\n editorState.file.setContent(currentVal);\n });\n // manual trigger to support cursor observability\n newEditor.onDidChangeCursorPosition(() => {\n editorState.textEditorState.notifyCursorObserver();\n });\n newEditor.onDidChangeCursorSelection(() => {\n editorState.textEditorState.notifyCursorObserver();\n });\n // Restore the editor model and view state\n newEditor.setModel(editorState.textEditorState.model);\n if (editorState.textEditorState.viewState) {\n newEditor.restoreViewState(editorState.textEditorState.viewState);\n }\n newEditor.focus(); // focus on the editor initially\n editorState.textEditorState.setEditor(newEditor);\n setEditor(newEditor);\n }\n }, [ideStore, applicationStore, editorState, editor]);\n useCommands(editorState);\n useEffect(() => {\n if (editor) {\n if (editorState.textEditorState.forcedCursorPosition) {\n moveCursorToPosition(editor, editorState.textEditorState.forcedCursorPosition);\n editorState.textEditorState.setForcedCursorPosition(undefined);\n }\n }\n }, [editor, editorState, editorState.textEditorState.forcedCursorPosition]);\n // clean up\n useEffect(() => () => {\n if (editor) {\n // persist editor view state (cursor, scroll, etc.) to restore on re-open\n editorState.textEditorState.setViewState(editor.saveViewState() ?? undefined);\n // NOTE: dispose the editor to prevent potential memory-leak\n editor.dispose();\n }\n }, [editorState, editor]);\n return (_jsxs(\"div\", { className: \"panel editor-group file-editor\", children: [_jsx(\"div\", { className: \"panel__header file-editor__header\", children: _jsxs(\"div\", { className: \"file-editor__header__actions\", children: [_jsx(\"button\", { className: clsx('file-editor__header__action', {\n 'file-editor__header__action--active': editorState.textEditorState.wrapText,\n }), tabIndex: -1, onClick: () => editorState.textEditorState.setWrapText(!editorState.textEditorState.wrapText), title: \"Toggle Text Wrap\", children: _jsx(WordWrapIcon, { className: \"file-editor__icon--text-wrap\" }) }), editorState.showGoToLinePrompt && (_jsx(GoToLinePrompt, { fileEditorState: editorState }))] }) }), _jsx(\"div\", { className: \"panel__content file-editor__content\", children: _jsx(\"div\", { className: \"code-editor__container\", children: _jsx(\"div\", { className: \"code-editor__body\", ref: textInputRef }) }) })] }));\n});\n//# sourceMappingURL=GenericFileEditor.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { PARSER_SECTION_MARKER, PURE_PARSER } from '@finos/legend-graph';\nimport { at, hasWhiteSpace, } from '@finos/legend-shared';\nimport { languages as monacoLanguagesAPI, } from 'monaco-editor';\nexport const getParserKeywordSuggestions = (position, model, suggestions) => {\n const results = [];\n const currentWord = model.getWordUntilPosition(position);\n // suggestions for parser keyword\n const lineTextIncludingWordRange = {\n startLineNumber: position.lineNumber,\n startColumn: 1,\n endLineNumber: position.lineNumber,\n endColumn: currentWord.endColumn,\n };\n const lineTextIncludingWord = model.getValueInRange(lineTextIncludingWordRange);\n // NOTE: make sure parser keyword suggestions only show up when the current word is the\n // the first word of the line since parser section header must not be preceded by anything\n if (!hasWhiteSpace(lineTextIncludingWord.trim())) {\n suggestions.forEach((suggestion) => {\n results.push({\n label: {\n label: `${PARSER_SECTION_MARKER}${suggestion.text}`,\n description: suggestion.description,\n },\n kind: monacoLanguagesAPI.CompletionItemKind.Keyword,\n insertText: `${PARSER_SECTION_MARKER}${suggestion.insertText}\\n`,\n range: lineTextIncludingWordRange,\n documentation: suggestion.documentation\n ? suggestion.documentation.markdownText\n ? {\n value: suggestion.documentation.markdownText.value,\n }\n : suggestion.documentation.text\n : undefined,\n });\n });\n }\n return results;\n};\nexport const getSectionParserNameFromLineText = (lineText) => {\n if (lineText.startsWith(PARSER_SECTION_MARKER)) {\n return lineText.substring(PARSER_SECTION_MARKER.length).split(' ')[0];\n }\n // NOTE: since leading whitespace to parser name is considered invalid, we will return `undefined`\n return undefined;\n};\nexport const getParserElementSnippetSuggestions = (position, model, suggestionsGetter) => {\n const results = [];\n const currentWord = model.getWordUntilPosition(position);\n // suggestions for parser element snippets\n const textUntilPosition = model.getValueInRange({\n startLineNumber: 1,\n startColumn: 1,\n endLineNumber: position.lineNumber,\n endColumn: position.column,\n });\n const allParserSectionHeaders = \n // NOTE: since `###Pure` is implicitly considered as the first section, we prepend it to the text\n `${PARSER_SECTION_MARKER}${PURE_PARSER.PURE}\\n${textUntilPosition}`\n .split('\\n')\n .filter((line) => line.startsWith(PARSER_SECTION_MARKER));\n const currentParserName = getSectionParserNameFromLineText(allParserSectionHeaders[allParserSectionHeaders.length - 1] ?? '');\n if (currentParserName) {\n suggestionsGetter(currentParserName).forEach((snippetSuggestion) => {\n results.push({\n label: {\n label: snippetSuggestion.text,\n description: snippetSuggestion.description,\n },\n kind: monacoLanguagesAPI.CompletionItemKind.Snippet,\n insertTextRules: monacoLanguagesAPI.CompletionItemInsertTextRule.InsertAsSnippet,\n insertText: `${snippetSuggestion.insertText}\\n`,\n range: {\n startLineNumber: position.lineNumber,\n startColumn: currentWord.startColumn,\n endLineNumber: position.lineNumber,\n endColumn: currentWord.endColumn,\n },\n documentation: snippetSuggestion.documentation\n ? snippetSuggestion.documentation.markdownText\n ? {\n value: snippetSuggestion.documentation.markdownText.value,\n }\n : snippetSuggestion.documentation.text\n : undefined,\n });\n });\n }\n return results;\n};\nexport const getInlineSnippetSuggestions = (position, model, extraSnippetSuggestions = []) => {\n const currentWord = model.getWordUntilPosition(position);\n return [\n {\n text: 'let',\n description: 'new variable',\n insertText: `let \\${1:} = \\${2:};`,\n },\n {\n text: 'let',\n description: 'new collection',\n insertText: `let \\${1:} = [\\${2:}];`,\n },\n {\n text: 'cast',\n description: 'type casting',\n insertText: `cast(@\\${1:model::SomeClass})`,\n },\n // conditionals\n {\n text: 'if',\n description: '(conditional)',\n insertText: `if(\\${1:'true'}, | \\${2:/* if true do this */}, | \\${3:/* if false do this */})`,\n },\n {\n text: 'case',\n description: '(conditional)',\n insertText: `case(\\${1:}, \\${2:'true'}, \\${3:'false'})`,\n },\n {\n text: 'match',\n description: '(conditional)',\n insertText: `match([x:\\${1:String[1]}, \\${2:''}])`,\n },\n // collection\n {\n text: 'map',\n description: '(collection)',\n insertText: `map(x|\\${1:})`,\n },\n {\n text: 'filter',\n description: '(collection)',\n insertText: `filter(x|\\${1:})`,\n },\n {\n text: 'fold',\n description: '(collection)',\n insertText: `fold({a, b| \\${1:$a + $b}}, \\${2:0})`,\n },\n {\n text: 'filter',\n description: '(collection)',\n insertText: `filter(x|\\${1:})`,\n },\n {\n text: 'sort',\n description: '(collection)',\n insertText: `sort()`,\n },\n {\n text: 'in',\n description: '(collection)',\n insertText: `in()`,\n },\n {\n text: 'slice',\n description: '(collection)',\n insertText: `slice(\\${1:1},$\\{2:2})`,\n },\n {\n text: 'removeDuplicates',\n description: '(collection)',\n insertText: `removeDuplicates()`,\n },\n {\n text: 'toOne',\n description: '(collection)',\n insertText: `toOne(\\${1:})`,\n },\n {\n text: 'toOneMany',\n description: '(collection)',\n insertText: `toOneMany(\\${1:})`,\n },\n {\n text: 'isEmpty',\n description: '(collection)',\n insertText: `isEmpty()`,\n },\n // string\n {\n text: 'endsWith',\n description: '(string)',\n insertText: `endsWith()`,\n },\n {\n text: 'startsWith',\n description: '(string)',\n insertText: `startsWith()`,\n },\n ...extraSnippetSuggestions,\n ].map((snippetSuggestion) => ({\n label: {\n label: snippetSuggestion.text,\n description: snippetSuggestion.description,\n },\n kind: monacoLanguagesAPI.CompletionItemKind.Snippet,\n insertTextRules: monacoLanguagesAPI.CompletionItemInsertTextRule.InsertAsSnippet,\n insertText: snippetSuggestion.insertText,\n range: {\n startLineNumber: position.lineNumber,\n startColumn: currentWord.startColumn,\n endLineNumber: position.lineNumber,\n endColumn: currentWord.endColumn,\n },\n documentation: snippetSuggestion.documentation\n ? snippetSuggestion.documentation.markdownText\n ? {\n value: snippetSuggestion.documentation.markdownText.value,\n }\n : snippetSuggestion.documentation.text\n : undefined,\n }));\n};\nexport const isTokenOneOf = (token, baseTokens, exact = false) => {\n if (exact) {\n return baseTokens.map((baseToken) => `${baseToken}.pure`).includes(token);\n }\n const baseToken = at(token.split('.'), 0);\n return baseTokens.includes(baseToken);\n};\nexport const PURE_CODE_EDITOR_WORD_SEPARATORS = '`~!@#%^&*()-=+[{]}\\\\|;:\\'\",.<>/?'; // omit $ from default word separators\n//# sourceMappingURL=PureLanguageCodeEditorSupport.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { createModelSchema, list, optional, primitive } from 'serializr';\nexport class ElementSuggestion {\n pureType;\n pureId;\n pureName;\n text;\n requiredClassProperties = [];\n}\ncreateModelSchema(ElementSuggestion, {\n pureType: primitive(),\n pureId: primitive(),\n pureName: primitive(),\n text: primitive(),\n requiredClassProperties: optional(list(primitive())),\n});\nexport class AttributeSuggestion {\n pureType;\n pureName;\n owner;\n ownerPureType;\n}\ncreateModelSchema(AttributeSuggestion, {\n pureType: primitive(),\n pureName: primitive(),\n owner: primitive(),\n ownerPureType: primitive(),\n});\nexport class ClassSuggestion {\n pureId;\n pureName;\n requiredClassProperties = [];\n}\ncreateModelSchema(ClassSuggestion, {\n pureId: primitive(),\n pureName: primitive(),\n requiredClassProperties: optional(list(primitive())),\n});\nexport class VariableSuggestion {\n name;\n}\ncreateModelSchema(VariableSuggestion, {\n name: primitive(),\n});\n//# sourceMappingURL=Suggestion.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n// ------------------------------------- Copyright header -------------------------------------\nexport const getCopyrightHeaderSnippet = () => `// Copyright \\${1:${new Date().getFullYear()}} Goldman Sachs\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\\n`;\n// ------------------------------------- Class -------------------------------------\nexport const BLANK_CLASS_SNIPPET = `Class \\${1:model::NewClass}\n// example of a constraint\n// [\n// SomeConstraint: true\n// ]\n{\n \\${2:// example of a standard property\n // prop1: String[1];\n\n // example of a derived property\n // derivation1() {''\\\\}: String[1];}\n}`;\nexport const CLASS_WITH_PROPERTY_SNIPPET = `Class \\${1:model::NewClass}\n{\n \\${2:prop1}: \\${3:String[1]};\n}`;\nexport const CLASS_WITH_INHERITANCE_SNIPPET = `Class \\${1:model::NewClass} extends \\${2:model::ParentClass}\n{\n \\${3:// class content}\n}`;\nexport const CLASS_WITH_CONSTRAINT_SNIPPET = `Class \\${1:model::NewClass}\n[\n \\${3:SomeConstraint: true}\n]\n{\n \\${2:// class content}\n}`;\n// ------------------------------------- Profile -------------------------------------\nexport const SIMPLE_PROFILE_SNIPPET = `Profile \\${1:model::NewProfile}\n{\n stereotypes: [\\${2:}];\n tags: [\\${3:}];\n}`;\n// ------------------------------------- Enumeration -------------------------------------\nexport const SIMPLE_ENUMERATION_SNIPPET = `Enum \\${1:model::NewEnumeration}\n{\n \\${2:VALUE_1,\\n VALUE_2}\n}`;\n// ------------------------------------- Association -------------------------------------\nexport const SIMPLE_ASSOCIATION_SNIPPET = `Association \\${1:model::NewAssociation}\n{\n \\${2:prop1}: \\${3:model::Type1[1]};\n \\${4:prop2}: \\${5:model::Type2[1]};\n}`;\n// ------------------------------------- Function -------------------------------------\nexport const BLANK_FUNCTION_SNIPPET = `function \\${1:model::NewEnumeration}(\\${2:param1: String[1]}): \\${3:String[1]}\n{\n \\${4:''; // function content}\n}`;\nexport const SIMPLE_FUNCTION_SNIPPET = `function \\${1:model::NewEnumeration}(): String[1]\n{\n ''\n}`;\n// ------------------------------------- Mapping -------------------------------------\nexport const BLANK_MAPPING_SNIPPET = `Mapping \\${1:model::NewMapping}\n(\n \\${2:// mapping content}\n)`;\nexport const MAPPING_WITH_M2M_CLASS_MAPPING_SNIPPET = `Mapping \\${1:model::NewMapping}\n(\n \\${2:model::TargetClass}: Pure\n {\n ~src \\${3:model::SourceClass}\n // example of property mappings\n // prop1: $src.prop1\n }\n)`;\nexport const MAPPING_WITH_RELATIONAL_CLASS_MAPPING_SNIPPET = `Mapping \\${1:model::NewMapping}\n(\n \\${2:model::TargetClass}: Relational {\n ~mainTable \\${3:[model::SomeDatabase]SomeTable}\n // example of property mappings\n // prop1: [model::SomeDatabase]SomeTable.col1,\n }\n)`;\nexport const MAPPING_WITH_ENUMERATION_MAPPING_SNIPPET = `Mapping \\${1:model::NewMapping}\n(\n \\${2:model::TargetEnumeration}: EnumerationMapping \\${3:EnumerationMappingID}\n {\n // example of enum-value mapping\n // VAL_1: ['val1'],\n // VAL_2: ['val2', 'val_2']\n }\n)`;\n// ------------------------------------- Relational -------------------------------------\nexport const BLANK_RELATIONAL_DATABASE_SNIPPET = `Database \\${1:model::NewDatabase}\n(\n // example database schema\n // Schema SOME_SCHEMA\n // (\n // Table TABLE_1\n // (\n // COL_1 VARCHAR(200)\n // )\n // Table TABLE_2\n // (\n // COL_2 VARCHAR(200) PRIMARY_KEY\n // )\n // )\n\n // example database join\n // Join SomeJoin(SOME_SCHEMA.TABLE_1.COL_1 = SCHEMA1.TABLE_2.COL_2)\n\n \\${2:// database content}\n)`;\n// ------------------------------------- Diagram -------------------------------------\nexport const BLANK_DIAGRAM_SNIPPET = `Diagram \\${1:model::NewDiagram}(width=0.0, height=0.0)\n{\n // NOTE: it is recommended to use diagram visual editor\n // to edit diagram: double-click on the diagram in\n // the concept explorer tree to open the editor\n}`;\n//# sourceMappingURL=LegendPureIDECodeSnippet.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { CODE_EDITOR_LANGUAGE, isTokenOneOf, PURE_GRAMMAR_TOKEN, } from '@finos/legend-code-editor';\nimport { ELEMENT_PATH_DELIMITER, extractElementNameFromPath, PARSER_SECTION_MARKER, PURE_ELEMENT_NAME, PURE_PARSER, } from '@finos/legend-graph';\nimport { guaranteeNonNullable, isNonNullable, returnUndefOnError, } from '@finos/legend-shared';\nimport { languages as monacoLanguagesAPI, editor as monacoEditorAPI, } from 'monaco-editor';\nimport { deserialize } from 'serializr';\nimport { ConceptType } from '../server/models/ConceptTree.js';\nimport { AttributeSuggestion, ClassSuggestion, ElementSuggestion, VariableSuggestion, } from '../server/models/Suggestion.js';\nimport { BLANK_CLASS_SNIPPET, BLANK_FUNCTION_SNIPPET, BLANK_MAPPING_SNIPPET, BLANK_RELATIONAL_DATABASE_SNIPPET, CLASS_WITH_CONSTRAINT_SNIPPET, CLASS_WITH_INHERITANCE_SNIPPET, CLASS_WITH_PROPERTY_SNIPPET, MAPPING_WITH_ENUMERATION_MAPPING_SNIPPET, MAPPING_WITH_M2M_CLASS_MAPPING_SNIPPET, MAPPING_WITH_RELATIONAL_CLASS_MAPPING_SNIPPET, SIMPLE_ASSOCIATION_SNIPPET, SIMPLE_ENUMERATION_SNIPPET, SIMPLE_FUNCTION_SNIPPET, SIMPLE_PROFILE_SNIPPET, BLANK_DIAGRAM_SNIPPET, getCopyrightHeaderSnippet, } from '../__lib__/LegendPureIDECodeSnippet.js';\n// NOTE: these are technically different parsers compared to the ones we have in `Legend Engine` so we will\n// not try to reuse the constants from DSL diagram\nexport const PURE_GRAMMAR_DIAGRAM_PARSER_NAME = 'Diagram';\nexport const PURE_GRAMMAR_DIAGRAM_ELEMENT_TYPE_LABEL = 'Diagram';\nexport const collectParserKeywordSuggestions = () => [\n {\n text: PURE_PARSER.PURE,\n description: `(core Pure)`,\n insertText: PURE_PARSER.PURE,\n },\n {\n text: PURE_PARSER.MAPPING,\n description: `(dsl)`,\n insertText: PURE_PARSER.MAPPING,\n },\n {\n text: PURE_PARSER.CONNECTION,\n description: `(dsl)`,\n insertText: PURE_PARSER.CONNECTION,\n },\n {\n text: PURE_PARSER.RUNTIME,\n description: `(dsl)`,\n insertText: PURE_PARSER.RUNTIME,\n },\n {\n text: PURE_PARSER.RELATIONAL,\n description: `(external store)`,\n insertText: PURE_PARSER.RELATIONAL,\n },\n // NOTE: these are technically different parsers compared to the ones we have in `Legend Engine` so we will\n // not try to reuse the constants from DSL diagram\n {\n text: PURE_GRAMMAR_DIAGRAM_PARSER_NAME,\n description: `(dsl)`,\n insertText: PURE_GRAMMAR_DIAGRAM_ELEMENT_TYPE_LABEL,\n },\n];\nexport const collectParserElementSnippetSuggestions = (parserKeyword) => {\n switch (parserKeyword) {\n case PURE_PARSER.PURE: {\n return [\n // class\n {\n text: PURE_ELEMENT_NAME.CLASS,\n description: '(blank)',\n insertText: BLANK_CLASS_SNIPPET,\n },\n {\n text: PURE_ELEMENT_NAME.CLASS,\n description: 'with property',\n insertText: CLASS_WITH_PROPERTY_SNIPPET,\n },\n {\n text: PURE_ELEMENT_NAME.CLASS,\n description: 'with inheritance',\n insertText: CLASS_WITH_INHERITANCE_SNIPPET,\n },\n {\n text: PURE_ELEMENT_NAME.CLASS,\n description: 'with constraint',\n insertText: CLASS_WITH_CONSTRAINT_SNIPPET,\n },\n // profile\n {\n text: PURE_ELEMENT_NAME.PROFILE,\n insertText: SIMPLE_PROFILE_SNIPPET,\n },\n // enumeration\n {\n text: PURE_ELEMENT_NAME.ENUMERATION,\n insertText: SIMPLE_ENUMERATION_SNIPPET,\n },\n // association\n {\n text: PURE_ELEMENT_NAME.ASSOCIATION,\n insertText: SIMPLE_ASSOCIATION_SNIPPET,\n },\n // function\n {\n text: PURE_ELEMENT_NAME.FUNCTION,\n description: '(blank)',\n insertText: BLANK_FUNCTION_SNIPPET,\n },\n {\n text: PURE_ELEMENT_NAME.FUNCTION,\n insertText: SIMPLE_FUNCTION_SNIPPET,\n },\n ];\n }\n case PURE_PARSER.MAPPING: {\n return [\n {\n text: PURE_ELEMENT_NAME.MAPPING,\n description: '(blank)',\n insertText: BLANK_MAPPING_SNIPPET,\n },\n {\n text: PURE_ELEMENT_NAME.MAPPING,\n description: 'with model-to-model mapping',\n insertText: MAPPING_WITH_M2M_CLASS_MAPPING_SNIPPET,\n },\n {\n text: PURE_ELEMENT_NAME.MAPPING,\n description: 'with relational mapping',\n insertText: MAPPING_WITH_RELATIONAL_CLASS_MAPPING_SNIPPET,\n },\n {\n text: PURE_ELEMENT_NAME.MAPPING,\n description: 'with enumeration mapping',\n insertText: MAPPING_WITH_ENUMERATION_MAPPING_SNIPPET,\n },\n ];\n }\n case PURE_PARSER.RELATIONAL: {\n return [\n {\n text: PURE_ELEMENT_NAME.DATABASE,\n description: '(blank)',\n insertText: BLANK_RELATIONAL_DATABASE_SNIPPET,\n },\n ];\n }\n case PURE_GRAMMAR_DIAGRAM_PARSER_NAME: {\n return [\n {\n text: PURE_GRAMMAR_DIAGRAM_ELEMENT_TYPE_LABEL,\n description: '(blank)',\n insertText: BLANK_DIAGRAM_SNIPPET,\n },\n ];\n }\n default: {\n return [];\n }\n }\n};\nexport const collectExtraInlineSnippetSuggestions = () => [\n {\n text: 'print',\n description: '(io)',\n insertText: `print(\\${1:})`,\n },\n {\n text: 'println',\n description: '(io)',\n insertText: `println(\\${1:})`,\n },\n {\n text: 'NULL',\n description: '(nullish value)',\n insertText: `[]`,\n },\n];\nexport const getCopyrightHeaderSuggestions = (position, model) => {\n const results = [];\n const textUntilPosition = model\n .getValueInRange({\n startLineNumber: 1,\n startColumn: 1,\n endLineNumber: position.lineNumber,\n endColumn: position.column,\n })\n .trimStart();\n if (['', '/'].includes(textUntilPosition)) {\n results.push({\n label: {\n label: `/copyright`,\n description: `(copyright header)`,\n },\n kind: monacoLanguagesAPI.CompletionItemKind.Snippet,\n insertTextRules: monacoLanguagesAPI.CompletionItemInsertTextRule.InsertAsSnippet,\n insertText: getCopyrightHeaderSnippet(),\n // NOTE: only show this suggestion when the cursor is on the first line of the file\n range: {\n startLineNumber: 1,\n startColumn: 1,\n endLineNumber: 1,\n endColumn: 1000,\n },\n });\n }\n return results;\n};\nconst constructorClassSuggestionToCompletionItem = (suggestion) => ({\n label: {\n label: suggestion.pureName,\n description: suggestion.pureId,\n },\n kind: monacoLanguagesAPI.CompletionItemKind.Class,\n filterText: suggestion.pureName,\n insertTextRules: monacoLanguagesAPI.CompletionItemInsertTextRule.InsertAsSnippet,\n insertText: `${suggestion.pureName}(${suggestion.requiredClassProperties\n .map((property, idx) => `${property}=\\${${idx + 1}:}`)\n .join(',')})`,\n});\nconst createFunctionInvocationSnippet = (functionName, functionPureId, useArrowForm) => {\n const fn = extractElementNameFromPath(functionPureId);\n const functionType = returnUndefOnError(() => fn.substring(fn.indexOf('_'), fn.length - 1));\n // NOTE: remove the return type and if use arrow function form, remove the first parameter\n const parameters = functionType?.split('__') ?? [];\n parameters.pop();\n if (useArrowForm) {\n parameters.shift();\n }\n return `${functionName}(${parameters\n .map((param, idx) => `\\${${idx + 1}:}`)\n .join(',')})`;\n};\nconst elementSuggestionToCompletionItem = (suggestion, options) => {\n const type = suggestion.pureType;\n const insertText = type === ConceptType.FUNCTION || type === ConceptType.NATIVE_FUNCTION\n ? createFunctionInvocationSnippet(suggestion.pureName, suggestion.pureId, Boolean(options?.preferArrowFunctionForm))\n : suggestion.pureName;\n const kind = type === ConceptType.PACKAGE\n ? monacoLanguagesAPI.CompletionItemKind.Folder\n : type === ConceptType.CLASS\n ? monacoLanguagesAPI.CompletionItemKind.Class\n : type === ConceptType.FUNCTION\n ? monacoLanguagesAPI.CompletionItemKind.Function\n : type === ConceptType.ENUMERATION\n ? monacoLanguagesAPI.CompletionItemKind.Enum\n : type === ConceptType.PROFILE\n ? monacoLanguagesAPI.CompletionItemKind.Module\n : type === ConceptType.ASSOCIATION\n ? monacoLanguagesAPI.CompletionItemKind.Interface\n : monacoLanguagesAPI.CompletionItemKind.Value;\n return {\n label: {\n label: suggestion.pureName,\n description: suggestion.text,\n },\n kind,\n filterText: suggestion.pureName,\n insertTextRules: monacoLanguagesAPI.CompletionItemInsertTextRule.InsertAsSnippet,\n insertText,\n // attempt to push package suggestions to the bottom of the list\n sortText: type === ConceptType.PACKAGE\n ? `zzzz_${suggestion.text}`\n : suggestion.text,\n };\n};\nconst INCOMPLETE_PATH_PATTERN = /(?<incompletePath>(?:\\w[\\w$]*::)+$)/;\nconst ARROW_FUNCTION_USAGE_WITH_INCOMPLETE_PATH_PATTERN = /->\\s*(?:\\w[\\w$]*::)+$/;\nconst CONSTRUCTOR_USAGE_WITH_INCOMPLETE_PATH_PATTERN = /\\^\\s*(?:\\w[\\w$]*::)+$/;\nexport const getIncompletePathSuggestions = async (position, model, ideStore) => {\n const incompletePathMatch = model\n .getLineContent(position.lineNumber)\n .substring(0, position.column - 1)\n .match(INCOMPLETE_PATH_PATTERN);\n if (incompletePathMatch?.groups?.incompletePath) {\n const isUsingArrowFunction = Boolean(model\n .getLineContent(position.lineNumber)\n .substring(0, position.column - 1)\n .match(ARROW_FUNCTION_USAGE_WITH_INCOMPLETE_PATH_PATTERN));\n const isUsingConstructor = Boolean(model\n .getLineContent(position.lineNumber)\n .substring(0, position.column - 1)\n .match(CONSTRUCTOR_USAGE_WITH_INCOMPLETE_PATH_PATTERN));\n let suggestions = [];\n try {\n suggestions = (await ideStore.client.getSuggestionsForIncompletePath(incompletePathMatch.groups.incompletePath.substring(0, incompletePathMatch.groups.incompletePath.length -\n ELEMENT_PATH_DELIMITER.length), isUsingConstructor\n ? [ConceptType.CLASS]\n : isUsingArrowFunction\n ? [ConceptType.FUNCTION, ConceptType.NATIVE_FUNCTION]\n : [])).map((child) => deserialize(ElementSuggestion, child));\n }\n catch {\n // do nothing: provide no suggestions when error ocurred\n }\n return suggestions.map((suggestion) => isUsingConstructor\n ? constructorClassSuggestionToCompletionItem(suggestion)\n : elementSuggestionToCompletionItem(suggestion, {\n preferArrowFunctionForm: isUsingArrowFunction,\n }));\n }\n return [];\n};\nconst IMPORT_STATEMENT_PATTERN = /^\\s*import\\s+(?:(?<importPath>(?:(?:\\w[\\w$]*)::)*\\w[\\w$]*)::*)/;\nconst getCurrentSectionImportPaths = (position, model) => {\n const textUntilPosition = model.getValueInRange({\n startLineNumber: 1,\n startColumn: 1,\n endLineNumber: position.lineNumber,\n endColumn: position.column,\n });\n const lines = \n // NOTE: since `###Pure` is implicitly considered as the first section, we prepend it to the text\n `${PARSER_SECTION_MARKER}${PURE_PARSER.PURE}\\n${textUntilPosition}`.split('\\n');\n return lines\n .slice(lines\n .map((line) => line.startsWith(PARSER_SECTION_MARKER))\n .lastIndexOf(true))\n .map((line) => line.match(IMPORT_STATEMENT_PATTERN)?.groups?.importPath)\n .filter(isNonNullable);\n};\nconst ARROW_FUNCTION_USAGE_PATTERN = /->\\s*(?:\\w[\\w$]*)?$/;\nconst CONSTRUCTOR_USAGE_PATTERN = /\\^\\s*(?:\\w[\\w$]*)?$/;\nexport const getIdentifierSuggestions = async (position, model, ideStore) => {\n const importPaths = getCurrentSectionImportPaths(position, model);\n const isUsingArrowFunction = Boolean(model\n .getLineContent(position.lineNumber)\n .substring(0, position.column - 1)\n .match(ARROW_FUNCTION_USAGE_PATTERN));\n const isUsingConstructor = Boolean(model\n .getLineContent(position.lineNumber)\n .substring(0, position.column - 1)\n .match(CONSTRUCTOR_USAGE_PATTERN));\n let suggestions = [];\n try {\n suggestions = (await ideStore.client.getSuggestionsForIdentifier(importPaths, isUsingConstructor\n ? [ConceptType.CLASS]\n : isUsingArrowFunction\n ? [ConceptType.FUNCTION, ConceptType.NATIVE_FUNCTION]\n : [])).map((child) => deserialize(ElementSuggestion, child));\n }\n catch {\n // do nothing: provide no suggestions when error ocurred\n }\n return suggestions.map((suggestion) => isUsingConstructor\n ? constructorClassSuggestionToCompletionItem(suggestion)\n : elementSuggestionToCompletionItem(suggestion, {\n preferArrowFunctionForm: isUsingArrowFunction,\n }));\n};\nexport const getArrowFunctionSuggestions = async (position, model, ideStore) => {\n const importPaths = getCurrentSectionImportPaths(position, model);\n let suggestions = [];\n try {\n suggestions = (await ideStore.client.getSuggestionsForIdentifier(importPaths, [\n ConceptType.FUNCTION,\n ConceptType.NATIVE_FUNCTION,\n ])).map((child) => deserialize(ElementSuggestion, child));\n }\n catch {\n // do nothing: provide no suggestions when error ocurred\n }\n return suggestions.map((suggestion) => elementSuggestionToCompletionItem(suggestion, {\n preferArrowFunctionForm: true,\n }));\n};\nconst attributeSuggestionToCompletionItem = (suggestion) => {\n const type = suggestion.pureType;\n const insertText = type === ConceptType.PROPERTY || type === ConceptType.QUALIFIED_PROPERTY\n ? `${suggestion.pureName}(\\${1:})`\n : suggestion.pureName;\n const kind = type === ConceptType.PROPERTY\n ? monacoLanguagesAPI.CompletionItemKind.Property\n : type === ConceptType.QUALIFIED_PROPERTY\n ? monacoLanguagesAPI.CompletionItemKind.Method\n : type === ConceptType.TAG\n ? monacoLanguagesAPI.CompletionItemKind.Constant\n : type === ConceptType.STEREOTYPE\n ? monacoLanguagesAPI.CompletionItemKind.Value\n : type === ConceptType.ENUM_VALUE\n ? monacoLanguagesAPI.CompletionItemKind.Enum\n : monacoLanguagesAPI.CompletionItemKind.Value;\n return {\n label: {\n label: suggestion.pureName,\n description: `${suggestion.owner}.${suggestion.pureName}`,\n },\n kind,\n filterText: suggestion.pureName,\n insertTextRules: monacoLanguagesAPI.CompletionItemInsertTextRule.InsertAsSnippet,\n insertText,\n };\n};\nconst ATTRIBUTE_ACCESSOR_PATTERN = /^(?<owner>(?:(?:\\w[\\w$]*)::)*\\w[\\w$]*)\\s*.$/;\nexport const getAttributeSuggestions = async (position, model, ideStore) => {\n const attributeAccessorMatch = model\n .getLineContent(position.lineNumber)\n .substring(0, position.column - 1)\n .match(ATTRIBUTE_ACCESSOR_PATTERN);\n const importPaths = getCurrentSectionImportPaths(position, model);\n if (attributeAccessorMatch?.groups?.owner) {\n let suggestions = [];\n try {\n suggestions = (await ideStore.client.getSuggestionsForAttribute(importPaths, attributeAccessorMatch.groups.owner)).map((child) => deserialize(AttributeSuggestion, child));\n }\n catch {\n // do nothing: provide no suggestions when error ocurred\n }\n return suggestions.map((suggestion) => attributeSuggestionToCompletionItem(suggestion));\n }\n return [];\n};\nexport const getConstructorClassSuggestions = async (position, model, ideStore) => {\n const importPaths = getCurrentSectionImportPaths(position, model);\n let suggestions = [];\n try {\n suggestions = (await ideStore.client.getSuggestionsForClass(importPaths)).map((child) => deserialize(ClassSuggestion, child));\n }\n catch {\n // do nothing: provide no suggestions when error ocurred\n }\n return suggestions.map((suggestion) => constructorClassSuggestionToCompletionItem(suggestion));\n};\nconst castingClassSuggestionToCompletionItem = (suggestion) => ({\n label: {\n label: suggestion.pureName,\n description: suggestion.pureId,\n },\n kind: monacoLanguagesAPI.CompletionItemKind.Class,\n filterText: suggestion.pureName,\n insertTextRules: monacoLanguagesAPI.CompletionItemInsertTextRule.InsertAsSnippet,\n insertText: suggestion.pureName,\n});\nexport const getCastingClassSuggestions = async (position, model, ideStore) => {\n const importPaths = getCurrentSectionImportPaths(position, model);\n let suggestions = [];\n try {\n suggestions = (await ideStore.client.getSuggestionsForClass(importPaths)).map((child) => deserialize(ClassSuggestion, child));\n }\n catch {\n // do nothing: provide no suggestions when error ocurred\n }\n return suggestions.map((suggestion) => castingClassSuggestionToCompletionItem(suggestion));\n};\nconst variableSuggestionToCompletionItem = (suggestion, isFromCompiledSource) => ({\n label: suggestion.name,\n kind: monacoLanguagesAPI.CompletionItemKind.Variable,\n insertTextRules: monacoLanguagesAPI.CompletionItemInsertTextRule.InsertAsSnippet,\n // if suggestions coming from compiled source, they are ranked higher\n sortText: !isFromCompiledSource\n ? `zzzz_${suggestion.name}`\n : suggestion.name,\n insertText: suggestion.name,\n});\nconst VARIABLE_SUGGESTION_SCANNING_RANGE = 10;\nexport const getVariableSuggestions = async (position, model, filePath, ideStore) => {\n let suggestions = [];\n // get suggestions from compiled source\n try {\n suggestions = (await ideStore.client.getSuggestionsForVariable(filePath, position.lineNumber, position.column)).map((child) => deserialize(VariableSuggestion, child));\n }\n catch {\n // do nothing: provide no suggestions when error ocurred\n }\n // NOTE: potentially, we could scan for all tokens that come before the current position\n // and filter out variable suggestions that nolonger available\n // get suggestions from current (potentially non-compiled) source\n const varNames = new Set();\n let stopSearching = false;\n for (let i = position.lineNumber - 1; i >\n Math.max(0, position.lineNumber - 1 - VARIABLE_SUGGESTION_SCANNING_RANGE); --i) {\n // NOTE: stop searching after reaching function definition or section marker\n if (stopSearching) {\n break;\n }\n const line = model.getLineContent(i + 1);\n if (line.match(/^\\s*function\\s+/) || line.match(/^\\s*###\\w+/)) {\n stopSearching = true;\n }\n // scan for potential variable/parameter declarations\n const lineTokens = guaranteeNonNullable(monacoEditorAPI.tokenize(model.getLineContent(i + 1), CODE_EDITOR_LANGUAGE.PURE)[0]);\n lineTokens.forEach((token, lineIndex) => {\n if (\n // must come before the current position\n (i !== position.lineNumber - 1 || token.offset < position.column) &&\n isTokenOneOf(token.type, [PURE_GRAMMAR_TOKEN.VARIABLE, PURE_GRAMMAR_TOKEN.PARAMETER], true)) {\n varNames.add(model.getValueInRange({\n startLineNumber: i + 1,\n startColumn: token.offset + 1,\n endLineNumber: i + 1,\n endColumn: lineIndex === lineTokens.length - 1\n ? Number.MAX_SAFE_INTEGER\n : guaranteeNonNullable(lineTokens[lineIndex + 1]).offset + 1,\n }));\n }\n });\n }\n const variablesFoundFromSuggestions = suggestions.map((suggestion) => suggestion.name);\n return suggestions\n .map((suggestion) => variableSuggestionToCompletionItem(suggestion, true))\n .concat(Array.from(varNames)\n .filter((varName) => !variablesFoundFromSuggestions.includes(varName))\n .map((varName) => {\n const suggestion = new VariableSuggestion();\n suggestion.name = varName;\n return suggestion;\n })\n .map((suggestion) => variableSuggestionToCompletionItem(suggestion, false)));\n};\n//# sourceMappingURL=PureFileEditorUtils.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { useEffect, useRef, useState } from 'react';\nimport { observer } from 'mobx-react-lite';\nimport { editor as monacoEditorAPI, languages as monacoLanguagesAPI, } from 'monaco-editor';\nimport { useApplicationStore, useCommands } from '@finos/legend-application';\nimport { CODE_EDITOR_LANGUAGE, CODE_EDITOR_THEME, getInlineSnippetSuggestions, getParserElementSnippetSuggestions, getParserKeywordSuggestions, isTokenOneOf, PURE_GRAMMAR_TOKEN, getBaseCodeEditorOptions, moveCursorToPosition, PURE_CODE_EDITOR_WORD_SEPARATORS, } from '@finos/legend-code-editor';\nimport { clsx, Dialog, WordWrapIcon } from '@finos/legend-art';\nimport { usePureIDEStore } from '../PureIDEStoreProvider.js';\nimport { collectExtraInlineSnippetSuggestions, collectParserElementSnippetSuggestions, collectParserKeywordSuggestions, getArrowFunctionSuggestions, getAttributeSuggestions, getCastingClassSuggestions, getConstructorClassSuggestions, getCopyrightHeaderSuggestions, getIncompletePathSuggestions, getVariableSuggestions, } from '../../stores/PureFileEditorUtils.js';\nimport { guaranteeNonNullable, isNonNullable } from '@finos/legend-shared';\nimport { flowResult } from 'mobx';\nimport { FileCoordinate } from '../../server/models/File.js';\nimport { LEGEND_PURE_IDE_PURE_FILE_EDITOR_COMMAND_KEY } from '../../__lib__/LegendPureIDECommand.js';\nimport { GoToLinePrompt } from './GenericFileEditor.js';\nconst IDENTIFIER_PATTERN = /^\\w[\\w$]*$/;\nconst RenameConceptPrompt = observer((props) => {\n const { renameConceptState } = props;\n const applicationStore = useApplicationStore();\n const fileEditorState = renameConceptState.fileEditorState;\n const conceptName = renameConceptState.concept.pureName;\n const [value, setValue] = useState(conceptName);\n const inputRef = useRef(null);\n // validation\n const isValidValue = Boolean(value.match(IDENTIFIER_PATTERN));\n const isSameValue = conceptName === value;\n const error = !isValidValue ? 'Invalid concept name' : undefined;\n // actions\n const closeModal = () => {\n flowResult(fileEditorState.setConceptToRenameState(undefined)).catch(applicationStore.alertUnhandledError);\n };\n const onValueChange = (event) => setValue(event.target.value);\n const rename = (event) => {\n event.preventDefault();\n if (isSameValue) {\n return;\n }\n fileEditorState\n .renameConcept(value)\n .catch(applicationStore.alertUnhandledError)\n .finally(() => closeModal());\n };\n const handleEnter = () => inputRef.current?.focus();\n return (_jsx(Dialog, { open: true, onClose: closeModal, classes: { container: 'command-modal__container' }, slotProps: {\n transition: {\n onEnter: handleEnter,\n },\n paper: {\n classes: { root: 'command-modal__inner-container' },\n },\n }, children: _jsxs(\"div\", { className: \"modal modal--dark command-modal\", children: [_jsx(\"div\", { className: \"modal__title\", children: \"Rename concept\" }), _jsxs(\"div\", { className: \"command-modal__content\", children: [_jsx(\"form\", { className: \"command-modal__content__form\", onSubmit: rename, children: _jsxs(\"div\", { className: \"input-group command-modal__content__input\", children: [_jsx(\"input\", { ref: inputRef, className: \"input input--dark\", onChange: onValueChange, value: value, spellCheck: false }), error && (_jsx(\"div\", { className: \"input-group__error-message\", children: error }))] }) }), _jsx(\"button\", { className: \"command-modal__content__submit-btn btn--dark\", disabled: Boolean(error), onClick: rename, children: \"Rename\" })] })] }) }));\n});\nexport const PureFileEditor = observer((props) => {\n const { editorState } = props;\n const definitionProviderDisposer = useRef(undefined);\n const hoverProviderDisposer = useRef(undefined);\n const pureConstructSuggestionProviderDisposer = useRef(undefined);\n const pureIdentifierSuggestionProviderDisposer = useRef(undefined);\n const textInputRef = useRef(null);\n const [editor, setEditor] = useState();\n const [isContextMenuOpen, setIsContextMenuOpen] = useState(false);\n const ideStore = usePureIDEStore();\n const applicationStore = useApplicationStore();\n useEffect(() => {\n if (!editor && textInputRef.current) {\n const element = textInputRef.current;\n const newEditor = monacoEditorAPI.create(element, {\n ...getBaseCodeEditorOptions(),\n language: CODE_EDITOR_LANGUAGE.PURE,\n theme: CODE_EDITOR_THEME.DEFAULT_DARK,\n wordSeparators: PURE_CODE_EDITOR_WORD_SEPARATORS,\n wordWrap: editorState.textEditorState.wrapText ? 'on' : 'off',\n readOnly: editorState.file.RO,\n contextmenu: true,\n });\n // NOTE: (hacky) hijack the editor service so we can alternate the behavior of goto definition\n // since we cannot really override the editor service anymore, but must provide a full editor service\n // implementation in place, which is not practical for now\n // See https://github.com/microsoft/monaco-editor/issues/852\n // See https://github.com/microsoft/monaco-editor/issues/2000#issuecomment-649622966\n newEditor._codeEditorService.openCodeEditor = async () => {\n const currentPosition = newEditor.getPosition();\n if (currentPosition) {\n flowResult(ideStore.executeNavigation(new FileCoordinate(editorState.filePath, currentPosition.lineNumber, currentPosition.column))).catch(applicationStore.alertUnhandledError);\n }\n };\n // NOTE: with the way we create suggestion tokens, there's a problem\n // where for the definition coming from the same URI, the goto-definition\n // action will by default just go to the token, i.e. do nothing in our case\n // as such, we have to override `gotoLocation.alternativeDefinitionCommand`\n // in order for `editorService.openCodeEditor` to be called\n // See https://github.com/microsoft/vscode/issues/110060\n // See https://github.com/microsoft/vscode/issues/107841\n newEditor.updateOptions({\n gotoLocation: {\n multiple: 'goto',\n multipleDefinitions: 'goto',\n alternativeDefinitionCommand: 'DUMMY',\n },\n });\n // NOTE: we need to find a way to remove some items in context-menu\n // but currently there's no API exposed by monaco-editor to do so\n // hence, we have to use this hack where we will hijack the mounted context-menu\n // and remove undesired DOM nodes\n // See https://github.com/microsoft/monaco-editor/issues/1567\n // However, it's not enough to just do the DOM surgery in `onContextMenu`\n // since at this point, the context menu is not rendered yet, so we have to\n // make use of `useState` and `useEffect` to achieve this goal\n // as `useEffect` is called after DOM rendering occurs\n newEditor.onContextMenu(() => setIsContextMenuOpen(true));\n newEditor.addAction({\n id: LEGEND_PURE_IDE_PURE_FILE_EDITOR_COMMAND_KEY.FIND_USAGES,\n label: 'Find Usages',\n contextMenuGroupId: 'navigation',\n contextMenuOrder: 1000,\n run: function (_editor) {\n const currentPosition = _editor.getPosition();\n if (currentPosition) {\n const coordinate = new FileCoordinate(editorState.filePath, currentPosition.lineNumber, currentPosition.column);\n editorState.findConceptUsages(coordinate);\n }\n },\n });\n newEditor.addAction({\n id: LEGEND_PURE_IDE_PURE_FILE_EDITOR_COMMAND_KEY.REVEAL_CONCEPT_IN_TREE,\n label: 'Reveal Concept',\n contextMenuGroupId: 'navigation',\n contextMenuOrder: 1000,\n run: function (_editor) {\n const currentPosition = _editor.getPosition();\n if (currentPosition) {\n ideStore\n .revealConceptInTree(new FileCoordinate(editorState.filePath, currentPosition.lineNumber, currentPosition.column))\n .catch(applicationStore.alertUnhandledError);\n }\n },\n });\n newEditor.addAction({\n id: LEGEND_PURE_IDE_PURE_FILE_EDITOR_COMMAND_KEY.RENAME_CONCEPT,\n label: 'Rename',\n contextMenuGroupId: '1_modification',\n contextMenuOrder: 1000,\n run: function (_editor) {\n const currentPosition = _editor.getPosition();\n if (currentPosition) {\n const currentWord = editorState.textEditorState.model.getWordAtPosition(currentPosition);\n if (!currentWord) {\n return;\n }\n const coordinate = new FileCoordinate(editorState.filePath, currentPosition.lineNumber, currentPosition.column);\n flowResult(editorState.setConceptToRenameState(coordinate)).catch(ideStore.applicationStore.alertUnhandledError);\n }\n },\n });\n newEditor.addAction({\n id: LEGEND_PURE_IDE_PURE_FILE_EDITOR_COMMAND_KEY.RENAME_CONCEPT,\n label: 'Run Test',\n contextMenuGroupId: 'navigation',\n contextMenuOrder: 1000,\n run: function (_editor) {\n const currentPosition = _editor.getPosition();\n if (currentPosition) {\n const coordinate = new FileCoordinate(editorState.filePath, currentPosition.lineNumber, currentPosition.column);\n flowResult(editorState.runTest(coordinate)).catch(ideStore.applicationStore.alertUnhandledError);\n }\n },\n });\n newEditor.onDidChangeModelContent(() => {\n const currentVal = newEditor.getValue();\n if (currentVal !== editorState.file.content) {\n // the assertion above is to ensure we don't accidentally clear error on initialization of the editor\n editorState.clearError(); // clear error on content change/typing\n }\n editorState.file.setContent(currentVal);\n });\n // manual trigger to support cursor observability\n newEditor.onDidChangeCursorPosition(() => {\n editorState.textEditorState.notifyCursorObserver();\n });\n newEditor.onDidChangeCursorSelection(() => {\n editorState.textEditorState.notifyCursorObserver();\n });\n // Restore the editor model and view state\n newEditor.setModel(editorState.textEditorState.model);\n if (editorState.textEditorState.viewState) {\n newEditor.restoreViewState(editorState.textEditorState.viewState);\n }\n newEditor.focus(); // focus on the editor initially\n editorState.textEditorState.setEditor(newEditor);\n setEditor(newEditor);\n }\n }, [ideStore, applicationStore, editorState, editor]);\n if (editor) {\n definitionProviderDisposer.current?.dispose();\n definitionProviderDisposer.current =\n monacoLanguagesAPI.registerDefinitionProvider(CODE_EDITOR_LANGUAGE.PURE, {\n provideDefinition: (model, position) => {\n // NOTE: there is a quirky problem with monaco-editor or our integration with it\n // where sometimes, hovering the mouse on the right half of the last character of a definition token\n // and then hitting Ctrl/Cmd key will not be trigger definition provider. We're not quite sure what\n // to do with that for the time being.\n const lineContent = model.getLineContent(position.lineNumber);\n const lineTokens = monacoEditorAPI.tokenize(lineContent, CODE_EDITOR_LANGUAGE.PURE)[0];\n if (!lineTokens) {\n return [];\n }\n let currentToken = undefined;\n let currentTokenRange = undefined;\n for (let i = 1; i <= lineTokens.length; ++i) {\n // account for the fact that the last token\n // extends to the end of the line, and it could be a meaningful token\n const tokenOffset = i === lineTokens.length\n ? lineContent.length\n : guaranteeNonNullable(lineTokens[i]).offset;\n if (tokenOffset + 1 > position.column) {\n currentToken = guaranteeNonNullable(lineTokens[i - 1]);\n // since this is the selection of text from another file for peeking/preview the definition\n // We can't really do much here since we do goto-definition asynchronously, we will\n // show the token itself\n currentTokenRange = {\n startLineNumber: position.lineNumber,\n startColumn: currentToken.offset + 1,\n endLineNumber: position.lineNumber,\n endColumn: tokenOffset + 1, // NOTE: seems like this needs to be exclusive\n };\n break;\n }\n }\n if (currentToken &&\n currentTokenRange &&\n // only allow goto definition for these tokens\n isTokenOneOf(currentToken.type, [\n PURE_GRAMMAR_TOKEN.TYPE,\n PURE_GRAMMAR_TOKEN.VARIABLE,\n PURE_GRAMMAR_TOKEN.PROPERTY,\n PURE_GRAMMAR_TOKEN.PARAMETER,\n PURE_GRAMMAR_TOKEN.IDENTIFIER,\n ])) {\n return [\n {\n uri: editorState.textEditorState.model.uri,\n range: currentTokenRange,\n },\n ];\n }\n return [];\n },\n });\n // hover\n hoverProviderDisposer.current?.dispose();\n hoverProviderDisposer.current = monacoLanguagesAPI.registerHoverProvider(CODE_EDITOR_LANGUAGE.PURE, {\n provideHover: async (model, position) => {\n // NOTE: there is a quirky problem with monaco-editor or our integration with it\n // where sometimes, hovering the mouse on the right half of the last character of a definition token\n // and then hitting Ctrl/Cmd key will not be trigger definition provider. We're not quite sure what\n // to do with that for the time being.\n const lineContent = model.getLineContent(position.lineNumber);\n const lineTokens = monacoEditorAPI.tokenize(lineContent, CODE_EDITOR_LANGUAGE.PURE)[0];\n if (!lineTokens) {\n return { contents: [] };\n }\n let currentToken = undefined;\n let currentTokenRange = undefined;\n for (let i = 1; i <= lineTokens.length; ++i) {\n // here we have to account for the fact that the last token\n // extends to the end of the line, and it could be a meaningful token\n const tokenOffset = i === lineTokens.length\n ? lineContent.length\n : guaranteeNonNullable(lineTokens[i]).offset;\n if (tokenOffset + 1 > position.column) {\n currentToken = guaranteeNonNullable(lineTokens[i - 1]);\n currentTokenRange = {\n startLineNumber: position.lineNumber,\n startColumn: currentToken.offset + 1,\n endLineNumber: position.lineNumber,\n endColumn: tokenOffset + 1, // NOTE: seems like this needs to be exclusive\n };\n break;\n }\n }\n if (currentToken &&\n currentTokenRange &&\n // only allow these tokens to show documentation\n isTokenOneOf(currentToken.type, [\n PURE_GRAMMAR_TOKEN.TYPE,\n PURE_GRAMMAR_TOKEN.PROPERTY,\n PURE_GRAMMAR_TOKEN.PARAMETER,\n PURE_GRAMMAR_TOKEN.IDENTIFIER,\n ])) {\n const concept = await ideStore.getConceptInfo(new FileCoordinate(editorState.filePath, position.lineNumber, position.column), {\n silent: true,\n });\n if (concept) {\n return {\n contents: [\n concept.doc\n ? {\n value: concept.doc,\n }\n : undefined,\n concept.grammarChars\n ? {\n value: `**Syntax:** \\`${concept.grammarChars}\\``,\n }\n : undefined,\n concept.grammarDoc\n ? {\n value: `**Usage:** ${concept.grammarDoc}`,\n }\n : undefined,\n concept.signature\n ? {\n value: `**Signature:** \\`\\`\\`${concept.signature}\\`\\`\\``,\n }\n : undefined,\n ].filter(isNonNullable),\n range: currentTokenRange,\n };\n }\n }\n return { contents: [] };\n },\n });\n // suggestions\n pureConstructSuggestionProviderDisposer.current?.dispose();\n pureConstructSuggestionProviderDisposer.current =\n monacoLanguagesAPI.registerCompletionItemProvider(CODE_EDITOR_LANGUAGE.PURE, {\n triggerCharacters: ['/', '#', ':', '>', '.', '@', '^', '$'],\n provideCompletionItems: async (model, position, context) => {\n let suggestions = [];\n if (context.triggerKind ===\n monacoLanguagesAPI.CompletionTriggerKind.TriggerCharacter) {\n switch (context.triggerCharacter) {\n // special commands: copyright header, etc.\n case '/': {\n suggestions = suggestions.concat(getCopyrightHeaderSuggestions(position, model));\n break;\n }\n // parser section header\n case '#': {\n suggestions = suggestions.concat(getParserKeywordSuggestions(position, model, collectParserKeywordSuggestions()));\n break;\n }\n // incomplete path (::)\n case ':': {\n suggestions = suggestions.concat(await getIncompletePathSuggestions(position, model, ideStore));\n break;\n }\n // arrow function (->)\n // NOTE: we can't really do type matching on document being edited\n // since in order to get the semantics of these token, we need the\n // currently typed text to compile, but that's not always possible\n // especially mid typing an expression sequence\n case '>': {\n suggestions = suggestions.concat(await getArrowFunctionSuggestions(position, model, ideStore));\n break;\n }\n // calling property, attribute, enum value, tag, stereotype, etc.\n // NOTE: we can't really do type matching on document being edited\n // since in order to get the semantics of these token, we need the\n // currently typed text to compile, but that's not always possible\n // especially mid typing an expression sequence\n case '.': {\n suggestions = suggestions.concat(await getAttributeSuggestions(position, model, ideStore));\n break;\n }\n // constructing a new class instance\n case '^': {\n suggestions = suggestions.concat(await getConstructorClassSuggestions(position, model, ideStore));\n break;\n }\n // casting to a class\n case '@': {\n suggestions = suggestions.concat(await getCastingClassSuggestions(position, model, ideStore));\n break;\n }\n // variables\n case '$': {\n suggestions = suggestions.concat(await getVariableSuggestions(position, model, editorState.filePath, ideStore));\n break;\n }\n default:\n break;\n }\n }\n return { suggestions };\n },\n });\n pureIdentifierSuggestionProviderDisposer.current?.dispose();\n pureIdentifierSuggestionProviderDisposer.current =\n monacoLanguagesAPI.registerCompletionItemProvider(CODE_EDITOR_LANGUAGE.PURE, {\n triggerCharacters: [],\n provideCompletionItems: async (model, position, context) => {\n let suggestions = [];\n if (context.triggerKind ===\n monacoLanguagesAPI.CompletionTriggerKind.Invoke) {\n // copyright header\n suggestions = suggestions.concat(getCopyrightHeaderSuggestions(position, model));\n // suggestions for parser element snippets\n suggestions = suggestions.concat(getParserElementSnippetSuggestions(position, model, (parserName) => collectParserElementSnippetSuggestions(parserName)));\n // code snippet suggestions\n suggestions = suggestions.concat(getInlineSnippetSuggestions(position, model, collectExtraInlineSnippetSuggestions()));\n // TODO: support contextual suggestions with just the identifier, i.e. auto-complete\n // which Pure IDE server has not supported at the moment\n }\n return { suggestions };\n },\n });\n }\n useCommands(editorState);\n useEffect(() => {\n if (isContextMenuOpen) {\n const shadowRoot = editor\n ?.getDomNode()\n ?.querySelector('.shadow-root-host')?.shadowRoot;\n if (shadowRoot) {\n const shadowRootStyleSheet = document.createElement('style');\n shadowRootStyleSheet.innerHTML = `\n .monaco-scrollable-element {\n background: var(--color-dark-grey-100) !important;\n color: var(--color-light-grey-400);\n border-radius: 0.2rem !important;\n }\n\n .monaco-action-bar.vertical {\n padding: 0.5rem 0;\n }\n\n .action-label.separator {\n border-bottom: 1px solid var(--color-dark-grey-300) !important;\n border-bottom-color: var(--color-dark-grey-300) !important;\n }\n\n .action-item.focused:hover > a,\n .action-item.focused > a {\n background: var(--color-light-blue-450) !important;\n }\n `;\n shadowRoot.appendChild(shadowRootStyleSheet);\n // NOTE: we have tried to remove the DOM node, but since the context-menu height is computed\n // this causes a problem with the UI, so we just can disable the item until an official API\n // is supported and we can removed this hack\n // See https://github.com/microsoft/monaco-editor/issues/1567\n // See https://github.com/microsoft/monaco-editor/issues/1280\n const MENU_ITEMS_TO_DISABLE = ['Peek'];\n Array.from(shadowRoot.querySelectorAll('.action-label'))\n .filter((element) => MENU_ITEMS_TO_DISABLE.includes(element.innerHTML))\n .forEach((element) => {\n const menuItem = element.parentElement?.parentElement;\n // NOTE: we must not remove this item since vscode would\n // still keep it in memory and calculate context menu height wrong\n if (menuItem) {\n menuItem.classList.add('disabled');\n menuItem.style.opacity = '0.3';\n menuItem.style.pointerEvents = 'none';\n }\n });\n setIsContextMenuOpen(false);\n }\n }\n }, [editor, isContextMenuOpen]);\n useEffect(() => {\n if (editor) {\n if (editorState.textEditorState.forcedCursorPosition) {\n moveCursorToPosition(editor, editorState.textEditorState.forcedCursorPosition);\n editorState.textEditorState.setForcedCursorPosition(undefined);\n }\n }\n }, [editor, editorState, editorState.textEditorState.forcedCursorPosition]);\n // clean up\n useEffect(() => () => {\n if (editor) {\n // persist editor view state (cursor, scroll, etc.) to restore on re-open\n editorState.textEditorState.setViewState(editor.saveViewState() ?? undefined);\n editor.dispose();\n definitionProviderDisposer.current?.dispose();\n hoverProviderDisposer.current?.dispose();\n pureConstructSuggestionProviderDisposer.current?.dispose();\n pureIdentifierSuggestionProviderDisposer.current?.dispose();\n }\n }, [editorState, editor]);\n return (_jsxs(\"div\", { className: \"panel editor-group file-editor\", children: [_jsx(\"div\", { className: \"panel__header file-editor__header\", children: _jsxs(\"div\", { className: \"file-editor__header__actions\", children: [_jsx(\"button\", { className: clsx('file-editor__header__action', {\n 'file-editor__header__action--active': editorState.textEditorState.wrapText,\n }), tabIndex: -1, onClick: () => editorState.textEditorState.setWrapText(!editorState.textEditorState.wrapText), title: \"Toggle Text Wrap\", children: _jsx(WordWrapIcon, { className: \"file-editor__icon--text-wrap\" }) }), editorState.renameConceptState && (_jsx(RenameConceptPrompt, { renameConceptState: editorState.renameConceptState })), editorState.showGoToLinePrompt && (_jsx(GoToLinePrompt, { fileEditorState: editorState }))] }) }), _jsx(\"div\", { className: \"panel__content file-editor__content\", children: _jsx(\"div\", { className: \"code-editor__container\", children: _jsx(\"div\", { className: \"code-editor__body\", ref: textInputRef }) }) })] }));\n});\n//# sourceMappingURL=PureFileEditor.js.map","import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { useEffect, useRef, useState } from 'react';\nimport { BaseMenu, BaseMenuItem, Menu } from './BaseMenu.js';\nexport const ControlledDropdownMenu = (props) => {\n const { open, className, children, menuProps, content, title, disabled, onClose, onOpen, useCapture, } = props;\n const triggerRef = useRef(null);\n const [anchorEl, setAnchorEl] = useState(null);\n const onTriggerClick = (event) => {\n event.stopPropagation();\n event.preventDefault();\n if (disabled) {\n return;\n }\n if (triggerRef.current) {\n onOpen?.();\n setAnchorEl(triggerRef.current);\n }\n };\n // if the menu is forced to open or close, set the anchor accordinly\n // NOTE: unlike normal clicking on the trigger, this way of forcing the menu to open will require\n // to call `onClose` explicitly\n useEffect(() => {\n if (open !== undefined) {\n if (open && !anchorEl && triggerRef.current) {\n setAnchorEl(triggerRef.current);\n }\n else if (!open && anchorEl) {\n setAnchorEl(null);\n }\n }\n }, [anchorEl, open]);\n return (_jsxs(_Fragment, { children: [_jsx(\"button\", { ref: triggerRef, className: className, disabled: disabled, ...(useCapture\n ? {\n onClickCapture: onTriggerClick,\n onClick: (event) => {\n event.stopPropagation();\n },\n }\n : { onClick: onTriggerClick }), title: title, children: children }), _jsx(Menu, { anchorOrigin: { vertical: 'bottom', horizontal: 'right' }, transformOrigin: { vertical: 'top', horizontal: 'right' }, anchorEl: anchorEl, open: (open === undefined || Boolean(open)) && Boolean(anchorEl), slotProps: {\n root: {\n slotProps: {\n backdrop: {\n invisible: true,\n },\n },\n },\n }, elevation: 0, marginThreshold: 0, disableRestoreFocus: true, hideBackdrop: true, transitionDuration: 0, onClick: () => {\n onClose?.();\n setAnchorEl(null);\n }, ...menuProps, children: content })] }));\n};\nexport function useDropdownMenu() {\n const [anchorEl, setAnchorEl] = useState(null);\n return [\n (event) => setAnchorEl(event.currentTarget),\n () => setAnchorEl(null),\n {\n anchorEl,\n onClose: () => setAnchorEl(null),\n },\n Boolean(anchorEl),\n ];\n}\nexport function DropdownMenu(props) {\n const { menuProps, children, onClosed, onClose, anchorEl } = props;\n // Make sure the first time the menu is opened, we don't trigger onLeave\n const [hasBeenOpened, setHasBeenOpened] = useState(false);\n useEffect(() => {\n if (hasBeenOpened && !anchorEl) {\n onClosed?.();\n }\n }, [anchorEl, hasBeenOpened, onClosed]);\n if (!anchorEl) {\n return null;\n }\n return (_jsx(BaseMenu, { anchorOrigin: { vertical: 'bottom', horizontal: 'right' }, transformOrigin: { vertical: 'top', horizontal: 'right' }, anchorEl: anchorEl, open: Boolean(anchorEl), slotProps: {\n root: {\n slotProps: {\n backdrop: {\n invisible: true,\n },\n },\n },\n transition: {\n onEnter: () => setHasBeenOpened(true),\n },\n }, elevation: 1, marginThreshold: 0, transitionDuration: 0, onClose: onClose, ...menuProps, children: children }));\n}\nexport function DropdownMenuItem(props) {\n return (_jsx(BaseMenuItem, { ...props, style: {\n cursor: 'default',\n } }));\n}\n//# sourceMappingURL=DropdownMenu.js.map","import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { forwardRef, useCallback, useEffect, useRef } from 'react';\nimport { observer } from 'mobx-react-lite';\nimport { DIAGRAM_ALIGNER_OPERATOR, DiagramRenderer, DIAGRAM_ZOOM_LEVELS, DIAGRAM_INTERACTION_MODE, DIAGRAM_RELATIONSHIP_EDIT_MODE, } from '@finos/legend-extension-dsl-diagram/application';\nimport { Point } from '@finos/legend-extension-dsl-diagram/graph';\nimport { useDrop } from 'react-dnd';\nimport { CONCEPT_TREE_DND_TYPE } from '../side-bar/ConceptTreeExplorer.js';\nimport { ConceptNode } from '../../server/models/ConceptTree.js';\nimport { flowResult } from 'mobx';\nimport { useApplicationStore, useCommands } from '@finos/legend-application';\nimport { AlignBottomIcon, AlignCenterIcon, AlignEndIcon, AlignMiddleIcon, AlignStartIcon, AlignTopIcon, CaretDownIcon, clsx, DistributeHorizontalIcon, DistributeVerticalIcon, ControlledDropdownMenu, GoToFileIcon, MenuContent, MenuContentDivider, MenuContentItem, MousePointerIcon, MoveIcon, useResizeDetector, ZoomInIcon, ZoomOutIcon, } from '@finos/legend-art';\nimport { usePureIDEStore } from '../PureIDEStoreProvider.js';\nimport { FileCoordinate } from '../../server/models/File.js';\nconst DiagramEditorDiagramCanvas = observer(forwardRef(function DiagramEditorDiagramCanvas(props, _ref) {\n const { diagramEditorState } = props;\n const applicationStore = useApplicationStore();\n const diagram = diagramEditorState.diagram;\n const ref = _ref;\n const { width, height } = useResizeDetector({\n refreshMode: 'debounce',\n refreshRate: 50,\n targetRef: ref,\n });\n useEffect(() => {\n const renderer = new DiagramRenderer(ref.current, diagram);\n diagramEditorState.setRenderer(renderer);\n diagramEditorState.setupRenderer();\n renderer.render({ initial: true });\n }, [ref, diagramEditorState, diagram]);\n useEffect(() => {\n // since after the diagram render is initialized, we start\n // showing the toolbar and the header, which causes the auto-zoom fit\n // to be off, we need to call this method again\n if (diagramEditorState.isDiagramRendererInitialized) {\n diagramEditorState.renderer.render({ initial: true });\n }\n }, [diagramEditorState, diagramEditorState.isDiagramRendererInitialized]);\n useEffect(() => {\n if (diagramEditorState.isDiagramRendererInitialized) {\n diagramEditorState.renderer.refresh();\n }\n }, [diagramEditorState, width, height]);\n // Drag and Drop\n const handleDrop = useCallback((item, monitor) => {\n if (item instanceof ConceptNode) {\n const dropPosition = monitor.getClientOffset();\n const position = dropPosition\n ? diagramEditorState.renderer.canvasCoordinateToModelCoordinate(diagramEditorState.renderer.eventCoordinateToCanvasCoordinate(new Point(dropPosition.x, dropPosition.y)))\n : undefined;\n flowResult(diagramEditorState.addClassView(item.li_attr.pureId, position)).catch(applicationStore.alertUnhandledError);\n }\n }, [applicationStore, diagramEditorState]);\n const [, dropConnector] = useDrop(() => ({\n accept: CONCEPT_TREE_DND_TYPE.CLASS,\n drop: (item, monitor) => handleDrop(item, monitor),\n }), [handleDrop]);\n dropConnector(ref);\n return (_jsx(\"div\", { ref: ref, className: clsx('diagram-canvas diagram-editor__canvas', diagramEditorState.diagramCursorClass), tabIndex: 0 }));\n}));\nconst DiagramEditorHeader = observer((props) => {\n const { diagramEditorState } = props;\n const ideStore = usePureIDEStore();\n const applicationStore = useApplicationStore();\n const goToFile = () => {\n flowResult(ideStore.loadFile(diagramEditorState.filePath, new FileCoordinate(diagramEditorState.filePath, diagramEditorState.fileLine, diagramEditorState.fileColumn))).catch(applicationStore.alertUnhandledError);\n };\n const createCenterZoomer = (zoomLevel) => () => {\n diagramEditorState.renderer.zoomCenter(zoomLevel / 100);\n };\n const zoomToFit = () => diagramEditorState.renderer.zoomToFit();\n const isAlignerDisabled = diagramEditorState.renderer.selectedClasses.length < 2;\n return (_jsxs(_Fragment, { children: [_jsxs(\"div\", { className: \"diagram-editor__header__group\", children: [_jsx(\"button\", { className: \"diagram-editor__header__action diagram-editor__header__group__action\", title: \"Align left\", disabled: isAlignerDisabled, tabIndex: -1, onClick: () => diagramEditorState.renderer.align(DIAGRAM_ALIGNER_OPERATOR.ALIGN_LEFT), children: _jsx(AlignStartIcon, { className: \"diagram-editor__icon--aligner\" }) }), _jsx(\"button\", { className: \"diagram-editor__header__action diagram-editor__header__group__action\", title: \"Align center\", disabled: isAlignerDisabled, tabIndex: -1, onClick: () => diagramEditorState.renderer.align(DIAGRAM_ALIGNER_OPERATOR.ALIGN_CENTER), children: _jsx(AlignCenterIcon, { className: \"diagram-editor__icon--aligner\" }) }), _jsx(\"button\", { className: \"diagram-editor__header__action diagram-editor__header__group__action\", title: \"Align right\", disabled: isAlignerDisabled, tabIndex: -1, onClick: () => diagramEditorState.renderer.align(DIAGRAM_ALIGNER_OPERATOR.ALIGN_RIGHT), children: _jsx(AlignEndIcon, { className: \"diagram-editor__icon--aligner\" }) })] }), _jsx(\"div\", { className: \"diagram-editor__header__group__separator\" }), _jsxs(\"div\", { className: \"diagram-editor__header__group\", children: [_jsx(\"button\", { className: \"diagram-editor__header__action diagram-editor__header__group__action\", title: \"Align top\", disabled: isAlignerDisabled, tabIndex: -1, onClick: () => diagramEditorState.renderer.align(DIAGRAM_ALIGNER_OPERATOR.ALIGN_TOP), children: _jsx(AlignTopIcon, { className: \"diagram-editor__icon--aligner\" }) }), _jsx(\"button\", { className: \"diagram-editor__header__action diagram-editor__header__group__action\", title: \"Align middle\", disabled: isAlignerDisabled, tabIndex: -1, onClick: () => diagramEditorState.renderer.align(DIAGRAM_ALIGNER_OPERATOR.ALIGN_MIDDLE), children: _jsx(AlignMiddleIcon, { className: \"diagram-editor__icon--aligner\" }) }), _jsx(\"button\", { className: \"diagram-editor__header__action diagram-editor__header__group__action\", title: \"Align bottom\", disabled: isAlignerDisabled, tabIndex: -1, onClick: () => diagramEditorState.renderer.align(DIAGRAM_ALIGNER_OPERATOR.ALIGN_BOTTOM), children: _jsx(AlignBottomIcon, { className: \"diagram-editor__icon--aligner\" }) })] }), _jsx(\"div\", { className: \"diagram-editor__header__group__separator\" }), _jsxs(\"div\", { className: \"diagram-editor__header__group\", children: [_jsx(\"button\", { className: \"diagram-editor__header__action diagram-editor__header__group__action\", title: \"Space horizontally\", disabled: isAlignerDisabled, tabIndex: -1, onClick: () => diagramEditorState.renderer.align(DIAGRAM_ALIGNER_OPERATOR.SPACE_HORIZONTALLY), children: _jsx(DistributeHorizontalIcon, { className: \"diagram-editor__icon--aligner\" }) }), _jsx(\"button\", { className: \"diagram-editor__header__action diagram-editor__header__group__action\", title: \"Space vertically\", disabled: isAlignerDisabled, tabIndex: -1, onClick: () => diagramEditorState.renderer.align(DIAGRAM_ALIGNER_OPERATOR.SPACE_VERTICALLY), children: _jsx(DistributeVerticalIcon, { className: \"diagram-editor__icon--aligner\" }) })] }), _jsxs(ControlledDropdownMenu, { className: \"diagram-editor__header__dropdown\", title: \"Zoom...\", content: _jsxs(MenuContent, { children: [_jsx(MenuContentItem, { className: \"diagram-editor__header__zoomer__dropdown__menu__item\", onClick: zoomToFit, children: \"Fit\" }), _jsx(MenuContentDivider, {}), DIAGRAM_ZOOM_LEVELS.map((zoomLevel) => (_jsxs(MenuContentItem, { className: \"diagram-editor__header__zoomer__dropdown__menu__item\", onClick: createCenterZoomer(zoomLevel), children: [zoomLevel, \"%\"] }, zoomLevel)))] }), menuProps: {\n anchorOrigin: { vertical: 'bottom', horizontal: 'right' },\n transformOrigin: { vertical: 'top', horizontal: 'right' },\n elevation: 7,\n }, children: [_jsxs(\"div\", { className: \"diagram-editor__header__dropdown__label diagram-editor__header__zoomer__dropdown__label\", children: [Math.round(diagramEditorState.renderer.zoom * 100), \"%\"] }), _jsx(\"div\", { className: \"diagram-editor__header__dropdown__trigger diagram-editor__header__zoomer__dropdown__trigger\", children: _jsx(CaretDownIcon, {}) })] }), _jsx(\"div\", { className: \"diagram-editor__header__actions\", children: _jsx(\"button\", { className: \"diagram-editor__header__action\", tabIndex: -1, onClick: goToFile, children: _jsx(GoToFileIcon, { className: \"diagram-editor__icon--go-to-file\" }) }) })] }));\n});\nconst DiagramEditorToolPanel = observer((props) => {\n const { diagramEditorState } = props;\n const renderer = diagramEditorState.renderer;\n const createModeSwitcher = (editMode, relationshipMode) => () => renderer.changeMode(editMode, relationshipMode);\n return (_jsxs(\"div\", { className: \"diagram-editor__tools\", children: [_jsx(\"button\", { className: clsx('diagram-editor__tool', {\n 'diagram-editor__tool--active': renderer.interactionMode === DIAGRAM_INTERACTION_MODE.LAYOUT,\n }), tabIndex: -1, onClick: createModeSwitcher(DIAGRAM_INTERACTION_MODE.LAYOUT, DIAGRAM_RELATIONSHIP_EDIT_MODE.NONE), title: \"View Tool (V)\", children: _jsx(MousePointerIcon, { className: \"diagram-editor__icon--layout\" }) }), _jsx(\"button\", { className: clsx('diagram-editor__tool', {\n 'diagram-editor__tool--active': renderer.interactionMode === DIAGRAM_INTERACTION_MODE.PAN,\n }), tabIndex: -1, onClick: createModeSwitcher(DIAGRAM_INTERACTION_MODE.PAN, DIAGRAM_RELATIONSHIP_EDIT_MODE.NONE), title: \"Pan Tool (M)\", children: _jsx(MoveIcon, { className: \"diagram-editor__icon--pan\" }) }), _jsx(\"button\", { className: clsx('diagram-editor__tool', {\n 'diagram-editor__tool--active': renderer.interactionMode === DIAGRAM_INTERACTION_MODE.ZOOM_IN,\n }), tabIndex: -1, title: \"Zoom In (Z)\", onClick: createModeSwitcher(DIAGRAM_INTERACTION_MODE.ZOOM_IN, DIAGRAM_RELATIONSHIP_EDIT_MODE.NONE), children: _jsx(ZoomInIcon, { className: \"diagram-editor__icon--zoom-in\" }) }), _jsx(\"button\", { className: clsx('diagram-editor__tool', {\n 'diagram-editor__tool--active': renderer.interactionMode === DIAGRAM_INTERACTION_MODE.ZOOM_OUT,\n }), tabIndex: -1, title: \"Zoom Out (Z)\", onClick: createModeSwitcher(DIAGRAM_INTERACTION_MODE.ZOOM_OUT, DIAGRAM_RELATIONSHIP_EDIT_MODE.NONE), children: _jsx(ZoomOutIcon, { className: \"diagram-editor__icon--zoom-out\" }) })] }));\n});\nexport const DiagramEditor = observer((props) => {\n const { diagramEditorState } = props;\n const diagramCanvasRef = useRef(null);\n useCommands(diagramEditorState);\n return (_jsxs(\"div\", { className: \"diagram-editor\", children: [_jsx(\"div\", { className: \"diagram-editor__header\", children: diagramEditorState.isDiagramRendererInitialized && (_jsx(DiagramEditorHeader, { diagramEditorState: diagramEditorState })) }), _jsx(\"div\", { className: \"diagram-editor__content\", children: _jsxs(\"div\", { className: \"diagram-editor__stage\", children: [diagramEditorState.isDiagramRendererInitialized && (_jsx(DiagramEditorToolPanel, { diagramEditorState: diagramEditorState })), _jsx(DiagramEditorDiagramCanvas, { diagramEditorState: diagramEditorState, ref: diagramCanvasRef })] }) })] }));\n});\n//# sourceMappingURL=DiagramEditor.js.map","import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { clsx } from 'clsx';\nimport { observer } from 'mobx-react-lite';\nimport { useEffect, forwardRef, useRef } from 'react';\nimport { useDragLayer, } from 'react-dnd';\nimport { getEmptyImage } from 'react-dnd-html5-backend';\nimport { VerticalDragHandleIcon } from '../icon/Icon.js';\nexport const PanelDropZone = (props) => {\n const { children, className, isDragOver, isDroppable, dropTargetConnector, contentClassName, disabled, } = props;\n const ref = useRef(null);\n dropTargetConnector(ref);\n return (_jsx(_Fragment, { children: !disabled ? (_jsxs(\"div\", { className: clsx('dnd__dropzone', className), ref: ref, children: [isDroppable && _jsx(\"div\", { className: \"dnd__dropzone--droppable\" }), isDragOver && _jsx(\"div\", { className: \"panel__dnd__dropzone__overlay\" }), _jsx(\"div\", { className: clsx('panel__dnd__dropzone__content', contentClassName), children: children })] })) : (children) }));\n};\nexport const PanelDnDEntry = observer(forwardRef(function PanelDnDEntry(props, ref) {\n const { children, placeholder, showPlaceholder, className, placeholderContainerClassName, } = props;\n return (_jsxs(\"div\", { ref: ref, className: clsx('dnd__entry__container', className), children: [showPlaceholder && (_jsx(\"div\", { className: clsx('dnd__entry__placeholder', placeholderContainerClassName), children: placeholder ? (_jsx(_Fragment, { children: placeholder })) : (_jsx(\"div\", { className: \"dnd__entry__placeholder__content\" })) })), _jsx(_Fragment, { children: children })] }));\n}));\nexport const PanelEntryDragHandle = (props) => {\n const { isDragging, dragSourceConnector, className, title } = props;\n return (_jsx(\"div\", { ref: dragSourceConnector, title: title ?? 'Drag Element', className: clsx('dnd__entry__handle__container', className, {\n 'dnd__entry__handle__container--dragging': isDragging,\n }), children: _jsx(\"div\", { className: \"dnd__entry-drag-handle\", children: _jsx(VerticalDragHandleIcon, {}) }) }));\n};\nexport const PanelEntryDropZonePlaceholder = (props) => {\n const { children, label, isDragOver, isDroppable, className, alwaysShowChildren, } = props;\n if (isDragOver || isDroppable) {\n return (_jsx(\"div\", { className: clsx([\n 'dnd__entry-dropzone__placeholder',\n className,\n {\n 'dnd__entry-dropzone__placeholder--active': isDragOver,\n 'dnd__entry-dropzone__placeholder--droppable': isDroppable,\n },\n ]), children: _jsx(\"div\", { className: clsx('dnd__entry-dropzone__placeholder__content', {\n 'dnd__entry-dropzone__placeholder__content--children': alwaysShowChildren,\n }), children: alwaysShowChildren ? (_jsx(_Fragment, { children: children })) : (_jsx(\"div\", { className: \"dnd__entry-dropzone__placeholder__label\", children: label ?? '' })) }) }));\n }\n return _jsx(_Fragment, { children: children });\n};\nexport const useDragPreviewLayer = (dragPreviewConnector) => {\n // hide default HTML5 preview image\n useEffect(() => {\n dragPreviewConnector(getEmptyImage());\n }, [dragPreviewConnector]);\n};\nexport function DragPreviewLayer(props) {\n const { labelGetter, types } = props;\n const { itemType, item, isDragging, currentPosition } = useDragLayer((monitor) => ({\n itemType: monitor.getItemType(),\n item: monitor.getItem(),\n isDragging: monitor.isDragging(),\n currentPosition: monitor.getClientOffset(),\n }));\n if (!isDragging ||\n !item ||\n !itemType ||\n !types.includes(itemType.toString())) {\n return null;\n }\n return (_jsx(\"div\", { className: \"dnd__drag-preview-layer\", children: _jsx(\"div\", { className: \"dnd__drag-preview-layer__content\", style: !currentPosition\n ? { display: 'none' }\n : {\n transform: `translate(${currentPosition.x / 10 + 2}rem, ${currentPosition.y / 10 + 1}rem)`,\n }, children: labelGetter(item) }) }));\n}\n//# sourceMappingURL=PanelDropZone.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { ChevronDownIcon, clsx, ContextMenu, DragPreviewLayer, ControlledDropdownMenu, MenuContent, MenuContentItem, PanelEntryDropZonePlaceholder, TimesIcon, useDragPreviewLayer, MenuContentDivider, PushPinIcon, } from '@finos/legend-art';\nimport { observer } from 'mobx-react-lite';\nimport { useRef, useCallback } from 'react';\nimport { useDrop, useDrag } from 'react-dnd';\nexport const TAB_MANAGER__TAB_TEST_ID = 'tab-manager__tab';\nconst horizontalToVerticalScroll = (event) => {\n // if scrolling is more horizontal than vertical, there's nothing much to do, the OS should handle it just fine\n // else, intercept\n if (Math.abs(event.deltaY) <= Math.abs(event.deltaX)) {\n return;\n }\n event.stopPropagation();\n let deltaX;\n // NOTE: only convert horizontal to vertical scroll when the scroll causes more horizontal than vertical displacement\n // let the direction of `deltaY` be the direction of the scroll, i.e.\n // - if we scroll upward, that translate to a left scroll\n // - if we scroll downward, that translates to a right scroll\n if (event.deltaY === 0) {\n deltaX = event.deltaY;\n }\n else if (event.deltaY < 0) {\n deltaX = -Math.abs(event.deltaY);\n }\n else {\n deltaX = Math.abs(event.deltaY);\n }\n event.currentTarget.scrollBy(deltaX, 0);\n};\nconst TabContextMenu = observer((props) => {\n const { tabState, managerTabState } = props;\n const close = () => managerTabState.closeTab(tabState);\n const closeOthers = () => managerTabState.closeAllOtherTabs(tabState);\n const closeAll = () => managerTabState.closeAllTabs();\n const togglePin = () => {\n if (tabState.isPinned) {\n managerTabState.unpinTab(tabState);\n }\n else {\n managerTabState.pinTab(tabState);\n }\n };\n return (_jsxs(MenuContent, { children: [_jsx(MenuContentItem, { onClick: close, children: \"Close\" }), _jsx(MenuContentItem, { disabled: managerTabState.tabs.length < 2, onClick: closeOthers, children: \"Close Others\" }), _jsx(MenuContentItem, { onClick: closeAll, children: \"Close All\" }), _jsx(MenuContentDivider, {}), _jsx(MenuContentItem, { onClick: togglePin, children: tabState.isPinned ? 'Unpin' : 'Pin' })] }));\n});\nconst Tab = observer((props) => {\n const ref = useRef(null);\n const { tabManagerState, tabState, tabRenderer } = props;\n // Drag and Drop\n const handleHover = useCallback((item, monitor) => {\n const draggingTab = item.tab;\n const hoveredTab = tabState;\n const dragIndex = tabManagerState.tabs.findIndex((e) => e === draggingTab);\n const hoverIndex = tabManagerState.tabs.findIndex((e) => e === hoveredTab);\n const hoverBoundingReact = ref.current?.getBoundingClientRect();\n const distanceThreshold = ((hoverBoundingReact?.left ?? 0) - (hoverBoundingReact?.right ?? 0)) /\n 2;\n const dragDistance = (monitor.getClientOffset()?.x ?? 0) -\n (hoverBoundingReact?.right ?? 0);\n if (dragIndex < hoverIndex && dragDistance < distanceThreshold) {\n return;\n }\n if (dragIndex > hoverIndex && dragDistance > distanceThreshold) {\n return;\n }\n tabManagerState.swapTabs(draggingTab, hoveredTab);\n }, [tabManagerState, tabState]);\n const closeTabOnMiddleClick = (currTab) => (event) => {\n if (event.nativeEvent.button === 1) {\n tabManagerState.closeTab(currTab);\n }\n };\n const [{ isBeingDraggedEditorPanel }, dropConnector] = useDrop(() => ({\n accept: [tabManagerState.dndType],\n hover: (item, monitor) => handleHover(item, monitor),\n collect: (monitor) => ({\n isBeingDraggedEditorPanel: monitor.getItem()\n ?.tab,\n }),\n }), [handleHover]);\n const isBeingDragged = tabState === isBeingDraggedEditorPanel;\n const [, dragConnector, dragPreviewConnector] = useDrag(() => ({\n type: tabManagerState.dndType,\n item: () => ({\n tab: tabState,\n }),\n }), [tabState, tabManagerState]);\n dragConnector(dropConnector(ref));\n useDragPreviewLayer(dragPreviewConnector);\n return (_jsx(\"div\", { ref: ref, \"data-testid\": TAB_MANAGER__TAB_TEST_ID, className: clsx('tab-manager__tab', {\n 'tab-manager__tab--active': tabState === tabManagerState.currentTab,\n 'tab-manager__tab--dragged': isBeingDragged,\n }), onMouseUp: closeTabOnMiddleClick(tabState), children: _jsx(PanelEntryDropZonePlaceholder, { isDragOver: false, className: \"tab-manager__tab__dnd__placeholder\", children: _jsxs(ContextMenu, { content: _jsx(TabContextMenu, { tabState: tabState, managerTabState: tabManagerState }), className: \"tab-manager__tab__content\", children: [_jsx(\"button\", { className: \"tab-manager__tab__label\", tabIndex: -1, onClick: () => tabManagerState.openTab(tabState), title: tabState.description, children: tabRenderer?.(tabState) ?? tabState.label }), tabState.isPinned && (_jsx(\"button\", { className: \"tab-manager__tab__pin-btn\", onClick: () => tabManagerState.unpinTab(tabState), tabIndex: -1, title: \"Unpin\", children: _jsx(PushPinIcon, {}) })), !tabState.isPinned && (_jsx(\"button\", { className: \"tab-manager__tab__close-btn\", onClick: () => tabManagerState.closeTab(tabState), tabIndex: -1, title: \"Close\", children: _jsx(TimesIcon, {}) }))] }) }) }));\n});\nconst TabMenu = observer((props) => {\n const { managerTabState } = props;\n return (_jsx(ControlledDropdownMenu, { className: \"tab-manager__menu__toggler\", title: \"Show All Tabs\", content: _jsx(MenuContent, { className: \"tab-manager__menu\", children: managerTabState.tabs.map((tabState) => (_jsxs(MenuContentItem, { className: clsx('tab-manager__menu__item', {\n 'tab-manager__menu__item--active': tabState === managerTabState.currentTab,\n }), onClick: () => managerTabState.openTab(tabState), children: [_jsx(\"div\", { className: \"tab-manager__menu__item__label\", children: tabState.label }), _jsx(\"div\", { className: \"tab-manager__menu__item__close-btn\", onClick: (event) => {\n // NOTE: prevent default action of dropdown menu\n event.stopPropagation();\n managerTabState.closeTab(tabState);\n }, tabIndex: -1, title: \"Close\", children: _jsx(TimesIcon, {}) })] }, tabState.uuid))) }), menuProps: {\n anchorOrigin: { vertical: 'bottom', horizontal: 'right' },\n transformOrigin: { vertical: 'top', horizontal: 'right' },\n }, children: _jsx(ChevronDownIcon, {}) }));\n});\nexport const TabManager = observer((props) => {\n const { tabManagerState, tabRenderer } = props;\n return (_jsxs(\"div\", { className: \"tab-manager\", children: [_jsxs(\"div\", { className: \"tab-manager__content\", onWheel: horizontalToVerticalScroll, children: [tabManagerState.tabs.map((tab) => (_jsx(Tab, { tabState: tab, tabManagerState: tabManagerState, tabRenderer: tabRenderer }, tab.uuid))), _jsx(DragPreviewLayer, { labelGetter: (item) => item.tab.label, types: [tabManagerState.dndType] })] }), _jsx(TabMenu, { managerTabState: tabManagerState })] }));\n});\n//# sourceMappingURL=TabManager.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { useEffect, useState } from 'react';\nimport { observer } from 'mobx-react-lite';\nimport { FileEditorState } from '../../stores/FileEditorState.js';\nimport { GenericFileEditor } from './GenericFileEditor.js';\nimport { PureFileEditor } from './PureFileEditor.js';\nimport { clsx, FileAltIcon, LockIcon, PlusIcon, useResizeDetector, } from '@finos/legend-art';\nimport { DiagramEditorState } from '../../stores/DiagramEditorState.js';\nimport { DiagramEditor } from './DiagramEditor.js';\nimport { usePureIDEStore } from '../PureIDEStoreProvider.js';\nimport { PURE_DiagramIcon } from '../shared/ConceptIconUtils.js';\nimport { TabManager } from '@finos/legend-lego/application';\nimport { CODE_EDITOR_LANGUAGE } from '@finos/legend-code-editor';\nconst EditorGroupSplashScreen = () => {\n const commandListWidth = 300;\n const commandListHeight = 150;\n const [showCommandList, setShowCommandList] = useState(false);\n const { ref, width, height } = useResizeDetector();\n useEffect(() => {\n setShowCommandList((width ?? 0) > commandListWidth && (height ?? 0) > commandListHeight);\n }, [width, height]);\n return (_jsx(\"div\", { ref: ref, className: \"editor-group__splash-screen\", children: _jsxs(\"div\", { className: clsx('editor-group__splash-screen__content', {\n 'editor-group__splash-screen__content--hidden': !showCommandList,\n }), children: [_jsxs(\"div\", { className: \"editor-group__splash-screen__content__item\", children: [_jsx(\"div\", { className: \"editor-group__splash-screen__content__item__label\", children: `Run the go() function` }), _jsx(\"div\", { className: \"editor-group__splash-screen__content__item__hot-keys\", children: _jsx(\"div\", { className: \"hotkey__key\", children: \"F9\" }) })] }), _jsxs(\"div\", { className: \"editor-group__splash-screen__content__item\", children: [_jsx(\"div\", { className: \"editor-group__splash-screen__content__item__label\", children: \"Run the full test suite\" }), _jsx(\"div\", { className: \"editor-group__splash-screen__content__item__hot-keys\", children: _jsx(\"div\", { className: \"hotkey__key\", children: \"F10\" }) })] }), _jsxs(\"div\", { className: \"editor-group__splash-screen__content__item\", children: [_jsx(\"div\", { className: \"editor-group__splash-screen__content__item__label\", children: \"Search for a file\" }), _jsxs(\"div\", { className: \"editor-group__splash-screen__content__item__hot-keys\", children: [_jsx(\"div\", { className: \"hotkey__key\", children: \"Ctrl\" }), _jsx(\"div\", { className: \"hotkey__plus\", children: _jsx(PlusIcon, {}) }), _jsx(\"div\", { className: \"hotkey__key\", children: \"P\" })] })] })] }) }));\n};\nexport const EditorGroup = observer(() => {\n const ideStore = usePureIDEStore();\n const currentTab = ideStore.tabManagerState.currentTab;\n const renderActiveEditorState = () => {\n if (currentTab instanceof FileEditorState) {\n if (currentTab.textEditorState.language === CODE_EDITOR_LANGUAGE.PURE) {\n return _jsx(PureFileEditor, { editorState: currentTab });\n }\n return _jsx(GenericFileEditor, { editorState: currentTab });\n }\n else if (currentTab instanceof DiagramEditorState) {\n return _jsx(DiagramEditor, { diagramEditorState: currentTab });\n }\n return null;\n };\n const renderTab = (editorState) => {\n if (editorState instanceof FileEditorState) {\n const showMoreInfo = ideStore.tabManagerState.tabs.filter((tab) => tab instanceof FileEditorState &&\n tab.fileName === editorState.fileName).length > 1;\n return (_jsxs(\"div\", { className: \"editor-group__header__tab\", children: [_jsx(\"div\", { className: \"editor-group__header__tab__icon\", children: _jsx(FileAltIcon, { className: \"editor-group__header__tab__icon--file\" }) }), _jsx(\"div\", { className: \"editor-group__header__tab__label\", children: editorState.fileName }), showMoreInfo && (_jsx(\"div\", { className: \"editor-group__header__tab__path\", children: editorState.filePath })), editorState.file.RO && (_jsx(\"div\", { className: \"editor-group__header__tab__icon\", children: _jsx(LockIcon, { className: \"editor-group__header__tab__icon--readonly\" }) }))] }));\n }\n else if (editorState instanceof DiagramEditorState) {\n const showMoreInfo = ideStore.tabManagerState.tabs.filter((tab) => tab instanceof DiagramEditorState &&\n tab.diagramName === editorState.diagramName).length > 1;\n return (_jsxs(\"div\", { className: \"editor-group__header__tab\", children: [_jsx(\"div\", { className: \"editor-group__header__tab__icon\", children: _jsx(PURE_DiagramIcon, {}) }), _jsx(\"div\", { className: \"editor-group__header__tab__label\", children: editorState.diagramName }), showMoreInfo && (_jsx(\"div\", { className: \"editor-group__header__tab__path\", children: editorState.diagramPath }))] }));\n }\n return editorState.label;\n };\n if (!currentTab) {\n return _jsx(EditorGroupSplashScreen, {});\n }\n return (_jsxs(\"div\", { className: \"panel editor-group\", children: [_jsxs(\"div\", { className: \"panel__header editor-group__header\", children: [_jsx(\"div\", { className: \"editor-group__header__tabs\", children: _jsx(TabManager, { tabManagerState: ideStore.tabManagerState, tabRenderer: renderTab }) }), _jsx(\"div\", { className: \"panel__header__actions\" })] }), _jsx(\"div\", { className: \"panel__content editor-group__content\", children: renderActiveEditorState() }, currentTab.uuid)] }));\n});\n//# sourceMappingURL=EditorGroup.js.map","import { jsx as _jsx } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport React, { useRef, useEffect } from 'react';\nimport { CaretDownIcon, TimesIcon, CircleNotchIcon } from '../icon/Icon.js';\nimport { FixedSizeList } from 'react-window';\nimport Select, { components as ReactSelectComponents, createFilter, } from 'react-select';\nimport { clsx } from '../utils/ComponentUtils.js';\nimport CreatableSelect, {} from 'react-select/creatable';\nexport { createFilter };\n// Create props for buttons within selector input option to ensure\n// we don't trigger selector dropdown menu when clicking on these buttons\n// NOTE: react-selector uses `mousedown` event instead of `onclick`\n// See https://stackoverflow.com/a/55663995\nexport const getSelectorInputOptionEmbeddedButtonProps = () => ({\n onMouseDown: (event) => {\n event.stopPropagation();\n event.preventDefault();\n },\n});\n/**\n * This custom list component uses virtualization from `react-window` to help improve performance of\n * `react-select` with large list\n * See https://github.com/bvaughn/react-window/issues/83\n * See https://react-window.now.sh/#/examples/list/fixed-size\n */\nconst CustomMenuList = (props) => {\n const { options, children, getValue, selectProps } = props;\n // Get row height in pixel since `react-window` does not support `rem`\n // See https://stackoverflow.com/questions/45001097/convert-rem-to-px-without-reflow\n let rowHeight = selectProps.optionCustomization?.rowHeight ??\n parseInt(getComputedStyle(document.documentElement).fontSize, 10) * 3.5;\n rowHeight = isNaN(rowHeight) ? 35 : rowHeight;\n const MAX_OPTIONS_LENGTH = 6;\n const [value] = getValue();\n const initialOffset = value ? options.indexOf(value) * rowHeight : 0;\n const scrollToIndex = Array.isArray(children) && children.length\n ? children.findIndex((child) => child.props.isFocused)\n : 0;\n // We use `scrollToItem` function to make it possible for react-select to focus on item within `react-window`\n // If we don't have this, if we search and use up/down arrow and once we get past the initial view-able values\n // the list doesn't auto scroll\n // See https://github.com/JedWatson/react-select/issues/2850\n const listRef = useRef(null);\n useEffect(() => {\n listRef.current?.scrollToItem(scrollToIndex);\n }, [scrollToIndex]);\n // Checking for the children list in case there is no match and the list height shrinks down to 0\n // which causes `react-window` to throw an error\n if (Array.isArray(children) && children.length) {\n return (_jsx(FixedSizeList, { className: selectProps.darkMode ? 'scrollbar--light selector-menu--dark' : '', ref: listRef, width: \"100%\", height: Math.min(children.length, MAX_OPTIONS_LENGTH) * rowHeight, itemCount: children.length, itemSize: rowHeight, initialScrollOffset: initialOffset, children: ({ index, style }) => (_jsx(\"div\", { style: style, className: \"selector-input__option-wrapper\", children: children[index] })) }));\n }\n // TODO: Maybe a no option thing here\n return (_jsx(\"div\", { className: `selector-menu--no-match ${selectProps.darkMode ? 'selector-menu--dark' : ''}`, children: selectProps.noMatchMessage ?? 'No match found' }));\n};\nconst CustomOption = (props) => {\n const { children, selectProps } = props;\n return (_jsx(ReactSelectComponents.Option, { ...props, className: clsx(!selectProps.darkMode\n ? {\n 'selector-input__option': true,\n 'selector-input__option--is-focused': props.isFocused,\n 'selector-input__option--is-selected': props.isSelected,\n }\n : {\n 'selector-input--dark__option': true,\n 'selector-input--dark__option--is-focused': props.isFocused,\n 'selector-input--dark__option--is-selected': props.isSelected,\n }, {\n 'selector-input__option--custom': Boolean(selectProps.optionCustomization),\n }), children: children }));\n};\nexport const STYLE_PREFIX = 'selector-input';\nexport const STYLE_PREFIX__DARK = 'selector-input--dark';\nconst LoadingIndicator = () => (_jsx(\"div\", { className: `${STYLE_PREFIX}__indicator ${STYLE_PREFIX}__loading-indicator ${STYLE_PREFIX__DARK}__loading-indicator`, children: _jsx(CircleNotchIcon, {}) }));\nconst DropdownIndicator = () => (_jsx(\"div\", { className: `${STYLE_PREFIX}__indicator ${STYLE_PREFIX}__dropdown-indicator`, children: _jsx(CaretDownIcon, {}) }));\nconst ClearIndicator = (props) => {\n const { innerProps: { ref, ...restInnerProps }, } = props;\n return (_jsx(\"div\", { ...restInnerProps, ref: ref, children: _jsx(\"div\", { className: `${STYLE_PREFIX}__indicator ${STYLE_PREFIX}__clear-indicator`, children: _jsx(TimesIcon, {}) }) }));\n};\n// Enable edit of the selected tag\n// See https://github.com/JedWatson/react-select/issues/1558\nconst CustomInput = (props) => {\n return (_jsx(ReactSelectComponents.Input, { ...props, onPaste: props.selectProps.onPaste, name: props.selectProps.inputName, isHidden: false }));\n};\nexport const CustomSelectorInput = (props) => {\n const { allowCreating, noMatchMessage, disabled, components, className, darkMode, hasError, value, onChange, inputRef, placeholder, ...innerProps } = props;\n // Typescript cannot union the 2 types due to many dissimilarities, this goes on to confuse React.createElement\n // See https://github.com/Microsoft/TypeScript/issues/28631\n // See https://github.com/microsoft/TypeScript/issues/28768\n // The issue is addressed better here\n // See https://github.com/microsoft/TypeScript/issues/28795\n // And the root problem as mentioned\n // See https://github.com/microsoft/TypeScript/issues/7294\n //\n // NOTE: since we're using an outdated version of `react-select`, we would get type issue\n // when we update to `react@18`\n // See https://github.com/finos/legend-studio/issues/615\n const Component = allowCreating ? CreatableSelect : Select;\n const stylePrefix = darkMode ? STYLE_PREFIX__DARK : STYLE_PREFIX;\n return (_jsx(Component, { \n // Make the menu always on top\n styles: {\n menuPortal: (base) => ({\n ...base,\n zIndex: 9999,\n }),\n }, menuPortalTarget: document.body, \n // coercing a type for ref as we will eventually remove dependency on `react-select`\n // See https://github.com/finos/legend-studio/issues/615\n ref: inputRef, value: value === undefined ? null : value, onChange: onChange, isDisabled: Boolean(disabled), className: clsx(stylePrefix, className, {\n 'selector-input--has-error': hasError,\n 'selector-input--custom': Boolean(props.optionCustomization),\n }), classNamePrefix: stylePrefix, components: {\n Option: CustomOption,\n ClearIndicator,\n DropdownIndicator,\n LoadingIndicator,\n MenuList: CustomMenuList,\n Input: CustomInput,\n ...components,\n }, placeholder: placeholder ?? '', ...innerProps,\n darkMode,\n noMatchMessage }));\n};\nexport const compareLabelFn = (a, b) => a.label.localeCompare(b.label);\n//# sourceMappingURL=CustomSelectorInput.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { useMemo, useRef } from 'react';\nimport { observer } from 'mobx-react-lite';\nimport { flowResult } from 'mobx';\nimport { clsx, compareLabelFn, CustomSelectorInput, Dialog, RegexIcon, } from '@finos/legend-art';\nimport { debounce } from '@finos/legend-shared';\nimport { useApplicationStore } from '@finos/legend-application';\nimport { usePureIDEStore } from '../PureIDEStoreProvider.js';\nexport const FileSearchCommand = observer(() => {\n const ideStore = usePureIDEStore();\n const applicationStore = useApplicationStore();\n const loadingOptionsState = ideStore.fileSearchCommandLoadState;\n const searchState = ideStore.fileSearchCommandState;\n const selectorRef = useRef(null);\n // configs\n const toggleRegExp = () => searchState.setRegExp(!searchState.isRegExp);\n // actions\n const debouncedSearch = useMemo(() => debounce(() => {\n flowResult(ideStore.searchFile()).catch(applicationStore.alertUnhandledError);\n }, 500), [applicationStore, ideStore]);\n const closeModal = () => ideStore.setOpenFileSearchCommand(false);\n const onSearchTextChange = (val) => {\n searchState.setText(val);\n debouncedSearch.cancel();\n debouncedSearch();\n };\n const openFile = (val) => {\n if (val?.value) {\n closeModal();\n searchState.reset();\n flowResult(ideStore.loadFile(val.value)).catch(applicationStore.alertUnhandledError);\n }\n };\n const handleEnter = () => {\n selectorRef.current?.focus();\n };\n return (_jsx(Dialog, { open: ideStore.openFileSearchCommand, onClose: closeModal, classes: { container: 'command-modal__container' }, slotProps: {\n transition: { onEnter: handleEnter },\n paper: { classes: { root: 'command-modal__inner-container' } },\n }, children: _jsxs(\"div\", { className: \"modal modal--dark command-modal\", children: [_jsx(\"div\", { className: \"modal__title\", children: \"Open file\" }), _jsxs(\"div\", { className: \"command-modal__content\", children: [_jsx(CustomSelectorInput, { inputRef: selectorRef, className: \"command-modal__content__input\", options: ideStore.fileSearchCommandResults\n .map((option) => ({ label: option, value: option }))\n .sort(compareLabelFn), onChange: openFile, onInputChange: onSearchTextChange, placeholder: \"Enter file name or path\", escapeClearsValue: true, darkMode: !applicationStore.layoutService\n .TEMPORARY__isLightColorThemeEnabled, isLoading: loadingOptionsState.isInProgress }), _jsx(\"button\", { className: clsx('command-modal__content__config-btn btn--sm', {\n 'command-modal__content__config-btn--toggled': searchState.isRegExp,\n }), title: `Use Regular Expression (${searchState.isRegExp ? 'on' : 'off'})`, onClick: toggleRegExp, children: _jsx(RegexIcon, {}) })] })] }) }));\n});\n//# sourceMappingURL=FileSearchCommand.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport var LEGEND_PURE_IDE_ROUTE_PATTERN_TOKEN;\n(function (LEGEND_PURE_IDE_ROUTE_PATTERN_TOKEN) {\n LEGEND_PURE_IDE_ROUTE_PATTERN_TOKEN[\"MODE\"] = \"mode\";\n LEGEND_PURE_IDE_ROUTE_PATTERN_TOKEN[\"FAST_COMPILE\"] = \"fastCompile\";\n})(LEGEND_PURE_IDE_ROUTE_PATTERN_TOKEN || (LEGEND_PURE_IDE_ROUTE_PATTERN_TOKEN = {}));\n//# sourceMappingURL=LegendPureIDENavigation.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { observer } from 'mobx-react-lite';\nimport { compareLabelFn, CustomSelectorInput, Dialog, } from '@finos/legend-art';\nimport { useApplicationStore } from '@finos/legend-application';\nimport { usePureIDEStore } from '../PureIDEStoreProvider.js';\nimport { flowResult } from 'mobx';\nimport { useRef, useState } from 'react';\nfunction buildPCTAdapterOption(adapter) {\n return {\n label: adapter.name === '' ? adapter.func : adapter.name,\n value: adapter,\n };\n}\nexport const SelectPCTAdapterCommand = observer(() => {\n const ideStore = usePureIDEStore();\n const applicationStore = useApplicationStore();\n const selectorRef = useRef(null);\n const [menuOpen, setMenuOpen] = useState(false);\n const closeModal = () => ideStore.setPCTRunPath(undefined);\n const runPCT = (val) => {\n if (val) {\n ideStore.setSelectedPCTAdapter(val.value);\n if (ideStore.PCTRunPath) {\n flowResult(ideStore.executeTests(ideStore.PCTRunPath, false, ideStore.selectedPCTAdapter?.func)).catch(applicationStore.alertUnhandledError);\n }\n closeModal();\n }\n };\n const handleEnter = () => {\n selectorRef.current?.focus();\n };\n return (_jsx(Dialog, { open: Boolean(ideStore.PCTRunPath), onClose: closeModal, classes: { container: 'command-modal__container' }, slotProps: {\n transition: { onEnter: handleEnter },\n paper: { classes: { root: 'command-modal__inner-container' } },\n }, children: _jsxs(\"div\", { className: \"modal modal--dark command-modal\", children: [_jsx(\"div\", { className: \"modal__title\", children: \"Select PCT Adapter\" }), _jsx(\"div\", { className: \"command-modal__content\", children: _jsx(CustomSelectorInput, { inputRef: selectorRef, className: \"command-modal__content__input\", options: ideStore.PCTAdapters.map(buildPCTAdapterOption).sort(compareLabelFn), onMenuOpen: () => setMenuOpen(true), onMenuClose: () => setMenuOpen(false), onKeyDown: (event) => {\n if (event.key === 'Enter' &&\n ideStore.selectedPCTAdapter &&\n !menuOpen) {\n event.stopPropagation();\n event.preventDefault();\n runPCT(buildPCTAdapterOption(ideStore.selectedPCTAdapter));\n }\n }, value: ideStore.selectedPCTAdapter\n ? buildPCTAdapterOption(ideStore.selectedPCTAdapter)\n : null, onChange: runPCT, placeholder: \"Select a PCT adapter\", escapeClearsValue: true, darkMode: !applicationStore.layoutService\n .TEMPORARY__isLightColorThemeEnabled }) })] }) }));\n});\n//# sourceMappingURL=SelectPCTAdapterCommand.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { useEffect } from 'react';\nimport { observer } from 'mobx-react-lite';\nimport { PanelGroup } from './panel-group/PanelGroup.js';\nimport { SideBar } from './side-bar/SideBar.js';\nimport { ActivityBar } from './ActivityBar.js';\nimport { withEditorStore, usePureIDEStore } from './PureIDEStoreProvider.js';\nimport { StatusBar } from './StatusBar.js';\nimport { EditorGroup } from './editor-group/EditorGroup.js';\nimport { FileSearchCommand } from './command-center/FileSearchCommand.js';\nimport { flowResult } from 'mobx';\nimport { useApplicationStore, useCommands } from '@finos/legend-application';\nimport { useResizeDetector, ResizablePanelSplitterLine, ResizablePanel, ResizablePanelGroup, ResizablePanelSplitter, getCollapsiblePanelGroupProps, } from '@finos/legend-art';\nimport { LEGEND_PURE_IDE_ROUTE_PATTERN_TOKEN } from '../__lib__/LegendPureIDENavigation.js';\nimport { SelectPCTAdapterCommand } from './command-center/SelectPCTAdapterCommand.js';\nexport const Editor = withEditorStore(observer(() => {\n const ideStore = usePureIDEStore();\n const applicationStore = useApplicationStore();\n // layout\n const { ref, width, height } = useResizeDetector();\n // These create snapping effect on panel resizing\n const resizeSideBar = (handleProps) => ideStore.sideBarDisplayState.setSize(handleProps.domElement.getBoundingClientRect()\n .width);\n const resizePanel = (handleProps) => ideStore.panelGroupDisplayState.setSize(handleProps.domElement.getBoundingClientRect()\n .height);\n const collapsibleSideBarGroupProps = getCollapsiblePanelGroupProps(ideStore.sideBarDisplayState.size === 0, {\n onStopResize: resizeSideBar,\n size: ideStore.sideBarDisplayState.size,\n });\n const collapsiblePanelGroupProps = getCollapsiblePanelGroupProps(ideStore.panelGroupDisplayState.size === 0, {\n onStopResize: resizePanel,\n size: ideStore.panelGroupDisplayState.size,\n });\n const maximizedCollapsiblePanelGroupProps = getCollapsiblePanelGroupProps(ideStore.panelGroupDisplayState.isMaximized);\n useEffect(() => {\n if (ref.current) {\n ideStore.panelGroupDisplayState.setMaxSize(ref.current.offsetHeight);\n }\n }, [ideStore, ref, height, width]);\n // Cleanup the editor\n useEffect(() => () => {\n ideStore.cleanUp();\n }, [ideStore]);\n // Initialize the app\n useEffect(() => {\n flowResult(ideStore.initialize(false, undefined, applicationStore.navigationService.navigator.getCurrentLocationParameterValue(LEGEND_PURE_IDE_ROUTE_PATTERN_TOKEN.MODE), applicationStore.navigationService.navigator.getCurrentLocationParameterValue(LEGEND_PURE_IDE_ROUTE_PATTERN_TOKEN.FAST_COMPILE))).catch(applicationStore.alertUnhandledError);\n }, [ideStore, applicationStore]);\n useEffect(() => {\n applicationStore.navigationService.navigator.blockNavigation([() => true], undefined, () => applicationStore.notificationService.notifyWarning(`Navigation from the editor is blocked`));\n return () => {\n applicationStore.navigationService.navigator.unblockNavigation();\n };\n }, [ideStore, applicationStore]);\n useCommands(ideStore);\n return (_jsxs(\"div\", { className: \"ide\", children: [_jsxs(\"div\", { className: \"ide__body\", children: [_jsx(ActivityBar, {}), _jsx(\"div\", { className: \"ide__content-container\", ref: ref, children: _jsx(\"div\", { className: \"ide__content\", children: _jsxs(ResizablePanelGroup, { orientation: \"vertical\", children: [_jsx(ResizablePanel, { ...collapsibleSideBarGroupProps.collapsiblePanel, direction: 1, children: _jsx(SideBar, {}) }), _jsx(ResizablePanelSplitter, {}), _jsx(ResizablePanel, { ...collapsibleSideBarGroupProps.remainingPanel, minSize: 300, children: _jsxs(ResizablePanelGroup, { orientation: \"horizontal\", children: [_jsx(ResizablePanel, { ...maximizedCollapsiblePanelGroupProps.collapsiblePanel, ...(ideStore.panelGroupDisplayState.size === 0\n ? collapsiblePanelGroupProps.remainingPanel\n : {}), children: _jsx(EditorGroup, {}) }), _jsx(ResizablePanelSplitter, { children: _jsx(ResizablePanelSplitterLine, { color: ideStore.panelGroupDisplayState.isMaximized\n ? 'transparent'\n : 'var(--color-dark-grey-250)' }) }), _jsx(ResizablePanel, { ...collapsiblePanelGroupProps.collapsiblePanel, ...(ideStore.panelGroupDisplayState.isMaximized\n ? maximizedCollapsiblePanelGroupProps.remainingPanel\n : {}), direction: -1, children: _jsx(PanelGroup, {}) })] }) })] }) }) })] }), _jsx(StatusBar, {}), _jsx(FileSearchCommand, {}), _jsx(SelectPCTAdapterCommand, {})] }));\n}));\n//# sourceMappingURL=PureIDE.js.map","import { Fragment as _Fragment, jsx as _jsx } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { useEffect } from 'react';\nimport { observer } from 'mobx-react-lite';\nimport { ApplicationComponentFrameworkProvider, SimpleApplicationComponentFrameworkProvider, } from './ApplicationComponentFrameworkProvider.js';\nimport { useApplicationStore } from './ApplicationStoreProvider.js';\nimport { useApplicationPlatform } from './ApplicationPlatformProvider.js';\nexport const ApplicationFrameworkProvider = observer((props) => {\n const { children, simple, enableTransitions, customFonts, disableVirtualAssistant, } = props;\n const platform = useApplicationPlatform();\n const applicationStore = useApplicationStore();\n useEffect(() => {\n applicationStore\n .initialize(platform)\n .catch(applicationStore.alertUnhandledError);\n }, [applicationStore, platform]);\n if (!applicationStore.initState.hasSucceeded) {\n return _jsx(_Fragment, {});\n }\n // TODO: would be great if we can have <React.StrictMode> here but since Mobx React is not ready for\n // concurrency yet, we would have to wait\n // See https://github.com/mobxjs/mobx/issues/2526\n if (simple) {\n return (_jsx(SimpleApplicationComponentFrameworkProvider, { enableTransitions: enableTransitions, customFonts: customFonts, children: children }));\n }\n return (_jsx(ApplicationComponentFrameworkProvider, { enableTransitions: enableTransitions, customFonts: customFonts, disableVirtualAssistant: disableVirtualAssistant, children: children }));\n});\n//# sourceMappingURL=ApplicationFrameworkProvider.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport class LegendPureIDEBaseStore {\n applicationStore;\n pluginManager;\n constructor(applicationStore) {\n this.applicationStore = applicationStore;\n this.pluginManager = applicationStore.pluginManager;\n }\n}\n//# sourceMappingURL=LegendPureIDEBaseStore.js.map","import { jsx as _jsx } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { createContext } from 'react';\nimport { useLocalObservable } from 'mobx-react-lite';\nimport { ApplicationFrameworkProvider, useApplicationStore, } from '@finos/legend-application';\nimport { LegendPureIDEBaseStore, } from '../stores/LegendPureIDEBaseStore.js';\nexport const useLegendPureIDEApplicationStore = () => useApplicationStore();\nconst LegendPureIDEBaseStoreContext = createContext(undefined);\nconst LegendPureIDEBaseStoreProvider = ({ children }) => {\n const applicationStore = useLegendPureIDEApplicationStore();\n const store = useLocalObservable(() => new LegendPureIDEBaseStore(applicationStore));\n return (_jsx(LegendPureIDEBaseStoreContext.Provider, { value: store, children: children }));\n};\nexport const LegendPureIDEFrameworkProvider = ({ children }) => (_jsx(ApplicationFrameworkProvider, { children: _jsx(LegendPureIDEBaseStoreProvider, { children: children }) }));\n//# sourceMappingURL=LegendPureIDEFrameworkProvider.js.map","import { jsx as _jsx } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { BrowserEnvironmentProvider } from '@finos/legend-application/browser';\nimport { Editor } from './PureIDE.js';\nimport { LegendPureIDEFrameworkProvider } from './LegendPureIDEFrameworkProvider.js';\nexport const LegendPureIDEWebApplication = (props) => {\n const { baseUrl } = props;\n return (_jsx(BrowserEnvironmentProvider, { baseUrl: baseUrl, children: _jsx(LegendPureIDEFrameworkProvider, { children: _jsx(Editor, {}) }) }));\n};\n//# sourceMappingURL=LegendPureIDEApplication.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { LegendApplicationPlugin } from '@finos/legend-application';\nexport class LegendPureIDEApplicationPlugin extends LegendApplicationPlugin {\n /**\n * This helps to better type-check for this empty abtract type\n * See https://github.com/finos/legend-studio/blob/master/docs/technical/typescript-usage.md#understand-typescript-structual-type-system\n */\n _$nominalTypeBrand;\n install(pluginManager) {\n pluginManager.registerApplicationPlugin(this);\n }\n}\n//# sourceMappingURL=LegendPureIDEApplicationPlugin.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/* eslint-disable prefer-named-capture-group */\nimport { PURE_ELEMENT_NAME, PURE_CONNECTION_NAME } from '@finos/legend-graph';\nimport { languages as monacoLanguagesAPI } from 'monaco-editor';\nimport { PURE_GRAMMAR_TOKEN } from './PureLanguage.js';\nimport { CODE_EDITOR_LANGUAGE } from './CodeEditorUtils.js';\n/**\n * The postfix to be added to all token types, i.e. identifier.pure, number.pure, etc.\n */\nconst PURE_GRAMMAR_TOKEN_POSTFIX = '.pure';\n// Taken from `monaco-languages` configuration for Java in order to do propert brace matching\n// See https://github.com/microsoft/monaco-languages/blob/master/src/java/java.ts\nconst configuration = {\n // NOTE: Pure identifier includes $ but not in the first position (as that is parsed as a variable)\n wordPattern: /(-?\\d*\\.\\d\\w*)|([^`~!@#%^$&*()\\-=+[{\\]}\\\\|;:'\",.<>/?\\s][^`~!@#%^&*()\\-=+[{\\]}\\\\|;:'\",.<>/?\\s]*)/,\n comments: {\n lineComment: '//',\n blockComment: ['/*', '*/'],\n },\n brackets: [\n ['{', '}'],\n ['[', ']'],\n ['(', ')'],\n ],\n autoClosingPairs: [\n { open: '{', close: '}' },\n { open: '[', close: ']' },\n { open: '(', close: ')' },\n { open: '\"', close: '\"' },\n { open: \"'\", close: \"'\" },\n ],\n surroundingPairs: [\n { open: '{', close: '}' },\n { open: '[', close: ']' },\n { open: '(', close: ')' },\n { open: '\"', close: '\"' },\n { open: \"'\", close: \"'\" },\n { open: '<', close: '>' },\n { open: '<<', close: '>>' },\n ],\n folding: {\n markers: {\n start: new RegExp('^\\\\s*//\\\\s*(?:(?:#?region\\\\b)|(?:<editor-fold\\\\b))'),\n end: new RegExp('^\\\\s*//\\\\s*(?:(?:#?endregion\\\\b)|(?:</editor-fold>))'),\n },\n },\n};\n/**\n * Create new monarch definition to support syntax-highlighting\n * See https://microsoft.github.io/monaco-editor/monarch.html\n *\n * The way SQL monarch definition is organized is good and worth learning from\n * See https://github.com/microsoft/monaco-languages/blob/master/src/sql/sql.ts\n *\n * NOTE: using `monarch` only allows fairly very basic syntax-highlighting\n * to actually do full AST analysis, we might need something more serious like\n * using TextMate grammar which is used by VSCode itself\n * See https://github.com/microsoft/monaco-editor#faq\n * See https://code.visualstudio.com/api/language-extensions/syntax-highlight-guide\n */\nconst generateLanguageMonarch = (extraKeywords) => \n// TODO: complete syntax-highlighter for core features like constraint, derived properties, etc.\n// TODO: add syntax highlighting for modules/plugins (come up with a plugin mechanism to do this).\n({\n defaultToken: 'invalid',\n tokenPostfix: PURE_GRAMMAR_TOKEN_POSTFIX,\n keywords: [\n ...extraKeywords,\n // relational\n 'Schema',\n 'Table',\n 'Join',\n 'View',\n 'primaryKey',\n 'groupBy',\n 'mainTable',\n // native\n 'let',\n 'extends',\n 'true',\n 'false',\n 'projects',\n // elements\n PURE_ELEMENT_NAME.CLASS,\n PURE_ELEMENT_NAME.ASSOCIATION,\n PURE_ELEMENT_NAME.ENUMERATION,\n PURE_ELEMENT_NAME.MEASURE,\n PURE_ELEMENT_NAME.PROFILE,\n PURE_ELEMENT_NAME.FUNCTION,\n PURE_ELEMENT_NAME.MAPPING,\n PURE_ELEMENT_NAME.RUNTIME,\n PURE_ELEMENT_NAME.CONNECTION,\n PURE_ELEMENT_NAME.FILE_GENERATION,\n PURE_ELEMENT_NAME.GENERATION_SPECIFICATION,\n PURE_ELEMENT_NAME.DATA_ELEMENT,\n // connections\n PURE_CONNECTION_NAME.JSON_MODEL_CONNECTION,\n PURE_CONNECTION_NAME.MODEL_CHAIN_CONNECTION,\n PURE_CONNECTION_NAME.XML_MODEL_CONNECTION,\n // mapping\n 'include',\n 'EnumerationMapping',\n 'Pure',\n 'AssociationMapping',\n 'XStore',\n 'AggregationAware',\n /**\n * @modularize\n * See https://github.com/finos/legend-studio/issues/65\n */\n PURE_ELEMENT_NAME.SERVICE,\n PURE_ELEMENT_NAME.FLAT_DATA,\n PURE_ELEMENT_NAME.DATABASE,\n PURE_CONNECTION_NAME.FLAT_DATA_CONNECTION,\n PURE_CONNECTION_NAME.RELATIONAL_DATABASE_CONNECTION,\n 'Relational',\n ],\n operators: [\n '=',\n '>',\n '<',\n '!',\n '~',\n '?',\n ':',\n '==',\n '<=',\n '>=',\n '&&',\n '||',\n '++',\n '--',\n '+',\n '-',\n '*',\n '/',\n '&',\n '|',\n '^',\n '%',\n '->',\n '#{',\n '}#',\n '@',\n '<<',\n '>>',\n ],\n languageStructs: ['import', 'native'],\n // common regular expressions to be used in tokenizer\n identifier: /[a-zA-Z_$][\\w$]*/,\n symbols: /[=><!~?:&|+\\-*/^%#@]+/,\n escapes: /\\\\(?:[abfnrtv\\\\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,\n digits: /\\d+(_+\\d+)*/,\n octaldigits: /[0-7]+(_+[0-7]+)*/,\n binarydigits: /[0-1]+(_+[0-1]+)*/,\n hexdigits: /[[0-9a-fA-F]+(_+[0-9a-fA-F]+)*/,\n multiplicity: /\\[(?:[a-zA-Z0-9]+(?:\\.\\.(?:[a-zA-Z0-9]+|\\*|))?|\\*)\\]/,\n package: /(?:[\\w_]+::)+/,\n // NOTE: generics is a little tricky because in order to do it right, we have to\n // do some sort of bracket matching, but we just can use a simple tokenizer here\n // so to account for cases like `<Nil,Any|*>)->` `Function<{T[1]->Boolean[1]}>[1]`\n // we have to make sure the content does not contain any `:` or `.` characters\n // in order to avoid the accidental greedy match with inputs like\n // `function doSomething<T>(a: Function<T[1]->Boolean[1]>)`\n // nor we want to make sure the last character of the content is not `-` to avoid\n // accidentally matching `->` as the end of the generics\n generics: /(?:(?:<\\w+>)|(?:<[^:.@^()]+[^-]>))/,\n date: /%-?\\d+(?:-\\d+(?:-\\d+(?:T(?:\\d+(?::\\d+(?::\\d+(?:.\\d+)?)?)?)(?:[+-][0-9]{4})?)))/,\n time: /%\\d+(?::\\d+(?::\\d+(?:.\\d+)?)?)?/,\n tokenizer: {\n root: [\n // NOTE: since `monaco-editor` Monarch is only meant for tokenizing\n // and the need to highlight Pure syntax is more than just token-based,\n // but semantic/syntax-based we have to create these complex rules.\n // the things to note here is these are not meant to match multilines\n // and they must be placed before identifier rules since token matching\n // is run in order\n // See https://github.com/microsoft/monaco-editor/issues/316#issuecomment-273555698\n // See https://github.com/microsoft/monaco-editor/issues/571#issuecomment-342555050\n // See https://microsoft.github.io/monaco-editor/monarch.html\n { include: '@pure' },\n { include: '@date' },\n { include: '@color' },\n // parser markers\n [\n // NOTE: any leading whitespace to the section header is considered invalid syntax\n /^\\s*###[\\w]+/,\n PURE_GRAMMAR_TOKEN.PARSER,\n ],\n // identifiers and keywords\n [\n /(@identifier)/,\n {\n cases: {\n '@languageStructs': PURE_GRAMMAR_TOKEN.LANGUAGE_STRUCT,\n '@keywords': `${PURE_GRAMMAR_TOKEN.KEYWORD}.$0`,\n // function descriptor\n '([a-zA-Z_$][\\\\w$]*)_((\\\\w+_(([a-zA-Z0-9]+)|(\\\\$[a-zA-Z0-9]+_[a-zA-Z0-9]+\\\\$)))__)*(\\\\w+_(([a-zA-Z0-9]+)|(\\\\$[a-zA-Z0-9]+_[a-zA-Z0-9]+\\\\$)))_': PURE_GRAMMAR_TOKEN.TYPE,\n '@default': PURE_GRAMMAR_TOKEN.IDENTIFIER,\n },\n },\n ],\n // whitespace\n { include: '@whitespace' },\n // delimiters and operators\n [/[{}()[\\]]/, '@brackets'],\n [/[<>](?!@symbols)/, '@brackets'],\n [\n /@symbols/,\n {\n cases: {\n '@operators': PURE_GRAMMAR_TOKEN.OPERATOR,\n '@default': PURE_GRAMMAR_TOKEN.IDENTIFIER,\n },\n },\n ],\n { include: '@number' },\n // delimiter: after number because of .\\d floats\n [/[;,.]/, PURE_GRAMMAR_TOKEN.DELIMITER],\n // strings\n // NOTE: including non-teminated string so as people type ', we can start showing them that they're working on a string\n [/'([^'\\\\]|\\\\.)*$/, `${PURE_GRAMMAR_TOKEN.STRING}.invalid`],\n [/'/, PURE_GRAMMAR_TOKEN.STRING, '@string'],\n { include: '@characters' },\n ],\n pure: [\n // type\n [/(@package\\*)/, [PURE_GRAMMAR_TOKEN.PACKAGE]], // import path\n [\n /(@package?)(@identifier)(@generics?)(\\s*)(@multiplicity)/,\n [\n PURE_GRAMMAR_TOKEN.PACKAGE,\n PURE_GRAMMAR_TOKEN.TYPE,\n PURE_GRAMMAR_TOKEN.GENERICS,\n PURE_GRAMMAR_TOKEN.WHITESPACE,\n PURE_GRAMMAR_TOKEN.MULTIPLICITY,\n ],\n ],\n [\n /(@package)(@identifier)(@generics?)/,\n [\n PURE_GRAMMAR_TOKEN.PACKAGE,\n PURE_GRAMMAR_TOKEN.TYPE,\n PURE_GRAMMAR_TOKEN.GENERICS,\n ],\n ],\n // special operators that uses type (e.g. constructor, cast)\n [\n /([@^])(\\s*)(@package?)(@identifier)(@generics?)(@multiplicity?)/,\n [\n `${PURE_GRAMMAR_TOKEN.TYPE}.operator`,\n PURE_GRAMMAR_TOKEN.WHITESPACE,\n PURE_GRAMMAR_TOKEN.PACKAGE,\n PURE_GRAMMAR_TOKEN.TYPE,\n PURE_GRAMMAR_TOKEN.GENERICS,\n PURE_GRAMMAR_TOKEN.MULTIPLICITY,\n ],\n ],\n // property / parameter\n [\n /(\\.\\s*)(@identifier)/,\n [PURE_GRAMMAR_TOKEN.DELIMITER, PURE_GRAMMAR_TOKEN.PROPERTY],\n ],\n [\n /(@identifier)(\\s*=)/,\n [PURE_GRAMMAR_TOKEN.PROPERTY, PURE_GRAMMAR_TOKEN.OPERATOR],\n ],\n [\n /(@identifier)(\\.)(@identifier)/,\n [\n PURE_GRAMMAR_TOKEN.TYPE,\n PURE_GRAMMAR_TOKEN.OPERATOR,\n PURE_GRAMMAR_TOKEN.PROPERTY,\n ],\n ], // could be: property chain, profile tag, and stereotype\n [\n /(@identifier)(\\s*:)/,\n [PURE_GRAMMAR_TOKEN.PARAMETER, PURE_GRAMMAR_TOKEN.OPERATOR],\n ],\n // variables\n [\n /(let)(\\s+)(@identifier)(\\s*=)/,\n [\n PURE_GRAMMAR_TOKEN.KEYWORD,\n PURE_GRAMMAR_TOKEN.WHITESPACE,\n PURE_GRAMMAR_TOKEN.VARIABLE,\n PURE_GRAMMAR_TOKEN.OPERATOR,\n ],\n ],\n [/(\\$@identifier)/, [`${PURE_GRAMMAR_TOKEN.VARIABLE}.reference`]],\n ],\n date: [\n [/(%latest)/, [`${PURE_GRAMMAR_TOKEN.DATE}.latest`]],\n [/(@date)/, [PURE_GRAMMAR_TOKEN.DATE]],\n [/(@time)/, [`${PURE_GRAMMAR_TOKEN.DATE}.time`]],\n ],\n color: [[/(#[0-9a-fA-F]{6})/, [PURE_GRAMMAR_TOKEN.COLOR]]],\n number: [\n [\n /(@digits)[eE]([-+]?(@digits))?[fFdD]?/,\n `${PURE_GRAMMAR_TOKEN.NUMBER}.float`,\n ],\n [\n /(@digits)\\.(@digits)([eE][-+]?(@digits))?[fFdD]?/,\n `${PURE_GRAMMAR_TOKEN.NUMBER}.float`,\n ],\n [/0[xX](@hexdigits)[Ll]?/, `${PURE_GRAMMAR_TOKEN.NUMBER}.hex`],\n [/0(@octaldigits)[Ll]?/, `${PURE_GRAMMAR_TOKEN.NUMBER}.octal`],\n [/0[bB](@binarydigits)[Ll]?/, `${PURE_GRAMMAR_TOKEN.NUMBER}.binary`],\n [/(@digits)[fFdD]/, `${PURE_GRAMMAR_TOKEN.NUMBER}.float`],\n [/(@digits)[lL]?/, PURE_GRAMMAR_TOKEN.NUMBER],\n ],\n whitespace: [\n [/[ \\t\\r\\n]+/, PURE_GRAMMAR_TOKEN.WHITESPACE],\n [/\\/\\*\\*(?!\\/)/, `${PURE_GRAMMAR_TOKEN.COMMENT}.doc`, '@doc'],\n [/\\/\\*/, PURE_GRAMMAR_TOKEN.COMMENT, '@comment'],\n [/\\/\\/.*$/, PURE_GRAMMAR_TOKEN.COMMENT],\n ],\n comment: [\n [/[^/*]+/, PURE_GRAMMAR_TOKEN.COMMENT],\n // [/\\/\\*/, PURE_GRAMMAR_TOKEN.COMMENT, '@push' ], // nested comment not allowed :-(\n // [/\\/\\*/, ${PURE_GRAMMAR_TOKEN.COMMENT}.invalid` ], // this breaks block comments in the shape of /* //*/\n [/\\*\\//, PURE_GRAMMAR_TOKEN.COMMENT, '@pop'],\n [/[/*]/, PURE_GRAMMAR_TOKEN.COMMENT],\n ],\n // Identical copy of comment above, except for the addition of .doc\n doc: [\n [/[^/*]+/, `${PURE_GRAMMAR_TOKEN.COMMENT}.doc`],\n // [/\\/\\*/, `${PURE_GRAMMAR_TOKEN.COMMENT}.doc`, '@push' ], // nested comment not allowed :-(\n [/\\/\\*/, `${PURE_GRAMMAR_TOKEN.COMMENT}.doc.invalid`],\n [/\\*\\//, `${PURE_GRAMMAR_TOKEN.COMMENT}.doc`, '@pop'],\n [/[/*]/, `${PURE_GRAMMAR_TOKEN.COMMENT}.doc`],\n ],\n string: [\n [/[^\\\\']+/, PURE_GRAMMAR_TOKEN.STRING],\n [/@escapes/, `${PURE_GRAMMAR_TOKEN.STRING}.escape`],\n [/\\\\./, `${PURE_GRAMMAR_TOKEN.STRING}.escape.invalid`],\n [/'/, PURE_GRAMMAR_TOKEN.STRING, '@pop'],\n ],\n characters: [\n [/'[^\\\\']'/, PURE_GRAMMAR_TOKEN.STRING],\n [\n /(')(@escapes)(')/,\n [\n PURE_GRAMMAR_TOKEN.STRING,\n `${PURE_GRAMMAR_TOKEN.STRING}.escape`,\n PURE_GRAMMAR_TOKEN.STRING,\n ],\n ],\n [/'/, `${PURE_GRAMMAR_TOKEN.STRING}.invalid`],\n ],\n },\n});\nexport function setupPureLanguageService(options) {\n monacoLanguagesAPI.register({ id: CODE_EDITOR_LANGUAGE.PURE });\n monacoLanguagesAPI.setLanguageConfiguration(CODE_EDITOR_LANGUAGE.PURE, configuration);\n monacoLanguagesAPI.setMonarchTokensProvider(CODE_EDITOR_LANGUAGE.PURE, generateLanguageMonarch(options?.extraKeywords ?? []));\n}\n//# sourceMappingURL=PureLanguageService.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { collectKeyedCommandConfigEntriesFromConfig, } from '@finos/legend-application';\nimport packageJson from '../../package.json' with { type: 'json' };\nimport { LegendPureIDEApplicationPlugin } from '../stores/LegendPureIDEApplicationPlugin.js';\nimport { LEGEND_PURE_IDE_COMMAND_CONFIG, LEGEND_PURE_IDE_DIAGRAM_EDITOR_COMMAND_CONFIG, LEGEND_PURE_IDE_PURE_FILE_EDITOR_COMMAND_CONFIG, } from '../__lib__/LegendPureIDECommand.js';\nimport { PURE_GRAMMAR_DIAGRAM_ELEMENT_TYPE_LABEL } from '../stores/PureFileEditorUtils.js';\nimport { setupPureLanguageService } from '@finos/legend-code-editor';\nimport { configureCodeEditorComponent } from '@finos/legend-lego/code-editor';\nexport class Core_LegendPureIDEApplicationPlugin extends LegendPureIDEApplicationPlugin {\n static NAME = packageJson.extensions.applicationPureIDEPlugin;\n constructor() {\n super(Core_LegendPureIDEApplicationPlugin.NAME, packageJson.version);\n }\n getExtraApplicationSetups() {\n return [\n async (applicationStore) => {\n await configureCodeEditorComponent(applicationStore);\n setupPureLanguageService(\n // NOTE: we add these manually because Pure uses a different grammar syntax for DSL diagram than the one in engine\n // also, in this particular case, for convenience, we would consider DSL Diagram as part of core Pure\n {\n extraKeywords: [PURE_GRAMMAR_DIAGRAM_ELEMENT_TYPE_LABEL],\n });\n },\n ];\n }\n getExtraKeyedCommandConfigEntries() {\n return [\n LEGEND_PURE_IDE_COMMAND_CONFIG,\n LEGEND_PURE_IDE_PURE_FILE_EDITOR_COMMAND_CONFIG,\n LEGEND_PURE_IDE_DIAGRAM_EDITOR_COMMAND_CONFIG,\n ].flatMap((data) => collectKeyedCommandConfigEntriesFromConfig(data));\n }\n}\n//# sourceMappingURL=Core_LegendPureIDEApplicationPlugin.js.map","import { jsx as _jsx } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { createRoot } from 'react-dom/client';\nimport { LegendApplication, ApplicationStoreProvider, Core_LegendApplicationPlugin, getApplicationRootElement, } from '@finos/legend-application';\nimport { LegendPureIDEApplicationConfig, } from './LegendPureIDEApplicationConfig.js';\nimport { LegendPureIDEPluginManager } from './LegendPureIDEPluginManager.js';\nimport { LegendPureIDEWebApplication } from '../components/LegendPureIDEApplication.js';\nimport { Core_LegendPureIDEApplicationPlugin } from '../components/Core_LegendPureIDEApplicationPlugin.js';\nexport class LegendPureIDE extends LegendApplication {\n static create() {\n const application = new LegendPureIDE(LegendPureIDEPluginManager.create());\n application.withBasePlugins([\n new Core_LegendApplicationPlugin(),\n new Core_LegendPureIDEApplicationPlugin(),\n ]);\n return application;\n }\n async configureApplication(input) {\n return new LegendPureIDEApplicationConfig(input);\n }\n async loadApplication(applicationStore) {\n createRoot(getApplicationRootElement()).render(_jsx(ApplicationStoreProvider, { store: applicationStore, children: _jsx(LegendPureIDEWebApplication, { baseUrl: this.baseAddress }) }));\n }\n}\n//# sourceMappingURL=LegendPureIDE.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { WebConsole, } from '@finos/legend-shared';\nimport { LegendPureIDE } from './application/LegendPureIDE.js';\nexport class LegendPureIDEWebApplication {\n static getPresetCollection() {\n return [];\n }\n static getPluginCollection() {\n return [\n // loggers\n new WebConsole(),\n ];\n }\n static run(baseUrl) {\n LegendPureIDE.create()\n .setup({ baseAddress: baseUrl })\n .withPresets(LegendPureIDEWebApplication.getPresetCollection())\n .withPlugins(LegendPureIDEWebApplication.getPluginCollection())\n .start()\n .catch((e) => {\n throw e;\n });\n }\n}\n//# sourceMappingURL=index.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { LegendPureIDEWebApplication } from '@finos/legend-application-pure-ide';\nimport config from '../pure-ide.config.js';\nimport './index.css';\n\nLegendPureIDEWebApplication.run(config.baseUrl);\n","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport default {\n /**\n * `favicon` [string, optional]\n * Relative path to the favicon file\n * e.g. './assets/favicon.ico'\n */\n faviconPath: './assets/favicon.ico',\n /**\n * `baseUrl` [string, required]\n * Base URL for your site. This can also be considered the path after the host.\n * e.g. `/something/` is the `baseUrl` of https://www.example.org/something/\n * For URLs that have no path, use '/'.\n */\n baseUrl: '/ide/',\n /**\n * `devServerOptions` [object, optional]\n * Options to override `webpack-dev-server` configs.\n * See https://webpack.js.org/configuration/dev-server/\n */\n devServerOptions: {\n // NOTE: for development from within a Docker container, it's best to update this to 0.0.0.0\n host: 'localhost',\n port: 9004,\n },\n};\n","var map = {\n\t\"./editorBaseApi\": [\n\t\t37970\n\t],\n\t\"./editorBaseApi.js\": [\n\t\t37970\n\t],\n\t\"./editorSimpleWorker\": [\n\t\t41122\n\t],\n\t\"./editorSimpleWorker.js\": [\n\t\t41122\n\t],\n\t\"./editorWorker\": [\n\t\t22143\n\t],\n\t\"./editorWorker.js\": [\n\t\t22143\n\t],\n\t\"./editorWorkerHost\": [\n\t\t70869\n\t],\n\t\"./editorWorkerHost.js\": [\n\t\t70869\n\t],\n\t\"./findSectionHeaders\": [\n\t\t97716\n\t],\n\t\"./findSectionHeaders.js\": [\n\t\t97716\n\t],\n\t\"./getIconClasses\": [\n\t\t45555\n\t],\n\t\"./getIconClasses.js\": [\n\t\t45555\n\t],\n\t\"./languageFeatureDebounce\": [\n\t\t26973\n\t],\n\t\"./languageFeatureDebounce.js\": [\n\t\t26973\n\t],\n\t\"./languageFeatures\": [\n\t\t33653\n\t],\n\t\"./languageFeatures.js\": [\n\t\t33653\n\t],\n\t\"./languageFeaturesService\": [\n\t\t78330\n\t],\n\t\"./languageFeaturesService.js\": [\n\t\t78330\n\t],\n\t\"./languageService\": [\n\t\t22155\n\t],\n\t\"./languageService.js\": [\n\t\t22155\n\t],\n\t\"./languagesAssociations\": [\n\t\t25709\n\t],\n\t\"./languagesAssociations.js\": [\n\t\t25709\n\t],\n\t\"./languagesRegistry\": [\n\t\t35074\n\t],\n\t\"./languagesRegistry.js\": [\n\t\t35074\n\t],\n\t\"./markerDecorations\": [\n\t\t86259\n\t],\n\t\"./markerDecorations.js\": [\n\t\t86259\n\t],\n\t\"./markerDecorationsService\": [\n\t\t72524\n\t],\n\t\"./markerDecorationsService.js\": [\n\t\t72524\n\t],\n\t\"./model\": [\n\t\t16911\n\t],\n\t\"./model.js\": [\n\t\t16911\n\t],\n\t\"./modelService\": [\n\t\t91320\n\t],\n\t\"./modelService.js\": [\n\t\t91320\n\t],\n\t\"./resolverService\": [\n\t\t55387\n\t],\n\t\"./resolverService.js\": [\n\t\t55387\n\t],\n\t\"./semanticTokensDto\": [\n\t\t7029,\n\t\t121\n\t],\n\t\"./semanticTokensDto.js\": [\n\t\t7029,\n\t\t121\n\t],\n\t\"./semanticTokensProviderStyling\": [\n\t\t4399\n\t],\n\t\"./semanticTokensProviderStyling.js\": [\n\t\t4399\n\t],\n\t\"./semanticTokensStyling\": [\n\t\t74566\n\t],\n\t\"./semanticTokensStyling.js\": [\n\t\t74566\n\t],\n\t\"./semanticTokensStylingService\": [\n\t\t28843\n\t],\n\t\"./semanticTokensStylingService.js\": [\n\t\t28843\n\t],\n\t\"./textModelSync/textModelSync.impl\": [\n\t\t43481\n\t],\n\t\"./textModelSync/textModelSync.impl.js\": [\n\t\t43481\n\t],\n\t\"./textModelSync/textModelSync.protocol\": [\n\t\t37619,\n\t\t121\n\t],\n\t\"./textModelSync/textModelSync.protocol.js\": [\n\t\t37619,\n\t\t121\n\t],\n\t\"./textResourceConfiguration\": [\n\t\t93533\n\t],\n\t\"./textResourceConfiguration.js\": [\n\t\t93533\n\t],\n\t\"./treeSitterParserService\": [\n\t\t47105\n\t],\n\t\"./treeSitterParserService.js\": [\n\t\t47105\n\t],\n\t\"./treeViewsDnd\": [\n\t\t29740,\n\t\t121\n\t],\n\t\"./treeViewsDnd.js\": [\n\t\t29740,\n\t\t121\n\t],\n\t\"./treeViewsDndService\": [\n\t\t95621,\n\t\t121\n\t],\n\t\"./treeViewsDndService.js\": [\n\t\t95621,\n\t\t121\n\t],\n\t\"./unicodeTextModelHighlighter\": [\n\t\t14818\n\t],\n\t\"./unicodeTextModelHighlighter.js\": [\n\t\t14818\n\t]\n};\nfunction webpackAsyncContext(req) {\n\tif(!__webpack_require__.o(map, req)) {\n\t\treturn Promise.resolve().then(() => {\n\t\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\t\te.code = 'MODULE_NOT_FOUND';\n\t\t\tthrow e;\n\t\t});\n\t}\n\n\tvar ids = map[req], id = ids[0];\n\treturn Promise.all(ids.slice(1).map(__webpack_require__.e)).then(() => {\n\t\treturn __webpack_require__(id);\n\t});\n}\nwebpackAsyncContext.keys = () => (Object.keys(map));\nwebpackAsyncContext.id = 59135;\nmodule.exports = webpackAsyncContext;","var map = {\n\t\"./simpleWorker\": 99246,\n\t\"./simpleWorker.js\": 99246\n};\n\nfunction webpackAsyncContext(req) {\n\treturn Promise.resolve().then(() => {\n\t\tif(!__webpack_require__.o(map, req)) {\n\t\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\t\te.code = 'MODULE_NOT_FOUND';\n\t\t\tthrow e;\n\t\t}\n\n\t\tvar id = map[req];\n\t\treturn __webpack_require__(id);\n\t});\n}\nwebpackAsyncContext.keys = () => (Object.keys(map));\nwebpackAsyncContext.id = 98933;\nmodule.exports = webpackAsyncContext;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","__webpack_require__.amdO = {};","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.f = {};\n// This file contains only the entry chunk.\n// The chunk loading function for additional chunks\n__webpack_require__.e = (chunkId) => {\n\treturn Promise.all(Object.keys(__webpack_require__.f).reduce((promises, key) => {\n\t\t__webpack_require__.f[key](chunkId, promises);\n\t\treturn promises;\n\t}, []));\n};","// This function allow to reference async chunks\n__webpack_require__.u = (chunkId) => {\n\t// return url for filenames based on template\n\treturn \"static/\" + chunkId + \".\" + \"ca9d896b\" + \".js\";\n};","// This function allow to reference async chunks\n__webpack_require__.miniCssF = (chunkId) => {\n\t// return url for filenames based on template\n\treturn undefined;\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = (module) => {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","__webpack_require__.p = \"/ide/\";","// no baseURI\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t57: 0\n};\n\n__webpack_require__.f.j = (chunkId, promises) => {\n\t\t// JSONP chunk loading for javascript\n\t\tvar installedChunkData = __webpack_require__.o(installedChunks, chunkId) ? installedChunks[chunkId] : undefined;\n\t\tif(installedChunkData !== 0) { // 0 means \"already installed\".\n\n\t\t\t// a Promise means \"currently loading\".\n\t\t\tif(installedChunkData) {\n\t\t\t\tpromises.push(installedChunkData[2]);\n\t\t\t} else {\n\t\t\t\tif(true) { // all chunks have JS\n\t\t\t\t\t// setup Promise in chunk cache\n\t\t\t\t\tvar promise = new Promise((resolve, reject) => (installedChunkData = installedChunks[chunkId] = [resolve, reject]));\n\t\t\t\t\tpromises.push(installedChunkData[2] = promise);\n\n\t\t\t\t\t// start chunk loading\n\t\t\t\t\tvar url = __webpack_require__.p + __webpack_require__.u(chunkId);\n\t\t\t\t\t// create error before stack unwound to get useful stacktrace later\n\t\t\t\t\tvar error = new Error();\n\t\t\t\t\tvar loadingEnded = (event) => {\n\t\t\t\t\t\tif(__webpack_require__.o(installedChunks, chunkId)) {\n\t\t\t\t\t\t\tinstalledChunkData = installedChunks[chunkId];\n\t\t\t\t\t\t\tif(installedChunkData !== 0) installedChunks[chunkId] = undefined;\n\t\t\t\t\t\t\tif(installedChunkData) {\n\t\t\t\t\t\t\t\tvar errorType = event && (event.type === 'load' ? 'missing' : event.type);\n\t\t\t\t\t\t\t\tvar realSrc = event && event.target && event.target.src;\n\t\t\t\t\t\t\t\terror.message = 'Loading chunk ' + chunkId + ' failed.\\n(' + errorType + ': ' + realSrc + ')';\n\t\t\t\t\t\t\t\terror.name = 'ChunkLoadError';\n\t\t\t\t\t\t\t\terror.type = errorType;\n\t\t\t\t\t\t\t\terror.request = realSrc;\n\t\t\t\t\t\t\t\tinstalledChunkData[1](error);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t\t__webpack_require__.l(url, loadingEnded, \"chunk-\" + chunkId, chunkId);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n};\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n__webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0);\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = (parentChunkLoadingFunction, data) => {\n\tvar [chunkIds, moreModules, runtime] = data;\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some((id) => (installedChunks[id] !== 0))) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\treturn __webpack_require__.O(result);\n}\n\nvar chunkLoadingGlobal = globalThis[\"webpackChunk_finos_legend_application_pure_ide_deployment\"] = globalThis[\"webpackChunk_finos_legend_application_pure_ide_deployment\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","// startup\n// Load entry module and return exports\n// This entry module depends on other loaded chunks and execution need to be delayed\nvar __webpack_exports__ = __webpack_require__.O(undefined, [121], () => (__webpack_require__(21263)))\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n"],"names":["deferred","leafPrototypes","getProto","inProgress","dataWebpackPrefix","LOG_LEVEL","PluginInfo","name","version","signature","uuid","constructor","this","getName","getVersion","getSignature","getUUID","getInfo","info","configure","configData","AbstractPluginManager","plugins","presets","usePlugins","usePresets","Object","keys","forEach","key","configObj","preset","plugin","install","filter","getHiddenPluginNames","includes","map","sort","a","b","localeCompare","getHiddenPresetNames","LogEvent","channel","timestamp","Date","now","create","event","LoggerPlugin","level","DEBUG","setLevel","pluginManager","registerLoggerPlugin","debug","data","_debug","INFO","_info","warn","WARN","_warn","error","ERROR","_error","LogService","loggers","registerPlugins","loggerPlugins","logger","console","WebConsole","super","length","getClass","obj","noop","at","list","idx","message","promisify","func","Promise","resolve","reject","setTimeout","addUniqueEntry","array","newEntry","comparator","val1","val2","find","entry","push","entryToDelete","findIndex","splice","ApplicationError","Error","undefined","detail","EnrichedError","overideMessage","messageLines","match","stack","split","slice","join","captureStackTrace","IllegalStateError","unsupportedObject","value","options","opts","printFunctionName","maxDepth","deep","pickBy","val","replace","printObject","assertErrorThrown","fn","isType","clazz","assertType","assertNonEmptyString","str","assertionValue","isNaN","HttpStatus","CHARSET","HttpHeader","ContentType","HttpMethod","DEFAULT_CLIENT_REQUEST_OPTIONS","mode","credentials","redirect","mergeRequestHeaders","headersOne","headersTwo","requestHeaders","entries","NetworkClientError","response","payload","status","statusText","url","summary","JSON","stringify","payloadAsObject","parse","extractMessage","substring","processResponse","async","init","responseProcessConfig","preprocess","ok","text","skipProcessing","NO_CONTENT","accept","headers","Accept","APPLICATION_JSON","json","TEXT_PLAIN","createRequestHeaders","method","baseRequestHeaders","GET","CONTENT_TYPE","NetworkClient","baseUrl","config","setBaseUrl","get","parameters","requestProcessConfig","request","put","PUT","post","POST","DELETE","requestUrl","URL","fullUrl","Array","isArray","subVal","searchParams","append","toString","makeUrl","body","enableCompression","Blob","compressData","APPLICATION_ZLIB","requestInit","fetch","then","UNAUTHORIZED","autoReAuthenticateUrl","id","previous","document","getElementById","remove","element","createElement","src","style","display","addEventListener","appendChild","autoReAuthenticate","resp","catch","TypeError","couldBeCORS","fileName","content","contentType","blob","type","createObjectURL","link","download","href","click","removeChild","location","APPLICATION_EVENT","SerializationFactory","schema","deserializeNullAsUndefined","Boolean","toJson","fromJson","DocumentationEntry","markdownText","title","related","static","documentationKey","serialization","collectKeyedDocumentationEntriesFromConfig","rawEntries","DocumentationService","links","docRegistry","Map","contextualDocIndex","applicationStore","documentationUrl","documentationLinkEntries","getApplicationPlugins","flatMap","getExtraKeyedDocumentationEntries","hasDocEntry","logService","DOCUMENTATION_LOAD__SKIP","set","keyedDocumentationEntries","contextualDocEntries","getExtraContextualDocumentationEntries","missingDocumentationEntries","uniq","getExtraRequiredDocumentationKeys","concat","has","DOCUMENTATION_REQUIREMENT_CHECK__FAILURE","hasContextualDocEntry","context","CONTEXTUAL_DOCUMENTATION_LOAD__SKIP","existingDocEntry","getDocEntry","getContextualDocEntry","getAllDocEntries","from","values","publishDocRegistry","result","publishContextualDocIndex","ACTION_STATE","CORE_TRACER_TAG","ActionState","state","_message","_messageFormatter","INITIAL","setMessage","setMessageFormatter","reset","IN_PROGRESS","fail","FAILED","pass","SUCCEEDED","complete","hasSucceeded","sync","exportData","isInInitialState","isInProgress","hasFailed","hasCompleted","Trace","traceEntries","setup","bootstrap","clientSpan","reportSuccess","concludeClientSpan","reportError","TracerService","createTrace","traceData","trace","createClientSpan","FuzzySearchEngine","ADVANCED_FUZZY_SEARCH_MODE","VIRTUAL_ASSISTANT_TAB","FuzzySearchAdvancedConfigState","currentMode","STANDARD","onSearchModeChange","isAdvancedSearchActive","setCurrentMode","generateSearchText","INCLUDE","EXACT","INVERSE","VirtualAssistantDocumentationEntry","isOpen","docEntry","setIsOpen","VirtualAssistantContextualDocumentationEntry","isValidVirtualAssistantDocumentationEntry","AssistantService","panelRenderingKey","isDisabled","isHidden","isPanelMaximized","selectedTab","SEARCH","currentDocumentationEntry","searchEngine","searchConfigurationState","searchState","searchText","searchResults","showSearchConfigurationMenu","isOverSearchLimit","currentContextualDocumentationEntry","setIsDisabled","setIsHidden","setIsPanelMaximized","setSelectedTab","setSearchText","resetSearch","search","openDocumentationEntry","refreshPanelRendering","setShowSearchConfigurationMenu","documentationService","includeScore","shouldSort","ignoreLocation","threshold","weight","useExtendedSearch","navigationContextService","currentContext","openDocumentationEntryLink","shouldDisplayVirtualAssistantDocumentationEntry","navigationService","navigator","visitAddress","hideAssistant","toggleAssistant","limit","DOCUMENTATION_SEARCH_RESULTS_LIMIT","item","EventService","notifierPlugins","registerEventNotifierPlugins","notify","LegendApplicationTelemetryHelper","logEvent_ApplicationInitializationSucceeded","service","logEvent","APPLICATION_LOAD__SUCCESS","application","appName","appVersion","env","browser","userAgent","screen","height","window","width","logEvent_ApplicationContextAccessed","APPLICATION_CONTEXT__ACCESS","logEvent_VirtualAssistantDocumentationEntryAccessed","VIRTUAL_ASSISTANT_DOCUMENTATION_ENTRY__ACCESS","logEvent_ApplicationUsageInterrupted","APPLICATION_USAGE__INTERRUPT","ApplicationNavigationContextService","contextStack","pop","newContextStack","ctx","isTransient","getExtraAccessEventLoggingApplicationContextKeys","telemetryService","existingCtx","indexOf","CommandService","commandRegistry","registerCommand","deregisterCommand","command","commandKey","COMMAND_CENTER_REGISTRATION__FAILURE","delete","runCommand","args","trigger","action","KeyboardShortcutsService","keyMap","commandKeyMap","isHotkeysBlocked","addHotkey","blockGlobalHotkeys","unblockGlobalHotkeys","getExtraKeyedCommandConfigEntries","shortcuts","defaultKeyboardShortcut","additionalKeyboardShortcuts","shortcut","keyCombination","dispatch","mappedCommandKeys","commandService","DEFAULT_MONOSPACED_FONT_FAMILY","DEFAULT_DATE_TIME_FORMAT","DISPLAY_ANSI_ESCAPE","ANSI_moveCursor","line","column","ConsoleSearchConfiguration","searchInput","useRegex","matchWholeWord","matchCaseSensitive","resultCount","currentResultIndex","setSearchInput","el","focus","Console","searchConfig","setSearchRegex","setSearchWholeWord","setSearchCaseSensitive","setSearchResultCount","setSearchCurrentResultIndex","Terminal","preserveLog","setPreserveLog","showHelp","showCommonANSIEscapeSequences","capitalize","toUpperCase","TITLE_CASE_EXCEPTION_WORDS","trim","toLowerCase","KEYBOARD_NAMED_KEY","parseKeybinding","press","modifiers","isMatchingKeyPressData","keyPressData","code","every","modifier","getModifierState","SHIFT","META","ALT","CONTROL","isMatchingKeyCombination","createKeybindingsHandler","possibleMatches","timer","KeyboardEvent","combinations","combination","handler","parsedKeyCombination","remainingExpectedKeyPresses","currentExpectedKeyPress","clearTimeout","clear","bind","LegendCustomMUITheme","enableTransitions","customFonts","createTheme","transitions","typography","fontFamily","components","MuiButtonBase","defaultProps","disableRipple","breakpoints","xs","sm","md","lg","xl","xxl","xxxl","xxxxl","LegendStyleProvider","props","children","StyledEngineProvider","injectFirst","ThemeProvider","theme","LocalizationProvider","dateAdapter","generateSimpleDIVComponent","componentName","divClassName","component","className","displayName","Modal","darkMode","ModalTitle","icon","ModalHeader","ModalBody","ModalFooter","ActionAlertType","ActionAlertActionType","AlertService","blockingAlertInfo","actionAlertInfo","setBlockingAlert","setActionAlertInfo","alertInfo","keyboardShortcutsService","notificationService","notifyIllegalState","ApplicationStoreContext","createContext","useContext","ApplicationStoreProvider","store","Provider","getActionButtonClassName","PROCEED_WITH_CAUTION","PROCEED","ActionAlertContent","prompt","onClose","onEnter","actions","handleClose","alertService","Dialog","open","slotProps","transition","onSubmit","preventDefault","default","onClick","e","autoFocus","label","ActionAlert","PanelLoadingIndicator","isLoading","ref","useRef","useEffect","current","parentElement","classList","add","BlockingAlert","classes","root","container","layoutService","TEMPORARY__isLightColorThemeEnabled","showLoading","FunctionIcon","RefreshIcon","SubjectIcon","ViewHeadlineIcon","PushPinIcon","GoToFileIcon","CloseIcon","RegexIcon","CaseSensitiveIcon","WholeWordMatchIcon","ReferencesIcon","WandIcon","CollapseTreeIcon","ExpandTreeIcon","AlignBottomIcon","AlignCenterIcon","AlignEndIcon","AlignMiddleIcon","AlignStartIcon","AlignTopIcon","DistributeHorizontalIcon","DistributeVerticalIcon","QuestionSquareIcon","ThinVerticalDragHandleIcon","FlaskIcon","ArrowCircleRightIcon","ArrowDownIcon","ArrowUpIcon","BanIcon","BugIcon","CaretDownIcon","CheckCircleIcon","CheckSquareIcon","CircleNotchIcon","CogIcon","CompressIcon","CopyIcon","CrosshairsIcon","EmptyWindowRestoreIcon","ExclamationCircleIcon","ExclamationTriangleIcon","ExpandIcon","FaceLaughWinkIcon","FaceSadTearIcon","FileAltIcon","FolderIcon","FolderOpenIcon","HammerIcon","HistoryIcon","InfoCircleIcon","ListIcon","LockIcon","MapIcon","MapMarkerIcon","MinusCircleIcon","PlayIcon","PlusIcon","QuestionCircleIcon","SearchIcon","ShapesIcon","SquareIcon","TerminalIcon","TimesCircleIcon","TimesIcon","TrashIcon","WindowMaximizeIcon","WizardHatIcon","WrenchIcon","BeardIcon","SunglassesIcon","ChevronDownIcon","ChevronUpIcon","ChevronRightIcon","XIcon","AtomIcon","PackageIcon","MousePointerIcon","MoveIcon","ZoomInIcon","ZoomOutIcon","DEFAULT_NOTIFICATION_HIDE_TIME","NOTIFCATION_SEVERITY","Notification","severity","details","autoHideDuration","NotificationService","notification","setNotification","notifySuccess","notifyWarning","notifyError","SUCCESS","WARNING","getErrorMessage","ILEGAL_STATE","notifyUnsupportedFeature","featureName","notifyAndReturnAlternativeOnError","alternative","NotificationManager","isExpanded","setIsExpanded","useState","notificationIcon","handleCopy","guardUnhandledError","clipboardService","copyTextToClipboard","anchorOriginBottomRight","anchorOrigin","vertical","horizontal","reason","tabIndex","otherProps","paper","transitionDuration","ContextMenu","menuProps","disabled","onOpen","contextMenuRoot","anchorEl","setAnchorEl","left","setLeft","top","setTop","close","stopPropagation","onContextMenu","containerRect","getBoundingClientRect","containerLeft","scrollX","documentElement","scrollLeft","containerTop","scrollY","scrollTop","clientX","clientY","target","eventTarget","elementsFromPoint","some","anchorPosition","anchorReference","BackdropProps","invisible","disableRestoreFocus","MenuContent","forwardRef","MenuContentItem","MenuContentDivider","MarkdownTextViewer","initialize","startOnLoad","contentLoaded","remarkPlugins","_props","node","rest","exec","groups","language","useResizeDetector","skipResize","skipOnMount","refreshMode","refreshRate","refreshOptions","useMemo","leading","trailing","size","setSize","_ref","targetRef","onResize","resizeCallback","useCallback","nextSize","contentRect","prevSize","resizeHandler","debounce","throttle","resizeObserver","ResizeObserver","observe","disconnect","cancel","BlankPanelContent","contentRef","contentWidth","contentHeight","showContent","setShowContent","containerRef","containerWidth","containerHeight","DEFAULT_CONTENT_PADDING","BaseRadioGroup","targetOptionsValuesInMatrix","arr","stepSize","matrix","i","transformToMatrix","row","op","FormControlLabel","control","Radio","checked","BasePopover","LEGEND_APPLICATION_DOCUMENTATION_KEY","VirtualAssistantDocumentationEntryViewer","toggleExpand","copyDocumentationKey","elevation","rel","VirtualAssistantContextualSupportPanel","contextualEntry","assistantService","copyContextIDToClipboard","copyCurrentContextIDToClipboard","copyContextStackToClipboard","VirtualAssistantSearchPanel","searchInputRef","debouncedSearch","querySelectorAll","activeElement","spellCheck","onChange","placeholder","QUESTION_HOW_TO_USE_ADVANCED_SEARCH_SYNTAX","searchMode","format","VirtualAssistantPanel","triggerElement","extraViewConfigurations","getExtraVirtualAssistantViewConfigurations","currentExtensionView","hideBackdrop","disableEnforceFocus","transformOrigin","onKeyDown","CONTEXTUAL_SUPPORT","autoExpandOnOpen","renderer","VirtualAssistant","isDragging","setIsDragging","_key","_setKey","assistantRef","toggleAssistantPanel","bounds","onStart","onStop","nodeRef","handle","APPLICATION_COMPONENT_ELEMENT_ID","PLATFORM_NATIVE_KEYBOARD_SHORTCUTS","buildHotkeysConfiguration","keyCombinations","BackdropContainer","elementId","ApplicationComponentFrameworkProvider","disableVirtualAssistant","keyBindingMap","onKeyEvent","removeEventListener","onVisibilityChange","hidden","timeService","recordUsageInterruption","showBackdrop","Portal","getElementByID","backdropContainerElementID","BACKDROP_CONTAINER","Backdrop","DndProvider","backend","TOP_LEVEL_CONTAINER","SimpleApplicationComponentFrameworkProvider","LEGEND_XTERM_THEME","foreground","background","cursor","selectionBackground","black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite","LEGEND_XTERM_SEARCH_THEME","matchOverviewRuler","activeMatchColorOverviewRuler","matchBackground","activeMatchBackground","DEFAULT_COMMAND_HEADER","BOLD","BRIGHT_BLUE","RESET","MAGENTA","COMMAND_START","RegexLinkProvider","terminal","regex","provideLinks","lineNumber","callback","computeLink","range","activate","startLineIndex","translateBufferLineToStringWithWrap","rex","RegExp","source","flags","stringIndex","lastIndex","start","stringIndexToBufferPosition","end","lineIndex","lineWrapsToNext","prevLinesToWrap","lineString","buffer","active","getLine","isWrapped","nextLine","translateToString","cols","reportLastCell","cell","getNullCell","x","y","getCell","getChars","getWidth","XTerm","instance","resizer","searcher","linkProvider","_TEMPORARY__onKeyListener","_TEMPORARY__onDataListener","commandHistory","currentCommandSearchString","commandHistoryNavigationIdx","isRunningCommand","setupState","allowProposedApi","fontSize","letterSpacing","fontWeight","fontWeightBold","tabStopWidth","overviewRulerWidth","scrollback","convertEol","scrollOnUserInput","configuration","onContextLoss","dispose","loadAddon","unicode","activeVersion","attachCustomKeyEventHandler","hasSelection","webLinkProvider","registerLinkProvider","commands","commandConfig","aliases","TERMINAL_COMMAND_CONFIGURATION_CHECK__FAILURE","onDidChangeResults","resultIndex","onKey","domEvent","replaceAll","addCommandToHistory","matchingCommand","arg","finally","isFlushed","abort","deleteFromCommand","altKey","ctrlKey","computeCursorJumpMovement","movement","computeCursorMovement","scrollLines","scroll","write","seq","writeToCommand","dispatchEvent","setCommandFromHistory","onData","startsWith","trimEnd","getCommandRange","commandText","commandFirstLine","repeat","startY","cursorIdx","baseY","cursorY","cursorX","startX","endY","endX","back","distance","foundWord","charAt","rows","maxDistance","Math","min","abs","newCursorX","newCursorY","abs_cursorY","ceil","max","floor","viewportY","right","setCommand","cursorMovement","isSetup","isFocused","textarea","mount","autoResize","fit","unshift","padEnd","newCommand","newSystemCommand","DIM","flushScreen","isLastLineEmpty","lineText","scrollToTop","resetANSIStyling","scrollToBottom","BRIGHT_BLACK","BRIGHT_GREEN","description","usage","chunk","systemCommand","output","findNext","decorations","wholeWord","caseSensitive","incremental","clearSearch","clearDecorations","clearSelection","findPrevious","getContent","lines","copy","getSelection","alertUnhandledError","copyAll","TerminalService","UNKNOWN_USER_ID","IdentityService","currentUser","setCurrentUser","isAnonymous","LEGEND_APPLICATION_COLOR_THEME","LocalStorage","localStorage","setItem","getItem","removeItem","hasItem","StorageStore","storeIndex","storageService","getIndex","getValue","getNumericValue","assertIsNumber","guaranteeIsNumber","getStringValue","assertIsString","guaranteeIsString","getBooleanValue","assertIsBoolean","guaranteeIsBoolean","getObjectValue","assertIsObject","guaranteeIsObject","hasValue","persistValue","updateIndex","StorageService","storage","applicationStorageKey","index","isEmpty","TelemetryService","userId","identityService","appEnv","appSessionId","appStartTime","eventType","TimeService","interruptions","finalizeTimingsRecord","stopWatch","timings","totalTime","elapsed","startTime","endTime","record","fromEntries","records","total","numberOfInteruptions","interruption","__numberOfInteruptions","DEFAULT_DARK_COLOR_THEME","DEFAULT_DARK","TEMPORARY__globalCSSClassName","colors","LEGACY_LIGHT_COLOR_THEME","LEGACY_LIGHT","HIGH_CONTRAST_LIGHT_COLOR_THEME","HIGH_CONTRAST_LIGHT","HIGH_CONTRAST_DARK_COLOR_THEME","HIGH_CONTRAST_DARK","LEGEND_APPLICATION_SETTING_KEY","LEGEND_APPLICATION_SETTING_CONFIG","COLOR_THEME","defaultValue","LayoutService","colorThemeRegistry","currentColorTheme","setBackdropContainerElementID","setShowBackdrop","setColorTheme","getExtraColorThemes","colorTheme","COLOR_THEME_CONFIGURATION_CHECK__FAILURE","themeKey","settingService","TEMPORARY__syncGlobalCSSClassName","querySelector","setWindowTitle","previousTheme","newColorTheme","previousColorTheme","persist","getColor","ClipboardService","clipboard","writeText","notifySuccessMessage","NavigationService","SettingService","registry","getExtraSettingConfigurationEntries","SETTING_CONFIGURATION_CHECK__FAILURE","SETTING_RETRIVE_FAILURE","DefaultNavigator","goToLocation","reload","goToAddress","address","generateAddress","updateCurrentLocation","updateCurrentZone","zone","resetZone","getCurrentBaseAddress","getCurrentAddress","getCurrentLocation","getCurrentLocationParameters","getCurrentLocationParameterValue","getCurrentZone","blockNavigation","blockCheckers","onBlock","onNativePlatformNavigationBlock","unblockNavigation","isNavigationBlocked","INTERNAL__internalizeTransientParameter","UserDataService","USER_DATA_RETRIEVE_FAILURE","isSemVer","test","RELEASE_UPDATE_TYPE","APPLICATION_LAST_OPENED_VERSION","ReleaseNotesService","releaseNotes","showCurrentReleaseModal","showReleaseLog","isConfigured","setShowCurrentRelease","setReleaseLog","release","notes","note","collectReleaseNotes","getViewedVersion","userDataService","updateViewedVersion","showVersion","versionNotes","lastOpenedVersion","numeric","showableVersions","ApplicationStore","extensionStates","initState","platform","terminalService","releaseNotesService","eventService","tracerService","getLoggerPlugins","getEventNotifierPlugins","getTelemetryServicePlugins","getTracerServicePlugins","getExtraApplicationExtensionStateBuilders","creator","getNavigator","APPLICATION_LOAD__FAILURE","logUnhandledError","ILLEGAL_APPLICATION_STATE_OCCURRED","actionFn","DOWNLOAD_EVENTS","LegendApplicationLogger","LegendApplicationWebConsole","LegendApplication","basePresets","basePlugins","baseAddress","pluginRegister","_isConfigured","downloadHelperServiceWorkerPath","downloadHelper","withBasePresets","withPresets","withBasePlugins","withPlugins","withDownloadHelper","path","withReleaseNotes","setupApplicationStore","fetchApplicationConfiguration","client","versionData","origin","APPLICATION_CONFIGURATION__FAILURE","configureApplication","extensions","loadDocumentationRegistryData","all","documentationRegistryEntries","getExtraDocumentationRegistryEntries","simple","docData","patterns","pattern","DOCUMENTATION_FETCH__FAILURE","extensionConfigData","getExtraApplicationSetups","loadApplication","workerPath","serviceWorker","register","reg","registerDownloadHelperServiceWorker","LEGEND_APPLICATION_ROOT_ELEMENT_TAG","LegendApplicationPlugin","ResizablePanelGroup","RESIZABLE_COLLAPSED_PANEL_CLASS_NAME","getCollapsiblePanelGroupProps","minimizeCondition","collapsiblePanel","onStartResize","handleProps","domElement","onStopResize","flexGrow","Number","flex","remainingPanel","ResizablePanel","ResizablePanelSplitter","ResizablePanelSplitterLine","color","Core_LegendApplicationPlugin","NAME","registerApplicationPlugin","StereotypeConfig","profile","stereotype","TaggedValueConfig","LegendApplicationConfig","appVersionBuildTime","appVersionCommitId","input","storageKey","getDefaultApplicationStorageKey","documentation","contextualEntries","buildTime","commitSHA","resolveAbsoluteUrl","LegendPureIDEApplicationConfig","pureUrl","useDynamicPureServer","pure","dynamic","LegendApplicationPluginManager","telemetryServicePlugins","tracerServicePlugins","eventNotifierPlugins","applicationPlugins","registerTelemetryServicePlugin","registerTracerServicePlugin","registerEventNotifierPlugin","LegendPureIDEPluginManager","pureProtocolProcessorPlugins","pureGraphManagerPlugins","pureGraphPlugins","registerPureProtocolProcessorPlugin","registerPureGraphManagerPlugin","registerPureGraphPlugin","getPureGraphManagerPlugins","getPureProtocolProcessorPlugins","getPureGraphPlugins","LEGEND_APPLICATION_PARAM_TOKEN","stripTrailingSlash","_url","endsWith","BrowserNavigator","navigate","_isNavigationBlocked","_forceBypassNavigationBlocking","_blockCheckers","_beforeUnloadListener","checker","returnValue","ignoreBlocking","onProceed","hash","withAppRoot","pathname","isFullUrl","parseUrl","query","getQueryParameters","sanitizeParametersInsteadOfUrl","paramValue","replaceUrlSafeBase64Characters","decodeURIComponent","getQueryParameterValue","history","pushState","onpopstate","forward","currentZone","params","stringifyQueryParams","ApplicationPlatform","BrowserPlatform","initialColorTheme","INITIAL_COLOR_THEME","ApplicationPlatformContext","BrowserPlatformProvider","BrowserEnvironmentProvider","basename","WELCOME_FILE_PATH","HOME_DIRECTORY_PATH","ROOT_PACKAGE_PATH","ACTIVITY_MODE","PANEL_MODE","PURE_GRAMMAR_TOKEN","buildCodeEditorTheme","vscodeThemeData","baseTheme","colorsOverride","rulesOverride","baseThemeData","rawData","rules","tokenColors","tokenColor","settings","scopes","scope","baseRule","fontStyle","rule","token","base","inherit","parseVSCodeTheme","BASE_PURE_LANGUAGE_COLOR_TOKENS","IDENTIFIER","NUMBER","DATE","COLOR","PACKAGE","PARSER","LANGUAGE_STRUCT","MULTIPLICITY","GENERICS","PROPERTY","PARAMETER","VARIABLE","TYPE","STRING","CODE_EDITOR_THEME","DEFAULT_DARK_THEME","SOLARIZED_DARK_THEME","BUILT_IN__VSCODE_DARK","GITHUB_DARK_THEME","GITHUB_LIGHT_THEME","BUILT_IN__VSCODE_LIGHT","GITHUB_DARK_DIMMED_THEME","MATERIAL_DEFAULT_THEME","MATERIAL_DARKER_THEME","ONE_DARK_PRO_THEME","ONE_DARK_PRO_DARKER_THEME","moveCursorToPosition","editor","position","hasTextFocus","revealPositionInCenter","setPosition","INTERNAL__DUMMY_PROBLEM_MARKER_OWNER","CODE_EDITOR_LANGUAGE","PARSER_SECTION_MARKER","RESERVERD_PACKAGE_NAMES","PRECISE_PRIMITIVE_TYPE","ATOMIC_TEST_TYPE","PRIMITIVE_TYPE","ROOT_PACKAGE_NAME","AUTO_IMPORTS","CORE_PURE_PATH","MILESTONING_VERSION_PROPERTY_SUFFIX","MILESTONING_STEREOTYPE","PackageableElementPointerType","SUPPORTED_FUNCTIONS","ConceptType","ConceptAttribute","pureId","pureType","pureName","PackageConceptAttribute","deprecated","PropertyConceptAttribute","RO","classPath","file","ElementConceptAttribute","notpublic","user","ConceptNode","li_attr","pct","getNodeAttribute","hashValue","sha1","update","digest","hashCode","trimPathLeadingSlash","File","setContent","FileCoordinate","FileErrorCoordinate","FIND_USAGE_FUNCTION_PATH","getConceptInfoLabel","usageConcept","owner","Usage","startLine","startColumn","endLine","endColumn","PackageableElementUsage","first","second","TabState","isPinned","setPinned","tab","TabManagerState","currentTab","tabs","setCurrentTab","closeTab","closeAllTabs","closeAllOtherTabs","openTab","swapTabs","pinTab","unpinTab","_tab","tab1","tab2","entryOne","entryTwo","idxX","idxY","swapEntry","t","currIndex","openIndex","PureIDETabState","ideStore","PureIDETabManagerState","dndType","FileEditorState","hasChanged","CAUTION","executeGo","LEGEND_PURE_IDE_COMMAND_KEY","LEGEND_PURE_IDE_COMMAND_CONFIG","SEARCH_FILE","SEARCH_TEXT","GO_TO_FILE","TOGGLE_TERMINAL_PANEL","EXECUTE","FULL_RECOMPILE","FULL_RECOMPILE_WITH_FULL_INIT","RUN_ALL_TESTS","RUN_RELAVANT_TESTS","LEGEND_PURE_IDE_DIAGRAM_EDITOR_COMMAND_KEY","LEGEND_PURE_IDE_DIAGRAM_EDITOR_COMMAND_CONFIG","RECENTER","USE_ZOOM_TOOL","USE_VIEW_TOOL","USE_PAN_TOOL","LEGEND_PURE_IDE_PURE_FILE_EDITOR_COMMAND_KEY","LEGEND_PURE_IDE_PURE_FILE_EDITOR_COMMAND_CONFIG","TOGGLE_TEXT_WRAP","REVEAL_CONCEPT_IN_TREE","GO_TO_DEFINITION","GO_BACK","FIND_USAGES","RENAME_CONCEPT","GO_TO_LINE","DELETE_LINE","LEGEND_PURE_IDE_TERMINAL_COMMAND","FileTextEditorState","model","_dummyCursorObservable","viewState","forcedCursorPosition","wrapText","fileEditorState","cursorObserver","notifyCursorObserver","setViewState","setEditor","setForcedCursorPosition","setWrapText","filePath","PURE","JAVA","MARKDOWN","SQL","XML","YAML","GRAPHQL","TEXT","getFileEditorLanguage","createModel","Uri","setValue","getPosition","selection","oldVal","updateOptions","wordWrap","FileEditorRenameConceptState","concept","coordinate","coordiate","textEditorState","_currentHashCode","renameConceptState","showGoToLinePrompt","resetChangeDetection","setFile","setShowGoToLinePrompt","setConceptToRenameState","runTest","getConceptInfo","FUNCTION","setPCTRunPath","executeTests","showError","editorModel","errors","ownerId","startLineNumber","endLineNumber","setModelMarkers","MarkerSeverity","clearError","removeAllMarkers","registerCommands","tabManagerState","currentPosition","executeNavigation","navigateBack","revealConceptInTree","findConceptUsages","getWordAtPosition","pushEditOperations","forceMoveMarkers","proceed","findUsagesFromCoordinate","renameConcept","newName","usages","ENUM_VALUE","ENUM","QUALIFIED_PROPERTY","ELEMENT","deregisterCommands","TreeState","treeData","selectedNode","loadInitialDataState","refreshDataState","expandNode","openNode","refreshTreeData","setTreeData","setSelectedNode","getTreeData","buildTreeData","getRootNodes","isSelected","refreshTree","nodes","childrenIds","childNodes","getChildNodes","processChildNodes","openingNodeIds","Set","selectedNodeId","nodesToOpen","rootIds","refreshOpenNodes","childId","DirectoryAttribute","FileDirectoryAttribute","statusType","FolderDirectoryAttribute","repo","DirectoryNode","isFolderNode","isFileNode","isRepoNode","getParentPath","trimmedPath","lastIndexOf","pathToId","DirectoryTreeState","nodeForCreateNewFile","nodeForCreateNewDirectory","nodeForRenameFile","setNodeForCreateNewFile","setNodeForCreateNewDirectory","setNodeForRenameFile","revealPath","getDirectoryChildren","rootNodes","child","childNode","loadFile","forceOpenExplorerPanel","setActiveActivity","FILE_EXPLORER","keepShowingIfMatchedCurrent","paths","currentPath","_path","directoryOnly","currentNode","scrollIntoView","behavior","block","extractElementNameFromPath","fullPath","findLast","extractPackagePathFromPath","resolvePackagePathAndElementName","defaultPath","createPath","packagePath","RELATION","ConceptTreeState","loadConceptActivity","nodeForRenameConcept","nodeForMoveElement","setStatusText","setNodeForRenameConcept","setNodeForMoveElement","pullConceptsActivity","pollConceptsActivity","revealConcept","getConceptChildren","parent","loadDiagram","parseInt","getConceptActivity","initializing","CONCEPT_EXPLORER","packageOnly","movePackageableElements","elementNodeAttributes","destinationPackage","elementsUsage","getPackageableElementsUsage","attr","inputs","elementInfo","sourcePackage","oldName","childElementsInfo","getChildPackageableElements","newPackage","InitializationResult","cached","datamarts","InitializationFailureResult","sessionError","InitializationFailureWithSourceResult","ExecutionResult","reinit","ExecutionSuccessResult","cache","modifiedFiles","ExecutionFailureResult","GetConceptJumpTo","GetConceptResult","jumpTo","CandidateWithPackageImported","sourceID","foundName","CandidateWithPackageNotImported","messageToBeModified","fileToBeModified","lineToBeModified","columnToBeModified","UnmatchedFunctionResult","candidateName","candidatesWithPackageImported","candidatesWithPackageNotImported","UnknownSymbolResult","candidates","TestAttribute","parentId","TestInfo","TestExecutionResult","count","filterPaths","pctAdapter","relevantTestsOnly","runnerId","tests","deserializeExecutionResult","PureUnmatchedFunctionException","SearchEntry","SearchResultPreview","before","found","after","SearchResultCoordinate","sourceId","preview","SearchResultEntry","coordinates","dismissCoordinate","setCoordinates","PCTAdapter","TestResultStatus","TestSuiteStatus","TestResultType","TestResult","TestSuccessResult","TestFailureResultError","TestFailureResult","AbstractTestRunnerCheckResult","TestRunnerCheckResult","finished","TestRunnerCheckError","TestResultInfo","_START_TIME","time","passedTests","failedTests","testsWithError","notRunTests","results","allTestIds","passed","failed","passedTestIds","failedTestIds","testWithErrorIds","notRunTestIds","numberOfTestsRun","runPercentage","suiteStatus","setTime","addResult","PASSED","NONE","testId","TestRunnerState","testExecutionResult","checkTestRunnerState","testResultInfo","allTests","selectedTestId","treeBuildingState","viewAsList","adapters","setViewAsList","setSelectedTestId","setTestResultInfo","collapseTree","expandTree","buildTreeDataByLayer","pullTestRunnerResult","buildTestTreeData","pollTestRunnerResult","rerunTestSuite","cancelTestRun","getPCTAdapters","adapter","childLevelTests","parentNode","testInfo","checkTestRunner","testResult","testRunState","cancelTestRunner","CommandResult","CommandFailureResult","errorDialog","PureServerClient","networkClient","sessionId","compilerMode","requestCache","fastCompile","getInitializationActivity","execute","openFiles","extraParams","getExecutionActivity","findFiles","isRegExp","isCaseSensitive","string","getTextSearchPreview","testRunnerId","param","getUsages","MULTIPLE_PATHS","getFile","updateSource","updateInputs","createFile","createFolder","renameFile","oldPath","newPath","deleteDirectoryOrFile","getDiagramInfo","diagramPath","getDiagramClassInfo","getSuggestionsForIncompletePath","currentPackagePath","types","getSuggestionsForIdentifier","importPaths","getSuggestionsForAttribute","getSuggestionsForClass","getSuggestionsForVariable","PanelDisplayState","_initialDefaultSize","_tempSize","defaultSize","snapSize","maxSize","initial","snap","isMaximizable","isMaximized","toggle","setMaxSize","maximize","minimize","toggleMaximize","CORE_HASH_STRUCTURE","hashObject","excludeKeys","propKey","hashRawLambda","stereotypes","taggedValues","ModelElement","PackageableElement","_UUID","_isDeleted","_isDisposed","package","isDeleted","setIsDeleted","parentPackagePath","_elementHashCode","PACKAGEABLE_ELEMENT","DIAGRAM_HASH_STRUCTURE","Diagram","classViews","associationViews","generalizationViews","propertyViews","DIAGRAM","accept_PackageableElementVisitor","visitor","visit_PackageableElement","POINT","Rectangle","RECTANGLE","PositionedRectangle","_dummyObservable","rectangle","center","contains","box","normalizeBox","newBox","POSITIONED_RECTANGLE","ClassView","_OWNER","class","hideProperties","hideTaggedValues","hideStereotypes","_class","CLASS_VIEW","valueForSerialization","RelationshipViewEnd","_offsetX","_offsetY","classView","Reference","ReferenceWithOwner","ownerReference","PackageableElementReference","PackageableElementExplicitReference","ClassViewReference","ClassViewExplicitReference","RelationshipView","to","computeEdgeEndpoint","edgeView","allowChange","newX","newY","buildFullPath","startPoint","endPoint","pathForSerialization","pruneUnnecessaryInsidePoints","RELATIONSHIP_VIEW","PropertyHolderView","property","PROPERTY_HOLDER_VIEW","pointerHashCode","PropertyView","PROPERTY_VIEW","Vector","fromPoints","unit","norm","sqrt","normal","other","dotProduct","getElementPosition","xPosition","yPosition","offsetParent","offsetLeft","clientLeft","offsetTop","clientTop","_relationshipView_simplifyPath","relationshipView","v1","v2","dot","angle","acos","PI","_relationshipView_setPath","rotatePointX","point","cos","sin","rotatePointY","getBottomRightCornerPoint","pR","buildBottomRightCornerBox","bottomRightCornerPoint","boxSize","boxContains","otherBox","GeneralizationView","GENERALIZATION_VIEW","Type","_subclasses","_generatedMilestonedProperties","properties","propertiesFromAssociations","derivedProperties","generalizations","constraints","genericType","superclass","rawType","subclass","CLASS","gen","visit_Class","visit_Package","addElementToPackage","deleteElementFromPackage","packageableElement","_getOrCreatePackage","parentPackage","relativePackagePath","createNewPackageIfNotFound","packageName","pkg","getOrCreatePackage","cachedPackage","immediateParentPackageRelativePath","cachedParentPackage","getOrCreateGraphPackage","graph","getRawGenericType","getAllSuperclasses","c","visitedClasses","resolveSuperTypes","superType","getMultiplicityString","lowerBound","upperBound","TaggedValue","tag","TAGGED_VALUE","TagReference","TAG_POINTER","TagExplicitReference","StereotypeReference","STEREOTYPE_POINTER","StereotypeExplicitReference","GenericTypeReference","GenericTypeExplicitReference","Function","functionName","FunctionDefinition","RelationType","columns","RELATION_TYPE","typeArguments","typeVariableValues","multiplicity","aggregation","AggregationKind","LakehouseTargetEnv","DataProduct_DeliveryFrequency","DataProduct_Region","DERIVED_PROPERTY","DataType","visit_PrimitiveType","BOOLEAN","BINARY","INTEGER","FLOAT","DECIMAL","STRICTDATE","DATETIME","STRICTTIME","LATESTDATE","BYTE","PrecisePrimitiveType","VARCHAR","INT","TINY_INT","U_TINY_INT","SMALL_INT","U_SMALL_INT","U_INT","BIG_INT","U_BIG_INT","DOUBLE","NUMERIC","TIMESTAMP","ENUMERATION","visit_Enumeration","Association","ONE","propertyA","propertyB","classA","classB","ASSOCIATION","visit_Association","Mapping","classMappings","enumerationMappings","associationMappings","MAPPING","visit_Mapping","Profile","p_stereotypes","p_tags","PROFILE","st","visit_Profile","Service","owners","ownership","autoActivateUpdates","execution","postValidations","patternParameters","parameter","SERVICE","visit_Service","ConcreteFunctionDefinition","returnType","returnMultiplicity","expressionSequence","visit_ConcreteFunctionDefinition","Store","FlatData","sections","FLAT_DATA","include","visit_FlatData","PackageableRuntime","runtimeValue","PACKAGEABLE_RUNTIME","visit_PackageableRuntime","PackageableConnection","connectionValue","PACKAGEABLE_CONNECTION","visit_PackageableConnection","AbstractGenerationSpecification","FileGenerationSpecification","generationOutputPath","scopeElements","configurationProperties","FILE_GENERATION","visit_FileGenerationSpecification","GenerationSpecification","generationNodes","fileGenerations","findGenerationElementById","generationElement","GENERATION_TREE","fileGeneration","hashElementPointer","pointerType","PACKAGEABLE_ELEMENT_POINTER","visit_GenerationSpecification","measure","conversionFunction","UNIT","canonicalUnit","nonCanonicalUnits","MEASURE","visit_Measure","schemas","joins","filters","includedStoreSpecifications","DATABASE","visit_Database","PureGraphExtension","getElementClass","elements","getElement","setElement","deleteElement","renameElement","DataElement","DATA_ELEMENT","visit_DataElement","ExecutionEnvironmentInstance","executionParameters","EXECUTION_ENVIRONMENT_INSTANCE","visit_ExecutionEnvironmentInstance","INTERNAL__UnknownPackageableElement","INTERNAL__UNKNOWN_PACKAGEABLE_ELEMENT","visit_INTERNAL__UnknownPackageableElement","FunctionActivator","function","activationConfiguration","INTERNAL__UnknownFunctionActivator","INTERNAL__UNKNOWN_FUNCTION_ACTIVATOR","visit_INTERNAL__UnknownFunctionActivator","INTERNAL__UnknownStore","INTERNAL__UNKNOWN_STORE","visit_INTERNAL__UnknownStore","INTERNAL__UnknownElement","classifierPath","INTERNAL__UNKNOWN_ELEMENT","visit_INTERNAL__UnknownElement","DataProduct","accessPointGroups","supportInfo","sampleValues","operationalMetadata","visit_DataProduct","DATA_PRODUCT","IngestDefinition","appDirDeployment","TEMPORARY_MATVIEW_FUNCTION_DATA_SETS","visit_IngestDefinition","FORBIDDEN_EXTENSION_ELEMENT_CLASS","SECTION_INDEX","visit_SectionIndex","BasicModel","_origin","graphPlugins","elementSectionIndex","sectionIndicesIndex","profilesIndex","typesIndex","associationsIndex","functionsIndex","functionActivatorsIndex","storesIndex","mappingsIndex","connectionsIndex","runtimesIndex","servicesIndex","generationSpecificationsIndex","fileGenerationsIndex","productsIndex","dataElementsIndex","executionEnvironmentsIndex","INTERNAL__unknownElementsIndex","INTERNAL__unknownIndex","rootPackageName","extensionElementClasses","getExtraPureGraphExtensionClasses","createGraphExtensions","extensionElementClass","ownSectionIndices","ownProfiles","ownEnumerations","ownMeasures","ownClasses","ownTypes","ownAssociations","ownFunctions","ownFunctionActivators","ownStores","ownFlatDatas","ownDatabases","ownMappings","ownServices","ownRuntimes","ownConnections","ownFileGenerations","ownProducts","ownDataElements","ownExecutionEnvironments","ownIngests","ownGenerationSpecifications","ownTestables","coreTestables","getExtraTestablesCollectors","allOwnElements","elementFilter","setOrigin","getExtensionElements","getExtensionForElementClass","extension","getOwnNullableSection","getOwnNullableSectionIndex","getOwnNullableProfile","getOwnNullableType","getOwnNullableClass","getOwnNullableEnumeration","getOwnNullableMeasure","getOwnNullableAssociation","getOwnNullableFunction","getOwnNullableFunctionActivator","getOwnNullableStore","getOwnNullableMapping","getOwnNullableConnection","getOwnNullableRuntime","getOwnNullableService","getOwnNullableGenerationSpecification","getOwnNullableFileGeneration","getOwnNullableDataElement","getOwnNullableExecutionEnviornment","getOwnNullableDataProduct","getOwnNullableIngestDefinition","ingest","getOwnSectionIndex","getOwnProfile","getOwnType","getOwnClass","getOwnEnumeration","getOwnMeasure","getOwnAssociation","getOwnFunction","getOwnFunctionActivator","getOwnStore","getOwnDatabase","getOwnFlatDataStore","getOwnMapping","getOwnConnection","getOwnRuntime","getOwnService","getOwnGenerationSpecification","getOwnFileGeneration","getOwnDataElement","getOwnExecutionEnvironment","getOwnDataProduct","getOwnNullableExtensionElement","setOwnSection","setOwnSectionIndex","setOwnProfile","setOwnType","setOwnAssociation","setOwnFunction","setOwnFunctionActivator","setOwnStore","setOwnMapping","setOwnConnection","setOwnRuntime","setOwnService","setOwnGenerationSpecification","setOwnFileGeneration","setOwnDataElement","setOwnExecutionEnvironment","setOwnDataProduct","INTERNAL__setOwnUnknown","INTERNAL__setOwnUnknownElement","setOwnElementInExtension","knownAllOwnElements","getNullablePackage","getOwnNullableElement","includePackage","extensionElement","addOwnElement","deleteOwnElement","renameOwnElement","newPackagePath","newElementName","newParentPackage","p","getFunctionSignature","childElements","childElement","currentParentPackage","childElementOriginalPath","TEMPORARY__deleteOwnSectionIndex","sectionIndex","GraphDataOrigin","LegendSDLC","groupId","artifactId","versionId","DependencyModel","buildDependencyElementGetter","dependencyManager","elementGetter","dependencyGraph","dependencyGraphs","DependencyManager","roots","projectDependencyModelsIndex","dependencyEntitiesIndex","dependencyKey","entitiesWithOrigin","generateDependencyRootPackageName","numberOfDependencies","hasDependencies","dep","sectionIndices","profiles","enumerations","measures","associations","functions","functionActivators","stores","databases","mappings","services","runtimes","connections","dataElements","generationSpecifications","testables","executionEnvironments","ingests","getModel","projectId","getNullableElement","getPackages","getElementOrigin","ModelStore","CoreModel","primitiveTypesIndex","precisePrimitiveTypesIndex","primitiveTypes","precisePrimitiveTypes","CORE","initializePrimitiveTypes","initializePrecisePrimitiveTypes","INSTANCE","resolvedPath","primitiveType","precisePrimitiveType","SystemModel","autoImports","SYSTEM","initializeAutoImports","_package","GenerationModel","MODEL_GENERATION","PureModel","coreModel","systemModel","generationModel","MAIN","allElements","getPrimitiveType","getType","getProfile","getEnumeration","getMeasure","getUnit","getAssociation","getPropertyOwner","getFunction","getFunctionActivator","getStore","getDataProduct","getIngestDefinition","getFlatDataStore","getDatabase","getMapping","getService","getConnection","getRuntime","getGenerationSpecification","getFileGeneration","getDataElement","getExtensionElement","notFoundErrorMessage","getNullableClass","getNullableMapping","getNullableService","getNullableRuntime","getNullableFileGeneration","getMultiplicity","ZERO_ONE","ZERO_MANY","ONE_MANY","ZERO","addElement","deadReferencesCleaners","getExtraDeadReferencesCleaners","cleaner","Tag","Stereotype","PropertyReference","PROPERTY_POINTER","PropertyExplicitReference","SourceInformation","TEMPORARY__diagramInfoSourceInformationSerializationSchema","PURE__Profile","tags","PURE__Steoreotype","PURE__Tag","PURE__TaggedValue","PURE__GenericType","typeParameter","PURE__Property","PURE__PackageableElementPointer","sourceInformation","PURE__Class","qualifiedProperties","PURE__Enumeration","enumValues","PURE__Point","PURE__Rectangle","PURE__Geometry","points","PURE__GeneralizationView","geometry","PURE__PropertyViewPropertyPointer","owningType","PURE__PropertyView","PURE__TypeView","rectangleGeometry","PURE__Diagram","typeViews","DiagramDomainInfo","DiagramInfo","diagram","domainInfo","DiagramClassInfo","specializations","serializeDiagram","cv","toFixed","gv","pos","pv","getOrCreateClass","diagramClasses","existingClass","isStubbed","parseMultiplicty","parts","buildClass","classData","taggedValueData","stereotypeData","superTypeData","superClass","propertyData","newProperty","COMPOSITE","SHARED","buildGraphFromDiagramInfo","diagramInfo","domain","profileData","enumerationData","enumeration","diagramData","typeViewData","propertyViewData","propertyView","propertyOwner","pointData","generationViewData","generalizationView","PURE_ELEMENT_NAME","PURE_CONNECTION_NAME","PURE_PARSER","generateMultiplicityString","AssociationView","association","ASSOCIATION_VIEW","DIAGRAM_INTERACTION_MODE","DIAGRAM_RELATIONSHIP_EDIT_MODE","DIAGRAM_ALIGNER_OPERATOR","MIN_ZOOM_LEVEL","DIAGRAM_ZOOM_LEVELS","getPropertyDisplayName","DiagramRenderer","isReadOnly","enableLayoutAutoAdjustment","div","canvas","canvasDimension","canvasCenter","virtualScreen","screenOffset","zoom","interactionMode","relationshipMode","triangle","diamond","lineHeight","truncateText","maxLineLength","screenPadding","classViewSpaceX","classViewSpaceY","propertySpacing","showScreenGrid","showScreenBoxGuide","screenGridAxisTickLength","screenGridSpacingX","screenGridSpacingY","screenGridLineWidth","screenGridLineColor","screenGridLabelTextColor","screenGuideLineColor","screenGuideLabelTextColor","showCanvasGrid","showCanvasBoxGuide","showScreenOffsetGuide","canvasGridAxisTickLength","canvasGridSpacingX","canvasGridSpacingY","canvasGridLineWidth","canvasGridLineColor","canvasGridLabelTextColor","canvasGuideLineColor","canvasGuideLabelTextColor","screenOffsetGuideLineColor","screenOffsetGuideLabelTextColor","defaultLineWidth","defaultLineColor","canvasColor","backgroundColor","classViewFillColor","classViewHeaderTextColor","classViewPropertyTextColor","classViewPrimitivePropertyTextColor","classViewDerivedPropertyTextColor","relationshipViewTextColor","propertyViewOwnedDiamondColor","propertyViewSharedDiamondColor","generalizationViewInheritanceTriangeFillColor","selectionBoxBorderColor","selectionStart","selectedClassCorner","selectedClassProperty","selectedClasses","selectedPropertyOrAssociation","selectedInheritance","selectedPoint","_selectedClassesInitialPositions","startClassView","handleAddRelationship","mouseOverClassCorner","mouseOverClassName","mouseOverClassView","mouseOverClassProperty","mouseOverPropertyHolderViewLabel","cursorPosition","callbacks","leftClick","middleClick","rightClick","clickX","clickY","positionBeforeLastMove","onAddClassViewClick","onClassViewRightClick","onBackgroundDoubleClick","onClassViewDoubleClick","onClassNameDoubleClick","onClassPropertyDoubleClick","handleEditClassView","handleEditProperty","handleAddSimpleProperty","changeMode","setIsReadOnly","setEnableLayoutAutoAdjustment","setMouseOverClassView","setMouseOverClassName","setMouseOverClassCorner","setMouseOverClassProperty","setMouseOverPropertyHolderViewLabel","setSelectionStart","setSelectedClassCorner","setSelectedClasses","setSelectedPropertyOrAssociation","setSelectedInheritance","setLeftClick","setMiddleClick","setRightClick","setZoomLevel","align","offsetWidth","offsetHeight","getContext","LAYOUT","onwheel","mousewheel","onmousedown","mousedown","onkeydown","keydown","ondblclick","mousedblclick","onmouseup","mouseup","onmousemove","mousemove","render","ensureClassViewMeetMinDimensions","refresh","autoRecenter","FIT_ZOOM_PADDING","zoomToFit","refreshCanvas","drawScreen","clearScreen","fillStyle","fillRect","manageVirtualScreen","drawAll","editMode","PAN","ZOOM_IN","ZOOM_OUT","ADD_CLASS","ADD_RELATIONSHIP","INHERITANCE","targetClassView","onClass_addSuperType","generalization","gview","onDiagram_addGeneralizationView","onClass_addProperty","pView","onDiagram_addPropertyView","ALIGN_LEFT","leftBound","reduce","view","MAX_SAFE_INTEGER","onPositionedRectangle_setPosition","ALIGN_CENTER","ALIGN_RIGHT","rightBound","ALIGN_TOP","topBound","ALIGN_MIDDLE","middle","ALIGN_BOTTOM","bottomBound","SPACE_HORIZONTALLY","sorted","toSorted","previousView","currentView","spacings","averageSpacing","SPACE_VERTICALLY","truncateTextWithEllipsis","ellipsis","canvasCoordinateToModelCoordinate","modelCoordinateToCanvasCoordinate","resolveMouseEventCoordinate","HTMLElement","targetEl","offsetX","offsetY","eventCoordinateToCanvasCoordinate","divPosition","canvasCoordinateToEventCoordinate","hasPropertyView","firstClassView","minX","minY","maxX","maxY","relationshipViews","drawLinePropertyText","executeZoom","newZoomLevel","currentZoomLevel","zoomPoint","zoomLevel","zoomCenter","addClassView","addedClass","classViewModelCoordinate","existingIds","newClassView","onDiagram_addClassView","onPositionedRectangle_forceRefreshHash","drawClassView","drawBoundingBox","lineWidth","strokeRect","drawDiagram","associationView","drawPropertyOrAssociation","drawInheritance","drawCanvasGrid","drawScreenGrid","beginPath","strokeStyle","font","gridX","fillText","round","moveTo","lineTo","stroke","gridY","setLineDash","offsetPointRadius","thresholdToHideOffsetTickLabel","arc","drawClassViewProperty","propX","propY","measureOnly","propertyName","txtMeasure","measureText","multiplicityString","computeClassNameWidth","textBaseline","classMinWidth","classMinHeight","stereotypeTxt","stereoWidth","taggedValue","taggedValueTxt","taggedValueWidth","propertyTextMeasure","onPositionedRectangle_setRectangle","classNameText","yLineCoord","drawLinePropertyNameAndMultiplicity","textPositionX","textPositionY","multiplicityPositionX","multiplicityPositionY","multiplictyString","textSize","mulSize","posX","posY","propertyPosition","mulPosX","mulPosY","multiplicityPosition","viewSide","rect","toProperty","resultX","resultY","atan","fill","inheritance","reorderDiagramDomain","firstClass","newClasses","potentiallyShiftRelationships","newMovingDeltaX","newMovingDeltaY","onRelationshipView_setPath","recenter","switchToZoomMode","switchToViewMode","switchToPanMode","switchToAddPropertyMode","switchToAddInheritanceMode","switchToAddClassMode","ejectProperty","selectionPoint","getSuperTypeLevels","currentDepth","recurseMaxDepth","res","generation","rec","layoutTaxonomy","classViewLevels","positionInitialClass","reverse","levels","currentLevelIndex","precedentTotalWidth","precedentTotalHeight","precedentX","precedentY","precedent","precedentByX","precedentByY","maxHeight","currentLevelY","fromClassView","toClassView","g","onDiagram_deleteClassView","onDiagram_setAssociationViews","onDiagram_setGeneralizationViews","onDiagram_setPropertyViews","onDiagram_deleteAssociationView","onDiagram_deletePropertyView","onDiagram_deleteGeneralizationView","onClassView_setHideProperties","onClassView_setHideStereotypes","onClassView_setHideTaggedValues","views","mouseEventCoordinate","nextZoomLevel","onRelationshipView_simplifyPath","eventPointInModelCoordinate","onRelationshipEdgeView_setOffsetX","onRelationshipEdgeView_setOffsetY","selectedClass","eventPointInCanvasCoordinate","button","onDiagram_setClassViews","anyClassesSelected","oldPos","onFindOrBuildPoint","stopImmediatePropagation","deltaY","deltaX","selectedClassOldPosition","newMovingX","newMovingY","onRelationshipView_changePoint","selectionStartPointInCanvasCoordinate","selectionBoxWidth","selectionBoxHeight","classNameWidth","propertyHolderViews","propertyHolderView","DiagramEditorState","_renderer","fileLine","fileColumn","diagramName","diagramCursorClass","rebuild","setRenderer","isDiagramRendererInitialized","setupRenderer","diagramClassInfo","profilePath","enumerationPath","isCurrentlyStubbed","subTypePointer","currentClass","subClass","addClassToGraph","existingNames","delim","delimiter","maxCounter","matchingCount","num","generateEnumerableNameFromToken","DEFAULT_TRIGGER","FileSearchCommandState","setText","setCaseSensitive","setRegExp","ExecutionError","PACKAGE_PATH_PATTERN","FILE_PATH_PATTERN","LEGEND_PURE_IDE_TERMINAL_WEBLINK_REGEX","CodeFixSuggestion","UnmatchedFunctionCodeFixSuggestion","UnknownSymbolCodeFixSuggestion","ReferenceUsageResult","searchEntries","references","searchResultCoordinates","numberOfFiles","numberOfResults","fileMap","f1","f2","c1","c2","dismissSearchEntry","setReferenceUsageResult","TextSearchResult","setResult","TextSearchState","loadState","select","getSearchResultEntry","PureIDEStore","directoryTreeState","conceptTreeState","activePanelMode","TERMINAL","panelGroupDisplayState","activeActivity","sideBarDisplayState","executionState","navigationStack","fileSearchCommandLoadState","fileSearchCommandState","openFileSearchCommand","fileSearchCommandResults","codeFixSuggestion","referenceUsageLoadState","referenceUsageResult","textSearchState","testRunnerState","PCTAdapters","selectedPCTAdapter","PCTRunPath","struct","setSelectedPCTAdapter","setCodeFixSuggestion","setOpenFileSearchCommand","setActivePanelMode","setTestRunnerState","pullInitializationActivity","pullExecutionStatus","checkIfSessionWakingUp","runDebugger","manageExecuteGoResult","executeFullTestSuite","fullReCompile","findUsages","updateFileUsingSuggestionCandidate","updateFile","searchFile","createNewDirectory","createNewFile","path_sourceId","path_column","path_line","GO","TEST","REMOVE","MOVE","NEW_DIRECTORY","NEW_FILE","WELCOME","OPEN_FILE","OPEN_DIRECTORY","LIST_DIRECTORY","BRIGHT_CYAN","CLEAR","ECHO","ANSI","HELP","cleanUp","fullInit","initializationPromise","openWelcomeFilePromise","welcomeFileTab","directoryTreeInitPromise","conceptTreeInitPromise","getPCTAdaptersPromise","activity","editorState","reloadFile","tabsToClose","checkExecutionStatus","manageResult","potentiallyAffectedFiles","openedFiles","executionPromise","WAIT_TIME_TO_TRIGGER_STATUS_CHECK","executionPromiseResult","executionPromiseFinished","silentTerminalOnSuccess","clearTerminal","executing","r","execResult","er","refreshTreesPromise","refreshTrees","CODE_FIX_SUGGESTION","TEST_RUNNER","files","silent","REFERENCES","sourceInformations","potentiallyModifiedFiles","candidate","isDirectory","hasChildContent","_delete","PureIDEStoreContext","PureIDEStoreProvider","usePureIDEStore","shiftKey","TextSearchResultEntryDisplay","searchResult","goToResult","TextSearchResultDisplay","showExpandAction","searchEntry","TextSearchPanel","DefaultTreeNodeContainer","stepPaddingInRem","classPrefix","onNodeSelect","paddingLeft","DefaultTreeNodeView","innerProps","defaultTreeComponents","TreeNodeView","TreeNodeContainer","treeComponents","TreeView","rootId","Panel","PanelHeader","titleContent","keepTitleFormat","labelClassName","contentClassName","isDarkMode","isKeepTitleFormat","PanelHeaderActions","PanelHeaderActionItem","PanelContent","PanelDivider","PanelFormSection","errorMessageClassName","validate","onValidate","onBlur","fullWidth","inputType","inputValue","setInputValue","validationErrorMessage","errorMessage","hasError","errorClassName","stringValue","TestTreeNodeContainer","onNodeOpen","onNodeExpand","onNodeCompress","renderNodeLabel","isExpandable","nodeIcon","RUNNING","getTestResultById","getTestTreeNodeStatus","toggleExpansion","onDoubleClick","TestRunnerList","TestRunnerTree","isEmptyTree","TEST_ERROR_LOCATION_PATTERN","TestResultConsole","locationLinkProviderDisposer","textInputRef","newEditor","contextmenu","copyWithSyntaxHighlighting","fontLigatures","fixedOverflowWidgets","detectIndentation","tabSize","automaticLayout","extraEditorClassName","readOnly","glyphMargin","folding","lineNumbers","lineDecorationsWidth","lineNumbersMinChars","minimap","enabled","guides","bracketPairs","bracketPairsHorizontal","highlightActiveBracketPair","indentation","highlightActiveIndentation","renderLineHighlight","getLineCount","getLineContent","matchAll","tooltip","resolveLink","locationLink","createDecorationsCollection","inlineClassName","disposeCodeEditor","TestResultViewer","TestRunnerResultDisplay","numberOfTests","overallResult","orientation","minSize","bar","variant","TestRunnerPanel","CandidateWithPackageImportedDisplay","CandidateWithPackageNotImportedDisplay","UnmatchedFunctionExecutionResultDisplay","suggestionState","UnmatchExecutionResultDisplay","CodeFixSuggestionsPanel","ReferenceUsageSearchResultEntryDisplay","UsageResultDisplay","referenceUsageState","ReferenceUsagePanel","PanelGroup","isVisible","tabsToShow","isTabVisible","tabType","PURE_PackageIcon","PURE_ClassIcon","PURE_EnumerationIcon","PURE_MeasureIcon","PURE_UnitIcon","PURE_ProfileIcon","PURE_FunctionIcon","PURE_MappingIcon","PURE_UnknownElementTypeIcon","PURE_NativeFunctionIcon","PURE_PropertyIcon","PURE_DiagramIcon","getConceptIcon","NATIVE_FUNCTION","IDENTIFIER_PATTERN","RenameConceptPrompt","conceptName","isPackage","inputRef","isValidValue","isSameValue","closeModal","rename","MoveElementPrompt","ConceptExplorerContextMenu","viewConceptSource","nodeAttribute","nodeType","runTests","CONCEPT_TREE_DND_TYPE","ConceptTreeNodeContainer","isSelectedFromContextMenu","setIsSelectedFromContextMenu","isAssociationPropertyNode","nodeLabel","dragConnector","useDrag","UNSUPPORTED","FileExplorerTree","treeState","ConceptTreeExplorer","FILE_NAME_PATTERN","CreateNewFilePrompt","isUnique","n","DIRECTORY_NAME_PATTERN","CreateNewDirectoryPrompt","RenameFilePrompt","FileExplorerContextMenu","isDir","FileTreeNodeContainer","isPlatformDirectory","isChildlessDirectory","DirectoryTreeExplorer","SideBar","renderSideBar","LegendLogo","strokeWidth","viewBox","xmlns","transform","d","ActivityBar","changeActivity","activities","FileEditorStatusBar","currentCursorInfo","selectionLength","getValueInRange","StatusBar","useCommands","registrar","POSITION_PATTERN","GoToLinePrompt","currentEditorCursorPosition","currentLine","currentColumn","getPositionFromGoToLinePromptInputValue","isValidLineNumber","GenericFileEditor","onDidChangeModelContent","currentVal","onDidChangeCursorPosition","onDidChangeCursorSelection","setModel","restoreViewState","saveViewState","isTokenOneOf","baseTokens","exact","baseToken","requiredClassProperties","AttributeSuggestion","ownerPureType","ClassSuggestion","VariableSuggestion","PURE_GRAMMAR_DIAGRAM_PARSER_NAME","PURE_GRAMMAR_DIAGRAM_ELEMENT_TYPE_LABEL","getCopyrightHeaderSuggestions","textUntilPosition","trimStart","kind","CompletionItemKind","Snippet","insertTextRules","CompletionItemInsertTextRule","InsertAsSnippet","insertText","getFullYear","constructorClassSuggestionToCompletionItem","suggestion","Class","filterText","elementSuggestionToCompletionItem","functionPureId","useArrowForm","functionType","shift","createFunctionInvocationSnippet","preferArrowFunctionForm","Folder","Enum","Module","Interface","Value","sortText","INCOMPLETE_PATH_PATTERN","ARROW_FUNCTION_USAGE_WITH_INCOMPLETE_PATH_PATTERN","CONSTRUCTOR_USAGE_WITH_INCOMPLETE_PATH_PATTERN","IMPORT_STATEMENT_PATTERN","getCurrentSectionImportPaths","importPath","ATTRIBUTE_ACCESSOR_PATTERN","variableSuggestionToCompletionItem","isFromCompiledSource","Variable","PureFileEditor","definitionProviderDisposer","hoverProviderDisposer","pureConstructSuggestionProviderDisposer","pureIdentifierSuggestionProviderDisposer","isContextMenuOpen","setIsContextMenuOpen","wordSeparators","_codeEditorService","openCodeEditor","gotoLocation","multiple","multipleDefinitions","alternativeDefinitionCommand","addAction","contextMenuGroupId","contextMenuOrder","run","_editor","registerDefinitionProvider","provideDefinition","lineContent","lineTokens","tokenize","currentToken","currentTokenRange","tokenOffset","offset","uri","registerHoverProvider","provideHover","contents","doc","grammarChars","grammarDoc","registerCompletionItemProvider","triggerCharacters","provideCompletionItems","suggestions","triggerKind","CompletionTriggerKind","TriggerCharacter","triggerCharacter","currentWord","getWordUntilPosition","lineTextIncludingWordRange","Keyword","getParserKeywordSuggestions","CONNECTION","RUNTIME","RELATIONAL","incompletePathMatch","incompletePath","isUsingArrowFunction","isUsingConstructor","getIncompletePathSuggestions","getArrowFunctionSuggestions","attributeAccessorMatch","Property","Method","TAG","Constant","STEREOTYPE","attributeSuggestionToCompletionItem","getAttributeSuggestions","getConstructorClassSuggestions","castingClassSuggestionToCompletionItem","getCastingClassSuggestions","varNames","stopSearching","variablesFoundFromSuggestions","varName","getVariableSuggestions","Invoke","suggestionsGetter","allParserSectionHeaders","currentParserName","getSectionParserNameFromLineText","snippetSuggestion","getParserElementSnippetSuggestions","parserName","parserKeyword","collectParserElementSnippetSuggestions","extraSnippetSuggestions","getInlineSnippetSuggestions","shadowRoot","getDomNode","shadowRootStyleSheet","innerHTML","MENU_ITEMS_TO_DISABLE","menuItem","opacity","pointerEvents","ControlledDropdownMenu","useCapture","triggerRef","onTriggerClick","onClickCapture","backdrop","marginThreshold","DiagramEditorDiagramCanvas","diagramEditorState","handleDrop","monitor","dropPosition","getClientOffset","dropConnector","useDrop","drop","DiagramEditorHeader","createCenterZoomer","isAlignerDisabled","DiagramEditorToolPanel","createModeSwitcher","DiagramEditor","diagramCanvasRef","showPlaceholder","placeholderContainerClassName","PanelEntryDropZonePlaceholder","isDragOver","isDroppable","alwaysShowChildren","DragPreviewLayer","labelGetter","itemType","useDragLayer","getItemType","horizontalToVerticalScroll","currentTarget","scrollBy","TabContextMenu","tabState","managerTabState","Tab","tabRenderer","handleHover","draggingTab","hoveredTab","dragIndex","hoverIndex","hoverBoundingReact","distanceThreshold","dragDistance","isBeingDraggedEditorPanel","hover","collect","isBeingDragged","dragPreviewConnector","getEmptyImage","useDragPreviewLayer","onMouseUp","currTab","nativeEvent","TabMenu","TabManager","onWheel","EditorGroupSplashScreen","showCommandList","setShowCommandList","EditorGroup","showMoreInfo","CustomMenuList","selectProps","rowHeight","optionCustomization","getComputedStyle","initialOffset","scrollToIndex","listRef","scrollToItem","itemCount","itemSize","initialScrollOffset","noMatchMessage","CustomOption","Option","STYLE_PREFIX","STYLE_PREFIX__DARK","LoadingIndicator","DropdownIndicator","ClearIndicator","restInnerProps","CustomInput","Input","onPaste","inputName","CustomSelectorInput","allowCreating","Component","stylePrefix","styles","menuPortal","zIndex","menuPortalTarget","classNamePrefix","MenuList","compareLabelFn","FileSearchCommand","loadingOptionsState","selectorRef","option","onInputChange","escapeClearsValue","LEGEND_PURE_IDE_ROUTE_PATTERN_TOKEN","buildPCTAdapterOption","SelectPCTAdapterCommand","menuOpen","setMenuOpen","runPCT","onMenuOpen","onMenuClose","Editor","WrappedComponent","collapsibleSideBarGroupProps","collapsiblePanelGroupProps","maximizedCollapsiblePanelGroupProps","MODE","FAST_COMPILE","direction","ApplicationFrameworkProvider","LegendPureIDEBaseStore","LegendPureIDEBaseStoreContext","LegendPureIDEBaseStoreProvider","LegendPureIDEFrameworkProvider","LegendPureIDEWebApplication","LegendPureIDEApplicationPlugin","_$nominalTypeBrand","wordPattern","comments","lineComment","blockComment","brackets","autoClosingPairs","surroundingPairs","markers","Core_LegendPureIDEApplicationPlugin","extraKeywords","onError","defineTheme","SOLARIZED_DARK","GITHUB_DARK","GITHUB_DARK_DIMMED","GITHUB_LIGHT","MATERIAL_DEFAULT","MATERIAL_DARKER","ONE_DARK_PRO","ONE_DARK_PRO_DARKER","fontLoadFailureErrorMessage","fonts","load","check","remeasureFonts","configureCodeEditor","APPLICATION_SETUP__FAILURE","OVERRIDE_DEFAULT_KEYBINDING_COMMAND","accessor","hotkeyMapping","KeyCode","F1","F8","F9","KeyMod","WinCtrl","KeyG","KeyB","KeyO","KeyD","KeyP","Shift","F10","F2","F12","addKeybindingRules","nativeCodeEditorKeyBinding","keybinding","commandArgs","configureCodeEditorComponent","setLanguageConfiguration","setMonarchTokensProvider","defaultToken","tokenPostfix","keywords","GENERATION_SPECIFICATION","JSON_MODEL_CONNECTION","MODEL_CHAIN_CONNECTION","XML_MODEL_CONNECTION","FLAT_DATA_CONNECTION","RELATIONAL_DATABASE_CONNECTION","operators","languageStructs","identifier","symbols","escapes","digits","octaldigits","binarydigits","hexdigits","generics","date","tokenizer","cases","KEYWORD","OPERATOR","DELIMITER","WHITESPACE","number","whitespace","COMMENT","comment","characters","collectKeyedCommandConfigEntriesFromConfig","LegendPureIDE","createRoot","rootEl","getElementsByTagName","setAttribute","getApplicationRootElement","getPresetCollection","getPluginCollection","webpackAsyncContext","req","__webpack_require__","o","ids","module","exports","__webpack_module_cache__","moduleId","cachedModule","loaded","__webpack_modules__","call","m","amdO","O","chunkIds","priority","notFulfilled","Infinity","fulfilled","j","getter","__esModule","getPrototypeOf","ns","def","getOwnPropertyNames","definition","defineProperty","enumerable","f","chunkId","promises","u","miniCssF","globalThis","prop","prototype","hasOwnProperty","l","done","script","needAttach","scripts","s","getAttribute","charset","timeout","nc","onScriptComplete","prev","onerror","onload","doneFns","head","Symbol","toStringTag","nmd","installedChunks","installedChunkData","promise","errorType","realSrc","webpackJsonpCallback","parentChunkLoadingFunction","moreModules","runtime","chunkLoadingGlobal","__webpack_exports__"],"sourceRoot":""}