@finos/legend-application-pure-ide-deployment 8.25.0 → 8.26.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.
@@ -1 +0,0 @@
1
- {"version":3,"file":"static/index.7ab00b8f.js","mappings":"uBAAIA,ECCAC,EADAC,ECAAC,EACAC,E,kHCkBOC,E,WCHJ,MAAMC,EACTC,KACAC,QACAC,UACAC,KAEG,MAAM,EACTH,KACAC,QACAE,MAAO,SACPC,YAAYJ,EAAMC,GACdI,KAAKL,KAAOA,EACZK,KAAKJ,QAAUA,CACnB,CACAK,UACI,OAAOD,KAAKL,IAChB,CACAO,aACI,OAAOF,KAAKJ,OAChB,CACAO,eACI,MAAO,GAAGH,KAAKC,aAAaD,KAAKE,cACrC,CACAE,UACI,OAAOJ,KAAKF,IAChB,CACAO,UACI,MAAMC,EAAO,IAAIZ,EAKjB,OAJAY,EAAKX,KAAOK,KAAKC,UACjBK,EAAKV,QAAUI,KAAKE,aACpBI,EAAKT,UAAYG,KAAKG,eACtBG,EAAKR,KAAOE,KAAKI,UACVE,CACX,CACAC,UAAUC,GACN,OAAOR,IACX,EAEG,MAAMS,EACTd,KACAC,QACAC,UACAC,KACAY,QAAU,GAEP,MAAMC,EACThB,KACAC,QACAE,MAAO,SACPY,QAAU,GACVX,YAAYJ,EAAMC,EAASc,GACvBV,KAAKL,KAAOA,EACZK,KAAKJ,QAAUA,EACfI,KAAKU,QAAUA,CACnB,CACAT,UACI,OAAOD,KAAKL,IAChB,CACAO,aACI,OAAOF,KAAKJ,OAChB,CACAO,eACI,MAAO,GAAGH,KAAKC,aAAaD,KAAKE,cACrC,CACAE,UACI,OAAOJ,KAAKF,IAChB,CACAc,aACI,MAAO,IAAIZ,KAAKU,QACpB,CACAL,UACI,MAAMC,EAAO,IAAIG,EAQjB,OAPAH,EAAKX,KAAOK,KAAKC,UACjBK,EAAKV,QAAUI,KAAKE,aACpBI,EAAKT,UAAYG,KAAKG,eACtBG,E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,EAAY,KAAOC,EAAU,IAC1Fx/G,EAAM5D,KAAO,iBACb4D,EAAMgL,KAAOu0G,EACbv/G,EAAMmJ,QAAUq2G,EAChBH,EAAmB,GAAGr/G,EACvB,CACD,GAEwC,SAAWy9G,EAASA,EAE/D,CACD,EAWFvB,EAAoBQ,EAAEM,EAAKS,GAA0C,IAA7B2B,EAAgB3B,GAGxD,IAAIgC,EAAuB,CAACC,EAA4BjgH,KACvD,IAGI08G,EAAUsB,GAHTd,EAAUgD,EAAa79E,GAAWriC,EAGhBo+C,EAAI,EAC3B,GAAG8+D,EAAS1oG,MAAMvM,GAAgC,IAAxB03G,EAAgB13G,KAAa,CACtD,IAAIy0G,KAAYwD,EACZzD,EAAoBqB,EAAEoC,EAAaxD,KACrCD,EAAoBjiF,EAAEkiF,GAAYwD,EAAYxD,IAGhD,GAAGr6E,EAAS,IAAI1vB,EAAS0vB,EAAQo6E,EAClC,CAEA,IADGwD,GAA4BA,EAA2BjgH,GACrDo+C,EAAI8+D,EAASh8G,OAAQk9C,IACzB4/D,EAAUd,EAAS9+D,GAChBq+D,EAAoBqB,EAAE6B,EAAiB3B,IAAY2B,EAAgB3B,IACrE2B,EAAgB3B,GAAS,KAE1B2B,EAAgB3B,GAAW,EAE5B,OAAOvB,EAAoBQ,EAAEtqG,EAAO,EAGjCwtG,EAAqBhC,WAAsE,0DAAIA,WAAsE,2DAAK,GAC9KgC,EAAmB9hH,QAAQ2hH,EAAqBpxD,KAAK,KAAM,IAC3DuxD,EAAmB19G,KAAOu9G,EAAqBpxD,KAAK,KAAMuxD,EAAmB19G,KAAKmsD,KAAKuxD,G,KClFvF,IAAIC,EAAsB3D,EAAoBQ,OAAEt7G,EAAW,CAAC,MAAM,IAAO86G,EAAoB,SAC7F2D,EAAsB3D,EAAoBQ,EAAEmD,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/Logger.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-application/lib/const.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/stores/ApplicationEvent.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-art/lib/components/ComponentsConfiguration.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-graph/lib/graph/MetaModelConst.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-graph/lib/graph/helpers/PureLanguageHelper.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application/lib/stores/PureLanguageSupport.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-shared/lib/application/SerializationUtils.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application/lib/stores/DocumentationService.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/WebApplicationNavigator.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application/lib/components/WebApplicationNavigatorProvider.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-shared/lib/communication/TelemetryService.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-shared/lib/network/TracerService.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-shared/lib/application/ActionState.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application/lib/stores/shared/TextSearchAdvancedConfigState.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/EventService.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application/lib/stores/ApplicationTelemetry.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/CommandCenter.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/ApplicationStore.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application/lib/components/ApplicationStoreProvider.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-graph/lib/graphManager/PureGraphManagerPlugin.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-graph/lib/graphManager/action/changeDetection/CoreObserverHelper.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-shared/lib/application/HashUtils.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-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/DataType.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/Measure.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/metamodel/pure/packageableElements/section/Section.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-graph/lib/graphManager/action/changeDetection/DSL_Generation_ObserverHelper.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-shared/lib/format/FormatterUtils.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-graph/lib/graph/metamodel/pure/packageableElements/mapping/MappingTestAssert.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-graph/lib/graph/metamodel/pure/packageableElements/mapping/ExpectedOutputMappingTestAssert.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-graph/lib/graph/metamodel/pure/packageableElements/runtime/Runtime.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-graph/lib/graph/metamodel/pure/packageableElements/mapping/InputData.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-graph/lib/graph/metamodel/pure/packageableElements/store/flatData/mapping/FlatDataInputData.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-graph/lib/graph/metamodel/pure/packageableElements/store/modelToModel/mapping/ObjectInputData.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-graph/lib/graph/metamodel/pure/packageableElements/store/relational/mapping/RelationalInputData.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-graph/lib/graphManager/action/changeDetection/RawValueSpecificationObserver.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-graph/lib/graph/metamodel/pure/packageableElements/store/flatData/model/FlatDataDataType.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-graph/lib/graphManager/action/changeDetection/STO_FlatData_ObserverHelper.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-graph/lib/graph/metamodel/pure/packageableElements/store/relational/connection/AuthenticationStrategy.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-graph/lib/graph/metamodel/pure/packageableElements/store/relational/connection/DatasourceSpecification.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-graph/lib/graph/metamodel/pure/packageableElements/store/relational/connection/postprocessor/PostProcessor.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-graph/lib/graph/metamodel/pure/packageableElements/store/relational/connection/postprocessor/MapperPostProcessor.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-graph/lib/graph/metamodel/pure/packageableElements/store/relational/model/Join.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-graph/lib/graph/metamodel/pure/packageableElements/store/relational/model/RelationalOperationElement.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-graph/lib/graph/metamodel/pure/packageableElements/store/relational/model/Column.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-graph/lib/graph/metamodel/pure/packageableElements/store/relational/model/milestoning/Milestoning.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-graph/lib/graph/metamodel/pure/packageableElements/store/relational/model/RelationalDataType.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-graph/lib/graph/metamodel/pure/packageableElements/store/relational/model/TableReference.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-graph/lib/graph/metamodel/pure/packageableElements/store/relational/model/ViewReference.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-graph/lib/graph/metamodel/pure/packageableElements/store/relational/connection/postprocessor/Mapper.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-graph/lib/graphManager/action/changeDetection/DSL_ExternalFormat_ObserverHelper.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-graph/lib/graphManager/action/changeDetection/STO_Relational_ObserverHelper.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-graph/lib/graph/metamodel/pure/test/Test.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-graph/lib/graph/metamodel/pure/packageableElements/service/ServiceTest.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-graph/lib/graph/metamodel/pure/packageableElements/mapping/MappingTest.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-graph/lib/graph/metamodel/pure/packageableElements/mapping/MappingTestSuite.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-graph/lib/graph/metamodel/pure/packageableElements/service/ServiceTestSuite.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-graph/lib/graph/metamodel/pure/test/assertion/TestAssertion.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-graph/lib/graph/metamodel/pure/test/assertion/EqualTo.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-graph/lib/graph/metamodel/pure/test/assertion/EqualToJson.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-graph/lib/graph/metamodel/pure/test/assertion/EqualToTDS.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-graph/lib/graph/metamodel/pure/data/EmbeddedData.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-graph/lib/graph/metamodel/pure/data/RelationalCSVData.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-graph/lib/graphManager/action/changeDetection/DSL_Data_ObserverHelper.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-graph/lib/graph/metamodel/pure/packageableElements/service/ServiceExecution.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-graph/lib/graph/metamodel/pure/packageableElements/service/DEPRECATED__ServiceTest.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-graph/lib/graphManager/action/changeDetection/DSL_Service_ObserverHelper.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-graph/lib/graphManager/action/changeDetection/Testable_ObserverHelper.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-graph/lib/graphManager/action/changeDetection/DSL_Mapping_ObserverHelper.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-graph/lib/graphManager/action/changeDetection/PackageableElementObserver.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-graph/lib/graphManager/action/changeDetection/DomainObserverHelper.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-extension-dsl-diagram/lib/graphManager/action/changeDetection/DSL_Diagram_ObserverHelper.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/graphManager/DSL_Diagram_PureGraphManagerPlugin.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-graph/lib/graphManager/protocol/pure/v1/model/packageableElements/V1_PackageableElement.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-extension-dsl-diagram/lib/graphManager/protocol/pure/v1/model/packageableElements/diagram/V1_DSL_Diagram_Diagram.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-extension-dsl-diagram/lib/graphManager/protocol/pure/v1/model/packageableElements/diagram/geometry/V1_DSL_Diagram_PositionedRectangle.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-extension-dsl-diagram/lib/graphManager/protocol/pure/v1/model/packageableElements/diagram/V1_DSL_Diagram_ClassView.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-extension-dsl-diagram/lib/graphManager/protocol/pure/v1/model/packageableElements/diagram/geometry/V1_DSL_Diagram_Point.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-extension-dsl-diagram/lib/graphManager/protocol/pure/v1/model/packageableElements/diagram/geometry/V1_DSL_Diagram_Rectangle.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-extension-dsl-diagram/lib/graphManager/protocol/pure/v1/model/packageableElements/diagram/geometry/V1_DSL_Diagram_Line.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-extension-dsl-diagram/lib/graphManager/protocol/pure/v1/model/packageableElements/diagram/V1_DSL_Diagram_RelationshipView.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-extension-dsl-diagram/lib/graphManager/protocol/pure/v1/model/packageableElements/diagram/V1_DSL_Diagram_PropertyHolderView.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-extension-dsl-diagram/lib/graphManager/protocol/pure/v1/model/packageableElements/diagram/V1_DSL_Diagram_PropertyView.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-extension-dsl-diagram/lib/graphManager/protocol/pure/v1/model/packageableElements/diagram/V1_DSL_Diagram_GeneralizationView.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-graph/lib/graphManager/protocol/pure/v1/model/packageableElements/domain/V1_Multiplicity.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-graph/lib/graphManager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/V1_CoreSerializationHelper.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-graph/lib/graphManager/protocol/pure/v1/model/V1_SourceInformation.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-graph/lib/graphManager/protocol/pure/v1/model/packageableElements/domain/V1_PropertyPointer.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-graph/lib/graphManager/protocol/pure/v1/model/rawValueSpecification/V1_RawValueSpecification.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-graph/lib/graphManager/protocol/pure/v1/model/rawValueSpecification/V1_RawExecutionContext.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-graph/lib/graphManager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/V1_RawValueSpecificationSerializationHelper.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-graph/lib/graphManager/protocol/pure/v1/model/rawValueSpecification/V1_RawLambda.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-graph/lib/graphManager/protocol/pure/v1/model/rawValueSpecification/V1_RawVariable.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-graph/lib/graphManager/protocol/pure/v1/model/rawValueSpecification/V1_RawPrimitiveInstanceValue.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-graph/lib/graphManager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/V1_DomainSerializationHelper.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-graph/lib/graphManager/protocol/pure/v1/model/packageableElements/domain/V1_StereotypePtr.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-graph/lib/graphManager/protocol/pure/v1/model/packageableElements/domain/V1_TagPtr.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-graph/lib/graphManager/protocol/pure/v1/model/packageableElements/domain/V1_TaggedValue.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-graph/lib/graphManager/protocol/pure/v1/model/packageableElements/domain/V1_Profile.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-graph/lib/graphManager/protocol/pure/v1/model/packageableElements/domain/V1_EnumValue.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-graph/lib/graphManager/protocol/pure/v1/model/packageableElements/domain/V1_Enumeration.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-graph/lib/graphManager/protocol/pure/v1/model/packageableElements/domain/V1_Measure.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-graph/lib/graphManager/protocol/pure/v1/model/packageableElements/domain/V1_Property.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-graph/lib/graphManager/protocol/pure/v1/model/packageableElements/domain/V1_DerivedProperty.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-graph/lib/graphManager/protocol/pure/v1/model/packageableElements/domain/V1_Constraint.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-extension-dsl-diagram/lib/graphManager/protocol/pure/v1/transformation/pureProtocol/V1_DSL_Diagram_ProtocolHelper.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-graph/lib/graphManager/protocol/pure/v1/model/packageableElements/domain/V1_Class.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-graph/lib/graphManager/protocol/pure/v1/model/packageableElements/domain/V1_Association.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-graph/lib/graphManager/protocol/pure/v1/model/packageableElements/function/V1_ConcreteFunctionDefinition.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-graph/lib/graphManager/protocol/pure/PureProtocolProcessorPlugin.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-graph/lib/graph/MetaModelUtils.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/graphManager/protocol/pure/v1/transformation/pureGraph/to/V1_GraphBuilderContext.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-graph/lib/graphManager/protocol/pure/v1/transformation/pureGraph/to/V1_ElementBuilder.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-graph/lib/graphManager/protocol/pure/v1/transformation/pureGraph/from/V1_MappingTransformer.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-extension-dsl-diagram/lib/graphManager/protocol/pure/v1/transformation/pureGraph/V1_DSL_Diagram_TransformerHelper.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-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/metamodel/pure/packageableElements/diagram/DSL_Diagram_GeneralizationView.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/graphManager/protocol/pure/v1/transformation/pureGraph/V1_DSL_Diagram_GraphBuilderHelper.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-extension-dsl-diagram/lib/graphManager/protocol/pure/DSL_Diagram_PureProtocolProcessorPlugin.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-extension-dsl-diagram/lib/graphManager/DSL_Diagram_GraphManagerHelper.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-graph/lib/graphManager/protocol/pure/v1/transformation/pureGraph/from/V1_CoreTransformerHelper.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-graph/lib/graph/PureGraphPlugin.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-extension-dsl-diagram/lib/graph/DSL_Diagram_PureGraphPlugin.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-extension-dsl-diagram/lib/DSL_Diagram_Extension.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-art/lib/components/LegendStyleProvider.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-art/lib/components/ComponentCreatorUtils.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-art/lib/components/dialog/Modal.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application/lib/components/ActionAlert.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-art/lib/components/panel/PanelLoadingIndicator.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application/lib/components/BlockingAlert.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application/lib/components/NotificationManager.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-shared/lib/keyboard/KeyBinding.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-art/lib/components/menu/BaseMenu.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-art/lib/components/menu/ContextMenu.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-art/lib/components/menu/MenuContent.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-art/lib/components/markdown/MarkdownTextViewer.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-art/lib/components/panel/BlankPanelContent.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-art/lib/components/popover/BasePopover.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-art/lib/components/radio-group/BaseRadioGroup.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application/lib/stores/LegendApplicationDocumentation.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application/lib/components/shared/TextSearchAdvancedConfigMenu.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/LegendApplicationComponentFrameworkProvider.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/LegendPureIDEBaseStoreProvider.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application-pure-ide/lib/stores/EditorConfig.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-art/lib/utils/TextEditorUtils.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-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-application/lib/stores/shared/TabManagerState.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application-pure-ide/lib/stores/EditorTabManagerState.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application-pure-ide/lib/stores/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-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/stores/SearchResultState.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/utils/PanelDisplayState.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/packageableElements/domain/DerivedProperty.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/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/Multiplicity.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-graph/lib/graph/metamodel/pure/packageableElements/domain/PrimitiveType.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-graph/lib/graph/helpers/creator/DomainModelCreatorHelper.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application-studio/lib/stores/shared/modifier/DomainGraphModifierHelper.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-extension-dsl-diagram/lib/stores/studio/DSL_Diagram_GraphModifierHelper.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-extension-dsl-diagram/lib/DiagramRenderer.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/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/domain/Function.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-graph/lib/graph/metamodel/pure/packageableElements/domain/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/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/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/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-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-application-pure-ide/lib/stores/DiagramEditorState.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application-pure-ide/lib/stores/SearchCommandState.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/EditorStore.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application-pure-ide/lib/components/editor/EditorStoreProvider.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application-pure-ide/lib/components/editor/aux-panel/ConsolePanel.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application-pure-ide/lib/components/editor/aux-panel/SearchPanel.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-art/lib/components/TreeView.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-art/lib/components/ResizablePanel.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application-pure-ide/lib/components/editor/aux-panel/TestRunnerPanel.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application-pure-ide/lib/components/editor/aux-panel/AuxiliaryPanel.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-art/lib/components/TypeIcon.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application-pure-ide/lib/components/editor/shared/ConceptIconUtils.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application-pure-ide/lib/components/editor/side-bar/RenameConceptPrompt.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application-pure-ide/lib/components/editor/side-bar/MoveElementPrompt.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application-pure-ide/lib/components/editor/side-bar/ConceptTreeExplorer.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application-pure-ide/lib/components/editor/side-bar/CreateNewFilePrompt.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application-pure-ide/lib/components/editor/side-bar/CreateNewDirectoryPrompt.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application-pure-ide/lib/components/editor/side-bar/RenameFilePrompt.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application-pure-ide/lib/components/editor/side-bar/DirectoryTreeExplorer.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application-pure-ide/lib/components/editor/side-bar/SideBar.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-art/lib/components/LegendLogo.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application-pure-ide/lib/components/editor/ActivityBar.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application-pure-ide/lib/components/editor/StatusBar.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application-pure-ide/lib/components/editor/edit-panel/GenericFileEditor.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/stores/FileEditorUtils.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application-pure-ide/lib/components/editor/edit-panel/PureFileEditor.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application/lib/stores/PureLanguageTextEditorSupport.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application-pure-ide/lib/stores/LegendPureIDECodeSnippets.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-art/lib/components/menu/DropdownMenu.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application-pure-ide/lib/components/editor/edit-panel/DiagramEditor.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-art/lib/components/panel/PanelDropZone.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application/lib/components/shared/TabManager.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application-pure-ide/lib/components/editor/edit-panel/EditPanel.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-art/lib/components/CustomSelectorInput.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application-pure-ide/lib/components/editor/command-center/FileSearchCommand.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application-pure-ide/lib/components/editor/command-center/TextSearchCommand.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application-pure-ide/lib/components/editor/Editor.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/lib/stores/LegendApplicationPlugin.js","webpack://@finos/legend-application-pure-ide-deployment/../legend-application-pure-ide/lib/stores/LegendPureIDEApplicationPlugin.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-art/lib/utils/ComponentUtils.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/../legend-art/lib/components/CJS__Fuse.cjs","webpack://@finos/legend-application-pure-ide-deployment/../legend-art/lib/components/CJS__Icon.cjs","webpack://@finos/legend-application-pure-ide-deployment/../legend-art/lib/components/CJS__ReactSelect.cjs","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\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 || (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 Log {\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=Logger.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';\nimport { LoggerPlugin } from './Logger.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 */\nexport const TAB_SIZE = 2;\nexport const DEFAULT_TYPEAHEAD_SEARCH_MINIMUM_SEARCH_LENGTH = 2;\nexport const DEFAULT_TYPEAHEAD_SEARCH_LIMIT = 10;\nexport const MONOSPACED_FONT_FAMILY = 'Roboto Mono';\nexport var EDITOR_THEME;\n(function (EDITOR_THEME) {\n EDITOR_THEME[\"LEGEND\"] = \"LEGEND\";\n EDITOR_THEME[\"TEMPORARY__VSCODE_LIGHT\"] = \"vs\";\n})(EDITOR_THEME = EDITOR_THEME || (EDITOR_THEME = {}));\nexport var EDITOR_LANGUAGE;\n(function (EDITOR_LANGUAGE) {\n EDITOR_LANGUAGE[\"TEXT\"] = \"text\";\n EDITOR_LANGUAGE[\"PURE\"] = \"pure\";\n EDITOR_LANGUAGE[\"JSON\"] = \"json\";\n EDITOR_LANGUAGE[\"JAVA\"] = \"java\";\n EDITOR_LANGUAGE[\"MARKDOWN\"] = \"markdown\";\n EDITOR_LANGUAGE[\"SQL\"] = \"sql\";\n EDITOR_LANGUAGE[\"XML\"] = \"xml\";\n EDITOR_LANGUAGE[\"YAML\"] = \"yaml\";\n EDITOR_LANGUAGE[\"GRAPHQL\"] = \"graphql\";\n})(EDITOR_LANGUAGE = EDITOR_LANGUAGE || (EDITOR_LANGUAGE = {}));\n//# sourceMappingURL=const.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 { cloneDeep as deepClone, isEqual as deepEqual, findLast, isEmpty, pickBy, uniqBy, uniq, debounce, throttle, mergeWith, toNumber, isObject, } from 'lodash-es';\nimport { UnsupportedOperationError } from './error/ErrorUtils.js';\nimport { format as prettyPrintObject } from 'pretty-format';\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 { deepClone, deepEqual, findLast, isEmpty, pickBy, uniqBy, uniq, debounce, throttle, };\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/ban-types\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') {\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 = toNumber(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) => {\n if (!token.match(/^[\\w_-]+$/)) {\n throw new Error(`Token must only contain digits, letters, or special characters _ and -`);\n }\n const maxCounter = existingNames\n .map((name) => {\n const matchingCount = name.match(new RegExp(`^${token}_(?<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}_${maxCounter + 1}`;\n};\n/**\n * NOTE: These are small helpers to workaround Typescript strictness check with the flag --noUncheckedIndexedAccess enabled\n */\nexport const getNullableFirstElement = (array) => array.length ? array[0] : undefined;\nexport const getNullableLastElement = (array) => array.length ? array[array.length - 1] : undefined;\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 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 time. In other words, the environment or\n * 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 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 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 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};\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';\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 = '/';\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 || (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[\"TEXT_PLAIN\"] = \"text/plain\";\n ContentType[\"TEXT_CSV\"] = \"text/csv\";\n ContentType[\"ALL\"] = \"*/*\";\n})(ContentType = 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 || (HttpMethod = {}));\nconst DEFAULT_CLIENT_REQUEST_OPTIONS = {\n mode: 'cors',\n credentials: 'include',\n redirect: 'manual', // avoid following authentication redirects\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// NOTE: status 0 is either timeout or client error possibly caused by authentication\nexport const unauthenticated = (response) => response.status === 0 || response.status === HttpStatus.UNAUTHORIZED;\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/ban-types\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};\nconst retry = async (url, init, responseProcessConfig) => {\n if (responseProcessConfig?.autoReAuthenticateUrl) {\n return autoReAuthenticate(responseProcessConfig.autoReAuthenticateUrl)\n .then(() => fetch(url, init))\n .then((response) => processResponse(response, init, responseProcessConfig));\n }\n return fetch(url, init).then((response) => processResponse(response, init, responseProcessConfig));\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] = `${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 this.baseUrl = config?.baseUrl;\n this.options = {\n ...DEFAULT_CLIENT_REQUEST_OPTIONS,\n ...(config?.options ?? {}),\n };\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) => unauthenticated(response)\n ? retry(requestUrl, requestInit, responseProcessConfig)\n : processResponse(response, requestInit, responseProcessConfig))\n .catch((error) => couldBeCORS(error)\n ? retry(requestUrl, 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 = (data, paramKey) => {\n const paramValue = data[paramKey];\n return paramValue ? decodeURIComponent(paramValue) : undefined;\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 addQueryParamsStringToUrl = (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) => sanitizeUrl(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 APPLICATION_EVENT[\"TEXT_EDITOR_FONT_LOADED\"] = \"application.load.font.success\";\n APPLICATION_EVENT[\"APPLICATION_SETUP_FAILURE\"] = \"application.setup.failure\";\n APPLICATION_EVENT[\"ILLEGAL_APPLICATION_STATE_OCCURRED\"] = \"application.error.illegal-state\";\n APPLICATION_EVENT[\"APPLICATION_CONFIGURATION_FAILURE\"] = \"application.configuration.failure\";\n APPLICATION_EVENT[\"APPLICATION_DOCUMENTATION_FETCH_FAILURE\"] = \"application.fetch.documentation.failure\";\n APPLICATION_EVENT[\"APPLICATION_DOCUMENTATION_LOAD_SKIPPED\"] = \"application.load.documentation.skipped\";\n APPLICATION_EVENT[\"APPLICATION_DOCUMENTATION_REQUIREMENT_CHECK_FAILURE\"] = \"application.load.documentation.requirement-check.failure\";\n APPLICATION_EVENT[\"APPLICATION_KEYBOARD_SHORTCUTS_CONFIGURATION_CHECK_FAILURE\"] = \"application.load.keyboard-shortcuts.configuration-check.failure\";\n APPLICATION_EVENT[\"APPLICATION_CONTEXTUAL_DOCUMENTATION_LOAD_SKIPPED\"] = \"application.load.contextual-documentation.skipped\";\n APPLICATION_EVENT[\"APPLICATION_COMMAND_CENTER_REGISTRATION_FAILURE\"] = \"application.command-center.registration.failure\";\n APPLICATION_EVENT[\"APPLICATION_LOADED\"] = \"application.load.success\";\n APPLICATION_EVENT[\"APPLICATION_LOAD_FAILURE\"] = \"application.load.failure\";\n APPLICATION_EVENT[\"DEVELOPMENT_ISSUE\"] = \"development.issue\";\n APPLICATION_EVENT[\"APPLICATION_CONTEXT_ACCESSED\"] = \"application.context.accessed\";\n APPLICATION_EVENT[\"VIRTUAL_ASSISTANT_DOCUMENTATION_ENTRY_ACCESSED\"] = \"application.virtual-assistant.documentation-entry.accessed\";\n})(APPLICATION_EVENT = APPLICATION_EVENT || (APPLICATION_EVENT = {}));\n//# sourceMappingURL=ApplicationEvent.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 */\nconst 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};\nexport const configureComponents = () => {\n configureResizablePanelComponents();\n};\n//# sourceMappingURL=ComponentsConfiguration.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 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 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 || (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 = PRIMITIVE_TYPE || (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 = 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 packges which contain native functions, classes, etc.\n// See https://github.com/finos/legend-pure/blob/master/legend-pure-m3-core/src/main/resources/platform/pure/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];\nexport var CORE_PURE_PATH;\n(function (CORE_PURE_PATH) {\n CORE_PURE_PATH[\"ANY\"] = \"meta::pure::metamodel::type::Any\";\n CORE_PURE_PATH[\"NIL\"] = \"meta::pure::metamodel::type::Nil\";\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[\"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 // TDS\n CORE_PURE_PATH[\"TDS_ROW\"] = \"meta::pure::tds::TDSRow\";\n})(CORE_PURE_PATH = 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 || (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 || (MILESTONING_VERSION_PROPERTY_SUFFIX = {}));\nexport const MILESTONING_START_DATE_PARAMETER_NAME = 'start';\nexport const MILESTONING_END_DATE_PARAMETER_NAME = 'end';\nexport const PROCESSING_DATE_MILESTONING_PROPERTY_NAME = 'processingDate';\nexport const BUSINESS_DATE_MILESTONING_PROPERTY_NAME = 'businessDate';\nexport var PackageableElementPointerType;\n(function (PackageableElementPointerType) {\n PackageableElementPointerType[\"STORE\"] = \"STORE\";\n PackageableElementPointerType[\"MAPPING\"] = \"MAPPING\";\n PackageableElementPointerType[\"RUNTIME\"] = \"RUNTIME\";\n PackageableElementPointerType[\"FILE_GENERATION\"] = \"FILE_GENERATION\";\n PackageableElementPointerType[\"SERVICE\"] = \"SERVICE\";\n})(PackageableElementPointerType = PackageableElementPointerType || (PackageableElementPointerType = {}));\nexport const DURATION_UNIT = 'meta::pure::functions::date::DurationUnit';\nexport const DAY_OF_WEEK = 'meta::pure::functions::date::DayOfWeek';\nexport var SUPPORTED_FUNCTIONS;\n(function (SUPPORTED_FUNCTIONS) {\n // date-time value helper functions\n SUPPORTED_FUNCTIONS[\"TODAY\"] = \"meta::pure::functions::date::today\";\n SUPPORTED_FUNCTIONS[\"NOW\"] = \"meta::pure::functions::date::now\";\n SUPPORTED_FUNCTIONS[\"FIRST_DAY_OF_WEEK\"] = \"meta::pure::functions::date::firstDayOfThisWeek\";\n SUPPORTED_FUNCTIONS[\"FIRST_DAY_OF_MONTH\"] = \"meta::pure::functions::date::firstDayOfThisMonth\";\n SUPPORTED_FUNCTIONS[\"FIRST_DAY_OF_QUARTER\"] = \"meta::pure::functions::date::firstDayOfThisQuarter\";\n SUPPORTED_FUNCTIONS[\"FIRST_DAY_OF_YEAR\"] = \"meta::pure::functions::date::firstDayOfThisYear\";\n SUPPORTED_FUNCTIONS[\"PREVIOUS_DAY_OF_WEEK\"] = \"meta::pure::functions::date::previousDayOfWeek\";\n SUPPORTED_FUNCTIONS[\"IS_ON_DAY\"] = \"meta::pure::functions::date::isOnDay\";\n SUPPORTED_FUNCTIONS[\"IS_ON_OR_AFTER_DAY\"] = \"meta::pure::functions::date::isOnOrAfterDay\";\n SUPPORTED_FUNCTIONS[\"IS_AFTER_DAY\"] = \"meta::pure::functions::date::isAfterDay\";\n SUPPORTED_FUNCTIONS[\"IS_ON_OR_BEFORE_DAY\"] = \"meta::pure::functions::date::isOnOrBeforeDay\";\n SUPPORTED_FUNCTIONS[\"IS_BEFORE_DAY\"] = \"meta::pure::functions::date::isBeforeDay\";\n // adjust time\n SUPPORTED_FUNCTIONS[\"MINUS\"] = \"meta::pure::functions::math::minus\";\n SUPPORTED_FUNCTIONS[\"ADJUST\"] = \"meta::pure::functions::date::adjust\";\n // variables\n SUPPORTED_FUNCTIONS[\"LET\"] = \"meta::pure::functions::lang::letFunction\";\n})(SUPPORTED_FUNCTIONS = SUPPORTED_FUNCTIONS || (SUPPORTED_FUNCTIONS = {}));\n// Date formats\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//# 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 { 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 = 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 || (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 || (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 generateFunctionPrettyName = (element, fullPath) => `${(fullPath ? element.package?.path + ELEMENT_PATH_DELIMITER : '') +\n element.functionName}(${element.parameters\n .map((p) => `${p.name}: ${p.type.value.name}[${generateMultiplicityString(p.multiplicity.lowerBound, p.multiplicity.upperBound)}]`)\n .join(', ')})` +\n `: ${element.returnType.value.name}[${generateMultiplicityString(element.returnMultiplicity.lowerBound, element.returnMultiplicity.upperBound)}]`;\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 */\n/* eslint-disable prefer-named-capture-group */\nimport { PARSER_SECTION_MARKER, PURE_ELEMENT_NAME, PURE_CONNECTION_NAME, PURE_PARSER, } from '@finos/legend-graph';\nimport { editor as monacoEditorAPI, KeyCode, KeyMod, languages as monacoLanguagesAPI, } from 'monaco-editor';\nimport { EDITOR_LANGUAGE, EDITOR_THEME } from '../const.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';\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[\"VARIABLE\"] = \"variable\";\n PURE_GRAMMAR_TOKEN[\"TYPE\"] = \"type\";\n PURE_GRAMMAR_TOKEN[\"INVALID\"] = \"invalid\";\n})(PURE_GRAMMAR_TOKEN = PURE_GRAMMAR_TOKEN || (PURE_GRAMMAR_TOKEN = {}));\nconst theme = {\n base: 'vs-dark',\n inherit: true,\n colors: {},\n rules: [\n // NOTE: unfortunately, `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.VARIABLE, foreground: '4fc1ff' },\n { token: PURE_GRAMMAR_TOKEN.TYPE, foreground: '3dc9b0' },\n ],\n};\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 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, extraParsers) => \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 parsers: [\n PURE_PARSER.PURE,\n PURE_PARSER.CONNECTION,\n PURE_PARSER.RUNTIME,\n PURE_PARSER.MAPPING,\n PURE_PARSER.SERVICE,\n PURE_PARSER.FLATDATA,\n PURE_PARSER.RELATIONAL,\n PURE_PARSER.GENERATION_SPECIFICATION,\n PURE_PARSER.FILE_GENERATION_SPECIFICATION,\n PURE_PARSER.DATA,\n ]\n .concat(extraParsers)\n .map((parser) => `${PARSER_SECTION_MARKER}${parser}`),\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: /\\[(?:\\d+(?:\\.\\.(?:\\d+|\\*|))?|\\*)\\]/,\n package: /(?:[\\w_]+::)+/,\n generics: /<.+>/,\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 {\n cases: {\n '@parsers': PURE_GRAMMAR_TOKEN.PARSER,\n '@default': PURE_GRAMMAR_TOKEN.INVALID,\n },\n },\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 '@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]],\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.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 ],\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]],\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 const setupPureLanguageService = (pluginManager) => {\n // register Pure language in `monaco-editor`\n monacoEditorAPI.defineTheme(EDITOR_THEME.LEGEND, theme);\n // Override `monaco-editor` native hotkeys\n // See https://github.com/microsoft/monaco-editor/issues/102#issuecomment-1282897640\n monacoEditorAPI.addKeybindingRules([\n {\n // disable showing go-to-line command\n keybinding: KeyMod.WinCtrl | KeyCode.KeyG,\n command: null,\n },\n {\n // disable cursor move (core command)\n keybinding: KeyMod.WinCtrl | KeyCode.KeyB,\n command: null,\n },\n {\n // disable cursor move (core command)\n keybinding: KeyMod.WinCtrl | KeyCode.KeyO,\n command: null,\n },\n {\n // disable cursor move (core command)\n keybinding: KeyMod.WinCtrl | KeyCode.KeyP,\n command: null,\n },\n {\n // disable show command center\n keybinding: KeyCode.F1,\n command: null,\n },\n {\n // disable show error command\n keybinding: KeyCode.F8,\n command: null,\n },\n {\n // disable toggle debugger breakpoint\n keybinding: KeyCode.F9,\n command: null,\n },\n {\n // disable change all instances\n keybinding: KeyMod.CtrlCmd | KeyCode.F2,\n command: null,\n },\n {\n // disable toggle debugger breakpoint\n keybinding: KeyMod.Shift | KeyCode.F10,\n command: null,\n },\n {\n // disable go-to definition\n keybinding: KeyMod.CtrlCmd | KeyCode.F12,\n command: null,\n },\n ]);\n monacoLanguagesAPI.register({ id: EDITOR_LANGUAGE.PURE });\n monacoLanguagesAPI.setLanguageConfiguration(EDITOR_LANGUAGE.PURE, configuration);\n monacoLanguagesAPI.setMonarchTokensProvider(EDITOR_LANGUAGE.PURE, generateLanguageMonarch(pluginManager\n .getPureGraphManagerPlugins()\n .flatMap((plugin) => plugin.getExtraPureGrammarKeywords?.() ?? []), pluginManager\n .getPureGraphManagerPlugins()\n .flatMap((plugin) => plugin.getExtraPureGrammarParserNames?.() ?? [])));\n};\n//# sourceMappingURL=PureLanguageSupport.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));\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 // eslint-disable-next-line no-process-env\n process.env.TEST_MODE === 'grammar';\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// 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) => custom((val) => (val ? serializer(val) : SKIP), (val) => (val ? deserializer(val) : SKIP));\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 { SerializationFactory, LogEvent, uniq, } from '@finos/legend-shared';\nimport { createModelSchema, custom, list, optional, primitive, } from 'serializr';\nimport { APPLICATION_EVENT } from './ApplicationEvent.js';\nexport class DocumentationEntry {\n _documentationKey;\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._documentationKey =\n documentationKey;\n return entry;\n }\n}\nexport const collectKeyedDocumnetationEntriesFromConfig = (rawEntries) => Object.entries(rawEntries).map((entry) => ({\n key: entry[0],\n content: DocumentationEntry.create(entry[1], entry[0]),\n}));\nexport const collectContextualDocumnetationEntries = (config) => Object.entries(config).map((entry) => ({\n context: entry[0],\n documentationKey: entry[1],\n}));\nexport class DocumentationService {\n url;\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 /**\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.log.warn(LogEvent.create(APPLICATION_EVENT.APPLICATION_DOCUMENTATION_LOAD_SKIPPED), 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.log.warn(LogEvent.create(APPLICATION_EVENT.APPLICATION_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.log.warn(LogEvent.create(APPLICATION_EVENT.APPLICATION_CONTEXTUAL_DOCUMENTATION_LOAD_SKIPPED), 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._documentationKey;\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 { configure as configureMobx } from 'mobx';\nimport { editor as monacoEditorAPI } from 'monaco-editor';\nimport { MONOSPACED_FONT_FAMILY } from '../const.js';\nimport { assertErrorThrown, LogEvent, guaranteeNonEmptyString, assertNonNullable, NetworkClient, createRegExpPatternFromWildcardPattern, } from '@finos/legend-shared';\nimport { APPLICATION_EVENT } from '../stores/ApplicationEvent.js';\nimport { configureComponents } from '@finos/legend-art';\nimport { setupPureLanguageService } from '../stores/PureLanguageSupport.js';\nimport { collectKeyedDocumnetationEntriesFromConfig, } from '../stores/DocumentationService.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}\n// This is not considered side-effect that hinders tree-shaking because the effectful calls\n// are embedded in the function\n// See https://sgom.es/posts/2020-06-15-everything-you-never-wanted-to-know-about-side-effects/\nexport const setupLegendApplicationUILibrary = async (pluginManager, logger) => {\n setupPureLanguageService(pluginManager);\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 '${MONOSPACED_FONT_FAMILY}' has not been loaded properly, text editor display problems might occur`;\n await document.fonts\n .load(`1em ${MONOSPACED_FONT_FAMILY}`)\n .then(() => {\n if (document.fonts.check(`1em ${MONOSPACED_FONT_FAMILY}`)) {\n monacoEditorAPI.remeasureFonts();\n logger.info(LogEvent.create(APPLICATION_EVENT.TEXT_EDITOR_FONT_LOADED), `Monospaced font '${MONOSPACED_FONT_FAMILY}' has been loaded`);\n }\n else {\n logger.error(LogEvent.create(APPLICATION_EVENT.APPLICATION_SETUP_FAILURE), fontLoadFailureErrorMessage);\n }\n })\n .catch(() => logger.error(LogEvent.create(APPLICATION_EVENT.APPLICATION_SETUP_FAILURE), fontLoadFailureErrorMessage));\n configureMobx({\n // Force state modification to be done via actions\n // Otherwise, warning will be shown in development mode\n // However, no warning will shown in production mode\n // See https://mobx.js.org/configuration.html#enforceactions\n enforceActions: 'observed',\n });\n configureComponents();\n};\nexport class LegendApplication {\n config;\n logger;\n pluginManager;\n basePresets = [];\n basePlugins = [];\n baseUrl;\n pluginRegister;\n _isConfigured = false;\n constructor(pluginManager) {\n this.pluginManager = pluginManager;\n this.logger = new LegendApplicationWebConsole();\n }\n setup(options) {\n this.baseUrl = guaranteeNonEmptyString(options.baseUrl, `Can't setup application: 'baseUrl' 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 async fetchApplicationConfiguration(baseUrl) {\n const client = new NetworkClient();\n // app config\n let configData;\n try {\n configData = await client.get(`${window.location.origin}${baseUrl}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}${baseUrl}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 baseUrl,\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.APPLICATION_DOCUMENTATION_FETCH_FAILURE), error);\n }\n }));\n // NOTE: config entries will override\n config.keyedDocumentationEntries = [\n ...collectKeyedDocumnetationEntriesFromConfig(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(this.baseUrl);\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 await this.loadApplication();\n await Promise.all(this.pluginManager\n .getApplicationPlugins()\n .flatMap((plugin) => plugin.getExtraApplicationSetups?.() ?? [])\n .map((setup) => setup(this.pluginManager)));\n this.logger.info(LogEvent.create(APPLICATION_EVENT.APPLICATION_LOADED), 'Legend application loaded');\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}\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 { guaranteeNonNullable } from '@finos/legend-shared';\nimport { action, computed, makeObservable, observable } from 'mobx';\nexport class WebApplicationNavigator {\n historyAPI;\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 }\n };\n onBlock;\n onNativePlatformNavigationBlock;\n constructor(historyApiClient) {\n makeObservable(this, {\n _isNavigationBlocked: observable,\n isNavigationBlocked: computed,\n blockNavigation: action,\n unblockNavigation: action,\n });\n this.historyAPI = historyApiClient;\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 updateCurrentLocation(location) {\n this.historyAPI.push(location);\n }\n getCurrentAddress() {\n return this.window.location.href;\n }\n getCurrentLocation() {\n return this.historyAPI.location.pathname;\n }\n generateAddress(location) {\n return (this.window.location.origin +\n this.historyAPI.createHref({ pathname: location }));\n }\n blockNavigation(blockCheckers, onBlock, onNativePlatformNavigationBlock) {\n this._isNavigationBlocked = true;\n this.onBlock = onBlock;\n this.onNativePlatformNavigationBlock = onNativePlatformNavigationBlock;\n // Here we attempt to cancel the effect of the back button\n // See https://medium.com/codex/angular-guards-disabling-browsers-back-button-for-specific-url-fdf05d9fe155#4f13\n // This makes the current location the last entry in the browser history and clears any forward history\n this.window.history.pushState(null, '', this.getCurrentAddress());\n // The popstate event is triggered every time the user clicks back/forward button, but the forward history\n // has been cleared, and now if we go back, 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 this.window.onpopstate = () => {\n window.history.forward();\n this.onNativePlatformNavigationBlock?.();\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}\n//# sourceMappingURL=WebApplicationNavigator.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 { guaranteeNonNullable } from '@finos/legend-shared';\nimport { useLocalObservable } from 'mobx-react-lite';\nimport { createContext, useContext } from 'react';\nimport { WebApplicationNavigator } from '../stores/WebApplicationNavigator.js';\nimport { useHistory } from 'react-router';\nconst WebApplicationNavigatorContext = createContext(undefined);\nexport const WebApplicationNavigatorProvider = ({ children }) => {\n const history = useHistory();\n const navigator = useLocalObservable(() => new WebApplicationNavigator(history));\n return (_jsx(WebApplicationNavigatorContext.Provider, { value: navigator, children: children }));\n};\nexport const useWebApplicationNavigator = () => guaranteeNonNullable(useContext(WebApplicationNavigatorContext), `Can't find web application navigator in context`);\n//# sourceMappingURL=WebApplicationNavigatorProvider.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 class TelemetryServicePlugin extends AbstractPlugin {\n install(pluginManager) {\n pluginManager.registerTelemetryServicePlugin(this);\n }\n}\nexport class TelemetryService {\n plugins = [];\n registerPlugins(plugins) {\n this.plugins = plugins;\n }\n setUserId(val) {\n this.plugins.forEach((plugin) => plugin.setUserId(val));\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 */\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 || (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 close() {\n this.traceEntries.forEach((entry) => {\n entry.plugin.concludeServerSpan(entry.serverSpan);\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);\n const serverSpan = plugin.createServerSpan(clientSpan, method, url, headers);\n return {\n clientSpan,\n serverSpan,\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 { 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 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 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 { action, computed, makeObservable, observable } from 'mobx';\nexport var ADVANCED_TEXT_SEARCH_MODE;\n(function (ADVANCED_TEXT_SEARCH_MODE) {\n ADVANCED_TEXT_SEARCH_MODE[\"STANDARD\"] = \"standard\";\n ADVANCED_TEXT_SEARCH_MODE[\"INCLUDE\"] = \"include match\";\n ADVANCED_TEXT_SEARCH_MODE[\"EXACT\"] = \"exact match\";\n ADVANCED_TEXT_SEARCH_MODE[\"INVERSE\"] = \"excludes exact match\";\n})(ADVANCED_TEXT_SEARCH_MODE = ADVANCED_TEXT_SEARCH_MODE || (ADVANCED_TEXT_SEARCH_MODE = {}));\nexport class TextSearchAdvancedConfigState {\n currentMode = ADVANCED_TEXT_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_TEXT_SEARCH_MODE.STANDARD;\n }\n generateSearchText(val) {\n switch (this.currentMode) {\n case ADVANCED_TEXT_SEARCH_MODE.INCLUDE: {\n return `'\"${val}\"`;\n }\n case ADVANCED_TEXT_SEARCH_MODE.EXACT: {\n return `=\"${val}\"`;\n }\n case ADVANCED_TEXT_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=TextSearchAdvancedConfigState.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 { Fuse } from '@finos/legend-art';\nimport { guaranteeNonEmptyString, uuid, isNonNullable, ActionState, } from '@finos/legend-shared';\nimport { TextSearchAdvancedConfigState } from './shared/TextSearchAdvancedConfigState.js';\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 || (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._documentationKey;\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 isHidden = false;\n isOpen = 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 isHidden: observable,\n isOpen: 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 setIsHidden: action,\n setIsOpen: 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 Fuse(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 TextSearchAdvancedConfigState(() => {\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(docKey) {\n const matchingDocEntry = this.applicationStore.documentationService\n .getAllDocEntries()\n .find((entry) => entry._documentationKey === docKey);\n if (matchingDocEntry) {\n this.setIsOpen(true);\n this.setIsHidden(false);\n this.currentDocumentationEntry = new VirtualAssistantDocumentationEntry(matchingDocEntry);\n this.currentDocumentationEntry.setIsOpen(true);\n this.resetSearch();\n }\n }\n setIsHidden(val) {\n this.isHidden = 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 */\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 './ApplicationEvent.js';\nexport class ApplicationTelemetry {\n static logEvent_ApplicationInitialized(telemetryService, data) {\n telemetryService.logEvent(APPLICATION_EVENT.APPLICATION_LOADED, data);\n }\n static logEvent_ApplicationContextAccessed(telemetryService, data) {\n telemetryService.logEvent(APPLICATION_EVENT.APPLICATION_CONTEXT_ACCESSED, data);\n }\n static logEvent_VirtualAssistantDocumentationEntryAccessed(telemetryService, data) {\n telemetryService.logEvent(APPLICATION_EVENT.VIRTUAL_ASSISTANT_DOCUMENTATION_ENTRY_ACCESSED, data);\n }\n}\n//# sourceMappingURL=ApplicationTelemetry.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 { ApplicationTelemetry } from './ApplicationTelemetry.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 ApplicationTelemetry.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 './ApplicationEvent.js';\nexport const collectKeyedCommandConfigEntriesFromConfig = (rawEntries) => Object.entries(rawEntries).map((entry) => ({\n key: entry[0],\n content: entry[1],\n}));\nexport class CommandCenter {\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.log.warn(LogEvent.create(APPLICATION_EVENT.APPLICATION_COMMAND_CENTER_REGISTRATION_FAILURE), `Can't register command: command 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=CommandCenter.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 { addUniqueEntry, LogEvent } from '@finos/legend-shared';\nimport { action, makeObservable, observable } from 'mobx';\nimport { APPLICATION_EVENT } from './ApplicationEvent.js';\nexport class KeyboardShortcutsService {\n applicationStore;\n /**\n * NOTE: with this design, the relationship between command and key is many-to-one\n * We can have multiple commands being mapped to the same key combination, not the other\n * way around\n */\n keyMap = new Map();\n /**\n * NOTE: we want to leave the value of the map as optional because we want\n * to use this map to quickly construct the key-binding view: some commands\n * don't already have a hotkey\n */\n commandKeyMap = new Map();\n isHotkeysBlocked = false;\n constructor(applicationStore) {\n makeObservable(this, {\n keyMap: observable,\n commandKeyMap: observable,\n isHotkeysBlocked: observable,\n updateHotkey: action,\n blockGlobalHotkeys: action,\n unblockGlobalHotkeys: action,\n });\n this.applicationStore = applicationStore;\n const commandsWithMultipleKeyBindings = [];\n this.applicationStore.pluginManager\n .getApplicationPlugins()\n .flatMap((plugin) => plugin.getExtraKeyedCommandConfigEntries?.() ?? [])\n .forEach((entry) => {\n if (entry.content.defaultKeyboardShortcut &&\n this.commandKeyMap.get(entry.key)) {\n addUniqueEntry(commandsWithMultipleKeyBindings, entry.key);\n }\n this.updateHotkey(entry.key, entry.content.defaultKeyboardShortcut);\n });\n if (commandsWithMultipleKeyBindings.length) {\n this.applicationStore.log.warn(LogEvent.create(APPLICATION_EVENT.APPLICATION_KEYBOARD_SHORTCUTS_CONFIGURATION_CHECK_FAILURE), `Found multiple key bindings in configuration for commands:\\n${commandsWithMultipleKeyBindings\n .map((key) => `- ${key}`)\n .join('\\n')}`);\n }\n }\n blockGlobalHotkeys() {\n this.isHotkeysBlocked = true;\n }\n unblockGlobalHotkeys() {\n this.isHotkeysBlocked = false;\n }\n updateHotkey(commandKey, keyCombination) {\n const currentKeyCombination = this.commandKeyMap.get(commandKey);\n this.commandKeyMap.set(commandKey, keyCombination);\n // remove old key map\n if (currentKeyCombination) {\n this.keyMap.set(currentKeyCombination, (this.keyMap.get(currentKeyCombination) ?? []).filter((key) => key === commandKey));\n }\n // add new key map\n if (keyCombination) {\n this.keyMap.set(keyCombination, [\n ...(this.keyMap.get(keyCombination) ?? []).filter((key) => key !== commandKey),\n commandKey,\n ]);\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.commandCenter.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 */\nimport { TracerService, TelemetryService, assertTrue, Log, LogEvent, assertErrorThrown, isString, ApplicationError, } from '@finos/legend-shared';\nimport { action, makeObservable, observable } from 'mobx';\nimport { APPLICATION_EVENT } from './ApplicationEvent.js';\nimport { DocumentationService } from './DocumentationService.js';\nimport { AssistantService } from './AssistantService.js';\nimport { EventService } from './EventService.js';\nimport { ApplicationNavigationContextService } from './ApplicationNavigationContextService.js';\nimport { CommandCenter } from './CommandCenter.js';\nimport { KeyboardShortcutsService } from './KeyboardShortcutsService.js';\nexport var ActionAlertType;\n(function (ActionAlertType) {\n ActionAlertType[\"STANDARD\"] = \"STANDARD\";\n ActionAlertType[\"CAUTION\"] = \"CAUTION\";\n})(ActionAlertType = 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 || (ActionAlertActionType = {}));\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 || (NOTIFCATION_SEVERITY = {}));\nexport class Notification {\n severity;\n message;\n actions;\n autoHideDuration;\n constructor(severity, message, actions, autoHideDuration) {\n this.severity = severity;\n this.message = message;\n this.actions = actions;\n this.autoHideDuration = autoHideDuration;\n }\n}\nexport class ApplicationStore {\n config;\n pluginManager;\n // navigation\n navigator;\n navigationContextService;\n // TODO: refactor this to `NotificationService` including notifications and alerts\n notification;\n blockingAlertInfo;\n actionAlertInfo;\n // TODO: consider renaming this to `LogService`\n log = new Log();\n // documentation & help\n documentationService;\n assistantService;\n // communication\n eventService = new EventService();\n telemetryService = new TelemetryService();\n tracerService = new TracerService();\n // control and interactions\n commandCenter;\n keyboardShortcutsService;\n // TODO: config\n // See https://github.com/finos/legend-studio/issues/407\n // backdrop\n backdropContainerElementID;\n showBackdrop = false;\n // theme\n /**\n * NOTE: this is the poor man way of doing theming\n * we would need to revise this flag later\n * See https://github.com/finos/legend-studio/issues/264\n */\n TEMPORARY__isLightThemeEnabled = false;\n constructor(config, navigator, pluginManager) {\n makeObservable(this, {\n notification: observable,\n blockingAlertInfo: observable,\n actionAlertInfo: observable,\n TEMPORARY__isLightThemeEnabled: observable,\n backdropContainerElementID: observable,\n showBackdrop: observable,\n setBackdropContainerElementID: action,\n setShowBackdrop: action,\n setBlockingAlert: action,\n setActionAlertInfo: action,\n setNotification: action,\n notify: action,\n notifySuccess: action,\n notifyWarning: action,\n notifyIllegalState: action,\n notifyError: action,\n TEMPORARY__setIsLightThemeEnabled: action,\n });\n this.config = config;\n this.navigator = navigator;\n this.pluginManager = pluginManager;\n // NOTE: set the logger first so other loading could use the configured logger\n this.log.registerPlugins(pluginManager.getLoggerPlugins());\n this.navigationContextService = new ApplicationNavigationContextService(this);\n this.documentationService = new DocumentationService(this);\n this.assistantService = new AssistantService(this);\n this.telemetryService.registerPlugins(pluginManager.getTelemetryServicePlugins());\n this.commandCenter = new CommandCenter(this);\n this.keyboardShortcutsService = new KeyboardShortcutsService(this);\n this.tracerService.registerPlugins(pluginManager.getTracerServicePlugins());\n this.eventService.registerEventNotifierPlugins(pluginManager.getEventNotifierPlugins());\n }\n TEMPORARY__setIsLightThemeEnabled(val) {\n this.TEMPORARY__isLightThemeEnabled = val;\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 setBackdropContainerElementID(val) {\n this.backdropContainerElementID = val;\n }\n setShowBackdrop(val) {\n this.showBackdrop = val;\n }\n setBlockingAlert(alertInfo) {\n if (alertInfo) {\n this.keyboardShortcutsService.blockGlobalHotkeys();\n }\n else {\n this.keyboardShortcutsService.unblockGlobalHotkeys();\n }\n this.blockingAlertInfo = alertInfo;\n }\n setActionAlertInfo(alertInfo) {\n if (this.actionAlertInfo && alertInfo) {\n this.notifyIllegalState('Action alert is stacked: new alert is invoked while another one is being displayed');\n }\n if (alertInfo) {\n this.keyboardShortcutsService.blockGlobalHotkeys();\n }\n else {\n this.keyboardShortcutsService.unblockGlobalHotkeys();\n }\n this.actionAlertInfo = alertInfo;\n }\n setNotification(notification) {\n this.notification = notification;\n }\n notify(message, actions, autoHideDuration) {\n this.setNotification(new Notification(NOTIFCATION_SEVERITY.INFO, message, actions ?? [], autoHideDuration === null\n ? undefined\n : autoHideDuration ?? DEFAULT_NOTIFICATION_HIDE_TIME));\n }\n notifySuccess(message, actions, autoHideDuration) {\n this.setNotification(new Notification(NOTIFCATION_SEVERITY.SUCCESS, message, actions ?? [], autoHideDuration === null\n ? undefined\n : autoHideDuration ?? DEFAULT_NOTIFICATION_HIDE_TIME));\n }\n notifyWarning(content, actions, autoHideDuration) {\n this.setNotification(new Notification(NOTIFCATION_SEVERITY.WARNING, content instanceof Error ? content.message : content, actions ?? [], autoHideDuration === null\n ? undefined\n : autoHideDuration ?? DEFAULT_NOTIFICATION_HIDE_TIME));\n }\n notifyIllegalState(message, actions, autoHideDuration) {\n this.setNotification(new Notification(NOTIFCATION_SEVERITY.ILEGAL_STATE, isString(message) ? `[PLEASE NOTIFY DEVELOPER] ${message}` : message, actions ?? [], autoHideDuration === null\n ? undefined\n : autoHideDuration ?? DEFAULT_NOTIFICATION_HIDE_TIME));\n }\n notifyError(content, actions) {\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 if (message) {\n this.setNotification(new Notification(NOTIFCATION_SEVERITY.ERROR, message, actions ?? [], undefined));\n }\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 * 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.log.error(LogEvent.create(APPLICATION_EVENT.ILLEGAL_APPLICATION_STATE_OCCURRED), 'Encountered unhandled error in component tree', error);\n this.notifyIllegalState(error.message);\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 async copyTextToClipboard(text) {\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.writeText(text).catch((error) => {\n this.notifyError(error);\n });\n }\n notifyUnsupportedFeature(featureName) {\n this.notifyWarning(`Unsupported feature: ${featureName}`);\n }\n}\n//# sourceMappingURL=ApplicationStore.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 { ApplicationStore, } from '../stores/ApplicationStore.js';\nimport { guaranteeNonNullable } from '@finos/legend-shared';\nimport { useWebApplicationNavigator } from './WebApplicationNavigatorProvider.js';\nconst ApplicationStoreContext = createContext(undefined);\nexport const ApplicationStoreProvider = ({ children, config, pluginManager, }) => {\n const navigator = useWebApplicationNavigator();\n const applicationStore = useLocalObservable(() => new ApplicationStore(config, navigator, pluginManager));\n return (_jsx(ApplicationStoreContext.Provider, { value: applicationStore, children: children }));\n};\nexport const useApplicationStore = () => guaranteeNonNullable(useContext(ApplicationStoreContext), `Can't find application store in context`);\n//# sourceMappingURL=ApplicationStoreProvider.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, } from '@finos/legend-shared';\nimport { collectKeyedDocumnetationEntriesFromConfig, collectContextualDocumnetationEntries, } from '../stores/DocumentationService.js';\nexport class LegendApplicationConfig {\n appName;\n baseUrl;\n env;\n // documentation\n documentationUrl;\n documentationRegistryEntries = [];\n keyedDocumentationEntries = [];\n contextualDocEntries = [];\n // version\n appVersion;\n appVersionBuildTime;\n appVersionCommitId;\n constructor(input) {\n this.baseUrl = input.baseUrl;\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 // Documentation\n this.documentationUrl = input.configData.documentation?.url;\n this.documentationRegistryEntries =\n input.configData.documentation?.registry ?? [];\n this.keyedDocumentationEntries = collectKeyedDocumnetationEntriesFromConfig(input.configData.documentation?.entries ?? {});\n this.contextualDocEntries = collectContextualDocumnetationEntries(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 = guaranteeNonNullable(input.versionData.buildTime, `Can't collect application version: 'buildTime' field is missing`);\n this.appVersionCommitId = guaranteeNonNullable(input.versionData.commitSHA, `Can't collect application version: 'commitSHA' field is missing`);\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 = 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}\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 { AbstractPlugin } from '@finos/legend-shared';\nexport class PureGraphManagerPlugin extends AbstractPlugin {\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.registerPureGraphManagerPlugin(this);\n }\n}\n//# sourceMappingURL=PureGraphManagerPlugin.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, isObservable, makeObservable, observable, } from 'mobx';\nexport class ObserverContext {\n plugins = [];\n constructor(plugins) {\n this.plugins = plugins;\n }\n}\nexport const skipObserved = (observer) => (metamodel) => isObservable(metamodel) ? metamodel : observer(metamodel);\nexport const skipObservedWithContext = (observer) => (metamodel, context) => isObservable(metamodel) ? metamodel : observer(metamodel, context);\nexport const observe_Abstract_PackageableElement = (metamodel) => {\n makeObservable(metamodel, {\n _isDeleted: observable,\n _isDisposed: observable,\n name: observable,\n package: observable,\n isDeleted: computed,\n path: computed,\n _elementHashCode: computed,\n hashCode: computed,\n setIsDeleted: action,\n dispose: action,\n });\n};\nexport const observe_PackageableElementReference = skipObserved((metamodel) => makeObservable(metamodel, {\n value: observable,\n valueForSerialization: computed,\n}));\nexport const observe_Abstract_InferableValue = (metamodel) => {\n makeObservable(metamodel, {\n value: observable,\n });\n};\n//# sourceMappingURL=CoreObserverHelper.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, } 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 .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 { 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[\"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_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 // 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[\"LEGACY_RUNTIME\"] = \"LEGACY_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 CORE_HASH_STRUCTURE[\"RELATIONAL_DATABASE_CONNECTION\"] = \"RELATIONAL_DATABASE_CONNECTION\";\n // 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 // 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_TABLE_COLUMN\"] = \"DATABASE_TABLE_COLUMN\";\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 // 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 // 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 // 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 // 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 // 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[\"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 // 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 // mapping\n CORE_HASH_STRUCTURE[\"MAPPING\"] = \"MAPPING\";\n CORE_HASH_STRUCTURE[\"MAPPING_INCLUDE\"] = \"MAPPING_INCLUDE\";\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 // service\n CORE_HASH_STRUCTURE[\"SERVICE\"] = \"SERVICE\";\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 // generation specification\n CORE_HASH_STRUCTURE[\"GENERATION_TREE\"] = \"GENERATION_TREE\";\n CORE_HASH_STRUCTURE[\"GENERATION_TREE_NODE\"] = \"GENERATION_TREE_NODE\";\n // file generation\n CORE_HASH_STRUCTURE[\"FILE_GENERATION\"] = \"FILE_GENERATION\";\n CORE_HASH_STRUCTURE[\"CONFIGURATION_PROPERTY\"] = \"CONFIGURATION_PROPERTY\";\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 // test\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 CORE_HASH_STRUCTURE[\"TEST_RESULT\"] = \"TEST_RESULT\";\n CORE_HASH_STRUCTURE[\"TEST_ERROR\"] = \"TEST_ERROR\";\n CORE_HASH_STRUCTURE[\"TEST_FAILED\"] = \"TEST_FAILED\";\n CORE_HASH_STRUCTURE[\"TEST_PASSED\"] = \"TEST_PASSED\";\n CORE_HASH_STRUCTURE[\"ATOMIC_TEST_ID\"] = \"ATOMIC_TEST_ID\";\n // 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[\"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 // value specification\n CORE_HASH_STRUCTURE[\"INTERNAL_UNKNOWN_VALUE_SPECIFICATION\"] = \"INTERNAL_UNKNOWN_VALUE_SPECIFICATION\";\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[\"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[\"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[\"INTERNAL_PROPAGATED_VALUE\"] = \"INTERNAL_PROPAGATED_VALUE\";\n})(CORE_HASH_STRUCTURE = 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 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 */\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 { 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 { 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, 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 { 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 { CORE_HASH_STRUCTURE } from '../../../../../graph/Core_HashUtils.js';\nimport { hashArray } from '@finos/legend-shared';\nexport class Section {\n _OWNER;\n parserName;\n elements = [];\n constructor(parserName, owner) {\n this.parserName = parserName;\n this._OWNER = owner;\n }\n get hashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.SECTION,\n this.parserName,\n hashArray(this.elements.map((e) => e.valueForSerialization ?? '')),\n ]);\n }\n}\nexport class ImportAwareCodeSection extends Section {\n imports = [];\n get hashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.IMPORT_AWARE_CODE_SECTION,\n super.hashCode,\n hashArray(this.imports.map((e) => e.valueForSerialization ?? '')),\n ]);\n }\n}\nexport class DefaultCodeSection extends Section {\n get hashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.DEFAULT_CODE_SECTION,\n super.hashCode,\n ]);\n }\n}\n//# sourceMappingURL=Section.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 { computed, makeObservable, observable, override } from 'mobx';\nimport { PackageableElementReference } from '../../../graph/metamodel/pure/packageableElements/PackageableElementReference.js';\nimport { observe_Abstract_PackageableElement, observe_PackageableElementReference, skipObserved, } from './CoreObserverHelper.js';\nexport const observe_ConfigurationProperty = skipObserved((metamodel) => makeObservable(metamodel, {\n name: observable,\n value: observable.ref,\n hashCode: computed,\n}));\nexport const observe_FileGenerationSpecification = skipObserved((metamodel) => {\n observe_Abstract_PackageableElement(metamodel);\n makeObservable(metamodel, {\n type: observable,\n generationOutputPath: observable,\n scopeElements: observable,\n configurationProperties: observable,\n _elementHashCode: override,\n });\n metamodel.scopeElements.forEach((scopeElement) => {\n if (scopeElement instanceof PackageableElementReference) {\n observe_PackageableElementReference(scopeElement);\n }\n });\n metamodel.configurationProperties.forEach(observe_ConfigurationProperty);\n return metamodel;\n});\nexport const observe_GenerationTreeNode = skipObserved((metamodel) => {\n makeObservable(metamodel, {\n id: observable,\n hashCode: computed,\n });\n observe_PackageableElementReference(metamodel.generationElement);\n return metamodel;\n});\nexport const observe_GenerationSpecification = skipObserved((metamodel) => {\n observe_Abstract_PackageableElement(metamodel);\n makeObservable(metamodel, {\n generationNodes: observable,\n fileGenerations: observable,\n _elementHashCode: override,\n });\n metamodel.generationNodes.forEach(observe_GenerationTreeNode);\n metamodel.fileGenerations.forEach(observe_PackageableElementReference);\n return metamodel;\n});\n//# sourceMappingURL=DSL_Generation_ObserverHelper.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, } from 'lossless-json';\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 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) => toSentenceCase((value ?? '').toLowerCase())\n .replace(/_(?:\\w)/gu, (val) => val.toUpperCase())\n .replace(/_/gu, ' ')\n .trim();\nexport const isCamelCase = (value) => value !== undefined &&\n value !== '' &&\n Boolean(value.match(/^(?:[a-z])*(?:[A-Z][a-z]+)+$/u));\nexport const prettyCamelCase = (value) => toSentenceCase(value)\n .replace(/(?:[A-Z])/gu, (val) => ` ${val}`)\n .trim();\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 * 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 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');\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 */\nexport class MappingTestAssert {\n}\n//# sourceMappingURL=MappingTestAssert.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, tryToMinifyLosslessJSONString, } from '@finos/legend-shared';\nimport { CORE_HASH_STRUCTURE } from '../../../../../graph/Core_HashUtils.js';\nimport { MappingTestAssert } from './MappingTestAssert.js';\nexport class ExpectedOutputMappingTestAssert extends MappingTestAssert {\n expectedOutput;\n constructor(expectedOutput) {\n super();\n /**\n * @workaround https://github.com/finos/legend-studio/issues/68\n */\n this.expectedOutput = tryToMinifyLosslessJSONString(expectedOutput);\n }\n get hashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.EXPECTED_OUTPUT_MAPPING_TEST_ASSERT,\n this.expectedOutput,\n ]);\n }\n}\n//# sourceMappingURL=ExpectedOutputMappingTestAssert.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, hashElementPointer, } from '../../../../../graph/Core_HashUtils.js';\nimport { PackageableElementPointerType } from '../../../../MetaModelConst.js';\nexport class IdentifiedConnection {\n _UUID = uuid();\n id;\n connection;\n constructor(id, connection) {\n this.id = id;\n this.connection = connection;\n }\n get hashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.IDENTIFIED_CONNECTION,\n this.id,\n this.connection,\n ]);\n }\n}\nexport class StoreConnections {\n store;\n storeConnections = [];\n constructor(store) {\n this.store = store;\n }\n get hashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.STORE_CONNECTIONS,\n hashElementPointer(PackageableElementPointerType.STORE, this.store.valueForSerialization ?? ''),\n hashArray(this.storeConnections),\n ]);\n }\n}\nexport class Runtime {\n}\nexport class EngineRuntime extends Runtime {\n mappings = [];\n connections = [];\n get hashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.ENGINE_RUNTIME,\n hashArray(this.mappings.map((mapping) => hashElementPointer(PackageableElementPointerType.MAPPING, mapping.valueForSerialization ?? ''))),\n hashArray(this.connections.filter(\n // TODO: use `isStubbed_StoreConnections` when we refactor hashing\n (connection) => connection.storeConnections.length)),\n ]);\n }\n}\nexport class RuntimePointer extends Runtime {\n packageableRuntime;\n constructor(packageableRuntime) {\n super();\n this.packageableRuntime = packageableRuntime;\n }\n get hashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.RUNTIME_POINTER,\n this.packageableRuntime.valueForSerialization ?? '',\n ]);\n }\n}\n//# sourceMappingURL=Runtime.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 InputData {\n}\n//# sourceMappingURL=InputData.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, hashElementPointer, } from '../../../../../../../graph/Core_HashUtils.js';\nimport { InputData } from '../../../mapping/InputData.js';\nimport { PackageableElementPointerType } from '../../../../../../MetaModelConst.js';\nexport class FlatDataInputData extends InputData {\n sourceFlatData;\n data;\n constructor(sourceFlatData, data) {\n super();\n this.sourceFlatData = sourceFlatData;\n this.data = data;\n }\n get hashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.FLAT_DATA_INPUT_DATA,\n hashElementPointer(PackageableElementPointerType.STORE, this.sourceFlatData.valueForSerialization ?? ''),\n this.data,\n ]);\n }\n}\n//# sourceMappingURL=FlatDataInputData.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, tryToMinifyLosslessJSONString, } from '@finos/legend-shared';\nimport { CORE_HASH_STRUCTURE } from '../../../../../../../graph/Core_HashUtils.js';\nimport { InputData } from '../../../mapping/InputData.js';\nexport var ObjectInputType;\n(function (ObjectInputType) {\n ObjectInputType[\"JSON\"] = \"JSON\";\n ObjectInputType[\"XML\"] = \"XML\";\n})(ObjectInputType = ObjectInputType || (ObjectInputType = {}));\nexport class ObjectInputData extends InputData {\n sourceClass;\n inputType;\n data;\n constructor(sourceClass, inputType, data) {\n super();\n this.sourceClass = sourceClass;\n this.inputType = inputType;\n /**\n * @workaround https://github.com/finos/legend-studio/issues/68\n */\n this.data =\n inputType === ObjectInputType.JSON\n ? tryToMinifyLosslessJSONString(data)\n : data;\n }\n get hashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.OBJECT_INPUT_DATA,\n this.sourceClass.valueForSerialization ?? '',\n this.inputType,\n this.data,\n ]);\n }\n}\n//# sourceMappingURL=ObjectInputData.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 { InputData } from '../../../mapping/InputData.js';\nexport var RelationalInputType;\n(function (RelationalInputType) {\n RelationalInputType[\"SQL\"] = \"SQL\";\n RelationalInputType[\"CSV\"] = \"CSV\";\n})(RelationalInputType = RelationalInputType || (RelationalInputType = {}));\nexport class RelationalInputData extends InputData {\n database;\n data;\n inputType;\n constructor(database, data, inputType) {\n super();\n this.database = database;\n this.data = data;\n this.inputType = inputType;\n }\n get hashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.RELATIONAL_INPUT_DATA,\n this.database.valueForSerialization ?? '',\n this.data,\n this.inputType,\n ]);\n }\n}\n//# sourceMappingURL=RelationalInputData.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 { observe_PackageableElementReference, skipObserved, skipObservedWithContext, } from './CoreObserverHelper.js';\nexport const observe_RawPrimitiveInstanceValue = skipObserved((metamodel) => {\n makeObservable(metamodel, {\n value: observable,\n hashCode: computed,\n });\n observe_PackageableElementReference(metamodel.type);\n return metamodel;\n});\nexport const observe_RawLambda = skipObserved((metamodel) => makeObservable(metamodel, {\n body: observable.ref,\n parameters: observable.ref,\n hashCode: computed,\n}));\nexport const observe_RawVariableExpression = skipObserved((metamodel) => {\n makeObservable(metamodel, {\n name: observable,\n multiplicity: observable,\n hashCode: computed,\n });\n observe_PackageableElementReference(metamodel.type);\n return metamodel;\n});\nclass RawValueSpecificationObserver {\n observerContext;\n constructor(observerContext) {\n this.observerContext = observerContext;\n }\n visit_RawLambda(valueSpecification) {\n observe_RawLambda(valueSpecification);\n }\n visit_RawVariableExpression(valueSpecification) {\n observe_RawVariableExpression(valueSpecification);\n }\n visit_RawPrimitiveInstanceValue(valueSpecification) {\n observe_RawPrimitiveInstanceValue(valueSpecification);\n }\n}\nexport const observe_RawValueSpecification = skipObservedWithContext((rawValueSpecification, context) => {\n rawValueSpecification.accept_RawValueSpecificationVisitor(new RawValueSpecificationObserver(context));\n return rawValueSpecification;\n});\n//# sourceMappingURL=RawValueSpecificationObserver.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';\nexport class FlatDataDataType {\n _correspondingPrimitiveType;\n constructor(correspondingPrimitiveType) {\n this._correspondingPrimitiveType = correspondingPrimitiveType;\n }\n}\nexport class FlatDataBoolean extends FlatDataDataType {\n trueString;\n falseString;\n get hashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.FLAT_DATA_BOOLEAN,\n this.trueString ?? '',\n this.falseString ?? '',\n ]);\n }\n}\nexport class FlatDataString extends FlatDataDataType {\n get hashCode() {\n return hashArray([CORE_HASH_STRUCTURE.FLAT_DATA_STRING]);\n }\n}\nexport class FlatDataNumber extends FlatDataDataType {\n get hashCode() {\n return hashArray([CORE_HASH_STRUCTURE.FLAT_DATA_NUMBER]);\n }\n}\nexport class FlatDataInteger extends FlatDataNumber {\n get hashCode() {\n return hashArray([CORE_HASH_STRUCTURE.FLAT_DATA_INTEGER]);\n }\n}\nexport class FlatDataFloat extends FlatDataNumber {\n get hashCode() {\n return hashArray([CORE_HASH_STRUCTURE.FLAT_DATA_FLOAT]);\n }\n}\nexport class FlatDataDecimal extends FlatDataNumber {\n get hashCode() {\n return hashArray([CORE_HASH_STRUCTURE.FLAT_DATA_DECIMAL]);\n }\n}\nexport class FlatDataDate extends FlatDataDataType {\n dateFormat;\n timeZone;\n get hashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.FLAT_DATA_DATE,\n this.dateFormat ? hashArray(this.dateFormat) : '',\n this.timeZone ?? '',\n ]);\n }\n}\nexport class FlatDataDateTime extends FlatDataDate {\n get hashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.FLAT_DATA_DATE_TIME,\n this.dateFormat ? hashArray(this.dateFormat) : '',\n this.timeZone ?? '',\n ]);\n }\n}\nexport class FlatDataStrictDate extends FlatDataDate {\n get hashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.FLAT_DATA_STRICT_DATE,\n this.dateFormat ? hashArray(this.dateFormat) : '',\n this.timeZone ?? '',\n ]);\n }\n}\nexport class FlatDataRecordField {\n label;\n flatDataDataType;\n optional;\n address;\n constructor(label, flatDataDataType, optional) {\n this.label = label;\n this.flatDataDataType = flatDataDataType;\n this.optional = optional;\n }\n get hashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.FLAT_DATA_RECORD_FIELD,\n this.label,\n this.flatDataDataType,\n this.optional.toString(),\n this.address ?? '',\n ]);\n }\n}\n/**\n * NOTE: the fact that we have `fields` in `FlatDataRecordType` like this is misleading. What we should have and what Dave\n * also agreed on is that we will have another class `X` that is the super type of `RootFlatDataRecordType` and contains `fields`\n * instead of `FlatDataRecordType` as `FlatDataRecordType` is just a normal type like `FlatDataBoolean` that signals the driver\n * to look for a record type.\n *\n * As for `RootFlatDataRecordType` it should extends `X` so that we remain open for the possibility that flat data can have embedded\n * structure. Also `X` should not have name, as it can be embedded.\n */\nexport class FlatDataRecordType extends FlatDataDataType {\n fields = [];\n get hashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.FLAT_DATA_RECORD_TYPE,\n hashArray(this.fields),\n ]);\n }\n}\nexport class RootFlatDataRecordType extends FlatDataRecordType {\n _OWNER;\n constructor(owner) {\n super();\n this._OWNER = owner;\n }\n get hashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.FLAT_DATA_ROOT_RECORD_TYPE,\n hashArray(this.fields),\n ]);\n }\n}\n//# sourceMappingURL=FlatDataDataType.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, override } from 'mobx';\nimport { FlatDataBoolean, FlatDataRecordType, FlatDataDate, FlatDataNumber, FlatDataString, } from '../../../graph/metamodel/pure/packageableElements/store/flatData/model/FlatDataDataType.js';\nimport { observe_Abstract_PackageableElement, observe_PackageableElementReference, skipObserved, skipObservedWithContext, } from './CoreObserverHelper.js';\nimport { observe_Abstract_InstanceSetImplementation, observe_Abstract_PropertyMapping, } from './DSL_Mapping_ObserverHelper.js';\nimport { observe_RawLambda } from './RawValueSpecificationObserver.js';\n// ------------------------------------- Store -------------------------------------\nexport const observe_FlatDataDataType = (metamodel) => {\n if (metamodel instanceof FlatDataBoolean) {\n return makeObservable(metamodel, {\n trueString: observable,\n falseString: observable,\n hashCode: computed,\n });\n }\n else if (metamodel instanceof FlatDataString ||\n metamodel instanceof FlatDataNumber) {\n return makeObservable(metamodel, {\n hashCode: computed,\n });\n }\n else if (metamodel instanceof FlatDataDate) {\n return makeObservable(metamodel, {\n dateFormat: observable,\n timeZone: observable,\n hashCode: computed,\n });\n }\n else if (metamodel instanceof FlatDataRecordType) {\n return skipObserved(_observe_FlatDataRecordType)(metamodel);\n }\n return metamodel;\n};\nexport const observe_FlatDataAssociationPropertyMapping = skipObservedWithContext((metamodel, context) => {\n observe_Abstract_PropertyMapping(metamodel, context);\n makeObservable(metamodel, {\n flatData: observable,\n sectionName: observable,\n hashCode: computed,\n });\n return metamodel;\n});\nexport const observe_FlatDataRecordField = skipObserved((metamodel) => {\n makeObservable(metamodel, {\n label: observable,\n flatDataDataType: observable,\n optional: observable,\n address: observable,\n hashCode: computed,\n });\n observe_FlatDataDataType(metamodel.flatDataDataType);\n return metamodel;\n});\nfunction _observe_FlatDataRecordType(metamodel) {\n makeObservable(metamodel, {\n fields: observable,\n hashCode: computed,\n });\n metamodel.fields.forEach(observe_FlatDataRecordField);\n return metamodel;\n}\nexport const observe_FlatDataRecordType = skipObserved(_observe_FlatDataRecordType);\nexport const observe_RootFlatDataRecordType = skipObserved(_observe_FlatDataRecordType);\nexport const observe_FlatDataProperty = skipObserved((metamodel) => {\n makeObservable(metamodel, {\n name: observable,\n value: observable,\n hashCode: computed,\n });\n return metamodel;\n});\nexport const observe_FlatDataSection = skipObserved((metamodel) => {\n makeObservable(metamodel, {\n driverId: observable,\n name: observable,\n sectionProperties: observable,\n recordType: observable,\n hashCode: computed,\n });\n metamodel.sectionProperties.forEach(observe_FlatDataProperty);\n if (metamodel.recordType) {\n observe_RootFlatDataRecordType(metamodel.recordType);\n }\n return metamodel;\n});\nexport const observe_FlatDataSectionReference = skipObserved((metamodel) => {\n makeObservable(metamodel, {\n value: observable,\n pointerHashCode: computed,\n });\n observe_PackageableElementReference(metamodel.ownerReference);\n return metamodel;\n});\nexport const observe_FlatData = skipObserved((metamodel) => {\n observe_Abstract_PackageableElement(metamodel);\n makeObservable(metamodel, {\n sections: observable,\n _elementHashCode: override,\n });\n metamodel.sections.forEach(observe_FlatDataSection);\n return metamodel;\n});\n// ------------------------------------- Mapping -------------------------------------\nexport const observe_RootFlatDataRecordTypeReference = skipObserved((metamodel) => {\n makeObservable(metamodel, {\n value: observable,\n });\n observe_PackageableElementReference(metamodel.ownerReference);\n return metamodel;\n});\nexport const observe_FlatDataInstanceSetImplementation = skipObservedWithContext((metamodel, context) => {\n observe_Abstract_InstanceSetImplementation(metamodel, context);\n makeObservable(metamodel, {\n filter: observable,\n hashCode: computed,\n });\n observe_RootFlatDataRecordTypeReference(metamodel.sourceRootRecordType);\n if (metamodel.filter) {\n observe_RawLambda(metamodel.filter);\n }\n return metamodel;\n});\nexport const observe_EmbeddedFlatDataPropertyMapping = skipObservedWithContext((metamodel, context) => {\n observe_Abstract_PropertyMapping(metamodel, context);\n observe_Abstract_InstanceSetImplementation(metamodel, context);\n makeObservable(metamodel, {\n rootInstanceSetImplementation: observable,\n hashCode: computed,\n });\n return metamodel;\n});\nexport const observe_FlatDataPropertyMapping = skipObservedWithContext((metamodel, context) => {\n observe_Abstract_PropertyMapping(metamodel, context);\n makeObservable(metamodel, {\n transformer: observable,\n transform: observable,\n hashCode: computed,\n });\n // TODO transformer?: EnumerationMapping | undefined;\n observe_RawLambda(metamodel.transform);\n return metamodel;\n});\nexport const observe_FlatDataInputData = skipObserved((metamodel) => {\n makeObservable(metamodel, {\n data: observable,\n hashCode: computed,\n });\n observe_PackageableElementReference(metamodel.sourceFlatData);\n return metamodel;\n});\n// ------------------------------------- Connection -------------------------------------\nexport const observe_FlatDataConnection = skipObserved((metamodel) => {\n makeObservable(metamodel, {\n url: observable,\n hashCode: computed,\n });\n return metamodel;\n});\n//# sourceMappingURL=STO_FlatData_ObserverHelper.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 AuthenticationStrategy {\n}\nexport class DelegatedKerberosAuthenticationStrategy extends AuthenticationStrategy {\n serverPrincipal;\n get hashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.DELEGRATED_KEREBEROS_AUTHENTICATION_STRATEGY,\n this.serverPrincipal?.toString() ?? '',\n ]);\n }\n}\nexport class DefaultH2AuthenticationStrategy extends AuthenticationStrategy {\n get hashCode() {\n return hashArray([CORE_HASH_STRUCTURE.DEFAULT_H2_AUTHENTICATION_STRATEGY]);\n }\n}\nexport class ApiTokenAuthenticationStrategy extends AuthenticationStrategy {\n apiToken;\n constructor(apiToken) {\n super();\n this.apiToken = apiToken;\n }\n get hashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.API_TOKEN_AUTHENTICATION_STRATEGY,\n this.apiToken,\n ]);\n }\n}\nexport class OAuthAuthenticationStrategy extends AuthenticationStrategy {\n oauthKey;\n scopeName;\n constructor(oauthKey, scopeName) {\n super();\n this.oauthKey = oauthKey;\n this.scopeName = scopeName;\n }\n get hashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.OAUTH_AUTHENTICATION_STRATEGY,\n this.oauthKey,\n this.scopeName,\n ]);\n }\n}\nexport class SnowflakePublicAuthenticationStrategy extends AuthenticationStrategy {\n privateKeyVaultReference;\n passPhraseVaultReference;\n publicUserName;\n constructor(privateKeyVaultReference, passPhraseVaultReference, publicUserName) {\n super();\n this.privateKeyVaultReference = privateKeyVaultReference;\n this.passPhraseVaultReference = passPhraseVaultReference;\n this.publicUserName = publicUserName;\n }\n get hashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.SNOWFLAKE_PUBLIC_AUTHENTICATION_STRATEGY,\n this.privateKeyVaultReference,\n this.passPhraseVaultReference,\n this.publicUserName,\n ]);\n }\n}\nexport class GCPApplicationDefaultCredentialsAuthenticationStrategy extends AuthenticationStrategy {\n get hashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.GCP_APPLICATION_DEFAULT_CREDENTIALS_AUTHENTICATION_STRATEGY,\n ]);\n }\n}\nexport class GCPWorkloadIdentityFederationAuthenticationStrategy extends AuthenticationStrategy {\n serviceAccountEmail;\n additionalGcpScopes = [];\n constructor(serviceAccountEmail, additionalGcpScopes = []) {\n super();\n this.serviceAccountEmail = serviceAccountEmail;\n this.additionalGcpScopes = additionalGcpScopes;\n }\n get hashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.GCP_WORKLOAD_IDENTITY_FEDERATION_AUTHENTICATION_STRATEGY,\n this.serviceAccountEmail,\n hashArray(this.additionalGcpScopes),\n ]);\n }\n}\nexport class UsernamePasswordAuthenticationStrategy extends AuthenticationStrategy {\n baseVaultReference;\n userNameVaultReference;\n passwordVaultReference;\n constructor(userNameVaultReference, passwordVaultReference) {\n super();\n this.userNameVaultReference = userNameVaultReference;\n this.passwordVaultReference = passwordVaultReference;\n }\n get hashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.USERNAME_PASSWORD_AUTHENTICATION_STRATEGY,\n this.baseVaultReference?.toString() ?? '',\n this.userNameVaultReference,\n this.passwordVaultReference,\n ]);\n }\n}\nexport class MiddleTierUsernamePasswordAuthenticationStrategy extends AuthenticationStrategy {\n vaultReference;\n constructor(vaultReference) {\n super();\n this.vaultReference = vaultReference;\n }\n get hashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.MIDDLE_TIER_USERNAME_PASSWORD_AUTHENTICATION_STRATEGY,\n this.vaultReference,\n ]);\n }\n}\n//# sourceMappingURL=AuthenticationStrategy.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';\nexport class DatasourceSpecification {\n}\nexport class StaticDatasourceSpecification extends DatasourceSpecification {\n host;\n port;\n databaseName;\n constructor(host, port, databaseName) {\n super();\n this.host = host;\n this.port = port;\n this.databaseName = databaseName;\n }\n get hashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.STATIC_DATASOURCE_SPECIFICATION,\n this.host,\n this.port.toString(),\n this.databaseName,\n ]);\n }\n}\nexport class DatabricksDatasourceSpecification extends DatasourceSpecification {\n hostname;\n port;\n protocol;\n httpPath;\n constructor(hostname, port, protocol, httpPath) {\n super();\n this.hostname = hostname;\n this.port = port;\n this.protocol = protocol;\n this.httpPath = httpPath;\n }\n get hashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.DATABRICKS_DATASOURCE_SPECIFICATION,\n this.hostname,\n this.port,\n this.protocol,\n this.httpPath,\n ]);\n }\n}\nexport class EmbeddedH2DatasourceSpecification extends DatasourceSpecification {\n databaseName;\n directory;\n autoServerMode;\n constructor(databaseName, directory, autoServerMode) {\n super();\n this.databaseName = databaseName;\n this.directory = directory;\n this.autoServerMode = autoServerMode;\n }\n get hashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.EMBEDDED_H2_DATASOURCE_SPECIFICATION,\n this.databaseName,\n this.directory,\n this.autoServerMode.toString(),\n ]);\n }\n}\nexport class LocalH2DatasourceSpecification extends DatasourceSpecification {\n testDataSetupCsv;\n testDataSetupSqls = [];\n get hashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.LOCAL_H2_DATASOURCE_SPECIFICATION,\n this.testDataSetupCsv ?? '',\n hashArray(this.testDataSetupSqls),\n ]);\n }\n}\nexport class SnowflakeDatasourceSpecification extends DatasourceSpecification {\n accountName;\n region;\n warehouseName;\n databaseName;\n cloudType;\n quotedIdentifiersIgnoreCase;\n proxyHost;\n proxyPort;\n nonProxyHosts;\n organization;\n accountType;\n role;\n constructor(accountName, region, warehouseName, databaseName) {\n super();\n this.region = region;\n this.warehouseName = warehouseName;\n this.databaseName = databaseName;\n this.accountName = accountName;\n }\n get hashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.SNOWFLAKE_DATASOURCE_SPECIFICATION,\n this.accountName,\n this.region,\n this.warehouseName,\n this.databaseName,\n this.cloudType ?? '',\n this.proxyHost ?? '',\n this.proxyPort ?? '',\n this.nonProxyHosts ?? '',\n this.organization ?? '',\n this.accountType ?? '',\n this.role ?? '',\n this.quotedIdentifiersIgnoreCase?.toString() ?? '',\n ]);\n }\n}\nexport class RedshiftDatasourceSpecification extends DatasourceSpecification {\n clusterID;\n databaseName;\n host;\n port;\n region;\n endpointURL;\n constructor(databaseName, endpointURL, port, host, clusterID, region) {\n super();\n this.clusterID = clusterID;\n this.region = region;\n this.host = host;\n this.databaseName = databaseName;\n this.endpointURL = endpointURL;\n this.port = port;\n }\n get hashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.REDSHIFT_DATASOURCE_SPECIFICATION,\n this.databaseName,\n this.endpointURL,\n this.port.toString(),\n this.clusterID,\n this.host,\n this.region,\n ]);\n }\n}\nexport class BigQueryDatasourceSpecification extends DatasourceSpecification {\n projectId;\n defaultDataset;\n proxyHost;\n proxyPort;\n constructor(projectId, defaultDataset) {\n super();\n this.projectId = projectId;\n this.defaultDataset = defaultDataset;\n }\n get hashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.BIGQUERY_DATASOURCE_SPECIFICATION,\n this.projectId,\n this.defaultDataset,\n this.proxyHost ?? '',\n this.proxyPort ?? '',\n ]);\n }\n}\n//# sourceMappingURL=DatasourceSpecification.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';\nexport class PostProcessor {\n _UUID = uuid();\n}\n//# sourceMappingURL=PostProcessor.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 { PostProcessor } from './PostProcessor.js';\nimport { CORE_HASH_STRUCTURE } from '../../../../../../../../graph/Core_HashUtils.js';\nimport { hashArray } from '@finos/legend-shared';\nexport class MapperPostProcessor extends PostProcessor {\n mappers = [];\n get hashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.MAPPER_POST_PROCESSOR,\n hashArray(this.mappers),\n ]);\n }\n}\n//# sourceMappingURL=MapperPostProcessor.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 const SELF_JOIN_TABLE_NAME = '{target}';\nexport const SELF_JOIN_SCHEMA_NAME = 'default';\nexport const SELF_JOIN_ALIAS_PREFIX = 't_';\nexport class Join {\n owner;\n name;\n /**\n * Target is used to show the direction of the join. Since cross table join is symmetrical in nature,\n * the direction is not required at all, whereas for self-join, the direction really matters\n */\n target;\n /**\n * This is an optimization for looking up tables/views involved in a join.\n * Normally, it has 2 pairs (A,B) and (B,A)\n */\n aliases = [];\n operation;\n constructor(name, operation) {\n this.name = name;\n this.operation = operation;\n }\n get hashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.DATABASE_JOIN,\n this.name,\n this.operation,\n ]);\n }\n}\n//# sourceMappingURL=Join.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, UnsupportedOperationError, } from '@finos/legend-shared';\nimport { SELF_JOIN_TABLE_NAME } from './Join.js';\nexport class RelationalOperationElement {\n}\nexport class Relation extends RelationalOperationElement {\n columns = [];\n get hashCode() {\n throw new UnsupportedOperationError();\n }\n}\nexport class NamedRelation extends Relation {\n name;\n constructor(name) {\n super();\n this.name = name;\n }\n}\nclass Function extends RelationalOperationElement {\n}\nexport class Operation extends Function {\n}\nexport class DynaFunction extends Operation {\n name;\n parameters = [];\n constructor(name) {\n super();\n this.name = name;\n }\n get hashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.RELATIONAL_OPERATION_DYNA_FUNC,\n this.name,\n hashArray(this.parameters),\n ]);\n }\n}\nexport var JoinType;\n(function (JoinType) {\n JoinType[\"INNER\"] = \"INNER\";\n JoinType[\"LEFT_OUTER\"] = \"LEFT_OUTER\";\n JoinType[\"RIGHT_OUTER\"] = \"RIGHT_OUTER\";\n // NOTE: this is not technically part of the join type enumeration\n // but Engine expose it as an alias for which can be resolved into either outer join types\n // for simplicity sake\n JoinType[\"OUTER\"] = \"OUTER\";\n})(JoinType = JoinType || (JoinType = {}));\n// TODO: create RelationalTreeNode like in PURE?\nexport class JoinTreeNode {\n /**\n * This field is required in PURE\n *\n * @discrepancy model\n */\n alias;\n children = [];\n join;\n /**\n * For convenience, we use a Typescript enum instead of the native\n * Pure enumeration meta::relational::metamodel::join::JoinType\n *\n * @discrepancy model\n */\n joinType;\n constructor(join, joinType, alias) {\n this.alias = alias;\n this.joinType = joinType;\n this.join = join;\n }\n get hashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.DATABASE_JOIN,\n this.join.ownerReference.valueForSerialization ?? '',\n this.join.value.name,\n this.joinType ?? '',\n ]);\n }\n}\n/**\n * We could potentially include logic to throw error if tree structure is detected\n */\nexport const extractLine = (joinTreeNode) => [joinTreeNode].concat(joinTreeNode.children.length\n ? extractLine(joinTreeNode.children[0])\n : []);\nexport class RelationalOperationElementWithJoin extends RelationalOperationElement {\n relationalOperationElement;\n joinTreeNode;\n get hashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.RELATIONAL_OPERATION_ELEMENTS_WITH_JOINS,\n hashArray(this.joinTreeNode ? extractLine(this.joinTreeNode) : []),\n this.relationalOperationElement ?? '',\n ]);\n }\n}\nexport class TableAlias extends RelationalOperationElement {\n // setMappingOwner?: PropertyMappingsImplementation | undefined;\n relation;\n name;\n database;\n isSelfJoinTarget = false;\n get hashCode() {\n throw new UnsupportedOperationError();\n }\n}\nexport class TableAliasColumn extends RelationalOperationElement {\n // setMappingOwner?: PropertyMappingsImplementation | undefined;\n alias;\n column;\n columnName;\n get hashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.RELATIONAL_OPERATION_TABLE_ALIAS_COLUMN,\n this.alias.isSelfJoinTarget\n ? this.alias.relation.selfJoinPointerHashCode\n : this.alias.relation.pointerHashCode,\n this.alias.isSelfJoinTarget ? SELF_JOIN_TABLE_NAME : this.alias.name,\n this.column.value.name,\n ]);\n }\n}\nexport class Literal extends RelationalOperationElement {\n value;\n constructor(value) {\n super();\n this.value = value;\n }\n get hashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.RELATIONAL_OPERATION_LITERAL,\n typeof this.value === 'number' ? this.value.toString() : this.value,\n ]);\n }\n}\nexport class LiteralList extends RelationalOperationElement {\n values = [];\n get hashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.RELATIONAL_OPERATION_LITERAL_LIST,\n hashArray(this.values),\n ]);\n }\n}\n//# sourceMappingURL=RelationalOperationElement.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 { RelationalOperationElement, } from './RelationalOperationElement.js';\nexport class Column extends RelationalOperationElement {\n owner;\n name;\n type;\n nullable;\n get hashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.DATABASE_TABLE_COLUMN,\n this.name,\n this.nullable?.toString() ?? '',\n this.type,\n ]);\n }\n}\n//# sourceMappingURL=Column.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 Milestoning {\n}\nexport class TemporalMilestoning extends Milestoning {\n infinityDate;\n}\n//# sourceMappingURL=Milestoning.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 RelationalDataType {\n}\nexport class BigInt extends RelationalDataType {\n get hashCode() {\n return hashArray([CORE_HASH_STRUCTURE.RELATIONAL_DATATYPE_BIGINT]);\n }\n}\nexport class SmallInt extends RelationalDataType {\n get hashCode() {\n return hashArray([CORE_HASH_STRUCTURE.RELATIONAL_DATATYPE_SMALLINT]);\n }\n}\nexport class TinyInt extends RelationalDataType {\n get hashCode() {\n return hashArray([CORE_HASH_STRUCTURE.RELATIONAL_DATATYPE_TINYINT]);\n }\n}\nexport class Integer extends RelationalDataType {\n get hashCode() {\n return hashArray([CORE_HASH_STRUCTURE.RELATIONAL_DATATYPE_INTEGER]);\n }\n}\nexport class Float extends RelationalDataType {\n get hashCode() {\n return hashArray([CORE_HASH_STRUCTURE.RELATIONAL_DATATYPE_FLOAT]);\n }\n}\nexport class Double extends RelationalDataType {\n get hashCode() {\n return hashArray([CORE_HASH_STRUCTURE.RELATIONAL_DATATYPE_DOUBLE]);\n }\n}\nexport class VarChar extends RelationalDataType {\n size;\n constructor(size) {\n super();\n this.size = size;\n }\n get hashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.RELATIONAL_DATATYPE_VARCHAR,\n this.size.toString(),\n ]);\n }\n}\nexport class Char extends RelationalDataType {\n size;\n constructor(size) {\n super();\n this.size = size;\n }\n get hashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.RELATIONAL_DATATYPE_CHAR,\n this.size.toString(),\n ]);\n }\n}\nexport class VarBinary extends RelationalDataType {\n size;\n constructor(size) {\n super();\n this.size = size;\n }\n get hashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.RELATIONAL_DATATYPE_VARBINARY,\n this.size.toString(),\n ]);\n }\n}\nexport class Decimal extends RelationalDataType {\n precision;\n scale;\n constructor(precision, scale) {\n super();\n this.precision = precision;\n this.scale = scale;\n }\n get hashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.RELATIONAL_DATATYPE_DECIMAL,\n this.precision.toString(),\n this.scale.toString(),\n ]);\n }\n}\nexport class Numeric extends RelationalDataType {\n precision;\n scale;\n constructor(precision, scale) {\n super();\n this.precision = precision;\n this.scale = scale;\n }\n get hashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.RELATIONAL_DATATYPE_NUMERIC,\n this.precision.toString(),\n this.scale.toString(),\n ]);\n }\n}\nexport class Timestamp extends RelationalDataType {\n get hashCode() {\n return hashArray([CORE_HASH_STRUCTURE.RELATIONAL_DATATYPE_TIMESTAMP]);\n }\n}\nexport class Date extends RelationalDataType {\n get hashCode() {\n return hashArray([CORE_HASH_STRUCTURE.RELATIONAL_DATATYPE_DATE]);\n }\n}\nexport class Other extends RelationalDataType {\n get hashCode() {\n return hashArray([CORE_HASH_STRUCTURE.RELATIONAL_DATATYPE_VARCHAR]);\n }\n}\nexport class Bit extends RelationalDataType {\n get hashCode() {\n return hashArray([CORE_HASH_STRUCTURE.RELATIONAL_DATATYPE_BIT]);\n }\n}\nexport class Binary extends RelationalDataType {\n size;\n constructor(size) {\n super();\n this.size = size;\n }\n get hashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.RELATIONAL_DATATYPE_BINARY,\n this.size.toString(),\n ]);\n }\n}\nexport class Real extends RelationalDataType {\n get hashCode() {\n return hashArray([CORE_HASH_STRUCTURE.RELATIONAL_DATATYPE_REAL]);\n }\n}\nexport class SemiStructured extends RelationalDataType {\n get hashCode() {\n return hashArray([CORE_HASH_STRUCTURE.RELATIONAL_DATATYPE_SEMISTRUCTURED]);\n }\n}\n//# sourceMappingURL=RelationalDataType.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';\nimport { SELF_JOIN_SCHEMA_NAME, SELF_JOIN_TABLE_NAME } from './Join.js';\nexport class NamedRelationalReference extends ReferenceWithOwner {\n ownerReference;\n constructor(ownerReference) {\n super(ownerReference);\n this.ownerReference = ownerReference;\n }\n}\nexport class TableReference extends NamedRelationalReference {\n value;\n constructor(ownerReference, value) {\n super(ownerReference);\n this.value = value;\n }\n get pointerHashCode() {\n return [\n CORE_HASH_STRUCTURE.RELATIONAL_OPERATION_TABLE_POINTER,\n this.ownerReference.valueForSerialization ?? '',\n this.value.schema.name,\n this.value.name,\n ]\n .map(hashValue)\n .join(',');\n }\n get selfJoinPointerHashCode() {\n return [\n CORE_HASH_STRUCTURE.RELATIONAL_OPERATION_TABLE_POINTER,\n this.ownerReference.valueForSerialization ?? '',\n SELF_JOIN_SCHEMA_NAME,\n SELF_JOIN_TABLE_NAME,\n ]\n .map(hashValue)\n .join(',');\n }\n}\nexport class TableExplicitReference extends TableReference {\n ownerReference;\n constructor(value) {\n const ownerReference = PackageableElementExplicitReference.create(value.schema._OWNER);\n super(ownerReference, value);\n this.ownerReference = ownerReference;\n }\n static create(value) {\n return new TableExplicitReference(value);\n }\n}\nexport class TableImplicitReference extends TableReference {\n ownerReference;\n constructor(ownerReference, value) {\n super(ownerReference, value);\n this.ownerReference = ownerReference;\n }\n static create(ownerReference, value) {\n return new TableImplicitReference(ownerReference, value);\n }\n}\n//# sourceMappingURL=TableReference.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 { NamedRelationalReference } from './TableReference.js';\nimport { SELF_JOIN_SCHEMA_NAME, SELF_JOIN_TABLE_NAME } from './Join.js';\nexport class ViewReference extends NamedRelationalReference {\n value;\n constructor(ownerReference, value) {\n super(ownerReference);\n this.value = value;\n }\n get pointerHashCode() {\n return [\n CORE_HASH_STRUCTURE.RELATIONAL_OPERATION_TABLE_POINTER,\n this.ownerReference.valueForSerialization ?? '',\n this.value.schema.name,\n this.value.name,\n ]\n .map(hashValue)\n .join(',');\n }\n get selfJoinPointerHashCode() {\n return [\n CORE_HASH_STRUCTURE.RELATIONAL_OPERATION_TABLE_POINTER,\n this.ownerReference.valueForSerialization ?? '',\n SELF_JOIN_SCHEMA_NAME,\n SELF_JOIN_TABLE_NAME,\n ]\n .map(hashValue)\n .join(',');\n }\n}\nexport class ViewExplicitReference extends ViewReference {\n ownerReference;\n constructor(value) {\n const ownerReference = PackageableElementExplicitReference.create(value.schema._OWNER);\n super(ownerReference, value);\n this.ownerReference = ownerReference;\n }\n static create(value) {\n return new ViewExplicitReference(value);\n }\n}\nexport class ViewImplicitReference extends ViewReference {\n ownerReference;\n constructor(ownerReference, value) {\n super(ownerReference, value);\n this.ownerReference = ownerReference;\n }\n static create(ownerReference, value) {\n return new ViewImplicitReference(ownerReference, value);\n }\n}\n//# sourceMappingURL=ViewReference.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, uuid } from '@finos/legend-shared';\nexport class PostProcessorParameter {\n}\nexport class Mapper extends PostProcessorParameter {\n _UUID = uuid();\n from;\n to;\n constructor(from, to) {\n super();\n this.from = from;\n this.to = to;\n }\n get hashCode() {\n return hashArray([this.from, this.to]);\n }\n}\nexport class SchemaNameMapper extends Mapper {\n get hashCode() {\n return hashArray([super.hashCode, CORE_HASH_STRUCTURE.SCHEMA_MAPPER]);\n }\n}\nexport class TableNameMapper extends Mapper {\n schema;\n constructor(from, to, schema) {\n super(from, to);\n this.schema = schema;\n }\n get hashCode() {\n return hashArray([\n super.hashCode,\n CORE_HASH_STRUCTURE.TABLE_MAPPER,\n this.schema,\n ]);\n }\n}\n//# sourceMappingURL=Mapper.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, override } from 'mobx';\nimport { observe_PackageableElementReference, skipObserved, observe_Abstract_PackageableElement, } from './CoreObserverHelper.js';\nimport { observe_Abstract_Connection, observe_Abstract_Store, } from './DSL_Mapping_ObserverHelper.js';\n// ------------------------------------- Store -------------------------------------\nexport const observe_ModelUnit = skipObserved((metamodel) => {\n makeObservable(metamodel, {\n packageableElementIncludes: observable,\n packageableElementExcludes: observable,\n hashCode: computed,\n });\n metamodel.packageableElementIncludes.forEach(observe_PackageableElementReference);\n metamodel.packageableElementExcludes.forEach(observe_PackageableElementReference);\n return metamodel;\n});\nexport const observe_Binding = skipObserved((metamodel) => {\n observe_Abstract_Store(metamodel);\n makeObservable(metamodel, {\n schemaSet: observable,\n schemaId: observable,\n contentType: observable,\n modelUnit: observable,\n _elementHashCode: override,\n });\n if (metamodel.schemaSet) {\n observe_PackageableElementReference(metamodel.schemaSet);\n }\n observe_ModelUnit(metamodel.modelUnit);\n return metamodel;\n});\n// ------------------------------------- Mapping -------------------------------------\nexport const observe_BindingTransformer = skipObserved((metamodel) => {\n makeObservable(metamodel, {\n binding: observable,\n hashCode: computed,\n });\n observe_PackageableElementReference(metamodel.binding);\n return metamodel;\n});\n// ------------------------------------- Connection -------------------------------------\nexport const observe_UrlStream = skipObserved((metamodel) => {\n makeObservable(metamodel, {\n url: observable,\n hashCode: computed,\n });\n return metamodel;\n});\nexport const observe_ExternalFormatConnection = skipObserved((metamodel) => {\n observe_Abstract_Connection(metamodel);\n makeObservable(metamodel, {\n externalSource: observable,\n hashCode: computed,\n });\n observe_UrlStream(metamodel.externalSource);\n return metamodel;\n});\n// ------------------------------------- Element -------------------------------------\nexport const observe_ExternalFormatSchema = skipObserved((metamodel) => makeObservable(metamodel, {\n id: observable,\n location: observable,\n content: observable,\n hashCode: computed,\n}));\nexport const observe_SchemaSet = skipObserved((metamodel) => {\n observe_Abstract_PackageableElement(metamodel);\n makeObservable(metamodel, {\n format: observable,\n schemas: observable,\n _elementHashCode: override,\n });\n metamodel.schemas.forEach(observe_ExternalFormatSchema);\n return metamodel;\n});\n//# sourceMappingURL=DSL_ExternalFormat_ObserverHelper.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, override } from 'mobx';\nimport { ApiTokenAuthenticationStrategy, DefaultH2AuthenticationStrategy, DelegatedKerberosAuthenticationStrategy, GCPApplicationDefaultCredentialsAuthenticationStrategy, OAuthAuthenticationStrategy, SnowflakePublicAuthenticationStrategy, UsernamePasswordAuthenticationStrategy, GCPWorkloadIdentityFederationAuthenticationStrategy, MiddleTierUsernamePasswordAuthenticationStrategy, } from '../../../graph/metamodel/pure/packageableElements/store/relational/connection/AuthenticationStrategy.js';\nimport { BigQueryDatasourceSpecification, DatabricksDatasourceSpecification, EmbeddedH2DatasourceSpecification, LocalH2DatasourceSpecification, RedshiftDatasourceSpecification, SnowflakeDatasourceSpecification, StaticDatasourceSpecification, } from '../../../graph/metamodel/pure/packageableElements/store/relational/connection/DatasourceSpecification.js';\nimport { MapperPostProcessor } from '../../../graph/metamodel/pure/packageableElements/store/relational/connection/postprocessor/MapperPostProcessor.js';\nimport { Column } from '../../../graph/metamodel/pure/packageableElements/store/relational/model/Column.js';\nimport { TemporalMilestoning, } from '../../../graph/metamodel/pure/packageableElements/store/relational/model/milestoning/Milestoning.js';\nimport { Binary, BigInt, Bit, Char, Decimal, Double, Float, Integer, Numeric, Other, Real, SemiStructured, SmallInt, Timestamp, TinyInt, VarBinary, VarChar, } from '../../../graph/metamodel/pure/packageableElements/store/relational/model/RelationalDataType.js';\nimport { RelationalOperationElement, DynaFunction, TableAlias, TableAliasColumn, Literal, LiteralList, RelationalOperationElementWithJoin, } from '../../../graph/metamodel/pure/packageableElements/store/relational/model/RelationalOperationElement.js';\nimport { TableReference, } from '../../../graph/metamodel/pure/packageableElements/store/relational/model/TableReference.js';\nimport { ViewReference } from '../../../graph/metamodel/pure/packageableElements/store/relational/model/ViewReference.js';\nimport { SchemaNameMapper, TableNameMapper, } from '../../../STO_Relational_Exports.js';\nimport { observe_Abstract_PackageableElement, observe_PackageableElementReference, skipObserved, skipObservedWithContext, } from './CoreObserverHelper.js';\nimport { observe_BindingTransformer } from './DSL_ExternalFormat_ObserverHelper.js';\nimport { observe_Abstract_Connection, observe_Abstract_InstanceSetImplementation, observe_Abstract_PropertyMapping, observe_PropertyMapping, observe_SetImplementation, } from './DSL_Mapping_ObserverHelper.js';\n// ------------------------------------- Operation -------------------------------------\nexport const observe_RelationalDataType = skipObserved((metamodel) => {\n if (metamodel instanceof BigInt ||\n metamodel instanceof SmallInt ||\n metamodel instanceof TinyInt ||\n metamodel instanceof Integer ||\n metamodel instanceof Float ||\n metamodel instanceof Double ||\n metamodel instanceof Timestamp ||\n metamodel instanceof Date ||\n metamodel instanceof Other ||\n metamodel instanceof Bit ||\n metamodel instanceof Real ||\n metamodel instanceof SemiStructured) {\n return makeObservable(metamodel, {\n hashCode: computed,\n });\n }\n else if (metamodel instanceof VarChar ||\n metamodel instanceof Char ||\n metamodel instanceof VarBinary ||\n metamodel instanceof Binary) {\n return makeObservable(metamodel, {\n size: observable,\n hashCode: computed,\n });\n }\n else if (metamodel instanceof Decimal || metamodel instanceof Numeric) {\n return makeObservable(metamodel, {\n precision: observable,\n scale: observable,\n hashCode: computed,\n });\n }\n return metamodel;\n});\nexport const observe_Column = skipObserved((metamodel) => {\n makeObservable(metamodel, {\n name: observable,\n type: observable,\n nullable: observable,\n hashCode: computed,\n });\n observe_RelationalDataType(metamodel.type);\n return metamodel;\n});\nexport const observe_TableReference = skipObserved((metamodel) => {\n makeObservable(metamodel, {\n value: observable,\n pointerHashCode: computed,\n selfJoinPointerHashCode: computed,\n });\n observe_PackageableElementReference(metamodel.ownerReference);\n return metamodel;\n});\nexport const observe_ViewReference = skipObserved((metamodel) => {\n makeObservable(metamodel, {\n value: observable,\n pointerHashCode: computed,\n selfJoinPointerHashCode: computed,\n });\n observe_PackageableElementReference(metamodel.ownerReference);\n return metamodel;\n});\nconst observe_NamedRelationalReference = (metamodel) => {\n if (metamodel instanceof ViewReference) {\n return observe_ViewReference(metamodel);\n }\n else if (metamodel instanceof TableReference) {\n return observe_TableReference(metamodel);\n }\n return metamodel;\n};\nexport const observe_TableAlias = skipObserved((metamodel) => {\n makeObservable(metamodel, {\n relation: observable,\n name: observable,\n database: observable,\n isSelfJoinTarget: observable,\n });\n observe_NamedRelationalReference(metamodel.relation);\n // TODO?: database?: Database | undefined;\n return metamodel;\n});\nexport const observe_DynaFunction = skipObserved((metamodel) => {\n makeObservable(metamodel, {\n name: observable,\n parameters: observable,\n hashCode: computed,\n });\n metamodel.parameters.forEach(observe_RelationalOperationElement);\n return metamodel;\n});\nexport const observe_ColumnReference = skipObserved((metamodel) => {\n makeObservable(metamodel, {\n value: observable,\n });\n observe_PackageableElementReference(metamodel.ownerReference);\n return metamodel;\n});\nexport const observe_TableAliasColumn = skipObserved((metamodel) => {\n makeObservable(metamodel, {\n alias: observable,\n column: observable,\n columnName: observable,\n hashCode: computed,\n });\n observe_TableAlias(metamodel.alias);\n observe_ColumnReference(metamodel.column);\n return metamodel;\n});\nexport const observe_JoinReference = skipObserved((metamodel) => {\n makeObservable(metamodel, {\n value: observable,\n });\n observe_PackageableElementReference(metamodel.ownerReference);\n return metamodel;\n});\nexport const observe_JoinTreeNode = skipObserved((metamodel) => {\n makeObservable(metamodel, {\n alias: observable,\n children: observable,\n joinType: observable,\n hashCode: computed,\n });\n if (metamodel.alias) {\n observe_TableAlias(metamodel.alias);\n }\n metamodel.children.forEach(observe_JoinTreeNode);\n observe_JoinReference(metamodel.join);\n return metamodel;\n});\nexport const observe_RelationalOperationElementWithJoin = skipObserved((metamodel) => {\n makeObservable(metamodel, {\n relationalOperationElement: observable,\n joinTreeNode: observable,\n hashCode: computed,\n });\n if (metamodel.relationalOperationElement) {\n observe_RelationalOperationElement(metamodel.relationalOperationElement);\n }\n if (metamodel.joinTreeNode) {\n observe_JoinTreeNode(metamodel.joinTreeNode);\n }\n return metamodel;\n});\nexport const observe_Literal = skipObserved((metamodel) => {\n makeObservable(metamodel, {\n value: observable,\n hashCode: computed,\n });\n if (metamodel.value instanceof RelationalOperationElement) {\n observe_RelationalOperationElement(metamodel.value);\n }\n return metamodel;\n});\nexport const observe_LiteralList = skipObserved((metamodel) => {\n makeObservable(metamodel, {\n values: observable,\n hashCode: computed,\n });\n metamodel.values.forEach(observe_Literal);\n return metamodel;\n});\nexport function observe_RelationalOperationElement(metamodel) {\n if (metamodel instanceof DynaFunction) {\n return observe_DynaFunction(metamodel);\n }\n else if (metamodel instanceof TableAlias) {\n return observe_TableAlias(metamodel);\n }\n else if (metamodel instanceof TableAliasColumn) {\n return observe_TableAliasColumn(metamodel);\n }\n else if (metamodel instanceof Column) {\n return observe_Column(metamodel);\n }\n else if (metamodel instanceof Literal) {\n return observe_Literal(metamodel);\n }\n else if (metamodel instanceof LiteralList) {\n return observe_LiteralList(metamodel);\n }\n else if (metamodel instanceof RelationalOperationElementWithJoin) {\n return observe_RelationalOperationElementWithJoin(metamodel);\n }\n return metamodel;\n}\n// ------------------------------------- Milestoning -------------------------------------\nexport const observe_TemporalMilstoning = skipObserved((metamodel) => \n// TODO\nmetamodel);\nconst observe_Milestoning = skipObservedWithContext((metamodel, context) => {\n if (metamodel instanceof TemporalMilestoning) {\n return observe_TemporalMilstoning(metamodel);\n }\n const extraMilestoningObservers = context.plugins.flatMap((plugin) => plugin.getExtraMilestoningObservers?.() ?? []);\n for (const observer of extraMilestoningObservers) {\n const observedMiletoning = observer(metamodel, context);\n if (observedMiletoning) {\n return observedMiletoning;\n }\n }\n return metamodel;\n});\n// ------------------------------------- Store -------------------------------------\nexport const observe_ColumnMapping = skipObserved((metamodel) => {\n makeObservable(metamodel, {\n columnName: observable,\n relationalOperationElement: observable,\n hashCode: computed,\n });\n observe_RelationalOperationElement(metamodel.relationalOperationElement);\n return metamodel;\n});\nexport const observe_FilterReference = skipObserved((metamodel) => {\n makeObservable(metamodel, {\n value: observable,\n });\n observe_PackageableElementReference(metamodel.ownerReference);\n return metamodel;\n});\nexport const observe_FilterMapping = skipObserved((metamodel) => {\n makeObservable(metamodel, {\n joinTreeNode: observable,\n database: observable,\n filterName: observable,\n hashCode: computed,\n });\n if (metamodel.joinTreeNode) {\n observe_JoinTreeNode(metamodel.joinTreeNode);\n }\n observe_FilterReference(metamodel.filter);\n return metamodel;\n});\nexport const observe_GroupByMapping = skipObserved((metamodel) => {\n makeObservable(metamodel, {\n columns: observable,\n });\n metamodel.columns.forEach(observe_RelationalOperationElement);\n return metamodel;\n});\nconst observe_Abstract_NamedRelation = (metamodel) => {\n makeObservable(metamodel, {\n columns: observable,\n name: observable,\n });\n};\nexport const observe_Table = skipObservedWithContext((metamodel, context) => {\n observe_Abstract_NamedRelation(metamodel);\n makeObservable(metamodel, {\n primaryKey: observable,\n hashCode: computed,\n });\n metamodel.primaryKey.forEach(observe_Column);\n metamodel.milestoning.forEach((m) => observe_Milestoning(m, context));\n return metamodel;\n});\nexport const observe_View = skipObservedWithContext((metamodel, context) => {\n observe_Abstract_NamedRelation(metamodel);\n makeObservable(metamodel, {\n primaryKey: observable,\n columnMappings: observable,\n filter: observable,\n distinct: observable,\n groupBy: observable,\n hashCode: computed,\n });\n metamodel.primaryKey.forEach(observe_Column);\n metamodel.columnMappings.forEach(observe_ColumnMapping);\n if (metamodel.filter) {\n observe_FilterMapping(metamodel.filter);\n }\n if (metamodel.groupBy) {\n observe_GroupByMapping(metamodel.groupBy);\n }\n return metamodel;\n});\nexport const observe_Schema = skipObservedWithContext((metamodel, context) => {\n makeObservable(metamodel, {\n name: observable,\n tables: observable,\n views: observable,\n hashCode: computed,\n });\n metamodel.tables.forEach((table) => observe_Table(table, context));\n metamodel.views.forEach((view) => observe_View(view, context));\n return metamodel;\n});\nexport const observe_Filter = skipObserved((metamodel) => {\n makeObservable(metamodel, {\n name: observable,\n operation: observable,\n hashCode: computed,\n });\n observe_RelationalOperationElement(metamodel.operation);\n return metamodel;\n});\nexport const observe_Join = skipObserved((metamodel) => {\n makeObservable(metamodel, {\n name: observable,\n target: observable,\n aliases: observable,\n operation: observable,\n hashCode: computed,\n });\n if (metamodel.target) {\n observe_TableAlias(metamodel.target);\n }\n observe_RelationalOperationElement(metamodel.operation);\n // TODO?: aliases: Pair<TableAlias, TableAlias>[] = [];\n return metamodel;\n});\nexport const observe_Database = skipObservedWithContext((metamodel, context) => {\n observe_Abstract_PackageableElement(metamodel);\n makeObservable(metamodel, {\n schemas: observable,\n joins: observable,\n filters: observable,\n _elementHashCode: override,\n });\n metamodel.schemas.forEach((schema) => observe_Schema(schema, context));\n metamodel.joins.forEach(observe_Join);\n metamodel.filters.forEach(observe_Filter);\n return metamodel;\n});\n// ------------------------------------- Mapping -------------------------------------\nexport const observe_RelationalPropertyMapping = skipObservedWithContext((metamodel, context) => {\n observe_Abstract_PropertyMapping(metamodel, context);\n makeObservable(metamodel, {\n transformer: observable,\n relationalOperation: observable.ref,\n bindingTransformer: observable,\n hashCode: computed,\n });\n // TODO transformer?: EnumerationMapping | undefined;\n if (metamodel.bindingTransformer) {\n observe_BindingTransformer(metamodel.bindingTransformer);\n }\n return metamodel;\n});\nexport const observe_Abstract_EmbeddedRelationalInstanceSetImplementation = (metamodel, context) => {\n observe_Abstract_InstanceSetImplementation(metamodel, context);\n observe_Abstract_PropertyMapping(metamodel, context);\n makeObservable(metamodel, {\n id: observable,\n rootInstanceSetImplementation: observable,\n primaryKey: observable,\n });\n metamodel.primaryKey.forEach(observe_RelationalOperationElement);\n return metamodel;\n};\nexport const observe_EmbeddedRelationalInstanceSetImplementation = skipObservedWithContext(observe_Abstract_EmbeddedRelationalInstanceSetImplementation);\nexport const observe_InlineEmbeddedRelationalInstanceSetImplementation = skipObservedWithContext((metamodel, context) => {\n observe_Abstract_EmbeddedRelationalInstanceSetImplementation(metamodel, context);\n makeObservable(metamodel, {\n inlineSetImplementation: observable,\n });\n observe_SetImplementation(metamodel.inlineSetImplementation, context);\n return metamodel;\n});\nexport const observe_OtherwiseEmbeddedRelationalInstanceSetImplementation = skipObservedWithContext((metamodel, context) => {\n observe_Abstract_EmbeddedRelationalInstanceSetImplementation(metamodel, context);\n makeObservable(metamodel, {\n otherwisePropertyMapping: observable,\n hashCode: computed,\n });\n observe_PropertyMapping(metamodel.otherwisePropertyMapping, context);\n return metamodel;\n});\nexport const observe_RelationalInstanceSetImplementation = skipObservedWithContext((metamodel, context) => {\n observe_Abstract_InstanceSetImplementation(metamodel, context);\n makeObservable(metamodel, {\n primaryKey: observable,\n });\n metamodel.primaryKey.forEach(observe_RelationalOperationElement);\n return metamodel;\n});\nexport const observe_RootRelationalInstanceSetImplementation = skipObservedWithContext((metamodel, context) => {\n observe_Abstract_InstanceSetImplementation(metamodel, context);\n makeObservable(metamodel, {\n columnMappings: observable,\n filter: observable,\n distinct: observable,\n groupBy: observable,\n mainTableAlias: observable,\n superSetImplementationId: observable,\n hashCode: computed,\n });\n metamodel.columnMappings.forEach(observe_ColumnMapping);\n if (metamodel.filter) {\n observe_FilterMapping(metamodel.filter);\n }\n if (metamodel.groupBy) {\n observe_GroupByMapping(metamodel.groupBy);\n }\n if (metamodel.mainTableAlias) {\n observe_TableAlias(metamodel.mainTableAlias);\n }\n return metamodel;\n});\nexport const observe_RelationalInputData = skipObserved((metamodel) => {\n makeObservable(metamodel, {\n data: observable,\n inputType: observable,\n hashCode: computed,\n });\n observe_PackageableElementReference(metamodel.database);\n return metamodel;\n});\n// ------------------------------------- Connection -------------------------------------\nexport const observe_StaticDatasourceSpecification = skipObserved((metamodel) => makeObservable(metamodel, {\n host: observable,\n port: observable,\n databaseName: observable,\n hashCode: computed,\n}));\nexport const observe_DatabricksDatasourceSpecification = skipObserved((metamodel) => makeObservable(metamodel, {\n hostname: observable,\n port: observable,\n protocol: observable,\n httpPath: observable,\n hashCode: computed,\n}));\nexport const observe_EmbeddedH2DatasourceSpecification = skipObserved((metamodel) => makeObservable(metamodel, {\n databaseName: observable,\n directory: observable,\n autoServerMode: observable,\n hashCode: computed,\n}));\nexport const observe_LocalH2DatasourceSpecification = skipObserved((metamodel) => makeObservable(metamodel, {\n testDataSetupCsv: observable,\n testDataSetupSqls: observable,\n hashCode: computed,\n}));\nexport const observe_SnowflakeDatasourceSpecification = skipObserved((metamodel) => makeObservable(metamodel, {\n accountName: observable,\n region: observable,\n warehouseName: observable,\n databaseName: observable,\n cloudType: observable,\n quotedIdentifiersIgnoreCase: observable,\n proxyHost: observable,\n proxyPort: observable,\n nonProxyHosts: observable,\n organization: observable,\n accountType: observable,\n role: observable,\n hashCode: computed,\n}));\nexport const observe_RedshiftDatasourceSpecification = skipObserved((metamodel) => makeObservable(metamodel, {\n databaseName: observable,\n endpointURL: observable,\n port: observable,\n region: observable,\n clusterID: observable,\n host: observable,\n hashCode: computed,\n}));\nexport const observe_BigQueryDatasourceSpecification = skipObserved((metamodel) => makeObservable(metamodel, {\n projectId: observable,\n defaultDataset: observable,\n proxyHost: observable,\n proxyPort: observable,\n hashCode: computed,\n}));\nexport const observe_DatasourceSpecification = (metamodel, context) => {\n if (metamodel instanceof StaticDatasourceSpecification) {\n return observe_StaticDatasourceSpecification(metamodel);\n }\n else if (metamodel instanceof DatabricksDatasourceSpecification) {\n return observe_DatabricksDatasourceSpecification(metamodel);\n }\n else if (metamodel instanceof EmbeddedH2DatasourceSpecification) {\n return observe_EmbeddedH2DatasourceSpecification(metamodel);\n }\n else if (metamodel instanceof LocalH2DatasourceSpecification) {\n return observe_LocalH2DatasourceSpecification(metamodel);\n }\n else if (metamodel instanceof SnowflakeDatasourceSpecification) {\n return observe_SnowflakeDatasourceSpecification(metamodel);\n }\n else if (metamodel instanceof RedshiftDatasourceSpecification) {\n return observe_RedshiftDatasourceSpecification(metamodel);\n }\n else if (metamodel instanceof BigQueryDatasourceSpecification) {\n return observe_BigQueryDatasourceSpecification(metamodel);\n }\n const extraObservers = context.plugins.flatMap((plugin) => plugin.getExtraDatasourceSpecificationObservers?.() ?? []);\n for (const observer of extraObservers) {\n const observedDatasourceSpec = observer(metamodel, context);\n if (observedDatasourceSpec) {\n return observedDatasourceSpec;\n }\n }\n return metamodel;\n};\nexport const observe_DelegatedKerberosAuthenticationStrategy = skipObserved((metamodel) => makeObservable(metamodel, {\n serverPrincipal: observable,\n hashCode: computed,\n}));\nexport const observe_DefaultH2AuthenticationStrategy = skipObserved((metamodel) => makeObservable(metamodel, {\n hashCode: computed,\n}));\nexport const observe_ApiTokenAuthenticationStrategy = skipObserved((metamodel) => makeObservable(metamodel, {\n apiToken: observable,\n hashCode: computed,\n}));\nexport const observe_OAuthAuthenticationStrategy = skipObserved((metamodel) => makeObservable(metamodel, {\n oauthKey: observable,\n scopeName: observable,\n hashCode: computed,\n}));\nexport const observe_SnowflakePublicAuthenticationStrategy = skipObserved((metamodel) => makeObservable(metamodel, {\n privateKeyVaultReference: observable,\n passPhraseVaultReference: observable,\n publicUserName: observable,\n hashCode: computed,\n}));\nexport const observe_GCPApplicationDefaultCredentialsAuthenticationStrategy = skipObserved((metamodel) => makeObservable(metamodel, {\n hashCode: computed,\n}));\nexport const observe_UsernamePasswordAuthenticationStrategy = skipObserved((metamodel) => makeObservable(metamodel, {\n hashCode: computed,\n userNameVaultReference: observable,\n passwordVaultReference: observable,\n baseVaultReference: observable,\n}));\nexport const observe_GCPWorkloadIdentityFederationAuthenticationStrategy = skipObserved((metamodel) => makeObservable(metamodel, {\n hashCode: computed,\n serviceAccountEmail: observable,\n additionalGcpScopes: observable,\n}));\nexport const observe_MiddleTierUsernamePasswordAuthenticationStrategy = skipObserved((metamodel) => makeObservable(metamodel, {\n hashCode: computed,\n vaultReference: observable,\n}));\nexport const observe_AuthenticationStrategy = (metamodel, context) => {\n if (metamodel instanceof DelegatedKerberosAuthenticationStrategy) {\n return observe_DelegatedKerberosAuthenticationStrategy(metamodel);\n }\n else if (metamodel instanceof DefaultH2AuthenticationStrategy) {\n return observe_DefaultH2AuthenticationStrategy(metamodel);\n }\n else if (metamodel instanceof ApiTokenAuthenticationStrategy) {\n return observe_ApiTokenAuthenticationStrategy(metamodel);\n }\n else if (metamodel instanceof OAuthAuthenticationStrategy) {\n return observe_OAuthAuthenticationStrategy(metamodel);\n }\n else if (metamodel instanceof SnowflakePublicAuthenticationStrategy) {\n return observe_SnowflakePublicAuthenticationStrategy(metamodel);\n }\n else if (metamodel instanceof GCPApplicationDefaultCredentialsAuthenticationStrategy) {\n return observe_GCPApplicationDefaultCredentialsAuthenticationStrategy(metamodel);\n }\n else if (metamodel instanceof UsernamePasswordAuthenticationStrategy) {\n return observe_UsernamePasswordAuthenticationStrategy(metamodel);\n }\n else if (metamodel instanceof GCPWorkloadIdentityFederationAuthenticationStrategy) {\n return observe_GCPWorkloadIdentityFederationAuthenticationStrategy(metamodel);\n }\n else if (metamodel instanceof MiddleTierUsernamePasswordAuthenticationStrategy) {\n return observe_MiddleTierUsernamePasswordAuthenticationStrategy(metamodel);\n }\n const extraObservers = context.plugins.flatMap((plugin) => plugin.getExtraAuthenticationStrategyObservers?.() ?? []);\n for (const observer of extraObservers) {\n const observedAuthStrategy = observer(metamodel, context);\n if (observedAuthStrategy) {\n return observedAuthStrategy;\n }\n }\n return metamodel;\n};\nconst observe_Abstract_Mapper = (metamodel) => {\n makeObservable(metamodel, {\n from: observable,\n to: observable,\n hashCode: computed,\n });\n};\nexport const observe_SchemaNameMapper = skipObserved((metamodel) => {\n observe_Abstract_Mapper(metamodel);\n return metamodel;\n});\nexport const observe_TableNameMapper = skipObserved((metamodel) => {\n observe_Abstract_Mapper(metamodel);\n makeObservable(metamodel, {\n schema: observable,\n });\n observe_SchemaNameMapper(metamodel.schema);\n return metamodel;\n});\nexport const observe_Mapper = (metamodel) => {\n if (metamodel instanceof SchemaNameMapper) {\n return observe_SchemaNameMapper(metamodel);\n }\n else if (metamodel instanceof TableNameMapper) {\n return observe_TableNameMapper(metamodel);\n }\n return metamodel;\n};\nexport const observe_Abstract_PostProcessor = (metamodel) => {\n makeObservable(metamodel, {\n hashCode: computed,\n });\n};\nexport const observe_MapperPostProcessor = (metamodel) => {\n observe_Abstract_PostProcessor(metamodel);\n makeObservable(metamodel, {\n mappers: observable,\n });\n metamodel.mappers.forEach((mapper) => {\n observe_Mapper(mapper);\n });\n return metamodel;\n};\nexport const observe_PostProcessor = (metamodel, context) => {\n if (metamodel instanceof MapperPostProcessor) {\n return observe_MapperPostProcessor(metamodel);\n }\n const extraObservers = context.plugins.flatMap((plugin) => plugin.getExtraPostProcessorObservers?.() ?? []);\n for (const observer of extraObservers) {\n const observedPostProcessor = observer(metamodel, context);\n if (observedPostProcessor) {\n return observedPostProcessor;\n }\n }\n return metamodel;\n};\nconst observe_Abstract_DatabaseConnection = (metamodel) => {\n observe_Abstract_Connection(metamodel);\n makeObservable(metamodel, {\n type: observable,\n timeZone: observable,\n quoteIdentifiers: observable,\n });\n};\nexport const observe_RelationalDatabaseConnection = skipObservedWithContext((metamodel, context) => {\n observe_Abstract_DatabaseConnection(metamodel);\n makeObservable(metamodel, {\n datasourceSpecification: observable,\n authenticationStrategy: observable,\n postProcessors: observable,\n hashCode: computed,\n });\n observe_DatasourceSpecification(metamodel.datasourceSpecification, context);\n observe_AuthenticationStrategy(metamodel.authenticationStrategy, context);\n metamodel.postProcessors.forEach((postProcessor) => {\n observe_PostProcessor(postProcessor, context);\n });\n return metamodel;\n});\n//# sourceMappingURL=STO_Relational_ObserverHelper.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 Test {\n id;\n}\nexport class AtomicTest extends Test {\n __parent;\n assertions = [];\n}\nexport class TestSuite extends Test {\n __parent;\n tests = [];\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 { hashArray } from '@finos/legend-shared';\nimport { CORE_HASH_STRUCTURE } from '../../../../../graph/Core_HashUtils.js';\nimport { AtomicTest } from '../../test/Test.js';\nexport class ServiceTest extends AtomicTest {\n serializationFormat;\n parameters = [];\n keys = [];\n get hashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.SERVICE_TEST,\n this.id,\n hashArray(this.assertions),\n hashArray(this.parameters),\n hashArray(this.keys),\n this.serializationFormat ?? '',\n ]);\n }\n}\n//# sourceMappingURL=ServiceTest.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 { AtomicTest } from '../../test/Test.js';\nexport class MappingTest extends AtomicTest {\n query;\n get hashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.MAPPING_TEST,\n this.query,\n this.id,\n hashArray(this.assertions),\n ]);\n }\n}\n//# sourceMappingURL=MappingTest.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 { TestSuite } from '../../test/Test.js';\nexport class MappingTestSuite extends TestSuite {\n storeTestDatas = [];\n get hashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.MAPPING_TEST_SUITE,\n hashArray(this.storeTestDatas),\n this.id,\n hashArray(this.tests),\n ]);\n }\n}\n//# sourceMappingURL=MappingTestSuite.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 { TestSuite } from '../../test/Test.js';\nexport class ServiceTestSuite extends TestSuite {\n testData;\n get hashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.SERVICE_TEST_SUITE,\n this.id,\n hashArray(this.tests),\n this.testData,\n ]);\n }\n}\n//# sourceMappingURL=ServiceTestSuite.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 TestAssertion {\n id;\n parentTest;\n}\n//# sourceMappingURL=TestAssertion.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, hashObjectWithoutSourceInformation, } from '../../../../../graph/Core_HashUtils.js';\nimport { TestAssertion } from './TestAssertion.js';\nexport class EqualTo extends TestAssertion {\n /**\n * Studio does not process value specification, they are left in raw JSON form\n *\n * @discrepancy model\n */\n expected;\n get hashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.EQUAL_TO,\n this.id,\n hashObjectWithoutSourceInformation(this.expected),\n ]);\n }\n accept_TestAssertionVisitor(visitor) {\n return visitor.visit_EqualTo(this);\n }\n}\n//# sourceMappingURL=EqualTo.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 { TestAssertion } from './TestAssertion.js';\nexport class EqualToJson extends TestAssertion {\n expected;\n get hashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.EQUAL_TO_JSON,\n this.id,\n this.expected,\n ]);\n }\n accept_TestAssertionVisitor(visitor) {\n return visitor.visit_EqualToJSON(this);\n }\n}\n//# sourceMappingURL=EqualToJson.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 { TestAssertion } from './TestAssertion.js';\nexport class EqualToTDS extends TestAssertion {\n expected;\n get hashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.EQUAL_TO_TDS,\n this.id,\n this.expected,\n ]);\n }\n accept_TestAssertionVisitor(visitor) {\n return visitor.visit_EqualToTDS(this);\n }\n}\n//# sourceMappingURL=EqualToTDS.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, hashObjectWithoutSourceInformation, } from '../../../../graph/Core_HashUtils.js';\nexport class EmbeddedData {\n}\nexport class DataElementReference extends EmbeddedData {\n dataElement;\n get hashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.DATA_ELEMENT_REFERENCE,\n this.dataElement.valueForSerialization ?? '',\n ]);\n }\n accept_EmbeddedDataVisitor(visitor) {\n return visitor.visit_DataElementReference(this);\n }\n}\nexport class ExternalFormatData extends EmbeddedData {\n contentType;\n data;\n get hashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.EXTERNAL_FORMAT_DATA,\n this.contentType,\n this.data,\n ]);\n }\n accept_EmbeddedDataVisitor(visitor) {\n return visitor.visit_ExternalFormatData(this);\n }\n}\nexport class ModelStoreData extends EmbeddedData {\n /**\n * Studio does not process value specification, they are left in raw JSON form\n * TODO: we may want to build out the instance `objects` once we build out the form\n *\n * @discrepancy model\n */\n instances;\n get hashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.MODEL_STORE_DATA,\n hashArray(Array.from(this.instances.keys()).map((e) => e.path)),\n hashObjectWithoutSourceInformation(Array.from(this.instances.values())),\n ]);\n }\n accept_EmbeddedDataVisitor(visitor) {\n return visitor.visit_ModelStoreData(this);\n }\n}\n//# sourceMappingURL=EmbeddedData.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 { EmbeddedData } from './EmbeddedData.js';\nexport class RelationalCSVDataTable {\n schema;\n table;\n values;\n get hashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.RELATIONAL_CSV_DATA_TABLE,\n this.schema,\n this.table,\n this.values,\n ]);\n }\n}\nexport class RelationalCSVData extends EmbeddedData {\n tables = [];\n accept_EmbeddedDataVisitor(visitor) {\n return visitor.visit_RelationalCSVData(this);\n }\n get hashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.RELATIONAL_CSV_DATA_TABLE,\n hashArray(this.tables),\n ]);\n }\n}\n//# sourceMappingURL=RelationalCSVData.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, override } from 'mobx';\nimport { ExternalFormatData, DataElementReference, ModelStoreData, } from '../../../graph/metamodel/pure/data/EmbeddedData.js';\nimport { RelationalCSVData, } from '../../../graph/metamodel/pure/data/RelationalCSVData.js';\nimport { observe_Abstract_PackageableElement, skipObserved, skipObservedWithContext, } from './CoreObserverHelper.js';\nimport { observe_StereotypeReference, observe_TaggedValue, } from './DomainObserverHelper.js';\nexport const observe_ExternalFormatData = skipObserved((metamodel) => {\n makeObservable(metamodel, {\n contentType: observable,\n data: observable,\n hashCode: computed,\n });\n return metamodel;\n});\nexport const observe_DataElementReference = skipObserved((metamodel) => {\n makeObservable(metamodel, {\n dataElement: observable,\n hashCode: computed,\n });\n return metamodel;\n});\nexport const observe_ModelStoreData = skipObserved((metamodel) => {\n makeObservable(metamodel, {\n instances: observable,\n hashCode: computed,\n });\n return metamodel;\n});\nexport const observe_RelationalDataTable = skipObserved((metamodel) => {\n makeObservable(metamodel, {\n values: observable,\n table: observable,\n schema: observable,\n hashCode: computed,\n });\n return metamodel;\n});\nconst observe_RelationalCSVData = skipObserved((metamodel) => {\n makeObservable(metamodel, {\n tables: observable,\n hashCode: computed,\n });\n metamodel.tables.forEach(observe_RelationalDataTable);\n return metamodel;\n});\nexport function observe_EmbeddedData(metamodel, context) {\n if (metamodel instanceof DataElementReference) {\n return observe_DataElementReference(metamodel);\n }\n else if (metamodel instanceof ExternalFormatData) {\n return observe_ExternalFormatData(metamodel);\n }\n else if (metamodel instanceof ModelStoreData) {\n return observe_ModelStoreData(metamodel);\n }\n else if (metamodel instanceof RelationalCSVData) {\n return observe_RelationalCSVData(metamodel);\n }\n const extraEmbeddedDataObservers = context.plugins.flatMap((plugin) => plugin.getExtraEmbeddedDataObservers?.() ?? []);\n for (const observer of extraEmbeddedDataObservers) {\n const observedEmbeddedData = observer(metamodel, context);\n if (observedEmbeddedData) {\n return observedEmbeddedData;\n }\n }\n return metamodel;\n}\nexport const observe_DataElement = skipObservedWithContext((metamodel, context) => {\n observe_Abstract_PackageableElement(metamodel);\n makeObservable(metamodel, {\n stereotypes: observable,\n taggedValues: observable,\n data: observable,\n _elementHashCode: override,\n });\n metamodel.stereotypes.forEach(observe_StereotypeReference);\n metamodel.taggedValues.forEach(observe_TaggedValue);\n observe_EmbeddedData(metamodel.data, context);\n return metamodel;\n});\n//# sourceMappingURL=DSL_Data_ObserverHelper.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 ServiceExecution {\n}\nexport class PureExecution extends ServiceExecution {\n _OWNER;\n /**\n * Studio does not process value specification, they are left in raw JSON form\n *\n * @discrepancy model\n */\n func;\n constructor(func, owner) {\n super();\n this.func = func;\n this._OWNER = owner;\n }\n get hashCode() {\n return hashArray([CORE_HASH_STRUCTURE.SERVICE_PURE_EXECUTION, this.func]);\n }\n}\nexport class PureSingleExecution extends PureExecution {\n mapping;\n runtime;\n constructor(func, owner, mapping, runtime) {\n super(func, owner);\n this.mapping = mapping;\n this.runtime = runtime;\n }\n get hashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.SERVICE_PURE_SINGLE_EXECUTION,\n super.hashCode,\n this.mapping?.valueForSerialization ?? '',\n this.runtime ?? '',\n ]);\n }\n}\nexport class KeyedExecutionParameter {\n _UUID = uuid();\n key;\n mapping;\n runtime;\n constructor(key, mapping, runtime) {\n this.key = key;\n this.mapping = mapping;\n this.runtime = runtime;\n }\n get hashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.SERVICE_KEYED_EXECUTION_PARAMETER,\n this.key,\n this.mapping.valueForSerialization ?? '',\n this.runtime,\n ]);\n }\n}\nexport class PureMultiExecution extends PureExecution {\n executionKey;\n executionParameters = [];\n constructor(executionKey, func, parentService) {\n super(func, parentService);\n this.executionKey = executionKey;\n }\n get hashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.SERVICE_PURE_MULTI_EXECUTION,\n super.hashCode,\n this.executionKey,\n hashArray(this.executionParameters),\n ]);\n }\n}\n//# sourceMappingURL=ServiceExecution.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';\n/**\n * TODO: Remove once migration from `ServiceTest_Legacy` to `ServiceTest` is complete\n * @deprecated\n */\nexport class DEPRECATED__ServiceTest {\n _OWNER;\n constructor(owner) {\n this._OWNER = owner;\n }\n}\n/**\n * TODO: Remove once migration from `ServiceTest_Legacy` to `ServiceTest` is complete\n * @deprecated\n */\nexport class DEPRECATED__TestContainer {\n _UUID = uuid();\n parametersValues = []; // Any[*]; // ValueSpecification?\n /**\n * Studio does not process value specification, they are left in raw JSON form\n *\n * @discrepancy model\n */\n assert;\n singleExecutionTestParent;\n constructor(assert, parent) {\n this.assert = assert;\n this.singleExecutionTestParent = parent;\n }\n get hashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.SERVICE_TEST_CONTAINER,\n // this.parameterValues,\n this.assert,\n ]);\n }\n}\n/**\n * TODO: Remove once migration from `ServiceTest_Legacy` to `ServiceTest` is complete\n * @deprecated\n */\nexport class DEPRECATED__SingleExecutionTest extends DEPRECATED__ServiceTest {\n data;\n asserts = [];\n constructor(owner, data) {\n super(owner);\n this.data = data;\n }\n get hashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.SERVICE_LEGACY_SINGLE_EXECUTION_TEST,\n this.data,\n hashArray(this.asserts),\n ]);\n }\n}\n/**\n * TODO: Remove once migration from `ServiceTest_Legacy` to `ServiceTest` is complete\n * @deprecated\n */\nexport class DEPRECATED__KeyedSingleExecutionTest extends DEPRECATED__SingleExecutionTest {\n key;\n constructor(key, parentService, data) {\n super(parentService, data);\n this.key = key;\n }\n get hashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.SERVICE_LEGACY_KEYED_SINGLE_EXECUTION_TEST,\n this.key,\n this.data,\n hashArray(this.asserts),\n ]);\n }\n}\n/**\n * TODO: Remove once migration from `ServiceTest_Legacy` to `ServiceTest` is complete\n * @deprecated\n */\nexport class DEPRECATED__MultiExecutionTest extends DEPRECATED__ServiceTest {\n tests = [];\n get hashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.SERVICE_LEGACY_MULTI_EXECUTION_TEST,\n hashArray(this.tests),\n ]);\n }\n}\n//# sourceMappingURL=DEPRECATED__ServiceTest.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, override } from 'mobx';\nimport { PureMultiExecution, PureSingleExecution, } from '../../../graph/metamodel/pure/packageableElements/service/ServiceExecution.js';\nimport { observe_Abstract_PackageableElement, observe_PackageableElementReference, skipObserved, skipObservedWithContext, } from './CoreObserverHelper.js';\nimport { observe_StereotypeReference, observe_TaggedValue, } from './DomainObserverHelper.js';\nimport { observe_RawLambda } from './RawValueSpecificationObserver.js';\nimport { observe_Runtime } from './DSL_Mapping_ObserverHelper.js';\nimport { observe_EmbeddedData } from './DSL_Data_ObserverHelper.js';\nimport { DEPRECATED__MultiExecutionTest, DEPRECATED__SingleExecutionTest, } from '../../../graph/metamodel/pure/packageableElements/service/DEPRECATED__ServiceTest.js';\nimport { observe_AtomicTest, observe_TestAssertion, } from './Testable_ObserverHelper.js';\nexport const observe_ConnectionTestData = skipObservedWithContext((metamodel, context) => {\n makeObservable(metamodel, {\n connectionId: observable,\n testData: observable,\n hashCode: computed,\n });\n observe_EmbeddedData(metamodel.testData, context);\n return metamodel;\n});\nexport const observe_ParameterValue = skipObserved((metamodel) => {\n makeObservable(metamodel, {\n name: observable,\n value: observable.ref,\n hashCode: computed,\n });\n return metamodel;\n});\nconst observe_PostValidationAssertion = skipObserved((metamodel) => {\n makeObservable(metamodel, {\n assertion: observable,\n hashCode: computed,\n id: observable,\n });\n observe_RawLambda(metamodel.assertion);\n return metamodel;\n});\nconst observe_PostValidation = skipObserved((metamodel) => {\n makeObservable(metamodel, {\n assertions: observable,\n description: observable,\n parameters: observable,\n hashCode: computed,\n });\n metamodel.assertions.forEach(observe_PostValidationAssertion);\n metamodel.parameters.forEach(observe_RawLambda);\n return metamodel;\n});\nexport const observe_TestData = skipObservedWithContext((metamodel, context) => {\n makeObservable(metamodel, {\n connectionsTestData: observable,\n hashCode: computed,\n });\n metamodel.connectionsTestData.forEach((connectionTestData) => observe_ConnectionTestData(connectionTestData, context));\n return metamodel;\n});\nexport const observe_ServiceTest = skipObserved((metamodel) => {\n makeObservable(metamodel, {\n id: observable,\n serializationFormat: observable,\n assertions: observable,\n parameters: observable,\n keys: observable,\n hashCode: computed,\n });\n metamodel.parameters.forEach(observe_ParameterValue);\n metamodel.assertions.forEach(observe_TestAssertion);\n return metamodel;\n});\nexport const observe_ServiceTestSuite = skipObservedWithContext((metamodel, context) => {\n makeObservable(metamodel, {\n id: observable,\n tests: observable,\n testData: observable,\n hashCode: computed,\n });\n metamodel.tests.forEach((test) => observe_AtomicTest(test, context));\n observe_TestData(metamodel.testData, context);\n return metamodel;\n});\nexport const observe_TestContainer = skipObserved((metamodel) => {\n makeObservable(metamodel, {\n parametersValues: observable,\n assert: observable,\n singleExecutionTestParent: observable,\n hashCode: computed,\n });\n observe_RawLambda(metamodel.assert);\n return metamodel;\n});\nexport const observe_SingleExecutionTest = skipObserved((metamodel) => {\n makeObservable(metamodel, {\n data: observable,\n asserts: observable,\n hashCode: computed,\n });\n metamodel.asserts.forEach(observe_TestContainer);\n return metamodel;\n});\nexport const observe_KeyedSingleExecutionTest = skipObserved((metamodel) => {\n observe_SingleExecutionTest(metamodel);\n makeObservable(metamodel, {\n key: observable,\n });\n return metamodel;\n});\nexport const observe_MultiExecutionTest = skipObserved((metamodel) => {\n makeObservable(metamodel, {\n tests: observable,\n hashCode: computed,\n });\n metamodel.tests.forEach(observe_KeyedSingleExecutionTest);\n return metamodel;\n});\nexport const observe_ServiceTest_Legacy = (metamodel) => {\n if (metamodel instanceof DEPRECATED__SingleExecutionTest) {\n return observe_SingleExecutionTest(metamodel);\n }\n else if (metamodel instanceof DEPRECATED__MultiExecutionTest) {\n return observe_MultiExecutionTest(metamodel);\n }\n return metamodel;\n};\nconst observe_Abstract_PureExecution = (metamodel) => {\n makeObservable(metamodel, {\n func: observable,\n });\n observe_RawLambda(metamodel.func);\n};\nexport const observe_PureSingleExecution = skipObservedWithContext((metamodel, context) => {\n observe_Abstract_PureExecution(metamodel);\n makeObservable(metamodel, {\n runtime: observable,\n hashCode: computed,\n });\n if (metamodel.mapping) {\n observe_PackageableElementReference(metamodel.mapping);\n }\n if (metamodel.runtime) {\n observe_Runtime(metamodel.runtime, context);\n }\n return metamodel;\n});\nexport const observe_KeyedExecutionParameter = skipObservedWithContext((metamodel, context) => {\n makeObservable(metamodel, {\n key: observable,\n runtime: observable,\n hashCode: computed,\n });\n observe_PackageableElementReference(metamodel.mapping);\n observe_Runtime(metamodel.runtime, context);\n return metamodel;\n});\nexport const observe_PureMultiExecution = skipObservedWithContext((metamodel, context) => {\n observe_Abstract_PureExecution(metamodel);\n makeObservable(metamodel, {\n executionKey: observable,\n executionParameters: observable,\n hashCode: computed,\n });\n metamodel.executionParameters.forEach((parameter) => observe_KeyedExecutionParameter(parameter, context));\n return metamodel;\n});\nexport const observe_ServiceExecution = (metamodel, context) => {\n if (metamodel instanceof PureSingleExecution) {\n return observe_PureSingleExecution(metamodel, context);\n }\n else if (metamodel instanceof PureMultiExecution) {\n return observe_PureMultiExecution(metamodel, context);\n }\n return metamodel;\n};\nexport const observe_Service = skipObservedWithContext((metamodel, context) => {\n observe_Abstract_PackageableElement(metamodel);\n makeObservable(metamodel, {\n pattern: observable,\n owners: observable,\n documentation: observable,\n autoActivateUpdates: observable,\n execution: observable,\n test: observable,\n tests: observable,\n postValidations: observable,\n patternParameters: computed,\n _elementHashCode: override,\n });\n metamodel.stereotypes.forEach(observe_StereotypeReference);\n metamodel.taggedValues.forEach(observe_TaggedValue);\n observe_ServiceExecution(metamodel.execution, context);\n if (metamodel.test) {\n observe_ServiceTest_Legacy(metamodel.test);\n }\n metamodel.tests.forEach((m) => observe_ServiceTestSuite(m, context));\n metamodel.postValidations.forEach((m) => observe_PostValidation(m));\n return metamodel;\n});\n//# sourceMappingURL=DSL_Service_ObserverHelper.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 { ServiceTest } from '../../../DSL_Service_Exports.js';\nimport { MappingTest } from '../../../graph/metamodel/pure/packageableElements/mapping/MappingTest.js';\nimport { MappingTestSuite } from '../../../graph/metamodel/pure/packageableElements/mapping/MappingTestSuite.js';\nimport { ServiceTestSuite } from '../../../graph/metamodel/pure/packageableElements/service/ServiceTestSuite.js';\nimport { EqualTo } from '../../../graph/metamodel/pure/test/assertion/EqualTo.js';\nimport { EqualToJson } from '../../../graph/metamodel/pure/test/assertion/EqualToJson.js';\nimport { EqualToTDS } from '../../../graph/metamodel/pure/test/assertion/EqualToTDS.js';\nimport { skipObserved } from './CoreObserverHelper.js';\nimport { observe_ExternalFormatData } from './DSL_Data_ObserverHelper.js';\nimport { observe_MappingTest, observe_MappingTestSuite, } from './DSL_Mapping_ObserverHelper.js';\nimport { observe_ServiceTest, observe_ServiceTestSuite, } from './DSL_Service_ObserverHelper.js';\nexport const observe_EqualTo = skipObserved((metamodel) => {\n makeObservable(metamodel, {\n id: observable,\n expected: observable,\n hashCode: computed,\n });\n return metamodel;\n});\nexport const observe_EqualToTDS = skipObserved((metamodel) => {\n makeObservable(metamodel, {\n id: observable,\n expected: observable,\n hashCode: computed,\n });\n observe_ExternalFormatData(metamodel.expected);\n return metamodel;\n});\nexport const observe_EqualToJson = skipObserved((metamodel) => {\n makeObservable(metamodel, {\n id: observable,\n expected: observable,\n hashCode: computed,\n });\n observe_ExternalFormatData(metamodel.expected);\n return metamodel;\n});\nexport function observe_AtomicTest(metamodel, context) {\n if (metamodel instanceof ServiceTest) {\n return observe_ServiceTest(metamodel);\n }\n else if (metamodel instanceof MappingTest) {\n return observe_MappingTest(metamodel);\n }\n const extraAtomicTestBuilder = context.plugins.flatMap((plugin) => plugin.getExtraAtomicTestObservers?.() ?? []);\n for (const builder of extraAtomicTestBuilder) {\n const atomicTestBuilder = builder(metamodel, context);\n if (atomicTestBuilder) {\n return atomicTestBuilder;\n }\n }\n return metamodel;\n}\nexport function observe_TestAssertion(metamodel) {\n if (metamodel instanceof EqualTo) {\n return observe_EqualTo(metamodel);\n }\n else if (metamodel instanceof EqualToJson) {\n return observe_EqualToJson(metamodel);\n }\n else if (metamodel instanceof EqualToTDS) {\n return observe_EqualToTDS(metamodel);\n }\n return metamodel;\n}\nexport function observe_TestSuite(metamodel, context) {\n if (metamodel instanceof ServiceTestSuite) {\n return observe_ServiceTestSuite(metamodel, context);\n }\n else if (metamodel instanceof MappingTestSuite) {\n return observe_MappingTestSuite(metamodel, context);\n }\n return metamodel;\n}\n//# sourceMappingURL=Testable_ObserverHelper.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, override } from 'mobx';\nimport { ExpectedOutputMappingTestAssert } from '../../../graph/metamodel/pure/packageableElements/mapping/ExpectedOutputMappingTestAssert.js';\nimport { EngineRuntime, RuntimePointer, } from '../../../graph/metamodel/pure/packageableElements/runtime/Runtime.js';\nimport { FlatDataInputData } from '../../../graph/metamodel/pure/packageableElements/store/flatData/mapping/FlatDataInputData.js';\nimport { ObjectInputData } from '../../../graph/metamodel/pure/packageableElements/store/modelToModel/mapping/ObjectInputData.js';\nimport { RelationalInputData } from '../../../graph/metamodel/pure/packageableElements/store/relational/mapping/RelationalInputData.js';\nimport { observe_Abstract_PackageableElement, observe_PackageableElementReference, skipObserved, skipObservedWithContext, } from './CoreObserverHelper.js';\nimport { observe_EnumValueReference, observe_PropertyReference, } from './DomainObserverHelper.js';\nimport { observe_RawLambda } from './RawValueSpecificationObserver.js';\nimport { observe_EmbeddedFlatDataPropertyMapping, observe_FlatDataAssociationPropertyMapping, observe_FlatDataConnection, observe_FlatDataInputData, observe_FlatDataInstanceSetImplementation, observe_FlatDataPropertyMapping, } from './STO_FlatData_ObserverHelper.js';\nimport { observe_EmbeddedRelationalInstanceSetImplementation, observe_InlineEmbeddedRelationalInstanceSetImplementation, observe_OtherwiseEmbeddedRelationalInstanceSetImplementation, observe_RelationalDatabaseConnection, observe_RelationalInputData, observe_RelationalInstanceSetImplementation, observe_RelationalPropertyMapping, observe_RootRelationalInstanceSetImplementation, } from './STO_Relational_ObserverHelper.js';\nimport { observe_AtomicTest, observe_TestAssertion, observe_TestSuite, } from './Testable_ObserverHelper.js';\nimport { observe_EmbeddedData } from './DSL_Data_ObserverHelper.js';\n// ------------------------------------- Store -------------------------------------\nexport const observe_Abstract_Store = (metamodel) => {\n observe_Abstract_PackageableElement(metamodel);\n makeObservable(metamodel, {\n includes: observable,\n });\n metamodel.includes.forEach(observe_PackageableElementReference);\n};\n// ------------------------------------- TestSuite -----------------------------------\nexport const observe_StoreTestData = skipObservedWithContext((metamodel, context) => {\n makeObservable(metamodel, {\n store: observable,\n data: observable,\n hashCode: computed,\n });\n observe_EmbeddedData(metamodel.data, context);\n return metamodel;\n});\nexport const observe_MappingTest = skipObserved((metamodel) => {\n makeObservable(metamodel, {\n id: observable,\n query: observable,\n assertions: observable,\n hashCode: computed,\n });\n metamodel.assertions.forEach(observe_TestAssertion);\n return metamodel;\n});\nexport const observe_MappingTestSuite = skipObservedWithContext((metamodel, context) => {\n makeObservable(metamodel, {\n id: observable,\n tests: observable,\n storeTestDatas: observable,\n hashCode: computed,\n });\n metamodel.tests.forEach((test) => observe_AtomicTest(test, context));\n metamodel.storeTestDatas.forEach((testData) => observe_StoreTestData(testData, context));\n return metamodel;\n});\n// ------------------------------------- Mapping -------------------------------------\nexport const observe_EnumerationMappingReference = skipObserved((metamodel) => {\n makeObservable(metamodel, {\n value: observable,\n valueForSerialization: computed,\n });\n observe_PackageableElementReference(metamodel.ownerReference);\n return metamodel;\n});\nexport const observe_SetImplementationReference = skipObserved((metamodel) => {\n makeObservable(metamodel, {\n value: observable,\n });\n observe_PackageableElementReference(metamodel.ownerReference);\n return metamodel;\n});\nexport const observe_LocalMappingPropertyInfo = skipObserved((metamodel) => {\n makeObservable(metamodel, {\n localMappingProperty: observable,\n localMappingPropertyType: observable,\n localMappingPropertyMultiplicity: observable,\n hashCode: computed,\n });\n observe_PackageableElementReference(metamodel.localMappingPropertyType);\n return metamodel;\n});\nexport const observe_Abstract_PropertyMapping = (metamodel, context) => {\n makeObservable(metamodel, {\n sourceSetImplementation: observable,\n targetSetImplementation: observable,\n });\n observe_PropertyReference(metamodel.property);\n observe_SetImplementationReference(metamodel.sourceSetImplementation);\n if (metamodel.targetSetImplementation) {\n observe_SetImplementationReference(metamodel.targetSetImplementation);\n }\n if (metamodel.localMappingProperty) {\n observe_LocalMappingPropertyInfo(metamodel.localMappingProperty);\n }\n};\nexport const observe_PurePropertyMapping = skipObservedWithContext((metamodel, context) => {\n observe_Abstract_PropertyMapping(metamodel, context);\n makeObservable(metamodel, {\n transformer: observable,\n transform: observable,\n explodeProperty: observable,\n hashCode: computed,\n });\n if (metamodel.transformer) {\n observe_EnumerationMappingReference(metamodel.transformer);\n }\n observe_RawLambda(metamodel.transform);\n return metamodel;\n});\nclass PropertyMappingObserver {\n observerContext;\n constructor(observerContext) {\n this.observerContext = observerContext;\n }\n visit_PropertyMapping(propertyMapping) {\n const extraPropertyMappingObservers = this.observerContext.plugins.flatMap((plugin) => plugin.getExtraPropertyMappingObservers?.() ?? []);\n for (const observer of extraPropertyMappingObservers) {\n const observedPropertyMapping = observer(propertyMapping, this.observerContext);\n if (observedPropertyMapping) {\n return;\n }\n }\n }\n visit_PurePropertyMapping(propertyMapping) {\n observe_PurePropertyMapping(propertyMapping, this.observerContext);\n }\n visit_FlatDataPropertyMapping(propertyMapping) {\n observe_FlatDataPropertyMapping(propertyMapping, this.observerContext);\n }\n visit_EmbeddedFlatDataPropertyMapping(propertyMapping) {\n observe_EmbeddedFlatDataPropertyMapping(propertyMapping, this.observerContext);\n }\n visit_RelationalPropertyMapping(propertyMapping) {\n observe_RelationalPropertyMapping(propertyMapping, this.observerContext);\n }\n visit_FlatDataAssociationPropertyMapping(propertyMapping) {\n observe_FlatDataAssociationPropertyMapping(propertyMapping, this.observerContext);\n }\n visit_EmbeddedRelationalPropertyMapping(propertyMapping) {\n observe_EmbeddedRelationalInstanceSetImplementation(propertyMapping, this.observerContext);\n }\n visit_InlineEmbeddedRelationalPropertyMapping(propertyMapping) {\n observe_InlineEmbeddedRelationalInstanceSetImplementation(propertyMapping, this.observerContext);\n }\n visit_OtherwiseEmbeddedRelationalPropertyMapping(propertyMapping) {\n observe_OtherwiseEmbeddedRelationalInstanceSetImplementation(propertyMapping, this.observerContext);\n }\n visit_AggregationAwarePropertyMapping(propertyMapping) {\n // TODO\n }\n visit_XStorePropertyMapping(propertyMapping) {\n // TODO\n }\n}\nexport const observe_PropertyMapping = (metamodel, context) => {\n metamodel.accept_PropertyMappingVisitor(new PropertyMappingObserver(context));\n return metamodel;\n};\nexport const observe_InferableMappingElementIdValue = skipObserved((metamodel) => makeObservable(metamodel, {\n isDefault: computed,\n valueForSerialization: computed,\n}));\nexport const observe_InferableMappingElementRoot = skipObserved((metamodel) => makeObservable(metamodel, {\n valueForSerialization: computed,\n}));\nconst observe_Abstract_SetImplementation = (metamodel) => {\n makeObservable(metamodel, {\n root: observable,\n });\n observe_PackageableElementReference(metamodel.class);\n observe_InferableMappingElementIdValue(metamodel.id);\n observe_InferableMappingElementRoot(metamodel.root);\n};\nconst observe_MappingClass = skipObserved((metamodel) => {\n makeObservable(metamodel, {\n setImplementation: observable,\n class: observable,\n properties: observable,\n });\n // TODO\n return metamodel;\n});\nexport const observe_Abstract_InstanceSetImplementation = (metamodel, context) => {\n observe_Abstract_SetImplementation(metamodel);\n makeObservable(metamodel, {\n mappingClass: observable,\n propertyMappings: observable,\n });\n if (metamodel.mappingClass) {\n observe_MappingClass(metamodel.mappingClass);\n }\n metamodel.propertyMappings.forEach((propertyMapping) => observe_PropertyMapping(propertyMapping, context));\n};\nexport const observe_SetImplementationContainer = skipObserved((metamodel) => {\n makeObservable(metamodel, {});\n observe_SetImplementationReference(metamodel.setImplementation);\n return metamodel;\n});\nexport const observe_Abstract_OperationSetImplementation = (metamodel) => {\n observe_Abstract_SetImplementation(metamodel);\n makeObservable(metamodel, {\n parameters: observable,\n operation: observable,\n hashCode: computed,\n });\n metamodel.parameters.forEach(observe_SetImplementationContainer);\n};\nexport const observe_OperationSetImplementation = skipObserved((metamodel) => {\n observe_Abstract_OperationSetImplementation(metamodel);\n return metamodel;\n});\nexport const observe_MergeOperationSetImplementation = skipObserved((metamodel) => {\n observe_Abstract_OperationSetImplementation(metamodel);\n makeObservable(metamodel, {\n validationFunction: observable,\n });\n observe_RawLambda(metamodel.validationFunction);\n return metamodel;\n});\nexport const observe_PureInstanceSetImplementation = skipObservedWithContext((metamodel, context) => {\n observe_Abstract_InstanceSetImplementation(metamodel, context);\n makeObservable(metamodel, {\n filter: observable,\n hashCode: computed,\n });\n if (metamodel.srcClass) {\n observe_PackageableElementReference(metamodel.srcClass);\n }\n if (metamodel.filter) {\n observe_RawLambda(metamodel.filter);\n }\n return metamodel;\n});\nclass SetImplementationObserver {\n observerContext;\n constructor(observerContext) {\n this.observerContext = observerContext;\n }\n visit_SetImplementation(setImplementation) {\n const extraObservers = this.observerContext.plugins.flatMap((plugin) => plugin.getExtraSetImplementationObservers?.() ?? []);\n for (const observer of extraObservers) {\n const observedSetImplementation = observer(setImplementation, this.observerContext);\n if (observedSetImplementation) {\n return;\n }\n }\n }\n visit_MergeOperationSetImplementation(setImplementation) {\n observe_MergeOperationSetImplementation(setImplementation);\n }\n visit_OperationSetImplementation(setImplementation) {\n observe_OperationSetImplementation(setImplementation);\n }\n visit_PureInstanceSetImplementation(setImplementation) {\n observe_PureInstanceSetImplementation(setImplementation, this.observerContext);\n }\n visit_FlatDataInstanceSetImplementation(setImplementation) {\n observe_FlatDataInstanceSetImplementation(setImplementation, this.observerContext);\n }\n visit_EmbeddedFlatDataSetImplementation(setImplementation) {\n return;\n }\n visit_RelationalInstanceSetImplementation(setImplementation) {\n observe_RelationalInstanceSetImplementation(setImplementation, this.observerContext);\n }\n visit_RootRelationalInstanceSetImplementation(setImplementation) {\n observe_RootRelationalInstanceSetImplementation(setImplementation, this.observerContext);\n }\n visit_AggregationAwareSetImplementation(setImplementation) {\n // TODO\n }\n visit_TEMPORARY__UnresolvedSetImplementation(setImplementation) {\n return;\n }\n}\nexport const observe_SetImplementation = (metamodel, context) => {\n metamodel.accept_SetImplementationVisitor(new SetImplementationObserver(context));\n return metamodel;\n};\nexport const observe_SubstituteStore = skipObserved((metamodel) => {\n makeObservable(metamodel, {\n original: observable,\n substitute: observable,\n });\n observe_PackageableElementReference(metamodel.original);\n observe_PackageableElementReference(metamodel.substitute);\n return metamodel;\n});\nexport const observe_MappingInclude = skipObserved((metamodel) => {\n makeObservable(metamodel, {\n included: observable,\n storeSubstitutions: observable,\n });\n observe_PackageableElementReference(metamodel.included);\n metamodel.storeSubstitutions.forEach(observe_SubstituteStore);\n return metamodel;\n});\nexport const observe_SourceValue = skipObserved((metamodel) => makeObservable(metamodel, {\n value: observable,\n}));\nexport const observe_EnumValueMapping = skipObserved((metamodel) => {\n makeObservable(metamodel, {\n sourceValues: observable,\n hashCode: computed,\n });\n observe_EnumValueReference(metamodel.enum);\n metamodel.sourceValues.forEach(observe_SourceValue);\n return metamodel;\n});\nexport const observe_EnumerationMapping = skipObserved((metamodel) => {\n makeObservable(metamodel, {\n sourceType: observable,\n enumValueMappings: observable,\n hashCode: computed,\n });\n observe_PackageableElementReference(metamodel.enumeration);\n observe_InferableMappingElementIdValue(metamodel.id);\n if (metamodel.sourceType) {\n observe_PackageableElementReference(metamodel.sourceType);\n }\n metamodel.enumValueMappings.forEach(observe_EnumValueMapping);\n return metamodel;\n});\nexport const observe_AssociationImplementation = skipObservedWithContext((metamodel, context) => {\n makeObservable(metamodel, {\n id: observable,\n stores: observable,\n propertyMappings: observable,\n hashCode: computed,\n });\n observe_PackageableElementReference(metamodel.association);\n observe_InferableMappingElementIdValue(metamodel.id);\n metamodel.stores.forEach(observe_PackageableElementReference);\n metamodel.propertyMappings.forEach((propertyMapping) => observe_PropertyMapping(propertyMapping, context));\n return metamodel;\n});\nexport const observe_ObjectInputData = skipObserved((metamodel) => {\n makeObservable(metamodel, {\n inputType: observable,\n data: observable,\n hashCode: computed,\n });\n observe_PackageableElementReference(metamodel.sourceClass);\n return metamodel;\n});\nexport const observe_InputData = (metamodel, context) => {\n if (metamodel instanceof ObjectInputData) {\n return observe_ObjectInputData(metamodel);\n }\n else if (metamodel instanceof FlatDataInputData) {\n return observe_FlatDataInputData(metamodel);\n }\n else if (metamodel instanceof RelationalInputData) {\n return observe_RelationalInputData(metamodel);\n }\n const extraObservers = context.plugins.flatMap((plugin) => plugin.getExtraMappingTestInputDataObservers?.() ?? []);\n for (const observer of extraObservers) {\n const observed = observer(metamodel, context);\n if (observed) {\n return observed;\n }\n }\n return metamodel;\n};\nexport const observe_ExpectedOutputMappingTestAssert = skipObserved((metamodel) => makeObservable(metamodel, {\n expectedOutput: observable,\n hashCode: computed,\n}));\nexport const observe_MappingTestAssert = (metamodel, context) => {\n if (metamodel instanceof ExpectedOutputMappingTestAssert) {\n return observe_ExpectedOutputMappingTestAssert(metamodel);\n }\n return metamodel;\n};\nexport const observe_MappingTest_Legacy = skipObservedWithContext((metamodel, context) => {\n makeObservable(metamodel, {\n name: observable,\n query: observable,\n inputData: observable,\n assert: observable,\n hashCode: computed,\n });\n observe_RawLambda(metamodel.query);\n metamodel.inputData.forEach((inputData) => observe_InputData(inputData, context));\n observe_MappingTestAssert(metamodel.assert, context);\n return metamodel;\n});\nexport const observe_Mapping = skipObservedWithContext((metamodel, context) => {\n observe_Abstract_PackageableElement(metamodel);\n makeObservable(metamodel, {\n includes: observable,\n classMappings: observable,\n enumerationMappings: observable,\n associationMappings: observable,\n test: observable,\n tests: observable,\n _elementHashCode: override,\n });\n metamodel.includes.forEach(observe_MappingInclude);\n metamodel.classMappings.forEach((classMapping) => observe_SetImplementation(classMapping, context));\n metamodel.enumerationMappings.forEach(observe_EnumerationMapping);\n metamodel.associationMappings.forEach((associationMapping) => observe_AssociationImplementation(associationMapping, context));\n metamodel.test.forEach((t) => observe_MappingTest_Legacy(t, context));\n metamodel.tests.forEach((testSuite) => observe_TestSuite(testSuite, context));\n return metamodel;\n});\n// ------------------------------------- Connection -------------------------------------\nexport const observe_Abstract_Connection = (metamodel) => {\n makeObservable(metamodel, {\n store: observable,\n });\n observe_PackageableElementReference(metamodel.store);\n};\nexport const observe_ConnectionPointer = skipObserved((metamodel) => {\n observe_Abstract_Connection(metamodel);\n makeObservable(metamodel, {\n hashCode: computed,\n });\n return metamodel;\n});\nexport const observe_JsonModelConnection = skipObserved((metamodel) => {\n observe_Abstract_Connection(metamodel);\n makeObservable(metamodel, {\n url: observable,\n hashCode: computed,\n });\n observe_PackageableElementReference(metamodel.class);\n return metamodel;\n});\nexport const observe_XmlModelConnection = skipObserved((metamodel) => {\n observe_Abstract_Connection(metamodel);\n makeObservable(metamodel, {\n url: observable,\n hashCode: computed,\n });\n observe_PackageableElementReference(metamodel.class);\n return metamodel;\n});\nexport const observe_ModelChainConnection = skipObserved((metamodel) => {\n observe_Abstract_Connection(metamodel);\n makeObservable(metamodel, { mappings: observable, hashCode: computed });\n metamodel.mappings.forEach(observe_PackageableElementReference);\n return metamodel;\n});\nclass ConnectionObserver {\n observerContext;\n constructor(observerContext) {\n this.observerContext = observerContext;\n }\n visit_Connection(connection) {\n const extraObservers = this.observerContext.plugins.flatMap((plugin) => plugin.getExtraConnectionObservers?.() ?? []);\n for (const observer of extraObservers) {\n const observedConnection = observer(connection, this.observerContext);\n if (observedConnection) {\n return;\n }\n }\n }\n visit_ConnectionPointer(connection) {\n observe_ConnectionPointer(connection);\n }\n visit_ModelChainConnection(connection) {\n observe_ModelChainConnection(connection);\n }\n visit_JsonModelConnection(connection) {\n observe_JsonModelConnection(connection);\n }\n visit_XmlModelConnection(connection) {\n observe_XmlModelConnection(connection);\n }\n visit_FlatDataConnection(connection) {\n observe_FlatDataConnection(connection);\n }\n visit_RelationalDatabaseConnection(connection) {\n observe_RelationalDatabaseConnection(connection, this.observerContext);\n }\n}\nexport const observe_Connection = (metamodel, context) => {\n metamodel.accept_ConnectionVisitor(new ConnectionObserver(context));\n return metamodel;\n};\nexport const observe_PackageableConnection = skipObservedWithContext((metamodel, context) => {\n observe_Abstract_PackageableElement(metamodel);\n makeObservable(metamodel, {\n connectionValue: observable,\n _elementHashCode: override,\n });\n observe_Connection(metamodel.connectionValue, context);\n return metamodel;\n});\n// ------------------------------------- Runtime -------------------------------------\nexport const observe_IdentifiedConnection = skipObservedWithContext((metamodel, context) => {\n makeObservable(metamodel, {\n id: observable,\n connection: observable,\n hashCode: computed,\n });\n observe_Connection(metamodel.connection, context);\n return metamodel;\n});\nexport const observe_StoreConnections = skipObservedWithContext((metamodel, context) => {\n makeObservable(metamodel, {\n storeConnections: observable,\n hashCode: computed,\n });\n observe_PackageableElementReference(metamodel.store);\n metamodel.storeConnections.forEach((connection) => observe_IdentifiedConnection(connection, context));\n return metamodel;\n});\nexport const observe_EngineRuntime = skipObservedWithContext((metamodel, context) => {\n makeObservable(metamodel, {\n mappings: observable,\n connections: observable,\n hashCode: computed,\n });\n metamodel.mappings.forEach(observe_PackageableElementReference);\n metamodel.connections.forEach((storeConnections) => observe_StoreConnections(storeConnections, context));\n return metamodel;\n});\nexport const observe_RuntimePointer = skipObserved((metamodel) => {\n makeObservable(metamodel, {\n hashCode: computed,\n });\n observe_PackageableElementReference(metamodel.packageableRuntime);\n return metamodel;\n});\nexport const observe_Runtime = (metamodel, context) => {\n if (metamodel instanceof RuntimePointer) {\n return observe_RuntimePointer(metamodel);\n }\n else if (metamodel instanceof EngineRuntime) {\n return observe_EngineRuntime(metamodel, context);\n }\n return metamodel;\n};\nexport const observe_PackageableRuntime = skipObservedWithContext((metamodel, context) => {\n observe_Abstract_PackageableElement(metamodel);\n makeObservable(metamodel, {\n runtimeValue: observable,\n _elementHashCode: override,\n });\n observe_EngineRuntime(metamodel.runtimeValue, context);\n return metamodel;\n});\n//# sourceMappingURL=DSL_Mapping_ObserverHelper.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 { observe_Association, observe_Class, observe_ConcreteFunctionDefinition, observe_Enumeration, observe_Measure, observe_Package, observe_Profile, observe_SectionIndex, } from './DomainObserverHelper.js';\nimport { skipObservedWithContext, } from './CoreObserverHelper.js';\nimport { observe_FileGenerationSpecification, observe_GenerationSpecification, } from './DSL_Generation_ObserverHelper.js';\nimport { observe_Mapping, observe_PackageableConnection, observe_PackageableRuntime, } from './DSL_Mapping_ObserverHelper.js';\nimport { observe_Service } from './DSL_Service_ObserverHelper.js';\nimport { observe_FlatData } from './STO_FlatData_ObserverHelper.js';\nimport { observe_Database } from './STO_Relational_ObserverHelper.js';\nimport { observe_DataElement } from './DSL_Data_ObserverHelper.js';\nclass PackageableElementObserver {\n observerContext;\n constructor(observerContext) {\n this.observerContext = observerContext;\n }\n visit_PackageableElement(element) {\n const extraElementObservers = this.observerContext.plugins.flatMap((plugin) => plugin.getExtraElementObservers?.() ?? []);\n for (const observer of extraElementObservers) {\n const observedElement = observer(element, this.observerContext);\n if (observedElement) {\n return;\n }\n }\n }\n visit_Package(element) {\n observe_Package(element, this.observerContext);\n }\n visit_SectionIndex(element) {\n observe_SectionIndex(element);\n }\n visit_PrimitiveType(element) {\n return;\n }\n visit_Profile(element) {\n observe_Profile(element);\n }\n visit_Enumeration(element) {\n observe_Enumeration(element);\n }\n visit_Measure(element) {\n observe_Measure(element);\n }\n visit_Class(element) {\n observe_Class(element);\n }\n visit_Association(element) {\n observe_Association(element);\n }\n visit_ConcreteFunctionDefinition(element) {\n observe_ConcreteFunctionDefinition(element);\n }\n visit_FlatData(element) {\n observe_FlatData(element);\n }\n visit_Database(element) {\n observe_Database(element, this.observerContext);\n }\n visit_Mapping(element) {\n observe_Mapping(element, this.observerContext);\n }\n visit_Service(element) {\n observe_Service(element, this.observerContext);\n }\n visit_PackageableRuntime(element) {\n observe_PackageableRuntime(element, this.observerContext);\n }\n visit_PackageableConnection(element) {\n observe_PackageableConnection(element, this.observerContext);\n }\n visit_FileGenerationSpecification(element) {\n observe_FileGenerationSpecification(element);\n }\n visit_GenerationSpecification(element) {\n observe_GenerationSpecification(element);\n }\n visit_DataElement(element) {\n observe_DataElement(element, this.observerContext);\n }\n}\nexport const observe_PackageableElement = skipObservedWithContext((packageableElement, context) => {\n packageableElement.accept_PackageableElementVisitor(new PackageableElementObserver(context));\n return packageableElement;\n});\n//# sourceMappingURL=PackageableElementObserver.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 { promisify } from '@finos/legend-shared';\nimport { computed, isObservable, makeObservable, observable, override, } from 'mobx';\nimport { Class } from '../../../graph/metamodel/pure/packageableElements/domain/Class.js';\nimport { Enumeration } from '../../../graph/metamodel/pure/packageableElements/domain/Enumeration.js';\nimport { Measure, Unit, } from '../../../graph/metamodel/pure/packageableElements/domain/Measure.js';\nimport { Package } from '../../../graph/metamodel/pure/packageableElements/domain/Package.js';\nimport { DefaultCodeSection, ImportAwareCodeSection, } from '../../../graph/metamodel/pure/packageableElements/section/Section.js';\nimport { observe_Abstract_PackageableElement, observe_PackageableElementReference, skipObserved, skipObservedWithContext, } from './CoreObserverHelper.js';\nimport { observe_PackageableElement } from './PackageableElementObserver.js';\nimport { observe_RawLambda, observe_RawVariableExpression, } from './RawValueSpecificationObserver.js';\nconst _observe_Abstract_Package = (metamodel) => {\n observe_Abstract_PackageableElement(metamodel);\n makeObservable(metamodel, {\n children: observable,\n hashCode: override,\n });\n};\n/**\n * NOTE: here we try to be consistent by recrusively going down the package tree\n * and observe all descendents.\n */\nexport const observe_Package = skipObservedWithContext((metamodel, context) => {\n _observe_Abstract_Package(metamodel);\n metamodel.children.forEach((child) => {\n if (child instanceof Package) {\n observe_Package(child, context);\n }\n else {\n observe_PackageableElement(child, context);\n }\n });\n return metamodel;\n});\nexport const observe_PackageTree = async (metamodel, context) => {\n if (isObservable(metamodel)) {\n return metamodel;\n }\n _observe_Abstract_Package(metamodel);\n await Promise.all(metamodel.children.map(async (child) => {\n if (child instanceof Package) {\n await observe_PackageTree(child, context);\n }\n else {\n await promisify(() => observe_PackageableElement(child, context));\n }\n }));\n return metamodel;\n};\nexport const observe_StereotypeReference = skipObserved((metamodel) => {\n makeObservable(metamodel, {\n value: observable,\n pointerHashCode: computed,\n });\n observe_PackageableElementReference(metamodel.ownerReference);\n return metamodel;\n});\nexport const observe_TagReference = skipObserved((metamodel) => {\n makeObservable(metamodel, {\n value: observable,\n pointerHashCode: computed,\n });\n return metamodel;\n});\nexport const observe_TaggedValue = skipObserved((metamodel) => {\n makeObservable(metamodel, {\n value: observable,\n hashCode: computed,\n });\n observe_TagReference(metamodel.tag);\n return metamodel;\n});\nexport const observe_GenericType = skipObserved((metamodel) => makeObservable(metamodel, {\n rawType: observable,\n}));\nexport const observe_GenericTypeReference = skipObserved((metamodel) => {\n makeObservable(metamodel, {\n value: observable,\n });\n observe_GenericType(metamodel.value);\n observe_PackageableElementReference(metamodel.ownerReference);\n return metamodel;\n});\n// ------------------------------------- Section Index -------------------------------------\nexport const observe_Section = skipObserved((metamodel) => {\n makeObservable(metamodel, {\n parserName: observable,\n elements: observable,\n });\n if (metamodel instanceof ImportAwareCodeSection) {\n makeObservable(metamodel, {\n imports: observable,\n hashCode: computed,\n });\n }\n else if (metamodel instanceof DefaultCodeSection) {\n makeObservable(metamodel, {\n hashCode: computed,\n });\n }\n return metamodel;\n});\nexport const observe_SectionIndex = skipObserved((metamodel) => {\n observe_Abstract_PackageableElement(metamodel);\n makeObservable(metamodel, {\n sections: observable,\n _elementHashCode: override,\n });\n metamodel.sections.forEach(observe_Section);\n return metamodel;\n});\n// ------------------------------------- Profile -------------------------------------\nexport const observe_Stereotype = skipObserved((metamodel) => makeObservable(metamodel, {\n value: observable,\n}));\nexport const observe_Tag = skipObserved((metamodel) => makeObservable(metamodel, {\n value: observable,\n}));\nexport const observe_Profile = skipObserved((metamodel) => {\n observe_Abstract_PackageableElement(metamodel);\n makeObservable(metamodel, {\n p_stereotypes: observable,\n p_tags: observable,\n _elementHashCode: override,\n });\n metamodel.p_stereotypes.forEach(observe_Stereotype);\n metamodel.p_tags.forEach(observe_Tag);\n return metamodel;\n});\n// ------------------------------------- Enumeration -------------------------------------\nexport const observe_Enum = skipObserved((metamodel) => {\n makeObservable(metamodel, {\n name: observable,\n stereotypes: observable,\n taggedValues: observable,\n hashCode: computed,\n });\n metamodel.stereotypes.forEach(observe_StereotypeReference);\n metamodel.taggedValues.forEach(observe_TaggedValue);\n return metamodel;\n});\nexport const observe_EnumValueReference = skipObserved((metamodel) => {\n makeObservable(metamodel, {\n value: observable,\n });\n observe_PackageableElementReference(metamodel.ownerReference);\n return metamodel;\n});\nexport const observe_Enumeration = skipObserved((metamodel) => {\n observe_Abstract_PackageableElement(metamodel);\n makeObservable(metamodel, {\n values: observable,\n stereotypes: observable,\n taggedValues: observable,\n _elementHashCode: override,\n });\n metamodel.values.forEach(observe_Enum);\n metamodel.stereotypes.forEach(observe_StereotypeReference);\n metamodel.taggedValues.forEach(observe_TaggedValue);\n return metamodel;\n});\n// ------------------------------------- Measure -------------------------------------\nexport const observe_Unit = skipObserved((metamodel) => {\n makeObservable(metamodel, {\n measure: observable,\n conversionFunction: observable,\n hashCode: computed,\n });\n if (metamodel.conversionFunction) {\n observe_RawLambda(metamodel.conversionFunction);\n }\n return metamodel;\n});\nexport const observe_Measure = skipObserved((metamodel) => {\n observe_Abstract_PackageableElement(metamodel);\n makeObservable(metamodel, {\n canonicalUnit: observable,\n nonCanonicalUnits: observable,\n _elementHashCode: override,\n });\n if (metamodel.canonicalUnit) {\n observe_Unit(metamodel.canonicalUnit);\n }\n metamodel.nonCanonicalUnits.forEach(observe_Unit);\n return metamodel;\n});\n// ------------------------------------- Class -------------------------------------\nexport const observe_Property = skipObserved((metamodel) => {\n makeObservable(metamodel, {\n name: observable,\n multiplicity: observable,\n stereotypes: observable,\n taggedValues: observable,\n hashCode: computed,\n });\n observe_GenericTypeReference(metamodel.genericType);\n metamodel.stereotypes.forEach(observe_StereotypeReference);\n metamodel.taggedValues.forEach(observe_TaggedValue);\n return metamodel;\n});\nexport const observe_DerivedProperty = skipObserved((metamodel) => {\n makeObservable(metamodel, {\n name: observable,\n multiplicity: observable,\n stereotypes: observable,\n taggedValues: observable,\n body: observable.ref,\n parameters: observable.ref,\n hashCode: computed,\n });\n observe_GenericTypeReference(metamodel.genericType);\n metamodel.stereotypes.forEach(observe_StereotypeReference);\n metamodel.taggedValues.forEach(observe_TaggedValue);\n return metamodel;\n});\nexport const observe_PropertyReference = skipObserved((metamodel) => {\n makeObservable(metamodel, {\n value: observable,\n pointerHashCode: computed,\n });\n observe_PackageableElementReference(metamodel.ownerReference);\n return metamodel;\n});\nexport const observe_Constraint = skipObserved((metamodel) => {\n makeObservable(metamodel, {\n name: observable,\n functionDefinition: observable,\n externalId: observable,\n enforcementLevel: observable,\n messageFunction: observable,\n hashCode: computed,\n });\n observe_RawLambda(metamodel.functionDefinition);\n if (metamodel.messageFunction) {\n observe_RawLambda(metamodel.messageFunction);\n }\n return metamodel;\n});\nexport const observe_Class = skipObserved((metamodel) => {\n observe_Abstract_PackageableElement(metamodel);\n makeObservable(metamodel, {\n _subclasses: observable,\n properties: observable,\n propertiesFromAssociations: observable,\n derivedProperties: observable,\n generalizations: observable,\n constraints: observable,\n stereotypes: observable,\n taggedValues: observable,\n dispose: override,\n _elementHashCode: override,\n });\n metamodel.properties.forEach(observe_Property);\n metamodel.propertiesFromAssociations.forEach(observe_Property);\n metamodel.derivedProperties.forEach(observe_DerivedProperty);\n metamodel.generalizations.forEach(observe_GenericTypeReference);\n metamodel.constraints.forEach(observe_Constraint);\n metamodel.stereotypes.forEach(observe_StereotypeReference);\n metamodel.taggedValues.forEach(observe_TaggedValue);\n return metamodel;\n});\n// ------------------------------------- Association -------------------------------------\nexport const observe_Association = skipObserved((metamodel) => {\n observe_Abstract_PackageableElement(metamodel);\n makeObservable(metamodel, {\n properties: observable,\n stereotypes: observable,\n taggedValues: observable,\n derivedProperties: observable,\n _elementHashCode: override,\n });\n metamodel.properties.forEach(observe_Property);\n metamodel.derivedProperties.forEach(observe_DerivedProperty);\n metamodel.stereotypes.forEach(observe_StereotypeReference);\n metamodel.taggedValues.forEach(observe_TaggedValue);\n return metamodel;\n});\n// ------------------------------------- Function -------------------------------------\nexport const observe_ConcreteFunctionDefinition = skipObserved((metamodel) => {\n observe_Abstract_PackageableElement(metamodel);\n makeObservable(metamodel, {\n functionName: observable,\n returnMultiplicity: observable,\n parameters: observable.shallow,\n expressionSequence: observable.ref,\n stereotypes: observable,\n taggedValues: observable,\n _elementHashCode: override,\n });\n metamodel.parameters.forEach(observe_RawVariableExpression);\n observe_PackageableElementReference(metamodel.returnType);\n metamodel.stereotypes.forEach(observe_StereotypeReference);\n metamodel.taggedValues.forEach(observe_TaggedValue);\n return metamodel;\n});\n// ------------------------------------- Type -------------------------------------\nexport const observe_Type = skipObserved((metamodel) => {\n if (metamodel instanceof Enumeration) {\n return observe_Enumeration(metamodel);\n }\n else if (metamodel instanceof Unit) {\n return observe_Unit(metamodel);\n }\n else if (metamodel instanceof Class) {\n return observe_Class(metamodel);\n }\n else if (metamodel instanceof Measure) {\n return observe_Measure(metamodel);\n }\n return metamodel;\n});\nexport const observe_DataType = skipObserved((metamodel) => {\n if (metamodel instanceof Enumeration) {\n return observe_Enumeration(metamodel);\n }\n else if (metamodel instanceof Unit) {\n return observe_Unit(metamodel);\n }\n return metamodel;\n});\n//# sourceMappingURL=DomainObserverHelper.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 { observe_Abstract_PackageableElement, observe_PackageableElementReference, observe_PropertyReference, skipObserved, } from '@finos/legend-graph';\nimport { computed, makeObservable, observable, override } from 'mobx';\nexport const observe_PositionedRectangle = skipObserved((metamodel) => makeObservable(metamodel, {\n _dummyObservable: observable,\n}));\nexport const observe_ClassViewReference = skipObserved((metamodel) => {\n makeObservable(metamodel, {\n value: observable,\n });\n observe_PackageableElementReference(metamodel.ownerReference);\n return metamodel;\n});\nexport const observe_ClassView = skipObserved((metamodel) => {\n observe_PositionedRectangle(metamodel);\n makeObservable(metamodel, {\n id: observable,\n hideProperties: observable,\n hideTaggedValues: observable,\n hideStereotypes: observable,\n hashCode: computed,\n });\n observe_PackageableElementReference(metamodel.class);\n return metamodel;\n});\nexport const observe_RelationShipEdgeView = skipObserved((metamodel) => {\n observe_ClassViewReference(metamodel.classView);\n return metamodel;\n});\nexport const observe_RelationshipView = skipObserved((metamodel) => {\n makeObservable(metamodel, {\n // NOTE: to optimize performance for diagram, we have made classview's position and rectangle non-observable\n // if we want to further optimize, perhaps we can also remove observability from path\n path: observable,\n pathForSerialization: computed,\n });\n observe_RelationShipEdgeView(metamodel.from);\n observe_RelationShipEdgeView(metamodel.to);\n return metamodel;\n});\nexport const observe_GeneralizationView = skipObserved((metamodel) => {\n observe_RelationshipView(metamodel);\n makeObservable(metamodel, {\n hashCode: computed,\n });\n return metamodel;\n});\nexport const observe_AssociationView = skipObserved((metamodel) => {\n observe_RelationshipView(metamodel);\n makeObservable(metamodel, {\n hashCode: computed,\n });\n observe_PropertyReference(metamodel.property);\n observe_PackageableElementReference(metamodel.association);\n return metamodel;\n});\nexport const observe_PropertyView = skipObserved((metamodel) => {\n observe_RelationshipView(metamodel);\n makeObservable(metamodel, {\n hashCode: computed,\n });\n observe_PropertyReference(metamodel.property);\n return metamodel;\n});\nexport const observe_Diagram = skipObserved((metamodel) => {\n observe_Abstract_PackageableElement(metamodel);\n makeObservable(metamodel, {\n classViews: observable,\n associationViews: observable,\n generalizationViews: observable,\n propertyViews: observable,\n _elementHashCode: override,\n });\n metamodel.classViews.forEach(observe_ClassView);\n metamodel.associationViews.forEach(observe_AssociationView);\n metamodel.generalizationViews.forEach(observe_GeneralizationView);\n metamodel.propertyViews.forEach(observe_PropertyView);\n return metamodel;\n});\n//# sourceMappingURL=DSL_Diagram_ObserverHelper.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 || (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 packageJson from '../../package.json';\nimport { PureGraphManagerPlugin, } from '@finos/legend-graph';\nimport { observe_Diagram } from './action/changeDetection/DSL_Diagram_ObserverHelper.js';\nimport { Diagram } from '../graph/metamodel/pure/packageableElements/diagram/DSL_Diagram_Diagram.js';\nexport const PURE_GRAMMAR_DIAGRAM_PARSER_NAME = 'Diagram';\nexport const PURE_GRAMMAR_DIAGRAM_ELEMENT_TYPE_LABEL = 'Diagram';\nexport class DSL_Diagram_PureGraphManagerPlugin extends PureGraphManagerPlugin {\n constructor() {\n super(packageJson.extensions.pureGraphManagerPlugin, packageJson.version);\n }\n getExtraPureGrammarParserNames() {\n return [PURE_GRAMMAR_DIAGRAM_PARSER_NAME];\n }\n getExtraPureGrammarKeywords() {\n return [PURE_GRAMMAR_DIAGRAM_ELEMENT_TYPE_LABEL];\n }\n getExtraPureGrammarElementLabelers() {\n return [\n (element) => {\n if (element instanceof Diagram) {\n return PURE_GRAMMAR_DIAGRAM_ELEMENT_TYPE_LABEL;\n }\n return undefined;\n },\n ];\n }\n getExtraElementObservers() {\n return [\n (element, context) => {\n if (element instanceof Diagram) {\n return observe_Diagram(element);\n }\n return undefined;\n },\n ];\n }\n}\n//# sourceMappingURL=DSL_Diagram_PureGraphManagerPlugin.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 { ELEMENT_PATH_DELIMITER } from '../../../../../../graph/MetaModelConst.js';\nexport class V1_PackageableElement {\n package;\n name;\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}${ELEMENT_PATH_DELIMITER}${this.name}`;\n }\n get hashCode() {\n return hashArray([CORE_HASH_STRUCTURE.PACKAGEABLE_ELEMENT, this.path]);\n }\n}\nexport class V1_PackageableElementPointer {\n type;\n path;\n constructor(type, path) {\n this.type = type;\n this.path = path;\n }\n get hashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.PACKAGEABLE_ELEMENT_POINTER,\n this.type,\n this.path,\n ]);\n }\n}\n//# sourceMappingURL=V1_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 */\nimport { hashArray } from '@finos/legend-shared';\nimport { V1_PackageableElement, } from '@finos/legend-graph';\nimport { DIAGRAM_HASH_STRUCTURE } from '../../../../../../../graph/DSL_Diagram_HashUtils.js';\nexport class V1_Diagram extends V1_PackageableElement {\n classViews = [];\n propertyViews = [];\n generalizationViews = [];\n get hashCode() {\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=V1_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 '../../../../../../../../graph/DSL_Diagram_HashUtils.js';\nexport class V1_PositionedRectangle {\n rectangle;\n position;\n get hashCode() {\n return hashArray([\n DIAGRAM_HASH_STRUCTURE.POSITIONED_RECTANGLE,\n this.position,\n this.rectangle,\n ]);\n }\n}\n//# sourceMappingURL=V1_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 { V1_PositionedRectangle } from './geometry/V1_DSL_Diagram_PositionedRectangle.js';\nimport { DIAGRAM_HASH_STRUCTURE } from '../../../../../../../graph/DSL_Diagram_HashUtils.js';\nexport class V1_ClassView extends V1_PositionedRectangle {\n id;\n class;\n hideProperties;\n hideTaggedValues;\n hideStereotypes;\n get hashCode() {\n return hashArray([\n DIAGRAM_HASH_STRUCTURE.CLASS_VIEW,\n super.hashCode,\n this.id,\n this.class,\n this.hideProperties?.toString() ?? '',\n this.hideTaggedValues?.toString() ?? '',\n this.hideStereotypes?.toString() ?? '',\n ]);\n }\n}\n//# sourceMappingURL=V1_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 */\nimport { hashArray } from '@finos/legend-shared';\nimport { DIAGRAM_HASH_STRUCTURE } from '../../../../../../../../graph/DSL_Diagram_HashUtils.js';\nexport class V1_Point {\n x;\n y;\n get hashCode() {\n return hashArray([\n DIAGRAM_HASH_STRUCTURE.POINT,\n this.x.toString(),\n this.y.toString(),\n ]);\n }\n}\n//# sourceMappingURL=V1_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 '../../../../../../../../graph/DSL_Diagram_HashUtils.js';\nexport class V1_Rectangle {\n width;\n height;\n get hashCode() {\n return hashArray([\n DIAGRAM_HASH_STRUCTURE.RECTANGLE,\n this.width.toString(),\n this.height.toString(),\n ]);\n }\n}\n//# sourceMappingURL=V1_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 */\nexport class V1_Line {\n points = [];\n}\n//# sourceMappingURL=V1_DSL_Diagram_Line.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 '../../../../../../../graph/DSL_Diagram_HashUtils.js';\nexport class V1_RelationshipView {\n sourceView;\n targetView;\n line;\n get hashCode() {\n return hashArray([\n DIAGRAM_HASH_STRUCTURE.RELATIONSHIP_VIEW,\n this.sourceView,\n this.targetView,\n hashArray(this.line.points),\n ]);\n }\n}\n//# sourceMappingURL=V1_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 { V1_RelationshipView } from './V1_DSL_Diagram_RelationshipView.js';\nimport { DIAGRAM_HASH_STRUCTURE } from '../../../../../../../graph/DSL_Diagram_HashUtils.js';\nexport class V1_PropertyHolderView extends V1_RelationshipView {\n property;\n get hashCode() {\n return hashArray([\n DIAGRAM_HASH_STRUCTURE.PROPERTY_HOLDER_VIEW,\n super.hashCode,\n this.property,\n ]);\n }\n}\n//# sourceMappingURL=V1_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 { V1_PropertyHolderView } from './V1_DSL_Diagram_PropertyHolderView.js';\nimport { DIAGRAM_HASH_STRUCTURE } from '../../../../../../../graph/DSL_Diagram_HashUtils.js';\nexport class V1_PropertyView extends V1_PropertyHolderView {\n get hashCode() {\n return hashArray([DIAGRAM_HASH_STRUCTURE.PROPERTY_VIEW, super.hashCode]);\n }\n}\n//# sourceMappingURL=V1_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 { hashArray } from '@finos/legend-shared';\nimport { V1_RelationshipView } from './V1_DSL_Diagram_RelationshipView.js';\nimport { DIAGRAM_HASH_STRUCTURE } from '../../../../../../../graph/DSL_Diagram_HashUtils.js';\nexport class V1_GeneralizationView extends V1_RelationshipView {\n get hashCode() {\n return hashArray([\n DIAGRAM_HASH_STRUCTURE.GENERALIZATION_VIEW,\n super.hashCode,\n ]);\n }\n}\n//# sourceMappingURL=V1_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 { CORE_HASH_STRUCTURE } from '../../../../../../../graph/Core_HashUtils.js';\nimport { hashArray } from '@finos/legend-shared';\nexport class V1_Multiplicity {\n lowerBound = 0;\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 V1_Multiplicity(0, 0);\n static ZERO_ONE = new V1_Multiplicity(0, 1);\n static ZERO_MANY = new V1_Multiplicity(0, undefined);\n static ONE = new V1_Multiplicity(1, 1);\n static ONE_MANY = new V1_Multiplicity(1, undefined);\n}\n//# sourceMappingURL=V1_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 { primitive, createModelSchema, optional } from 'serializr';\nimport { SerializationFactory } from '@finos/legend-shared';\nimport { V1_Multiplicity } from '../../../model/packageableElements/domain/V1_Multiplicity.js';\nimport { V1_PackageableElementPointer } from '../../../model/packageableElements/V1_PackageableElement.js';\nimport { V1_SourceInformation } from '../../../model/V1_SourceInformation.js';\nexport const V1_sourceInformationSerialization = new SerializationFactory(createModelSchema(V1_SourceInformation, {\n sourceId: primitive(),\n startLine: primitive(),\n startColumn: primitive(),\n endLine: primitive(),\n endColumn: primitive(),\n}));\nexport const V1_packageableElementPointerDeserializerSchema = createModelSchema(V1_PackageableElementPointer, {\n path: primitive(),\n type: primitive(),\n});\nexport const V1_multiplicitySchema = createModelSchema(V1_Multiplicity, {\n lowerBound: primitive(),\n upperBound: optional(primitive()),\n});\n//# sourceMappingURL=V1_CoreSerializationHelper.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 V1_SourceInformation {\n sourceId;\n startLine;\n startColumn;\n endLine;\n endColumn;\n}\n//# sourceMappingURL=V1_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 { hashArray } from '@finos/legend-shared';\nimport { CORE_HASH_STRUCTURE } from '../../../../../../../graph/Core_HashUtils.js';\nexport class V1_PropertyPointer {\n // NOTE: In Pure protocol, this property is required, but for cases like embedded property mapping,\n // this should not be set, so most likely we will change Pure protocol to match this eventually.\n class;\n property;\n get hashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.PROPERTY_POINTER,\n this.property,\n this.class ?? '',\n ]);\n }\n}\n//# sourceMappingURL=V1_PropertyPointer.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 V1_RawValueSpecification {\n}\n//# sourceMappingURL=V1_RawValueSpecification.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 V1_RawExecutionContext {\n queryTimeOutInSeconds = null;\n enableConstraints = true;\n}\nexport class V1_RawBaseExecutionContext extends V1_RawExecutionContext {\n}\n//# sourceMappingURL=V1_RawExecutionContext.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, raw, serialize, deserialize, custom, alias, optional, } from 'serializr';\nimport { usingConstantValueSchema, UnsupportedOperationError, usingModelSchema, } from '@finos/legend-shared';\nimport { V1_RawLambda } from '../../../model/rawValueSpecification/V1_RawLambda.js';\nimport { V1_RawVariable } from '../../../model/rawValueSpecification/V1_RawVariable.js';\nimport { V1_multiplicitySchema } from '../../../transformation/pureProtocol/serializationHelpers/V1_CoreSerializationHelper.js';\nimport { V1_RawBaseExecutionContext } from '../../../model/rawValueSpecification/V1_RawExecutionContext.js';\nimport { V1_RawPrimitiveInstanceValue } from '../../../model/rawValueSpecification/V1_RawPrimitiveInstanceValue.js';\nimport { PRIMITIVE_TYPE } from '../../../../../../../graph/MetaModelConst.js';\nvar V1_RawExecutionContextType;\n(function (V1_RawExecutionContextType) {\n V1_RawExecutionContextType[\"BASE_EXECUTION_CONTEXT\"] = \"BaseExecutionContext\";\n})(V1_RawExecutionContextType || (V1_RawExecutionContextType = {}));\nexport var V1_RawValueSpecificationType;\n(function (V1_RawValueSpecificationType) {\n V1_RawValueSpecificationType[\"LAMBDA\"] = \"lambda\";\n V1_RawValueSpecificationType[\"VARIABLE\"] = \"var\";\n V1_RawValueSpecificationType[\"CINTEGER\"] = \"integer\";\n V1_RawValueSpecificationType[\"CDECIMAL\"] = \"decimal\";\n V1_RawValueSpecificationType[\"CSTRING\"] = \"string\";\n V1_RawValueSpecificationType[\"CBOOLEAN\"] = \"boolean\";\n V1_RawValueSpecificationType[\"CFLOAT\"] = \"float\";\n V1_RawValueSpecificationType[\"CDATETIME\"] = \"dateTime\";\n V1_RawValueSpecificationType[\"CSTRICTDATE\"] = \"strictDate\";\n V1_RawValueSpecificationType[\"CSTRICTTIME\"] = \"strictTime\";\n V1_RawValueSpecificationType[\"CLATESTDATE\"] = \"latestDate\";\n})(V1_RawValueSpecificationType = V1_RawValueSpecificationType || (V1_RawValueSpecificationType = {}));\nexport const V1_rawBaseExecutionContextModelSchema = createModelSchema(V1_RawBaseExecutionContext, {\n _type: usingConstantValueSchema(V1_RawExecutionContextType.BASE_EXECUTION_CONTEXT),\n queryTimeOutInSeconds: primitive(),\n enableConstraints: primitive(),\n});\nexport const V1_rawLambdaModelSchema = createModelSchema(V1_RawLambda, {\n _type: usingConstantValueSchema(V1_RawValueSpecificationType.LAMBDA),\n body: raw(),\n parameters: raw(),\n});\nexport const V1_rawVariableModelSchema = createModelSchema(V1_RawVariable, {\n _type: usingConstantValueSchema(V1_RawValueSpecificationType.VARIABLE),\n class: primitive(),\n multiplicity: usingModelSchema(V1_multiplicitySchema),\n name: primitive(),\n});\nconst V1_rawPrimitiveInstanceValueSchema = createModelSchema(V1_RawPrimitiveInstanceValue, {\n type: alias('_type', custom((val) => {\n switch (val) {\n case PRIMITIVE_TYPE.INTEGER:\n return V1_RawValueSpecificationType.CINTEGER;\n case PRIMITIVE_TYPE.DECIMAL:\n return V1_RawValueSpecificationType.CDECIMAL;\n case PRIMITIVE_TYPE.STRING:\n return V1_RawValueSpecificationType.CSTRING;\n case PRIMITIVE_TYPE.BOOLEAN:\n return V1_RawValueSpecificationType.CBOOLEAN;\n case PRIMITIVE_TYPE.FLOAT:\n return V1_RawValueSpecificationType.CFLOAT;\n case PRIMITIVE_TYPE.DATETIME:\n return V1_RawValueSpecificationType.CDATETIME;\n case PRIMITIVE_TYPE.STRICTDATE:\n return V1_RawValueSpecificationType.CSTRICTDATE;\n case PRIMITIVE_TYPE.STRICTTIME:\n return V1_RawValueSpecificationType.CSTRICTTIME;\n case PRIMITIVE_TYPE.LATESTDATE:\n return V1_RawValueSpecificationType.CLATESTDATE;\n default:\n throw new UnsupportedOperationError(`Can't serialize raw instance value type '${val}'`);\n }\n }, (val) => {\n switch (val) {\n case V1_RawValueSpecificationType.CINTEGER:\n return PRIMITIVE_TYPE.INTEGER;\n case V1_RawValueSpecificationType.CDECIMAL:\n return PRIMITIVE_TYPE.DECIMAL;\n case V1_RawValueSpecificationType.CSTRING:\n return PRIMITIVE_TYPE.STRING;\n case V1_RawValueSpecificationType.CBOOLEAN:\n return PRIMITIVE_TYPE.BOOLEAN;\n case V1_RawValueSpecificationType.CFLOAT:\n return PRIMITIVE_TYPE.FLOAT;\n case V1_RawValueSpecificationType.CDATETIME:\n return PRIMITIVE_TYPE.DATETIME;\n case V1_RawValueSpecificationType.CSTRICTDATE:\n return PRIMITIVE_TYPE.STRICTDATE;\n case V1_RawValueSpecificationType.CSTRICTTIME:\n return PRIMITIVE_TYPE.STRICTTIME;\n case V1_RawValueSpecificationType.CLATESTDATE:\n return PRIMITIVE_TYPE.LATESTDATE;\n default:\n throw new UnsupportedOperationError(`Can't deserialize raw value instance value type '${val}'`);\n }\n })),\n value: optional(primitive()),\n});\n/**\n * @backwardCompatibility\n */\nconst deserializePrimitiveInstanceValue = (json) => deserialize(V1_rawPrimitiveInstanceValueSchema, {\n ...json,\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n value: Array.isArray(json.values) && json.values.length === 1\n ? json.values[0]\n : json.value,\n});\nclass V1_RawValueSpecificationSerializer {\n visit_Lambda(rawValueSpecification) {\n return serialize(V1_rawLambdaModelSchema, rawValueSpecification);\n }\n visit_Variable(rawValueSpecification) {\n return serialize(V1_rawVariableModelSchema, rawValueSpecification);\n }\n visit_PrimitiveInstanceValue(rawValueSpecification) {\n return serialize(V1_rawPrimitiveInstanceValueSchema, rawValueSpecification);\n }\n}\nexport function V1_serializeRawValueSpecification(protocol) {\n return protocol.accept_RawValueSpecificationVisitor(new V1_RawValueSpecificationSerializer());\n}\nexport function V1_deserializeRawValueSpecification(json) {\n switch (json._type) {\n case V1_RawValueSpecificationType.LAMBDA:\n return deserialize(V1_rawLambdaModelSchema, json);\n case V1_RawValueSpecificationType.VARIABLE:\n return deserialize(V1_rawVariableModelSchema, json);\n case V1_RawValueSpecificationType.CINTEGER:\n case V1_RawValueSpecificationType.CDECIMAL:\n case V1_RawValueSpecificationType.CSTRING:\n case V1_RawValueSpecificationType.CBOOLEAN:\n case V1_RawValueSpecificationType.CFLOAT:\n case V1_RawValueSpecificationType.CDATETIME:\n case V1_RawValueSpecificationType.CSTRICTDATE:\n case V1_RawValueSpecificationType.CSTRICTTIME:\n case V1_RawValueSpecificationType.CLATESTDATE:\n return deserializePrimitiveInstanceValue(json);\n default:\n throw new UnsupportedOperationError(`Can't deserialize raw value specification of type '${json._type}'`);\n }\n}\n//# sourceMappingURL=V1_RawValueSpecificationSerializationHelper.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 '../../../../../../graph/Core_HashUtils.js';\nimport { V1_RawValueSpecification, } from '../../model/rawValueSpecification/V1_RawValueSpecification.js';\nexport class V1_RawLambda extends V1_RawValueSpecification {\n body;\n parameters;\n get hashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.RAW_LAMBDA,\n hashRawLambda(this.parameters, this.body),\n ]);\n }\n accept_RawValueSpecificationVisitor(visitor) {\n return visitor.visit_Lambda(this);\n }\n}\n//# sourceMappingURL=V1_RawLambda.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 { V1_RawValueSpecification, } from '../../model/rawValueSpecification/V1_RawValueSpecification.js';\nexport class V1_RawVariable extends V1_RawValueSpecification {\n class;\n name;\n multiplicity;\n get hashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.RAW_VARIABLE,\n this.class,\n this.name,\n this.multiplicity,\n ]);\n }\n accept_RawValueSpecificationVisitor(visitor) {\n return visitor.visit_Variable(this);\n }\n}\n//# sourceMappingURL=V1_RawVariable.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 { V1_RawValueSpecification, } from './V1_RawValueSpecification.js';\nimport { V1_Multiplicity } from '../packageableElements/domain/V1_Multiplicity.js';\nexport class V1_RawPrimitiveInstanceValue extends V1_RawValueSpecification {\n multiplicity = V1_Multiplicity.ONE;\n type;\n value;\n get hashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.RAW_INSTANCE_VALUE,\n this.type,\n this.multiplicity,\n this.value ?? '',\n ]);\n }\n accept_RawValueSpecificationVisitor(visitor) {\n return visitor.visit_PrimitiveInstanceValue(this);\n }\n}\n//# sourceMappingURL=V1_RawPrimitiveInstanceValue.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 { primitive, createModelSchema, list, raw, alias, serialize, custom, deserialize, optional, SKIP, } from 'serializr';\nimport { deserializeArray, serializeArray, usingConstantValueSchema, usingModelSchema, } from '@finos/legend-shared';\nimport { V1_multiplicitySchema } from '../../../transformation/pureProtocol/serializationHelpers/V1_CoreSerializationHelper.js';\nimport { V1_Enumeration } from '../../../model/packageableElements/domain/V1_Enumeration.js';\nimport { V1_Profile } from '../../../model/packageableElements/domain/V1_Profile.js';\nimport { V1_Measure, V1_Unit, } from '../../../model/packageableElements/domain/V1_Measure.js';\nimport { V1_Class } from '../../../model/packageableElements/domain/V1_Class.js';\nimport { V1_Association } from '../../../model/packageableElements/domain/V1_Association.js';\nimport { V1_ConcreteFunctionDefinition } from '../../../model/packageableElements/function/V1_ConcreteFunctionDefinition.js';\nimport { V1_EnumValue } from '../../../model/packageableElements/domain/V1_EnumValue.js';\nimport { V1_StereotypePtr } from '../../../model/packageableElements/domain/V1_StereotypePtr.js';\nimport { V1_TagPtr } from '../../../model/packageableElements/domain/V1_TagPtr.js';\nimport { V1_TaggedValue } from '../../../model/packageableElements/domain/V1_TaggedValue.js';\nimport { V1_Property } from '../../../model/packageableElements/domain/V1_Property.js';\nimport { V1_DerivedProperty } from '../../../model/packageableElements/domain/V1_DerivedProperty.js';\nimport { V1_PropertyPointer } from '../../../model/packageableElements/domain/V1_PropertyPointer.js';\nimport { V1_Constraint } from '../../../model/packageableElements/domain/V1_Constraint.js';\nimport { V1_rawLambdaModelSchema, V1_rawVariableModelSchema, } from './V1_RawValueSpecificationSerializationHelper.js';\nexport const V1_CLASS_ELEMENT_PROTOCOL_TYPE = 'class';\nexport const V1_PROFILE_ELEMENT_PROTOCOL_TYPE = 'profile';\nexport const V1_ENUMERATION_ELEMENT_PROTOCOL_TYPE = 'Enumeration';\nexport const V1_MEASURE_ELEMENT_PROTOCOL_TYPE = 'measure';\nexport const V1_UNIT_ELEMENT_PROTOCOL_TYPE = 'unit';\nexport const V1_ASSOCIATION_ELEMENT_PROTOCOL_TYPE = 'association';\nexport const V1_FUNCTION_ELEMENT_PROTOCOL_TYPE = 'function';\nexport const V1_propertyPointerModelSchema = createModelSchema(V1_PropertyPointer, {\n class: optional(primitive()),\n property: primitive(),\n});\n// ------------------------------------- Profile -------------------------------------\nexport const V1_stereotypePtrSchema = createModelSchema(V1_StereotypePtr, {\n profile: primitive(),\n value: primitive(),\n});\nexport const V1_tagPtrSchema = createModelSchema(V1_TagPtr, {\n profile: primitive(),\n value: primitive(),\n});\nexport const V1_taggedValueSchema = createModelSchema(V1_TaggedValue, {\n tag: usingModelSchema(V1_tagPtrSchema),\n value: primitive(),\n});\nexport const V1_profileSchema = createModelSchema(V1_Profile, {\n _type: usingConstantValueSchema(V1_PROFILE_ELEMENT_PROTOCOL_TYPE),\n name: primitive(),\n package: primitive(),\n stereotypes: list(primitive()),\n tags: list(primitive()),\n});\n// ------------------------------------- Enumeration -------------------------------------\nexport const V1_enumValueSchema = createModelSchema(V1_EnumValue, {\n stereotypes: custom((values) => serializeArray(values, (value) => serialize(V1_stereotypePtrSchema, value), {\n skipIfEmpty: true,\n INTERNAL__forceReturnEmptyInTest: true,\n }), (values) => deserializeArray(values, (v) => deserialize(V1_stereotypePtrSchema, v), {\n skipIfEmpty: false,\n })),\n taggedValues: custom((values) => serializeArray(values, (value) => serialize(V1_taggedValueSchema, value), {\n skipIfEmpty: true,\n INTERNAL__forceReturnEmptyInTest: true,\n }), (values) => deserializeArray(values, (v) => deserialize(V1_taggedValueSchema, v), {\n skipIfEmpty: false,\n })),\n value: primitive(),\n});\nexport const V1_enumerationSchema = createModelSchema(V1_Enumeration, {\n _type: usingConstantValueSchema(V1_ENUMERATION_ELEMENT_PROTOCOL_TYPE),\n name: primitive(),\n package: primitive(),\n stereotypes: custom((values) => serializeArray(values, (value) => serialize(V1_stereotypePtrSchema, value), {\n skipIfEmpty: true,\n INTERNAL__forceReturnEmptyInTest: true,\n }), (values) => deserializeArray(values, (v) => deserialize(V1_stereotypePtrSchema, v), {\n skipIfEmpty: false,\n })),\n taggedValues: custom((values) => serializeArray(values, (value) => serialize(V1_taggedValueSchema, value), {\n skipIfEmpty: true,\n INTERNAL__forceReturnEmptyInTest: true,\n }), (values) => deserializeArray(values, (v) => deserialize(V1_taggedValueSchema, v), {\n skipIfEmpty: false,\n })),\n values: list(usingModelSchema(V1_enumValueSchema)),\n});\n// ------------------------------------- Measure -------------------------------------\nexport const V1_unitSchema = createModelSchema(V1_Unit, {\n _type: usingConstantValueSchema(V1_UNIT_ELEMENT_PROTOCOL_TYPE),\n conversionFunction: optional(usingModelSchema(V1_rawLambdaModelSchema)),\n measure: primitive(),\n name: primitive(),\n package: primitive(),\n});\nexport const V1_measureSchema = createModelSchema(V1_Measure, {\n _type: usingConstantValueSchema(V1_MEASURE_ELEMENT_PROTOCOL_TYPE),\n canonicalUnit: optional(usingModelSchema(V1_unitSchema)),\n name: primitive(),\n nonCanonicalUnits: list(usingModelSchema(V1_unitSchema)),\n package: primitive(),\n});\n// ------------------------------------- Class -------------------------------------\nexport const V1_propertySchema = createModelSchema(V1_Property, {\n aggregation: optional(primitive()),\n multiplicity: usingModelSchema(V1_multiplicitySchema),\n name: primitive(),\n stereotypes: custom((values) => serializeArray(values, (value) => serialize(V1_stereotypePtrSchema, value), {\n skipIfEmpty: true,\n INTERNAL__forceReturnEmptyInTest: true,\n }), (values) => deserializeArray(values, (v) => deserialize(V1_stereotypePtrSchema, v), {\n skipIfEmpty: false,\n })),\n taggedValues: custom((values) => serializeArray(values, (value) => serialize(V1_taggedValueSchema, value), {\n skipIfEmpty: true,\n INTERNAL__forceReturnEmptyInTest: true,\n }), (values) => deserializeArray(values, (v) => deserialize(V1_taggedValueSchema, v), {\n skipIfEmpty: false,\n })),\n type: primitive(),\n});\nexport const V1_derivedPropertySchema = createModelSchema(V1_DerivedProperty, {\n body: raw(),\n name: primitive(),\n parameters: raw(),\n returnMultiplicity: usingModelSchema(V1_multiplicitySchema),\n returnType: primitive(),\n stereotypes: custom((values) => serializeArray(values, (value) => serialize(V1_stereotypePtrSchema, value), {\n skipIfEmpty: true,\n INTERNAL__forceReturnEmptyInTest: true,\n }), (values) => deserializeArray(values, (v) => deserialize(V1_stereotypePtrSchema, v), {\n skipIfEmpty: false,\n })),\n taggedValues: custom((values) => serializeArray(values, (value) => serialize(V1_taggedValueSchema, value), {\n skipIfEmpty: true,\n INTERNAL__forceReturnEmptyInTest: true,\n }), (values) => deserializeArray(values, (v) => deserialize(V1_taggedValueSchema, v), {\n skipIfEmpty: false,\n })),\n});\nexport const V1_constraintSchema = createModelSchema(V1_Constraint, {\n enforcementLevel: optional(primitive()),\n externalId: optional(primitive()),\n functionDefinition: usingModelSchema(V1_rawLambdaModelSchema),\n messageFunction: optional(usingModelSchema(V1_rawLambdaModelSchema)),\n name: primitive(),\n});\nexport const V1_classSchema = createModelSchema(V1_Class, {\n _type: usingConstantValueSchema(V1_CLASS_ELEMENT_PROTOCOL_TYPE),\n constraints: custom((values) => serializeArray(values, (value) => serialize(V1_constraintSchema, value), {\n skipIfEmpty: true,\n INTERNAL__forceReturnEmptyInTest: true,\n }), (values) => deserializeArray(values, (v) => deserialize(V1_constraintSchema, v), {\n skipIfEmpty: false,\n })),\n name: primitive(),\n /**\n * Omit this information during protocol transformation as it can be\n * interpreted while building the graph; and will help grammar-roundtrip\n * tests (involving engine) to pass. Ideally, this requires grammar parser\n * and composer in engine to be more consistent.\n *\n * @discrepancy grammar-roundtrip\n */\n originalMilestonedProperties: custom((values) => serializeArray(values, (value) => SKIP, {\n skipIfEmpty: true,\n INTERNAL__forceReturnEmptyInTest: true,\n }), (values) => deserializeArray(values, (v) => SKIP, {\n skipIfEmpty: false,\n })),\n package: primitive(),\n properties: custom((values) => serializeArray(values, (value) => serialize(V1_propertySchema, value), {\n skipIfEmpty: true,\n INTERNAL__forceReturnEmptyInTest: true,\n }), (values) => deserializeArray(values, (v) => deserialize(V1_propertySchema, v), {\n skipIfEmpty: false,\n })),\n derivedProperties: alias('qualifiedProperties', // 'derived properties' used to be called 'qualified properties'\n custom((values) => serializeArray(values, (value) => serialize(V1_derivedPropertySchema, value), {\n skipIfEmpty: true,\n INTERNAL__forceReturnEmptyInTest: true,\n }), (values) => deserializeArray(values, (v) => deserialize(V1_derivedPropertySchema, v), {\n skipIfEmpty: false,\n }))),\n stereotypes: custom((values) => serializeArray(values, (value) => serialize(V1_stereotypePtrSchema, value), {\n skipIfEmpty: true,\n INTERNAL__forceReturnEmptyInTest: true,\n }), (values) => deserializeArray(values, (v) => deserialize(V1_stereotypePtrSchema, v), {\n skipIfEmpty: false,\n })),\n superTypes: custom((values) => serializeArray(values, (value) => value, {\n skipIfEmpty: true,\n INTERNAL__forceReturnEmptyInTest: true,\n }), (values) => deserializeArray(values, (v) => v, {\n skipIfEmpty: false,\n })),\n taggedValues: custom((values) => serializeArray(values, (value) => serialize(V1_taggedValueSchema, value), {\n skipIfEmpty: true,\n INTERNAL__forceReturnEmptyInTest: true,\n }), (values) => deserializeArray(values, (v) => deserialize(V1_taggedValueSchema, v), {\n skipIfEmpty: false,\n })),\n});\n// ------------------------------------- Association -------------------------------------\nexport const V1_associationSchema = createModelSchema(V1_Association, {\n _type: usingConstantValueSchema(V1_ASSOCIATION_ELEMENT_PROTOCOL_TYPE),\n name: primitive(),\n /**\n * Omit this information during protocol transformation as it can be\n * interpreted while building the graph; and will help grammar-roundtrip\n * tests (involving engine) to pass. Ideally, this requires grammar parser\n * and composer in engine to be more consistent.\n *\n * @discrepancy grammar-roundtrip\n */\n originalMilestonedProperties: custom((values) => serializeArray(values, (value) => SKIP, {\n skipIfEmpty: true,\n INTERNAL__forceReturnEmptyInTest: true,\n }), (values) => deserializeArray(values, (v) => SKIP, {\n skipIfEmpty: false,\n })),\n package: primitive(),\n properties: list(usingModelSchema(V1_propertySchema)),\n derivedProperties: alias('qualifiedProperties', // 'derived properties' used to be called 'qualified properties'\n custom((values) => serializeArray(values, (value) => serialize(V1_derivedPropertySchema, value), {\n skipIfEmpty: true,\n INTERNAL__forceReturnEmptyInTest: true,\n }), (values) => deserializeArray(values, (v) => deserialize(V1_derivedPropertySchema, v), {\n skipIfEmpty: false,\n }))),\n stereotypes: custom((values) => serializeArray(values, (value) => serialize(V1_stereotypePtrSchema, value), {\n skipIfEmpty: true,\n INTERNAL__forceReturnEmptyInTest: true,\n }), (values) => deserializeArray(values, (v) => deserialize(V1_stereotypePtrSchema, v), {\n skipIfEmpty: false,\n })),\n taggedValues: custom((values) => serializeArray(values, (value) => serialize(V1_taggedValueSchema, value), {\n skipIfEmpty: true,\n INTERNAL__forceReturnEmptyInTest: true,\n }), (values) => deserializeArray(values, (v) => deserialize(V1_taggedValueSchema, v), {\n skipIfEmpty: false,\n })),\n});\n// ------------------------------------- Function -------------------------------------\nexport const V1_functionSchema = createModelSchema(V1_ConcreteFunctionDefinition, {\n _type: usingConstantValueSchema(V1_FUNCTION_ELEMENT_PROTOCOL_TYPE),\n body: list(raw()),\n name: primitive(),\n package: primitive(),\n parameters: list(usingModelSchema(V1_rawVariableModelSchema)),\n postConstraints: list(primitive()),\n preConstraints: list(primitive()),\n returnMultiplicity: usingModelSchema(V1_multiplicitySchema),\n returnType: primitive(),\n stereotypes: custom((values) => serializeArray(values, (value) => serialize(V1_stereotypePtrSchema, value), {\n skipIfEmpty: true,\n INTERNAL__forceReturnEmptyInTest: true,\n }), (values) => deserializeArray(values, (v) => deserialize(V1_stereotypePtrSchema, v), {\n skipIfEmpty: false,\n })),\n taggedValues: custom((values) => serializeArray(values, (value) => serialize(V1_taggedValueSchema, value), {\n skipIfEmpty: true,\n INTERNAL__forceReturnEmptyInTest: true,\n }), (values) => deserializeArray(values, (v) => deserialize(V1_taggedValueSchema, v), {\n skipIfEmpty: false,\n })),\n});\n//# sourceMappingURL=V1_DomainSerializationHelper.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';\nexport class V1_StereotypePtr {\n profile;\n value;\n get hashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.STEREOTYPE_POINTER,\n this.value,\n this.profile,\n ]);\n }\n}\n//# sourceMappingURL=V1_StereotypePtr.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';\nexport class V1_TagPtr {\n profile;\n value;\n get hashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.TAG_POINTER,\n this.value,\n this.profile,\n ]);\n }\n}\n//# sourceMappingURL=V1_TagPtr.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';\nexport class V1_TaggedValue {\n tag;\n value;\n get hashCode() {\n return hashArray([CORE_HASH_STRUCTURE.TAGGED_VALUE, this.tag, this.value]);\n }\n}\n//# sourceMappingURL=V1_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 { hashArray } from '@finos/legend-shared';\nimport { CORE_HASH_STRUCTURE } from '../../../../../../../graph/Core_HashUtils.js';\nimport { V1_PackageableElement, } from '../../../model/packageableElements/V1_PackageableElement.js';\nexport class V1_Profile extends V1_PackageableElement {\n stereotypes = [];\n tags = [];\n get hashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.PROFILE,\n this.path,\n hashArray(this.stereotypes),\n hashArray(this.tags),\n ]);\n }\n accept_PackageableElementVisitor(visitor) {\n return visitor.visit_Profile(this);\n }\n}\n//# sourceMappingURL=V1_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 } from '@finos/legend-shared';\nimport { CORE_HASH_STRUCTURE } from '../../../../../../../graph/Core_HashUtils.js';\nexport class V1_EnumValue {\n value;\n stereotypes = [];\n taggedValues = [];\n get hashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.ENUM_VALUE,\n this.value,\n hashArray(this.stereotypes),\n hashArray(this.taggedValues),\n ]);\n }\n}\n//# sourceMappingURL=V1_EnumValue.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 { V1_PackageableElement, } from '../../../model/packageableElements/V1_PackageableElement.js';\nexport class V1_Enumeration extends V1_PackageableElement {\n values = [];\n stereotypes = [];\n taggedValues = [];\n get hashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.ENUMERATION,\n this.path,\n hashArray(this.values),\n hashArray(this.stereotypes),\n hashArray(this.taggedValues),\n ]);\n }\n accept_PackageableElementVisitor(visitor) {\n return visitor.visit_Enumeration(this);\n }\n}\n//# sourceMappingURL=V1_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, UnsupportedOperationError, } from '@finos/legend-shared';\nimport { CORE_HASH_STRUCTURE } from '../../../../../../../graph/Core_HashUtils.js';\nimport { V1_PackageableElement, } from '../../../model/packageableElements/V1_PackageableElement.js';\nexport class V1_Unit extends V1_PackageableElement {\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 // superType!: string; // no clear purpose to this so we won't add it for now\n get hashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.UNIT,\n this.measure,\n this.conversionFunction ?? '',\n ]);\n }\n accept_PackageableElementVisitor(visitor) {\n throw new UnsupportedOperationError();\n }\n}\nexport class V1_Measure extends V1_PackageableElement {\n canonicalUnit;\n nonCanonicalUnits = [];\n get hashCode() {\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=V1_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';\nexport class V1_Property {\n name;\n type;\n multiplicity;\n aggregation;\n stereotypes = [];\n taggedValues = [];\n get hashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.PROPERTY,\n this.name,\n this.multiplicity,\n this.type,\n this.aggregation ?? '',\n hashArray(this.stereotypes),\n hashArray(this.taggedValues),\n ]);\n }\n}\n//# sourceMappingURL=V1_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 */\nimport { hashArray } from '@finos/legend-shared';\nimport { CORE_HASH_STRUCTURE, hashRawLambda, } from '../../../../../../../graph/Core_HashUtils.js';\nexport class V1_DerivedProperty {\n name;\n returnType;\n returnMultiplicity;\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 get hashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.DERIVED_PROPERTY,\n this.name,\n this.returnMultiplicity,\n this.returnType,\n hashArray(this.stereotypes),\n hashArray(this.taggedValues),\n hashRawLambda(this.parameters, this.body),\n ]);\n }\n}\n//# sourceMappingURL=V1_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 { hashArray } from '@finos/legend-shared';\nimport { CORE_HASH_STRUCTURE } from '../../../../../../../graph/Core_HashUtils.js';\nexport class V1_Constraint {\n name;\n /**\n * Studio does not process value specification, they are left in raw JSON form\n *\n * @discrepancy model\n */\n functionDefinition;\n externalId;\n enforcementLevel;\n /**\n * Studio does not process value specification, they are left in raw JSON form\n *\n * @discrepancy model\n */\n messageFunction;\n get hashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.CONSTRAINT,\n this.name,\n this.functionDefinition,\n this.externalId ?? '',\n this.enforcementLevel ?? '',\n this.messageFunction ?? '',\n ]);\n }\n}\n//# sourceMappingURL=V1_Constraint.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';\nimport { usingConstantValueSchema, usingModelSchema, } from '@finos/legend-shared';\nimport { V1_ClassView } from '../../model/packageableElements/diagram/V1_DSL_Diagram_ClassView.js';\nimport { V1_Diagram } from '../../model/packageableElements/diagram/V1_DSL_Diagram_Diagram.js';\nimport { V1_Point } from '../../model/packageableElements/diagram/geometry/V1_DSL_Diagram_Point.js';\nimport { V1_Rectangle } from '../../model/packageableElements/diagram/geometry/V1_DSL_Diagram_Rectangle.js';\nimport { V1_Line } from '../../model/packageableElements/diagram/geometry/V1_DSL_Diagram_Line.js';\nimport { V1_PropertyView } from '../../model/packageableElements/diagram/V1_DSL_Diagram_PropertyView.js';\nimport { V1_GeneralizationView } from '../../model/packageableElements/diagram/V1_DSL_Diagram_GeneralizationView.js';\nimport { V1_propertyPointerModelSchema } from '@finos/legend-graph';\nexport const V1_DIAGRAM_ELEMENT_PROTOCOL_TYPE = 'diagram';\nconst pointModelSchema = createModelSchema(V1_Point, {\n x: primitive(),\n y: primitive(),\n});\nconst recantagleModelSchema = createModelSchema(V1_Rectangle, {\n height: primitive(),\n width: primitive(),\n});\nconst lineModelSchema = createModelSchema(V1_Line, {\n points: list(usingModelSchema(pointModelSchema)),\n});\nconst classViewModelSchema = createModelSchema(V1_ClassView, {\n class: primitive(),\n hideProperties: optional(primitive()),\n hideStereotypes: optional(primitive()),\n hideTaggedValues: optional(primitive()),\n id: primitive(),\n position: usingModelSchema(pointModelSchema),\n rectangle: usingModelSchema(recantagleModelSchema),\n});\nconst propertyViewModelSchema = createModelSchema(V1_PropertyView, {\n line: usingModelSchema(lineModelSchema),\n property: usingModelSchema(V1_propertyPointerModelSchema),\n sourceView: primitive(),\n targetView: primitive(),\n});\nconst generalizationViewModelSchema = createModelSchema(V1_GeneralizationView, {\n line: usingModelSchema(lineModelSchema),\n sourceView: primitive(),\n targetView: primitive(),\n});\nexport const V1_diagramModelSchema = createModelSchema(V1_Diagram, {\n _type: usingConstantValueSchema(V1_DIAGRAM_ELEMENT_PROTOCOL_TYPE),\n classViews: list(usingModelSchema(classViewModelSchema)),\n generalizationViews: list(usingModelSchema(generalizationViewModelSchema)),\n name: primitive(),\n package: primitive(),\n propertyViews: list(usingModelSchema(propertyViewModelSchema)),\n});\n//# sourceMappingURL=V1_DSL_Diagram_ProtocolHelper.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 { V1_PackageableElement, } from '../../../model/packageableElements/V1_PackageableElement.js';\nexport class V1_Class extends V1_PackageableElement {\n superTypes = [];\n properties = [];\n derivedProperties = [];\n stereotypes = [];\n taggedValues = [];\n constraints = [];\n get hashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.CLASS,\n this.path,\n hashArray(this.properties),\n hashArray(this.derivedProperties),\n hashArray(this.superTypes),\n hashArray(this.constraints),\n hashArray(this.stereotypes),\n hashArray(this.taggedValues),\n ]);\n }\n accept_PackageableElementVisitor(visitor) {\n return visitor.visit_Class(this);\n }\n}\n//# sourceMappingURL=V1_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 { hashArray } from '@finos/legend-shared';\nimport { CORE_HASH_STRUCTURE } from '../../../../../../../graph/Core_HashUtils.js';\nimport { V1_PackageableElement, } from '../../../model/packageableElements/V1_PackageableElement.js';\nexport class V1_Association extends V1_PackageableElement {\n properties = [];\n derivedProperties = [];\n stereotypes = [];\n taggedValues = [];\n get hashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.ASSOCIATION,\n this.path,\n hashArray(this.properties),\n hashArray(this.derivedProperties),\n hashArray(this.stereotypes),\n hashArray(this.taggedValues),\n ]);\n }\n accept_PackageableElementVisitor(visitor) {\n return visitor.visit_Association(this);\n }\n}\n//# sourceMappingURL=V1_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 { hashArray } from '@finos/legend-shared';\nimport { CORE_HASH_STRUCTURE, hashRawLambda, } from '../../../../../../../graph/Core_HashUtils.js';\nimport { V1_PackageableElement, } from '../../../model/packageableElements/V1_PackageableElement.js';\nexport class V1_ConcreteFunctionDefinition extends V1_PackageableElement {\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 body = [];\n /**\n * Pre constraints are not supported at the moment\n *\n * @discrepancy model\n */\n preConstraints = [];\n /**\n * Post constraints are not supported at the moment\n *\n * @discrepancy model\n */\n postConstraints = [];\n returnType;\n returnMultiplicity;\n taggedValues = [];\n stereotypes = [];\n get hashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.FUNCTION,\n this.path,\n hashArray(this.parameters),\n this.returnType,\n hashArray(this.taggedValues),\n hashArray(this.stereotypes),\n hashRawLambda(undefined, this.body),\n ]);\n }\n accept_PackageableElementVisitor(visitor) {\n return visitor.visit_ConcreteFunctionDefinition(this);\n }\n}\n//# sourceMappingURL=V1_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 { AbstractPlugin } from '@finos/legend-shared';\n/**\n * Plugins for protocol processors. Technically, this is a sub-part of `PureGraphManagerPlugin`\n * but due to the way we encapsulate the protocol code and the way we organize graph managers,\n * we want to keep `PureGraphManagerPlugin` to operate at metamodel level where as this allows\n * extension mechanism on the protocol models.\n *\n * When we introduce another version of protocol models, e.g. v2_0_0, we would just add another set\n * of plugin methods here without having to modify the abstract layer of graph manager.\n */\nexport class PureProtocolProcessorPlugin extends AbstractPlugin {\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.registerPureProtocolProcessorPlugin(this);\n }\n}\n//# sourceMappingURL=PureProtocolProcessorPlugin.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 * NOTE: this file holds the most basic utilties to deal with the graph and\n * metamodels. Any methods which requires importing some metamodel or graph\n * are meant to be put into helpers method, e.g. `DomainHelper`.\n *\n * This is to avoid circular dependencies and also to keep things in the\n * right layer\n */\nimport { ELEMENT_PATH_DELIMITER, SOURCE_INFORMATION_PROPERTY_KEY_SUFFIX, SUPPORTED_FUNCTIONS, } 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 matchFunctionName = (functionName, functionFullPaths) => Array.isArray(functionFullPaths)\n ? functionFullPaths.some((functionFullPath) => matchFunctionName(functionName, functionFullPath))\n : functionName === functionFullPaths ||\n extractElementNameFromPath(functionFullPaths) === functionName;\nexport const getSupportFunctionFullPath = (functionName) => Object.values(SUPPORTED_FUNCTIONS).find((_func) => matchFunctionName(functionName, _func));\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()));\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 { 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, } 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 { Multiplicity } from '../metamodel/pure/packageableElements/domain/Multiplicity.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};\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) => returnUndefOnError(() => getElementRootPackage(element))?.name ===\n ROOT_PACKAGE_NAME.PROJECT_DEPENDENCY_ROOT;\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 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 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));\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.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;\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 { PRIMITIVE_TYPE, ELEMENT_PATH_DELIMITER, ROOT_PACKAGE_NAME, } from '../../../../../../../graph/MetaModelConst.js';\nimport { uniq, guaranteeNonNullable, assertNonEmptyString, guaranteeType, } from '@finos/legend-shared';\nimport { GenericType } from '../../../../../../../graph/metamodel/pure/packageableElements/domain/GenericType.js';\nimport { ImportAwareCodeSection, } from '../../../../../../../graph/metamodel/pure/packageableElements/section/Section.js';\nimport { StereotypeImplicitReference } from '../../../../../../../graph/metamodel/pure/packageableElements/domain/StereotypeReference.js';\nimport { GenericTypeImplicitReference } from '../../../../../../../graph/metamodel/pure/packageableElements/domain/GenericTypeReference.js';\nimport { PackageableElementImplicitReference } from '../../../../../../../graph/metamodel/pure/packageableElements/PackageableElementReference.js';\nimport { TagImplicitReference } from '../../../../../../../graph/metamodel/pure/packageableElements/domain/TagReference.js';\nimport { PropertyImplicitReference } from '../../../../../../../graph/metamodel/pure/packageableElements/domain/PropertyReference.js';\nimport { JoinImplicitReference } from '../../../../../../../graph/metamodel/pure/packageableElements/store/relational/model/JoinReference.js';\nimport { FilterImplicitReference } from '../../../../../../../graph/metamodel/pure/packageableElements/store/relational/model/FilterReference.js';\nimport { RootFlatDataRecordTypeImplicitReference } from '../../../../../../../graph/metamodel/pure/packageableElements/store/flatData/model/RootFlatDataRecordTypeReference.js';\nimport { createImplicitRelationReference } from '../../../../../../../graph/metamodel/pure/packageableElements/store/relational/model/RelationReference.js';\nimport { EnumValueImplicitReference } from '../../../../../../../graph/metamodel/pure/packageableElements/domain/EnumValueReference.js';\nimport { V1_getRelation } from './helpers/V1_DatabaseBuilderHelper.js';\nimport { DataType } from '../../../../../../../graph/metamodel/pure/packageableElements/domain/DataType.js';\nimport { GraphBuilderError } from '../../../../../../../graphManager/GraphManagerUtils.js';\nimport { getClassProperty, getEnumValue, getOwnProperty, getStereotype, getTag, } from '../../../../../../../graph/helpers/DomainHelper.js';\nimport { getFilter, getJoin, } from '../../../../../../../graph/helpers/STO_Relational_Helper.js';\nimport { getRootRecordType, getSection, } from '../../../../../../../graph/helpers/STO_FlatData_Helper.js';\nexport const V1_buildFullPath = (packagePath, name) => `${guaranteeNonNullable(packagePath, 'Package path is required')}${ELEMENT_PATH_DELIMITER}${guaranteeNonNullable(name, 'Name is required')}`;\nexport class V1_GraphBuilderContext {\n autoImports;\n sectionImports = [];\n log;\n currentSubGraph;\n extensions;\n graph;\n section;\n options;\n constructor(builder) {\n this.log = builder.log;\n this.graph = builder.graph;\n this.autoImports = this.graph.autoImports;\n this.currentSubGraph = builder.currentSubGraph;\n this.extensions = builder.extensions;\n this.sectionImports = builder.sectionImports;\n this.section = builder.section;\n this.options = builder.options;\n }\n /**\n * Since we haven't fully supported section index, shortened paths\n * using imports in the graph might need to be fully resolved.\n *\n * To handle this need, we make use of references. References can auto\n * resolve full paths when the section index is deleted. But, when\n * building the graph, we leave the value specifications\n * raw/unprocessed. Hence, we cannot make use of references to do full\n * path resolution, as such, we make a best effort traversal in the model\n * of raw value specifications to resolve path automatically.\n *\n * We create this flag to control the behavior of lambda auto path-resolution.\n * This rewriting behavior should not be done for immutable graphs, such as\n * system, depdendencies, and generation. However, in overall, it would be controlled\n * also by the `TEMPORARY__preserveSectionIndex` flag.\n *\n * NOTE: When we fully support section index, we would certainly need to\n * revise the usefullness of this flag, perhaps, we don't auto-resolve anymore,\n * but this mechanism would still be beneficial as we can keep it as an utility\n * to resolve raw lambdas' paths when the user deliberately delete the section\n * index, for example.\n *\n * https://github.com/finos/legend-studio/issues/1067\n */\n get enableRawLambdaAutoPathResolution() {\n return (this.graph.root.name === ROOT_PACKAGE_NAME.MAIN &&\n !this.options?.TEMPORARY__preserveSectionIndex);\n }\n resolve(path, resolverFn) {\n // Try the find from special types (not user-defined top level types)\n const SPECIAL_TYPES = Object.values(PRIMITIVE_TYPE).concat([]);\n if (SPECIAL_TYPES.includes(path)) {\n return {\n element: resolverFn(path),\n };\n }\n // if the path is a path with package, no resolution from section imports is needed\n if (path.includes(ELEMENT_PATH_DELIMITER)) {\n return {\n element: resolverFn(path),\n isFullPath: true,\n };\n }\n // NOTE: here we make the assumption that we have populated the indices properly so the same element\n // is not referred using 2 different paths in the same element index\n const results = new Map();\n this.autoImports.forEach((importPackage) => {\n try {\n const fullPath = importPackage.path + ELEMENT_PATH_DELIMITER + path;\n const element = resolverFn(fullPath);\n if (element) {\n results.set(fullPath, {\n element,\n resolvedUsingSectionImports: false,\n });\n }\n }\n catch {\n // do nothing\n }\n });\n // only resolve section imports if there is a section\n if (this.section) {\n this.sectionImports.forEach((importPackage) => {\n try {\n const fullPath = importPackage.path + ELEMENT_PATH_DELIMITER + path;\n const element = resolverFn(fullPath);\n if (element) {\n results.set(fullPath, {\n element,\n resolvedUsingSectionImports: true,\n });\n }\n }\n catch {\n // do nothing\n }\n });\n }\n switch (results.size) {\n /**\n * NOTE: if nothing is found then we will try to find user-defined elements at root package (i.e. no package)\n * We place this after import resolution since we want to emphasize that this type of element has the lowest precedence\n * In fact, due to the restriction that Alloy imposes on element path, the only kinds of element\n * we could find at this level are packages, but they will not fit the type we look for\n * in PURE, since we resolve to CoreInstance, further validation needs to be done to make the resolution complete\n * here we count on the `resolver` to do the validation of the type of element instead\n */\n case 0:\n return {\n element: resolverFn(path),\n isFullPath: true,\n };\n case 1:\n return guaranteeNonNullable(Array.from(results.values())[0]);\n default:\n throw new GraphBuilderError(undefined, `Can't resolve element with path '${path}' - multiple matches found [${Array.from(results.keys()).join(', ')}]`);\n }\n }\n /**\n * This method and this class in general demonstrates the difference\n * between explicit and implicit reference.\n * See {@link PackageableElementImplicitReference} for more details.\n *\n * Notice that every method in the resolver ends up creating an implicit reference.\n * It does not matter whether the full path is specified or not (i.e. so almost\n * no inference was done), the resulting reference must be implicit, as we took the\n * input into account when creating this reference.\n */\n createImplicitPackageableElementReference = (path, resolverFn) => {\n const { element, resolvedUsingSectionImports, isFullPath } = this.resolve(path, resolverFn);\n if (!resolvedUsingSectionImports && !isFullPath) {\n return PackageableElementImplicitReference.create(element, path);\n }\n return PackageableElementImplicitReference.resolveFromSection(element, path, resolvedUsingSectionImports ? this.section : undefined);\n };\n resolveStereotype = (stereotypePtr) => {\n assertNonEmptyString(stereotypePtr.profile, `Steoreotype pointer 'profile' field is missing or empty`);\n assertNonEmptyString(stereotypePtr.value, `Steoreotype pointer 'value' field is missing or empty`);\n const ownerReference = this.resolveProfile(stereotypePtr.profile);\n const value = getStereotype(ownerReference.value, stereotypePtr.value);\n return StereotypeImplicitReference.create(ownerReference, value);\n };\n resolveTag = (tagPtr) => {\n assertNonEmptyString(tagPtr.profile, `Tag pointer 'profile' field is missing or empty`);\n assertNonEmptyString(tagPtr.value, `Tag pointer 'value' field is missing or empty`);\n const ownerReference = this.resolveProfile(tagPtr.profile);\n const value = getTag(ownerReference.value, tagPtr.value);\n return TagImplicitReference.create(ownerReference, value);\n };\n resolveGenericType = (path) => {\n const ownerReference = this.resolveType(path);\n const value = new GenericType(ownerReference.value);\n return GenericTypeImplicitReference.create(ownerReference, value);\n };\n resolveOwnProperty = (pointer) => {\n assertNonEmptyString(pointer.class, `Property pointer 'class' field is missing or empty`);\n assertNonEmptyString(pointer.property, `Property pointer 'property' field is missing or empty`);\n const ownerReference = this.resolvePropertyOwner(pointer.class);\n const value = getOwnProperty(ownerReference.value, pointer.property);\n return PropertyImplicitReference.create(ownerReference, value);\n };\n resolveProperty = (pointer) => {\n assertNonEmptyString(pointer.class, `Property pointer 'class' field is missing or empty`);\n assertNonEmptyString(pointer.property, `Property pointer 'property' field is missing or empty`);\n const ownerReference = this.resolveClass(pointer.class);\n const value = getClassProperty(ownerReference.value, pointer.property);\n return PropertyImplicitReference.create(ownerReference, value);\n };\n resolveRootFlatDataRecordType = (classMapping) => {\n assertNonEmptyString(classMapping.flatData, `Flat-data class mapping 'flatData' field is missing or empty`);\n assertNonEmptyString(classMapping.sectionName, `Flat-data class mapping 'sectionName' field is missing or empty`);\n const ownerReference = this.resolveFlatDataStore(classMapping.flatData);\n const value = getRootRecordType(getSection(ownerReference.value, classMapping.sectionName));\n return RootFlatDataRecordTypeImplicitReference.create(ownerReference, value);\n };\n resolveRelation = (tablePtr) => {\n assertNonEmptyString(tablePtr.database, `Table pointer 'database' field is missing or empty`);\n assertNonEmptyString(tablePtr.schema, `Table pointer 'schema' field is missing or empty`);\n assertNonEmptyString(tablePtr.table, `Table pointer 'table' field is missing or empty`);\n const ownerReference = this.resolveDatabase(tablePtr.database);\n const value = V1_getRelation(ownerReference.value, tablePtr.schema, tablePtr.table);\n return createImplicitRelationReference(ownerReference, value);\n };\n resolveJoin = (joinPtr) => {\n assertNonEmptyString(joinPtr.db, `Join pointer 'db' field is missing or empty`);\n assertNonEmptyString(joinPtr.name, `Join pointer 'name' field is missing or empty`);\n const ownerReference = this.resolveDatabase(joinPtr.db);\n const value = getJoin(ownerReference.value, joinPtr.name);\n return JoinImplicitReference.create(ownerReference, value);\n };\n resolveFilter = (filterPtr) => {\n assertNonEmptyString(filterPtr.db, `Filter pointer 'db' field is missing or empty`);\n assertNonEmptyString(filterPtr.name, `Filter pointer 'name' field is missing or empty`);\n const ownerReference = this.resolveDatabase(filterPtr.db);\n const value = getFilter(ownerReference.value, filterPtr.name);\n return FilterImplicitReference.create(ownerReference, value);\n };\n resolveEnumValue = (enumeration, enumValue) => {\n const ownerReference = this.resolveEnumeration(enumeration);\n const value = getEnumValue(ownerReference.value, enumValue);\n return EnumValueImplicitReference.create(ownerReference, value);\n };\n resolveElement = (path, includePackage) => this.createImplicitPackageableElementReference(path, (_path) => this.graph.getElement(_path, includePackage));\n resolveType = (path) => this.createImplicitPackageableElementReference(path, this.graph.getType);\n resolveDataType = (path) => this.createImplicitPackageableElementReference(path, (_path) => guaranteeType(this.graph.getType(_path), DataType, `Can't find data type '${_path}'`));\n resolveProfile = (path) => this.createImplicitPackageableElementReference(path, this.graph.getProfile);\n resolveClass = (path) => this.createImplicitPackageableElementReference(path, this.graph.getClass);\n resolveEnumeration = (path) => this.createImplicitPackageableElementReference(path, this.graph.getEnumeration);\n resolveMeasure = (path) => this.createImplicitPackageableElementReference(path, this.graph.getMeasure);\n resolveUnit = (path) => this.createImplicitPackageableElementReference(path, this.graph.getUnit);\n resolveAssociation = (path) => this.createImplicitPackageableElementReference(path, this.graph.getAssociation);\n resolvePropertyOwner = (path) => this.createImplicitPackageableElementReference(path, this.graph.getPropertyOwner);\n resolveFunction = (path) => this.createImplicitPackageableElementReference(path, this.graph.getFunction);\n resolveStore = (path) => this.createImplicitPackageableElementReference(path, this.graph.getStore);\n resolveFlatDataStore = (path) => this.createImplicitPackageableElementReference(path, this.graph.getFlatDataStore);\n resolveDatabase = (path) => this.createImplicitPackageableElementReference(path, this.graph.getDatabase);\n resolveMapping = (path) => this.createImplicitPackageableElementReference(path, this.graph.getMapping);\n resolveService = (path) => this.createImplicitPackageableElementReference(path, this.graph.getService);\n resolveConnection = (path) => this.createImplicitPackageableElementReference(path, this.graph.getConnection);\n resolveRuntime = (path) => this.createImplicitPackageableElementReference(path, this.graph.getRuntime);\n resolveGenerationSpecification = (path) => this.createImplicitPackageableElementReference(path, this.graph.getGenerationSpecification);\n resolveFileGeneration = (path) => this.createImplicitPackageableElementReference(path, this.graph.getFileGeneration);\n resolveDataElement = (path) => this.createImplicitPackageableElementReference(path, this.graph.getDataElement);\n}\nexport class V1_GraphBuilderContextBuilder {\n log;\n /**\n * The (sub) graph where the current processing is taking place.\n * This information is important because each sub-graph holds their\n * own indexes for elements they are responsible for.\n *\n * e.g. dependency graph, generation graph, system graph, etc.\n */\n currentSubGraph;\n extensions;\n graph;\n sectionImports = [];\n section;\n options;\n constructor(graph, currentSubGraph, extensions, log, options) {\n this.graph = graph;\n this.currentSubGraph = currentSubGraph;\n this.extensions = extensions;\n this.log = log;\n this.options = options;\n }\n withElement(element) {\n const section = this.graph.getOwnNullableSection(element.path);\n return this.withSection(section);\n }\n withSection(section) {\n this.section = section;\n if (section instanceof ImportAwareCodeSection) {\n this.sectionImports = this.sectionImports.concat(section.imports.map((i) => i.value));\n }\n this.sectionImports = uniq(this.sectionImports); // remove duplicates\n return this;\n }\n build() {\n return new V1_GraphBuilderContext(this);\n }\n}\n//# sourceMappingURL=V1_GraphBuilderContext.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 { assertNonEmptyString, assertTrue, AssertionError, } from '@finos/legend-shared';\nimport { addElementToPackage, getOrCreateGraphPackage, } from '../../../../../../../graph/helpers/DomainHelper.js';\nimport { V1_buildFullPath, } from './V1_GraphBuilderContext.js';\nexport const V1_checkDuplicatedElement = (path, context, cache) => {\n if (cache) {\n if (cache.has(path)) {\n throw new AssertionError(`Element '${path}' already exists`);\n }\n else {\n cache.add(path);\n }\n }\n else {\n assertTrue(!context.graph.getNullableElement(path), `Element '${path}' already exists`);\n }\n};\n/**\n * Element builder is a mechanism to handling the building process of\n * element.\n * - Each builder focuses on only 1 element type.\n * - Each builder specifies prerequisites element types so that while\n * building the Pure graph, we can order the builders appropriately.\n * - Each builder has 5 passes. NOTE: not all elements require 5-pass\n * building process. But this should give enough flexibility on how\n * elements can be processed.\n *\n * NOTE: we aim to have the first pass to be relatively simple: just build\n * the basic element, index it and put it in the element tree based on its\n * path. Since this common task is required by many other builder processes,\n * the first pass will be run first and separately from other passes.\n *\n * Also note that as of right now we will run build pass 2-5 of each element\n * consecutively so there is no opportunity to `interleave` build passes of\n * different elements. That definitely seems more flexible, but also incur\n * a fair amount of complexity we don't see the need for right now.\n */\nexport class V1_ElementBuilder {\n elementClassName;\n _class;\n prerequisites = [];\n firstPass;\n secondPass;\n thirdPass;\n fourthPass;\n fifthPass;\n constructor(props) {\n this.elementClassName = props.elementClassName;\n this._class = props._class;\n this.prerequisites = props.prerequisites ?? [];\n this.firstPass = props.firstPass;\n this.secondPass = props.secondPass;\n this.thirdPass = props.thirdPass;\n this.fourthPass = props.fourthPass;\n this.fifthPass = props.fifthPass;\n }\n getElementProtocolClass() {\n return this._class;\n }\n getPrerequisiteElementProtocolClasses() {\n return this.prerequisites;\n }\n runFirstPass(elementProtocol, context, packageCache, elementPathCache) {\n assertNonEmptyString(elementProtocol.package, `Element 'package' field is missing or empty`);\n assertNonEmptyString(elementProtocol.name, `Element 'name' field is missing or empty`);\n const path = V1_buildFullPath(elementProtocol.package, elementProtocol.name);\n V1_checkDuplicatedElement(path, context, elementPathCache);\n const element = this.firstPass(elementProtocol, context);\n addElementToPackage(getOrCreateGraphPackage(context.currentSubGraph, elementProtocol.package, packageCache), element);\n return element;\n }\n runSecondPass(elementProtocol, context) {\n this.secondPass?.(elementProtocol, context);\n }\n runThirdPass(elementProtocol, context) {\n this.thirdPass?.(elementProtocol, context);\n }\n runFourthPass(elementProtocol, context) {\n this.fourthPass?.(elementProtocol, context);\n }\n runFifthPass(elementProtocol, context) {\n this.fifthPass?.(elementProtocol, context);\n }\n}\n//# sourceMappingURL=V1_ElementBuilder.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, IllegalStateError, isNonNullable, UnsupportedOperationError, } from '@finos/legend-shared';\nimport { PurePropertyMapping } from '../../../../../../../graph/metamodel/pure/packageableElements/store/modelToModel/mapping/PurePropertyMapping.js';\nimport { Enum } from '../../../../../../../graph/metamodel/pure/packageableElements/domain/Enum.js';\nimport { ObjectInputData, ObjectInputType, } from '../../../../../../../graph/metamodel/pure/packageableElements/store/modelToModel/mapping/ObjectInputData.js';\nimport { FlatDataInputData } from '../../../../../../../graph/metamodel/pure/packageableElements/store/flatData/mapping/FlatDataInputData.js';\nimport { ExpectedOutputMappingTestAssert } from '../../../../../../../graph/metamodel/pure/packageableElements/mapping/ExpectedOutputMappingTestAssert.js';\nimport { extractLine } from '../../../../../../../graph/metamodel/pure/packageableElements/store/relational/model/RelationalOperationElement.js';\nimport { FlatDataPropertyMapping } from '../../../../../../../graph/metamodel/pure/packageableElements/store/flatData/mapping/FlatDataPropertyMapping.js';\nimport { OperationType, } from '../../../../../../../graph/metamodel/pure/packageableElements/mapping/OperationSetImplementation.js';\nimport { RelationalPropertyMapping } from '../../../../../../../graph/metamodel/pure/packageableElements/store/relational/mapping/RelationalPropertyMapping.js';\nimport { RelationalAssociationImplementation } from '../../../../../../../graph/metamodel/pure/packageableElements/mapping/RelationalAssociationImplementation.js';\nimport { V1_initPackageableElement, V1_transformElementReferencePointer, V1_transformMultiplicity, } from './V1_CoreTransformerHelper.js';\nimport { V1_Mapping } from '../../../model/packageableElements/mapping/V1_Mapping.js';\nimport { V1_EnumValueMapping, V1_EnumValueMappingEnumSourceValue, V1_EnumValueMappingIntegerSourceValue, V1_EnumValueMappingStringSourceValue, } from '../../../model/packageableElements/mapping/V1_EnumValueMapping.js';\nimport { V1_RelationalAssociationMapping } from '../../../model/packageableElements/store/relational/mapping/V1_RelationalAssociationMapping.js';\nimport { V1_ObjectInputData, V1_ObjectInputType, } from '../../../model/packageableElements/store/modelToModel/mapping/V1_ObjectInputData.js';\nimport { V1_FlatDataInputData } from '../../../model/packageableElements/store/flatData/mapping/V1_FlatDataInputData.js';\nimport { V1_ExpectedOutputMappingTestAssert } from '../../../model/packageableElements/mapping/V1_ExpectedOutputMappingTestAssert.js';\nimport { V1_DEPRECATED__MappingTest } from '../../../model/packageableElements/mapping/V1_DEPRECATED__MappingTest.js';\nimport { V1_RawValueSpecificationTransformer } from './V1_RawValueSpecificationTransformer.js';\nimport { V1_MappingInclude } from '../../../model/packageableElements/mapping/V1_MappingInclude.js';\nimport { V1_EnumerationMapping } from '../../../model/packageableElements/mapping/V1_EnumerationMapping.js';\nimport { V1_FlatDataPropertyMapping } from '../../../model/packageableElements/store/flatData/mapping/V1_FlatDataPropertyMapping.js';\nimport { V1_PropertyPointer } from '../../../model/packageableElements/domain/V1_PropertyPointer.js';\nimport { V1_EmbeddedFlatDataPropertyMapping } from '../../../model/packageableElements/store/flatData/mapping/V1_EmbeddedFlatDataPropertyMapping.js';\nimport { V1_PurePropertyMapping } from '../../../model/packageableElements/store/modelToModel/mapping/V1_PurePropertyMapping.js';\nimport { V1_RelationalPropertyMapping } from '../../../model/packageableElements/store/relational/mapping/V1_RelationalPropertyMapping.js';\nimport { V1_transformRelationalOperationElement, V1_transformTableAliasToTablePointer, } from './V1_DatabaseTransformer.js';\nimport { V1_EmbeddedRelationalPropertyMapping } from '../../../model/packageableElements/store/relational/mapping/V1_EmbeddedRelationalPropertyMapping.js';\nimport { V1_InlineEmbeddedPropertyMapping } from '../../../model/packageableElements/store/relational/mapping/V1_InlineEmbeddedPropertyMapping.js';\nimport { V1_OtherwiseEmbeddedRelationalPropertyMapping } from '../../../model/packageableElements/store/relational/mapping/V1_OtherwiseEmbeddedRelationalPropertyMapping.js';\nimport { V1_RelationalClassMapping } from '../../../model/packageableElements/store/relational/mapping/V1_RelationalClassMapping.js';\nimport { V1_MappingOperationType, V1_OperationClassMapping, } from '../../../model/packageableElements/mapping/V1_OperationClassMapping.js';\nimport { V1_PureInstanceClassMapping } from '../../../model/packageableElements/store/modelToModel/mapping/V1_PureInstanceClassMapping.js';\nimport { V1_RootFlatDataClassMapping } from '../../../model/packageableElements/store/flatData/mapping/V1_RootFlatDataClassMapping.js';\nimport { V1_RootRelationalClassMapping } from '../../../model/packageableElements/store/relational/mapping/V1_RootRelationalClassMapping.js';\nimport { V1_AggregationAwareClassMapping } from '../../../model/packageableElements/store/relational/mapping/aggregationAware/V1_AggregationAwareClassMapping.js';\nimport { V1_AggregationAwarePropertyMapping } from '../../../model/packageableElements/store/relational/mapping/aggregationAware/V1_AggregationAwarePropertyMapping.js';\nimport { V1_AggregateSetImplementationContainer } from '../../../model/packageableElements/store/relational/mapping/aggregationAware/V1_AggregateSetImplementationContainer.js';\nimport { V1_AggregateSpecification } from '../../../model/packageableElements/store/relational/mapping/aggregationAware/V1_AggregateSpecification.js';\nimport { V1_AggregateFunction } from '../../../model/packageableElements/store/relational/mapping/aggregationAware/V1_AggregateFunction.js';\nimport { V1_GroupByFunction } from '../../../model/packageableElements/store/relational/mapping/aggregationAware/V1_GroupByFunction.js';\nimport { V1_XStorePropertyMapping } from '../../../model/packageableElements/mapping/xStore/V1_XStorePropertyMapping.js';\nimport { XStoreAssociationImplementation } from '../../../../../../../graph/metamodel/pure/packageableElements/mapping/xStore/XStoreAssociationImplementation.js';\nimport { V1_XStoreAssociationMapping } from '../../../model/packageableElements/mapping/xStore/V1_XStoreAssociationMapping.js';\nimport { V1_LocalMappingPropertyInfo } from '../../../model/packageableElements/mapping/V1_LocalMappingPropertyInfo.js';\nimport { V1_FilterMapping } from '../../../model/packageableElements/store/relational/mapping/V1_FilterMapping.js';\nimport { V1_FilterPointer } from '../../../model/packageableElements/store/relational/mapping/V1_FilterPointer.js';\nimport { V1_JoinPointer } from '../../../model/packageableElements/store/relational/model/V1_JoinPointer.js';\nimport { RelationalInputData } from '../../../../../../../graph/metamodel/pure/packageableElements/store/relational/mapping/RelationalInputData.js';\nimport { V1_RelationalInputData } from '../../../model/packageableElements/store/relational/mapping/V1_RelationalInputData.js';\nimport { PackageableElementPointerType } from '../../../../../../../graph/MetaModelConst.js';\nimport { V1_BindingTransformer } from '../../../model/packageableElements/externalFormat/store/V1_DSL_ExternalFormat_BindingTransformer.js';\nimport { V1_MergeOperationClassMapping } from '../../../model/packageableElements/mapping/V1_MergeOperationClassMapping.js';\nimport { MergeOperationSetImplementation } from '../../../../../../../graph/metamodel/pure/packageableElements/mapping/MergeOperationSetImplementation.js';\nimport { isStubbed_EnumValueMapping } from '../../../../../../../graph/helpers/creator/DSL_Mapping_ModelCreatorHelper.js';\nimport { isStubbed_RawLambda } from '../../../../../../../graph/helpers/creator/RawValueSpecificationCreatorHelper.js';\nimport { isStubbed_RawRelationalOperationElement } from '../../../../../../../graph/helpers/creator/STO_Relational_ModelCreatorHelper.js';\nimport { pruneSourceInformation } from '../../../../../../../graph/MetaModelUtils.js';\nimport { FlatDataAssociationImplementation } from '../../../../../../../graph/metamodel/pure/packageableElements/store/flatData/mapping/FlatDataAssociationImplementation.js';\nimport { V1_FlatDataAssociationMapping } from '../../../model/packageableElements/store/flatData/mapping/V1_FlatDataAssociationMapping.js';\nimport { V1_FlatDataAssociationPropertyMapping } from '../../../model/packageableElements/store/flatData/mapping/V1_FlatDataAssociationPropertyMapping.js';\nimport { V1_MappingTest } from '../../../model/packageableElements/mapping/V1_MappingTest.js';\nimport { V1_transformAtomicTest, V1_transformTestAssertion, V1_transformTestSuite, } from './V1_TestTransformer.js';\nimport { V1_MappingTestSuite } from '../../../model/packageableElements/mapping/V1_MappingTestSuite.js';\nimport { V1_StoreTestData } from '../../../model/packageableElements/mapping/V1_StoreTestData.js';\nimport { V1_transformEmbeddedData } from './V1_DataElementTransformer.js';\nexport const V1_transformPropertyReference = (element, options) => {\n const property = new V1_PropertyPointer();\n property.class =\n options?.isTransformingEmbeddedPropertyMapping ||\n options?.isTransformingLocalPropertyMapping\n ? undefined\n : element.ownerReference.valueForSerialization ?? '';\n property.property = element.value.name;\n return property;\n};\nconst mappingElementIdSerializer = (value) => value.valueForSerialization;\nconst transformLocalPropertyInfo = (value) => {\n const localPropertyInfo = new V1_LocalMappingPropertyInfo();\n localPropertyInfo.type =\n value.localMappingPropertyType.valueForSerialization ?? '';\n localPropertyInfo.multiplicity = V1_transformMultiplicity(value.localMappingPropertyMultiplicity);\n return localPropertyInfo;\n};\nconst transformEnumValueMapping = (element) => {\n const enumValueMapping = new V1_EnumValueMapping();\n enumValueMapping.enumValue = element.enum.value.name;\n enumValueMapping.sourceValues = element.sourceValues\n .filter(isNonNullable)\n .map((value) => {\n if (typeof value.value === 'string') {\n const _string = new V1_EnumValueMappingStringSourceValue();\n _string.value = value.value;\n return _string;\n }\n else if (typeof value.value === 'number') {\n const _integer = new V1_EnumValueMappingIntegerSourceValue();\n _integer.value = value.value;\n return _integer;\n }\n else if (value.value instanceof Enum) {\n const _enum = new V1_EnumValueMappingEnumSourceValue();\n _enum.value = value.value.name;\n _enum.enumeration = value.value._OWNER.path;\n return _enum;\n }\n throw new UnsupportedOperationError(`Can't transform enum value mapping`, value);\n });\n return enumValueMapping;\n};\nconst transformEnumerationMapping = (element) => {\n const enumerationMapping = new V1_EnumerationMapping();\n enumerationMapping.enumValueMappings = element.enumValueMappings\n .filter((e) => !isStubbed_EnumValueMapping(e))\n .map(transformEnumValueMapping);\n enumerationMapping.enumeration =\n element.enumeration.valueForSerialization ?? '';\n enumerationMapping.id = mappingElementIdSerializer(element.id);\n return enumerationMapping;\n};\n// Mapping Test\nexport const V1_getObjectInputType = (type) => {\n switch (type) {\n case ObjectInputType.JSON:\n return V1_ObjectInputType.JSON;\n case ObjectInputType.XML:\n return V1_ObjectInputType.XML;\n default:\n throw new UnsupportedOperationError(`Encountered unsupported object input type '${type}'`);\n }\n};\nconst transformObjectInputData = (element) => {\n const inputData = new V1_ObjectInputData();\n inputData.data = element.data;\n inputData.inputType = V1_getObjectInputType(element.inputType);\n inputData.sourceClass = element.sourceClass.valueForSerialization ?? '';\n return inputData;\n};\nconst transformFlatDataInputData = (element) => {\n const inputData = new V1_FlatDataInputData();\n inputData.data = element.data;\n inputData.sourceFlatData = V1_transformElementReferencePointer(PackageableElementPointerType.STORE, element.sourceFlatData);\n return inputData;\n};\nconst transformRelationalInputData = (element) => {\n const inputData = new V1_RelationalInputData();\n inputData.data = element.data;\n inputData.inputType = element.inputType;\n inputData.database = element.database.valueForSerialization ?? '';\n return inputData;\n};\nconst transformExpectedOutputMappingTestAssert = (element) => {\n const assert = new V1_ExpectedOutputMappingTestAssert();\n assert.expectedOutput = element.expectedOutput;\n return assert;\n};\nconst transformMappingTestInputData = (inputData) => {\n if (inputData instanceof ObjectInputData) {\n return transformObjectInputData(inputData);\n }\n else if (inputData instanceof FlatDataInputData) {\n return transformFlatDataInputData(inputData);\n }\n else if (inputData instanceof RelationalInputData) {\n return transformRelationalInputData(inputData);\n }\n throw new UnsupportedOperationError(`Can't transform mapping test input data`, inputData);\n};\nconst transformTestAssert = (mappingTestAssert) => {\n if (mappingTestAssert instanceof ExpectedOutputMappingTestAssert) {\n return transformExpectedOutputMappingTestAssert(mappingTestAssert);\n }\n throw new UnsupportedOperationError(`Can't transform mapping test assert`, mappingTestAssert);\n};\nconst transformMappingTestLegacy = (element, context) => {\n const test = new V1_DEPRECATED__MappingTest();\n test.assert = transformTestAssert(element.assert);\n test.inputData = element.inputData.map(transformMappingTestInputData);\n test.name = element.name;\n test.query = element.query.accept_RawValueSpecificationVisitor(new V1_RawValueSpecificationTransformer(context));\n return test;\n};\nconst transformStoreTestData = (element, context) => {\n const testData = new V1_StoreTestData();\n testData.data = V1_transformEmbeddedData(element.data, context);\n testData.store = element.store.valueForSerialization ?? '';\n return testData;\n};\nexport const V1_transformMappingTest = (element, context) => {\n const mappingTest = new V1_MappingTest();\n mappingTest.id = element.id;\n mappingTest.assertions = element.assertions.map((assertion) => V1_transformTestAssertion(assertion));\n mappingTest.query = element.query.accept_RawValueSpecificationVisitor(new V1_RawValueSpecificationTransformer(context));\n return mappingTest;\n};\nexport const V1_transformMappingTestSuite = (element, context) => {\n const mappingTestSuite = new V1_MappingTestSuite();\n mappingTestSuite.id = element.id;\n mappingTestSuite.storeTestDatas = element.storeTestDatas.map((testData) => transformStoreTestData(testData, context));\n mappingTestSuite.tests = element.tests.map((test) => V1_transformAtomicTest(test, context));\n return mappingTestSuite;\n};\n// Include Mapping\nconst transformMappingInclude = (element) => {\n const mappingInclude = new V1_MappingInclude();\n mappingInclude.includedMapping = element.included.valueForSerialization ?? '';\n mappingInclude.sourceDatabasePath = element.storeSubstitutions.length\n ? element.storeSubstitutions[0].original\n .valueForSerialization ?? ''\n : undefined;\n mappingInclude.targetDatabasePath = element.storeSubstitutions.length\n ? element.storeSubstitutions[0].substitute\n .valueForSerialization ?? ''\n : undefined;\n return mappingInclude;\n};\n// Class Mapping\nconst transformClassMappingPropertyMappings = (values, isTransformingEmbeddedPropertyMapping, context) => values\n .filter((value) => {\n if (value instanceof PurePropertyMapping) {\n return !isStubbed_RawLambda(value.transform);\n }\n else if (value instanceof FlatDataPropertyMapping) {\n return !isStubbed_RawLambda(value.transform);\n }\n else if (value instanceof RelationalPropertyMapping) {\n return !isStubbed_RawRelationalOperationElement(value.relationalOperation);\n }\n const checkerResult = context.plugins\n .flatMap((plugin) => plugin.getExtraPropertyMappingTransformationExcludabilityCheckers?.() ??\n [])\n .map((checker) => checker(value))\n .filter(isNonNullable);\n return !checkerResult.length || checkerResult.some(Boolean);\n})\n .map((value) => transformProperyMapping(value, isTransformingEmbeddedPropertyMapping, context));\nconst transformSimpleFlatDataPropertyMapping = (element, context) => {\n const flatDataPropertyMapping = new V1_FlatDataPropertyMapping();\n flatDataPropertyMapping.enumMappingId =\n element.transformer?.valueForSerialization;\n flatDataPropertyMapping.property = V1_transformPropertyReference(element.property);\n flatDataPropertyMapping.source =\n element.sourceSetImplementation.valueForSerialization;\n flatDataPropertyMapping.target =\n element.targetSetImplementation?.valueForSerialization;\n if (!isStubbed_RawLambda(element.transform)) {\n flatDataPropertyMapping.transform =\n element.transform.accept_RawValueSpecificationVisitor(new V1_RawValueSpecificationTransformer(context));\n }\n return flatDataPropertyMapping;\n};\nconst transformFlatDataAssociationPropertyMapping = (element, context) => {\n const flatDataAssociationPropertyMapping = new V1_FlatDataAssociationPropertyMapping();\n flatDataAssociationPropertyMapping.property = V1_transformPropertyReference(element.property);\n flatDataAssociationPropertyMapping.source =\n element.sourceSetImplementation.valueForSerialization;\n flatDataAssociationPropertyMapping.target =\n element.targetSetImplementation?.valueForSerialization;\n flatDataAssociationPropertyMapping.flatData = element.flatData;\n flatDataAssociationPropertyMapping.sectionName = element.sectionName;\n return flatDataAssociationPropertyMapping;\n};\nconst transformEmbeddedFlatDataPropertyMapping = (element, context) => {\n const embedded = new V1_EmbeddedFlatDataPropertyMapping();\n const id = mappingElementIdSerializer(element.id);\n if (id) {\n embedded.id = id;\n }\n embedded.class = element.class.valueForSerialization ?? '';\n embedded.property = V1_transformPropertyReference(element.property); // TODO: we might ned to turn 'isTransformingEmbeddedPropertyMapping' on in the future once we start working on the gramar roundtrip for flat-data\n embedded.propertyMappings = transformClassMappingPropertyMappings(element.propertyMappings, false, // TODO: we might ned to turn this on in the future once we start working on the gramar roundtrip for flat-data\n context);\n embedded.root = false;\n embedded.source = element.sourceSetImplementation.valueForSerialization;\n embedded.target = element.targetSetImplementation?.valueForSerialization;\n return embedded;\n};\nconst transformPurePropertyMapping = (element, context) => {\n const purePropertyMapping = new V1_PurePropertyMapping();\n purePropertyMapping.enumMappingId =\n element.transformer?.valueForSerialization;\n purePropertyMapping.property = V1_transformPropertyReference(element.property, {\n isTransformingLocalPropertyMapping: Boolean(element.localMappingProperty),\n });\n purePropertyMapping.source =\n element.sourceSetImplementation.valueForSerialization;\n purePropertyMapping.target =\n element.targetSetImplementation?.valueForSerialization;\n if (!isStubbed_RawLambda(element.transform)) {\n purePropertyMapping.transform =\n element.transform.accept_RawValueSpecificationVisitor(new V1_RawValueSpecificationTransformer(context));\n }\n if (element.localMappingProperty) {\n purePropertyMapping.localMappingProperty = transformLocalPropertyInfo(element.localMappingProperty);\n }\n purePropertyMapping.explodeProperty = element.explodeProperty;\n return purePropertyMapping;\n};\nconst transformRelationalPropertyMapping = (element, isTransformingEmbeddedPropertyMapping, context) => {\n const propertyMapping = new V1_RelationalPropertyMapping();\n propertyMapping.enumMappingId = element.transformer?.valueForSerialization;\n propertyMapping.property = V1_transformPropertyReference(element.property, {\n isTransformingEmbeddedPropertyMapping: isTransformingEmbeddedPropertyMapping,\n isTransformingLocalPropertyMapping: Boolean(element.localMappingProperty),\n });\n // Prune source information from the operation\n // NOTE: if in the future, source information is stored under different key,\n // e.g. { \"classPointerSourceInformation\": ... }\n // we need to use the prune source information method from `V1_PureGraphManager`\n propertyMapping.relationalOperation = (context.keepSourceInformation\n ? element.relationalOperation\n : pruneSourceInformation(element.relationalOperation));\n propertyMapping.source =\n element.sourceSetImplementation.valueForSerialization;\n propertyMapping.target =\n element.targetSetImplementation?.valueForSerialization;\n if (element.bindingTransformer?.binding) {\n const bindingTransformer = new V1_BindingTransformer();\n bindingTransformer.binding = guaranteeNonEmptyString(element.bindingTransformer.binding.valueForSerialization);\n propertyMapping.bindingTransformer = bindingTransformer;\n }\n if (element.localMappingProperty) {\n propertyMapping.localMappingProperty = transformLocalPropertyInfo(element.localMappingProperty);\n }\n return propertyMapping;\n};\nconst transformEmbeddedRelationalPropertyMapping = (element, isTransformingEmbeddedPropertyMapping, context) => {\n const embedded = new V1_EmbeddedRelationalPropertyMapping();\n embedded.property = V1_transformPropertyReference(element.property, {\n isTransformingEmbeddedPropertyMapping: isTransformingEmbeddedPropertyMapping,\n });\n embedded.source = element.sourceSetImplementation.valueForSerialization;\n embedded.target = element.targetSetImplementation?.valueForSerialization;\n const classMapping = new V1_RelationalClassMapping();\n classMapping.primaryKey = element.primaryKey.map((pk) => V1_transformRelationalOperationElement(pk, context));\n classMapping.propertyMappings = transformClassMappingPropertyMappings(element.propertyMappings, true, context);\n classMapping.root = element.root.valueForSerialization;\n /**\n * Omit this information during protocol transformation as it can be\n * interpreted while building the graph; and will help grammar-roundtrip\n * tests (involving engine) to pass. Ideally, this requires grammar parser\n * and composer in engine to be more consistent.\n *\n * @discrepancy grammar-roundtrip\n */\n classMapping.class = undefined;\n embedded.classMapping = classMapping;\n if (element.localMappingProperty) {\n embedded.localMappingProperty = transformLocalPropertyInfo(element.localMappingProperty);\n }\n return embedded;\n};\nconst transformInlineEmbeddedRelationalPropertyMapping = (element, isTransformingEmbeddedPropertyMapping) => {\n const embedded = new V1_InlineEmbeddedPropertyMapping();\n embedded.property = V1_transformPropertyReference(element.property, {\n isTransformingEmbeddedPropertyMapping: isTransformingEmbeddedPropertyMapping,\n });\n embedded.source = element.sourceSetImplementation.valueForSerialization;\n embedded.target = element.targetSetImplementation?.valueForSerialization;\n embedded.setImplementationId = element.inlineSetImplementation.id.value;\n if (element.localMappingProperty) {\n embedded.localMappingProperty = transformLocalPropertyInfo(element.localMappingProperty);\n }\n return embedded;\n};\nconst transformOtherwiseEmbeddedRelationalPropertyMapping = (element, isTransformingEmbeddedPropertyMapping, context) => {\n const embedded = new V1_OtherwiseEmbeddedRelationalPropertyMapping();\n embedded.property = V1_transformPropertyReference(element.property, {\n isTransformingEmbeddedPropertyMapping: isTransformingEmbeddedPropertyMapping,\n });\n embedded.source = element.sourceSetImplementation.valueForSerialization;\n embedded.target = element.targetSetImplementation?.valueForSerialization;\n const classMapping = new V1_RelationalClassMapping();\n classMapping.primaryKey = element.primaryKey.map((pk) => V1_transformRelationalOperationElement(pk, context));\n classMapping.propertyMappings = transformClassMappingPropertyMappings(element.propertyMappings, true, context);\n classMapping.root = element.root.valueForSerialization;\n /**\n * Omit this information during protocol transformation as it can be\n * interpreted while building the graph; and will help grammar-roundtrip\n * tests (involving engine) to pass. Ideally, this requires grammar parser\n * and composer in engine to be more consistent.\n *\n * @discrepancy grammar-roundtrip\n */\n classMapping.class = undefined;\n embedded.classMapping = classMapping;\n embedded.otherwisePropertyMapping = transformProperyMapping(element.otherwisePropertyMapping, true, context);\n // use the same property as the parent otherwise\n embedded.otherwisePropertyMapping.property = embedded.property;\n if (element.localMappingProperty) {\n embedded.localMappingProperty = transformLocalPropertyInfo(element.localMappingProperty);\n }\n return embedded;\n};\nconst transformXStorePropertyMapping = (element, context) => {\n const xstore = new V1_XStorePropertyMapping();\n xstore.property = V1_transformPropertyReference(element.property);\n xstore.source = element.sourceSetImplementation.valueForSerialization;\n xstore.target = element.targetSetImplementation?.valueForSerialization;\n if (!isStubbed_RawLambda(element.crossExpression)) {\n xstore.crossExpression =\n element.crossExpression.accept_RawValueSpecificationVisitor(new V1_RawValueSpecificationTransformer(context));\n }\n if (element.localMappingProperty) {\n xstore.localMappingProperty = transformLocalPropertyInfo(element.localMappingProperty);\n }\n return xstore;\n};\nconst transformAggregationAwarePropertyMapping = (element) => {\n const propertyMapping = new V1_AggregationAwarePropertyMapping();\n propertyMapping.property = V1_transformPropertyReference(element.property);\n propertyMapping.source =\n element.sourceSetImplementation.valueForSerialization;\n propertyMapping.target =\n element.targetSetImplementation?.valueForSerialization;\n if (element.localMappingProperty) {\n propertyMapping.localMappingProperty = transformLocalPropertyInfo(element.localMappingProperty);\n }\n return propertyMapping;\n};\nclass PropertyMappingTransformer {\n isTransformingEmbeddedPropertyMapping = false;\n context;\n constructor(isTransformingEmbeddedPropertyMapping, context) {\n this.isTransformingEmbeddedPropertyMapping =\n isTransformingEmbeddedPropertyMapping;\n this.context = context;\n }\n visit_PropertyMapping(propertyMapping) {\n const extraPropertyMappingTransformers = this.context.plugins.flatMap((plugin) => plugin.V1_getExtraPropertyMappingTransformers?.() ?? []);\n for (const transformer of extraPropertyMappingTransformers) {\n const propertyMappingProtocol = transformer(propertyMapping, this.context);\n if (propertyMappingProtocol) {\n return propertyMappingProtocol;\n }\n }\n throw new UnsupportedOperationError(`Can't transform property mapping: no compatible transformer available from plugins`, propertyMapping);\n }\n visit_PurePropertyMapping(propertyMapping) {\n return transformPurePropertyMapping(propertyMapping, this.context);\n }\n visit_FlatDataPropertyMapping(propertyMapping) {\n return transformSimpleFlatDataPropertyMapping(propertyMapping, this.context);\n }\n visit_FlatDataAssociationPropertyMapping(propertyMapping) {\n return transformFlatDataAssociationPropertyMapping(propertyMapping, this.context);\n }\n visit_EmbeddedFlatDataPropertyMapping(propertyMapping) {\n return transformEmbeddedFlatDataPropertyMapping(propertyMapping, this.context);\n }\n visit_RelationalPropertyMapping(propertyMapping) {\n return transformRelationalPropertyMapping(propertyMapping, this.isTransformingEmbeddedPropertyMapping, this.context);\n }\n visit_EmbeddedRelationalPropertyMapping(propertyMapping) {\n return transformEmbeddedRelationalPropertyMapping(propertyMapping, this.isTransformingEmbeddedPropertyMapping, this.context);\n }\n visit_InlineEmbeddedRelationalPropertyMapping(propertyMapping) {\n return transformInlineEmbeddedRelationalPropertyMapping(propertyMapping, this.isTransformingEmbeddedPropertyMapping);\n }\n visit_OtherwiseEmbeddedRelationalPropertyMapping(propertyMapping) {\n return transformOtherwiseEmbeddedRelationalPropertyMapping(propertyMapping, this.isTransformingEmbeddedPropertyMapping, this.context);\n }\n visit_XStorePropertyMapping(propertyMapping) {\n return transformXStorePropertyMapping(propertyMapping, this.context);\n }\n visit_AggregationAwarePropertyMapping(propertyMapping) {\n return transformAggregationAwarePropertyMapping(propertyMapping);\n }\n}\nconst transformOperationType = (value) => {\n switch (value) {\n case OperationType.ROUTER_UNION:\n return V1_MappingOperationType.ROUTER_UNION;\n case OperationType.STORE_UNION:\n return V1_MappingOperationType.STORE_UNION;\n case OperationType.INHERITANCE:\n return V1_MappingOperationType.INHERITANCE;\n case OperationType.MERGE:\n return V1_MappingOperationType.MERGE;\n default:\n throw new UnsupportedOperationError(`Can't transform operation type`, value);\n }\n};\nconst transformOperationSetImplementation = (element) => {\n const classMapping = new V1_OperationClassMapping();\n classMapping.class = element.class.valueForSerialization ?? '';\n classMapping.id = mappingElementIdSerializer(element.id);\n classMapping.operation = transformOperationType(element.operation);\n classMapping.parameters = element.parameters.map((e) => e.setImplementation.value.id.value);\n classMapping.root = element.root.valueForSerialization;\n classMapping.extendsClassMappingId = element.superSetImplementationId;\n return classMapping;\n};\nconst transformMergeOperationSetImplementation = (element, context) => {\n const classMapping = new V1_MergeOperationClassMapping();\n classMapping.class = element.class.valueForSerialization ?? '';\n classMapping.id = mappingElementIdSerializer(element.id);\n classMapping.operation = transformOperationType(element.operation);\n classMapping.validationFunction =\n element.validationFunction.accept_RawValueSpecificationVisitor(new V1_RawValueSpecificationTransformer(context));\n classMapping.parameters = element.parameters.map((e) => e.setImplementation.value.id.value);\n classMapping.extendsClassMappingId = element.superSetImplementationId;\n classMapping.root = element.root.valueForSerialization;\n return classMapping;\n};\nconst transformPureInstanceSetImplementation = (element, context) => {\n const classMapping = new V1_PureInstanceClassMapping();\n classMapping.class = element.class.valueForSerialization ?? '';\n if (element.filter) {\n classMapping.filter = element.filter.accept_RawValueSpecificationVisitor(new V1_RawValueSpecificationTransformer(context));\n }\n classMapping.id = mappingElementIdSerializer(element.id);\n classMapping.propertyMappings = transformClassMappingPropertyMappings(element.propertyMappings, true, context);\n classMapping.extendsClassMappingId = element.superSetImplementationId;\n classMapping.root = element.root.valueForSerialization;\n classMapping.srcClass = element.srcClass?.valueForSerialization;\n return classMapping;\n};\nconst transformFlatDataInstanceSetImpl = (element, context) => {\n const classMapping = new V1_RootFlatDataClassMapping();\n classMapping.class = element.class.valueForSerialization ?? '';\n if (element.filter) {\n classMapping.filter = element.filter.accept_RawValueSpecificationVisitor(new V1_RawValueSpecificationTransformer(context));\n }\n classMapping.flatData =\n element.sourceRootRecordType.ownerReference.valueForSerialization ?? '';\n classMapping.id = mappingElementIdSerializer(element.id);\n classMapping.propertyMappings = transformClassMappingPropertyMappings(element.propertyMappings, true, context);\n classMapping.root = element.root.valueForSerialization;\n classMapping.extendsClassMappingId = element.superSetImplementationId;\n classMapping.sectionName = element.sourceRootRecordType.value._OWNER.name;\n return classMapping;\n};\nconst transformRootRelationalSetImpl = (element, context) => {\n const classMapping = new V1_RootRelationalClassMapping();\n classMapping.class = element.class.valueForSerialization ?? '';\n classMapping.distinct = element.distinct ?? false;\n classMapping.id = mappingElementIdSerializer(element.id);\n if (element.mainTableAlias) {\n classMapping.mainTable = V1_transformTableAliasToTablePointer(element.mainTableAlias);\n }\n classMapping.extendsClassMappingId = element.superSetImplementationId;\n classMapping.primaryKey = element.primaryKey.map((pk) => V1_transformRelationalOperationElement(pk, context));\n if (element.filter) {\n const filter = new V1_FilterMapping();\n const filterPointer = new V1_FilterPointer();\n filterPointer.db = element.filter.database.path;\n filterPointer.name = element.filter.filterName;\n filter.filter = filterPointer;\n filter.joins = element.filter.joinTreeNode\n ? extractLine(element.filter.joinTreeNode).map((node) => {\n const joinPtr = new V1_JoinPointer();\n joinPtr.db = node.join.ownerReference.valueForSerialization ?? '';\n joinPtr.joinType = node.joinType;\n joinPtr.name = node.join.value.name;\n return joinPtr;\n })\n : [];\n classMapping.filter = filter;\n }\n classMapping.propertyMappings = transformClassMappingPropertyMappings(element.propertyMappings, false, context);\n classMapping.root = element.root.valueForSerialization;\n return classMapping;\n};\nconst transformRelationalInstanceSetImpl = (element, context) => {\n const classMapping = new V1_RelationalClassMapping();\n classMapping.primaryKey = element.primaryKey.map((pk) => V1_transformRelationalOperationElement(pk, context));\n classMapping.extendsClassMappingId = element.superSetImplementationId;\n classMapping.propertyMappings = transformClassMappingPropertyMappings(element.propertyMappings, true, context);\n classMapping.root = element.root.valueForSerialization;\n /**\n * Omit this information during protocol transformation as it can be\n * interpreted while building the graph; and will help grammar-roundtrip\n * tests (involving engine) to pass. Ideally, this requires grammar parser\n * and composer in engine to be more consistent.\n *\n * @discrepancy grammar-roundtrip\n */\n classMapping.class = undefined;\n return classMapping;\n};\nconst transformAggregationFunctionSpecification = (element, context) => {\n const func = new V1_AggregateFunction();\n if (!isStubbed_RawLambda(element.mapFn)) {\n func.mapFn = element.mapFn.accept_RawValueSpecificationVisitor(new V1_RawValueSpecificationTransformer(context));\n }\n if (!isStubbed_RawLambda(element.aggregateFn)) {\n func.aggregateFn = element.aggregateFn.accept_RawValueSpecificationVisitor(new V1_RawValueSpecificationTransformer(context));\n }\n return func;\n};\nconst transformGroupByFunctionSpec = (element, context) => {\n const func = new V1_GroupByFunction();\n if (!isStubbed_RawLambda(element.groupByFn)) {\n func.groupByFn = element.groupByFn.accept_RawValueSpecificationVisitor(new V1_RawValueSpecificationTransformer(context));\n }\n return func;\n};\nconst transformAggregateSpecification = (element, context) => {\n const aggregateSpec = new V1_AggregateSpecification();\n aggregateSpec.canAggregate = element.canAggregate;\n aggregateSpec.groupByFunctions = element.groupByFunctions.map((groupByFunc) => transformGroupByFunctionSpec(groupByFunc, context));\n aggregateSpec.aggregateValues = element.aggregateValues.map((aggregateValue) => transformAggregationFunctionSpecification(aggregateValue, context));\n return aggregateSpec;\n};\nconst transformAggSetImplContainer = (element, context) => {\n const setImplContainer = new V1_AggregateSetImplementationContainer();\n setImplContainer.index = element.index;\n const classMapping = transformSetImplementation(element.setImplementation, context);\n if (classMapping) {\n setImplContainer.setImplementation = classMapping;\n }\n setImplContainer.aggregateSpecification = transformAggregateSpecification(element.aggregateSpecification, context);\n return setImplContainer;\n};\nconst transformAggregationAwareSetImplementation = (element, context) => {\n const classMapping = new V1_AggregationAwareClassMapping();\n classMapping.id = mappingElementIdSerializer(element.id);\n classMapping.class = element.class.valueForSerialization ?? '';\n classMapping.root = element.root.valueForSerialization;\n const mainSetImplementation = transformSetImplementation(element.mainSetImplementation, context);\n if (mainSetImplementation) {\n classMapping.mainSetImplementation = mainSetImplementation;\n }\n classMapping.propertyMappings = transformClassMappingPropertyMappings(element.propertyMappings, false, context);\n classMapping.extendsClassMappingId = element.superSetImplementationId;\n classMapping.aggregateSetImplementations =\n element.aggregateSetImplementations.map((aggregateSetImpl) => transformAggSetImplContainer(aggregateSetImpl, context));\n return classMapping;\n};\n// NOTE: this needs to be a function to avoid error with using before declaration for embedded property mappings due to the hoisting behavior in ES\nfunction transformProperyMapping(propertyMapping, isTransformingEmbeddedPropertyMapping, context) {\n return propertyMapping.accept_PropertyMappingVisitor(new PropertyMappingTransformer(isTransformingEmbeddedPropertyMapping, context));\n}\nexport class V1_SetImplementationTransformer {\n context;\n constructor(context) {\n this.context = context;\n }\n visit_SetImplementation(setImplementation) {\n const extraClassMappingTransformers = this.context.plugins.flatMap((plugin) => plugin.V1_getExtraClassMappingTransformers?.() ?? []);\n for (const transformer of extraClassMappingTransformers) {\n const classMapping = transformer(setImplementation, this.context);\n if (classMapping) {\n return classMapping;\n }\n }\n throw new UnsupportedOperationError(`Can't transform class mapping: no compatible transformer available from plugins`, setImplementation);\n }\n visit_OperationSetImplementation(setImplementation) {\n if (setImplementation instanceof MergeOperationSetImplementation) {\n return transformMergeOperationSetImplementation(setImplementation, this.context);\n }\n else {\n return transformOperationSetImplementation(setImplementation);\n }\n }\n visit_MergeOperationSetImplementation(setImplementation) {\n return transformMergeOperationSetImplementation(setImplementation, this.context);\n }\n visit_PureInstanceSetImplementation(setImplementation) {\n return transformPureInstanceSetImplementation(setImplementation, this.context);\n }\n visit_FlatDataInstanceSetImplementation(setImplementation) {\n return transformFlatDataInstanceSetImpl(setImplementation, this.context);\n }\n visit_EmbeddedFlatDataSetImplementation(setImplementation) {\n // NOTE: we currently don't support this and flat-data would probably be deprecated\n // in the future in favor of schema-set/binding\n return undefined;\n }\n visit_RootRelationalInstanceSetImplementation(setImplementation) {\n return transformRootRelationalSetImpl(setImplementation, this.context);\n }\n visit_RelationalInstanceSetImplementation(setImplementation) {\n return transformRelationalInstanceSetImpl(setImplementation, this.context);\n }\n visit_AggregationAwareSetImplementation(setImplementation) {\n return transformAggregationAwareSetImplementation(setImplementation, this.context);\n }\n /**\n * This test is skipped because we want to temporarily relax graph building algorithm\n * to ease Pure -> Legend migration push.\n * See https://github.com/finos/legend-studio/issues/880\n *\n * @discrepancy graph-building\n */\n visit_TEMPORARY__UnresolvedSetImplementation(setImplementation) {\n throw new IllegalStateError(`Can't transform unresolved set implementation. This type of set implementation should only show up in references.`);\n }\n}\nfunction transformSetImplementation(setImplementation, context) {\n return setImplementation.accept_SetImplementationVisitor(new V1_SetImplementationTransformer(context));\n}\n// Association V1_Mapping\nconst transformRelationalAssociationImplementation = (element, context) => {\n const relationalMapping = new V1_RelationalAssociationMapping();\n relationalMapping.stores = element.stores.map((store) => store.valueForSerialization ?? '');\n relationalMapping.association =\n element.association.valueForSerialization ?? '';\n relationalMapping.propertyMappings = transformClassMappingPropertyMappings(element.propertyMappings, true, context);\n relationalMapping.id = mappingElementIdSerializer(element.id);\n return relationalMapping;\n};\nconst transformFlatDataAssociationImplementation = (element, context) => {\n const flatDataAssociationMapping = new V1_FlatDataAssociationMapping();\n flatDataAssociationMapping.stores = element.stores.map((store) => store.valueForSerialization ?? '');\n flatDataAssociationMapping.association =\n element.association.valueForSerialization ?? '';\n flatDataAssociationMapping.propertyMappings =\n transformClassMappingPropertyMappings(element.propertyMappings, true, context);\n flatDataAssociationMapping.id = mappingElementIdSerializer(element.id);\n return flatDataAssociationMapping;\n};\nconst transformXStorelAssociationImplementation = (element, context) => {\n const xStoreMapping = new V1_XStoreAssociationMapping();\n xStoreMapping.stores = element.stores.map((store) => store.valueForSerialization ?? '');\n xStoreMapping.association = element.association.valueForSerialization ?? '';\n xStoreMapping.propertyMappings = transformClassMappingPropertyMappings(element.propertyMappings, false, context);\n xStoreMapping.id = mappingElementIdSerializer(element.id);\n return xStoreMapping;\n};\nconst transformAssociationImplementation = (element, context) => {\n if (element instanceof RelationalAssociationImplementation) {\n return transformRelationalAssociationImplementation(element, context);\n }\n else if (element instanceof XStoreAssociationImplementation) {\n return transformXStorelAssociationImplementation(element, context);\n }\n else if (element instanceof FlatDataAssociationImplementation) {\n return transformFlatDataAssociationImplementation(element, context);\n }\n throw new UnsupportedOperationError(`Can't transform association implementation`, element);\n};\nexport const V1_transformMapping = (element, context) => {\n const mapping = new V1_Mapping();\n V1_initPackageableElement(mapping, element);\n mapping.includedMappings = element.includes.map(transformMappingInclude);\n mapping.enumerationMappings = element.enumerationMappings.map(transformEnumerationMapping);\n mapping.classMappings = element.classMappings\n .map((classMapping) => transformSetImplementation(classMapping, context))\n .filter(isNonNullable);\n mapping.associationMappings = element.associationMappings.map((associationMapping) => transformAssociationImplementation(associationMapping, context));\n mapping.tests = element.test.map((test) => transformMappingTestLegacy(test, context));\n mapping.testSuites = element.tests.map((testSuite) => V1_transformTestSuite(testSuite, context));\n return mapping;\n};\n//# sourceMappingURL=V1_MappingTransformer.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 { V1_Point } from '../../model/packageableElements/diagram/geometry/V1_DSL_Diagram_Point.js';\nimport { V1_ClassView } from '../../model/packageableElements/diagram/V1_DSL_Diagram_ClassView.js';\nimport { V1_Diagram } from '../../model/packageableElements/diagram/V1_DSL_Diagram_Diagram.js';\nimport { V1_GeneralizationView } from '../../model/packageableElements/diagram/V1_DSL_Diagram_GeneralizationView.js';\nimport { V1_Line } from '../../model/packageableElements/diagram/geometry/V1_DSL_Diagram_Line.js';\nimport { V1_Rectangle } from '../../model/packageableElements/diagram/geometry/V1_DSL_Diagram_Rectangle.js';\nimport { V1_PropertyView } from '../../model/packageableElements/diagram/V1_DSL_Diagram_PropertyView.js';\nimport { V1_initPackageableElement, V1_transformPropertyReference, } from '@finos/legend-graph';\nconst relationshipEdgeViewTransformer = (value) => value.classView.value.id;\nconst createRectangle = (height, width) => {\n const rectangle = new V1_Rectangle();\n rectangle.height = height;\n rectangle.width = width;\n return rectangle;\n};\nconst createPoint = (x, y) => {\n const point = new V1_Point();\n point.x = x;\n point.y = y;\n return point;\n};\nconst transformPropertyView = (element) => {\n const view = new V1_PropertyView();\n const line = new V1_Line();\n line.points = element.pathForSerialization;\n view.line = line;\n view.property = V1_transformPropertyReference(element.property);\n view.sourceView = relationshipEdgeViewTransformer(element.from);\n view.targetView = relationshipEdgeViewTransformer(element.to);\n return view;\n};\nconst transformGenerationView = (element) => {\n const view = new V1_GeneralizationView();\n const line = new V1_Line();\n line.points = element.pathForSerialization;\n view.line = line;\n view.sourceView = relationshipEdgeViewTransformer(element.from);\n view.targetView = relationshipEdgeViewTransformer(element.to);\n return view;\n};\nconst transformClassView = (element) => {\n const _classView = new V1_ClassView();\n _classView.class = element.class.valueForSerialization ?? '';\n _classView.hideProperties = element.hideProperties;\n _classView.hideStereotypes = element.hideStereotypes;\n _classView.hideTaggedValues = element.hideTaggedValues;\n _classView.id = element.id;\n _classView.position = createPoint(element.position.x, element.position.y);\n _classView.rectangle = createRectangle(element.rectangle.height, element.rectangle.width);\n return _classView;\n};\nexport const V1_transformDiagram = (element) => {\n const diagram = new V1_Diagram();\n V1_initPackageableElement(diagram, element);\n diagram.classViews = element.classViews.map(transformClassView);\n diagram.generalizationViews = element.generalizationViews.map(transformGenerationView);\n diagram.propertyViews = element.propertyViews.map(transformPropertyView);\n return diagram;\n};\n//# sourceMappingURL=V1_DSL_Diagram_TransformerHelper.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 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 { 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 } 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 if (!path.length) {\n return [];\n }\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 return path.slice(start - 1, end + 2);\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 { 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 { 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 } 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 = newPath[0].x - center.x;\n relationshipView.from._offsetY = newPath[0].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 { getDiagram } from '../../../../../DSL_Diagram_GraphManagerHelper.js';\nimport { assertNonEmptyString, assertNonNullable, guaranteeNonNullable, } from '@finos/legend-shared';\nimport { ClassView } from '../../../../../../graph/metamodel/pure/packageableElements/diagram/DSL_Diagram_ClassView.js';\nimport { Point } from '../../../../../../graph/metamodel/pure/packageableElements/diagram/geometry/DSL_Diagram_Point.js';\nimport { Rectangle } from '../../../../../../graph/metamodel/pure/packageableElements/diagram/geometry/DSL_Diagram_Rectangle.js';\nimport { PropertyView } from '../../../../../../graph/metamodel/pure/packageableElements/diagram/DSL_Diagram_PropertyView.js';\nimport { GeneralizationView } from '../../../../../../graph/metamodel/pure/packageableElements/diagram/DSL_Diagram_GeneralizationView.js';\nimport { getClassView, _relationshipView_simplifyPath, } from '../../../../../../graph/helpers/DSL_Diagram_Helper.js';\nconst buildPoint = (point) => {\n const x = guaranteeNonNullable(point.x, `Point 'x' coordinate is missing`);\n const y = guaranteeNonNullable(point.y, `Point 'y' coordinate is missing`);\n return new Point(x, y);\n};\nconst buildRectangle = (rectangle) => {\n const width = guaranteeNonNullable(rectangle.width, `Rectangle 'width' is missing`);\n const height = guaranteeNonNullable(rectangle.height, `Rectangle 'height' is missing`);\n return new Rectangle(width, height);\n};\nexport const V1_buildClassView = (classView, context, diagram) => {\n assertNonEmptyString(classView.class, `Class view 'class' field is missing or empty`);\n assertNonEmptyString(classView.id, `Class view 'id' field is missing or empty`);\n assertNonNullable(classView.rectangle, `Class view 'rectangle' field is missing`);\n assertNonNullable(classView.position, `Class view 'position' field is missing`);\n const view = new ClassView(diagram, classView.id, context.resolveClass(classView.class));\n view.hideProperties = classView.hideProperties;\n view.hideTaggedValues = classView.hideTaggedValues;\n view.hideStereotypes = classView.hideStereotypes;\n view.rectangle = buildRectangle(classView.rectangle);\n view.position = buildPoint(classView.position);\n return view;\n};\nexport const V1_buildPropertyView = (propertyView, context, diagram) => {\n assertNonNullable(propertyView.property, `Property view 'property' field is missing`);\n assertNonNullable(propertyView.line, `Property view 'line' field is missing`);\n const sourceClassView = guaranteeNonNullable(getClassView(diagram, guaranteeNonNullable(propertyView.sourceView)), `Property view 'sourceView' field is missing`);\n const targetClassView = guaranteeNonNullable(getClassView(diagram, guaranteeNonNullable(propertyView.targetView)), `Property view 'targetView' field is missing`);\n const property = context.resolveOwnProperty(propertyView.property);\n const view = new PropertyView(diagram, property, sourceClassView, targetClassView);\n view.path = propertyView.line.points.map((point) => buildPoint(point));\n _relationshipView_simplifyPath(view); // transform the line because we store only 2 end points that are inside points and we will calculate the offset\n return view;\n};\nexport const V1_buildGeneralizationView = (generalizationView, diagram) => {\n assertNonNullable(generalizationView.line, `Generalization view 'line' field is missing`);\n const sourceClassView = guaranteeNonNullable(getClassView(diagram, guaranteeNonNullable(generalizationView.sourceView)), `Generalization view 'sourceView' field is missing`);\n const targetClassView = guaranteeNonNullable(getClassView(diagram, guaranteeNonNullable(generalizationView.targetView)), `Generalization view 'targetView' field is missing`);\n const view = new GeneralizationView(diagram, sourceClassView, targetClassView);\n view.path = generalizationView.line.points.map((point) => buildPoint(point));\n _relationshipView_simplifyPath(view); // transform the line because we store only 2 end points that are inside points and we will calculate the offset\n return view;\n};\nexport const V1_resolveDiagram = (path, context) => context.createImplicitPackageableElementReference(path, (_path) => getDiagram(_path, context.graph));\n//# sourceMappingURL=V1_DSL_Diagram_GraphBuilderHelper.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';\nimport { V1_Diagram } from './v1/model/packageableElements/diagram/V1_DSL_Diagram_Diagram.js';\nimport { assertType } from '@finos/legend-shared';\nimport { deserialize, serialize } from 'serializr';\nimport { V1_diagramModelSchema, V1_DIAGRAM_ELEMENT_PROTOCOL_TYPE, } from './v1/transformation/pureProtocol/V1_DSL_Diagram_ProtocolHelper.js';\nimport { PureProtocolProcessorPlugin, V1_ElementBuilder, V1_buildFullPath, } from '@finos/legend-graph';\nimport { V1_transformDiagram } from './v1/transformation/pureGraph/V1_DSL_Diagram_TransformerHelper.js';\nimport { Diagram } from '../../../graph/metamodel/pure/packageableElements/diagram/DSL_Diagram_Diagram.js';\nimport { getOwnDiagram } from '../../DSL_Diagram_GraphManagerHelper.js';\nimport { V1_buildClassView, V1_buildGeneralizationView, V1_buildPropertyView, } from './v1/transformation/pureGraph/V1_DSL_Diagram_GraphBuilderHelper.js';\nconst DIAGRAM_ELEMENT_CLASSIFIER_PATH = 'meta::pure::metamodel::diagram::Diagram';\nexport const V1_DSL_Diagram_PackageableElementPointerType = 'DIAGRAM';\nexport class DSL_Diagram_PureProtocolProcessorPlugin extends PureProtocolProcessorPlugin {\n constructor() {\n super(packageJson.extensions.pureProtocolProcessorPlugin, packageJson.version);\n }\n V1_getExtraElementBuilders() {\n return [\n new V1_ElementBuilder({\n elementClassName: 'Diagram',\n _class: V1_Diagram,\n firstPass: (elementProtocol, context) => {\n assertType(elementProtocol, V1_Diagram);\n const element = new Diagram(elementProtocol.name);\n const path = V1_buildFullPath(elementProtocol.package, elementProtocol.name);\n context.currentSubGraph.setOwnElementInExtension(path, element, Diagram);\n return element;\n },\n secondPass: (elementProtocol, context) => {\n assertType(elementProtocol, V1_Diagram);\n const path = V1_buildFullPath(elementProtocol.package, elementProtocol.name);\n const element = getOwnDiagram(path, context.currentSubGraph);\n element.classViews = elementProtocol.classViews.map((classView) => V1_buildClassView(classView, context, element));\n element.propertyViews = elementProtocol.propertyViews.map((propertyView) => V1_buildPropertyView(propertyView, context, element));\n element.generalizationViews = elementProtocol.generalizationViews.map((generalizationView) => V1_buildGeneralizationView(generalizationView, element));\n },\n }),\n ];\n }\n V1_getExtraElementClassifierPathGetters() {\n return [\n (elementProtocol) => {\n if (elementProtocol instanceof V1_Diagram) {\n return DIAGRAM_ELEMENT_CLASSIFIER_PATH;\n }\n return undefined;\n },\n ];\n }\n V1_getExtraElementProtocolSerializers() {\n return [\n (elementProtocol, plugins) => {\n if (elementProtocol instanceof V1_Diagram) {\n return serialize(V1_diagramModelSchema, elementProtocol);\n }\n return undefined;\n },\n ];\n }\n V1_getExtraElementProtocolDeserializers() {\n return [\n (json, plugins) => {\n if (json._type === V1_DIAGRAM_ELEMENT_PROTOCOL_TYPE) {\n return deserialize(V1_diagramModelSchema, json);\n }\n return undefined;\n },\n ];\n }\n V1_getExtraElementTransformers() {\n return [\n (metamodel, context) => {\n if (metamodel instanceof Diagram) {\n return V1_transformDiagram(metamodel);\n }\n return undefined;\n },\n ];\n }\n}\n//# sourceMappingURL=DSL_Diagram_PureProtocolProcessorPlugin.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 { Diagram } from '../graph/metamodel/pure/packageableElements/diagram/DSL_Diagram_Diagram.js';\nexport const getDiagram = (path, graph) => graph.getExtensionElement(path, Diagram, `Can't find diagram '${path}'`);\nexport const getOwnDiagram = (path, graph) => guaranteeNonNullable(graph.getOwnNullableExtensionElement(path, Diagram), `Can't find diagram '${path}'`);\n//# sourceMappingURL=DSL_Diagram_GraphManagerHelper.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 { V1_Multiplicity } from '../../../model/packageableElements/domain/V1_Multiplicity.js';\nimport { V1_PackageableElementPointer, } from '../../../model/packageableElements/V1_PackageableElement.js';\nexport const V1_transformElementReferencePointer = (pointerType, ref) => new V1_PackageableElementPointer(pointerType, ref.valueForSerialization ?? '');\nexport const V1_initPackageableElement = (protocolElement, element) => {\n protocolElement.name = element.name;\n protocolElement.package = element.package?.path ?? '';\n};\nexport const V1_transformMultiplicity = (element) => {\n const multiplicity = new V1_Multiplicity(element.lowerBound, element.upperBound);\n return multiplicity;\n};\n//# sourceMappingURL=V1_CoreTransformerHelper.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';\n/**\n * Plugins for Pure graph (aka `PureModel`). These plugins concern the operations of the graph alone and\n * should not refer to anything but the graph itself as it would be embedded as part of the graph.\n * For example: if a plugin has to do with grammar, compilation, generation, etc., probably it should not be\n * placed in this class.\n */\nexport class PureGraphPlugin extends AbstractPlugin {\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.registerPureGraphPlugin(this);\n }\n}\n//# sourceMappingURL=PureGraphPlugin.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';\nimport { PureGraphPlugin, } from '@finos/legend-graph';\nimport { Diagram } from '../graph/metamodel/pure/packageableElements/diagram/DSL_Diagram_Diagram.js';\nimport { cleanUpDeadReferencesInDiagram } from '../graph/helpers/DSL_Diagram_Helper.js';\nexport class DSL_Diagram_PureGraphPlugin extends PureGraphPlugin {\n constructor() {\n super(packageJson.extensions.pureGraphPlugin, packageJson.version);\n }\n getExtraPureGraphExtensionClasses() {\n return [Diagram];\n }\n getExtraDeadReferencesCleaners() {\n return [\n (graph) => {\n graph\n .getExtensionForElementClass(Diagram)\n .elements.forEach((diagram) => cleanUpDeadReferencesInDiagram(diagram, graph));\n },\n ];\n }\n}\n//# sourceMappingURL=DSL_Diagram_PureGraphPlugin.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';\nimport { AbstractPreset } from '@finos/legend-shared';\nimport { DSL_Diagram_PureGraphManagerPlugin } from './graphManager/DSL_Diagram_PureGraphManagerPlugin.js';\nimport { DSL_Diagram_PureProtocolProcessorPlugin } from './graphManager/protocol/pure/DSL_Diagram_PureProtocolProcessorPlugin.js';\nimport { DSL_Diagram_PureGraphPlugin } from './graph/DSL_Diagram_PureGraphPlugin.js';\nexport class DSL_Diagram_GraphManagerPreset extends AbstractPreset {\n constructor() {\n super(packageJson.extensions.graphManagerPreset, packageJson.version, [\n new DSL_Diagram_PureGraphPlugin(),\n new DSL_Diagram_PureGraphManagerPlugin(),\n new DSL_Diagram_PureProtocolProcessorPlugin(),\n ]);\n }\n}\n//# sourceMappingURL=DSL_Diagram_Extension.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, StyledEngineProvider, ThemeProvider, } from '@mui/material';\nconst LegendCustomMUITheme = createTheme({\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});\nexport const LegendStyleProvider = (props) => {\n const { children } = 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, 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), 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 { toTitleCase } from '@finos/legend-shared';\nimport { clsx } from 'clsx';\nimport { generateSimpleDIVComponent } from '../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');\n//# sourceMappingURL=Modal.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/ApplicationStore.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.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.actionAlertInfo), onClose: noop, TransitionProps: {\n 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) => {\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 }, action.label));\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.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';\nexport const PanelLoadingIndicator = (props) => {\n const { isLoading } = 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: `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.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: true, 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","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 { DEFAULT_NOTIFICATION_HIDE_TIME, NOTIFCATION_SEVERITY, } from '../stores/ApplicationStore.js';\nimport { useApplicationStore } from './ApplicationStoreProvider.js';\nimport { Notification, NotificationContent, ChevronDownIcon, ChevronUpIcon, TimesIcon, ExclamationTriangleIcon, TimesCircleIcon, CheckCircleIcon, InfoCircleIcon, BugIcon, clsx, } from '@finos/legend-art';\nimport { useState } from 'react';\nexport const NotificationManager = observer(() => {\n const applicationStore = useApplicationStore();\n const notification = applicationStore.notification;\n const isOpen = Boolean(notification);\n const message = notification?.message ?? '';\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.setNotification(undefined);\n setIsExpanded(false);\n };\n const handleCopy = applicationStore.guardUnhandledError(() => applicationStore.copyTextToClipboard(message));\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: applicationStore.notification\n ? applicationStore.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, _jsx(\"div\", { className: clsx('notification__message__content__text', {\n 'notification__message__content__text--expanded': isExpanded,\n }), onClick: handleCopy, title: \"Click to Copy\", children: message })] }), action: [\n _jsx(\"button\", { className: \"notification__action\", id: \"expand_button\", 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","/**\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 '../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 = 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 */\nconst isMatchingKeyCombination = (event, combinationData) => \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\ncombinationData.key === event.code &&\n // ensure all the modifiers in the keybinding are pressed\n combinationData.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 combinationData.key !== modifier &&\n event.getModifierState(modifier) &&\n // check if the modifier key pressed is part of the key combination\n !combinationData.modifiers.includes(modifier));\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 Object.values(config)\n .flatMap((entry) => entry.combinations.map((combination) => ({\n combination,\n handler: entry.handler,\n })))\n .filter((entry) => entry.combination.length)\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 = isMatchingKeyCombination(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(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 { Menu as MuiMenu } from '@mui/material';\nexport const BaseMenu = (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};\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 { BaseMenu } 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(BaseMenu, { open: isOpen, anchorPosition: { left, top }, onClose: close, anchorReference: \"anchorPosition\", BackdropProps: {\n invisible: true,\n onContextMenu,\n }, disableRestoreFocus: true, transitionDuration: 0, onClick: close, ...menuProps, children: 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 '../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, disabled, children, ...otherProps } = props;\n return (_jsx(\"button\", { className: clsx('menu__item', className), disabled: Boolean(disabled), 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';\nexport const MarkdownTextViewer = (props) => (_jsx(ReactMarkdown, { className: clsx('markdown-content', props.className), remarkPlugins: [remarkGFM], children: props.value.value }));\n//# sourceMappingURL=MarkdownTextViewer.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 'react-resize-detector';\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 } 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","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\" }), label: _jsx(\"div\", { className: \"mui-radio-group__group__item__label\", children: op }) }, op))) }) }, idx))), children] }));\n};\n//# sourceMappingURL=BaseRadioGroup.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[\"QUESTION_WHEN_TO_CONFIGURE_PLATFORM_VERSIONS\"] = \"question.when-to-configure-project-platform-dependencies-versions\";\n LEGEND_APPLICATION_DOCUMENTATION_KEY[\"QUESTION_HOW_TO_WRITE_A_SERVICE_TEST\"] = \"question.how-to-write-a-service-test\";\n LEGEND_APPLICATION_DOCUMENTATION_KEY[\"QUESTION_HOW_TO_ADD_PARAMETERS_TO_QUERY\"] = \"question.how-to-add-parameters-to-query\";\n LEGEND_APPLICATION_DOCUMENTATION_KEY[\"QUESTION_HOW_TO_ADD_CONSTANTS_TO_QUERY\"] = \"question.how-to-add-constants-to-query\";\n LEGEND_APPLICATION_DOCUMENTATION_KEY[\"QUESTION_HOW_TO_WRITE_SERVICE_CONNECTION_TEST_DATA\"] = \"question.how-to-write-service-connection-test-data\";\n LEGEND_APPLICATION_DOCUMENTATION_KEY[\"QUESTION_HOW_TO_CREATE_A_DATA_ELEMENT\"] = \"question.how-to-create-a-data-element\";\n})(LEGEND_APPLICATION_DOCUMENTATION_KEY = LEGEND_APPLICATION_DOCUMENTATION_KEY || (LEGEND_APPLICATION_DOCUMENTATION_KEY = {}));\n//# sourceMappingURL=LegendApplicationDocumentation.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 { BaseRadioGroup, InfoCircleIcon } from '@finos/legend-art';\nimport { observer } from 'mobx-react-lite';\nimport { LEGEND_APPLICATION_DOCUMENTATION_KEY } from '../../stores/LegendApplicationDocumentation.js';\nimport { ADVANCED_TEXT_SEARCH_MODE, } from '../../stores/shared/TextSearchAdvancedConfigState.js';\nimport { useApplicationStore } from '../ApplicationStoreProvider.js';\nexport const TextSearchAdvancedConfigMenu = observer((props) => {\n const { configState } = props;\n const applicationStore = useApplicationStore();\n const handleSearchMode = (event) => {\n const searchMode = event.target.value;\n configState.setCurrentMode(searchMode);\n };\n const seeDocumentation = () => applicationStore.assistantService.openDocumentationEntry(LEGEND_APPLICATION_DOCUMENTATION_KEY.QUESTION_HOW_TO_USE_ADVANCED_SEARCH_SYNTAX);\n return (_jsxs(\"div\", { className: \"text-search-advanced-config__panel\", children: [_jsxs(\"div\", { className: \"text-search-advanced-config__panel__header__label\", children: [\"search config\", _jsx(\"button\", { className: \"text-search-advanced-config__panel__header__hint\", tabIndex: -1, onClick: seeDocumentation, title: \"Click to see more details on advanced search\", children: _jsx(InfoCircleIcon, {}) })] }), _jsx(\"div\", { children: _jsx(BaseRadioGroup, { className: \"text-search-advanced-config__options\", value: configState.currentMode, onChange: handleSearchMode, row: false, options: [\n ADVANCED_TEXT_SEARCH_MODE.STANDARD,\n ADVANCED_TEXT_SEARCH_MODE.INCLUDE,\n ADVANCED_TEXT_SEARCH_MODE.EXACT,\n ADVANCED_TEXT_SEARCH_MODE.INVERSE,\n ], size: 1 }) })] }));\n});\n//# sourceMappingURL=TextSearchAdvancedConfigMenu.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, VerticalDragHandleThinIcon, CircleIcon, PanelLoadingIndicator, BasePopover, FaceSadTearIcon, CogIcon, } from '@finos/legend-art';\nimport { ContentType, debounce, downloadFileUsingDataURI, formatDate, isString, uuid, } from '@finos/legend-shared';\nimport { observer } from 'mobx-react-lite';\nimport { useEffect, useMemo, useRef, useState } from 'react';\nimport { TAB_SIZE } from '../const.js';\nimport { VIRTUAL_ASSISTANT_TAB, } from '../stores/AssistantService.js';\nimport { useApplicationStore } from './ApplicationStoreProvider.js';\nimport Draggable from 'react-draggable';\nimport { DATE_TIME_FORMAT } from '@finos/legend-graph';\nimport { ApplicationTelemetry } from '../stores/ApplicationTelemetry.js';\nimport { TextSearchAdvancedConfigMenu } from './shared/TextSearchAdvancedConfigMenu.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 ApplicationTelemetry.logEvent_VirtualAssistantDocumentationEntryAccessed(applicationStore.telemetryService, {\n key: entry.documentationKey,\n });\n }\n entry.setIsOpen(!entry.isOpen);\n };\n const onDocumentationLinkClick = () => {\n ApplicationTelemetry.logEvent_VirtualAssistantDocumentationEntryAccessed(applicationStore.telemetryService, {\n key: entry.documentationKey,\n });\n };\n const copyDocumentationKey = applicationStore.guardUnhandledError(() => applicationStore.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.copyTextToClipboard(contextualEntry?.context ?? ''));\n const copyCurrentContextIDToClipboard = applicationStore.guardUnhandledError(() => applicationStore.copyTextToClipboard(applicationStore.navigationContextService.currentContext?.key ?? ''));\n const copyContextStackToClipboard = applicationStore.guardUnhandledError(() => applicationStore.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 searchConfigButtonRef = 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 downloadDocRegistry = () => {\n downloadFileUsingDataURI(`documentation-registry_${formatDate(new Date(Date.now()), DATE_TIME_FORMAT)}.json`, JSON.stringify(applicationStore.documentationService.publishDocRegistry(), undefined, TAB_SIZE), ContentType.APPLICATION_JSON);\n };\n const downloadContextualDocIndex = () => {\n downloadFileUsingDataURI(`documentation-registry_${formatDate(new Date(Date.now()), DATE_TIME_FORMAT)}.json`, JSON.stringify(applicationStore.documentationService.publishContextualDocIndex(), undefined, TAB_SIZE), ContentType.APPLICATION_JSON);\n };\n const toggleSearchConfigMenu = () => assistantService.setShowSearchConfigurationMenu(!assistantService.showSearchConfigurationMenu);\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\", { ref: searchConfigButtonRef, 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: _jsx(TextSearchAdvancedConfigMenu, { configState: assistantService.searchConfigurationState }) }), 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 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, PaperProps: {\n classes: { root: 'virtual-assistant__panel__container__root' },\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: \"virtual-assistant__panel\", \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\" }))] }) })] }), _jsx(\"div\", { className: \"virtual-assistant__panel__header__actions\", children: _jsx(\"button\", { className: \"virtual-assistant__panel__header__action\", tabIndex: -1, onClick: closeAssistantPanel, title: \"Close panel\", 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, {}))] })] }) }, 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 // 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__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 panel...`, children: assistantService.isOpen ? (_jsx(CloseIcon, { className: \"virtual-assistant__station__trigger__close\" })) : currentContextualDocumentationEntry ? (_jsx(CircleIcon, { className: \"virtual-assistant__station__trigger__circle\" })) : null }), _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(VerticalDragHandleThinIcon, {}) }) })] }, 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';\nconst APP_CONTAINER_ID = 'app.container';\nconst APP_BACKDROP_CONTAINER_ID = 'app.backdrop-container';\nconst PLATFORM_NATIVE_KEYBOARD_SHORTCUTS = [\n 'Meta+KeyP',\n 'Control+KeyP',\n 'Meta+KeyS',\n 'Control+KeyS',\n 'F8',\n 'F10',\n 'F11',\n 'Meta+Shift+KeyP',\n 'Control+Shift+KeyP',\n 'Meta+KeyB',\n 'Control+KeyB',\n 'F7',\n 'Alt+F7',\n 'Control+Shift+KeyB',\n];\nconst buildReactHotkeysConfiguration = (commandKeyMap, handlerCreator) => {\n const keyMap = {};\n commandKeyMap.forEach((keyCombination, commandKey) => {\n if (keyCombination) {\n keyMap[commandKey] = {\n combinations: [keyCombination],\n handler: handlerCreator(keyCombination),\n };\n }\n });\n // Disable platform native keyboard shortcuts\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: (event) => {\n // prevent default from potentially clashing key combinations\n event?.preventDefault();\n },\n };\n return keyMap;\n};\nexport const forceDispatchKeyboardEvent = (event) => {\n document\n .getElementById(APP_CONTAINER_ID)\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\", id: props.elementID }));\nexport const LegendApplicationComponentFrameworkProvider = observer((props) => {\n const { children } = props;\n const applicationStore = useApplicationStore();\n const disableContextMenu = (event) => {\n event.stopPropagation();\n event.preventDefault();\n };\n const backdropContainer = applicationStore.backdropContainerElementID\n ? document.getElementById(applicationStore.backdropContainerElementID) ??\n document.getElementById(APP_BACKDROP_CONTAINER_ID)\n : document.getElementById(APP_BACKDROP_CONTAINER_ID);\n const keyBindingMap = buildReactHotkeysConfiguration(applicationStore.keyboardShortcutsService.commandKeyMap, (keyCombination) => (event) => {\n // prevent default from potentially clashing key combinations with platform native keyboard shortcuts\n if (PLATFORM_NATIVE_KEYBOARD_SHORTCUTS.includes(keyCombination)) {\n event?.preventDefault();\n }\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 which is too short, such as `r`, `a`\n // we risk blocking some very common interaction, i.e. user typing, or even constructing longer\n // key combinations\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 (_jsxs(LegendStyleProvider, { children: [_jsx(BlockingAlert, {}), _jsx(ActionAlert, {}), _jsx(NotificationManager, {}), applicationStore.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: backdropContainer, children: _jsx(Backdrop, { className: \"backdrop\", open: applicationStore.showBackdrop }) })), _jsx(DndProvider, { backend: HTML5Backend, children: _jsxs(\"div\", { className: \"app__container\", \n // NOTE: this `id` is used to quickly identify this DOM node so we could manually\n // dispatch keyboard event here in order to be captured by our global hotkeys matchers\n id: APP_CONTAINER_ID, \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: APP_BACKDROP_CONTAINER_ID }), _jsx(VirtualAssistant, {}), children] }) })] }));\n});\n//# sourceMappingURL=LegendApplicationComponentFrameworkProvider.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 this.applicationStore.assistantService.hideAssistant();\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, useContext } from 'react';\nimport { useLocalObservable } from 'mobx-react-lite';\nimport { useApplicationStore } from '@finos/legend-application';\nimport { guaranteeNonNullable } from '@finos/legend-shared';\nimport { LegendPureIDEBaseStore, } from '../stores/LegendPureIDEBaseStore.js';\nexport const useLegendPureIDEApplicationStore = () => useApplicationStore();\nconst LegendPureIDEBaseStoreContext = createContext(undefined);\nexport const 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 useLegendPureIDEBaseStore = () => guaranteeNonNullable(useContext(LegendPureIDEBaseStoreContext), `Can't find Legend Pure IDE base store in context`);\n//# sourceMappingURL=LegendPureIDEBaseStoreProvider.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 ACTIVITY_MODE;\n(function (ACTIVITY_MODE) {\n ACTIVITY_MODE[\"CONCEPT\"] = \"CONCEPT\";\n ACTIVITY_MODE[\"FILE\"] = \"FILE\";\n})(ACTIVITY_MODE = ACTIVITY_MODE || (ACTIVITY_MODE = {}));\nexport var AUX_PANEL_MODE;\n(function (AUX_PANEL_MODE) {\n AUX_PANEL_MODE[\"CONSOLE\"] = \"CONSOLE\";\n AUX_PANEL_MODE[\"SEARCH_RESULT\"] = \"SEARCH_RESULT\";\n AUX_PANEL_MODE[\"TEST_RUNNER\"] = \"TEST_RUNNER\";\n})(AUX_PANEL_MODE = AUX_PANEL_MODE || (AUX_PANEL_MODE = {}));\n//# sourceMappingURL=EditorConfig.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';\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 disposeEditor = (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 disposeDiffEditor = (editor) => {\n editor.dispose();\n editor.getOriginalEditor().getModel()?.dispose();\n editor.getModifiedEditor().getModel()?.dispose();\n};\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 getEditorValue = (editor) => editor.getModel()?.getValue(monacoEditorAPI.EndOfLinePreference.LF) ?? '';\nexport const getBaseTextEditorOptions = () => ({\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 bracketPairColorization: { enabled: false },\n detectIndentation: false,\n tabSize: 2,\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,\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};\n//# sourceMappingURL=TextEditorUtils.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[\"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 || (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 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 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 { action, 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 constructor() {\n makeObservable(this, {\n content: observable,\n setContent: action,\n });\n }\n setContent(value) {\n this.content = value;\n }\n}\ncreateModelSchema(File, {\n content: 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, column);\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 || (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 get description() {\n return undefined;\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 tabs: observable,\n setCurrentTab: action,\n closeTab: action,\n closeAllTabs: action,\n closeAllOtherTabs: action,\n openTab: action,\n swapTabs: 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 = [tab];\n }\n closeAllTabs() {\n this.setCurrentTab(undefined);\n this.tabs = [];\n }\n swapTabs(tab1, tab2) {\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(currIndex + 1, 0, tab);\n }\n else {\n this.tabs.push(tab);\n }\n }\n this.setCurrentTab(tab);\n tab.onOpen();\n }\n closeTab(tab) {\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}\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 { TabManagerState, TabState } from '@finos/legend-application';\nexport class EditorTabState extends TabState {\n editorStore;\n constructor(editorStore) {\n super();\n this.editorStore = editorStore;\n }\n}\nexport class EditorTabManagerState extends TabManagerState {\n editorStore;\n constructor(editorStore) {\n super();\n this.editorStore = editorStore;\n }\n get dndType() {\n return 'editor.tab-manager.tab';\n }\n}\n//# sourceMappingURL=EditorTabManagerState.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_AUX_PANEL\"] = \"editor.toggle-auxiliary-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 || (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 },\n [LEGEND_PURE_IDE_COMMAND_KEY.SEARCH_TEXT]: {\n title: 'Search text',\n defaultKeyboardShortcut: 'Control+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_AUX_PANEL]: {\n title: 'Toggle auxiliary panel',\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 || (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[\"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 = 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.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};\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 { EDITOR_LANGUAGE, TAB_SIZE, } from '@finos/legend-application';\nimport { clearMarkers, setErrorMarkers, } from '@finos/legend-art';\nimport { DIRECTORY_PATH_DELIMITER } from '@finos/legend-graph';\nimport { assertErrorThrown, getNullableLastElement, guaranteeNonNullable, IllegalStateError, } from '@finos/legend-shared';\nimport { action, computed, flow, flowResult, makeObservable, observable, } from 'mobx';\nimport { editor as monacoEditorAPI, } 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 { EditorTabState } from './EditorTabManagerState.js';\nimport { LEGEND_PURE_IDE_PURE_FILE_EDITOR_COMMAND_KEY } from './LegendPureIDECommand.js';\nconst getFileEditorLanguage = (filePath) => {\n const extension = getNullableLastElement(filePath.split('.'));\n switch (extension) {\n case 'pure':\n return EDITOR_LANGUAGE.PURE;\n case 'java':\n return EDITOR_LANGUAGE.JAVA;\n case 'md':\n return EDITOR_LANGUAGE.MARKDOWN;\n case 'sql':\n return EDITOR_LANGUAGE.SQL;\n case 'json':\n return EDITOR_LANGUAGE.JSON;\n case 'xml':\n return EDITOR_LANGUAGE.MARKDOWN;\n case 'yml':\n case 'yaml':\n return EDITOR_LANGUAGE.YAML;\n case 'graphql':\n return EDITOR_LANGUAGE.GRAPHQL;\n default:\n return 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(fileEditorState.uuid, this.language);\n this.model.updateOptions({ tabSize: TAB_SIZE });\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 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 EditorTabState {\n filePath;\n textEditorState;\n file;\n renameConceptState;\n showGoToLinePrompt = false;\n constructor(editorStore, file, filePath) {\n super(editorStore);\n makeObservable(this, {\n file: observable,\n renameConceptState: observable,\n showGoToLinePrompt: observable,\n setFile: action,\n setShowGoToLinePrompt: action,\n setConceptToRenameState: flow,\n });\n this.file = file;\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)}`;\n }\n get fileName() {\n return guaranteeNonNullable(getNullableLastElement(this.filePath.split(DIRECTORY_PATH_DELIMITER)));\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 setFile(val) {\n this.file = val;\n }\n setShowGoToLinePrompt(val) {\n this.showGoToLinePrompt = val;\n }\n *setConceptToRenameState(coordinate) {\n if (!coordinate) {\n this.renameConceptState = undefined;\n return;\n }\n const concept = (yield this.editorStore.getConceptInfo(coordinate));\n this.renameConceptState = concept\n ? new FileEditorRenameConceptState(this, concept, coordinate)\n : undefined;\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 !== EDITOR_LANGUAGE.PURE) {\n throw new IllegalStateError(`File editor commands should only be used for Pure files`);\n }\n this.editorStore.applicationStore.commandCenter.registerCommand({\n key: LEGEND_PURE_IDE_PURE_FILE_EDITOR_COMMAND_KEY.GO_TO_DEFINITION,\n trigger: () => this.editorStore.tabManagerState.currentTab === this &&\n Boolean(this.textEditorState.editor?.hasTextFocus()),\n action: () => {\n const currentPosition = this.textEditorState.editor?.getPosition();\n if (currentPosition) {\n flowResult(this.editorStore.executeNavigation(new FileCoordinate(this.filePath, currentPosition.lineNumber, currentPosition.column))).catch(this.editorStore.applicationStore.alertUnhandledError);\n }\n },\n });\n this.editorStore.applicationStore.commandCenter.registerCommand({\n key: LEGEND_PURE_IDE_PURE_FILE_EDITOR_COMMAND_KEY.GO_BACK,\n action: () => {\n flowResult(this.editorStore.navigateBack()).catch(this.editorStore.applicationStore.alertUnhandledError);\n },\n });\n this.editorStore.applicationStore.commandCenter.registerCommand({\n key: LEGEND_PURE_IDE_PURE_FILE_EDITOR_COMMAND_KEY.REVEAL_CONCEPT_IN_TREE,\n trigger: () => this.editorStore.tabManagerState.currentTab === this &&\n Boolean(this.textEditorState.editor?.hasTextFocus()),\n action: () => {\n const currentPosition = this.textEditorState.editor?.getPosition();\n if (currentPosition) {\n this.editorStore\n .revealConceptInTree(new FileCoordinate(this.filePath, currentPosition.lineNumber, currentPosition.column))\n .catch(this.editorStore.applicationStore.alertUnhandledError);\n }\n },\n });\n this.editorStore.applicationStore.commandCenter.registerCommand({\n key: LEGEND_PURE_IDE_PURE_FILE_EDITOR_COMMAND_KEY.FIND_USAGES,\n trigger: () => this.editorStore.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 flowResult(this.editorStore.findUsages(coordinate)).catch(this.editorStore.applicationStore.alertUnhandledError);\n }\n },\n });\n this.editorStore.applicationStore.commandCenter.registerCommand({\n key: LEGEND_PURE_IDE_PURE_FILE_EDITOR_COMMAND_KEY.RENAME_CONCEPT,\n trigger: () => this.editorStore.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 flowResult(this.setConceptToRenameState(coordinate)).catch(this.editorStore.applicationStore.alertUnhandledError);\n }\n },\n });\n this.editorStore.applicationStore.commandCenter.registerCommand({\n key: LEGEND_PURE_IDE_PURE_FILE_EDITOR_COMMAND_KEY.GO_TO_LINE,\n trigger: () => this.editorStore.tabManagerState.currentTab === this,\n action: () => {\n this.setShowGoToLinePrompt(true);\n },\n });\n }\n async renameConcept(newName) {\n if (!this.renameConceptState) {\n return;\n }\n const concept = this.renameConceptState.concept;\n try {\n this.editorStore.applicationStore.setBlockingAlert({\n message: 'Finding concept usages...',\n showLoading: true,\n });\n const usages = await this.editorStore.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.editorStore.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.editorStore.applicationStore.notifyError(error);\n }\n finally {\n this.editorStore.applicationStore.setBlockingAlert(undefined);\n }\n }\n deregisterCommands() {\n if (this.textEditorState.language !== EDITOR_LANGUAGE.PURE) {\n throw new IllegalStateError(`File editor commands should only be used for Pure files`);\n }\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 LEGEND_PURE_IDE_PURE_FILE_EDITOR_COMMAND_KEY.GO_TO_LINE,\n ].forEach((key) => this.editorStore.applicationStore.commandCenter.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 editorStore;\n treeData;\n selectedNode;\n loadInitialDataState = ActionState.create();\n refreshDataState = ActionState.create();\n constructor(editorStore) {\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.editorStore = editorStore;\n }\n getTreeData() {\n return guaranteeNonNullable(this.treeData, 'Tree data has not been initialized');\n }\n *initialize() {\n if (this.loadInitialDataState.isInProgress) {\n this.editorStore.applicationStore.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.editorStore.applicationStore.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.editorStore.applicationStore.notifyError(error);\n }\n finally {\n node.isLoading = false;\n }\n }\n }\n *refreshTreeData() {\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.editorStore.applicationStore.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}\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});\nclass FolderDirectoryAttribute extends DirectoryAttribute {\n repo; // boolean - used for change detection\n}\ncreateModelSchema(FolderDirectoryAttribute, {\n id: primitive(),\n path: primitive(),\n repo: 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 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 && value.file === 'true') {\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 './EditorConfig.js';\nimport { assertTrue, guaranteeNonNullable, } from '@finos/legend-shared';\nconst getParentPath = (path) => {\n const trimmedPath = path.trim();\n const idx = trimmedPath.lastIndexOf('/');\n if (idx <= 0) {\n return undefined;\n }\n return trimmedPath.substring(0, idx);\n};\nconst isFilePath = (path) => path.endsWith('.pure');\nconst pathToId = (path) => `file_${path}`;\nexport class DirectoryTreeState extends TreeState {\n nodeForCreateNewFile;\n nodeForCreateNewDirectory;\n nodeForRenameFile;\n constructor(editorStore) {\n super(editorStore);\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.editorStore.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.editorStore.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.editorStore.loadFile(node.data.li_attr.path));\n }\n }\n *revealPath(path, forceOpenDirectoryTreePanel, coordinate) {\n if (forceOpenDirectoryTreePanel) {\n this.editorStore.setActiveActivity(ACTIVITY_MODE.FILE, {\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 if (!isFilePath(_path)) {\n const node = guaranteeNonNullable(this.getTreeData().nodes.get(pathToId(_path)), `Can't find directory node with path '${_path}'`);\n yield flowResult(this.expandNode(node));\n }\n else {\n yield flowResult(this.editorStore.loadFile(_path, coordinate));\n }\n }\n const fileNode = guaranteeNonNullable(this.getTreeData().nodes.get(pathToId(path)), `Can't find file node with path '${path}'`);\n this.setSelectedNode(fileNode);\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 { deserialize } from 'serializr';\nimport { TreeState } from './TreeState.js';\nimport { ElementConceptAttribute, PropertyConceptAttribute, ConceptNode, ConceptType, } 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';\nexport class ConceptTreeState extends TreeState {\n loadConceptActivity = ActionState.create();\n statusText;\n nodeForRenameConcept;\n nodeForMoveElement;\n constructor(editorStore) {\n super(editorStore);\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 });\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.editorStore.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.editorStore.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.editorStore.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.editorStore.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.editorStore.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 async movePackageableElements(elementNodeAttributes, destinationPackage) {\n let elementsUsage = [];\n try {\n elementsUsage = (await this.editorStore.client.getPackageableElementsUsage(elementNodeAttributes.map((attr) => attr.pureId))).map((usage) => deserialize(PackageableElementUsage, usage));\n }\n catch {\n this.editorStore.applicationStore.notifyError(`Can't find usage for child packageable elements`);\n return;\n }\n finally {\n this.editorStore.applicationStore.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.editorStore.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.editorStore.applicationStore.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.editorStore.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.editorStore.client.getChildPackageableElements(oldName);\n elementsUsage = (await this.editorStore.client.getPackageableElementsUsage(childElementsInfo.map((info) => info.pureId))).map((usage) => deserialize(PackageableElementUsage, usage));\n }\n catch {\n this.editorStore.applicationStore.notifyError(`Can't find usage for child packageable elements`);\n return;\n }\n finally {\n this.editorStore.applicationStore.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.editorStore.movePackageableElements(inputs));\n return;\n }\n default: {\n usages = await this.editorStore.findConceptUsages(FIND_USAGE_FUNCTION_PATH.ELEMENT, [`'${attr.pureId}'`]);\n break;\n }\n }\n }\n catch (error) {\n assertErrorThrown(error);\n this.editorStore.applicationStore.notifyError(error);\n return;\n }\n finally {\n this.editorStore.applicationStore.setBlockingAlert(undefined);\n }\n await flowResult(this.editorStore.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, 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: primitive(),\n column: primitive(),\n source: 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 UnmatchedResult extends ExecutionFailureResult {\n candidateName;\n candidates = [];\n}\ncreateModelSchema(UnmatchedResult, {\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 relevantTestsOnly;\n runnerId;\n tests = [];\n}\ncreateModelSchema(TestExecutionResult, {\n count: primitive(),\n filterPaths: list(primitive()),\n path: 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(UnmatchedResult, 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 constructor() {\n super();\n makeObservable(this, {\n coordinates: observable,\n dismissCoordinate: action,\n });\n }\n setCoordinates(value) {\n this.coordinates = value;\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 { computed, makeObservable, observable } from 'mobx';\nimport { SearchResultCoordinate, SearchResultEntry, } from '../server/models/SearchEntry.js';\nimport { deleteEntry, guaranteeNonNullable } from '@finos/legend-shared';\nexport class SearchState {\n editorStore;\n constructor(editorStore) {\n this.editorStore = editorStore;\n }\n}\nexport class SearchResultState extends SearchState {\n searchEntries = [];\n constructor(editorStore, searchEntries) {\n super(editorStore);\n makeObservable(this, {\n searchEntries: observable,\n numberOfFiles: computed,\n numberOfResults: computed,\n });\n this.searchEntries = searchEntries;\n }\n dismissSearchEntry(value) {\n deleteEntry(this.searchEntries, value);\n if (!this.searchEntries.length) {\n this.editorStore.setSearchState(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 TextSearchResultState extends SearchResultState {\n}\nexport class UsageResultState extends SearchResultState {\n usageConcept;\n constructor(editorStore, usageConcept, references, searchResultCoordinates) {\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 super(editorStore, 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 this.usageConcept = usageConcept;\n }\n}\nexport class UnmatchedFunctionExecutionResultState extends SearchState {\n result;\n constructor(editorStore, result) {\n super(editorStore);\n this.result = result;\n }\n}\nexport class UnmatchExecutionResultState extends SearchState {\n result;\n constructor(editorStore, result) {\n super(editorStore);\n this.result = result;\n }\n}\n//# sourceMappingURL=SearchResultState.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 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 || (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, 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 || (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 || (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 editorStore;\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 constructor(editorStore, 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 buildTestTreeData: flow,\n pollTestRunnerResult: flow,\n rerunTestSuite: flow,\n cancelTestRun: flow,\n });\n this.editorStore = editorStore;\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 *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.editorStore.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.editorStore.applicationStore.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.editorStore.testRunState.isInProgress) {\n return;\n }\n yield flowResult(this.editorStore.executeTests(this.testExecutionResult.path, this.testExecutionResult.relevantTestsOnly));\n }\n *cancelTestRun() {\n if (!this.editorStore.testRunState.isInProgress) {\n return;\n }\n yield this.editorStore.client.cancelTestRunner(this.testExecutionResult.runnerId);\n this.editorStore.applicationStore.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 { FIND_USAGE_FUNCTION_PATH, } from '../server/models/Usage.js';\nimport { guaranteeNonNullable, } from '@finos/legend-shared';\nexport class PureClient {\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 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 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 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}'` : \"'::'\",\n format: 'raw',\n mode: this.mode,\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 findFiles = (searchText, isRegExp) => this.networkClient.get(`${this.baseUrl}/findPureFiles`, undefined, undefined, {\n file: searchText,\n regex: isRegExp,\n });\n searchText = (searchText, isCaseSensitive, isRegExp, limit = 2000) => 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 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 getConceptInfo = (file, line, column) => this.networkClient.get(`${this.baseUrl}/getConceptInfo`, undefined, undefined, {\n file,\n line,\n column,\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 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 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}\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 */\nexport var AggregationKind;\n(function (AggregationKind) {\n AggregationKind[\"NONE\"] = \"NONE\";\n AggregationKind[\"SHARED\"] = \"SHARED\";\n AggregationKind[\"COMPOSITE\"] = \"COMPOSITE\";\n})(AggregationKind = 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 { 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 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 { 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 { uuid } from '@finos/legend-shared';\nexport class GenericType {\n _UUID = uuid();\n rawType;\n constructor(rawType) {\n this.rawType = rawType;\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 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 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 */\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 { 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 { DataType } from './DataType.js';\nimport { PRIMITIVE_TYPE } from '../../../../MetaModelConst.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}\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 { 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 { Profile } from '../../metamodel/pure/packageableElements/domain/Profile.js';\nimport { Tag } from '../../metamodel/pure/packageableElements/domain/Tag.js';\nimport { Enum } from '../../metamodel/pure/packageableElements/domain/Enum.js';\nimport { Stereotype } from '../../metamodel/pure/packageableElements/domain/Stereotype.js';\nimport { TaggedValue } from '../../metamodel/pure/packageableElements/domain/TaggedValue.js';\nimport { TagExplicitReference } from '../../metamodel/pure/packageableElements/domain/TagReference.js';\nimport { Class } from '../../metamodel/pure/packageableElements/domain/Class.js';\nimport { Constraint } from '../../metamodel/pure/packageableElements/domain/Constraint.js';\nimport { stub_RawLambda } from './RawValueSpecificationCreatorHelper.js';\nimport { Multiplicity } from '../../metamodel/pure/packageableElements/domain/Multiplicity.js';\nimport { GenericTypeExplicitReference } from '../../metamodel/pure/packageableElements/domain/GenericTypeReference.js';\nimport { GenericType } from '../../metamodel/pure/packageableElements/domain/GenericType.js';\nimport { DerivedProperty } from '../../metamodel/pure/packageableElements/domain/DerivedProperty.js';\nimport { Property } from '../../metamodel/pure/packageableElements/domain/Property.js';\nimport { Package } from '../../metamodel/pure/packageableElements/domain/Package.js';\nimport { getOrCreatePackage } from '../DomainHelper.js';\nexport const stub_ElementhWithPackagePath = (element, packagePath) => {\n const root = new Package('');\n element.package = getOrCreatePackage(root, packagePath, true, undefined);\n return element;\n};\nexport const stub_Tag = (profile) => new Tag(profile, '');\nexport const stub_TaggedValue = (tag) => new TaggedValue(TagExplicitReference.create(tag), '');\nexport const stub_Stereotype = (profile) => new Stereotype(profile, '');\nexport const stub_Profile = () => new Profile('');\nexport const stub_Enum = (enumeration) => new Enum('', enumeration);\nexport const stub_Constraint = (_class) => new Constraint('', _class, stub_RawLambda());\nexport const stub_Class = () => new Class('');\nexport const stub_Property = (type, _class) => new Property('', Multiplicity.ONE, GenericTypeExplicitReference.create(new GenericType(type)), _class);\nexport const stub_DerivedProperty = (type, _class) => new DerivedProperty('', Multiplicity.ONE, GenericTypeExplicitReference.create(new GenericType(type)), _class);\nexport const isStubbed_PackageableElement = (element) => !element.package && !element.name;\n//# sourceMappingURL=DomainModelCreatorHelper.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 { addUniqueEntry, assertTrue, deleteEntry, guaranteeType, swapEntry, } from '@finos/legend-shared';\nimport { action } from 'mobx';\nimport { GenericType, Class, observe_Enum, observe_DerivedProperty, observe_GenericTypeReference, observe_Property, observe_RawVariableExpression, observe_Stereotype, observe_StereotypeReference, observe_Tag, observe_TaggedValue, observe_Constraint, observe_GenericType, observe_Type, observe_Unit, observe_RawLambda, isStubbed_PackageableElement, getOtherAssociatedProperty, } from '@finos/legend-graph';\n// --------------------------------------------- PackageableElementReference -------------------------------------\nexport const packageableElementReference_setValue = action((ref, value) => {\n ref.value = value;\n});\n// --------------------------------------------- Class -------------------------------------\nexport const class_deleteProperty = action((_class, val) => {\n deleteEntry(_class.properties, val);\n});\nexport const class_addProperty = action((_class, val) => {\n addUniqueEntry(_class.properties, observe_Property(val));\n});\nexport const class_swapProperties = action((_class, sourceProperty, targetProperty) => {\n swapEntry(_class.properties, sourceProperty, targetProperty);\n});\nexport const class_deleteDerivedProperty = action((_class, val) => {\n deleteEntry(_class.derivedProperties, val);\n});\nexport const class_addDerivedProperty = action((_class, val) => {\n addUniqueEntry(_class.derivedProperties, observe_DerivedProperty(val));\n});\nexport const class_swapDerivedProperties = action((_class, sourceProperty, targetProperty) => {\n swapEntry(_class.derivedProperties, sourceProperty, targetProperty);\n});\nexport const class_addContraint = action((_class, val) => {\n addUniqueEntry(_class.constraints, observe_Constraint(val));\n});\nexport const class_deleteConstraint = action((_class, val) => {\n deleteEntry(_class.constraints, val);\n});\nexport const class_swapConstraints = action((_class, sourceConstraint, targetConstraint) => {\n swapEntry(_class.constraints, sourceConstraint, targetConstraint);\n});\nexport const class_addSuperType = action((_class, val) => {\n addUniqueEntry(_class.generalizations, observe_GenericTypeReference(val));\n});\nexport const class_deleteSuperType = action((_class, val) => {\n deleteEntry(_class.generalizations, val);\n});\nexport const class_swapSuperTypes = action((_class, sourceSuperType, targetSuperType) => {\n swapEntry(_class.generalizations, sourceSuperType, targetSuperType);\n});\nexport const class_addSubclass = action((_class, val) => {\n addUniqueEntry(_class._subclasses, val);\n});\nexport const class_deleteSubclass = action((_class, val) => {\n deleteEntry(_class._subclasses, val);\n});\n// --------------------------------------------- GenericTypeReference -------------------------------------\nexport const setGenericTypeReferenceValue = action((gen, value) => {\n observe_GenericTypeReference(gen);\n observe_GenericType(value);\n gen.value = value;\n gen.ownerReference.value = value.rawType;\n});\n// --------------------------------------------- Property ------------------------------------------------\nexport const property_setName = action((_property, value) => {\n _property.name = value;\n});\nexport const property_setGenericType = action((_property, value) => {\n setGenericTypeReferenceValue(_property.genericType, observe_GenericType(value));\n});\nexport const property_setMultiplicity = action((_property, value) => {\n _property.multiplicity = value;\n});\nexport const property_setAggregationKind = action((target, value) => {\n target.aggregation = value;\n});\nexport const stereotypeReference_setValue = action((sV, value) => {\n sV.value = observe_Stereotype(value);\n packageableElementReference_setValue(sV.ownerReference, value._OWNER);\n});\n// --------------------------------------------- AnnotatedElement -------------------------------------\nexport const annotatedElement_addTaggedValue = action((annotatedElement, value) => {\n addUniqueEntry(annotatedElement.taggedValues, observe_TaggedValue(value));\n});\nexport const annotatedElement_deleteTaggedValue = action((_property, value) => {\n deleteEntry(_property.taggedValues, value);\n});\nexport const annotatedElement_addStereotype = action((annotatedElement, value) => {\n addUniqueEntry(annotatedElement.stereotypes, observe_StereotypeReference(value));\n});\nexport const annotatedElement_deleteStereotype = action((annotatedElement, value) => {\n deleteEntry(annotatedElement.stereotypes, value);\n});\nexport const taggedValue_setTag = action((taggedValue, value) => {\n taggedValue.tag.value = observe_Tag(value);\n taggedValue.tag.ownerReference.value = value._OWNER;\n});\nexport const taggedValue_setValue = action((val, value) => {\n val.value = value;\n});\nexport const tagStereotype_setValue = action((_tag, value) => {\n _tag.value = value;\n});\nexport const annotatedElement_swapTaggedValues = action((annotatedElement, sourceTaggedValue, targetTaggedValue) => {\n swapEntry(annotatedElement.taggedValues, sourceTaggedValue, targetTaggedValue);\n});\nexport const annotatedElement_swapStereotypes = action((annotatedElement, sourceStereotype, targetStereotype) => {\n swapEntry(annotatedElement.stereotypes, sourceStereotype, targetStereotype);\n});\n// --------------------------------------------- DerivedProperty -------------------------------------\nexport const derivedProperty_setBody = (dp, value) => {\n dp.body = value;\n};\nexport const derivedProperty_setParameters = (dp, value) => {\n dp.parameters = value;\n};\n// --------------------------------------------- Constraint -------------------------------------\nexport const constraint_setName = action((_constraint, name) => {\n _constraint.name = name;\n});\nexport const constraint_setFunctionDefinition = action((_constraint, lambda) => {\n _constraint.functionDefinition = observe_RawLambda(lambda);\n});\n// --------------------------------------------- Profile -------------------------------------\nexport const profile_addTag = action((profile, value) => {\n addUniqueEntry(profile.p_tags, observe_Tag(value));\n});\nexport const profile_deleteTag = action((profile, value) => {\n deleteEntry(profile.p_tags, value);\n});\nexport const profile_addStereotype = action((profile, value) => {\n addUniqueEntry(profile.p_stereotypes, observe_Stereotype(value));\n});\nexport const profile_deleteStereotype = action((profile, value) => {\n deleteEntry(profile.p_stereotypes, value);\n});\nexport const profile_swapTags = action((profile, sourceTag, targetTag) => {\n swapEntry(profile.p_tags, sourceTag, targetTag);\n});\nexport const profile_swapStereotypes = action((profile, sourceStereotype, targetStereotype) => {\n swapEntry(profile.p_stereotypes, sourceStereotype, targetStereotype);\n});\n// --------------------------------------------- Function -------------------------------------\nexport const function_deleteParameter = action((_func, val) => {\n deleteEntry(_func.parameters, val);\n});\nexport const function_addParameter = action((_func, val) => {\n addUniqueEntry(_func.parameters, observe_RawVariableExpression(val));\n});\nexport const function_setReturnType = action((_func, val) => {\n packageableElementReference_setValue(_func.returnType, observe_Type(val));\n});\nexport const function_setReturnMultiplicity = action((_func, val) => {\n _func.returnMultiplicity = val;\n});\nexport const function_swapParameters = action((_func, sourceParameter, targetParameter) => {\n swapEntry(_func.parameters, sourceParameter, targetParameter);\n});\n// --------------------------------------------- Enumeration -------------------------------------\nexport const enum_setName = action((val, value) => {\n val.name = value;\n});\nexport const enum_addValue = action((enumeration, value) => {\n addUniqueEntry(enumeration.values, observe_Enum(value));\n});\nexport const enum_deleteValue = action((enumeration, value) => {\n deleteEntry(enumeration.values, value);\n});\nexport const enum_swapValues = action((enumeration, sourceEnum, targetEnum) => {\n swapEntry(enumeration.values, sourceEnum, targetEnum);\n});\nexport const enumValueReference_setValue = action((ref, value) => {\n ref.value = observe_Enum(value);\n packageableElementReference_setValue(ref.ownerReference, value._OWNER);\n});\n// --------------------------------------------- Association -------------------------------------\nexport const association_changePropertyType = action((association, property, type) => {\n const otherProperty = getOtherAssociatedProperty(association, property);\n // remove other property from current parent class of the to-be-changed property\n const otherPropertyAssociatedClass = guaranteeType(property.genericType.ownerReference.value, Class, `Association property '${property.name}' must be of type 'class'`);\n // don't invoke deletion if the class is a stub (otherProperty is not present)\n if (!isStubbed_PackageableElement(otherPropertyAssociatedClass)) {\n assertTrue(deleteEntry(otherPropertyAssociatedClass.propertiesFromAssociations, otherProperty), `Can't find property '${otherProperty.name}' from association '${association.path}' in associated class '${otherPropertyAssociatedClass.path}'`);\n }\n // set up the relationship between the other property and the new class\n addUniqueEntry(type.propertiesFromAssociations, otherProperty);\n // set new type for the property\n const _genType = new GenericType(type);\n property.genericType.value = _genType;\n property.genericType.ownerReference.value = _genType.rawType;\n});\n// --------------------------------------------- Measure -------------------------------------\nexport const measure_setCanonicalUnit = action((_measure, unit) => {\n _measure.canonicalUnit = observe_Unit(unit);\n});\nexport const unit_setConversionFunction = action((unit, lambda) => {\n unit.conversionFunction = observe_RawLambda(lambda);\n});\n//# sourceMappingURL=DomainGraphModifierHelper.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 { addUniqueEntry, changeEntry, deleteEntry } from '@finos/legend-shared';\nimport { action } from 'mobx';\nimport { _findOrBuildPoint, _relationshipView_simplifyPath, _relationshipView_setPath, } from '../../graph/helpers/DSL_Diagram_Helper.js';\nimport { observe_AssociationView, observe_ClassView, observe_GeneralizationView, observe_PropertyView, } from '../../graphManager/action/changeDetection/DSL_Diagram_ObserverHelper.js';\nexport const diagram_setClassViews = action((diagram, val) => {\n diagram.classViews = val.map(observe_ClassView);\n});\nexport const diagram_addClassView = action((diagram, val) => {\n addUniqueEntry(diagram.classViews, observe_ClassView(val));\n});\nexport const diagram_deleteClassView = action((diagram, val) => {\n deleteEntry(diagram.classViews, val);\n});\nexport const diagram_setAssociationViews = action((diagram, val) => {\n diagram.associationViews = val.map(observe_AssociationView);\n});\nexport const diagram_deleteAssociationView = action((diagram, val) => {\n deleteEntry(diagram.associationViews, val);\n});\nexport const diagram_setGeneralizationViews = action((diagram, val) => {\n diagram.generalizationViews = val.map(observe_GeneralizationView);\n});\nexport const diagram_addGeneralizationView = action((diagram, val) => {\n addUniqueEntry(diagram.generalizationViews, observe_GeneralizationView(val));\n});\nexport const diagram_deleteGeneralizationView = action((diagram, val) => {\n deleteEntry(diagram.generalizationViews, val);\n});\nexport const diagram_setPropertyViews = action((diagram, val) => {\n diagram.propertyViews = val.map(observe_PropertyView);\n});\nexport const diagram_addPropertyView = action((diagram, val) => {\n addUniqueEntry(diagram.propertyViews, observe_PropertyView(val));\n});\nexport const diagram_deletePropertyView = action((diagram, val) => {\n deleteEntry(diagram.propertyViews, val);\n});\nexport const classView_setHideProperties = action((cv, val) => {\n cv.hideProperties = val;\n});\nexport const classView_setHideStereotypes = action((cv, val) => {\n cv.hideStereotypes = val;\n});\nexport const classView_setHideTaggedValues = action((cv, val) => {\n cv.hideTaggedValues = val;\n});\nexport const relationshipEdgeView_setOffsetX = action((r, val) => {\n r._offsetX = val;\n});\nexport const relationshipEdgeView_setOffsetY = action((r, val) => {\n r._offsetY = val;\n});\n// NOTE: To optimize performance, for now, we will not observe point (path)\nexport const relationshipView_changePoint = action((v, val, newVal) => {\n changeEntry(v.path, val, newVal);\n});\nexport const relationshipView_simplifyPath = action(_relationshipView_simplifyPath);\nexport const findOrBuildPoint = action(_findOrBuildPoint);\nexport const relationshipView_setPath = action(_relationshipView_setPath);\n// NOTE: To optimize performance, for now, we will not observe rectangle\nexport const positionedRectangle_setRectangle = action((pR, value) => {\n pR.rectangle = value;\n});\n// NOTE: To optimize performance, for now, we will not observe point (path)\nexport const positionedRectangle_setPosition = action((pR, value) => {\n pR.position = value;\n});\n/**\n * NOTE: Having `position` and `rectangle` as observables compromises the performance of diagram\n * so we want to have a way to refresh the hash for change detection to pick up new hash when we resize\n * the class view box or move it.\n *\n * We should re-consider the usefulness of this method, maybe it's more worthwhile to recompute hash\n * for the whole diagram instead?\n */\nexport const positionedRectangle_forceRefreshHash = action((pR) => {\n pR._dummyObservable = {};\n});\n//# sourceMappingURL=DSL_Diagram_GraphModifierHelper.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, getNullableFirstElement, 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';\nimport { class_addProperty, class_addSuperType, } from '@finos/legend-application-studio';\nimport { classView_setHideProperties, classView_setHideStereotypes, classView_setHideTaggedValues, diagram_addClassView, diagram_addGeneralizationView, diagram_addPropertyView, diagram_deleteAssociationView, diagram_deleteClassView, diagram_deleteGeneralizationView, diagram_deletePropertyView, diagram_setAssociationViews, diagram_setClassViews, diagram_setGeneralizationViews, diagram_setPropertyViews, findOrBuildPoint, positionedRectangle_forceRefreshHash, positionedRectangle_setPosition, positionedRectangle_setRectangle, relationshipEdgeView_setOffsetX, relationshipEdgeView_setOffsetY, relationshipView_changePoint, relationshipView_simplifyPath, relationshipView_setPath, } from './stores/studio/DSL_Diagram_GraphModifierHelper.js';\nimport { forceDispatchKeyboardEvent } from '@finos/legend-application';\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 || (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 || (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 || (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 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 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) {\n makeObservable(this, {\n isReadOnly: 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 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 // 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.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 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() {\n this.diagram.classViews.forEach((classView) => this.ensureClassViewMeetMinDimensions(classView));\n this.refresh();\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 class_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 diagram_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 class_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 diagram_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) => positionedRectangle_setPosition(view, new Point(leftBound, view.position.y)));\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) => positionedRectangle_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) => positionedRectangle_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) => positionedRectangle_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) => positionedRectangle_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) => positionedRectangle_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\n .slice()\n .sort((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 positionedRectangle_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 positionedRectangle_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\n .slice()\n .sort((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 positionedRectangle_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 positionedRectangle_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 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 fullPath[fullPath.length - 2], fullPath[fullPath.length - 1], 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 canvasZoomCenterPosition = this.canvasCoordinateToModelCoordinate(this.eventCoordinateToCanvasCoordinate(point));\n const currentZoomLevel = this.zoom;\n this.setZoomLevel(newZoomLevel);\n this.screenOffset = new Point(((canvasZoomCenterPosition.x - this.canvasCenter.x) *\n (currentZoomLevel - newZoomLevel) +\n this.screenOffset.x * currentZoomLevel) /\n newZoomLevel, ((canvasZoomCenterPosition.y - this.canvasCenter.y) *\n (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 positionedRectangle_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 diagram_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 positionedRectangle_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 diagram_addGeneralizationView(this.diagram, new GeneralizationView(this.diagram, newClassView, classView));\n }\n if (_class.generalizations\n .map((generalization) => generalization.value.rawType)\n .includes(addedClass)) {\n diagram_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 diagram_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 diagram_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) {\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 positionedRectangle_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 positionedRectangle_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 fullPath[fullPath.length - 2], fullPath[fullPath.length - 1], 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 = fullPath[fullPath.length - 2].x;\n const startY = fullPath[fullPath.length - 2].y;\n const endX = fullPath[fullPath.length - 1].x;\n const endY = fullPath[fullPath.length - 1].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 relationshipView_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 = getNullableFirstElement(this.selectedClasses);\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 // --------------------------------- Event handler --------------------------\n keydown(e) {\n // NOTE: Since <canvas> element does not bubble `keydown` event naturally, we will\n // manually do this in order to take advantage of application keyboard shortcuts service\n forceDispatchKeyboardEvent(e);\n // Remove selected view(s)\n if ('Delete' === e.code) {\n if (!this.isReadOnly) {\n this.selectedClasses.forEach((classView) => {\n diagram_deleteClassView(this.diagram, classView);\n diagram_setAssociationViews(this.diagram, this.diagram.associationViews.filter((associationView) => !(associationView.from.classView.value === classView ||\n associationView.to.classView.value === classView)));\n diagram_setGeneralizationViews(this.diagram, this.diagram.generalizationViews.filter((generalizationView) => !(generalizationView.from.classView.value === classView ||\n generalizationView.to.classView.value === classView)));\n diagram_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 diagram_deleteAssociationView(this.diagram, this.selectedPropertyOrAssociation);\n }\n else if (this.selectedPropertyOrAssociation instanceof PropertyView) {\n diagram_deletePropertyView(this.diagram, this.selectedPropertyOrAssociation);\n }\n if (this.selectedInheritance) {\n if (this.diagram.generalizationViews.find((generalizationView) => generalizationView === this.selectedInheritance)) {\n diagram_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 classView_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 classView_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 classView_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) => diagram_addClassView(this.diagram, cv));\n res[1].forEach((gv) => diagram_addGeneralizationView(this.diagram, gv));\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) => diagram_addClassView(this.diagram, cv));\n res[1].forEach((gv) => diagram_addGeneralizationView(this.diagram, gv));\n }\n this.drawScreen();\n }\n }\n mouseup(e) {\n if (!this.isReadOnly) {\n switch (this.interactionMode) {\n case DIAGRAM_INTERACTION_MODE.LAYOUT: {\n this.diagram.generalizationViews.forEach((generalizationView) => relationshipView_simplifyPath(generalizationView));\n this.diagram.associationViews.forEach((associationView) => relationshipView_simplifyPath(associationView));\n this.diagram.propertyViews.forEach((propertyView) => relationshipView_simplifyPath(propertyView));\n break;\n }\n case DIAGRAM_INTERACTION_MODE.ADD_CLASS: {\n const eventPointInModelCoordinate = this.canvasCoordinateToModelCoordinate(this.eventCoordinateToCanvasCoordinate(new Point(e.x, e.y)));\n this.onAddClassViewClick(eventPointInModelCoordinate);\n this.changeMode(DIAGRAM_INTERACTION_MODE.LAYOUT, DIAGRAM_RELATIONSHIP_EDIT_MODE.NONE);\n break;\n }\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, new Point(e.x, e.y));\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] +\n 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, new Point(e.x, e.y));\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(new Point(e.x, e.y)));\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 relationshipEdgeView_setOffsetX(gview.from, -(this.startClassView.position.x +\n this.startClassView.rectangle.width / 2 -\n this.selectionStart.x));\n relationshipEdgeView_setOffsetY(gview.from, -(this.startClassView.position.y +\n this.startClassView.rectangle.height / 2 -\n this.selectionStart.y));\n relationshipEdgeView_setOffsetX(gview.to, -(targetClassView.position.x +\n targetClassView.rectangle.width / 2 -\n eventPointInModelCoordinate.x));\n relationshipEdgeView_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 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(new Point(e.x, e.y)));\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 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(new Point(e.x, e.y));\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 = new Point(e.x, e.y);\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 diagram_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 diagram_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 = findOrBuildPoint(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 = findOrBuildPoint(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 = findOrBuildPoint(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 = new Point(e.x, e.y);\n return;\n }\n // right click\n else if (e.button === 2) {\n this.setRightClick(true);\n this.positionBeforeLastMove = new Point(e.x, e.y);\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 // 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, new Point(e.x, e.y));\n }\n mousemove(e) {\n this.cursorPosition = new Point(e.x, e.y);\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 + (e.x - this.positionBeforeLastMove.x) / this.zoom, this.screenOffset.y + (e.y - this.positionBeforeLastMove.y) / this.zoom);\n this.positionBeforeLastMove = new Point(e.x, e.y);\n this.clearScreen();\n this.drawAll();\n }\n else if (this.leftClick) {\n const eventPointInCanvasCoordinate = this.eventCoordinateToCanvasCoordinate(new Point(e.x, e.y));\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 positionedRectangle_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 positionedRectangle_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 positionedRectangle_setPosition(selectedClass, new Point(newMovingX, newMovingY));\n // Refresh hash since ClassView position is not observable\n positionedRectangle_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 relationshipView_changePoint(this.selectedPropertyOrAssociation, this.selectedPoint, eventPointInModelCoordinate);\n }\n else if (this.selectedInheritance) {\n relationshipView_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(new Point(e.x, e.y));\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.fontSize);\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)), \n // cursorY\n 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.fontSize);\n cursorY += this.classViewSpaceY;\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.fontSize * this.zoom)).contains(eventPointInCanvasCoordinate.x, eventPointInCanvasCoordinate.y)) {\n this.setMouseOverClassProperty(property);\n }\n cursorY = cursorY + this.fontSize;\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 fullPath[fullPath.length - 2], fullPath[fullPath.length - 1], 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 // Inheritance helpers\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 // --------------------------------------- Extension -----------------------------------\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 positionedRectangle_setPosition(levels[0], new Point(startX, currentLevelY));\n levels.forEach((view, idx) => {\n if (idx > 0) {\n const precedent = levels[idx - 1];\n positionedRectangle_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}\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 { 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 { hashArray } from '@finos/legend-shared';\nimport { CORE_HASH_STRUCTURE } from '../../../../../graph/Core_HashUtils.js';\nimport { PackageableElement, } from '../PackageableElement.js';\nimport { stub_Class, stub_Property, } from '../../../../../graph/helpers/creator/DomainModelCreatorHelper.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 stub_Property(stub_Class(), stub_Class()),\n stub_Property(stub_Class(), stub_Class()),\n ];\n properties[0]._OWNER = this;\n properties[1]._OWNER = this;\n this.properties = properties;\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 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.documentation,\n this.autoActivateUpdates.toString(),\n this.execution,\n this.test ?? '',\n hashArray(this.tests),\n hashArray(this.postValidations),\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 { 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 { hashArray } from '@finos/legend-shared';\nimport { CORE_HASH_STRUCTURE, hashRawLambda, } from '../../../../../graph/Core_HashUtils.js';\nimport { FunctionDefinition } from './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 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.valueForSerialization ?? '',\n hashArray(this.taggedValues),\n hashArray(this.stereotypes.map((val) => val.pointerHashCode)),\n hashRawLambda(undefined, this.expressionSequence),\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 } 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 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 ]);\n }\n accept_PackageableElementVisitor(visitor) {\n return visitor.visit_Database(this);\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 { UnsupportedOperationError, getClass, IllegalStateError, returnUndefOnError, promisify, filterByType, guaranteeNonNullable, guaranteeType, } 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 '../graph/metamodel/pure/packageableElements/domain/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';\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 SectionIndex,\n Store,\n Mapping,\n PackageableConnection,\n PackageableRuntime,\n Service,\n GenerationSpecification,\n FileGenerationSpecification,\n DataElement,\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 extensions = [];\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 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 dataElementsIndex = new Map();\n constructor(rootPackageName, extensionElementClasses) {\n this.root = new Package(rootPackageName);\n this.extensions = this.createGraphExtensions(extensionElementClasses);\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 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 ownDataElements() {\n return Array.from(this.dataElementsIndex.values());\n }\n get ownGenerationSpecifications() {\n return Array.from(this.generationSpecificationsIndex.values());\n }\n get ownTestables() {\n return [...this.ownServices, ...this.ownMappings];\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) => this.typesIndex.get(path);\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 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 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 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 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 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 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.ownStores,\n ...this.ownMappings,\n ...this.ownServices,\n ...this.ownRuntimes,\n ...this.ownConnections,\n ...this.ownGenerationSpecifications,\n ...this.ownFileGenerations,\n ...this.ownDataElements,\n ...this.extensions.flatMap((extension) => extension.elements),\n ];\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.typesIndex.get(path) ??\n this.profilesIndex.get(path) ??\n this.associationsIndex.get(path) ??\n this.functionsIndex.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.dataElementsIndex.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 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 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 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 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 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 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 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 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 */\nimport { ROOT_PACKAGE_NAME } from '../graph/MetaModelConst.js';\nimport { guaranteeNonNullable } from '@finos/legend-shared';\nimport { Package } from '../graph/metamodel/pure/packageableElements/domain/Package.js';\nimport { BasicModel } from '../graph/BasicModel.js';\nclass DependencyModel extends BasicModel {\n constructor(extensionElementClasses, root) {\n super(ROOT_PACKAGE_NAME.PROJECT_DEPENDENCY_ROOT, extensionElementClasses);\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 root = new Package(ROOT_PACKAGE_NAME.PROJECT_DEPENDENCY_ROOT);\n projectDependencyModelsIndex = new Map();\n extensionElementClasses;\n constructor(extensionElementClasses) {\n this.extensionElementClasses = extensionElementClasses;\n }\n /**\n * Here we create and index a graph for each dependency\n */\n initialize(dependencyEntitiesIndex) {\n Array.from(dependencyEntitiesIndex.keys()).forEach((dependencyKey) => {\n // NOTE: all dependency models will share the dependency manager root package.\n this.projectDependencyModelsIndex.set(dependencyKey, new DependencyModel(this.extensionElementClasses, this.root));\n });\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 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 getOwnNullableStore = buildDependencyElementGetter(this, (dep, path) => dep.getOwnNullableStore(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 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 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 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}\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, } from '../graph/MetaModelConst.js';\nimport { guaranteeNonNullable, guaranteeType, returnUndefOnError, IllegalStateError, } from '@finos/legend-shared';\nimport { 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 '../graph/metamodel/pure/packageableElements/domain/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 } from '../graph/MetaModelUtils.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 get primitiveTypes() {\n return Array.from(this.primitiveTypesIndex.values());\n }\n constructor(extensionElementClasses) {\n super(ROOT_PACKAGE_NAME.CORE, extensionElementClasses);\n this.initializePrimitiveTypes();\n // index model store singleton\n this.setOwnStore(ModelStore.NAME, ModelStore.INSTANCE);\n }\n get allOwnElements() {\n return [...super.allOwnElements, ...this.primitiveTypes];\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 ].forEach((primitiveType) => {\n this.primitiveTypesIndex.set(primitiveType.path, primitiveType);\n this.setOwnType(primitiveType.path, primitiveType);\n });\n }\n}\nexport class SystemModel extends BasicModel {\n autoImports = [];\n constructor(extensionElementClasses) {\n super(ROOT_PACKAGE_NAME.SYSTEM, extensionElementClasses);\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 */\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(extensionElementClasses) {\n super(ROOT_PACKAGE_NAME.MODEL_GENERATION, extensionElementClasses);\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 graphPlugins = [];\n constructor(coreModel, systemModel, graphPlugins) {\n const extensionElementClasses = graphPlugins.flatMap((plugin) => plugin.getExtraPureGraphExtensionClasses?.() ?? []);\n super(ROOT_PACKAGE_NAME.MAIN, extensionElementClasses);\n this.graphPlugins = graphPlugins;\n this.coreModel = coreModel;\n this.systemModel = systemModel;\n this.generationModel = new GenerationModel(extensionElementClasses);\n this.dependencyManager = new DependencyManager(extensionElementClasses);\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 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 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 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 allOwnTestables() {\n const extraTestables = this.graphPlugins\n .flatMap((plugin) => plugin.getExtraTestablesCollectors?.() ?? [])\n .map((collector) => collector(this));\n return [...this.ownTestables].concat(...extraTestables);\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 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 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 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 { 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';\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 { DIAGRAM_INTERACTION_MODE, } from '@finos/legend-extension-dsl-diagram';\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 { EditorTabState } from './EditorTabManagerState.js';\nimport { LEGEND_PURE_IDE_DIAGRAM_EDITOR_COMMAND_KEY } from './LegendPureIDECommand.js';\nexport class DiagramEditorState extends EditorTabState {\n diagramInfo;\n _renderer;\n diagram;\n diagramClasses;\n graph;\n diagramPath;\n filePath;\n fileLine;\n fileColumn;\n constructor(editorStore, diagramInfo, diagramPath, filePath, fileLine, fileColumn) {\n super(editorStore);\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.editorStore.executeNavigation(coordinate)).catch(this.editorStore.applicationStore.alertUnhandledError);\n }\n };\n }\n setRenderer(val) {\n this._renderer = val;\n }\n *addClassView(path, position) {\n const diagramClassInfo = deserialize(DiagramClassInfo, yield this.editorStore.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.editorStore.tabManagerState.currentTab === this &&\n // make sure the renderer is initialized\n this.isDiagramRendererInitialized;\n this.editorStore.applicationStore.commandCenter.registerCommand({\n key: LEGEND_PURE_IDE_DIAGRAM_EDITOR_COMMAND_KEY.RECENTER,\n trigger: DEFAULT_TRIGGER,\n action: () => this.renderer.recenter(),\n });\n this.editorStore.applicationStore.commandCenter.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.editorStore.applicationStore.commandCenter.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.editorStore.applicationStore.commandCenter.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.editorStore.applicationStore.commandCenter.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 SearchCommandState {\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 toggleCaseSensitive() {\n this.setCaseSensitive(!this.isCaseSensitive);\n }\n setRegExp(value) {\n this.isRegExp = value;\n }\n toggleRegExp() {\n this.setRegExp(!this.isRegExp);\n }\n}\n//# sourceMappingURL=SearchCommandState.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 { action, flow, flowResult, makeObservable, observable } from 'mobx';\nimport { ACTIVITY_MODE, AUX_PANEL_MODE } from './EditorConfig.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, UnmatchedResult, GetConceptResult, deserializeExecutionResult, ExecutionFailureResult, ExecutionSuccessResult, } from '../server/models/Execution.js';\nimport { getSearchResultEntry, SearchResultCoordinate, } from '../server/models/SearchEntry.js';\nimport { UsageResultState, UnmatchedFunctionExecutionResultState, UnmatchExecutionResultState, SearchResultState, TextSearchResultState, } from './SearchResultState.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, } from '@finos/legend-shared';\nimport { PureClient 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 { SearchCommandState } from './SearchCommandState.js';\nimport { EditorTabManagerState } from './EditorTabManagerState.js';\nimport { LEGEND_PURE_IDE_COMMAND_KEY } from './LegendPureIDECommand.js';\nimport { ExecutionError } from '../server/models/ExecutionError.js';\nimport { ELEMENT_PATH_DELIMITER } from '@finos/legend-graph';\nimport { ConceptType } from '../server/models/ConceptTree.js';\nexport class EditorStore {\n applicationStore;\n initState = ActionState.create();\n directoryTreeState;\n conceptTreeState;\n client;\n // Layout\n isMaxAuxPanelSizeSet = false;\n activeAuxPanelMode = AUX_PANEL_MODE.CONSOLE;\n auxPanelDisplayState = new PanelDisplayState({\n initial: 0,\n default: 300,\n snap: 100,\n });\n activeActivity = ACTIVITY_MODE.CONCEPT;\n sideBarDisplayState = new PanelDisplayState({\n initial: 300,\n default: 300,\n snap: 150,\n });\n tabManagerState = new EditorTabManagerState(this);\n executionState = ActionState.create();\n navigationStack = []; // TODO?: we might want to limit the number of items in this stack\n // Console\n consoleText;\n // Search Command\n fileSearchCommandLoadingState = ActionState.create();\n fileSearchCommandState = new SearchCommandState();\n openFileSearchCommand = false;\n fileSearchCommandResults = [];\n textSearchCommandLoadingState = ActionState.create();\n textSearchCommandState = new SearchCommandState();\n openTextSearchCommand = false;\n // Search Panel\n searchState;\n // Test\n testRunState = ActionState.create();\n testRunnerState;\n constructor(applicationStore) {\n makeObservable(this, {\n isMaxAuxPanelSizeSet: observable,\n activeAuxPanelMode: observable,\n activeActivity: observable,\n consoleText: observable,\n navigationStack: observable,\n openFileSearchCommand: observable,\n fileSearchCommandResults: observable,\n fileSearchCommandState: observable,\n openTextSearchCommand: observable,\n textSearchCommandState: observable,\n searchState: observable,\n testRunnerState: observable,\n setOpenFileSearchCommand: action,\n setOpenTextSearchCommand: action,\n setActiveAuxPanelMode: action,\n setActiveActivity: action,\n setConsoleText: action,\n setSearchState: action,\n setTestRunnerState: action,\n pullInitializationActivity: action,\n pullExecutionStatus: action,\n initialize: flow,\n checkIfSessionWakingUp: flow,\n loadDiagram: flow,\n loadFile: flow,\n reloadFile: flow,\n execute: flow,\n executeGo: flow,\n manageExecuteGoResult: flow,\n executeTests: flow,\n executeFullTestSuite: flow,\n executeNavigation: flow,\n navigateBack: flow,\n executeSaveAndReset: flow,\n fullReCompile: flow,\n refreshTrees: flow,\n command: flow,\n findUsages: flow,\n renameConcept: flow,\n movePackageableElements: flow,\n updateFileUsingSuggestionCandidate: flow,\n updateFile: flow,\n searchFile: flow,\n searchText: flow,\n createNewDirectory: flow,\n createNewFile: flow,\n renameFile: flow,\n deleteDirectoryOrFile: flow,\n });\n this.applicationStore = applicationStore;\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 }\n setOpenFileSearchCommand(val) {\n this.openFileSearchCommand = val;\n }\n setOpenTextSearchCommand(val) {\n this.openTextSearchCommand = val;\n }\n setActiveAuxPanelMode(val) {\n this.activeAuxPanelMode = val;\n }\n setConsoleText(value) {\n this.consoleText = value;\n }\n setSearchState(val) {\n this.searchState = 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.setBlockingAlert(undefined);\n this.applicationStore.setActionAlertInfo(undefined);\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.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 const initializationPromise = this.client.initialize(!fullInit);\n this.applicationStore.setBlockingAlert({\n message: 'Loading Pure IDE...',\n prompt: 'Please be patient as we are building the initial application state',\n showLoading: true,\n });\n yield this.pullInitializationActivity();\n this.applicationStore.setBlockingAlert(undefined);\n const openWelcomeFilePromise = flowResult(this.loadFile('/welcome.pure'));\n const directoryTreeInitPromise = this.directoryTreeState.initialize();\n const conceptTreeInitPromise = this.conceptTreeState.initialize();\n const result = deserializeInitializationnResult((yield initializationPromise));\n if (result.text) {\n this.setConsoleText(result.text);\n this.setActiveAuxPanelMode(AUX_PANEL_MODE.CONSOLE);\n this.auxPanelDisplayState.open();\n }\n if (result instanceof InitializationFailureResult) {\n if (result.sessionError) {\n this.applicationStore.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 ]);\n }\n }\n catch (error) {\n assertErrorThrown(error);\n this.applicationStore.notifyError(error);\n this.initState.fail();\n this.applicationStore.setBlockingAlert({\n message: 'Failed to initialize IDE',\n prompt: 'Make sure the IDE server is working, otherwise try to restart it',\n });\n return;\n }\n this.initState.pass();\n }\n *checkIfSessionWakingUp(message) {\n this.applicationStore.setBlockingAlert({\n message: message ?? 'Checking IDE session...',\n showLoading: true,\n });\n yield this.pullInitializationActivity((activity) => {\n if (activity.text) {\n this.applicationStore.setBlockingAlert({\n message: message ?? 'Checking IDE session...',\n prompt: activity.text,\n showLoading: true,\n });\n }\n });\n this.applicationStore.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.commandCenter.registerCommand({\n key: LEGEND_PURE_IDE_COMMAND_KEY.SEARCH_FILE,\n trigger: () => this.initState.hasSucceeded,\n action: () => this.setOpenFileSearchCommand(true),\n });\n this.applicationStore.commandCenter.registerCommand({\n key: LEGEND_PURE_IDE_COMMAND_KEY.SEARCH_TEXT,\n trigger: () => this.initState.hasSucceeded,\n action: () => this.setOpenTextSearchCommand(true),\n });\n this.applicationStore.commandCenter.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, true);\n }\n },\n });\n this.applicationStore.commandCenter.registerCommand({\n key: LEGEND_PURE_IDE_COMMAND_KEY.TOGGLE_AUX_PANEL,\n trigger: () => this.initState.hasSucceeded,\n action: () => this.auxPanelDisplayState.toggle(),\n });\n this.applicationStore.commandCenter.registerCommand({\n key: LEGEND_PURE_IDE_COMMAND_KEY.EXECUTE,\n action: () => {\n flowResult(this.executeGo()).catch(this.applicationStore.alertUnhandledError);\n },\n });\n this.applicationStore.commandCenter.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.commandCenter.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.commandCenter.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.commandCenter.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_AUX_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.commandCenter.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 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 *reloadFile(filePath) {\n const tabsToClose = [];\n yield 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, options) {\n if (!this.initState.hasSucceeded) {\n this.applicationStore.notifyWarning(`Can't execute while initializing application`);\n return;\n }\n if (this.executionState.isInProgress) {\n this.applicationStore.notifyWarning('Another execution is already in progress!');\n return;\n }\n // reset search state before execution\n if (!(this.searchState instanceof SearchResultState)) {\n this.setSearchState(undefined);\n }\n this.executionState.inProgress();\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) => setTimeout(() => {\n if (!executionPromiseFinished && checkExecutionStatus) {\n this.applicationStore.setBlockingAlert({\n message: 'Executing...',\n prompt: 'Please do not refresh the application',\n showLoading: true,\n });\n resolve(this.pullExecutionStatus());\n }\n resolve();\n }, WAIT_TIME_TO_TRIGGER_STATUS_CHECK, true)),\n ]);\n const result = deserializeExecutionResult(guaranteeNonNullable(executionPromiseResult));\n this.applicationStore.setBlockingAlert(undefined);\n if (!options?.avoidUpdatingConsoleText) {\n this.setConsoleText(result.text);\n }\n if (result instanceof ExecutionFailureResult) {\n this.applicationStore.notifyWarning('Execution failed!');\n if (result.sessionError) {\n this.applicationStore.setBlockingAlert({\n message: 'Session corrupted',\n prompt: result.sessionError,\n });\n }\n else {\n yield flowResult(manageResult(result));\n }\n }\n else if (result instanceof ExecutionSuccessResult) {\n this.applicationStore.notifySuccess('Execution succeeded!');\n if (result.reinit) {\n this.applicationStore.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)), this.client.mode, this.client.compilerMode));\n }\n else {\n yield flowResult(manageResult(result));\n }\n }\n else {\n yield flowResult(manageResult(result));\n }\n }\n finally {\n this.applicationStore.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.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.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) => flowResult(this.manageExecuteGoResult(result))));\n }\n *manageExecuteGoResult(result) {\n const refreshTreesPromise = flowResult(this.refreshTrees());\n if (result instanceof ExecutionFailureResult) {\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 if (result instanceof UnmatchedFunctionResult) {\n this.setSearchState(new UnmatchedFunctionExecutionResultState(this, result));\n this.setActiveAuxPanelMode(AUX_PANEL_MODE.SEARCH_RESULT);\n this.auxPanelDisplayState.open();\n }\n else if (result instanceof UnmatchedResult) {\n this.setSearchState(new UnmatchExecutionResultState(this, result));\n this.setActiveAuxPanelMode(AUX_PANEL_MODE.SEARCH_RESULT);\n this.auxPanelDisplayState.open();\n }\n }\n else if (result instanceof ExecutionSuccessResult) {\n if (result.modifiedFiles.length) {\n for (const path of result.modifiedFiles) {\n yield flowResult(this.reloadFile(path));\n }\n }\n }\n yield refreshTreesPromise;\n }\n *executeTests(path, relevantTestsOnly) {\n if (relevantTestsOnly) {\n this.applicationStore.notifyUnsupportedFeature(`Run relevant tests! (reason: VCS required)`);\n return;\n }\n if (this.testRunState.isInProgress) {\n this.applicationStore.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 relevantTestsOnly,\n }, false, async (result) => {\n const refreshTreesPromise = flowResult(this.refreshTrees());\n if (result instanceof ExecutionFailureResult) {\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 this.setActiveAuxPanelMode(AUX_PANEL_MODE.CONSOLE);\n this.auxPanelDisplayState.open();\n this.testRunState.fail();\n }\n else if (result instanceof TestExecutionResult) {\n this.setActiveAuxPanelMode(AUX_PANEL_MODE.TEST_RUNNER);\n this.auxPanelDisplayState.open();\n const testRunnerState = new TestRunnerState(this, result);\n this.setTestRunnerState(testRunnerState);\n await flowResult(testRunnerState.buildTestTreeData());\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 // do nothing?\n await refreshTreesPromise;\n }));\n }\n *executeFullTestSuite(relevantTestsOnly) {\n yield flowResult(this.executeTests('::', 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) => {\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 }, { avoidUpdatingConsoleText: true }));\n }\n *navigateBack() {\n if (this.navigationStack.length === 0) {\n this.applicationStore.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 *executeSaveAndReset(fullInit) {\n yield flowResult(this.execute('executeSaveAndReset', {}, true, async (result) => {\n this.initState.reset();\n await flowResult(this.initialize(fullInit, undefined, this.client.mode, this.client.compilerMode));\n this.setActiveActivity(ACTIVITY_MODE.CONCEPT, {\n keepShowingIfMatchedCurrent: true,\n });\n }));\n }\n *fullReCompile(fullInit) {\n this.applicationStore.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.executeSaveAndReset(fullInit)).catch(this.applicationStore.alertUnhandledError);\n },\n },\n {\n label: 'Abort',\n type: ActionAlertActionType.PROCEED,\n default: true,\n },\n ],\n });\n }\n *refreshTrees() {\n yield Promise.all([\n this.directoryTreeState.refreshTreeData(),\n this.conceptTreeState.refreshTreeData(),\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.notifyWarning(errorMessage);\n return;\n }\n if (!concept.path) {\n return;\n }\n this.applicationStore.setBlockingAlert({\n message: 'Revealing concept in tree...',\n showLoading: true,\n });\n try {\n if (this.activeActivity !== ACTIVITY_MODE.CONCEPT) {\n this.setActiveActivity(ACTIVITY_MODE.CONCEPT);\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 }\n catch {\n this.applicationStore.notifyWarning(errorMessage);\n }\n finally {\n this.applicationStore.setBlockingAlert(undefined);\n }\n }\n *command(cmd) {\n try {\n const result = deserializeCommandResult((yield cmd()));\n if (result instanceof CommandFailureResult) {\n if (result.errorDialog) {\n this.applicationStore.notifyWarning(`Error: ${result.text}`);\n }\n else {\n this.setConsoleText(result.text);\n }\n return false;\n }\n return true;\n }\n catch (error) {\n assertErrorThrown(error);\n this.applicationStore.notifyError(error);\n return false;\n }\n }\n async getConceptInfo(coordinate) {\n try {\n return this.client.getConceptInfo(coordinate.file, coordinate.line, coordinate.column);\n }\n catch {\n this.applicationStore.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 undefined;\n }\n }\n async findConceptUsages(func, param) {\n return (await this.client.getUsages(func, param)).map((usage) => deserialize(Usage, usage));\n }\n *findUsages(coordinate) {\n const concept = (yield this.getConceptInfo(coordinate));\n if (!concept) {\n return;\n }\n try {\n this.applicationStore.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.setSearchState(new UsageResultState(this, concept, usages, searchResultCoordinates));\n this.setActiveAuxPanelMode(AUX_PANEL_MODE.SEARCH_RESULT);\n this.auxPanelDisplayState.open();\n }\n catch (error) {\n assertErrorThrown(error);\n this.applicationStore.notifyError(error);\n }\n finally {\n this.applicationStore.setBlockingAlert(undefined);\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 flowResult(this.reloadFile(file));\n }\n yield flowResult(this.refreshTrees());\n this.setConsoleText(`Sucessfully renamed concept. Please re-compile the code`);\n this.applicationStore.notifyWarning(`Please re-compile the code after refacting`);\n }\n catch {\n this.applicationStore.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 flowResult(this.reloadFile(file));\n }\n yield flowResult(this.refreshTrees());\n this.setConsoleText(`Sucessfully moved packageble elements. Please re-compile the code`);\n this.applicationStore.notifyWarning(`Please re-compile the code after refacting`);\n }\n catch {\n this.applicationStore.notifyError(`Can't move packageable elements`);\n }\n }\n *updateFileUsingSuggestionCandidate(candidate) {\n this.setSearchState(undefined);\n yield flowResult(this.updateFile(candidate.fileToBeModified, candidate.lineToBeModified, candidate.columnToBeModified, candidate.add, candidate.messageToBeModified));\n this.setActiveAuxPanelMode(AUX_PANEL_MODE.CONSOLE);\n this.auxPanelDisplayState.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 flowResult(this.reloadFile(file));\n }\n }\n this.setConsoleText(`Sucessfully updated file. Please re-compile the code`);\n this.applicationStore.notifyWarning(`Please re-compile the code after refacting`);\n }\n catch {\n this.applicationStore.notifyError(`Can't update file: ${path}`);\n }\n }\n *searchFile() {\n if (this.fileSearchCommandLoadingState.isInProgress) {\n return;\n }\n this.fileSearchCommandLoadingState.inProgress();\n this.fileSearchCommandResults = (yield this.client.findFiles(this.fileSearchCommandState.text, this.fileSearchCommandState.isRegExp));\n this.fileSearchCommandLoadingState.pass();\n }\n *searchText() {\n if (this.textSearchCommandLoadingState.isInProgress) {\n return;\n }\n this.textSearchCommandLoadingState.inProgress();\n this.setActiveAuxPanelMode(AUX_PANEL_MODE.SEARCH_RESULT);\n this.auxPanelDisplayState.open();\n try {\n const results = (yield this.client.searchText(this.textSearchCommandState.text, this.textSearchCommandState.isCaseSensitive, this.textSearchCommandState.isRegExp)).map((result) => getSearchResultEntry(result));\n this.setSearchState(new TextSearchResultState(this, results));\n this.textSearchCommandLoadingState.pass();\n }\n catch (error) {\n assertErrorThrown(error);\n this.applicationStore.notifyError(error);\n this.textSearchCommandLoadingState.fail();\n }\n }\n *createNewDirectory(path) {\n try {\n yield flowResult(this.command(() => this.client.createFolder(trimPathLeadingSlash(path))));\n yield flowResult(this.directoryTreeState.refreshTreeData());\n }\n catch (error) {\n assertErrorThrown(error);\n this.applicationStore.notifyError(error);\n }\n }\n *createNewFile(path) {\n try {\n const result = (yield flowResult(this.command(() => this.client.createFile(trimPathLeadingSlash(path)))));\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.notifyError(error);\n }\n }\n *renameFile(oldPath, newPath) {\n try {\n yield flowResult(this.command(() => this.client.renameFile(oldPath, newPath)));\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.notifyError(error);\n }\n }\n *deleteDirectoryOrFile(path, isDirectory, hasChildContent) {\n const _delete = async () => {\n await flowResult(this.command(() => this.client.deleteDirectoryOrFile(trimPathLeadingSlash(path))));\n const editorStatesToClose = this.tabManagerState.tabs.filter((tab) => tab instanceof FileEditorState &&\n (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 this.applicationStore.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//# sourceMappingURL=EditorStore.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 { EditorStore } from '../../stores/EditorStore.js';\nimport { guaranteeNonNullable } from '@finos/legend-shared';\nimport { useApplicationStore } from '@finos/legend-application';\nconst EditorStoreContext = createContext(undefined);\nexport const EditorStoreProvider = ({ children, }) => {\n const applicationStore = useApplicationStore();\n const store = useLocalObservable(() => new EditorStore(applicationStore));\n return (_jsx(EditorStoreContext.Provider, { value: store, children: children }));\n};\nexport const useEditorStore = () => guaranteeNonNullable(useContext(EditorStoreContext), `Can't find editor store in context`);\nexport const withEditorStore = (WrappedComponent) => function WithEditorStore() {\n return (_jsx(EditorStoreProvider, { children: _jsx(WrappedComponent, {}) }));\n};\n//# sourceMappingURL=EditorStoreProvider.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 { BlankPanelContent } from '@finos/legend-art';\nimport { observer } from 'mobx-react-lite';\nimport { useEditorStore } from '../EditorStoreProvider.js';\nexport const Console = observer(() => {\n const editorStore = useEditorStore();\n return (_jsxs(\"div\", { className: \"console-panel\", children: [editorStore.consoleText && (_jsx(\"pre\", { className: \"console-panel__content\", children: editorStore.consoleText.trim() })), !editorStore.consoleText && (_jsx(BlankPanelContent, { children: _jsx(\"div\", { className: \"auxiliary-panel__splash-screen\", children: _jsx(\"div\", { className: \"auxiliary-panel__splash-screen__content\", children: _jsxs(\"div\", { className: \"auxiliary-panel__splash-screen__content__item\", children: [_jsx(\"div\", { className: \"auxiliary-panel__splash-screen__content__item__label\", children: \"Execute to see output\" }), _jsx(\"div\", { className: \"auxiliary-panel__splash-screen__content__item__hot-keys\", children: _jsx(\"div\", { className: \"hotkey__key\", children: \"F9\" }) })] }) }) }) }))] }));\n});\n//# sourceMappingURL=ConsolePanel.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 { TextSearchResultState, UnmatchedFunctionExecutionResultState, UnmatchExecutionResultState, UsageResultState, } from '../../../stores/SearchResultState.js';\nimport { getConceptInfoLabel } from '../../../server/models/Usage.js';\nimport { ArrowCircleRightIcon, BlankPanelContent, FileAltIcon, PanelLoadingIndicator, PlusIcon, TimesIcon, } from '@finos/legend-art';\nimport { useApplicationStore } from '@finos/legend-application';\nimport { useEditorStore } from '../EditorStoreProvider.js';\nconst SearchResultEntryDisplay = observer((props) => {\n const { searchState, searchEntry } = props;\n const editorStore = useEditorStore();\n const applicationStore = useApplicationStore();\n const goToResult = (coordinate) => () => flowResult(editorStore.loadFile(searchEntry.sourceId, new FileCoordinate(searchEntry.sourceId, coordinate.startLine, coordinate.startColumn))).catch(applicationStore.alertUnhandledError);\n const dismissResultForFile = () => searchState.dismissSearchEntry(searchEntry);\n const dismissCoordinate = (coordinate) => () => {\n searchEntry.dismissCoordinate(coordinate);\n if (!searchEntry.coordinates.length) {\n searchState.dismissSearchEntry(searchEntry);\n }\n };\n return (_jsxs(\"div\", { className: \"search-panel__entry\", children: [_jsxs(\"div\", { className: \"search-panel__entry__header\", children: [_jsxs(\"div\", { className: \"search-panel__entry__header__title\", children: [_jsx(\"div\", { className: \"search-panel__entry__header__title__label\", children: _jsx(FileAltIcon, {}) }), _jsx(\"div\", { className: \"search-panel__entry__header__title__content\", children: trimPathLeadingSlash(searchEntry.sourceId) })] }), _jsxs(\"div\", { className: \"search-panel__entry__header__actions\", children: [_jsx(\"div\", { className: \"search-panel__entry__header__action search-panel__entry__header__action--with-counter\", children: _jsx(\"div\", { className: \"search-panel__entry__header__action__counter\", children: searchEntry.coordinates.length }) }), _jsx(\"button\", { className: \"search-panel__entry__header__action search-panel__entry__header__action--hidden\", tabIndex: -1, title: \"Dismiss\", onClick: dismissResultForFile, children: _jsx(TimesIcon, {}) })] })] }), _jsx(\"div\", { className: \"search-panel__entry__content\", children: searchEntry.coordinates.map((coordinate) => (_jsxs(\"div\", { className: \"search-panel__entry__content__item\", children: [_jsxs(\"div\", { className: \"search-panel__entry__content__item__label search-panel__entry__content__item__label--full\", title: \"Go to Result\", onClick: goToResult(coordinate), children: [coordinate.preview && (_jsxs(\"div\", { className: \"search-panel__entry__content__item__label__content\", children: [_jsx(\"div\", { className: \"search-panel__entry__content__item__label__coordinates\", children: `[${coordinate.startLine}:${coordinate.startColumn}]` }), _jsxs(\"div\", { className: \"search-panel__entry__content__item__label__preview\", children: [_jsx(\"span\", { className: \"search-panel__entry__content__item__label__preview__text\", children: coordinate.preview.before }), _jsx(\"span\", { className: \"search-panel__entry__content__item__label__preview__text search-panel__entry__content__item__label__preview__text--found\", children: coordinate.preview.found.replaceAll(/\\n/g, '\\u21B5') }), _jsx(\"span\", { className: \"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: \"search-panel__entry__content__item__actions\", children: _jsx(\"button\", { className: \"search-panel__entry__content__item__action 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 { searchState } = props;\n const editorStore = useEditorStore();\n if (!searchState.searchEntries.length) {\n return (_jsx(BlankPanelContent, { children: `No occurrences found for '${editorStore.textSearchCommandState.text}'` }));\n }\n return (_jsxs(\"div\", { className: \"search-panel__content\", children: [_jsx(\"div\", { className: \"search-panel__content__header\", children: `Showing ${searchState.numberOfResults} result(s) in ${searchState.numberOfFiles} files for '${editorStore.textSearchCommandState.text}'` }), searchState.searchEntries.map((searchEntry) => (_jsx(SearchResultEntryDisplay, { searchState: searchState, searchEntry: searchEntry }, searchEntry.uuid)))] }));\n});\nconst UsageResultDisplay = observer((props) => {\n const { usageState } = props;\n if (!usageState.searchEntries.length) {\n return (_jsx(BlankPanelContent, { children: `No usages found for ${getConceptInfoLabel(usageState.usageConcept)}` }));\n }\n return (_jsxs(\"div\", { className: \"search-panel__content\", children: [_jsx(\"div\", { className: \"search-panel__content__header\", children: `Showing ${usageState.numberOfResults} usages(s) in ${usageState.numberOfFiles} files for ${getConceptInfoLabel(usageState.usageConcept)}` }), usageState.searchEntries.map((searchEntry) => (_jsx(SearchResultEntryDisplay, { searchState: usageState, searchEntry: searchEntry }, searchEntry.uuid)))] }));\n});\nconst CandidateWithPackageImportedDisplay = observer((props) => {\n const { candidate } = props;\n const editorStore = useEditorStore();\n const applicationStore = useApplicationStore();\n const goToResult = () => {\n flowResult(editorStore.loadFile(candidate.sourceID, new FileCoordinate(candidate.sourceID, candidate.line, candidate.column))).catch(applicationStore.alertUnhandledError);\n };\n return (_jsxs(\"div\", { className: \"search-panel__entry__content__item\", children: [_jsxs(\"div\", { className: \"search-panel__entry__content__item__label__candidate\", title: \"Go to Result\", onClick: goToResult, children: [_jsx(\"div\", { className: \"search-panel__entry__content__item__label__candidate-name\", children: candidate.foundName }), _jsx(\"div\", { className: \"search-panel__entry__content__item__label__candidate-location\", children: `${trimPathLeadingSlash(candidate.sourceID)} [${candidate.line}:${candidate.column}]` })] }), _jsx(\"div\", { className: \"search-panel__entry__content__item__actions\", children: _jsx(\"button\", { className: \"search-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 editorStore = useEditorStore();\n const applicationStore = useApplicationStore();\n const goToResult = () => {\n flowResult(editorStore.loadFile(candidate.sourceID, new FileCoordinate(candidate.sourceID, candidate.line, candidate.column))).catch(applicationStore.alertUnhandledError);\n };\n const useCandidate = () => {\n flowResult(editorStore.updateFileUsingSuggestionCandidate(candidate)).catch(applicationStore.alertUnhandledError);\n };\n return (_jsxs(\"div\", { className: \"search-panel__entry__content__item\", children: [_jsxs(\"div\", { className: \"search-panel__entry__content__item__label__candidate\", title: \"Add Suggested Import\", onClick: useCandidate, children: [_jsx(\"div\", { className: \"search-panel__entry__content__item__label__candidate-name\", children: candidate.foundName }), _jsx(\"div\", { className: \"search-panel__entry__content__item__label__candidate-location\", children: `${trimPathLeadingSlash(candidate.sourceID)} [${candidate.line}:${candidate.column}]` })] }), _jsx(\"div\", { className: \"search-panel__entry__content__item__actions\", children: _jsx(\"button\", { className: \"search-panel__entry__content__item__action\", tabIndex: -1, title: \"Go to Result\", onClick: goToResult, children: _jsx(ArrowCircleRightIcon, {}) }) })] }));\n});\nconst UnmatchedFunctionExecutionResultDisplay = observer((props) => {\n const { searchState } = props;\n const result = searchState.result;\n return (_jsxs(\"div\", { className: \"search-panel__content\", children: [!result.candidatesWithPackageImported.length && (_jsx(\"div\", { className: \"search-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: \"search-panel__content__header\", children: `These functions, in packages already imported, would match the function '${result.candidateName}' if you changed the parameters` }), _jsx(\"div\", { className: \"search-panel__entry\", children: result.candidatesWithPackageImported.map((candidate) => (_jsx(CandidateWithPackageImportedDisplay, { candidate: candidate }, candidate.uuid))) })] })), !result.candidatesWithPackageNotImported.length && (_jsx(\"div\", { className: \"search-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: \"search-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: \"search-panel__entry\", children: result.candidatesWithPackageNotImported.map((candidate) => (_jsx(CandidateWithPackageNotImportedDisplay, { candidate: candidate }, candidate.uuid))) })] }))] }));\n});\nconst UnmatchExecutionResultDisplay = observer((props) => {\n const { searchState } = props;\n const result = searchState.result;\n return (_jsxs(\"div\", { className: \"search-panel__content\", children: [!result.candidates.length && (_jsx(\"div\", { className: \"search-panel__content__header\", children: `No possible matches found for '${result.candidateName}'` })), Boolean(result.candidates.length) && (_jsxs(_Fragment, { children: [_jsx(\"div\", { className: \"search-panel__content__header\", children: `Found possible matches for '${result.candidateName}'. Click on result to import the necessary package` }), _jsx(\"div\", { className: \"search-panel__entry\", children: result.candidates.map((candidate) => (_jsx(CandidateWithPackageNotImportedDisplay, { candidate: candidate }, candidate.uuid))) })] }))] }));\n});\nexport const SearchPanel = observer(() => {\n const editorStore = useEditorStore();\n return (_jsxs(\"div\", { className: \"search-panel\", children: [_jsx(PanelLoadingIndicator, { isLoading: editorStore.textSearchCommandLoadingState.isInProgress }), !editorStore.searchState && (_jsx(BlankPanelContent, { children: _jsx(\"div\", { className: \"auxiliary-panel__splash-screen\", children: _jsx(\"div\", { className: \"auxiliary-panel__splash-screen__content\", children: _jsxs(\"div\", { className: \"auxiliary-panel__splash-screen__content__item\", children: [_jsx(\"div\", { className: \"auxiliary-panel__splash-screen__content__item__label\", children: \"Search something\" }), _jsxs(\"div\", { className: \"auxiliary-panel__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: \"Shift\" }), _jsx(\"div\", { className: \"hotkey__plus\", children: _jsx(PlusIcon, {}) }), _jsx(\"div\", { className: \"hotkey__key\", children: \"F\" })] })] }) }) }) })), editorStore.searchState instanceof UsageResultState && (_jsx(UsageResultDisplay, { usageState: editorStore.searchState })), editorStore.searchState instanceof TextSearchResultState && (_jsx(TextSearchResultDisplay, { searchState: editorStore.searchState })), editorStore.searchState instanceof\n UnmatchedFunctionExecutionResultState && (_jsx(UnmatchedFunctionExecutionResultDisplay, { searchState: editorStore.searchState })), editorStore.searchState instanceof UnmatchExecutionResultState && (_jsx(UnmatchExecutionResultDisplay, { searchState: editorStore.searchState }))] }));\n});\n//# sourceMappingURL=SearchPanel.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 './CJS__Icon.cjs';\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 } 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 } }));\n//# sourceMappingURL=ResizablePanel.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, } from '@finos/legend-art';\nimport { guaranteeNonNullable, isNonNullable, noop, } from '@finos/legend-shared';\nimport { useApplicationStore } from '@finos/legend-application';\nimport { useEditorStore } from '../EditorStoreProvider.js';\nimport { FileCoordinate } from '../../../server/models/File.js';\nimport { ELEMENT_PATH_DELIMITER } from '@finos/legend-graph';\nconst TestTreeNodeContainer = observer((props) => {\n const { node, level, stepPaddingInRem, onNodeSelect, innerProps } = props;\n const { testRunnerState, onNodeOpen, onNodeExpand, onNodeCompress, renderNodeLabel, } = innerProps;\n const editorStore = useEditorStore();\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(editorStore.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: toggleExpansion, 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});\nconst TestResultViewer = observer((props) => {\n const { testRunnerState, selectedTestId, testResultInfo } = props;\n const editorStore = useEditorStore();\n const applicationStore = useApplicationStore();\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(editorStore.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(\"div\", { className: \"panel\", children: [_jsxs(\"div\", { className: \"panel__header\", children: [_jsx(\"div\", { className: \"panel__header__title\", children: _jsx(\"div\", { className: \"panel__header__title__label\", children: testInfo.text }) }), _jsx(\"div\", { className: \"panel__header__actions\", children: _jsx(\"button\", { className: \"panel__header__action\", tabIndex: -1, title: \"Open File\", onClick: goToFile, children: _jsx(GoToFileIcon, {}) }) })] }), _jsxs(\"div\", { className: \"panel__content test-runner-panel__result\", children: [!result && (_jsx(\"div\", { className: \"test-runner-panel__result__content\", children: \"Running...\" })), result instanceof TestSuccessResult && (_jsx(\"div\", { className: \"test-runner-panel__result__content\", children: \"Test passed!\" })), result instanceof TestFailureResult && (_jsx(\"pre\", { className: \"test-runner-panel__result__content\", children: result.error.text }))] })] }));\n});\nconst TestRunnerResultDisplay = observer((props) => {\n const { testRunnerState } = props;\n const editorStore = useEditorStore();\n const applicationStore = useApplicationStore();\n const numberOfTests = testRunnerState.testExecutionResult.count;\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 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\"] }))] }) }), _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: !editorStore.testRunState.isInProgress, onClick: cancelTestRun, title: \"Stop\", children: _jsx(BanIcon, {}) }), _jsx(\"button\", { className: \"panel__header__action\", tabIndex: -1, onClick: runSuite, disabled: editorStore.testRunState.isInProgress, title: \"Run Suite\", children: _jsx(PlayIcon, {}) })] })] }), _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: editorStore.auxPanelDisplayState.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 editorStore = useEditorStore();\n const testRunnerState = editorStore.testRunnerState;\n return (_jsxs(\"div\", { className: \"test-runner-panel\", children: [!testRunnerState && (_jsx(BlankPanelContent, { children: _jsx(\"div\", { className: \"auxiliary-panel__splash-screen\", children: _jsxs(\"div\", { className: \"auxiliary-panel__splash-screen__content\", children: [_jsxs(\"div\", { className: \"auxiliary-panel__splash-screen__content__item\", children: [_jsx(\"div\", { className: \"auxiliary-panel__splash-screen__content__item__label\", children: \"Run full test suite\" }), _jsx(\"div\", { className: \"auxiliary-panel__splash-screen__content__item__hot-keys\", children: _jsx(\"div\", { className: \"hotkey__key\", children: \"F10\" }) })] }), _jsxs(\"div\", { className: \"auxiliary-panel__splash-screen__content__item\", children: [_jsx(\"div\", { className: \"auxiliary-panel__splash-screen__content__item__label\", children: \"Run relevant tests only\" }), _jsxs(\"div\", { className: \"auxiliary-panel__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 } 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 './ConsolePanel.js';\nimport { AUX_PANEL_MODE } from '../../../stores/EditorConfig.js';\nimport { SearchPanel } from './SearchPanel.js';\nimport { TestRunnerPanel } from './TestRunnerPanel.js';\nimport { isNonNullable } from '@finos/legend-shared';\nimport { ChevronDownIcon, ChevronUpIcon, clsx, FlaskIcon, SearchIcon, XIcon, } from '@finos/legend-art';\nimport { useEditorStore } from '../EditorStoreProvider.js';\nexport const AuxiliaryPanel = observer(() => {\n const editorStore = useEditorStore();\n const changeMode = (mode) => () => editorStore.setActiveAuxPanelMode(mode);\n const closePanel = () => editorStore.auxPanelDisplayState.toggle();\n const toggleExpandAuxPanel = () => editorStore.auxPanelDisplayState.toggleMaximize();\n const auxTabMap = {\n [AUX_PANEL_MODE.CONSOLE]: {\n mode: AUX_PANEL_MODE.CONSOLE,\n name: 'CONSOLE',\n icon: undefined,\n isVisible: true,\n },\n [AUX_PANEL_MODE.SEARCH_RESULT]: {\n mode: AUX_PANEL_MODE.SEARCH_RESULT,\n name: 'SEARCH',\n icon: (_jsx(\"div\", { className: \"auxiliary-panel__header__tab__icon--search\", children: _jsx(SearchIcon, {}) })),\n isVisible: true,\n },\n [AUX_PANEL_MODE.TEST_RUNNER]: {\n mode: AUX_PANEL_MODE.TEST_RUNNER,\n name: 'TEST',\n icon: (_jsx(\"div\", { className: \"auxiliary-panel__header__tab__icon--test\", children: _jsx(FlaskIcon, {}) })),\n isVisible: true,\n },\n };\n const tabsToShow = Object.values(AUX_PANEL_MODE).filter((tab) => isNonNullable(auxTabMap[tab]) && auxTabMap[tab].isVisible);\n const isTabVisible = (tabType) => editorStore.activeAuxPanelMode === tabType && tabsToShow.includes(tabType);\n useEffect(() => {\n if (!tabsToShow.includes(editorStore.activeAuxPanelMode)) {\n editorStore.setActiveAuxPanelMode(AUX_PANEL_MODE.CONSOLE);\n }\n }, [editorStore, tabsToShow, editorStore.activeAuxPanelMode]);\n return (_jsxs(\"div\", { className: \"panel auxiliary-panel\", children: [_jsxs(\"div\", { className: \"panel__header\", children: [_jsx(\"div\", { className: \"auxiliary-panel__header__tabs\", children: tabsToShow\n .map((tab) => auxTabMap[tab])\n .filter(isNonNullable)\n .map((tab) => (_jsxs(\"button\", { tabIndex: -1, className: clsx('auxiliary-panel__header__tab', {\n 'auxiliary-panel__header__tab--active': editorStore.activeAuxPanelMode === tab.mode,\n }), onClick: changeMode(tab.mode), children: [tab.icon && (_jsx(\"div\", { className: \"auxiliary-panel__header__tab__icon\", children: tab.icon })), _jsx(\"div\", { className: \"auxiliary-panel__header__tab__title\", children: tab.name })] }, tab.mode))) }), _jsxs(\"div\", { className: \"auxiliary-panel__header__actions\", children: [_jsx(\"button\", { className: \"auxiliary-panel__header__action\", onClick: toggleExpandAuxPanel, tabIndex: -1, title: \"Toggle Expand/Collapse\", children: editorStore.auxPanelDisplayState.isMaximized ? (_jsx(ChevronDownIcon, {})) : (_jsx(ChevronUpIcon, {})) }), _jsx(\"button\", { className: \"auxiliary-panel__header__action\", onClick: closePanel, tabIndex: -1, title: \"Close\", children: _jsx(XIcon, {}) })] })] }), _jsxs(\"div\", { className: \"panel__content\", children: [isTabVisible(AUX_PANEL_MODE.CONSOLE) && (_jsx(\"div\", { className: \"auxiliary-panel__content__tab\", children: _jsx(Console, {}) })), isTabVisible(AUX_PANEL_MODE.SEARCH_RESULT) && (_jsx(\"div\", { className: \"auxiliary-panel__content__tab\", children: _jsx(SearchPanel, {}) })), isTabVisible(AUX_PANEL_MODE.TEST_RUNNER) && (_jsx(\"div\", { className: \"auxiliary-panel__content__tab\", children: _jsx(TestRunnerPanel, {}) }))] })] }));\n});\n//# sourceMappingURL=AuxiliaryPanel.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 { BusinessTimeIcon, DatabaseIcon, FileCodeIcon, FunctionIcon, LayerGroupIcon, LinkIcon, MapIcon, PackageIcon, QuestionIcon, RobotIcon, ServerIcon, SettingsEthernetIcon, ShapeLineIcon, TableIcon, TabulatedDataFileIcon, } from './CJS__Icon.cjs';\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_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_UnknownElementTypeIcon = () => (_jsx(\"div\", { children: _jsx(QuestionIcon, {}) }));\n// TODO: consider moving this back to `Icon`?\nexport const ProjectConfigurationIcon = () => (_jsx(\"div\", { className: \"icon icon--config color--config\", children: _jsx(SettingsEthernetIcon, {}) }));\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 { useEditorStore } from '../EditorStoreProvider.js';\nimport { Dialog } from '@finos/legend-art';\nimport { ConceptType, } from '../../../server/models/ConceptTree.js';\nimport { extractElementNameFromPath } from '@finos/legend-graph';\nconst IDENTIFIER_PATTERN = /^[a-zA-Z0-9_][a-zA-Z0-9_$]*$/;\nconst PACKAGE_PATH_PATTERN = /^(?:(?:[a-zA-Z0-9_][a-zA-Z0-9_$]*)::)*[a-zA-Z0-9_][a-zA-Z0-9_$]*$/;\nexport const RenameConceptPrompt = observer((props) => {\n const { node } = props;\n const editorStore = useEditorStore();\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 = () => editorStore.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 editorStore.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, TransitionProps: {\n onEnter: handleEnter,\n }, classes: { container: 'command-modal__container' }, PaperProps: { classes: { root: 'command-modal__inner-container' } }, 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 { useEditorStore } from '../EditorStoreProvider.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 = /^(?:(?:[a-zA-Z0-9_][a-zA-Z0-9_$]*)::)*[a-zA-Z0-9_][a-zA-Z0-9_$]*$/;\nexport const MoveElementPrompt = observer((props) => {\n const { node } = props;\n const editorStore = useEditorStore();\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 = () => editorStore.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 editorStore.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, TransitionProps: {\n onEnter: handleEnter,\n }, classes: { container: 'command-modal__container' }, PaperProps: { classes: { root: 'command-modal__inner-container' } }, 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, 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, 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, } from '@finos/legend-art';\nimport { guaranteeType, isNonNullable } from '@finos/legend-shared';\nimport { useDrag } from 'react-dnd';\nimport { useEditorStore } from '../EditorStoreProvider.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 nodeType = node.data.li_attr.pureType;\n const editorStore = useEditorStore();\n const applicationStore = useApplicationStore();\n const renameConcept = () => editorStore.conceptTreeState.setNodeForRenameConcept(node);\n const moveElement = () => editorStore.conceptTreeState.setNodeForMoveElement(node);\n const runTests = () => {\n flowResult(editorStore.executeTests(node.data.li_attr.pureId)).catch(applicationStore.alertUnhandledError);\n };\n const findUsages = () => {\n const nodeAttribute = node.data.li_attr;\n if (nodeAttribute instanceof ElementConceptAttribute ||\n nodeAttribute instanceof PropertyConceptAttribute) {\n editorStore.findUsages(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 window.open(`${editorStore.client.baseUrl}/execute?func=${node.data.li_attr.pureId}&mode=${editorStore.client.mode}`, '_blank');\n };\n return (_jsxs(MenuContent, { ref: ref, children: [_jsx(MenuContentItem, { onClick: renameConcept, children: \"Rename\" }), node.data.li_attr instanceof ElementConceptAttribute && (_jsx(MenuContentItem, { onClick: moveElement, children: \"Move\" })), nodeType === ConceptType.PACKAGE && (_jsx(MenuContentItem, { onClick: runTests, children: \"Run tests\" })), nodeType === ConceptType.FUNCTION && (_jsx(MenuContentItem, { onClick: serviceJSON, children: \"Service (JSON)\" })), (node.data.li_attr instanceof PropertyConceptAttribute ||\n node.data.li_attr instanceof ElementConceptAttribute) && (_jsx(MenuContentItem, { onClick: findUsages, children: \"Find Usages\" })), nodeType !== ConceptType.PACKAGE && (_jsx(MenuContentItem, { onClick: viewSource, children: \"View Source\" }))] }));\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 || (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 [, dragRef] = 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 return (_jsx(ContextMenu, { content: _jsx(ConceptExplorerContextMenu, { node: node, viewConceptSource: viewConceptSource }), menuProps: { elevation: 7 }, onOpen: onContextMenuOpen, onClose: onContextMenuClose, children: _jsxs(\"div\", { 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: dragRef, 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 editorStore = useEditorStore();\n const applicationStore = useApplicationStore();\n const treeState = editorStore.conceptTreeState;\n const treeData = editorStore.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 editorStore.directoryTreeState.revealPath(nodeAttribute.file, true, new FileCoordinate(nodeAttribute.file, Number.parseInt(nodeAttribute.line, 10), Number.parseInt(nodeAttribute.column, 10)));\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 editorStore = useEditorStore();\n const applicationStore = useApplicationStore();\n const treeState = editorStore.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\" }))] })] }) })] }));\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 { useEditorStore } from '../EditorStoreProvider.js';\nimport { Dialog } from '@finos/legend-art';\nconst FILE_NAME_PATTERN = /[a-zA-Z0-9_]+(?:.[a-zA-Z0-9_]+)*/;\nconst DEFAULT_FILE_NAME = 'untitled.pure';\nexport const CreateNewFilePrompt = observer((props) => {\n const { node } = props;\n const editorStore = useEditorStore();\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) => editorStore.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 = () => editorStore.directoryTreeState.setNodeForCreateNewFile(undefined);\n const onValueChange = (event) => setValue(event.target.value);\n const create = (event) => {\n event.preventDefault();\n closeModal();\n flowResult(editorStore.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, TransitionProps: {\n onEnter: handleEnter,\n }, classes: { container: 'command-modal__container' }, PaperProps: { classes: { root: 'command-modal__inner-container' } }, 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 { useEditorStore } from '../EditorStoreProvider.js';\nimport { Dialog } from '@finos/legend-art';\nconst DIRECTORY_NAME_PATTERN = /[a-zA-Z0-9_]+/;\nconst DEFAULT_DIRECTORY_NAME = 'untitled';\nexport const CreateNewDirectoryPrompt = observer((props) => {\n const { node } = props;\n const editorStore = useEditorStore();\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) => editorStore.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 = () => editorStore.directoryTreeState.setNodeForCreateNewDirectory(undefined);\n const onValueChange = (event) => setValue(event.target.value);\n const create = (event) => {\n event.preventDefault();\n closeModal();\n flowResult(editorStore.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, TransitionProps: {\n onEnter: handleEnter,\n }, classes: { container: 'command-modal__container' }, PaperProps: { classes: { root: 'command-modal__inner-container' } }, 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 { useEditorStore } from '../EditorStoreProvider.js';\nimport { Dialog } from '@finos/legend-art';\nconst FILE_PATH_PATTERN = /\\/?(?:[a-zA-Z0-9_]\\/)*[a-zA-Z0-9_]+(?:.[a-zA-Z0-9_]+)*/;\nexport const RenameFilePrompt = observer((props) => {\n const { node } = props;\n const editorStore = useEditorStore();\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 = () => editorStore.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(editorStore.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, TransitionProps: {\n onEnter: handleEnter,\n }, classes: { container: 'command-modal__container' }, PaperProps: { classes: { root: 'command-modal__inner-container' } }, 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, 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, } from '@finos/legend-art';\nimport { isNonNullable } from '@finos/legend-shared';\nimport { DirectoryNode, } from '../../../server/models/DirectoryTree.js';\nimport { useEditorStore } from '../EditorStoreProvider.js';\nimport { RenameFilePrompt } from './RenameFilePrompt.js';\nconst FileExplorerContextMenu = observer(forwardRef(function FileExplorerContextMenu(props, ref) {\n const { node } = props;\n const applicationStore = useApplicationStore();\n const editorStore = useEditorStore();\n const isDir = node.data.isFolderNode;\n const hasChildContent = Boolean(node.data.children);\n const createNewFile = () => editorStore.directoryTreeState.setNodeForCreateNewFile(node);\n const createNewDirectory = () => editorStore.directoryTreeState.setNodeForCreateNewDirectory(node);\n const deleteFileOrDirectory = () => {\n flowResult(editorStore.deleteDirectoryOrFile(node.data.li_attr.path, isDir, hasChildContent)).catch(applicationStore.alertUnhandledError);\n };\n const renameFile = () => editorStore.directoryTreeState.setNodeForRenameFile(node);\n return (_jsxs(MenuContent, { ref: ref, children: [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.li_attr.path === '/platform';\n const isDirectory = node.data.isFolderNode;\n const isChildlessDirectory = node.data instanceof DirectoryNode && !node.data.children;\n const nodeIcon = isPlatformDirectory ? (_jsx(WrenchIcon, { className: \"explorer__icon--platform\" })) : isDirectory ? (isChildlessDirectory ? (_jsx(FolderIcon, {})) : node.isOpen ? (_jsx(FolderOpenIcon, {})) : (_jsx(FolderIcon, {}))) : (_jsx(FileAltIcon, { className: \"explorer__icon--file\" }));\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\", { 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 editorStore = useEditorStore();\n const applicationStore = useApplicationStore();\n const treeState = editorStore.directoryTreeState;\n const treeData = editorStore.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 editorStore = useEditorStore();\n const applicationStore = useApplicationStore();\n const treeState = editorStore.directoryTreeState;\n const refreshTree = () => {\n flowResult(treeState.refreshTreeData()).catch(applicationStore.alertUnhandledError);\n };\n const focus = () => {\n const currentTab = editorStore.tabManagerState.currentTab;\n if (currentTab instanceof FileEditorState) {\n flowResult(treeState.revealPath(currentTab.filePath, false)).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/EditorConfig.js';\nimport { ConceptTreeExplorer } from './ConceptTreeExplorer.js';\nimport { DirectoryTreeExplorer } from './DirectoryTreeExplorer.js';\nimport { clsx } from '@finos/legend-art';\nimport { useEditorStore } from '../EditorStoreProvider.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 editorStore = useEditorStore();\n const renderSideBar = () => {\n switch (editorStore.activeActivity) {\n case ACTIVITY_MODE.CONCEPT:\n return _jsx(ConceptTreeExplorer, {});\n case ACTIVITY_MODE.FILE:\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() }, editorStore.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/EditorConfig.js';\nimport { clsx, FileAltIcon, LegendLogo, ListIcon } from '@finos/legend-art';\nimport { useEditorStore } from './EditorStoreProvider.js';\nexport const ActivityBar = observer(() => {\n const editorStore = useEditorStore();\n const changeActivity = (activity) => () => editorStore.setActiveActivity(activity);\n const activities = [\n {\n mode: ACTIVITY_MODE.CONCEPT,\n title: 'Concept Explorer',\n icon: _jsx(ListIcon, {}),\n },\n {\n mode: ACTIVITY_MODE.FILE,\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': editorStore.sideBarDisplayState.isOpen &&\n editorStore.activeActivity === activity.mode,\n }), onClick: changeActivity(activity.mode), tabIndex: -1, title: `${activity.title}${activity.info ? ` - ${activity.info}` : ''}`, 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 { AssistantIcon, clsx, HammerIcon, TerminalIcon, } from '@finos/legend-art';\nimport { useEditorStore } from './EditorStoreProvider.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((props) => {\n const { actionsDisabled } = props;\n const editorStore = useEditorStore();\n const applicationStore = useApplicationStore();\n // actions\n const toggleAuxPanel = () => editorStore.auxPanelDisplayState.toggle();\n const executeGo = () => {\n flowResult(editorStore.executeGo()).catch(applicationStore.alertUnhandledError);\n };\n const toggleAssistant = () => applicationStore.assistantService.toggleAssistant();\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: [editorStore.tabManagerState.currentTab instanceof FileEditorState && (_jsx(FileEditorStatusBar, { fileEditorState: editorStore.tabManagerState.currentTab })), _jsx(\"button\", { className: clsx('editor__status-bar__action editor__status-bar__compile-btn', {\n 'editor__status-bar__compile-btn--wiggling': editorStore.executionState.isInProgress,\n }), disabled: actionsDisabled || editorStore.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(editorStore.auxPanelDisplayState.isOpen),\n }), onClick: toggleAuxPanel, tabIndex: -1, title: \"Toggle auxiliary panel (Ctrl + `)\", children: _jsx(TerminalIcon, {}) }), _jsx(\"button\", { className: clsx('editor__status-bar__action editor__status-bar__action__toggler', {\n 'editor__status-bar__action__toggler--active': !applicationStore.assistantService.isHidden,\n }), onClick: toggleAssistant, tabIndex: -1, title: \"Toggle assistant\", children: _jsx(AssistantIcon, {}) })] })] }));\n});\n//# sourceMappingURL=StatusBar.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 { EDITOR_THEME, useApplicationStore } from '@finos/legend-application';\nimport { clsx, Dialog, getBaseTextEditorOptions, moveCursorToPosition, useResizeDetector, WordWrapIcon, } from '@finos/legend-art';\nimport { useEditorStore } from '../EditorStoreProvider.js';\nimport { getNullableFirstElement, getNullableLastElement, guaranteeNonNullable, returnUndefOnError, } from '@finos/legend-shared';\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(guaranteeNonNullable(getNullableFirstElement(parts)))) ?? 1,\n returnUndefOnError(() => parseInt(guaranteeNonNullable(getNullableLastElement(parts)))),\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, TransitionProps: {\n onEnter: handleEnter,\n }, classes: { container: 'command-modal__container' }, PaperProps: { classes: { root: 'command-modal__inner-container' } }, 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 editorStore = useEditorStore();\n const applicationStore = useApplicationStore();\n const textInputRef = useRef(null);\n const [editor, setEditor] = useState();\n const content = editorState.file.content;\n const { ref, width, height } = useResizeDetector();\n useEffect(() => {\n if (!editor && textInputRef.current) {\n const element = textInputRef.current;\n const newEditor = monacoEditorAPI.create(element, {\n ...getBaseTextEditorOptions(),\n theme: EDITOR_THEME.LEGEND,\n wordWrap: editorState.textEditorState.wrapText ? 'on' : 'off',\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 }, [editorStore, applicationStore, editorState, editor]);\n if (editor) {\n // Set the value of the editor\n const currentValue = editor.getValue();\n if (currentValue !== content) {\n editor.setValue(content);\n }\n }\n useEffect(() => {\n if (width !== undefined && height !== undefined) {\n editor?.layout({ width, height });\n }\n }, [editor, width, height]);\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 edit-panel 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\", { ref: ref, className: \"text-editor__container\", children: _jsx(\"div\", { className: \"text-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 { useEffect } from 'react';\nexport const useCommands = (registrar) => {\n useEffect(() => {\n registrar.registerCommands();\n return () => registrar.deregisterCommands();\n }, [registrar]);\n};\n//# sourceMappingURL=useCommands.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_ELEMENT_NAME, PURE_PARSER } from '@finos/legend-graph';\nimport { languages as monacoLanguagesAPI } from 'monaco-editor';\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, COPYRIGHT_HEADER_SNIPPET, } from './LegendPureIDECodeSnippets.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\nconst PURE_GRAMMAR_DIAGRAM_PARSER_NAME = 'Diagram';\nconst 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];\nexport const getCopyrightHeaderSuggestions = () => {\n const results = [];\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: COPYRIGHT_HEADER_SNIPPET,\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 return results;\n};\n//# sourceMappingURL=FileEditorUtils.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 { EDITOR_LANGUAGE, EDITOR_THEME, getBaseTokenType, getInlineSnippetSuggestions, getParserElementSnippetSuggestions, getParserKeywordSuggestions, PURE_GRAMMAR_TOKEN, useApplicationStore, useCommands, } from '@finos/legend-application';\nimport { clsx, Dialog, getBaseTextEditorOptions, moveCursorToPosition, useResizeDetector, WordWrapIcon, } from '@finos/legend-art';\nimport { useEditorStore } from '../EditorStoreProvider.js';\nimport { collectExtraInlineSnippetSuggestions, collectParserElementSnippetSuggestions, collectParserKeywordSuggestions, getCopyrightHeaderSuggestions, } from '../../../stores/FileEditorUtils.js';\nimport { guaranteeNonNullable } 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 '../../../stores/LegendPureIDECommand.js';\nimport { GoToLinePrompt } from './GenericFileEditor.js';\nconst IDENTIFIER_PATTERN = /^[a-zA-Z0-9_][a-zA-Z0-9_$]*/;\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 path' : 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, TransitionProps: {\n onEnter: handleEnter,\n }, classes: { container: 'command-modal__container' }, PaperProps: { classes: { root: 'command-modal__inner-container' } }, 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 suggestionProviderDisposer = useRef(undefined);\n const definitionProviderDisposer = useRef(undefined);\n const textInputRef = useRef(null);\n const [editor, setEditor] = useState();\n const [isContextMenuOpen, setIsContextMenuOpen] = useState(false);\n const editorStore = useEditorStore();\n const applicationStore = useApplicationStore();\n const content = editorState.file.content;\n const { ref, width, height } = useResizeDetector();\n useEffect(() => {\n if (!editor && textInputRef.current) {\n const element = textInputRef.current;\n const newEditor = monacoEditorAPI.create(element, {\n ...getBaseTextEditorOptions(),\n language: EDITOR_LANGUAGE.PURE,\n theme: EDITOR_THEME.LEGEND,\n wordWrap: editorState.textEditorState.wrapText ? 'on' : 'off',\n contextmenu: true,\n // NOTE: since things like context-menus, tooltips are mounted into Shadow DOM\n // by default, we can't override their CSS by design, we need to disable Shadow DOM\n // to style them to our needs\n // See https://github.com/microsoft/monaco-editor/issues/2396\n // See https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_shadow_DOM\n useShadowDOM: false,\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(editorStore.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 flowResult(editorStore.findUsages(coordinate)).catch(applicationStore.alertUnhandledError);\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 editorStore\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: '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.setConceptToRenameState(coordinate)).catch(editorStore.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 }, [editorStore, applicationStore, editorState, editor]);\n if (editor) {\n // Set the value of the editor\n const currentValue = editor.getValue();\n if (currentValue !== content) {\n editor.setValue(content);\n }\n }\n const textTokens = editor\n ? monacoEditorAPI.tokenize(editor.getValue(), EDITOR_LANGUAGE.PURE)\n : [];\n definitionProviderDisposer.current?.dispose();\n definitionProviderDisposer.current =\n monacoLanguagesAPI.registerDefinitionProvider(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 lineTokens = guaranteeNonNullable(textTokens[position.lineNumber - 1]);\n let currentToken = undefined;\n let currentTokenRange = undefined;\n for (let i = 1; i < lineTokens.length; ++i) {\n const token = guaranteeNonNullable(lineTokens[i]);\n if (token.offset + 1 > position.column) {\n currentToken = guaranteeNonNullable(lineTokens[i - 1]);\n // 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: token.offset + 1, // NOTE: seems like this needs to be exclusive\n };\n break;\n }\n }\n if (currentToken &&\n currentTokenRange &&\n // NOTE: only allow goto definition for these tokens\n [\n PURE_GRAMMAR_TOKEN.TYPE,\n PURE_GRAMMAR_TOKEN.VARIABLE,\n PURE_GRAMMAR_TOKEN.PROPERTY,\n PURE_GRAMMAR_TOKEN.IDENTIFIER,\n ].includes(getBaseTokenType(currentToken.type))) {\n return [\n {\n uri: editorState.textEditorState.model.uri,\n range: currentTokenRange,\n },\n ];\n }\n return [];\n },\n });\n // suggestion\n suggestionProviderDisposer.current?.dispose();\n suggestionProviderDisposer.current =\n monacoLanguagesAPI.registerCompletionItemProvider(EDITOR_LANGUAGE.PURE, {\n // NOTE: we need to specify this to show suggestions for section\n // because by default, only alphanumeric characters trigger completion item provider\n // See https://microsoft.github.io/monaco-editor/api/interfaces/monaco.languages.CompletionContext.html#triggerCharacter\n // See https://github.com/microsoft/monaco-editor/issues/2530#issuecomment-861757198\n triggerCharacters: ['#'],\n provideCompletionItems: (model, position) => {\n let suggestions = [];\n suggestions = suggestions.concat(getCopyrightHeaderSuggestions());\n // suggestions for parser keyword\n suggestions = suggestions.concat(getParserKeywordSuggestions(position, model, collectParserKeywordSuggestions()));\n // suggestions for parser element snippets\n suggestions = suggestions.concat(getParserElementSnippetSuggestions(position, model, (parserName) => collectParserElementSnippetSuggestions(parserName)));\n // add inline code snippet suggestions\n suggestions = suggestions.concat(getInlineSnippetSuggestions(position, model, collectExtraInlineSnippetSuggestions()));\n return { suggestions };\n },\n });\n useCommands(editorState);\n useEffect(() => {\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 if (isContextMenuOpen) {\n const contextMenuNode = document.querySelector('.file-editor .monaco-menu');\n if (contextMenuNode) {\n const MENU_ITEMS_TO_DISABLE = ['Peek'];\n Array.from(document.querySelectorAll('.file-editor .monaco-menu .action-label'))\n .filter((element) => MENU_ITEMS_TO_DISABLE.includes(element.innerHTML))\n .forEach((element) => {\n const menuItem = element.parentElement?.parentElement;\n if (menuItem) {\n menuItem.classList.add('disabled');\n menuItem.style.opacity = '0.3';\n menuItem.style.pointerEvents = 'none';\n }\n });\n }\n setIsContextMenuOpen(false);\n }\n }, [isContextMenuOpen]);\n useEffect(() => {\n if (width !== undefined && height !== undefined) {\n editor?.layout({ width, height });\n }\n }, [editor, width, height]);\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 definitionProviderDisposer.current?.dispose();\n suggestionProviderDisposer.current?.dispose();\n }, [editorState, editor]);\n return (_jsxs(\"div\", { className: \"panel edit-panel 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\", { ref: ref, className: \"text-editor__container\", children: _jsx(\"div\", { className: \"text-editor__body\", ref: textInputRef }) }) })] }));\n});\n//# sourceMappingURL=PureFileEditor.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 { getNullableFirstElement, guaranteeNonNullable, 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 getBaseTokenType = (token) => guaranteeNonNullable(getNullableFirstElement(token.split('.')));\n//# sourceMappingURL=PureLanguageTextEditorSupport.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 COPYRIGHT_HEADER_SNIPPET = `// Copyright \\${1:2020} 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=LegendPureIDECodeSnippets.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 { BaseMenu } from './BaseMenu.js';\nexport const DropdownMenu = (props) => {\n const { open, className, children, menuProps, content, title, disabled, onClose, onOpen, } = 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 (anchorEl) {\n // if the trigger is clicked and the menu is already opened, close it\n onClose?.();\n setAnchorEl(null);\n }\n else if (triggerRef.current) {\n // if the trigger is clicked, open the dropdown menu\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(\"button\", { ref: triggerRef, className: className, disabled: disabled, onClick: onTriggerClick, tabIndex: -1, title: title, children: [children, _jsx(BaseMenu, { anchorOrigin: { vertical: 'bottom', horizontal: 'right' }, transformOrigin: { vertical: 'top', horizontal: 'right' }, anchorEl: anchorEl, open: (open === undefined || Boolean(open)) && Boolean(anchorEl), BackdropProps: {\n invisible: true,\n }, elevation: 0, marginThreshold: 0, disableRestoreFocus: true, ...menuProps, children: content })] }));\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, Point, DIAGRAM_ZOOM_LEVELS, DIAGRAM_INTERACTION_MODE, DIAGRAM_RELATIONSHIP_EDIT_MODE, } from '@finos/legend-extension-dsl-diagram';\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, DropdownMenu, GoToFileIcon, MenuContent, MenuContentDivider, MenuContentItem, MousePointerIcon, MoveIcon, useResizeDetector, ZoomInIcon, ZoomOutIcon, } from '@finos/legend-art';\nimport { useEditorStore } from '../EditorStoreProvider.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 diagramCanvasRef = ref;\n const { width, height } = useResizeDetector({\n refreshMode: 'debounce',\n refreshRate: 50,\n targetRef: diagramCanvasRef,\n });\n useEffect(() => {\n if (diagramCanvasRef.current) {\n const renderer = new DiagramRenderer(diagramCanvasRef.current, diagram);\n diagramEditorState.setRenderer(renderer);\n diagramEditorState.setupRenderer();\n renderer.render();\n renderer.autoRecenter();\n }\n }, [diagramCanvasRef, diagramEditorState, diagram]);\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(diagramCanvasRef);\n return (_jsx(\"div\", { ref: diagramCanvasRef, className: clsx('diagram-canvas diagram-editor__canvas', diagramEditorState.diagramCursorClass), tabIndex: 0 }));\n}));\nconst DiagramEditorHeader = observer((props) => {\n const { diagramEditorState } = props;\n const editorStore = useEditorStore();\n const applicationStore = useApplicationStore();\n const goToFile = () => {\n flowResult(editorStore.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(DropdownMenu, { 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 { useEffect } from 'react';\nimport { useDragLayer, } from 'react-dnd';\nimport { getEmptyImage } from 'react-dnd-html5-backend';\nimport { Portal } from '../../utils/ComponentUtils.js';\nimport { VerticalDragHandleIcon } from '../CJS__Icon.cjs';\nexport const PanelDropZone = (props) => {\n const { children, isDragOver, dropTargetConnector } = props;\n return (_jsxs(\"div\", { className: \"dnd__dropzone\", ref: dropTargetConnector, children: [isDragOver && _jsx(\"div\", { className: \"panel__dnd__dropzone__overlay\" }), _jsx(\"div\", { className: \"panel__dnd__dropzone__content\", children: children })] }));\n};\nexport const PanelEntryDragHandle = () => (_jsx(\"div\", { className: \"dnd__entry-drag-handle\", children: _jsx(VerticalDragHandleIcon, {}) }));\nexport const PanelEntryDropZonePlaceholder = (props) => {\n const { children, label, showPlaceholder, className } = props;\n if (!showPlaceholder) {\n return _jsx(_Fragment, { children: children });\n }\n return (_jsx(\"div\", { className: clsx(['dnd__entry-dropzone__placeholder', className]), children: _jsx(\"div\", { className: \"dnd__entry-dropzone__placeholder__content\", children: _jsx(\"div\", { className: \"dnd__entry-dropzone__placeholder__label\", children: label ?? '' }) }) }));\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 initialOffset: monitor.getInitialSourceClientOffset(),\n currentPosition: monitor.getClientOffset(),\n }));\n if (!isDragging ||\n !item ||\n !itemType ||\n !types.includes(itemType.toString())) {\n return null;\n }\n return (\n // use portal so this will show on top of everything regardless of the parent element's container\n _jsx(Portal, { children: _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, DropdownMenu, MenuContent, MenuContentItem, PanelEntryDropZonePlaceholder, TimesIcon, useDragPreviewLayer, } from '@finos/legend-art';\nimport { observer } from 'mobx-react-lite';\nimport { useRef, useCallback } from 'react';\nimport { useDrop, useDrag } from 'react-dnd';\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 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\" })] }));\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, 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, { showPlaceholder: 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 }), _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(DropdownMenu, { className: \"tab-manager__menu__toggler\", title: \"Show All Tabs\", content: _jsx(MenuContent, { className: \"tab-manager__menu\", children: managerTabState.tabs.map((tabState) => (_jsxs(MenuContentItem, { className: \"tab-manager__menu__item\", 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, PlusIcon, useResizeDetector, } from '@finos/legend-art';\nimport { DiagramEditorState } from '../../../stores/DiagramEditorState.js';\nimport { DiagramEditor } from './DiagramEditor.js';\nimport { useEditorStore } from '../EditorStoreProvider.js';\nimport { EDITOR_LANGUAGE, TabManager, } from '@finos/legend-application';\nimport { PURE_DiagramIcon } from '../shared/ConceptIconUtils.js';\nexport const EditPanelSplashScreen = () => {\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: \"edit-panel__splash-screen\", children: _jsxs(\"div\", { className: clsx('edit-panel__splash-screen__content', {\n 'edit-panel__splash-screen__content--hidden': !showCommandList,\n }), children: [_jsxs(\"div\", { className: \"edit-panel__splash-screen__content__item\", children: [_jsx(\"div\", { className: \"edit-panel__splash-screen__content__item__label\", children: \"Execute the 'go' function\" }), _jsx(\"div\", { className: \"edit-panel__splash-screen__content__item__hot-keys\", children: _jsx(\"div\", { className: \"hotkey__key\", children: \"F9\" }) })] }), _jsxs(\"div\", { className: \"edit-panel__splash-screen__content__item\", children: [_jsx(\"div\", { className: \"edit-panel__splash-screen__content__item__label\", children: \"Run the full test suite\" }), _jsx(\"div\", { className: \"edit-panel__splash-screen__content__item__hot-keys\", children: _jsx(\"div\", { className: \"hotkey__key\", children: \"F10\" }) })] }), _jsxs(\"div\", { className: \"edit-panel__splash-screen__content__item\", children: [_jsx(\"div\", { className: \"edit-panel__splash-screen__content__item__label\", children: \"Search for a file\" }), _jsxs(\"div\", { className: \"edit-panel__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 EditPanel = observer(() => {\n const editorStore = useEditorStore();\n const currentTab = editorStore.tabManagerState.currentTab;\n const renderActiveEditorState = () => {\n if (currentTab instanceof FileEditorState) {\n if (currentTab.textEditorState.language === 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 = editorStore.tabManagerState.tabs.filter((tab) => tab instanceof FileEditorState &&\n tab.fileName === editorState.fileName).length > 1;\n return (_jsxs(\"div\", { className: \"edit-panel__header__tab\", children: [_jsx(\"div\", { className: \"edit-panel__header__tab__icon\", children: _jsx(FileAltIcon, { className: \"edit-panel__header__tab__icon--file\" }) }), _jsx(\"div\", { className: \"edit-panel__header__tab__label\", children: editorState.fileName }), showMoreInfo && (_jsx(\"div\", { className: \"edit-panel__header__tab__path\", children: editorState.filePath }))] }));\n }\n else if (editorState instanceof DiagramEditorState) {\n const showMoreInfo = editorStore.tabManagerState.tabs.filter((tab) => tab instanceof DiagramEditorState &&\n tab.diagramName === editorState.diagramName).length > 1;\n return (_jsxs(\"div\", { className: \"edit-panel__header__tab\", children: [_jsx(\"div\", { className: \"edit-panel__header__tab__icon\", children: _jsx(PURE_DiagramIcon, {}) }), _jsx(\"div\", { className: \"edit-panel__header__tab__label\", children: editorState.diagramName }), showMoreInfo && (_jsx(\"div\", { className: \"edit-panel__header__tab__path\", children: editorState.diagramPath }))] }));\n }\n return editorState.label;\n };\n if (!currentTab) {\n return _jsx(EditPanelSplashScreen, {});\n }\n return (_jsxs(\"div\", { className: \"panel edit-panel\", children: [_jsxs(\"div\", { className: \"panel__header edit-panel__header\", children: [_jsx(\"div\", { className: \"edit-panel__header__tabs\", children: _jsx(TabManager, { tabManagerState: editorStore.tabManagerState, tabRenderer: renderTab }) }), _jsx(\"div\", { className: \"panel__header__actions\" })] }), _jsx(\"div\", { className: \"panel__content edit-panel__content\", children: renderActiveEditorState() }, currentTab.uuid)] }));\n});\n//# sourceMappingURL=EditPanel.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 { useRef, useEffect, forwardRef, } from 'react';\nimport { CaretDownIcon, TimesIcon, CircleNotchIcon } from './CJS__Icon.cjs';\nimport { FixedSizeList } from 'react-window';\nimport { CreatableSelect, Select, createFilter as _createFilter, baseComponents, } from './CJS__ReactSelect.cjs';\nexport const createFilter = _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) => event.stopPropagation(),\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 // 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 const ROW_HEIGHT = parseInt(getComputedStyle(document.documentElement).fontSize, 10) * 3.5;\n const MAX_OPTIONS_LENGTH = 6;\n const { options, children, getValue, selectProps } = props;\n const [value] = getValue();\n const initialOffset = options.indexOf(value) * ROW_HEIGHT;\n const scrollToIndex = 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 (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) * ROW_HEIGHT, itemCount: children.length, itemSize: ROW_HEIGHT, initialScrollOffset: initialOffset, children: ({ index, style }) => (_jsx(\"div\", { style: style, 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 STYLE_PREFIX = 'selector-input';\nconst 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, ...innerProps }, } = props;\n return (_jsx(\"div\", { ...innerProps, 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) => (_jsx(baseComponents.Input, { ...props, isHidden: false }));\nexport const CustomSelectorInput = forwardRef(function CustomSelectorInput(props, ref) {\n const { option, allowCreating, noMatchMessage, disabled, components, className, darkMode, hasError, ...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 SelectComponent = allowCreating\n ? CreatableSelect\n : Select;\n const stylePrefix = darkMode ? STYLE_PREFIX__DARK : STYLE_PREFIX;\n return (_jsx(SelectComponent\n // Make the menu always on top\n , { \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: ref, isDisabled: Boolean(disabled), className: `${stylePrefix} ${className} ${hasError ? 'selector-input--has-error' : ''}`, classNamePrefix: stylePrefix, components: {\n ClearIndicator,\n DropdownIndicator,\n LoadingIndicator,\n MenuList: CustomMenuList,\n Input: CustomInput,\n ...components,\n }, ...{ ...innerProps, darkMode, 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 { useEditorStore } from '../EditorStoreProvider.js';\nexport const FileSearchCommand = observer(() => {\n const editorStore = useEditorStore();\n const applicationStore = useApplicationStore();\n const loadingOptionsState = editorStore.fileSearchCommandLoadingState;\n const searchState = editorStore.fileSearchCommandState;\n const selectorRef = useRef(null);\n // configs\n const toggleRegExp = () => searchState.toggleRegExp();\n // actions\n const debouncedSearch = useMemo(() => debounce(() => {\n flowResult(editorStore.searchFile()).catch(applicationStore.alertUnhandledError);\n }, 500), [applicationStore, editorStore]);\n const closeModal = () => editorStore.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(editorStore.loadFile(val.value)).catch(applicationStore.alertUnhandledError);\n }\n };\n const handleEnter = () => {\n selectorRef.current?.focus();\n };\n return (_jsx(Dialog, { open: editorStore.openFileSearchCommand, onClose: closeModal, TransitionProps: {\n onEnter: handleEnter,\n }, classes: { container: 'command-modal__container' }, PaperProps: { classes: { root: 'command-modal__inner-container' } }, 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, { ref: selectorRef, className: \"command-modal__content__input\", options: editorStore.fileSearchCommandResults\n .map((option) => ({ label: option, value: option }))\n .sort(compareLabelFn), onChange: openFile, onInputChange: onSearchTextChange, placeholder: \"Enter file name or path\", escapeClearsValue: true, darkMode: true, 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","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 } from 'react';\nimport { observer } from 'mobx-react-lite';\nimport { flowResult } from 'mobx';\nimport { useApplicationStore } from '@finos/legend-application';\nimport { CaseSensitiveIcon, clsx, Dialog, RegexIcon } from '@finos/legend-art';\nimport { useEditorStore } from '../EditorStoreProvider.js';\nexport const TextSearchCommand = observer(() => {\n const editorStore = useEditorStore();\n const applicationStore = useApplicationStore();\n const searchState = editorStore.textSearchCommandState;\n const inputRef = useRef(null);\n // configs\n const toggleCaseSensitive = () => searchState.toggleCaseSensitive();\n const toggleRegExp = () => searchState.toggleRegExp();\n // actions\n const closeModal = () => editorStore.setOpenTextSearchCommand(false);\n const onSearchTextChange = (event) => searchState.setText(event.target.value);\n const search = (event) => {\n event.preventDefault();\n closeModal();\n flowResult(editorStore.searchText()).catch(applicationStore.alertUnhandledError);\n };\n const handleEnter = () => {\n inputRef.current?.focus();\n };\n return (_jsx(Dialog, { open: editorStore.openTextSearchCommand, onClose: closeModal, TransitionProps: {\n onEnter: handleEnter,\n }, classes: { container: 'command-modal__container' }, PaperProps: { classes: { root: 'command-modal__inner-container' } }, children: _jsxs(\"div\", { className: \"modal modal--dark command-modal\", children: [_jsx(\"div\", { className: \"modal__title\", children: \"Search\" }), _jsxs(\"div\", { className: \"command-modal__content\", children: [_jsx(\"form\", { className: \"command-modal__content__form\", onSubmit: search, children: _jsx(\"input\", { ref: inputRef, className: \"command-modal__content__input input--dark\", onChange: onSearchTextChange, value: searchState.text }) }), _jsx(\"button\", { className: clsx('command-modal__content__config-btn btn--sm', {\n 'command-modal__content__config-btn--toggled': searchState.isCaseSensitive,\n }), title: `Match Case (${searchState.isCaseSensitive ? 'on' : 'off'})`, onClick: toggleCaseSensitive, children: _jsx(CaseSensitiveIcon, {}) }), _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, {}) }), _jsx(\"button\", { className: \"command-modal__content__submit-btn btn--dark btn--caution\", onClick: search, children: \"Search\" })] })] }) }));\n});\n//# sourceMappingURL=TextSearchCommand.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 { AuxiliaryPanel } from './aux-panel/AuxiliaryPanel.js';\nimport { SideBar } from './side-bar/SideBar.js';\nimport { ActivityBar } from './ActivityBar.js';\nimport { withEditorStore, useEditorStore } from './EditorStoreProvider.js';\nimport { StatusBar } from './StatusBar.js';\nimport { EditPanel } from './edit-panel/EditPanel.js';\nimport { FileSearchCommand } from './command-center/FileSearchCommand.js';\nimport { flowResult } from 'mobx';\nimport { TextSearchCommand } from './command-center/TextSearchCommand.js';\nimport { useApplicationStore, useCommands } from '@finos/legend-application';\nimport { useResizeDetector, ResizablePanelSplitterLine, ResizablePanel, ResizablePanelGroup, ResizablePanelSplitter, getCollapsiblePanelGroupProps, } from '@finos/legend-art';\nimport { getQueryParameters } from '@finos/legend-shared';\nexport const Editor = withEditorStore(observer(() => {\n const editorStore = useEditorStore();\n const applicationStore = useApplicationStore();\n const editable = editorStore.initState.hasSucceeded;\n // layout\n const { ref, width, height } = useResizeDetector();\n // These create snapping effect on panel resizing\n const resizeSideBar = (handleProps) => editorStore.sideBarDisplayState.setSize(handleProps.domElement.getBoundingClientRect()\n .width);\n const resizeAuxPanel = (handleProps) => editorStore.auxPanelDisplayState.setSize(handleProps.domElement.getBoundingClientRect()\n .height);\n const sideBarCollapsiblePanelGroupProps = getCollapsiblePanelGroupProps(editorStore.sideBarDisplayState.size === 0, {\n onStopResize: resizeSideBar,\n size: editorStore.sideBarDisplayState.size,\n });\n const auxCollapsiblePanelGroupProps = getCollapsiblePanelGroupProps(editorStore.auxPanelDisplayState.size === 0, {\n onStopResize: resizeAuxPanel,\n size: editorStore.auxPanelDisplayState.size,\n });\n const maximizedAuxCollapsiblePanelGroupProps = getCollapsiblePanelGroupProps(editorStore.auxPanelDisplayState.isMaximized);\n useEffect(() => {\n if (ref.current) {\n editorStore.auxPanelDisplayState.setMaxSize(ref.current.offsetHeight);\n }\n }, [editorStore, ref, height, width]);\n // Cleanup the editor\n useEffect(() => () => {\n editorStore.cleanUp();\n }, [editorStore]);\n // Initialize the app\n useEffect(() => {\n const queryParams = getQueryParameters(window.location.search);\n flowResult(editorStore.initialize(false, undefined, queryParams.mode, queryParams.fastCompile)).catch(applicationStore.alertUnhandledError);\n }, [editorStore, applicationStore]);\n useEffect(() => {\n applicationStore.navigator.blockNavigation([() => true], undefined, () => applicationStore.notifyWarning(`Navigation from the editor is blocked`));\n return () => {\n applicationStore.navigator.unblockNavigation();\n };\n }, [editorStore, applicationStore]);\n useCommands(editorStore);\n return (_jsxs(\"div\", { className: \"editor\", children: [_jsxs(\"div\", { className: \"editor__body\", children: [_jsx(ActivityBar, {}), _jsx(\"div\", { className: \"editor__content-container\", ref: ref, children: _jsx(\"div\", { className: \"editor__content\", children: _jsxs(ResizablePanelGroup, { orientation: \"vertical\", children: [_jsx(ResizablePanel, { ...sideBarCollapsiblePanelGroupProps.collapsiblePanel, direction: 1, children: _jsx(SideBar, {}) }), _jsx(ResizablePanelSplitter, {}), _jsx(ResizablePanel, { ...sideBarCollapsiblePanelGroupProps.remainingPanel, minSize: 300, children: _jsxs(ResizablePanelGroup, { orientation: \"horizontal\", children: [_jsx(ResizablePanel, { ...maximizedAuxCollapsiblePanelGroupProps.collapsiblePanel, ...(editorStore.auxPanelDisplayState.size === 0\n ? auxCollapsiblePanelGroupProps.remainingPanel\n : {}), children: _jsx(EditPanel, {}) }), _jsx(ResizablePanelSplitter, { children: _jsx(ResizablePanelSplitterLine, { color: editorStore.auxPanelDisplayState.isMaximized\n ? 'transparent'\n : 'var(--color-dark-grey-250)' }) }), _jsx(ResizablePanel, { ...auxCollapsiblePanelGroupProps.collapsiblePanel, ...(editorStore.auxPanelDisplayState.isMaximized\n ? maximizedAuxCollapsiblePanelGroupProps.remainingPanel\n : {}), direction: -1, children: _jsx(AuxiliaryPanel, {}) })] }) })] }) }) })] }), _jsx(StatusBar, { actionsDisabled: !editable }), editable && _jsx(FileSearchCommand, {}), editable && _jsx(TextSearchCommand, {})] }));\n}));\n//# sourceMappingURL=Editor.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 { LegendApplicationComponentFrameworkProvider } from '@finos/legend-application';\nimport { LegendPureIDEBaseStoreProvider } from './LegendPureIDEBaseStoreProvider.js';\nimport { Editor } from './editor/Editor.js';\nexport const LegendPureIDEApplication = () => (_jsx(LegendPureIDEBaseStoreProvider, { children: _jsx(LegendApplicationComponentFrameworkProvider, { children: _jsx(Editor, {}) }) }));\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 { AbstractPlugin } from '@finos/legend-shared';\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 class LegendApplicationPlugin extends AbstractPlugin {\n}\n//# sourceMappingURL=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 { 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 */\nimport { collectKeyedCommandConfigEntriesFromConfig, } from '@finos/legend-application';\nimport packageJson from '../../package.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 '../stores/LegendPureIDECommand.js';\nexport class Core_LegendPureIDEApplicationPlugin extends LegendPureIDEApplicationPlugin {\n static NAME = packageJson.extensions.applicationPureIDEPlugin;\n constructor() {\n super(Core_LegendPureIDEApplicationPlugin.NAME, packageJson.version);\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, setupLegendApplicationUILibrary, WebApplicationNavigatorProvider, BrowserRouter, ApplicationStoreProvider, } from '@finos/legend-application';\nimport { getRootElement } from '@finos/legend-art';\nimport { LegendPureIDEApplicationConfig, } from './LegendPureIDEApplicationConfig.js';\nimport { LegendPureIDEPluginManager } from './LegendPureIDEPluginManager.js';\nimport { DSL_Diagram_GraphManagerPreset } from '@finos/legend-extension-dsl-diagram';\nimport { LegendPureIDEApplication } 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([new Core_LegendPureIDEApplicationPlugin()]);\n application.withBasePresets([new DSL_Diagram_GraphManagerPreset()]);\n return application;\n }\n async configureApplication(input) {\n return new LegendPureIDEApplicationConfig(input);\n }\n async loadApplication() {\n // Setup React application libraries\n await setupLegendApplicationUILibrary(this.pluginManager, this.logger);\n // Render React application\n const rootElement = createRoot(getRootElement());\n rootElement.render(_jsx(BrowserRouter, { basename: this.baseUrl, children: _jsx(WebApplicationNavigatorProvider, { children: _jsx(ApplicationStoreProvider, { config: this.config, pluginManager: this.pluginManager, children: _jsx(LegendPureIDEApplication, {}) }) }) }));\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 { useState, useEffect } from 'react';\nexport { clsx } from 'clsx';\nexport { Portal } from '@mui/material';\nexport { useResizeDetector } from 'react-resize-detector';\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\nexport const useStateWithCallback = (initialState, callback) => {\n const [state, setState] = useState(initialState);\n useEffect(() => callback(state), [state, callback]);\n return [state, setState];\n};\nexport const getRootElement = () => {\n let rootEl = document.getElementsByTagName('root').length\n ? document.getElementsByTagName('root')[0]\n : undefined;\n if (!rootEl) {\n rootEl = document.createElement('root');\n document.body.appendChild(rootEl);\n }\n return rootEl;\n};\n//# sourceMappingURL=ComponentUtils.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({ 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.scss';\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 host: 'localhost',\n port: 9004,\n },\n};\n","\"use strict\";\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 */\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Fuse = void 0;\n/**\n * Previously, these exports rely on ES module interop to expose `default` export\n * properly. But since we use `ESM` for Typescript resolution now, we lose this\n * so we have to workaround by importing these and re-export them from CJS\n *\n * TODO: remove these when the package properly work with Typescript's nodenext\n * module resolution\n *\n * @workaround ESM\n * See https://github.com/microsoft/TypeScript/issues/49298\n * See https://github.com/krisk/Fuse/pull/692\n */\nvar fuse_js_1 = require(\"fuse.js\");\nObject.defineProperty(exports, \"Fuse\", { enumerable: true, get: function () { return __importDefault(fuse_js_1).default; } });\n//# sourceMappingURL=CJS__Fuse.cjs.map","\"use strict\";\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 */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.CircleIcon = exports.ListIcon = exports.EmptyLightBulbIcon = exports.LightBulbIcon = exports.ExternalLinkSquareIcon = exports.ExternalLinkIcon = exports.KeyIcon = exports.StarIcon = exports.SearchIcon = exports.DollarIcon = exports.SkullIcon = exports.EnvelopIcon = exports.ShapesIcon = exports.UserIcon = exports.StickArrowCircleRightIcon = exports.ArrowCircleRightIcon = exports.ArrowCircleDownIcon = exports.ArrowRightIcon = exports.ArrowLeftIcon = exports.RobotIcon = exports.VerticalDragHandleIcon = exports.PlayIcon = exports.MapIcon = exports.CompressIcon = exports.InfoCircleIcon = exports.QuestionCircleIcon = exports.QuestionIcon = exports.ToggleIcon = exports.EmptyClockIcon = exports.ClockIcon = exports.HammerIcon = exports.HashtagIcon = exports.CheckSquareIcon = exports.EmptySquareIcon = exports.SquareIcon = exports.SaveIcon = exports.FireIcon = exports.CaretDownIcon = exports.EyeIcon = exports.CogIcon = exports.PlusIcon = exports.TimesCircleIcon = exports.TimesIcon = exports.LongArrowRightIcon = exports.FileIcon = exports.MaskIcon = exports.LockIcon = exports.GhostIcon = exports.LayerGroupIcon = exports.CrosshairsIcon = void 0;\nexports.WindowMaximizeIcon = exports.ArrowsAltHIcon = exports.PencilEditIcon = exports.FileAltIcon = exports.CopyIcon = exports.ShareIcon = exports.PauseCircleIcon = exports.EmptyWindowRestoreIcon = exports.UploadIcon = exports.DownloadIcon = exports.UsersIcon = exports.FileImportIcon = exports.BanIcon = exports.CheckIcon = exports.RocketIcon = exports.ExclamationCircleIcon = exports.FilterIcon = exports.AsteriskIcon = exports.EmptyStopCircleIcon = exports.ArrowCircleLeftIcon = exports.ArrowCirceUpIcon = exports.CodeBranchIcon = exports.FileCodeIcon = exports.FolderIcon = exports.FolderOpenIcon = exports.TruckLoadingIcon = exports.TerminalIcon = exports.ArrowUpIcon = exports.ArrowDownIcon = exports.WrenchIcon = exports.CaretRightIcon = exports.NewFolderIcon = exports.SortDownAltIcon = exports.SortIcon = exports.SortDownIcon = exports.BrushIcon = exports.ExpandIcon = exports.SitemapIcon = exports.BufferIcon = exports.HackerIcon = exports.KeyboardIcon = exports.CircleNotchIcon = exports.BugIcon = exports.ExclamationTriangleIcon = exports.CheckCircleIcon = exports.BoltIcon = exports.TagsIcon = exports.TagIcon = exports.ShieldIcon = exports.EmptyCircleIcon = void 0;\nexports.OpenPreviewIcon = exports.RunErrorsIcon = exports.RunAllIcon = exports.CloseIcon = exports.GoToFileIcon = exports.WordWrapIcon = exports.WarningIcon = exports.ErrorIcon = exports.ReviewIcon = exports.WindowIcon = exports.LinkIcon = exports.SettingsEthernetIcon = exports.AssistantIcon = exports.ViewHeadlineIcon = exports.SubjectIcon = exports.EditIcon = exports.AddIcon = exports.CheckListIcon = exports.CompareIcon = exports.SigmaIcon = exports.RefreshIcon = exports.VerticalAlignBottomIcon = exports.WrapTextIcon = exports.MoreHorizontalIcon = exports.MoreVerticalIcon = exports.StringTypeIcon = exports.PencilIcon = exports.ManageSearchIcon = exports.HouseKeys = exports.SunglassesIcon = exports.BeardIcon = exports.WaterDropIcon = exports.BrainIcon = exports.ArchiveIcon = exports.TableIcon = exports.ServerIcon = exports.DatabaseIcon = exports.BusinessTimeIcon = exports.FaceSadTearIcon = exports.FaceLaughWinkIcon = exports.WizardHatIcon = exports.MapMarkerIcon = exports.ToggleOffIcon = exports.ToggleOnIcon = exports.PuzzlePieceIcon = exports.PiedPiperSquareIcon = exports.MeteorIcon = exports.LongArrowAltUpIcon = exports.LongArrowAltDownIcon = exports.FilledWindowMaximizeIcon = void 0;\nexports.DroidIcon = exports.TestTubeIcon = exports.ShapeLineIcon = exports.TruncatedGitMergeIcon = exports.ZoomOutIcon = exports.ZoomInIcon = exports.TriangleIcon = exports.SidebarIcon = exports.PlusCircleIcon = exports.MoveIcon = exports.MousePointerIcon = exports.MinusIcon = exports.PackageIcon = exports.OptionsIcon = exports.AtomIcon = exports.ShapeTriangleIcon = exports.DistributeVerticalIcon = exports.DistributeHorizontalIcon = exports.AlignEndIcon = exports.AlignCenterIcon = exports.AlignStartIcon = exports.AlignBottomIcon = exports.AlignMiddleIcon = exports.AlignTopIcon = exports.VerticalDragHandleThinIcon = exports.BundleIcon = exports.TabulatedDataFileIcon = exports.FilledTriangleIcon = exports.ChevronDownThinIcon = exports.FlaskIcon = exports.BeakerIcon = exports.MenuIcon = exports.FileTrayIcon = exports.ResizeIcon = exports.SwaggerIcon = exports.PluginIcon = exports.XIcon = exports.GitBranchIcon = exports.SyncIcon = exports.CloudUploadIcon = exports.CloudDownloadIcon = exports.GitMergeIcon = exports.GitPullRequestIcon = exports.BinaryTypeIcon = exports.ChevronRightIcon = exports.ChevronUpIcon = exports.ChevronDownIcon = exports.CaseSensitiveIcon = exports.RegexIcon = exports.DiffIcon = void 0;\nexports.RepoIcon = exports.FunctionIcon = exports.ArrowsSplitIcon = exports.ArrowsJoinIcon = void 0;\n/**\n * Previously, these exports rely on ES module interop to expose `default` export\n * properly. But since we use `ESM` for Typescript resolution now, we lose this\n * so we have to workaround by importing these and re-export them from CJS\n *\n * TODO: remove these when the package properly work with Typescript's nodenext\n * module resolution\n *\n * @workaround ESM\n * See https://github.com/microsoft/TypeScript/issues/49298\n */\nvar fa_1 = require(\"react-icons/fa\");\nObject.defineProperty(exports, \"CrosshairsIcon\", { enumerable: true, get: function () { return fa_1.FaCrosshairs; } });\nObject.defineProperty(exports, \"LayerGroupIcon\", { enumerable: true, get: function () { return fa_1.FaLayerGroup; } });\nObject.defineProperty(exports, \"GhostIcon\", { enumerable: true, get: function () { return fa_1.FaGhost; } });\nObject.defineProperty(exports, \"LockIcon\", { enumerable: true, get: function () { return fa_1.FaLock; } });\nObject.defineProperty(exports, \"MaskIcon\", { enumerable: true, get: function () { return fa_1.FaMask; } });\nObject.defineProperty(exports, \"FileIcon\", { enumerable: true, get: function () { return fa_1.FaFile; } });\nObject.defineProperty(exports, \"LongArrowRightIcon\", { enumerable: true, get: function () { return fa_1.FaLongArrowAltRight; } });\nObject.defineProperty(exports, \"TimesIcon\", { enumerable: true, get: function () { return fa_1.FaTimes; } });\nObject.defineProperty(exports, \"TimesCircleIcon\", { enumerable: true, get: function () { return fa_1.FaTimesCircle; } });\nObject.defineProperty(exports, \"PlusIcon\", { enumerable: true, get: function () { return fa_1.FaPlus; } });\nObject.defineProperty(exports, \"CogIcon\", { enumerable: true, get: function () { return fa_1.FaCog; } });\nObject.defineProperty(exports, \"EyeIcon\", { enumerable: true, get: function () { return fa_1.FaEye; } });\nObject.defineProperty(exports, \"CaretDownIcon\", { enumerable: true, get: function () { return fa_1.FaCaretDown; } });\nObject.defineProperty(exports, \"FireIcon\", { enumerable: true, get: function () { return fa_1.FaFire; } });\nObject.defineProperty(exports, \"SaveIcon\", { enumerable: true, get: function () { return fa_1.FaSave; } });\nObject.defineProperty(exports, \"SquareIcon\", { enumerable: true, get: function () { return fa_1.FaSquare; } });\nObject.defineProperty(exports, \"EmptySquareIcon\", { enumerable: true, get: function () { return fa_1.FaRegSquare; } });\nObject.defineProperty(exports, \"CheckSquareIcon\", { enumerable: true, get: function () { return fa_1.FaCheckSquare; } });\nObject.defineProperty(exports, \"HashtagIcon\", { enumerable: true, get: function () { return fa_1.FaHashtag; } });\nObject.defineProperty(exports, \"HammerIcon\", { enumerable: true, get: function () { return fa_1.FaHammer; } });\nObject.defineProperty(exports, \"ClockIcon\", { enumerable: true, get: function () { return fa_1.FaClock; } });\nObject.defineProperty(exports, \"EmptyClockIcon\", { enumerable: true, get: function () { return fa_1.FaRegClock; } });\nObject.defineProperty(exports, \"ToggleIcon\", { enumerable: true, get: function () { return fa_1.FaToggleOn; } });\nObject.defineProperty(exports, \"QuestionIcon\", { enumerable: true, get: function () { return fa_1.FaQuestion; } });\nObject.defineProperty(exports, \"QuestionCircleIcon\", { enumerable: true, get: function () { return fa_1.FaQuestionCircle; } });\nObject.defineProperty(exports, \"InfoCircleIcon\", { enumerable: true, get: function () { return fa_1.FaInfoCircle; } });\nObject.defineProperty(exports, \"CompressIcon\", { enumerable: true, get: function () { return fa_1.FaCompress; } });\nObject.defineProperty(exports, \"MapIcon\", { enumerable: true, get: function () { return fa_1.FaMap; } });\nObject.defineProperty(exports, \"PlayIcon\", { enumerable: true, get: function () { return fa_1.FaPlay; } });\nObject.defineProperty(exports, \"VerticalDragHandleIcon\", { enumerable: true, get: function () { return fa_1.FaGripVertical; } });\nObject.defineProperty(exports, \"RobotIcon\", { enumerable: true, get: function () { return fa_1.FaRobot; } });\nObject.defineProperty(exports, \"ArrowLeftIcon\", { enumerable: true, get: function () { return fa_1.FaArrowLeft; } });\nObject.defineProperty(exports, \"ArrowRightIcon\", { enumerable: true, get: function () { return fa_1.FaArrowRight; } });\nObject.defineProperty(exports, \"ArrowCircleDownIcon\", { enumerable: true, get: function () { return fa_1.FaArrowAltCircleDown; } });\nObject.defineProperty(exports, \"ArrowCircleRightIcon\", { enumerable: true, get: function () { return fa_1.FaArrowAltCircleRight; } });\nObject.defineProperty(exports, \"StickArrowCircleRightIcon\", { enumerable: true, get: function () { return fa_1.FaArrowCircleRight; } });\nObject.defineProperty(exports, \"UserIcon\", { enumerable: true, get: function () { return fa_1.FaUser; } });\nObject.defineProperty(exports, \"ShapesIcon\", { enumerable: true, get: function () { return fa_1.FaShapes; } });\nObject.defineProperty(exports, \"EnvelopIcon\", { enumerable: true, get: function () { return fa_1.FaEnvelope; } });\nObject.defineProperty(exports, \"SkullIcon\", { enumerable: true, get: function () { return fa_1.FaSkull; } });\nObject.defineProperty(exports, \"DollarIcon\", { enumerable: true, get: function () { return fa_1.FaDollarSign; } });\nObject.defineProperty(exports, \"SearchIcon\", { enumerable: true, get: function () { return fa_1.FaSearch; } });\nObject.defineProperty(exports, \"StarIcon\", { enumerable: true, get: function () { return fa_1.FaStar; } });\nObject.defineProperty(exports, \"KeyIcon\", { enumerable: true, get: function () { return fa_1.FaKey; } });\nObject.defineProperty(exports, \"ExternalLinkIcon\", { enumerable: true, get: function () { return fa_1.FaExternalLinkAlt; } });\nObject.defineProperty(exports, \"ExternalLinkSquareIcon\", { enumerable: true, get: function () { return fa_1.FaExternalLinkSquareAlt; } });\nObject.defineProperty(exports, \"LightBulbIcon\", { enumerable: true, get: function () { return fa_1.FaLightbulb; } });\nObject.defineProperty(exports, \"EmptyLightBulbIcon\", { enumerable: true, get: function () { return fa_1.FaRegLightbulb; } });\nObject.defineProperty(exports, \"ListIcon\", { enumerable: true, get: function () { return fa_1.FaList; } });\nObject.defineProperty(exports, \"CircleIcon\", { enumerable: true, get: function () { return fa_1.FaCircle; } });\nObject.defineProperty(exports, \"EmptyCircleIcon\", { enumerable: true, get: function () { return fa_1.FaRegCircle; } });\nObject.defineProperty(exports, \"ShieldIcon\", { enumerable: true, get: function () { return fa_1.FaShieldAlt; } });\nObject.defineProperty(exports, \"TagIcon\", { enumerable: true, get: function () { return fa_1.FaTag; } });\nObject.defineProperty(exports, \"TagsIcon\", { enumerable: true, get: function () { return fa_1.FaTags; } });\nObject.defineProperty(exports, \"BoltIcon\", { enumerable: true, get: function () { return fa_1.FaBolt; } });\nObject.defineProperty(exports, \"CheckCircleIcon\", { enumerable: true, get: function () { return fa_1.FaCheckCircle; } });\nObject.defineProperty(exports, \"ExclamationTriangleIcon\", { enumerable: true, get: function () { return fa_1.FaExclamationTriangle; } });\nObject.defineProperty(exports, \"BugIcon\", { enumerable: true, get: function () { return fa_1.FaBug; } });\nObject.defineProperty(exports, \"CircleNotchIcon\", { enumerable: true, get: function () { return fa_1.FaCircleNotch; } });\nObject.defineProperty(exports, \"KeyboardIcon\", { enumerable: true, get: function () { return fa_1.FaRegKeyboard; } });\nObject.defineProperty(exports, \"HackerIcon\", { enumerable: true, get: function () { return fa_1.FaUserSecret; } });\nObject.defineProperty(exports, \"BufferIcon\", { enumerable: true, get: function () { return fa_1.FaBuffer; } });\nObject.defineProperty(exports, \"SitemapIcon\", { enumerable: true, get: function () { return fa_1.FaSitemap; } });\nObject.defineProperty(exports, \"ExpandIcon\", { enumerable: true, get: function () { return fa_1.FaExpand; } });\nObject.defineProperty(exports, \"BrushIcon\", { enumerable: true, get: function () { return fa_1.FaBrush; } });\nObject.defineProperty(exports, \"SortDownIcon\", { enumerable: true, get: function () { return fa_1.FaSortAlphaDown; } });\nObject.defineProperty(exports, \"SortIcon\", { enumerable: true, get: function () { return fa_1.FaSort; } });\nObject.defineProperty(exports, \"SortDownAltIcon\", { enumerable: true, get: function () { return fa_1.FaSortAlphaDownAlt; } });\nObject.defineProperty(exports, \"NewFolderIcon\", { enumerable: true, get: function () { return fa_1.FaFolderPlus; } });\nObject.defineProperty(exports, \"CaretRightIcon\", { enumerable: true, get: function () { return fa_1.FaCaretRight; } });\nObject.defineProperty(exports, \"WrenchIcon\", { enumerable: true, get: function () { return fa_1.FaWrench; } });\nObject.defineProperty(exports, \"ArrowDownIcon\", { enumerable: true, get: function () { return fa_1.FaArrowDown; } });\nObject.defineProperty(exports, \"ArrowUpIcon\", { enumerable: true, get: function () { return fa_1.FaArrowUp; } });\nObject.defineProperty(exports, \"TerminalIcon\", { enumerable: true, get: function () { return fa_1.FaTerminal; } });\nObject.defineProperty(exports, \"TruckLoadingIcon\", { enumerable: true, get: function () { return fa_1.FaTruckLoading; } });\nObject.defineProperty(exports, \"FolderOpenIcon\", { enumerable: true, get: function () { return fa_1.FaFolderOpen; } });\nObject.defineProperty(exports, \"FolderIcon\", { enumerable: true, get: function () { return fa_1.FaFolder; } });\nObject.defineProperty(exports, \"FileCodeIcon\", { enumerable: true, get: function () { return fa_1.FaFileCode; } });\nObject.defineProperty(exports, \"CodeBranchIcon\", { enumerable: true, get: function () { return fa_1.FaCodeBranch; } });\nObject.defineProperty(exports, \"ArrowCirceUpIcon\", { enumerable: true, get: function () { return fa_1.FaArrowAltCircleUp; } });\nObject.defineProperty(exports, \"ArrowCircleLeftIcon\", { enumerable: true, get: function () { return fa_1.FaArrowAltCircleLeft; } });\nObject.defineProperty(exports, \"EmptyStopCircleIcon\", { enumerable: true, get: function () { return fa_1.FaRegStopCircle; } });\nObject.defineProperty(exports, \"AsteriskIcon\", { enumerable: true, get: function () { return fa_1.FaAsterisk; } });\nObject.defineProperty(exports, \"FilterIcon\", { enumerable: true, get: function () { return fa_1.FaFilter; } });\nObject.defineProperty(exports, \"ExclamationCircleIcon\", { enumerable: true, get: function () { return fa_1.FaExclamationCircle; } });\nObject.defineProperty(exports, \"RocketIcon\", { enumerable: true, get: function () { return fa_1.FaRocket; } });\nObject.defineProperty(exports, \"CheckIcon\", { enumerable: true, get: function () { return fa_1.FaCheck; } });\nObject.defineProperty(exports, \"BanIcon\", { enumerable: true, get: function () { return fa_1.FaBan; } });\nObject.defineProperty(exports, \"FileImportIcon\", { enumerable: true, get: function () { return fa_1.FaFileImport; } });\nObject.defineProperty(exports, \"UsersIcon\", { enumerable: true, get: function () { return fa_1.FaUserFriends; } });\nObject.defineProperty(exports, \"DownloadIcon\", { enumerable: true, get: function () { return fa_1.FaDownload; } });\nObject.defineProperty(exports, \"UploadIcon\", { enumerable: true, get: function () { return fa_1.FaUpload; } });\nObject.defineProperty(exports, \"EmptyWindowRestoreIcon\", { enumerable: true, get: function () { return fa_1.FaRegWindowRestore; } });\nObject.defineProperty(exports, \"PauseCircleIcon\", { enumerable: true, get: function () { return fa_1.FaPauseCircle; } });\nObject.defineProperty(exports, \"ShareIcon\", { enumerable: true, get: function () { return fa_1.FaShare; } });\nObject.defineProperty(exports, \"CopyIcon\", { enumerable: true, get: function () { return fa_1.FaRegCopy; } });\nObject.defineProperty(exports, \"FileAltIcon\", { enumerable: true, get: function () { return fa_1.FaFileAlt; } });\nObject.defineProperty(exports, \"PencilEditIcon\", { enumerable: true, get: function () { return fa_1.FaEdit; } });\nObject.defineProperty(exports, \"ArrowsAltHIcon\", { enumerable: true, get: function () { return fa_1.FaArrowsAltH; } });\nObject.defineProperty(exports, \"WindowMaximizeIcon\", { enumerable: true, get: function () { return fa_1.FaRegWindowMaximize; } });\nObject.defineProperty(exports, \"FilledWindowMaximizeIcon\", { enumerable: true, get: function () { return fa_1.FaWindowMaximize; } });\nObject.defineProperty(exports, \"LongArrowAltDownIcon\", { enumerable: true, get: function () { return fa_1.FaLongArrowAltDown; } });\nObject.defineProperty(exports, \"LongArrowAltUpIcon\", { enumerable: true, get: function () { return fa_1.FaLongArrowAltUp; } });\nObject.defineProperty(exports, \"MeteorIcon\", { enumerable: true, get: function () { return fa_1.FaMeteor; } });\nObject.defineProperty(exports, \"PiedPiperSquareIcon\", { enumerable: true, get: function () { return fa_1.FaPiedPiperSquare; } });\nObject.defineProperty(exports, \"PuzzlePieceIcon\", { enumerable: true, get: function () { return fa_1.FaPuzzlePiece; } });\nObject.defineProperty(exports, \"ToggleOnIcon\", { enumerable: true, get: function () { return fa_1.FaToggleOn; } });\nObject.defineProperty(exports, \"ToggleOffIcon\", { enumerable: true, get: function () { return fa_1.FaToggleOff; } });\nObject.defineProperty(exports, \"MapMarkerIcon\", { enumerable: true, get: function () { return fa_1.FaMapMarkerAlt; } });\nObject.defineProperty(exports, \"WizardHatIcon\", { enumerable: true, get: function () { return fa_1.FaHatWizard; } });\nObject.defineProperty(exports, \"FaceLaughWinkIcon\", { enumerable: true, get: function () { return fa_1.FaRegLaughWink; } });\nObject.defineProperty(exports, \"FaceSadTearIcon\", { enumerable: true, get: function () { return fa_1.FaRegSadTear; } });\nObject.defineProperty(exports, \"BusinessTimeIcon\", { enumerable: true, get: function () { return fa_1.FaBusinessTime; } });\nObject.defineProperty(exports, \"DatabaseIcon\", { enumerable: true, get: function () { return fa_1.FaDatabase; } });\nObject.defineProperty(exports, \"ServerIcon\", { enumerable: true, get: function () { return fa_1.FaServer; } });\nObject.defineProperty(exports, \"TableIcon\", { enumerable: true, get: function () { return fa_1.FaTable; } });\nObject.defineProperty(exports, \"ArchiveIcon\", { enumerable: true, get: function () { return fa_1.FaArchive; } });\nObject.defineProperty(exports, \"BrainIcon\", { enumerable: true, get: function () { return fa_1.FaBrain; } });\nvar gi_1 = require(\"react-icons/gi\");\nObject.defineProperty(exports, \"WaterDropIcon\", { enumerable: true, get: function () { return gi_1.GiWaterDrop; } });\nObject.defineProperty(exports, \"BeardIcon\", { enumerable: true, get: function () { return gi_1.GiBeard; } });\nObject.defineProperty(exports, \"SunglassesIcon\", { enumerable: true, get: function () { return gi_1.GiSunglasses; } });\nObject.defineProperty(exports, \"HouseKeys\", { enumerable: true, get: function () { return gi_1.GiHouseKeys; } });\nvar md_1 = require(\"react-icons/md\");\nObject.defineProperty(exports, \"ManageSearchIcon\", { enumerable: true, get: function () { return md_1.MdManageSearch; } });\nObject.defineProperty(exports, \"PencilIcon\", { enumerable: true, get: function () { return md_1.MdModeEdit; } });\nObject.defineProperty(exports, \"StringTypeIcon\", { enumerable: true, get: function () { return md_1.MdTextFields; } });\nObject.defineProperty(exports, \"MoreVerticalIcon\", { enumerable: true, get: function () { return md_1.MdMoreVert; } });\nObject.defineProperty(exports, \"MoreHorizontalIcon\", { enumerable: true, get: function () { return md_1.MdMoreHoriz; } });\nObject.defineProperty(exports, \"WrapTextIcon\", { enumerable: true, get: function () { return md_1.MdWrapText; } });\nObject.defineProperty(exports, \"VerticalAlignBottomIcon\", { enumerable: true, get: function () { return md_1.MdVerticalAlignBottom; } });\nObject.defineProperty(exports, \"RefreshIcon\", { enumerable: true, get: function () { return md_1.MdRefresh; } });\nObject.defineProperty(exports, \"SigmaIcon\", { enumerable: true, get: function () { return md_1.MdFunctions; } });\nObject.defineProperty(exports, \"CompareIcon\", { enumerable: true, get: function () { return md_1.MdCompareArrows; } });\nObject.defineProperty(exports, \"CheckListIcon\", { enumerable: true, get: function () { return md_1.MdPlaylistAddCheck; } });\nObject.defineProperty(exports, \"AddIcon\", { enumerable: true, get: function () { return md_1.MdAdd; } });\nObject.defineProperty(exports, \"EditIcon\", { enumerable: true, get: function () { return md_1.MdEdit; } });\nObject.defineProperty(exports, \"SubjectIcon\", { enumerable: true, get: function () { return md_1.MdSubject; } });\nObject.defineProperty(exports, \"ViewHeadlineIcon\", { enumerable: true, get: function () { return md_1.MdViewHeadline; } });\nObject.defineProperty(exports, \"AssistantIcon\", { enumerable: true, get: function () { return md_1.MdAssistant; } });\nObject.defineProperty(exports, \"SettingsEthernetIcon\", { enumerable: true, get: function () { return md_1.MdSettingsEthernet; } });\nObject.defineProperty(exports, \"LinkIcon\", { enumerable: true, get: function () { return md_1.MdLink; } });\nObject.defineProperty(exports, \"WindowIcon\", { enumerable: true, get: function () { return md_1.MdWindow; } });\nObject.defineProperty(exports, \"ReviewIcon\", { enumerable: true, get: function () { return md_1.MdReviews; } });\nvar vsc_1 = require(\"react-icons/vsc\");\nObject.defineProperty(exports, \"ErrorIcon\", { enumerable: true, get: function () { return vsc_1.VscError; } });\nObject.defineProperty(exports, \"WarningIcon\", { enumerable: true, get: function () { return vsc_1.VscWarning; } });\nObject.defineProperty(exports, \"WordWrapIcon\", { enumerable: true, get: function () { return vsc_1.VscWordWrap; } });\nObject.defineProperty(exports, \"GoToFileIcon\", { enumerable: true, get: function () { return vsc_1.VscGoToFile; } });\nObject.defineProperty(exports, \"CloseIcon\", { enumerable: true, get: function () { return vsc_1.VscClose; } });\nObject.defineProperty(exports, \"RunAllIcon\", { enumerable: true, get: function () { return vsc_1.VscRunAll; } });\nObject.defineProperty(exports, \"RunErrorsIcon\", { enumerable: true, get: function () { return vsc_1.VscRunErrors; } });\nObject.defineProperty(exports, \"OpenPreviewIcon\", { enumerable: true, get: function () { return vsc_1.VscOpenPreview; } });\nObject.defineProperty(exports, \"DiffIcon\", { enumerable: true, get: function () { return vsc_1.VscDiff; } });\nObject.defineProperty(exports, \"RegexIcon\", { enumerable: true, get: function () { return vsc_1.VscRegex; } });\nObject.defineProperty(exports, \"CaseSensitiveIcon\", { enumerable: true, get: function () { return vsc_1.VscCaseSensitive; } });\nvar go_1 = require(\"react-icons/go\");\nObject.defineProperty(exports, \"ChevronDownIcon\", { enumerable: true, get: function () { return go_1.GoChevronDown; } });\nObject.defineProperty(exports, \"ChevronUpIcon\", { enumerable: true, get: function () { return go_1.GoChevronUp; } });\nObject.defineProperty(exports, \"ChevronRightIcon\", { enumerable: true, get: function () { return go_1.GoChevronRight; } });\nObject.defineProperty(exports, \"BinaryTypeIcon\", { enumerable: true, get: function () { return go_1.GoFileBinary; } });\nObject.defineProperty(exports, \"GitPullRequestIcon\", { enumerable: true, get: function () { return go_1.GoGitPullRequest; } });\nObject.defineProperty(exports, \"GitMergeIcon\", { enumerable: true, get: function () { return go_1.GoGitMerge; } });\nObject.defineProperty(exports, \"CloudDownloadIcon\", { enumerable: true, get: function () { return go_1.GoCloudDownload; } });\nObject.defineProperty(exports, \"CloudUploadIcon\", { enumerable: true, get: function () { return go_1.GoCloudUpload; } });\nObject.defineProperty(exports, \"SyncIcon\", { enumerable: true, get: function () { return go_1.GoSync; } });\nObject.defineProperty(exports, \"GitBranchIcon\", { enumerable: true, get: function () { return go_1.GoGitBranch; } });\nObject.defineProperty(exports, \"XIcon\", { enumerable: true, get: function () { return go_1.GoX; } });\nObject.defineProperty(exports, \"PluginIcon\", { enumerable: true, get: function () { return go_1.GoPlug; } });\nvar si_1 = require(\"react-icons/si\");\nObject.defineProperty(exports, \"SwaggerIcon\", { enumerable: true, get: function () { return si_1.SiSwagger; } });\nvar io5_1 = require(\"react-icons/io5\");\nObject.defineProperty(exports, \"ResizeIcon\", { enumerable: true, get: function () { return io5_1.IoResize; } });\nObject.defineProperty(exports, \"FileTrayIcon\", { enumerable: true, get: function () { return io5_1.IoFileTrayFullOutline; } });\nObject.defineProperty(exports, \"MenuIcon\", { enumerable: true, get: function () { return io5_1.IoMenuOutline; } });\nObject.defineProperty(exports, \"BeakerIcon\", { enumerable: true, get: function () { return io5_1.IoBeaker; } });\nObject.defineProperty(exports, \"FlaskIcon\", { enumerable: true, get: function () { return io5_1.IoFlaskSharp; } });\nvar bs_1 = require(\"react-icons/bs\");\nObject.defineProperty(exports, \"ChevronDownThinIcon\", { enumerable: true, get: function () { return bs_1.BsChevronDown; } });\nObject.defineProperty(exports, \"FilledTriangleIcon\", { enumerable: true, get: function () { return bs_1.BsFillTriangleFill; } });\nObject.defineProperty(exports, \"TabulatedDataFileIcon\", { enumerable: true, get: function () { return bs_1.BsFillFileEarmarkSpreadsheetFill; } });\nObject.defineProperty(exports, \"BundleIcon\", { enumerable: true, get: function () { return bs_1.BsBoxSeam; } });\nObject.defineProperty(exports, \"VerticalDragHandleThinIcon\", { enumerable: true, get: function () { return bs_1.BsGripVertical; } });\nObject.defineProperty(exports, \"AlignTopIcon\", { enumerable: true, get: function () { return bs_1.BsAlignTop; } });\nObject.defineProperty(exports, \"AlignMiddleIcon\", { enumerable: true, get: function () { return bs_1.BsAlignMiddle; } });\nObject.defineProperty(exports, \"AlignBottomIcon\", { enumerable: true, get: function () { return bs_1.BsAlignBottom; } });\nObject.defineProperty(exports, \"AlignStartIcon\", { enumerable: true, get: function () { return bs_1.BsAlignStart; } });\nObject.defineProperty(exports, \"AlignCenterIcon\", { enumerable: true, get: function () { return bs_1.BsAlignCenter; } });\nObject.defineProperty(exports, \"AlignEndIcon\", { enumerable: true, get: function () { return bs_1.BsAlignEnd; } });\nObject.defineProperty(exports, \"DistributeHorizontalIcon\", { enumerable: true, get: function () { return bs_1.BsDistributeHorizontal; } });\nObject.defineProperty(exports, \"DistributeVerticalIcon\", { enumerable: true, get: function () { return bs_1.BsDistributeVertical; } });\nvar bi_1 = require(\"react-icons/bi\");\nObject.defineProperty(exports, \"ShapeTriangleIcon\", { enumerable: true, get: function () { return bi_1.BiShapeTriangle; } });\nObject.defineProperty(exports, \"AtomIcon\", { enumerable: true, get: function () { return bi_1.BiAtom; } });\nvar cg_1 = require(\"react-icons/cg\");\nObject.defineProperty(exports, \"OptionsIcon\", { enumerable: true, get: function () { return cg_1.CgOptions; } });\nvar fi_1 = require(\"react-icons/fi\");\nObject.defineProperty(exports, \"PackageIcon\", { enumerable: true, get: function () { return fi_1.FiPackage; } });\nObject.defineProperty(exports, \"MinusIcon\", { enumerable: true, get: function () { return fi_1.FiMinus; } });\nObject.defineProperty(exports, \"MousePointerIcon\", { enumerable: true, get: function () { return fi_1.FiMousePointer; } });\nObject.defineProperty(exports, \"MoveIcon\", { enumerable: true, get: function () { return fi_1.FiMove; } });\nObject.defineProperty(exports, \"PlusCircleIcon\", { enumerable: true, get: function () { return fi_1.FiPlusCircle; } });\nObject.defineProperty(exports, \"SidebarIcon\", { enumerable: true, get: function () { return fi_1.FiSidebar; } });\nObject.defineProperty(exports, \"TriangleIcon\", { enumerable: true, get: function () { return fi_1.FiTriangle; } });\nObject.defineProperty(exports, \"ZoomInIcon\", { enumerable: true, get: function () { return fi_1.FiZoomIn; } });\nObject.defineProperty(exports, \"ZoomOutIcon\", { enumerable: true, get: function () { return fi_1.FiZoomOut; } });\nObject.defineProperty(exports, \"TruncatedGitMergeIcon\", { enumerable: true, get: function () { return fi_1.FiGitMerge; } });\nvar ri_1 = require(\"react-icons/ri\");\nObject.defineProperty(exports, \"ShapeLineIcon\", { enumerable: true, get: function () { return ri_1.RiShapeLine; } });\nObject.defineProperty(exports, \"TestTubeIcon\", { enumerable: true, get: function () { return ri_1.RiTestTubeFill; } });\nObject.defineProperty(exports, \"DroidIcon\", { enumerable: true, get: function () { return ri_1.RiRobotFill; } });\nvar tb_1 = require(\"react-icons/tb\");\nObject.defineProperty(exports, \"ArrowsJoinIcon\", { enumerable: true, get: function () { return tb_1.TbArrowsJoin2; } });\nObject.defineProperty(exports, \"ArrowsSplitIcon\", { enumerable: true, get: function () { return tb_1.TbArrowsSplit2; } });\nObject.defineProperty(exports, \"FunctionIcon\", { enumerable: true, get: function () { return tb_1.TbMathFunction; } });\nObject.defineProperty(exports, \"RepoIcon\", { enumerable: true, get: function () { return tb_1.TbBook; } });\n//# sourceMappingURL=CJS__Icon.cjs.map","\"use strict\";\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 */\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.baseComponents = exports.createFilter = exports.Select = exports.CreatableSelect = void 0;\n/**\n * Previously, these exports rely on ES module interop to expose `default` export\n * properly. But since we use `ESM` for Typescript resolution now, we lose this\n * so we have to workaround by importing these and re-export them from CJS\n *\n * TODO: remove these when the package properly work with Typescript's nodenext\n * module resolution\n *\n * @workaround ESM\n * See https://github.com/microsoft/TypeScript/issues/49298\n */\nvar creatable_1 = require(\"react-select/creatable\");\nObject.defineProperty(exports, \"CreatableSelect\", { enumerable: true, get: function () { return __importDefault(creatable_1).default; } });\nvar react_select_1 = require(\"react-select\");\nObject.defineProperty(exports, \"Select\", { enumerable: true, get: function () { return __importDefault(react_select_1).default; } });\nObject.defineProperty(exports, \"createFilter\", { enumerable: true, get: function () { return react_select_1.createFilter; } });\nObject.defineProperty(exports, \"baseComponents\", { enumerable: true, get: function () { return react_select_1.components; } });\n//# sourceMappingURL=CJS__ReactSelect.cjs.map","// 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 + \".\" + {\"14\":\"b63f5ea7\",\"135\":\"3b62eae4\",\"246\":\"55fd6716\",\"309\":\"ca0f7cf5\",\"399\":\"7ad47fd9\",\"471\":\"bde04e4b\",\"947\":\"50215a8f\"}[chunkId] + \".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\t826: 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} else installedChunks[chunkId] = 0;\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, [736], () => (__webpack_require__(73449)))\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","PresetInfo","plugins","AbstractPreset","getPlugins","map","plugin","sort","a","b","localeCompare","install","pluginManager","forEach","AbstractPluginManager","presets","usePlugins","usePresets","Object","keys","key","configObj","preset","filter","getHiddenPluginNames","includes","getHiddenPresetNames","LogEvent","channel","timestamp","Date","now","static","event","LoggerPlugin","level","DEBUG","setLevel","registerLoggerPlugin","debug","data","_debug","INFO","_info","warn","WARN","_warn","error","ERROR","_error","Log","loggers","registerPlugins","loggerPlugins","logger","console","WebConsole","super","length","MONOSPACED_FONT_FAMILY","EDITOR_THEME","EDITOR_LANGUAGE","getClass","obj","noop","getNullableFirstElement","array","undefined","getNullableLastElement","func","Promise","resolve","reject","setTimeout","addUniqueEntry","newEntry","comparator","val1","val2","find","entry","push","swapEntry","entryOne","entryTwo","idxX","findIndex","idxY","deleteEntry","entryToDelete","idx","splice","ApplicationError","Error","message","detail","EnrichedError","overideMessage","messageLines","match","stack","split","slice","join","captureStackTrace","unsupportedObject","value","options","opts","printFunctionName","maxDepth","deep","pickBy","val","replace","printObject","assertErrorThrown","fn","AssertionError","assertNonNullable","clazz","isType","assertType","str","assertionValue","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","retry","autoReAuthenticateUrl","id","document","getElementById","remove","element","createElement","src","style","display","addEventListener","body","appendChild","autoReAuthenticate","then","fetch","createRequestHeaders","method","baseRequestHeaders","GET","CONTENT_TYPE","NetworkClient","baseUrl","config","parameters","requestProcessConfig","request","PUT","POST","DELETE","requestUrl","URL","fullUrl","Array","isArray","subVal","searchParams","append","toString","makeUrl","enableCompression","Blob","compressData","APPLICATION_ZLIB","requestInit","UNAUTHORIZED","unauthenticated","catch","TypeError","couldBeCORS","downloadFileUsingDataURI","fileName","content","contentType","blob","type","createObjectURL","link","download","href","click","removeChild","location","APPLICATION_EVENT","PARSER_SECTION_MARKER","RESERVERD_PACKAGE_NAMES","ATOMIC_TEST_TYPE","PRIMITIVE_TYPE","ROOT_PACKAGE_NAME","AUTO_IMPORTS","CORE_PURE_PATH","MILESTONING_VERSION_PROPERTY_SUFFIX","MILESTONING_STEREOTYPE","PackageableElementPointerType","SUPPORTED_FUNCTIONS","DATE_TIME_FORMAT","PURE_ELEMENT_NAME","PURE_CONNECTION_NAME","PURE_PARSER","generateMultiplicityString","lowerBound","upperBound","PURE_GRAMMAR_TOKEN","theme","base","inherit","colors","rules","token","IDENTIFIER","foreground","NUMBER","DATE","COLOR","PACKAGE","PARSER","LANGUAGE_STRUCT","MULTIPLICITY","GENERICS","PROPERTY","VARIABLE","TYPE","configuration","comments","lineComment","blockComment","brackets","autoClosingPairs","open","close","surroundingPairs","folding","markers","start","RegExp","end","SerializationFactory","schema","deserializeNullAsUndefined","Boolean","toJson","fromJson","usingModelSchema","deserializeArray","values","itemDeserializer","skipIfEmpty","serializeArray","itemSerializer","usingConstantValueSchema","DocumentationEntry","_documentationKey","markdownText","title","related","documentationKey","serialization","collectKeyedDocumnetationEntriesFromConfig","rawEntries","create","DocumentationService","docRegistry","Map","contextualDocIndex","applicationStore","documentationUrl","getApplicationPlugins","flatMap","getExtraKeyedDocumentationEntries","hasDocEntry","log","APPLICATION_DOCUMENTATION_LOAD_SKIPPED","set","keyedDocumentationEntries","contextualDocEntries","getExtraContextualDocumentationEntries","missingDocumentationEntries","getExtraRequiredDocumentationKeys","concat","has","APPLICATION_DOCUMENTATION_REQUIREMENT_CHECK_FAILURE","hasContextualDocEntry","context","APPLICATION_CONTEXTUAL_DOCUMENTATION_LOAD_SKIPPED","existingDocEntry","getDocEntry","get","getContextualDocEntry","getAllDocEntries","from","publishDocRegistry","result","publishContextualDocIndex","LegendApplicationLogger","LegendApplicationWebConsole","LegendApplication","basePresets","basePlugins","pluginRegister","_isConfigured","setup","withBasePresets","withPresets","withBasePlugins","withPlugins","client","versionData","window","origin","APPLICATION_CONFIGURATION_FAILURE","configureApplication","extensions","all","documentationRegistryEntries","getExtraDocumentationRegistryEntries","simple","docData","patterns","trim","docEntry","some","pattern","test","APPLICATION_DOCUMENTATION_FETCH_FAILURE","extensionConfigData","fetchApplicationConfiguration","loadDocumentationRegistryData","loadApplication","getExtraApplicationSetups","APPLICATION_LOADED","APPLICATION_LOAD_FAILURE","WebApplicationNavigator","historyAPI","_isNavigationBlocked","_forceBypassNavigationBlocking","_blockCheckers","_beforeUnloadListener","checker","returnValue","onBlock","onNativePlatformNavigationBlock","historyApiClient","isNavigationBlocked","blockNavigation","unblockNavigation","goToLocation","ignoreBlocking","onProceed","generateAddress","reload","goToAddress","address","visitAddress","updateCurrentLocation","getCurrentAddress","getCurrentLocation","pathname","createHref","blockCheckers","history","pushState","onpopstate","forward","removeEventListener","WebApplicationNavigatorContext","createContext","WebApplicationNavigatorProvider","children","navigator","Provider","TelemetryService","setUserId","logEvent","eventType","CORE_TRACER_TAG","Trace","traceEntries","bootstrap","clientSpan","reportSuccess","concludeClientSpan","reportError","concludeServerSpan","serverSpan","TracerService","createTrace","traceData","trace","createClientSpan","createServerSpan","ACTION_STATE","ADVANCED_TEXT_SEARCH_MODE","VIRTUAL_ASSISTANT_TAB","ActionState","state","_message","_messageFormatter","INITIAL","setMessage","setMessageFormatter","reset","IN_PROGRESS","fail","FAILED","pass","SUCCEEDED","complete","hasSucceeded","isInInitialState","isInProgress","hasFailed","hasCompleted","TextSearchAdvancedConfigState","currentMode","STANDARD","onSearchModeChange","isAdvancedSearchActive","setCurrentMode","generateSearchText","INCLUDE","EXACT","INVERSE","VirtualAssistantDocumentationEntry","isOpen","setIsOpen","VirtualAssistantContextualDocumentationEntry","isValidVirtualAssistantDocumentationEntry","AssistantService","panelRenderingKey","isHidden","selectedTab","SEARCH","currentDocumentationEntry","searchEngine","searchConfigurationState","searchState","searchText","searchResults","showSearchConfigurationMenu","isOverSearchLimit","currentContextualDocumentationEntry","setIsHidden","setSelectedTab","setSearchText","resetSearch","search","openDocumentationEntry","refreshPanelRendering","setShowSearchConfigurationMenu","Fuse","documentationService","includeScore","shouldSort","ignoreLocation","threshold","weight","useExtendedSearch","navigationContextService","currentContext","docKey","matchingDocEntry","hideAssistant","toggleAssistant","limit","DOCUMENTATION_SEARCH_RESULTS_LIMIT","item","EventService","notifierPlugins","registerEventNotifierPlugins","notify","ApplicationTelemetry","telemetryService","APPLICATION_CONTEXT_ACCESSED","VIRTUAL_ASSISTANT_DOCUMENTATION_ENTRY_ACCESSED","ApplicationNavigationContextService","contextStack","pop","newContextStack","ctx","isTransient","getExtraAccessEventLoggingApplicationContextKeys","logEvent_ApplicationContextAccessed","existingCtx","indexOf","CommandCenter","commandRegistry","registerCommand","deregisterCommand","command","commandKey","APPLICATION_COMMAND_CENTER_REGISTRATION_FAILURE","delete","runCommand","args","trigger","action","KeyboardShortcutsService","keyMap","commandKeyMap","isHotkeysBlocked","updateHotkey","blockGlobalHotkeys","unblockGlobalHotkeys","commandsWithMultipleKeyBindings","getExtraKeyedCommandConfigEntries","defaultKeyboardShortcut","APPLICATION_KEYBOARD_SHORTCUTS_CONFIGURATION_CHECK_FAILURE","keyCombination","currentKeyCombination","dispatch","mappedCommandKeys","commandCenter","ActionAlertType","ActionAlertActionType","DEFAULT_NOTIFICATION_HIDE_TIME","NOTIFCATION_SEVERITY","Notification","severity","actions","autoHideDuration","ApplicationStore","notification","blockingAlertInfo","actionAlertInfo","assistantService","eventService","tracerService","keyboardShortcutsService","backdropContainerElementID","showBackdrop","TEMPORARY__isLightThemeEnabled","setBackdropContainerElementID","setShowBackdrop","setBlockingAlert","setActionAlertInfo","setNotification","notifySuccess","notifyWarning","notifyIllegalState","notifyError","TEMPORARY__setIsLightThemeEnabled","getLoggerPlugins","getTelemetryServicePlugins","getTracerServicePlugins","getEventNotifierPlugins","alertInfo","SUCCESS","WARNING","ILEGAL_STATE","notifyAndReturnAlternativeOnError","alternative","alertUnhandledError","ILLEGAL_APPLICATION_STATE_OCCURRED","guardUnhandledError","actionFn","clipboard","writeText","notifyUnsupportedFeature","featureName","ApplicationStoreContext","ApplicationStoreProvider","useContext","useApplicationStore","LegendApplicationConfig","appName","env","appVersion","appVersionBuildTime","appVersionCommitId","input","documentation","registry","contextualEntries","buildTime","commitSHA","LegendPureIDEApplicationConfig","pureUrl","useDynamicPureServer","pure","dynamic","LegendApplicationPluginManager","telemetryServicePlugins","tracerServicePlugins","eventNotifierPlugins","applicationPlugins","registerTelemetryServicePlugin","registerTracerServicePlugin","registerEventNotifierPlugin","registerApplicationPlugin","LegendPureIDEPluginManager","pureProtocolProcessorPlugins","pureGraphManagerPlugins","pureGraphPlugins","registerPureProtocolProcessorPlugin","registerPureGraphManagerPlugin","registerPureGraphPlugin","getPureGraphManagerPlugins","getPureProtocolProcessorPlugins","getPureGraphPlugins","PureGraphManagerPlugin","_$nominalTypeBrand","skipObserved","observer","metamodel","skipObservedWithContext","observe_Abstract_PackageableElement","_isDeleted","_isDisposed","package","isDeleted","path","_elementHashCode","hashCode","setIsDeleted","dispose","observe_PackageableElementReference","valueForSerialization","hashValue","hash","sha1","update","digest","arr","CORE_HASH_STRUCTURE","hashObjectWithoutSourceInformation","hashObject","excludeKeys","propKey","toLowerCase","endsWith","hashRawLambda","pointerType","PACKAGEABLE_ELEMENT_POINTER","AnnotatedElement","stereotypes","taggedValues","ModelElement","PackageableElement","_UUID","parentPackagePath","Type","_subclasses","_generatedMilestonedProperties","properties","propertiesFromAssociations","derivedProperties","generalizations","constraints","genericType","superclass","rawType","subclass","gen","ownerReference","pointerHashCode","accept_PackageableElementVisitor","visitor","visit_Class","stereotype","visit_Enumeration","measure","conversionFunction","canonicalUnit","nonCanonicalUnits","visit_Measure","visit_Package","Section","_OWNER","parserName","elements","owner","e","imports","DefaultCodeSection","Reference","ReferenceWithOwner","PackageableElementReference","observe_ConfigurationProperty","observe_FileGenerationSpecification","generationOutputPath","scopeElements","configurationProperties","scopeElement","observe_GenerationTreeNode","generationElement","observe_GenerationSpecification","generationNodes","fileGenerations","capitalize","toUpperCase","TITLE_CASE_EXCEPTION_WORDS","tryToMinifyLosslessJSONString","tabSize","replacer","space","stringifyLosslessJSON","tryToFormatLosslessJSONString","MappingTestAssert","expectedOutput","Runtime","EngineRuntime","mappings","connections","mapping","connection","storeConnections","RuntimePointer","packageableRuntime","InputData","sourceFlatData","RelationalInputType","ObjectInputType","sourceClass","inputType","database","observe_RawPrimitiveInstanceValue","observe_RawLambda","observe_RawVariableExpression","multiplicity","RawValueSpecificationObserver","observerContext","visit_RawLambda","valueSpecification","visit_RawVariableExpression","visit_RawPrimitiveInstanceValue","rawValueSpecification","accept_RawValueSpecificationVisitor","FlatDataDataType","_correspondingPrimitiveType","correspondingPrimitiveType","FlatDataBoolean","trueString","falseString","FlatDataString","FlatDataNumber","FlatDataDate","dateFormat","timeZone","FlatDataRecordType","fields","observe_FlatDataAssociationPropertyMapping","observe_Abstract_PropertyMapping","flatData","sectionName","observe_FlatDataRecordField","label","flatDataDataType","optional","_observe_FlatDataRecordType","observe_FlatDataDataType","observe_RootFlatDataRecordType","observe_FlatDataProperty","observe_FlatDataSection","driverId","sectionProperties","recordType","observe_FlatData","sections","observe_RootFlatDataRecordTypeReference","observe_FlatDataInstanceSetImplementation","observe_Abstract_InstanceSetImplementation","sourceRootRecordType","observe_EmbeddedFlatDataPropertyMapping","rootInstanceSetImplementation","observe_FlatDataPropertyMapping","transformer","transform","observe_FlatDataInputData","observe_FlatDataConnection","AuthenticationStrategy","DelegatedKerberosAuthenticationStrategy","serverPrincipal","DefaultH2AuthenticationStrategy","ApiTokenAuthenticationStrategy","apiToken","OAuthAuthenticationStrategy","oauthKey","scopeName","SnowflakePublicAuthenticationStrategy","privateKeyVaultReference","passPhraseVaultReference","publicUserName","GCPApplicationDefaultCredentialsAuthenticationStrategy","GCPWorkloadIdentityFederationAuthenticationStrategy","serviceAccountEmail","additionalGcpScopes","UsernamePasswordAuthenticationStrategy","baseVaultReference","userNameVaultReference","passwordVaultReference","MiddleTierUsernamePasswordAuthenticationStrategy","vaultReference","DatasourceSpecification","StaticDatasourceSpecification","host","port","databaseName","DatabricksDatasourceSpecification","hostname","protocol","httpPath","EmbeddedH2DatasourceSpecification","directory","autoServerMode","LocalH2DatasourceSpecification","testDataSetupCsv","testDataSetupSqls","SnowflakeDatasourceSpecification","accountName","region","warehouseName","cloudType","quotedIdentifiersIgnoreCase","proxyHost","proxyPort","nonProxyHosts","organization","accountType","role","RedshiftDatasourceSpecification","clusterID","endpointURL","BigQueryDatasourceSpecification","projectId","defaultDataset","PostProcessor","MapperPostProcessor","mappers","SELF_JOIN_TABLE_NAME","SELF_JOIN_SCHEMA_NAME","RelationalOperationElement","Function","Operation","DynaFunction","JoinType","joinTreeNode","RelationalOperationElementWithJoin","relationalOperationElement","TableAlias","relation","isSelfJoinTarget","TableAliasColumn","alias","column","columnName","selfJoinPointerHashCode","Literal","LiteralList","Column","nullable","Milestoning","TemporalMilestoning","infinityDate","RelationalDataType","BigInt","SmallInt","TinyInt","Integer","Float","Double","VarChar","size","Char","VarBinary","Decimal","precision","scale","Numeric","Timestamp","Other","Bit","Binary","Real","SemiStructured","NamedRelationalReference","TableReference","ViewReference","PostProcessorParameter","Mapper","to","SchemaNameMapper","TableNameMapper","observe_ModelUnit","packageableElementIncludes","packageableElementExcludes","observe_BindingTransformer","observe_Abstract_Store","schemaSet","schemaId","modelUnit","binding","observe_UrlStream","observe_ExternalFormatSchema","observe_Abstract_Connection","externalSource","observe_RelationalDataType","format","schemas","observe_Column","observe_TableReference","observe_ViewReference","observe_TableAlias","observe_NamedRelationalReference","observe_DynaFunction","observe_RelationalOperationElement","observe_ColumnReference","observe_TableAliasColumn","observe_JoinReference","observe_JoinTreeNode","joinType","observe_RelationalOperationElementWithJoin","observe_Literal","observe_LiteralList","observe_TemporalMilstoning","observe_Milestoning","extraMilestoningObservers","getExtraMilestoningObservers","observedMiletoning","observe_ColumnMapping","observe_FilterReference","observe_FilterMapping","filterName","observe_GroupByMapping","columns","observe_Abstract_NamedRelation","observe_Table","primaryKey","milestoning","m","observe_View","columnMappings","distinct","groupBy","observe_Schema","tables","views","table","view","observe_Filter","operation","observe_Join","target","aliases","observe_Database","joins","filters","observe_RelationalPropertyMapping","relationalOperation","bindingTransformer","observe_Abstract_EmbeddedRelationalInstanceSetImplementation","observe_EmbeddedRelationalInstanceSetImplementation","observe_InlineEmbeddedRelationalInstanceSetImplementation","inlineSetImplementation","observe_SetImplementation","observe_OtherwiseEmbeddedRelationalInstanceSetImplementation","otherwisePropertyMapping","observe_PropertyMapping","observe_RelationalInstanceSetImplementation","observe_RootRelationalInstanceSetImplementation","mainTableAlias","superSetImplementationId","observe_RelationalInputData","observe_StaticDatasourceSpecification","observe_DatabricksDatasourceSpecification","observe_EmbeddedH2DatasourceSpecification","observe_LocalH2DatasourceSpecification","observe_SnowflakeDatasourceSpecification","observe_RedshiftDatasourceSpecification","observe_BigQueryDatasourceSpecification","observe_DelegatedKerberosAuthenticationStrategy","observe_DefaultH2AuthenticationStrategy","observe_ApiTokenAuthenticationStrategy","observe_OAuthAuthenticationStrategy","observe_SnowflakePublicAuthenticationStrategy","observe_GCPApplicationDefaultCredentialsAuthenticationStrategy","observe_UsernamePasswordAuthenticationStrategy","observe_GCPWorkloadIdentityFederationAuthenticationStrategy","observe_MiddleTierUsernamePasswordAuthenticationStrategy","observe_Abstract_Mapper","observe_SchemaNameMapper","observe_TableNameMapper","observe_RelationalDatabaseConnection","quoteIdentifiers","observe_Abstract_DatabaseConnection","datasourceSpecification","authenticationStrategy","postProcessors","extraObservers","getExtraDatasourceSpecificationObservers","observedDatasourceSpec","observe_DatasourceSpecification","getExtraAuthenticationStrategyObservers","observedAuthStrategy","observe_AuthenticationStrategy","postProcessor","observe_Abstract_PostProcessor","mapper","observe_Mapper","observe_MapperPostProcessor","getExtraPostProcessorObservers","observedPostProcessor","observe_PostProcessor","Test","AtomicTest","__parent","assertions","TestSuite","tests","ServiceTest","serializationFormat","MappingTest","query","MappingTestSuite","storeTestDatas","ServiceTestSuite","testData","TestAssertion","parentTest","EqualTo","expected","accept_TestAssertionVisitor","visit_EqualTo","EqualToJson","visit_EqualToJSON","EqualToTDS","visit_EqualToTDS","EmbeddedData","DataElementReference","dataElement","accept_EmbeddedDataVisitor","visit_DataElementReference","ExternalFormatData","visit_ExternalFormatData","ModelStoreData","instances","visit_ModelStoreData","RelationalCSVData","visit_RelationalCSVData","observe_ExternalFormatData","observe_DataElementReference","observe_ModelStoreData","observe_RelationalDataTable","observe_RelationalCSVData","observe_EmbeddedData","extraEmbeddedDataObservers","getExtraEmbeddedDataObservers","observedEmbeddedData","observe_DataElement","observe_StereotypeReference","observe_TaggedValue","ServiceExecution","PureExecution","PureSingleExecution","runtime","PureMultiExecution","executionKey","executionParameters","parentService","DEPRECATED__ServiceTest","DEPRECATED__SingleExecutionTest","asserts","DEPRECATED__MultiExecutionTest","observe_ConnectionTestData","connectionId","observe_ParameterValue","observe_PostValidationAssertion","assertion","observe_PostValidation","description","observe_TestData","connectionsTestData","connectionTestData","observe_ServiceTest","observe_TestAssertion","observe_ServiceTestSuite","observe_AtomicTest","observe_TestContainer","parametersValues","assert","singleExecutionTestParent","observe_SingleExecutionTest","observe_KeyedSingleExecutionTest","observe_MultiExecutionTest","observe_Abstract_PureExecution","observe_PureSingleExecution","observe_Runtime","observe_KeyedExecutionParameter","observe_PureMultiExecution","parameter","observe_Service","owners","autoActivateUpdates","execution","postValidations","patternParameters","observe_ServiceExecution","observe_ServiceTest_Legacy","observe_EqualTo","observe_EqualToTDS","observe_EqualToJson","observe_MappingTest","extraAtomicTestBuilder","getExtraAtomicTestObservers","builder","atomicTestBuilder","observe_StoreTestData","store","observe_MappingTestSuite","observe_EnumerationMappingReference","observe_SetImplementationReference","observe_LocalMappingPropertyInfo","localMappingProperty","localMappingPropertyType","localMappingPropertyMultiplicity","sourceSetImplementation","targetSetImplementation","observe_PropertyReference","property","observe_PurePropertyMapping","explodeProperty","PropertyMappingObserver","visit_PropertyMapping","propertyMapping","extraPropertyMappingObservers","getExtraPropertyMappingObservers","visit_PurePropertyMapping","visit_FlatDataPropertyMapping","visit_EmbeddedFlatDataPropertyMapping","visit_RelationalPropertyMapping","visit_FlatDataAssociationPropertyMapping","visit_EmbeddedRelationalPropertyMapping","visit_InlineEmbeddedRelationalPropertyMapping","visit_OtherwiseEmbeddedRelationalPropertyMapping","visit_AggregationAwarePropertyMapping","visit_XStorePropertyMapping","accept_PropertyMappingVisitor","observe_InferableMappingElementIdValue","isDefault","observe_InferableMappingElementRoot","observe_Abstract_SetImplementation","root","class","observe_MappingClass","setImplementation","mappingClass","propertyMappings","observe_SetImplementationContainer","observe_Abstract_OperationSetImplementation","observe_OperationSetImplementation","observe_MergeOperationSetImplementation","validationFunction","observe_PureInstanceSetImplementation","srcClass","SetImplementationObserver","visit_SetImplementation","getExtraSetImplementationObservers","visit_MergeOperationSetImplementation","visit_OperationSetImplementation","visit_PureInstanceSetImplementation","visit_FlatDataInstanceSetImplementation","visit_EmbeddedFlatDataSetImplementation","visit_RelationalInstanceSetImplementation","visit_RootRelationalInstanceSetImplementation","visit_AggregationAwareSetImplementation","visit_TEMPORARY__UnresolvedSetImplementation","accept_SetImplementationVisitor","observe_SubstituteStore","original","substitute","observe_MappingInclude","included","storeSubstitutions","observe_SourceValue","observe_EnumValueMapping","sourceValues","observe_EnumValueReference","enum","observe_EnumerationMapping","sourceType","enumValueMappings","enumeration","observe_AssociationImplementation","stores","association","observe_ObjectInputData","observe_ExpectedOutputMappingTestAssert","observe_MappingTest_Legacy","inputData","getExtraMappingTestInputDataObservers","observed","observe_InputData","observe_MappingTestAssert","observe_Mapping","classMappings","enumerationMappings","associationMappings","classMapping","associationMapping","t","testSuite","observe_TestSuite","observe_ConnectionPointer","observe_JsonModelConnection","observe_XmlModelConnection","observe_ModelChainConnection","ConnectionObserver","visit_Connection","getExtraConnectionObservers","visit_ConnectionPointer","visit_ModelChainConnection","visit_JsonModelConnection","visit_XmlModelConnection","visit_FlatDataConnection","visit_RelationalDatabaseConnection","observe_Connection","accept_ConnectionVisitor","observe_PackageableConnection","connectionValue","observe_IdentifiedConnection","observe_StoreConnections","observe_EngineRuntime","observe_RuntimePointer","observe_PackageableRuntime","runtimeValue","PackageableElementObserver","visit_PackageableElement","extraElementObservers","getExtraElementObservers","observe_Package","visit_SectionIndex","observe_SectionIndex","visit_PrimitiveType","visit_Profile","observe_Profile","observe_Enumeration","observe_Measure","observe_Class","visit_Association","observe_Association","visit_ConcreteFunctionDefinition","observe_ConcreteFunctionDefinition","visit_FlatData","visit_Database","visit_Mapping","visit_Service","visit_PackageableRuntime","visit_PackageableConnection","visit_FileGenerationSpecification","visit_GenerationSpecification","visit_DataElement","packageableElement","_observe_Abstract_Package","child","observe_TagReference","tag","observe_GenericType","observe_GenericTypeReference","observe_Section","observe_Stereotype","observe_Tag","p_stereotypes","p_tags","observe_Enum","observe_Unit","observe_Property","observe_DerivedProperty","observe_Constraint","functionDefinition","externalId","enforcementLevel","messageFunction","functionName","returnMultiplicity","expressionSequence","returnType","observe_Type","observe_PositionedRectangle","_dummyObservable","observe_ClassViewReference","observe_ClassView","hideProperties","hideTaggedValues","hideStereotypes","observe_RelationShipEdgeView","classView","observe_RelationshipView","pathForSerialization","observe_GeneralizationView","observe_AssociationView","observe_PropertyView","observe_Diagram","classViews","associationViews","generalizationViews","propertyViews","DIAGRAM_HASH_STRUCTURE","DIAGRAM","PURE_GRAMMAR_DIAGRAM_ELEMENT_TYPE_LABEL","DSL_Diagram_PureGraphManagerPlugin","getExtraPureGrammarParserNames","getExtraPureGrammarKeywords","getExtraPureGrammarElementLabelers","V1_PackageableElement","V1_Diagram","V1_PositionedRectangle","rectangle","position","POSITIONED_RECTANGLE","V1_ClassView","CLASS_VIEW","V1_Point","x","y","POINT","V1_Rectangle","width","height","RECTANGLE","V1_Line","points","V1_RelationshipView","sourceView","targetView","line","RELATIONSHIP_VIEW","V1_PropertyHolderView","PROPERTY_HOLDER_VIEW","V1_PropertyView","PROPERTY_VIEW","V1_GeneralizationView","GENERALIZATION_VIEW","sourceId","startLine","startColumn","endLine","endColumn","V1_multiplicitySchema","V1_PropertyPointer","V1_RawValueSpecification","V1_RawExecutionContext","queryTimeOutInSeconds","enableConstraints","V1_RawExecutionContextType","V1_RawValueSpecificationType","_type","BASE_EXECUTION_CONTEXT","V1_rawLambdaModelSchema","visit_Lambda","LAMBDA","V1_rawVariableModelSchema","visit_Variable","visit_PrimitiveInstanceValue","CINTEGER","CDECIMAL","CSTRING","CBOOLEAN","CFLOAT","CDATETIME","CSTRICTDATE","CSTRICTTIME","CLATESTDATE","V1_propertyPointerModelSchema","V1_stereotypePtrSchema","profile","V1_tagPtrSchema","V1_taggedValueSchema","V1_enumValueSchema","tags","INTERNAL__forceReturnEmptyInTest","v","V1_unitSchema","V1_propertySchema","aggregation","V1_derivedPropertySchema","V1_constraintSchema","V1_DIAGRAM_ELEMENT_PROTOCOL_TYPE","superTypes","originalMilestonedProperties","preConstraints","postConstraints","pointModelSchema","recantagleModelSchema","lineModelSchema","classViewModelSchema","propertyViewModelSchema","generalizationViewModelSchema","V1_diagramModelSchema","PureProtocolProcessorPlugin","extractElementNameFromPath","fullPath","findLast","extractPackagePathFromPath","lastIndexOf","resolvePackagePathAndElementName","defaultPath","index","createPath","packagePath","addElementToPackage","parent","deleteElementFromPackage","_getOrCreatePackage","parentPackage","relativePackagePath","createNewPackageIfNotFound","cache","packageName","pkg","cachedPackage","immediateParentPackageRelativePath","cachedParentPackage","getOrCreateGraphPackage","graph","getRawGenericType","getAllSuperclasses","c","visitedClasses","Set","add","resolveSuperTypes","_class","superType","getAllOwnClassProperties","getMultiplicityString","V1_buildFullPath","V1_ElementBuilder","elementClassName","prerequisites","firstPass","secondPass","thirdPass","fourthPass","fifthPass","props","getElementProtocolClass","getPrerequisiteElementProtocolClasses","runFirstPass","elementProtocol","packageCache","elementPathCache","getNullableElement","V1_checkDuplicatedElement","currentSubGraph","runSecondPass","runThirdPass","runFourthPass","runFifthPass","relationshipEdgeViewTransformer","transformPropertyView","isTransformingEmbeddedPropertyMapping","isTransformingLocalPropertyMapping","V1_transformPropertyReference","transformGenerationView","transformClassView","_classView","point","createPoint","createRectangle","Point","Rectangle","PositionedRectangle","center","contains","box","normalizeBox","newBox","ClassView","RelationshipViewEnd","_offsetX","_offsetY","ClassViewReference","ClassViewExplicitReference","RelationshipView","computeEdgeEndpoint","edgeView","allowChange","newX","newY","buildFullPath","startPoint","endPoint","pruneUnnecessaryInsidePoints","PropertyHolderView","PropertyView","GeneralizationView","Vector","unit","norm","Math","sqrt","normal","other","dotProduct","getClassView","diagram","sourceViewId","_relationshipView_setPath","relationshipView","_relationshipView_simplifyPath","newPath","i","v1","fromPoints","v2","dot","angle","acos","PI","abs","rotatePointX","cos","sin","rotatePointY","getBottomRightCornerPoint","pR","buildBottomRightCornerBox","bottomRightCornerPoint","boxSize","boxContains","otherBox","buildPoint","DSL_Diagram_PureProtocolProcessorPlugin","V1_getExtraElementBuilders","setOwnElementInExtension","getOwnNullableExtensionElement","resolveClass","buildRectangle","V1_buildClassView","propertyView","sourceClassView","targetClassView","resolveOwnProperty","V1_buildPropertyView","generalizationView","V1_buildGeneralizationView","V1_getExtraElementClassifierPathGetters","V1_getExtraElementProtocolSerializers","V1_getExtraElementProtocolDeserializers","V1_getExtraElementTransformers","protocolElement","V1_transformDiagram","PureGraphPlugin","DSL_Diagram_PureGraphPlugin","getExtraPureGraphExtensionClasses","getExtraDeadReferencesCleaners","getExtensionForElementClass","cv","getNullableClass","cw","g","targetClass","cleanUpDeadReferencesInDiagram","DSL_Diagram_GraphManagerPreset","LegendCustomMUITheme","createTheme","transitions","LegendStyleProvider","StyledEngineProvider","injectFirst","ThemeProvider","generateSimpleDIVComponent","componentName","divClassName","component","className","clsx","displayName","Modal","darkMode","ModalTitle","icon","ModalHeader","ModalBody","ModalFooter","getActionButtonClassName","PROCEED_WITH_CAUTION","PROCEED","ActionAlertContent","prompt","onClose","onEnter","handleClose","Dialog","TransitionProps","onSubmit","preventDefault","default","handler","onClick","autoFocus","ActionAlert","PanelLoadingIndicator","isLoading","ref","useRef","useEffect","current","parentElement","classList","BlockingAlert","classes","container","showLoading","NotificationManager","isExpanded","setIsExpanded","useState","notificationIcon","handleCopy","copyTextToClipboard","anchorOriginBottomRight","anchorOrigin","vertical","horizontal","reason","tabIndex","KEYBOARD_NAMED_KEY","BaseMenu","otherProps","paper","list","transitionDuration","ContextMenu","menuProps","disabled","onOpen","contextMenuRoot","anchorEl","setAnchorEl","left","setLeft","top","setTop","stopPropagation","onContextMenu","containerRect","getBoundingClientRect","containerLeft","scrollX","documentElement","scrollLeft","containerTop","scrollY","scrollTop","clientX","clientY","eventTarget","elementsFromPoint","anchorPosition","anchorReference","BackdropProps","invisible","disableRestoreFocus","MenuContent","forwardRef","MenuContentItem","MenuContentDivider","MarkdownTextViewer","remarkPlugins","BlankPanelContent","contentRef","contentWidth","contentHeight","refreshMode","refreshRate","refreshOptions","trailing","showContent","setShowContent","containerRef","containerWidth","containerHeight","DEFAULT_CONTENT_PADDING","BasePopover","BaseRadioGroup","targetOptionsValuesInMatrix","stepSize","matrix","transformToMatrix","row","op","FormControlLabel","control","Radio","LEGEND_APPLICATION_DOCUMENTATION_KEY","TextSearchAdvancedConfigMenu","configState","QUESTION_HOW_TO_USE_ADVANCED_SEARCH_SYNTAX","onChange","searchMode","VirtualAssistantDocumentationEntryViewer","toggleExpand","logEvent_VirtualAssistantDocumentationEntryAccessed","copyDocumentationKey","elevation","rel","VirtualAssistantContextualSupportPanel","contextualEntry","copyContextIDToClipboard","copyCurrentContextIDToClipboard","copyContextStackToClipboard","VirtualAssistantSearchPanel","searchInputRef","searchConfigButtonRef","debouncedSearch","useMemo","debounce","focus","querySelectorAll","activeElement","spellCheck","placeholder","VirtualAssistantPanel","triggerElement","hideBackdrop","PaperProps","disableEnforceFocus","transformOrigin","onKeyDown","CONTEXTUAL_SUPPORT","VirtualAssistant","isDragging","setIsDragging","_key","_setKey","assistantRef","bounds","onStart","onStop","handle","APP_CONTAINER_ID","APP_BACKDROP_CONTAINER_ID","PLATFORM_NATIVE_KEYBOARD_SHORTCUTS","BackdropContainer","elementID","LegendApplicationComponentFrameworkProvider","backdropContainer","keyBindingMap","handlerCreator","combinations","buildReactHotkeysConfiguration","onKeyEvent","possibleMatches","timer","KeyboardEvent","combination","parsedKeyCombination","press","modifiers","remainingExpectedKeyPresses","currentExpectedKeyPress","matches","combinationData","code","every","modifier","getModifierState","SHIFT","META","ALT","CONTROL","isMatchingKeyCombination","clearTimeout","clear","bind","createKeybindingsHandler","Portal","Backdrop","DndProvider","backend","LegendPureIDEBaseStore","LegendPureIDEBaseStoreContext","LegendPureIDEBaseStoreProvider","ACTIVITY_MODE","AUX_PANEL_MODE","moveCursorToPosition","editor","hasTextFocus","revealPositionInCenter","setPosition","INTERNAL__DUMMY_PROBLEM_MARKER_OWNER","ConceptType","ConceptAttribute","pureId","pureType","pureName","PackageConceptAttribute","deprecated","PropertyConceptAttribute","RO","classPath","file","ElementConceptAttribute","notpublic","user","ConceptNode","li_attr","getNodeAttribute","trimPathLeadingSlash","startsWith","File","setContent","FileCoordinate","FileErrorCoordinate","FIND_USAGE_FUNCTION_PATH","getConceptInfoLabel","usageConcept","Usage","source","PackageableElementUsage","first","second","TabState","tab","TabManagerState","currentTab","tabs","setCurrentTab","closeTab","closeAllTabs","closeAllOtherTabs","openTab","swapTabs","tab1","tab2","currIndex","openIndex","EditorTabState","editorStore","EditorTabManagerState","dndType","LEGEND_PURE_IDE_COMMAND_KEY","LEGEND_PURE_IDE_COMMAND_CONFIG","SEARCH_FILE","SEARCH_TEXT","GO_TO_FILE","TOGGLE_AUX_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","REVEAL_CONCEPT_IN_TREE","GO_TO_DEFINITION","GO_BACK","FIND_USAGES","RENAME_CONCEPT","GO_TO_LINE","FileTextEditorState","model","_dummyCursorObservable","language","viewState","forcedCursorPosition","wrapText","fileEditorState","cursorObserver","notifyCursorObserver","setViewState","setEditor","setForcedCursorPosition","setWrapText","filePath","PURE","JAVA","MARKDOWN","SQL","YAML","GRAPHQL","TEXT","getFileEditorLanguage","updateOptions","getPosition","selection","getSelection","oldVal","wordWrap","FileEditorRenameConceptState","concept","coordinate","coordiate","FileEditorState","textEditorState","renameConceptState","showGoToLinePrompt","setFile","setShowGoToLinePrompt","setConceptToRenameState","getConceptInfo","showError","editorModel","errors","ownerId","startLineNumber","endLineNumber","MarkerSeverity","clearError","registerCommands","tabManagerState","currentPosition","fl","executeNavigation","lineNumber","navigateBack","revealConceptInTree","findUsages","newName","usages","findConceptUsages","ENUM_VALUE","ENUM","QUALIFIED_PROPERTY","ELEMENT","renameConcept","deregisterCommands","TreeState","treeData","selectedNode","loadInitialDataState","refreshDataState","initialize","expandNode","openNode","refreshTreeData","setTreeData","setSelectedNode","getTreeData","buildTreeData","getRootNodes","node","isSelected","refreshTree","nodes","childrenIds","childNodes","getChildNodes","processChildNodes","openingNodeIds","selectedNodeId","nodesToOpen","rootIds","refreshOpenNodes","childId","DirectoryAttribute","FileDirectoryAttribute","statusType","FolderDirectoryAttribute","repo","DirectoryNode","isFolderNode","isFileNode","getParentPath","trimmedPath","isFilePath","pathToId","DirectoryTreeState","nodeForCreateNewFile","nodeForCreateNewDirectory","nodeForRenameFile","setNodeForCreateNewFile","setNodeForCreateNewDirectory","setNodeForRenameFile","revealPath","getDirectoryChildren","rootNodes","childNode","loadFile","forceOpenDirectoryTreePanel","setActiveActivity","FILE","keepShowingIfMatchedCurrent","paths","currentPath","unshift","_path","fileNode","ConceptTreeState","loadConceptActivity","nodeForRenameConcept","nodeForMoveElement","setStatusText","setNodeForRenameConcept","setNodeForMoveElement","pullConceptsActivity","pollConceptsActivity","getConceptChildren","loadDiagram","Number","parseInt","getConceptActivity","initializing","elementNodeAttributes","destinationPackage","elementsUsage","getPackageableElementsUsage","attr","usage","inputs","elementInfo","sourcePackage","movePackageableElements","oldName","childElementsInfo","getChildPackageableElements","newPackage","InitializationResult","cached","datamarts","InitializationFailureResult","sessionError","InitializationFailureWithSourceResult","ExecutionResult","reinit","ExecutionSuccessResult","modifiedFiles","ExecutionFailureResult","GetConceptJumpTo","GetConceptResult","jumpTo","CandidateWithPackageImported","sourceID","foundName","CandidateWithPackageNotImported","messageToBeModified","fileToBeModified","lineToBeModified","columnToBeModified","UnmatchedFunctionResult","candidateName","candidatesWithPackageImported","candidatesWithPackageNotImported","UnmatchedResult","candidates","TestAttribute","parentId","TestInfo","TestExecutionResult","count","filterPaths","relevantTestsOnly","runnerId","SearchEntry","SearchResultPreview","before","found","after","SearchResultCoordinate","preview","SearchResultEntry","coordinates","dismissCoordinate","setCoordinates","SearchState","SearchResultState","searchEntries","numberOfFiles","numberOfResults","dismissSearchEntry","setSearchState","TextSearchResultState","UsageResultState","references","searchResultCoordinates","fileMap","f1","f2","c1","c2","UnmatchedFunctionExecutionResultState","UnmatchExecutionResultState","TestResultStatus","TestSuiteStatus","TestResultType","TestResult","TestSuccessResult","TestFailureResultError","TestFailureResult","AbstractTestRunnerCheckResult","TestRunnerCheckResult","finished","TestRunnerCheckError","TestResultInfo","_START_TIME","total","time","passedTests","failedTests","testsWithError","notRunTests","results","allTestIds","passed","failed","passedTestIds","failedTestIds","testWithErrorIds","notRunTestIds","numberOfTestsRun","runPercentage","suiteStatus","setTime","addResult","floor","PASSED","NONE","testId","TestRunnerState","testExecutionResult","checkTestRunnerState","testResultInfo","allTests","selectedTestId","treeBuildingState","viewAsList","setViewAsList","setSelectedTestId","setTestResultInfo","collapseTree","expandTree","buildTreeDataByLayer","pullTestRunnerResult","buildTestTreeData","pollTestRunnerResult","rerunTestSuite","cancelTestRun","childLevelTests","parentNode","testInfo","checkTestRunner","testResult","testRunState","executeTests","cancelTestRunner","CommandResult","CommandFailureResult","errorDialog","PureClient","networkClient","userId","sessionId","compilerMode","requestCache","fastCompile","getInitializationActivity","getFile","param","execute","openFiles","extraParams","post","getExecutionActivity","findFiles","isRegExp","regex","isCaseSensitive","string","caseSensitive","getTextSearchPreview","testRunnerId","getUsages","put","MULTIPLE_PATHS","updateSource","updateInputs","createFile","createFolder","renameFile","oldPath","deleteDirectoryOrFile","getDiagramInfo","diagramPath","getDiagramClassInfo","PanelDisplayState","_initialDefaultSize","_tempSize","defaultSize","snapSize","maxSize","initial","snap","isMaximizable","isMaximized","setSize","toggle","setMaxSize","maximize","minimize","toggleMaximize","max","min","AggregationKind","GenericTypeReference","PropertyReference","PropertyExplicitReference","AssociationView","ASSOCIATION_VIEW","stub_Class","stub_Property","packageableElementReference_setValue","class_addProperty","class_addSuperType","sourceProperty","targetProperty","sourceConstraint","targetConstraint","setGenericTypeReferenceValue","sourceSuperType","targetSuperType","diagram_setClassViews","_property","sV","annotatedElement","taggedValue","_tag","sourceTaggedValue","targetTaggedValue","sourceStereotype","targetStereotype","_constraint","lambda","sourceTag","targetTag","_func","sourceParameter","targetParameter","sourceEnum","targetEnum","otherProperty","p","getOtherAssociatedProperty","otherPropertyAssociatedClass","_genType","_measure","diagram_addClassView","diagram_deleteClassView","diagram_setAssociationViews","diagram_deleteAssociationView","diagram_setGeneralizationViews","diagram_addGeneralizationView","diagram_deleteGeneralizationView","diagram_setPropertyViews","diagram_addPropertyView","diagram_deletePropertyView","classView_setHideProperties","classView_setHideStereotypes","classView_setHideTaggedValues","relationshipEdgeView_setOffsetX","r","relationshipEdgeView_setOffsetY","relationshipView_changePoint","newVal","oldEntry","changeEntry","relationshipView_simplifyPath","findOrBuildPoint","zoom","pt","u","lx","hx","ly","hy","relationshipView_setPath","positionedRectangle_setRectangle","positionedRectangle_setPosition","positionedRectangle_forceRefreshHash","DIAGRAM_INTERACTION_MODE","DIAGRAM_RELATIONSHIP_EDIT_MODE","DIAGRAM_ALIGNER_OPERATOR","MIN_ZOOM_LEVEL","DIAGRAM_ZOOM_LEVELS","getPropertyDisplayName","DiagramRenderer","isReadOnly","div","canvas","canvasDimension","canvasCenter","virtualScreen","screenOffset","interactionMode","relationshipMode","triangle","diamond","fontFamily","fontSize","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","leftClick","middleClick","rightClick","clickX","clickY","positionBeforeLastMove","onAddClassViewClick","onClassViewRightClick","onBackgroundDoubleClick","onClassViewDoubleClick","onClassNameDoubleClick","onClassPropertyDoubleClick","handleEditClassView","handleEditProperty","handleAddSimpleProperty","changeMode","setIsReadOnly","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","refreshCanvas","drawScreen","clearScreen","fillStyle","fillRect","manageVirtualScreen","drawAll","autoRecenter","editMode","PAN","ZOOM_IN","ZOOM_OUT","ADD_CLASS","ADD_RELATIONSHIP","INHERITANCE","generalization","gview","pView","ALIGN_LEFT","leftBound","reduce","MAX_SAFE_INTEGER","ALIGN_CENTER","ALIGN_RIGHT","rightBound","ALIGN_TOP","topBound","ALIGN_MIDDLE","middle","ALIGN_BOTTOM","bottomBound","SPACE_HORIZONTALLY","sorted","previousView","currentView","spacings","averageSpacing","distance","SPACE_VERTICALLY","truncateTextWithEllipsis","canvasCoordinateToModelCoordinate","modelCoordinateToCanvasCoordinate","eventCoordinateToCanvasCoordinate","divPosition","canvasCoordinateToEventCoordinate","hasPropertyView","xPosition","yPosition","offsetParent","offsetLeft","clientLeft","offsetTop","clientTop","getElementPosition","firstClassView","minX","minY","maxX","maxY","relationshipViews","drawLinePropertyText","executeZoom","newZoomLevel","canvasZoomCenterPosition","currentZoomLevel","zoomPoint","zoomLevel","zoomCenter","zoomToFit","FIT_ZOOM_PADDING","addClassView","addedClass","classViewModelCoordinate","existingIds","newClassView","drawClassView","drawBoundingBox","lineWidth","strokeRect","drawDiagram","associationView","drawPropertyOrAssociation","drawInheritance","drawCanvasGrid","drawScreenGrid","startX","startY","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","taggedValueTxt","taggedValueWidth","propertyTextMeasure","cursorY","classNameText","yLineCoord","drawLinePropertyNameAndMultiplicity","textPositionX","textPositionY","multiplicityPositionX","multiplicityPositionY","multiplictyString","textSize","mulSize","posX","posY","propertyPosition","mulPosX","mulPosY","multiplicityPosition","viewSide","endX","endY","rect","toProperty","resultX","resultY","COMPOSITE","SHARED","atan","fill","inheritance","reorderDiagramDomain","firstClass","newClasses","potentiallyShiftRelationships","newMovingDeltaX","newMovingDeltaY","recenter","switchToZoomMode","switchToViewMode","switchToPanMode","switchToAddPropertyMode","switchToAddInheritanceMode","switchToAddClassMode","ejectProperty","selectionPoint","dispatchEvent","altKey","getSuperTypeLevels","res","layoutTaxonomy","gv","eventPointInModelCoordinate","nextZoomLevel","ceil","selectedClass","eventPointInCanvasCoordinate","button","anyClassesSelected","oldPos","stopImmediatePropagation","deltaY","deltaX","selectedClassOldPosition","newMovingX","newMovingY","selectionStartPointInCanvasCoordinate","selectionBoxWidth","selectionBoxHeight","reverse","classNameWidth","propertyHolderViews","propertyHolderView","currentDepth","recurseMaxDepth","generation","rec","classViewLevels","positionInitialClass","levels","currentLevelIndex","precedentTotalWidth","precedentTotalHeight","precedentX","precedentY","precedent","precedentByX","precedentByY","maxHeight","currentLevelY","fromClassView","toClassView","TagReference","StereotypeReference","StereotypeExplicitReference","Association","Mapping","st","Service","FunctionDefinition","ConcreteFunctionDefinition","Store","FlatData","include","PackageableRuntime","PackageableConnection","AbstractGenerationSpecification","FileGenerationSpecification","GenerationSpecification","findGenerationElementById","fileGeneration","Database","PureGraphExtension","getElementClass","getElement","setElement","deleteElement","renameElement","DataElement","FORBIDDEN_EXTENSION_ELEMENT_CLASS","BasicModel","elementSectionIndex","sectionIndicesIndex","profilesIndex","typesIndex","associationsIndex","functionsIndex","storesIndex","mappingsIndex","connectionsIndex","runtimesIndex","servicesIndex","generationSpecificationsIndex","fileGenerationsIndex","dataElementsIndex","rootPackageName","extensionElementClasses","createGraphExtensions","extensionElementClass","ownSectionIndices","ownProfiles","ownEnumerations","ownMeasures","ownClasses","ownTypes","ownAssociations","ownFunctions","ownStores","ownFlatDatas","ownDatabases","ownMappings","ownServices","ownRuntimes","ownConnections","ownFileGenerations","ownDataElements","ownGenerationSpecifications","ownTestables","getExtensionElements","extension","getOwnNullableSection","getOwnNullableSectionIndex","getOwnNullableProfile","getOwnNullableType","getOwnNullableClass","el","getOwnNullableEnumeration","getOwnNullableMeasure","getOwnNullableAssociation","getOwnNullableFunction","getOwnNullableStore","getOwnNullableMapping","getOwnNullableConnection","getOwnNullableRuntime","getOwnNullableService","getOwnNullableGenerationSpecification","getOwnNullableFileGeneration","getOwnNullableDataElement","getOwnSectionIndex","getOwnProfile","getOwnType","getOwnClass","getOwnEnumeration","getOwnMeasure","getOwnAssociation","getOwnFunction","getOwnStore","getOwnDatabase","getOwnFlatDataStore","getOwnMapping","getOwnConnection","getOwnRuntime","getOwnService","getOwnGenerationSpecification","getOwnFileGeneration","getOwnDataElement","setOwnSection","setOwnSectionIndex","setOwnProfile","setOwnType","setOwnAssociation","setOwnFunction","setOwnStore","setOwnMapping","setOwnConnection","setOwnRuntime","setOwnService","setOwnGenerationSpecification","setOwnFileGeneration","setOwnDataElement","allOwnElements","getNullablePackage","getOwnNullableElement","includePackage","extensionElement","addOwnElement","deleteOwnElement","renameOwnElement","newPackagePath","newElementName","newParentPackage","getFunctionSignature","childElements","childElement","currentParentPackage","childElementOriginalPath","TEMPORARY__deleteOwnSectionIndex","sectionIndex","DependencyModel","buildDependencyElementGetter","dependencyManager","elementGetter","dependencyGraph","dependencyGraphs","DependencyManager","projectDependencyModelsIndex","dependencyEntitiesIndex","dependencyKey","hasDependencies","dep","sectionIndices","profiles","enumerations","measures","types","associations","functions","databases","services","runtimes","dataElements","generationSpecifications","getModel","ModelStore","NAME","CoreModel","primitiveTypesIndex","primitiveTypes","initializePrimitiveTypes","INSTANCE","primitiveType","SystemModel","autoImports","initializeAutoImports","_package","GenerationModel","PureModel","coreModel","systemModel","generationModel","graphPlugins","allElements","allOwnTestables","extraTestables","getExtraTestablesCollectors","collector","getPrimitiveType","getType","getProfile","getEnumeration","getMeasure","getUnit","getAssociation","getPropertyOwner","getFunction","getStore","getFlatDataStore","getDatabase","getMapping","getService","getConnection","getRuntime","getGenerationSpecification","getFileGeneration","getDataElement","getExtensionElement","notFoundErrorMessage","getNullableMapping","getNullableService","getNullableRuntime","getNullableFileGeneration","getMultiplicity","addElement","deadReferencesCleaners","cleaner","SourceInformation","TEMPORARY__diagramInfoSourceInformationSerializationSchema","PURE__Profile","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","PURE__GeneralizationView","geometry","PURE__PropertyViewPropertyPointer","owningType","PURE__PropertyView","PURE__TypeView","rectangleGeometry","PURE__Diagram","typeViews","DiagramDomainInfo","DiagramInfo","domainInfo","DiagramClassInfo","specializations","serializeDiagram","toFixed","pos","pv","getOrCreateClass","diagramClasses","existingClass","isStubbed","parseMultiplicty","parts","buildClass","classData","taggedValueData","stereotypeData","superTypeData","superClass","propertyData","newProperty","buildGraphFromDiagramInfo","diagramInfo","domain","profileData","enumerationData","diagramData","typeViewData","propertyViewData","propertyOwner","pointData","generationViewData","DiagramEditorState","_renderer","fileLine","fileColumn","diagramName","diagramCursorClass","rebuild","setRenderer","renderer","isDiagramRendererInitialized","setupRenderer","diagramClassInfo","profilePath","enumerationPath","isCurrentlyStubbed","subTypePointer","currentClass","subClass","addClassToGraph","existingNames","maxCounter","matchingCount","groups","num","generateEnumerableNameFromToken","DEFAULT_TRIGGER","SearchCommandState","setText","setCaseSensitive","setRegExp","toggleCaseSensitive","toggleRegExp","ExecutionError","EditorStore","initState","directoryTreeState","conceptTreeState","isMaxAuxPanelSizeSet","activeAuxPanelMode","CONSOLE","auxPanelDisplayState","activeActivity","CONCEPT","sideBarDisplayState","executionState","navigationStack","consoleText","fileSearchCommandLoadingState","fileSearchCommandState","openFileSearchCommand","fileSearchCommandResults","textSearchCommandLoadingState","textSearchCommandState","openTextSearchCommand","testRunnerState","setOpenFileSearchCommand","setOpenTextSearchCommand","setActiveAuxPanelMode","setConsoleText","setTestRunnerState","pullInitializationActivity","pullExecutionStatus","checkIfSessionWakingUp","reloadFile","executeGo","manageExecuteGoResult","executeFullTestSuite","executeSaveAndReset","fullReCompile","refreshTrees","updateFileUsingSuggestionCandidate","updateFile","searchFile","createNewDirectory","createNewFile","cleanUp","fullInit","initializationPromise","openWelcomeFilePromise","directoryTreeInitPromise","conceptTreeInitPromise","activity","editorState","tabsToClose","checkExecutionStatus","manageResult","openedFiles","executionPromise","WAIT_TIME_TO_TRIGGER_STATUS_CHECK","executionPromiseResult","executionPromiseFinished","PureUnmatchedFunctionException","avoidUpdatingConsoleText","executing","refreshTreesPromise","SEARCH_RESULT","TEST_RUNNER","CAUTION","errorMessage","currentNode","cmd","sourceInformations","potentiallyModifiedFiles","candidate","getSearchResultEntry","isDirectory","hasChildContent","_delete","EditorStoreContext","EditorStoreProvider","useEditorStore","Console","SearchResultEntryDisplay","searchEntry","goToResult","replaceAll","TextSearchResultDisplay","UsageResultDisplay","usageState","CandidateWithPackageImportedDisplay","CandidateWithPackageNotImportedDisplay","UnmatchedFunctionExecutionResultDisplay","UnmatchExecutionResultDisplay","SearchPanel","DefaultTreeNodeContainer","stepPaddingInRem","classPrefix","onNodeSelect","paddingLeft","DefaultTreeNodeView","components","innerProps","defaultTreeComponents","TreeNodeView","TreeNodeContainer","treeComponents","TreeView","rootId","ResizablePanelGroup","RESIZABLE_COLLAPSED_PANEL_CLASS_NAME","getCollapsiblePanelGroupProps","minimizeCondition","collapsiblePanel","onStartResize","handleProps","domElement","onStopResize","flexGrow","flex","remainingPanel","ResizablePanel","ResizablePanelSplitter","ResizablePanelSplitterLine","background","color","TestTreeNodeContainer","onNodeOpen","onNodeExpand","onNodeCompress","renderNodeLabel","isExpandable","nodeIcon","RUNNING","getTestResultById","getTestTreeNodeStatus","toggleExpansion","onDoubleClick","TestRunnerList","TestRunnerTree","isEmptyTree","TestResultViewer","TestRunnerResultDisplay","numberOfTests","overallResult","orientation","minSize","bar","variant","TestRunnerPanel","AuxiliaryPanel","auxTabMap","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","PROFILE","CLASS","ASSOCIATION","ENUMERATION","MEASURE","UNIT","FUNCTION","NATIVE_FUNCTION","DATABASE","MAPPING","IDENTIFIER_PATTERN","PACKAGE_PATH_PATTERN","RenameConceptPrompt","conceptName","isPackage","setValue","inputRef","isValidValue","isSameValue","closeModal","rename","finally","MoveElementPrompt","ConceptExplorerContextMenu","viewConceptSource","nodeType","nodeAttribute","CONCEPT_TREE_DND_TYPE","ConceptTreeNodeContainer","isSelectedFromContextMenu","setIsSelectedFromContextMenu","isAssociationPropertyNode","nodeLabel","dragRef","useDrag","UNSUPPORTED","FileExplorerTree","treeState","ConceptTreeExplorer","FILE_NAME_PATTERN","CreateNewFilePrompt","isUnique","n","DIRECTORY_NAME_PATTERN","CreateNewDirectoryPrompt","FILE_PATH_PATTERN","RenameFilePrompt","FileExplorerContextMenu","isDir","FileTreeNodeContainer","isPlatformDirectory","isChildlessDirectory","DirectoryTreeExplorer","SideBar","renderSideBar","LegendLogo","strokeWidth","viewBox","xmlns","d","ActivityBar","changeActivity","activities","FileEditorStatusBar","currentCursorInfo","selectionLength","getValueInRange","StatusBar","actionsDisabled","POSITION_PATTERN","GoToLinePrompt","currentEditorCursorPosition","currentLine","currentColumn","getPositionFromGoToLinePromptInputValue","isValidLineNumber","getLineCount","GenericFileEditor","textInputRef","newEditor","contextmenu","copyWithSyntaxHighlighting","fontLigatures","fixedOverflowWidgets","bracketPairColorization","enabled","detectIndentation","LEGEND","onDidChangeModelContent","currentVal","getValue","onDidChangeCursorPosition","onDidChangeCursorSelection","setModel","restoreViewState","layout","saveViewState","useCommands","registrar","PureFileEditor","suggestionProviderDisposer","definitionProviderDisposer","isContextMenuOpen","setIsContextMenuOpen","useShadowDOM","_codeEditorService","openCodeEditor","gotoLocation","multiple","multipleDefinitions","alternativeDefinitionCommand","addAction","contextMenuGroupId","contextMenuOrder","run","_editor","textTokens","provideDefinition","lineTokens","currentToken","currentTokenRange","offset","uri","range","triggerCharacters","provideCompletionItems","suggestions","kind","insertTextRules","insertText","getCopyrightHeaderSuggestions","currentWord","getWordUntilPosition","lineTextIncludingWordRange","suggestion","getParserKeywordSuggestions","CONNECTION","RUNTIME","RELATIONAL","suggestionsGetter","textUntilPosition","allParserSectionHeaders","currentParserName","lineText","getSectionParserNameFromLineText","snippetSuggestion","getParserElementSnippetSuggestions","parserKeyword","collectParserElementSnippetSuggestions","extraSnippetSuggestions","getInlineSnippetSuggestions","querySelector","MENU_ITEMS_TO_DISABLE","innerHTML","menuItem","opacity","pointerEvents","DropdownMenu","triggerRef","marginThreshold","DiagramEditorDiagramCanvas","diagramEditorState","diagramCanvasRef","targetRef","handleDrop","useCallback","monitor","dropPosition","getClientOffset","dropConnector","useDrop","drop","DiagramEditorHeader","createCenterZoomer","isAlignerDisabled","DiagramEditorToolPanel","createModeSwitcher","DiagramEditor","PanelEntryDropZonePlaceholder","showPlaceholder","DragPreviewLayer","labelGetter","itemType","useDragLayer","getItemType","getItem","initialOffset","getInitialSourceClientOffset","horizontalToVerticalScroll","currentTarget","scrollBy","TabContextMenu","tabState","managerTabState","Tab","tabRenderer","handleHover","draggingTab","hoveredTab","dragIndex","hoverIndex","hoverBoundingReact","distanceThreshold","right","dragDistance","isBeingDraggedEditorPanel","hover","collect","isBeingDragged","dragConnector","dragPreviewConnector","getEmptyImage","useDragPreviewLayer","onMouseUp","currTab","nativeEvent","TabMenu","TabManager","onWheel","EditPanelSplashScreen","showCommandList","setShowCommandList","EditPanel","showMoreInfo","CustomMenuList","ROW_HEIGHT","getComputedStyle","selectProps","scrollToIndex","isFocused","listRef","scrollToItem","itemCount","itemSize","initialScrollOffset","noMatchMessage","STYLE_PREFIX","STYLE_PREFIX__DARK","LoadingIndicator","DropdownIndicator","ClearIndicator","CustomInput","baseComponents","CustomSelectorInput","option","allowCreating","hasError","SelectComponent","CreatableSelect","Select","stylePrefix","styles","menuPortal","zIndex","menuPortalTarget","isDisabled","classNamePrefix","MenuList","Input","compareLabelFn","FileSearchCommand","loadingOptionsState","selectorRef","onInputChange","cancel","escapeClearsValue","TextSearchCommand","Editor","WrappedComponent","editable","sideBarCollapsiblePanelGroupProps","auxCollapsiblePanelGroupProps","maximizedAuxCollapsiblePanelGroupProps","queryParams","isFullUrl","getQueryParameters","direction","LegendPureIDEApplication","LegendApplicationPlugin","LegendPureIDEApplicationPlugin","Core_LegendPureIDEApplicationPlugin","collectKeyedCommandConfigEntriesFromConfig","LegendPureIDE","application","extraKeywords","extraParsers","keybinding","KeyMod","KeyCode","defaultToken","tokenPostfix","keywords","FILE_GENERATION","GENERATION_SPECIFICATION","DATA_ELEMENT","JSON_MODEL_CONNECTION","MODEL_CHAIN_CONNECTION","XML_MODEL_CONNECTION","SERVICE","FLAT_DATA","FLAT_DATA_CONNECTION","RELATIONAL_DATABASE_CONNECTION","operators","languageStructs","parsers","FLATDATA","FILE_GENERATION_SPECIFICATION","DATA","parser","identifier","symbols","escapes","digits","octaldigits","binarydigits","hexdigits","generics","date","tokenizer","cases","INVALID","KEYWORD","OPERATOR","DELIMITER","STRING","WHITESPACE","number","whitespace","COMMENT","comment","doc","characters","setupPureLanguageService","fontLoadFailureErrorMessage","fonts","load","check","TEXT_EDITOR_FONT_LOADED","APPLICATION_SETUP_FAILURE","enforceActions","setupLegendApplicationUILibrary","rootEl","getElementsByTagName","getRootElement","basename","LegendPureIDEWebApplication","getPresetCollection","getPluginCollection","__importDefault","mod","__esModule","defineProperty","exports","fuse_js_1","enumerable","fa_1","FaCrosshairs","FaTimes","FaTimesCircle","FaPlus","FaCog","FaCaretDown","FaHammer","FaQuestion","FaQuestionCircle","FaInfoCircle","FaCompress","FaMap","FaPlay","FaArrowAltCircleRight","FaShapes","FaSearch","FaList","FaCircle","FaCheckCircle","FaExclamationTriangle","FaBug","FaCircleNotch","FaExpand","FaWrench","FaTerminal","FaFolderOpen","FaFolder","FaExclamationCircle","FaBan","FaFileAlt","FaMapMarkerAlt","FaHatWizard","FaRegLaughWink","FaRegSadTear","FaDatabase","gi_1","GiBeard","GiSunglasses","md_1","MdRefresh","MdSubject","MdViewHeadline","MdAssistant","vsc_1","VscWordWrap","VscGoToFile","VscClose","VscRegex","VscCaseSensitive","go_1","GoChevronDown","GoChevronUp","GoChevronRight","GoX","io5_1","IoFlaskSharp","bs_1","BsGripVertical","BsAlignTop","BsAlignMiddle","BsAlignBottom","BsAlignStart","BsAlignCenter","BsAlignEnd","BsDistributeHorizontal","BsDistributeVertical","bi_1","BiAtom","fi_1","FiPackage","FiMousePointer","FiMove","FiZoomIn","FiZoomOut","tb_1","TbMathFunction","createFilter","creatable_1","react_select_1","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","module","loaded","__webpack_modules__","call","amdO","O","chunkIds","priority","notFulfilled","Infinity","fulfilled","j","getter","getPrototypeOf","ns","def","getOwnPropertyNames","definition","o","f","chunkId","promises","miniCssF","globalThis","prop","prototype","hasOwnProperty","l","done","script","needAttach","scripts","s","getAttribute","charset","timeout","nc","setAttribute","onScriptComplete","prev","onerror","onload","doneFns","head","Symbol","toStringTag","nmd","installedChunks","installedChunkData","promise","errorType","realSrc","webpackJsonpCallback","parentChunkLoadingFunction","moreModules","chunkLoadingGlobal","__webpack_exports__"],"sourceRoot":""}