@finos/legend-application-repl-deployment 12.12.0 → 12.14.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/repl/index.html +1 -1
- package/dist/repl/static/index.875bbafc.js +45 -0
- package/dist/repl/static/index.875bbafc.js.map +1 -0
- package/dist/repl/static/{index.1805d244.css → index.f6ff6809.css} +4 -4
- package/dist/repl/static/{index.1805d244.css.map → index.f6ff6809.css.map} +1 -1
- package/dist/repl/version.json +1 -1
- package/package.json +5 -5
- package/dist/repl/static/index.2627a85e.js +0 -45
- package/dist/repl/static/index.2627a85e.js.map +0 -1
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"static/index.875bbafc.js","mappings":"uBAAIA,ECCAC,EADAC,E,kHCmBOC,E,UCHJ,MAAMC,EACTC,KACAC,QACAC,UACAC,KAEG,MAAM,EACTH,KACAC,QACAE,MAAO,SACP,WAAAC,CAAYJ,EAAMC,GACdI,KAAKL,KAAOA,EACZK,KAAKJ,QAAUA,CACnB,CACA,OAAAK,GACI,OAAOD,KAAKL,IAChB,CACA,UAAAO,GACI,OAAOF,KAAKJ,OAChB,CACA,YAAAO,GACI,MAAO,GAAGH,KAAKC,aAAaD,KAAKE,cACrC,CACA,OAAAE,GACI,OAAOJ,KAAKF,IAChB,CACA,OAAAO,GACI,MAAMC,EAAO,IAAIZ,EAKjB,OAJAY,EAAKX,KAAOK,KAAKC,UACjBK,EAAKV,QAAUI,KAAKE,aACpBI,EAAKT,UAAYG,KAAKG,eACtBG,EAAKR,KAAOE,KAAKI,UACVE,CACX,CACA,SAAAC,CAAUC,GACN,OAAOR,IACX,EAoDG,MAAMS,EACTC,QAAU,GACVC,QAAU,GACV,UAAAC,CAAWF,GAEP,OADAV,KAAKU,QAAUA,EACRV,IACX,CACA,UAAAa,CAAWF,GAEP,OADAX,KAAKW,QAAUA,EACRX,IACX,CACA,SAAAO,CAAUC,GACNM,OAAOC,KAAKP,GAAYQ,SAASC,IAC7B,MAAMC,EAAYV,EAAWS,GAC7BjB,KAAKW,QAAQ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,EAC3B,GAAG4lE,EAAStoE,MAAMxe,GAAgC,IAAxB4oF,EAAgB5oF,KAAa,CACtD,IAAIomF,KAAY4C,EACZ7C,EAAoB4B,EAAEiB,EAAa5C,KACrCD,EAAoBQ,EAAEP,GAAY4C,EAAY5C,IAGhD,GAAGr+C,EAAS,IAAItiC,EAASsiC,EAAQo+C,EAClC,CAEA,IADG4C,GAA4BA,EAA2BxyF,GACrD2qB,EAAI4lE,EAASrvF,OAAQypB,IACzB2nE,EAAU/B,EAAS5lE,GAChBilE,EAAoB4B,EAAEa,EAAiBC,IAAYD,EAAgBC,IACrED,EAAgBC,GAAS,KAE1BD,EAAgBC,GAAW,EAE5B,OAAO1C,EAAoBU,EAAEphF,EAAO,EAGjCwjF,EAAqBd,WAAkE,sDAAIA,WAAkE,uDAAK,GACtKc,EAAmBv0F,QAAQo0F,EAAqB70E,KAAK,KAAM,IAC3Dg1E,EAAmBpkF,KAAOikF,EAAqB70E,KAAK,KAAMg1E,EAAmBpkF,KAAKoP,KAAKg1E,G,KChDvF9C,EAAoB+C,QAAKnxF,ECGzB,IAAIoxF,EAAsBhD,EAAoBU,OAAE9uF,EAAW,CAAC,MAAM,IAAOouF,EAAoB,QAC7FgD,EAAsBhD,EAAoBU,EAAEsC,E","sources":["webpack://@finos/legend-application-repl-deployment/webpack/runtime/chunk loaded","webpack://@finos/legend-application-repl-deployment/webpack/runtime/create fake namespace object","webpack://@finos/legend-application-repl-deployment/../legend-shared/lib/log/LogService.js","webpack://@finos/legend-application-repl-deployment/../legend-shared/lib/application/AbstractPluginManager.js","webpack://@finos/legend-application-repl-deployment/../legend-shared/lib/log/WebConsole.js","webpack://@finos/legend-application-repl-deployment/../legend-shared/lib/CommonUtils.js","webpack://@finos/legend-application-repl-deployment/../legend-shared/lib/error/ErrorUtils.js","webpack://@finos/legend-application-repl-deployment/../legend-shared/lib/error/AssertionUtils.js","webpack://@finos/legend-application-repl-deployment/../legend-shared/lib/network/NetworkUtils.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/__lib__/LegendApplicationEvent.js","webpack://@finos/legend-application-repl-deployment/../legend-shared/lib/application/SerializationUtils.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/stores/DocumentationService.js","webpack://@finos/legend-application-repl-deployment/../legend-shared/lib/application/ActionState.js","webpack://@finos/legend-application-repl-deployment/../legend-shared/lib/network/TracerService.js","webpack://@finos/legend-application-repl-deployment/../legend-shared/lib/search/FuzzySearch.js","webpack://@finos/legend-application-repl-deployment/../legend-shared/lib/search/FuzzySearchAdvancedConfigState.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/stores/AssistantService.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/stores/event/EventService.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/__lib__/LegendApplicationTelemetry.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/stores/ApplicationNavigationContextService.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/stores/CommandService.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/stores/KeyboardShortcutsService.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/stores/ApplicationConfig.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/stores/terminal/Terminal.js","webpack://@finos/legend-application-repl-deployment/../legend-shared/lib/format/FormatterUtils.js","webpack://@finos/legend-application-repl-deployment/../legend-shared/lib/keyboard/KeyBinding.js","webpack://@finos/legend-application-repl-deployment/../legend-art/lib/utils/LegendStyleProvider.js","webpack://@finos/legend-application-repl-deployment/../legend-art/lib/utils/ComponentCreatorUtils.js","webpack://@finos/legend-application-repl-deployment/../legend-art/lib/dialog/Modal.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/stores/AlertService.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/components/ApplicationStoreProvider.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/components/ActionAlert.js","webpack://@finos/legend-application-repl-deployment/../legend-art/lib/layout/PanelLoadingIndicator.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/components/BlockingAlert.js","webpack://@finos/legend-application-repl-deployment/../legend-art/lib/icon/Icon.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/stores/NotificationService.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/components/NotificationManager.js","webpack://@finos/legend-application-repl-deployment/../legend-art/lib/menu/BaseMenu.js","webpack://@finos/legend-application-repl-deployment/../legend-art/lib/menu/ContextMenu.js","webpack://@finos/legend-application-repl-deployment/../legend-art/lib/menu/MenuContent.js","webpack://@finos/legend-application-repl-deployment/../legend-art/lib/markdown/MarkdownTextViewer.js","webpack://@finos/legend-application-repl-deployment/../legend-art/lib/layout/BlankPanelContent.js","webpack://@finos/legend-application-repl-deployment/../legend-art/lib/radio-group/BaseRadioGroup.js","webpack://@finos/legend-application-repl-deployment/../legend-art/lib/popover/BasePopover.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/__lib__/LegendApplicationDocumentation.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/components/VirtualAssistant.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/components/ApplicationComponentFrameworkProvider.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/stores/terminal/XTerm.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/stores/TerminalService.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/stores/IdentityService.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/__lib__/LegendApplicationColorTheme.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/stores/storage/ApplicationStorage.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/stores/storage/StorageService.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/stores/TelemetryService.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/stores/TimeService.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/__lib__/LegendApplicationSetting.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/stores/LayoutService.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/stores/ClipboardService.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/stores/navigation/NavigationService.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/stores/SettingService.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/stores/navigation/DefaultNavigator.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/stores/UserDataService.js","webpack://@finos/legend-application-repl-deployment/../legend-shared/lib/compare/StringCompareUtil.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/stores/ReleaseNotesService.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/stores/ApplicationStore.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/util/DownloadHelperServiceWorker.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/application/LegendApplication.js","webpack://@finos/legend-application-repl-deployment/../legend-shared/lib/format/MatcherUtils.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/stores/LegendApplicationPlugin.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/stores/Core_LegendApplicationPlugin.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/application/LegendApplicationConfig.js","webpack://@finos/legend-application-repl-deployment/../legend-application-repl/lib/application/LegendREPLApplicationConfig.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/application/LegendApplicationPluginManager.js","webpack://@finos/legend-application-repl-deployment/../legend-application-repl/lib/application/LegendREPLPluginManager.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/__lib__/LegendApplicationNavigation.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/stores/navigation/BrowserNavigator.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/stores/platform/ApplicationPlatform.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/stores/platform/BrowserPlatform.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/components/ApplicationPlatformProvider.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/components/BrowserEnvironmentProvider.js","webpack://@finos/legend-application-repl-deployment/../legend-application-repl/lib/server/REPLServerClient.js","webpack://@finos/legend-application-repl-deployment/../legend-shared/lib/application/HashUtils.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/V1_ValueSpecification.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/V1_Variable.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/raw/classInstance/graph/V1_GraphFetchTree.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph/Core_HashUtils.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph/MetaModelConst.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/raw/classInstance/graph/V1_RootGraphFetchTree.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/packageableElements/domain/V1_Multiplicity.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/raw/V1_CoreClassInstance.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/raw/V1_Lambda.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/raw/V1_DataTypeValueSpecification.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/raw/classInstance/path/V1_Path.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/raw/V1_AbstractAppliedFunction.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/application/V1_AppliedFunction.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/raw/V1_Collection.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/raw/V1_PrimitiveValueSpecification.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/raw/V1_CDecimal.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/raw/V1_CInteger.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/raw/V1_CString.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/raw/V1_CFloat.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/raw/V1_CDate.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/raw/V1_CDateTime.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/raw/V1_CStrictDate.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/raw/V1_CStrictTime.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/raw/V1_CBoolean.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/raw/classInstance/V1_AggregateValue.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/raw/classInstance/V1_Pair.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/raw/classInstance/V1_RuntimeInstance.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/raw/classInstance/V1_ExecutionContextInstance.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/raw/classInstance/graph/V1_PropertyGraphFetchTree.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/raw/classInstance/graph/V1_SubTypeGraphFetchTree.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/raw/classInstance/V1_SerializationConfig.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/raw/V1_KeyExpression.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/raw/classInstance/V1_PureList.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/raw/classInstance/V1_TDSAggregateValue.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/raw/classInstance/V1_TDSColumnInformation.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/raw/classInstance/V1_TDSSortInformation.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/raw/classInstance/V1_TDSOlapRank.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/raw/classInstance/V1_TDSOlapAggregation.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/raw/classInstance/relation/V1_ColSpecArray.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/raw/classInstance/relation/V1_ColSpec.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/raw/classInstance/relation/V1_RelationStoreAccessor.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/packageableElements/V1_PackageableElement.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/V1_CoreSerializationHelper.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/V1_SourceInformation.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/raw/classInstance/path/V1_PathElement.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/raw/classInstance/path/V1_PropertyPathElement.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/application/V1_AppliedProperty.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/packageableElements/runtime/V1_Runtime.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/V1_RuntimeSerializationHelper.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/packageableElements/runtime/V1_PackageableRuntime.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/raw/executionContext/V1_ExecutionContext.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/raw/executionContext/V1_AnalyticsExecutionContext.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/raw/executionContext/V1_BaseExecutionContext.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/raw/V1_PackageableElementPtr.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/raw/V1_GenericTypeInstance.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/raw/V1_ClassInstance.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/V1_ValueSpecificationSerializer.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/raw/V1_EnumValue.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/raw/V1_CLatestDate.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/raw/V1_CByteArray.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph/MetaModelUtils.js","webpack://@finos/legend-application-repl-deployment/../legend-application-repl/lib/stores/dataCube/core/DataCubeQuerySnapshot.js","webpack://@finos/legend-application-repl-deployment/../legend-art/lib/color/TailwindCSSPalette.js","webpack://@finos/legend-application-repl-deployment/../legend-application-repl/lib/stores/dataCube/core/DataCubeQueryEngine.js","webpack://@finos/legend-application-repl-deployment/../legend-application-repl/lib/stores/dataCube/core/DataCubeConfiguration.js","webpack://@finos/legend-application-repl-deployment/../legend-application-repl/lib/stores/dataCube/core/DataCubeQueryBuilder.js","webpack://@finos/legend-application-repl-deployment/../legend-application-repl/lib/stores/dataCube/core/DataCubeConfigurationBuilder.js","webpack://@finos/legend-application-repl-deployment/../legend-application-repl/lib/stores/dataCube/core/DataCubeQuerySnapshotBuilder.js","webpack://@finos/legend-application-repl-deployment/../legend-application-repl/lib/stores/dataCube/grid/DataCubeGridQuerySnapshotBuilder.js","webpack://@finos/legend-application-repl-deployment/../legend-application-repl/lib/stores/dataCube/grid/DataCubeGridQueryBuilder.js","webpack://@finos/legend-application-repl-deployment/../legend-art/lib/utils/ComponentUtils.js","webpack://@finos/legend-application-repl-deployment/../legend-art/lib/icon/DataCubeIcon.js","webpack://@finos/legend-application-repl-deployment/../legend-application-repl/lib/components/repl/Alert.js","webpack://@finos/legend-application-repl-deployment/../legend-application-repl/lib/stores/LayoutManagerState.js","webpack://@finos/legend-application-repl-deployment/../legend-application-repl/lib/stores/dataCube/grid/DataCubeGridClientEngine.js","webpack://@finos/legend-application-repl-deployment/../legend-application-repl/lib/stores/dataCube/core/DataCubeQuerySnapshotSubscriber.js","webpack://@finos/legend-application-repl-deployment/../legend-application-repl/lib/stores/dataCube/grid/DataCubeGridConfigurationBuilder.js","webpack://@finos/legend-application-repl-deployment/../legend-shared/lib/format/ValidatorUtils.js","webpack://@finos/legend-application-repl-deployment/../legend-art/lib/menu/DropdownMenu.js","webpack://@finos/legend-application-repl-deployment/../legend-application-repl/lib/components/repl/Form.js","webpack://@finos/legend-application-repl-deployment/../legend-application-repl/lib/components/dataCube/grid/DataCubeGridShared.js","webpack://@finos/legend-application-repl-deployment/../legend-application-repl/lib/stores/dataCube/grid/DataCubeGridControllerState.js","webpack://@finos/legend-application-repl-deployment/../legend-application-repl/lib/stores/dataCube/grid/DataCubeGridMenuBuilder.js","webpack://@finos/legend-application-repl-deployment/../legend-application-repl/lib/stores/dataCube/grid/DataCubeGridClientExportEngine.js","webpack://@finos/legend-application-repl-deployment/../legend-application-repl/lib/stores/dataCube/grid/DataCubeGridState.js","webpack://@finos/legend-application-repl-deployment/../legend-application-repl/lib/stores/dataCube/editor/DataCubeEditorColumnsSelectorState.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/engine/V1_EngineError.js","webpack://@finos/legend-application-repl-deployment/../legend-application-repl/lib/stores/dataCube/editor/DataCubeEditorSortsPanelState.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/action/SourceInformation.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/engine/grammar/V1_ParserError.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/action/EngineError.js","webpack://@finos/legend-application-repl-deployment/../legend-application-repl/lib/stores/dataCube/editor/DataCubeEditorCodePanelState.js","webpack://@finos/legend-application-repl-deployment/../legend-application-repl/lib/stores/dataCube/editor/DataCubeMutableConfiguration.js","webpack://@finos/legend-application-repl-deployment/../legend-application-repl/lib/stores/dataCube/editor/DataCubeEditorGeneralPropertiesPanelState.js","webpack://@finos/legend-application-repl-deployment/../legend-application-repl/lib/stores/dataCube/editor/DataCubeEditorColumnPropertiesPanelState.js","webpack://@finos/legend-application-repl-deployment/../legend-application-repl/lib/stores/dataCube/editor/DataCubeEditorColumnsPanelState.js","webpack://@finos/legend-application-repl-deployment/../legend-application-repl/lib/stores/dataCube/editor/DataCubeEditorVerticalPivotsPanelState.js","webpack://@finos/legend-application-repl-deployment/../legend-application-repl/lib/components/dataCube/editor/DataCubeEditorColumnsSelector.js","webpack://@finos/legend-application-repl-deployment/../legend-application-repl/lib/components/dataCube/editor/DataCubeEditorSortsPanel.js","webpack://@finos/legend-application-repl-deployment/../legend-application-repl/lib/components/dataCube/editor/DataCubeEditorGeneralPropertiesPanel.js","webpack://@finos/legend-application-repl-deployment/../legend-application-repl/lib/components/dataCube/editor/DataCubeEditorColumnsPanel.js","webpack://@finos/legend-application-repl-deployment/../legend-application-repl/lib/components/dataCube/editor/DataCubeEditorVerticalPivotsPanel.js","webpack://@finos/legend-application-repl-deployment/../legend-application-repl/lib/components/dataCube/editor/DataCubeEditorHorizontalPivotsPanel.js","webpack://@finos/legend-application-repl-deployment/../legend-application-repl/lib/components/dataCube/editor/DataCubeEditorFilterPanel.js","webpack://@finos/legend-application-repl-deployment/../legend-application-repl/lib/components/dataCube/editor/DataCubeEditorExtendedColumnsPanel.js","webpack://@finos/legend-application-repl-deployment/../legend-application-repl/lib/components/dataCube/editor/DataCubeEditorCodePanel.js","webpack://@finos/legend-application-repl-deployment/../legend-application-repl/lib/application/LegendREPLDocumentation.js","webpack://@finos/legend-application-repl-deployment/../legend-application-repl/lib/components/dataCube/editor/DataCubeEditorColumnPropertiesPanel.js","webpack://@finos/legend-application-repl-deployment/../legend-application-repl/lib/components/dataCube/editor/DataCubeEditor.js","webpack://@finos/legend-application-repl-deployment/../legend-application-repl/lib/stores/dataCube/editor/DataCubeEditorState.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/action/execution/ExecutionResult.js","webpack://@finos/legend-application-repl-deployment/../legend-application-repl/lib/stores/dataCube/core/DataCubeQuerySnapshotManager.js","webpack://@finos/legend-application-repl-deployment/../legend-application-repl/lib/stores/dataCube/core/DataCubeCoreState.js","webpack://@finos/legend-application-repl-deployment/../legend-application-repl/lib/stores/dataCube/DataCubeState.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/engine/execution/V1_ExecutionResult.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/engine/execution/V1_INTERNAL__UnknownExecutionResult.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/action/execution/INTERNAL__UnknownExecutionResult.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/engine/execution/V1_ExecutionHelper.js","webpack://@finos/legend-application-repl-deployment/../legend-application-repl/lib/server/DataCubeQuery.js","webpack://@finos/legend-application-repl-deployment/../legend-application-repl/lib/server/REPLEngine.js","webpack://@finos/legend-application-repl-deployment/../legend-application-repl/lib/stores/dataCube/DataCubeEngine.js","webpack://@finos/legend-application-repl-deployment/../legend-application-repl/lib/components/repl/DocumentationPanel.js","webpack://@finos/legend-application-repl-deployment/../legend-application-repl/lib/components/repl/SettingsPanel.js","webpack://@finos/legend-application-repl-deployment/../legend-application-repl/lib/stores/REPLStore.js","webpack://@finos/legend-application-repl-deployment/../legend-application-repl/lib/components/REPLStoreProvider.js","webpack://@finos/legend-application-repl-deployment/../legend-application-repl/lib/components/dataCube/grid/DataCubeGrid.js","webpack://@finos/legend-application-repl-deployment/../legend-application-repl/lib/components/repl/LayoutManager.js","webpack://@finos/legend-application-repl-deployment/../legend-application-repl/lib/components/dataCube/DataCube.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/components/ApplicationFrameworkProvider.js","webpack://@finos/legend-application-repl-deployment/../legend-application-repl/lib/stores/LegendREPLBaseStore.js","webpack://@finos/legend-application-repl-deployment/../legend-application-repl/lib/components/LegendREPLFrameworkProvider.js","webpack://@finos/legend-application-repl-deployment/../legend-application-repl/lib/components/LegendREPLApplication.js","webpack://@finos/legend-application-repl-deployment/../legend-application-repl/lib/stores/LegendREPLApplicationPlugin.js","webpack://@finos/legend-application-repl-deployment/../legend-lego/lib/code-editor/PureLanguage.js","webpack://@finos/legend-application-repl-deployment/../legend-lego/lib/code-editor/themes/MonacoEditorThemeUtils.js","webpack://@finos/legend-application-repl-deployment/../legend-lego/lib/code-editor/CodeEditorTheme.js","webpack://@finos/legend-application-repl-deployment/../legend-lego/lib/code-editor/CodeEditorUtils.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph/helpers/PureLanguageHelper.js","webpack://@finos/legend-application-repl-deployment/../legend-lego/lib/code-editor/PureLanguageService.js","webpack://@finos/legend-application-repl-deployment/../legend-application-repl/lib/components/Core_LegendREPLApplicationPlugin.js","webpack://@finos/legend-application-repl-deployment/../legend-application-repl/lib/application/LegendREPL.js","webpack://@finos/legend-application-repl-deployment/../legend-application-repl/lib/index.js","webpack://@finos/legend-application-repl-deployment/./src/index.tsx","webpack://@finos/legend-application-repl-deployment/webpack/bootstrap","webpack://@finos/legend-application-repl-deployment/webpack/runtime/amd options","webpack://@finos/legend-application-repl-deployment/webpack/runtime/compat get default export","webpack://@finos/legend-application-repl-deployment/webpack/runtime/define property getters","webpack://@finos/legend-application-repl-deployment/webpack/runtime/ensure chunk","webpack://@finos/legend-application-repl-deployment/webpack/runtime/global","webpack://@finos/legend-application-repl-deployment/webpack/runtime/hasOwnProperty shorthand","webpack://@finos/legend-application-repl-deployment/webpack/runtime/make namespace object","webpack://@finos/legend-application-repl-deployment/webpack/runtime/node module decorator","webpack://@finos/legend-application-repl-deployment/webpack/runtime/publicPath","webpack://@finos/legend-application-repl-deployment/webpack/runtime/jsonp chunk loading","webpack://@finos/legend-application-repl-deployment/webpack/runtime/nonce","webpack://@finos/legend-application-repl-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};","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { AbstractPlugin, } from '../application/AbstractPluginManager.js';\n// We use numeric enum here for because we want to do comparison\n// In order to retrieve the name of the enum we can do reverse mapping, for example: LogLevel[LogLevel.INFO] -> INFO\n// https://www.typescriptlang.org/docs/handbook/enums.html#reverse-mappings\nexport var LOG_LEVEL;\n(function (LOG_LEVEL) {\n LOG_LEVEL[LOG_LEVEL[\"DEBUG\"] = 1] = \"DEBUG\";\n LOG_LEVEL[LOG_LEVEL[\"INFO\"] = 2] = \"INFO\";\n LOG_LEVEL[LOG_LEVEL[\"WARN\"] = 3] = \"WARN\";\n LOG_LEVEL[LOG_LEVEL[\"ERROR\"] = 4] = \"ERROR\";\n LOG_LEVEL[LOG_LEVEL[\"SILENT\"] = 5] = \"SILENT\";\n})(LOG_LEVEL || (LOG_LEVEL = {}));\nexport class LogEvent {\n channel;\n name;\n timestamp = Date.now();\n /**\n * TODO: we should make channel required and potentially name required as well, and for each\n * channel, there should be a list of known event names. Unknown event name, or wrong channel\n * will result in error.\n */\n static create(name) {\n const event = new LogEvent();\n event.name = name;\n return event;\n }\n}\nexport class LoggerPlugin extends AbstractPlugin {\n level = LOG_LEVEL.DEBUG;\n setLevel(level) {\n this.level = level;\n }\n install(pluginManager) {\n pluginManager.registerLoggerPlugin(this);\n }\n debug(event, ...data) {\n if (this.level <= LOG_LEVEL.DEBUG) {\n this._debug(event, ...data);\n }\n }\n info(event, ...data) {\n if (this.level <= LOG_LEVEL.INFO) {\n this._info(event, ...data);\n }\n }\n warn(event, ...data) {\n if (this.level <= LOG_LEVEL.WARN) {\n this._warn(event, ...data);\n }\n }\n error(event, ...data) {\n if (this.level <= LOG_LEVEL.ERROR) {\n this._error(event, ...data);\n }\n }\n}\nexport class LogService {\n loggers = [];\n registerPlugins(loggerPlugins) {\n this.loggers = loggerPlugins;\n }\n debug(event, ...data) {\n this.loggers.forEach((logger) => logger.debug(event, ...data));\n }\n info(event, ...data) {\n this.loggers.forEach((logger) => logger.info(event, ...data));\n }\n warn(event, ...data) {\n this.loggers.forEach((logger) => logger.warn(event, ...data));\n }\n error(event, ...data) {\n this.loggers.forEach((logger) => logger.error(event, ...data));\n }\n}\n//# sourceMappingURL=LogService.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { uuid } from '../CommonUtils.js';\nexport class PluginInfo {\n name;\n version;\n signature;\n uuid;\n}\nexport class AbstractPlugin {\n name;\n version;\n uuid = uuid();\n constructor(name, version) {\n this.name = name;\n this.version = version;\n }\n getName() {\n return this.name;\n }\n getVersion() {\n return this.version;\n }\n getSignature() {\n return `${this.getName()}@${this.getVersion()}`;\n }\n getUUID() {\n return this.uuid;\n }\n getInfo() {\n const info = new PluginInfo();\n info.name = this.getName();\n info.version = this.getVersion();\n info.signature = this.getSignature();\n info.uuid = this.getUUID();\n return info;\n }\n configure(configData) {\n return this;\n }\n}\nexport class PresetInfo {\n name;\n version;\n signature;\n uuid;\n plugins = [];\n}\nexport class AbstractPreset {\n name;\n version;\n uuid = uuid();\n plugins = [];\n constructor(name, version, plugins) {\n this.name = name;\n this.version = version;\n this.plugins = plugins;\n }\n getName() {\n return this.name;\n }\n getVersion() {\n return this.version;\n }\n getSignature() {\n return `${this.getName()}@${this.getVersion()}`;\n }\n getUUID() {\n return this.uuid;\n }\n getPlugins() {\n return [...this.plugins];\n }\n getInfo() {\n const info = new PresetInfo();\n info.name = this.getName();\n info.version = this.getVersion();\n info.signature = this.getSignature();\n info.uuid = this.getUUID();\n info.plugins = this.plugins\n .map((plugin) => plugin.getInfo())\n .sort((a, b) => a.name.localeCompare(b.name));\n return info;\n }\n configure(configData) {\n return this;\n }\n install(pluginManager) {\n this.plugins.forEach((plugin) => plugin.install(pluginManager));\n }\n}\nexport class AbstractPluginManager {\n plugins = [];\n presets = [];\n usePlugins(plugins) {\n this.plugins = plugins;\n return this;\n }\n usePresets(presets) {\n this.presets = presets;\n return this;\n }\n configure(configData) {\n Object.keys(configData).forEach((key) => {\n const configObj = configData[key];\n this.presets.forEach((preset) => {\n if (preset.getName() === key) {\n preset.configure(configObj);\n }\n });\n this.plugins.forEach((plugin) => {\n if (plugin.getName() === key) {\n plugin.configure(configObj);\n }\n });\n });\n }\n install() {\n // Plugins run before presets\n // Plugins ordering is first to last\n this.plugins.forEach((plugin) => plugin.install(this));\n // Presets ordering is first to last\n this.presets.forEach((plugin) => plugin.install(this));\n }\n getInfo() {\n return {\n plugins: this.plugins\n .filter((plugin) => !this.getHiddenPluginNames().includes(plugin.getName()))\n .map((plugin) => plugin.getInfo())\n .sort((a, b) => a.name.localeCompare(b.name)),\n presets: this.presets\n .filter((preset) => !this.getHiddenPresetNames().includes(preset.getName()))\n .map((preset) => preset.getInfo())\n .sort((a, b) => a.name.localeCompare(b.name)),\n };\n }\n /**\n * Return the list of core plugin names to be hidden\n * when getting plugin manager info, such as core plugins.\n */\n getHiddenPluginNames() {\n return [];\n }\n /**\n * Return the list of core presets names to be hidden\n * when getting plugin manager info, such as core presets.\n */\n getHiddenPresetNames() {\n return [];\n }\n}\n//# sourceMappingURL=AbstractPluginManager.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport packageJson from '../../package.json' assert { type: 'json' };\nimport { LoggerPlugin } from './LogService.js';\nconst { debug, info, warn, error } = console;\nexport class WebConsole extends LoggerPlugin {\n constructor() {\n super(packageJson.extensions.webConsoleLoggerPlugin, packageJson.version);\n }\n _debug(event, ...data) {\n debug(`[${event.timestamp}] ${event.name} ${data.length ? ':' : ''}`, ...data);\n }\n _info(event, ...data) {\n info(`[${event.timestamp}] ${event.name} ${data.length ? ':' : ''}`, ...data);\n }\n _warn(event, ...data) {\n warn(`[${event.timestamp}] ${event.name} ${data.length ? ':' : ''}`, ...data);\n }\n _error(event, ...data) {\n error(`[${event.timestamp}] ${event.name} ${data.length ? ':' : ''}`, ...data);\n }\n}\n//# sourceMappingURL=WebConsole.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { clone, cloneDeep as deepClone, isEqual as deepEqual, findLast, isEmpty, pickBy, uniqBy, uniq, debounce, throttle, mergeWith, toNumber, isObject, } from 'lodash-es';\nimport { diff as deepDiff } from 'deep-object-diff';\nimport { UnsupportedOperationError } from './error/ErrorUtils.js';\nimport { format as prettyPrintObject } from 'pretty-format';\nimport { assertTrue, guaranteeNonNullable } from './error/AssertionUtils.js';\n// NOTE: We re-export lodash utilities like this so we centralize utility usage in our app\n// in case we want to swap out the implementation\nexport { clone, deepClone, deepEqual, deepDiff, findLast, isEmpty, pickBy, uniqBy, uniq, debounce, throttle, toNumber, };\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' && obj !== null) {\n const oldObj = obj;\n const newObj = {};\n Object.keys(oldObj)\n .sort((a, b) => a.localeCompare(b))\n .forEach((key) => {\n newObj[key] = _sort(oldObj[key]);\n });\n return newObj;\n }\n return obj;\n };\n return _sort(value);\n};\nexport const parseNumber = (val) => {\n const num = 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 getNullableFirstEntry = (array) => array.length ? array[0] : undefined;\nexport const getNullableLastEntry = (array) => array.length ? array[array.length - 1] : undefined;\nexport const getNullableEntry = (array, idx) => {\n if (idx < 0 || idx >= array.length) {\n return undefined;\n }\n return array.length > idx ? array[idx] : undefined;\n};\nexport const getNonNullableEntry = (array, idx, message) => {\n assertTrue(0 <= idx && idx < array.length, `Index out of bound: ${idx}`);\n return guaranteeNonNullable(array[idx], message);\n};\n/**\n * NOTE: This object mutates the input object (obj1)\n * To disable this behavior, set `createClone=true`\n */\nexport const mergeObjects = (obj1, obj2, createClone) => mergeWith(createClone ? deepClone(obj1) : obj1, obj2, (o1, o2) => {\n if (Array.isArray(o1)) {\n return o1.concat(o2);\n }\n return undefined;\n});\nexport const promisify = (func) => new Promise((resolve, reject) => setTimeout(() => {\n try {\n resolve(func());\n }\n catch (error) {\n reject(error);\n }\n}, 0));\nexport const addUniqueEntry = (array, newEntry, comparator = (val1, val2) => val1 === val2) => {\n if (!array.find((entry) => comparator(entry, newEntry))) {\n array.push(newEntry);\n return true;\n }\n return false;\n};\nexport const changeEntry = (array, oldEntry, newEntry, comparator = (val1, val2) => val1 === val2) => {\n const idx = array.findIndex((entry) => comparator(entry, oldEntry));\n if (idx !== -1) {\n array[idx] = newEntry;\n return true;\n }\n return false;\n};\nexport const swapEntry = (array, entryOne, entryTwo, comparator = (val1, val2) => val1 === val2) => {\n const idxX = array.findIndex((entry) => comparator(entry, entryOne));\n const idxY = array.findIndex((entry) => comparator(entry, entryTwo));\n if (idxX !== -1 && idxY !== -1) {\n array[idxX] = entryTwo;\n array[idxY] = entryOne;\n return true;\n }\n return false;\n};\nexport const deleteEntry = (array, entryToDelete, comparator = (val1, val2) => val1 === val2) => {\n const idx = array.findIndex((entry) => comparator(entry, entryToDelete));\n if (idx !== -1) {\n array.splice(idx, 1);\n return true;\n }\n return false;\n};\nexport const printObject = (value, options) => {\n const opts = pruneObject({\n printFunctionName: false,\n maxDepth: options?.deep ? undefined : 1,\n });\n const text = prettyPrintObject(value, opts);\n return (text\n // We do these replacements because when we do this for production and the class name is minified,\n // we'd better show `[Object]` instead.\n .replace(/.*\\s\\{/g, '{')\n .replace(/\\[.*\\]/g, (val) => ['[Array]', '[Function]'].includes(val) ? val : '[Object]'));\n};\nexport const hasWhiteSpace = (val) => Boolean(val.match(/\\s/));\n//# sourceMappingURL=CommonUtils.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { printObject, uuid, } from '../CommonUtils.js';\n/**\n * A generic error that can be used for building other errors in the application\n * which does not require Javascript stack trace.\n *\n * If the Javascript stack trace is needed to trace back where the problem occurs,\n * `EnrichedError` is the more suitable candidate.\n *\n * This type of error is useful for wrapping the innermost error or errors coming\n * from the servers. Since we enforce in the app that errors thrown must be of type\n * `Error`, this acts as a good wrapper to manage errors better.\n * See https://github.com/microsoft/TypeScript/issues/13219\n */\nexport class ApplicationError extends Error {\n uuid = uuid();\n constructor(message) {\n super();\n this.message =\n message === undefined || message === '' ? '(no error message)' : message;\n }\n /**\n * This provides more detail (better context) about the error, including the error message\n * stack trace, etc.\n */\n get detail() {\n return this.message;\n }\n}\n// Since Javascript does not fully support rethrowing error, we need to customize and manipulate the stack trace\n// See https://stackoverflow.com/questions/42754270/re-throwing-exception-in-nodejs-and-not-losing-stack-trace\nexport class EnrichedError extends Error {\n constructor(name, error, overideMessage) {\n super(overideMessage\n ? overideMessage\n : error instanceof Error\n ? error.message\n : error);\n this.name = name;\n // if the material used to make this error is also an error, we maintain the stack trace and\n // follow the `rethrown` error stack trace convention\n // See https://www.twilio.com/blog/how-to-read-and-understand-a-java-stacktrace\n if (error instanceof Error) {\n const messageLines = (this.message.match(/\\n/g) ?? []).length + 1;\n this.stack = `${(this.stack ?? '')\n .split('\\n')\n .slice(0, messageLines + 1)\n .join('\\n')}\\nCaused by: ${error.stack}`;\n }\n else {\n if (typeof Error.captureStackTrace === 'function') {\n // Maintains proper stack trace for where our error was thrown (only available on V8)\n // This only works in Chrome for now. Firefox (as of Feb 2020) will throw error\n // See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error\n Error.captureStackTrace(this, this.constructor);\n }\n else {\n // otherwise, use the non-standard but defacto stack trace (available in most browser)\n this.stack = new Error(error).stack;\n }\n }\n }\n}\n/**\n * Signals that a method has been invoked at an illegal or\n * inappropriate point at runtime. In other words, the environment\n * or application is not in an appropriate state for the requested\n * operation.\n */\nexport class IllegalStateError extends EnrichedError {\n constructor(error) {\n super('Illegal State Error [PLEASE NOTIFY DEVELOPER]', error);\n }\n}\nexport class UnsupportedOperationError extends EnrichedError {\n constructor(message, unsupportedObject) {\n super('Unsupported Operation Error', message || unsupportedObject\n ? `${message}${unsupportedObject ? `\\n${printObject(unsupportedObject)}` : ''}`\n : undefined);\n }\n}\n/**\n * This is a relatively crude way to handle error of type unknown thrown for now.\n * We should revisit this when Typescript supports `throws` clause\n * See https://github.com/microsoft/TypeScript/issues/13219\n *\n * NOTE: There's a problem with this check in JSDOM leading so we have to disable this in test environment\n * JSDOM uses their own isolated object rather than native object for performance purpose\n * See https://github.com/jsdom/jsdom/issues/3082\n * For example, TypeErrors generated by `webidl2js` or `whatwg-url` used by `jsdom`, or manually-thrown ones inside impl classes,\n * are thrown using global.TypeError, not dom.window.TypeError. This change is hard to implement as of now\n * See https://github.com/jsdom/jsdom/issues/2727\n * See https://github.com/facebook/jest/issues/2549\n *\n * Read more related discussions at:\n * https://github.com/jsdom/jsdom/issues/1737\n * https://github.com/webcomponents/polyfills/issues/105\n * https://github.com/jsdom/jsdom/issues/1769\n * https://github.com/jsdom/jsdom/issues/2555\n */\nexport function assertErrorThrown(error) {\n // eslint-disable-next-line no-process-env\n if (process.env.NODE_ENV === 'test') {\n return;\n }\n if (!(error instanceof Error)) {\n throw new IllegalStateError('Expected error to be thrown');\n }\n}\nexport const returnUndefOnError = (fn) => {\n try {\n return fn();\n }\n catch {\n return undefined;\n }\n};\nexport const decorateErrorMessageIfExists = (fn, errorMessageDecorator) => {\n try {\n return fn();\n }\n catch (error) {\n assertErrorThrown(error);\n error.message = errorMessageDecorator(error.message);\n throw error;\n }\n};\n//# sourceMappingURL=ErrorUtils.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { EnrichedError } from './ErrorUtils.js';\nexport class AssertionError extends EnrichedError {\n constructor(error, message) {\n super('Assertion Error', error, message);\n }\n}\nexport const isNullable = (value) => value === null || value === undefined;\nexport const isNonNullable = (value) => value !== null && value !== undefined;\nexport function assertNonNullable(value, message = '') {\n if (value === null || value === undefined) {\n throw new AssertionError(message || 'Value is nullable');\n }\n}\nexport const guaranteeNonNullable = (value, message = '') => {\n assertNonNullable(value, message);\n return value;\n};\nexport const isType = (value, clazz) => value instanceof clazz;\nexport const filterByType = (clazz) => (value) => isType(value, clazz);\n// Aserts typing doesn't work with all arrow function type declaration form\n// So we can use this: export const assertType: <T>(value: unknown, clazz: Clazz<T>, message: string) => asserts value is T = (value, clazz, message = '') => {\n// or the normal function form\n// See https://github.com/microsoft/TypeScript/issues/34523\n// See https://github.com/microsoft/TypeScript/pull/33622\nexport function assertType(value, clazz, message = '') {\n if (!(value instanceof clazz)) {\n throw new AssertionError(message || `Value is expected to be of type '${clazz.name}'`);\n }\n}\nexport const guaranteeType = (value, clazz, message = '') => {\n assertType(value, clazz, message);\n return value;\n};\nexport function isNonEmptyString(str) {\n return isNonNullable(str) && str !== '';\n}\nexport function assertNonEmptyString(str, message = '') {\n if (guaranteeNonNullable(str, message) === '') {\n throw new AssertionError(message || `Expected string value to be non-empty`);\n }\n}\nexport function guaranteeNonEmptyString(str, message = '') {\n assertNonEmptyString(str, message);\n return str;\n}\nexport function assertTrue(assertionValue, message = '') {\n if (!assertionValue) {\n throw new AssertionError(message || `Expected predicate to be truthy`);\n }\n}\nexport const isString = (val) => typeof val === 'string';\nexport const isNumber = (val) => typeof val === 'number' && !isNaN(val);\nexport const isBoolean = (val) => typeof val === 'boolean';\nexport const isObject = (val) => typeof val === 'object' && val !== null;\nexport const isPlainObject = (val) => isObject(val) && val.constructor.name === 'Object';\nexport function assertIsString(val, message = '') {\n if (!isString(val)) {\n throw new AssertionError(message || `Value is expected to be a string`);\n }\n}\nexport function assertIsNumber(val, message = '') {\n if (!isNumber(val)) {\n throw new AssertionError(message || `Value is expected to be a number`);\n }\n}\nexport function assertIsBoolean(val, message = '') {\n if (!isBoolean(val)) {\n throw new AssertionError(message || `Value is expected to be a boolean`);\n }\n}\nexport function assertIsObject(val, message = '') {\n if (!isObject(val)) {\n throw new AssertionError(message || `Value is expected to be a object`);\n }\n}\nexport const guaranteeIsString = (val, message = '') => {\n assertIsString(val, message);\n return val;\n};\nexport const guaranteeIsNumber = (val, message = '') => {\n assertIsNumber(val, message);\n return val;\n};\nexport const guaranteeIsBoolean = (val, message = '') => {\n assertIsBoolean(val, message);\n return val;\n};\nexport const guaranteeIsObject = (val, message = '') => {\n assertIsObject(val, message);\n return val;\n};\n//# sourceMappingURL=AssertionUtils.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { StatusCodes } from 'http-status-codes';\nimport { isNonNullable, isString, isObject, AssertionError, assertTrue, } from '../error/AssertionUtils.js';\nimport { deflate } from 'pako';\nimport queryString from 'query-string';\nimport { returnUndefOnError } from '../error/ErrorUtils.js';\nimport { sanitizeUrl } from '@braintree/sanitize-url';\n/**\n * Unlike the download call (GET requests) which is gziped, the upload call send uncompressed data which is in megabytes realms\n * for bigger project. This really slows down operations. As such, we compress data using `zlib` for all network calls to execution\n * server. This requires the backend to uncompress, which for small models might end up adding a little overhead, so in the future, we might\n * want to make this decision `to compress or to not compress` more smartly and dynamicly (e.g. potentially to scan the size of the data/model\n * and decide the compression strategy).\n */\nconst compressData = (data) => new Blob([deflate(isObject(data) ? JSON.stringify(data) : data)]);\nexport const URL_SEPARATOR = '/';\n/**\n * Reference: https://uibakery.io/regex-library/url\n */\nconst URL_REGEX = new RegExp('^(?:https?|ssh|ftp|file)://(?:www.)?[-a-zA-Z0-9@:%._+~#=]{1,256}.[a-zA-Z0-9()]{1,6}\\\\b(?:[-a-zA-Z0-9()@:%_+.~#?&/=]*)$');\nexport const HttpStatus = StatusCodes;\nexport const CHARSET = 'charset=utf-8';\nexport var HttpHeader;\n(function (HttpHeader) {\n HttpHeader[\"CONTENT_TYPE\"] = \"Content-Type\";\n HttpHeader[\"ACCEPT\"] = \"Accept\";\n})(HttpHeader || (HttpHeader = {}));\nexport var ContentType;\n(function (ContentType) {\n ContentType[\"APPLICATION_JSON\"] = \"application/json\";\n ContentType[\"APPLICATION_XML\"] = \"application/xml\";\n ContentType[\"APPLICATION_ZLIB\"] = \"application/zlib\";\n ContentType[\"APPLICATION_XLSX\"] = \"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet\";\n ContentType[\"TEXT_PLAIN\"] = \"text/plain\";\n ContentType[\"TEXT_HTML\"] = \"text/html\";\n ContentType[\"TEXT_CSV\"] = \"text/csv\";\n ContentType[\"ALL\"] = \"*/*\";\n ContentType[\"MESSAGE_RFC822\"] = \"message/rfc822\";\n})(ContentType || (ContentType = {}));\nexport var HttpMethod;\n(function (HttpMethod) {\n HttpMethod[\"GET\"] = \"GET\";\n HttpMethod[\"PUT\"] = \"PUT\";\n HttpMethod[\"POST\"] = \"POST\";\n HttpMethod[\"DELETE\"] = \"DELETE\";\n})(HttpMethod || (HttpMethod = {}));\nconst DEFAULT_CLIENT_REQUEST_OPTIONS = {\n mode: 'cors', // allow CORS - See https://developer.mozilla.org/en-US/docs/Web/API/Request/mode\n credentials: 'include', // allow sending credentials to other domain\n /**\n * NOTE: We must set this to `follow` for the fetch to handle 3xx redirects automatically.\n * The other modes available are `error` which will throw error and does not really give a\n * response object, and `manual` which returns an opaque response object with status code 0;\n * either way, we cannot really handle the redirect manually ourselves.\n * See https://fetch.spec.whatwg.org/#concept-request-redirect-mode\n * See https://fetch.spec.whatwg.org/#concept-filtered-response-opaque-redirect\n */\n redirect: 'follow',\n};\n// NOTE: We could further improve this by using the MIME library https://flaviocopes.com/node-get-file-extension-mime-type/\nexport const getContentTypeFileExtension = (type) => {\n switch (type) {\n case ContentType.APPLICATION_JSON:\n return 'json';\n case ContentType.APPLICATION_XML:\n return 'xml';\n case ContentType.TEXT_CSV:\n return 'csv';\n default:\n return 'txt';\n }\n};\n/**\n * NOTE: the latter headers value will override the those of the first\n */\nexport const mergeRequestHeaders = (headersOne, headersTwo) => {\n const requestHeaders = {};\n if (headersOne) {\n Object.entries(headersOne).forEach(([key, value]) => {\n requestHeaders[key] = value;\n });\n }\n if (headersTwo) {\n Object.entries(headersTwo).forEach(([key, value]) => {\n requestHeaders[key] = value;\n });\n }\n return requestHeaders;\n};\nconst MAX_ERROR_MESSAGE_LENGTH = 5000;\n/**\n * Custom error for service client with response details.\n * NOTE: Since is particular to execution error we might want to separate this out to another place and leave network client\n * as pure/generic as possible\n */\nconst extractMessage = (payload) => {\n if (isObject(payload)) {\n return isString(payload.message)\n ? payload.message\n : JSON.stringify(payload);\n }\n let payloadAsObject;\n try {\n payloadAsObject = JSON.parse(payload);\n }\n catch {\n // NOTE: ignored, above is best effort\n }\n return payloadAsObject && isString(payloadAsObject.message)\n ? payloadAsObject.message\n : payload;\n};\n/**\n * This is a fairly basic way to attempt re-authentication.\n * We create an <iframe> to load a re-authentication url\n * which suppose to silently refresh the authentication cookie\n * and requires no action from users.\n *\n * NOTE: authentication is very specific to the deployment context\n * i.e. how the servers are being setup, so this way of re-authenticate\n * should be optional and configurable.\n */\nexport const autoReAuthenticate = (url) => \n// eslint-disable-next-line @typescript-eslint/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};\nexport const createRequestHeaders = (method, headers) => {\n const baseRequestHeaders = {};\n /**\n * NOTE: here we set the accept header to application/json instead of the default value\n * as that will imply the server can send us text/html sometimes when there is an\n * authentication problem, which is not desirable.\n */\n baseRequestHeaders.Accept = ContentType.APPLICATION_JSON;\n if (method !== HttpMethod.GET) {\n baseRequestHeaders[HttpHeader.CONTENT_TYPE] =\n `${ContentType.APPLICATION_JSON};${CHARSET}`;\n }\n return mergeRequestHeaders(baseRequestHeaders, headers);\n};\n/**\n * Simple wrapper around native `fetch` API. For `options`, see documentation for \"init\"\n * See https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API\n */\nexport class NetworkClient {\n options = {};\n baseUrl;\n constructor(config) {\n 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) => {\n if (\n // NOTE: status 0 is either timeout or client error possibly caused by authentication\n response.status === 0 ||\n response.status === HttpStatus.UNAUTHORIZED) {\n // NOTE: we might want to consider different handling here rather than just proceeding with a retry\n // this is a good place to add an auto retry/authenticate mechanism\n if (responseProcessConfig?.autoReAuthenticateUrl) {\n return autoReAuthenticate(responseProcessConfig.autoReAuthenticateUrl)\n .then(() => fetch(requestUrl, requestInit))\n .then((resp) => processResponse(resp, requestInit, responseProcessConfig));\n }\n return fetch(requestUrl, requestInit).then((resp) => processResponse(resp, requestInit, responseProcessConfig));\n }\n return processResponse(response, requestInit, responseProcessConfig);\n })\n .catch((error) => couldBeCORS(error)\n ? // NOTE: we might want to consider different handling here rather than just proceeding with a retry\n fetch(requestUrl, requestInit).then((resp) => processResponse(resp, requestInit, responseProcessConfig))\n : Promise.reject(error));\n }\n}\n/**\n * Create and download a file using data URI\n * See http://stackoverflow.com/questions/283956\n */\nexport const downloadFileUsingDataURI = (fileName, content, contentType) => {\n const blob = new Blob([content], { type: contentType });\n const url = URL.createObjectURL(blob);\n const link = document.createElement('a');\n if (typeof link.download === 'string') {\n document.body.appendChild(link); // Firefox requires the link to be in the body\n link.download = fileName;\n link.href = url;\n link.click();\n document.body.removeChild(link); // remove the link when done\n }\n else {\n location.replace(url);\n }\n};\nexport const createUrlStringFromData = (data, contentType, base64) => base64\n ? `data:${contentType};base64,${window.btoa(data)}`\n : `data:${contentType},${encodeURIComponent(data)}`;\n// Buffer.from(str, 'base64')` and`buf.toString('base64')\n// NOTE: we can potentially use the native `URLSearchParams` as it provides\n// fairly good API and structured output, but it does not support duplicated query\n// such as `?foo=1&foo=2`, only the first value of `foo` will be recorded\n// See https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams\nexport const getQueryParameters = (url, isFullUrl = false) => {\n const params = isFullUrl\n ? queryString.parseUrl(url).query\n : queryString.parse(url);\n return params;\n};\nexport const getQueryParameterValue = (key, data) => {\n const paramValue = data[key];\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 addQueryParametersToUrl = (url, val) => (val ? `${url}?${val}` : url);\nexport const buildUrl = (parts) => parts\n .map((part) => part.replaceAll(/^\\/+/g, '').replaceAll(/\\/+$/g, ''))\n .join(URL_SEPARATOR);\nexport const sanitizeURL = (val) => {\n // eslint-disable-next-line no-process-env\n if (process.env.NODE_ENV === 'test') {\n // NOTE: the library we use for sanizing URL use URL.canParse() which is not available in JSDOM\n // so we skip sanitizing URL in test environment for now\n return val;\n }\n return sanitizeUrl(val);\n};\nexport const isValidURL = (val) => URL_REGEX.test(val);\n//# sourceMappingURL=NetworkUtils.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport var APPLICATION_EVENT;\n(function (APPLICATION_EVENT) {\n APPLICATION_EVENT[\"APPLICATION_SETUP__FAILURE\"] = \"application.setup.failure\";\n APPLICATION_EVENT[\"APPLICATION_LOAD__SUCCESS\"] = \"application.load.success\";\n APPLICATION_EVENT[\"APPLICATION_LOAD__FAILURE\"] = \"application.load.failure\";\n APPLICATION_EVENT[\"ILLEGAL_APPLICATION_STATE_OCCURRED\"] = \"application.error.illegal-state\";\n APPLICATION_EVENT[\"APPLICATION_CONFIGURATION__FAILURE\"] = \"application.configuration.failure\";\n APPLICATION_EVENT[\"IDENTITY_AUTO_FETCH__FAILURE\"] = \"application.identity.auto-fetch.failure\";\n APPLICATION_EVENT[\"DOCUMENTATION_FETCH__FAILURE\"] = \"application.documentation.fetch.failure\";\n APPLICATION_EVENT[\"DOCUMENTATION_LOAD__SKIP\"] = \"application.documentation.load.skip\";\n APPLICATION_EVENT[\"DOCUMENTATION_REQUIREMENT_CHECK__FAILURE\"] = \"application.documentation.requirement-check.failure\";\n APPLICATION_EVENT[\"CONTEXTUAL_DOCUMENTATION_LOAD__SKIP\"] = \"application.virtual-assistant.contextual-documentation-load.skip\";\n APPLICATION_EVENT[\"VIRTUAL_ASSISTANT_DOCUMENTATION_ENTRY__ACCESS\"] = \"application.virtual-assistant.documentation-entry.access\";\n APPLICATION_EVENT[\"TERMINAL_COMMAND_CONFIGURATION_CHECK__FAILURE\"] = \"application.load.terminal-command.configuration-check.failure\";\n APPLICATION_EVENT[\"COLOR_THEME_CONFIGURATION_CHECK__FAILURE\"] = \"application.layout.color-theme.configuration-check.failure\";\n APPLICATION_EVENT[\"SETTING_CONFIGURATION_CHECK__FAILURE\"] = \"application.setting.configuration-check.failure\";\n APPLICATION_EVENT[\"SETTING_RETRIVE_FAILURE\"] = \"application.setting.retrieve.failure\";\n APPLICATION_EVENT[\"USER_DATA_RETRIEVE_FAILURE\"] = \"application.user-data.retrieve.failure\";\n APPLICATION_EVENT[\"COMMAND_CENTER_REGISTRATION__FAILURE\"] = \"application.command.registration.failure\";\n APPLICATION_EVENT[\"APPLICATION_CONTEXT__ACCESS\"] = \"application.context.access\";\n APPLICATION_EVENT[\"APPLICATION_USAGE__INTERRUPT\"] = \"application.usage.interrupt\";\n APPLICATION_EVENT[\"APPLICATION_TELEMETRY_EVENT__FAILURE\"] = \"application.telemetry-event.failure\";\n APPLICATION_EVENT[\"DEBUG\"] = \"development.debug\";\n})(APPLICATION_EVENT || (APPLICATION_EVENT = {}));\n//# sourceMappingURL=LegendApplicationEvent.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { pruneNullValues } from '../CommonUtils.js';\nimport { custom, SKIP, deserialize, serialize, } from 'serializr';\nexport class SerializationFactory {\n schema;\n deserializeNullAsUndefined;\n constructor(schema, options) {\n this.schema = schema;\n this.deserializeNullAsUndefined = Boolean(options?.deserializeNullAsUndefined);\n }\n toJson(val) {\n return serialize(this.schema, val);\n }\n fromJson(val) {\n return deserialize(this.schema, this.deserializeNullAsUndefined ? pruneNullValues(val) : val);\n }\n}\nexport const usingModelSchema = (schema) => custom((value) => (value === undefined ? SKIP : serialize(schema, value)), (value) => deserialize(schema, value));\n// NOTE: we need these methods because `map()` of `serializr` tries to smartly\n// determines if it should produce object or ES6 Map but we always want ES6 Map,\n// so we would use this function\nexport const deserializeMap = (val, itemDeserializer) => {\n const result = new Map();\n Object.keys(val).forEach((key) => result.set(key, itemDeserializer(val[key])));\n return result;\n};\nexport const serializeMap = (val, itemSerializer) => {\n const result = {};\n val.forEach((v, key) => {\n result[key] = itemSerializer(v);\n });\n return result;\n};\nexport const usingConstantValueSchema = (value) => custom(() => value, () => value);\n/**\n * This is the idiomatic usage pattern for `optional(custom(...))`.\n *\n * `optional` only affects serialization so we must make sure to check\n * if the value is `undefined` or not, if yes, serialize, else, return `undefined`\n * which will be processed by `optional(...)` as `SKIP`.\n *\n * `optional` does not affect deserialization, however, as `undefined` values\n * are automatically skipped\n * See https://github.com/mobxjs/serializr/issues/73#issuecomment-535641545\n */\nexport const optionalCustom = (\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nserializer, \n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ndeserializer) => custom((val) => (val ? serializer(val) : SKIP), (val) => (val ? deserializer(val) : SKIP));\nexport const optionalCustomUsingModelSchema = (schema) => custom((val) => (val ? serialize(schema, val) : SKIP), (val) => (val ? deserialize(schema, val) : SKIP));\nexport const deserializeArray = (values, itemDeserializer, options) => {\n if (Array.isArray(values)) {\n return values.map(itemDeserializer);\n }\n return options?.skipIfEmpty ? SKIP : [];\n};\nexport const serializeArray = (values, itemSerializer, options) => {\n let forceReturnEmptyInTest = false;\n // NOTE: this block is meant for test, `webpack` will tree-shake it\n // so we never reach inside, else we would get error about `process is not defined` as we're\n // in browser environment\n // eslint-disable-next-line no-process-env\n if (process.env.NODE_ENV === 'test') {\n forceReturnEmptyInTest =\n Boolean(options?.INTERNAL__forceReturnEmptyInTest) &&\n // eslint-disable-next-line no-process-env\n process.env.TEST_GROUP === 'engine-roundtrip';\n }\n if (Array.isArray(values)) {\n return values.length\n ? values.map((value) => itemSerializer(value))\n : forceReturnEmptyInTest\n ? []\n : options?.skipIfEmpty\n ? SKIP\n : [];\n }\n return forceReturnEmptyInTest ? [] : SKIP;\n};\n/**\n * This is the idiomatic usage pattern for serialization of optional list of objects.\n *\n * Notice our particular usage of `serializeArray` and `deserializeArray` that is deisnged\n * for testing and accounting for logic mismatches between servers and studio\n */\nexport const customListWithSchema = (schema, options) => custom((values) => serializeArray(values, (value) => serialize(schema, value), {\n skipIfEmpty: true,\n INTERNAL__forceReturnEmptyInTest: options?.INTERNAL__forceReturnEmptyInTest,\n}), (values) => deserializeArray(values, (value) => deserialize(schema, value), {\n skipIfEmpty: false,\n}));\nexport const customList = (serializer, deserializer, options) => custom((values) => serializeArray(values, (value) => serializer(value), {\n skipIfEmpty: true,\n INTERNAL__forceReturnEmptyInTest: options?.INTERNAL__forceReturnEmptyInTest,\n}), (values) => deserializeArray(values, (value) => deserializer(value), {\n skipIfEmpty: false,\n}));\nexport const customEquivalentList = (options) => customList((value) => value, (value) => value, options);\nexport const optionalCustomListWithSchema = (schema, options) => optionalCustom((values) => serializeArray(values, (value) => serialize(schema, value), {\n skipIfEmpty: true,\n INTERNAL__forceReturnEmptyInTest: options?.INTERNAL__forceReturnEmptyInTest,\n}), (values) => deserializeArray(values, (value) => deserialize(schema, value), {\n skipIfEmpty: false,\n}));\nexport const optionalCustomList = (serializer, deserializer, options) => optionalCustom((values) => serializeArray(values, (value) => serializer(value), {\n skipIfEmpty: true,\n INTERNAL__forceReturnEmptyInTest: options?.INTERNAL__forceReturnEmptyInTest,\n}), (values) => deserializeArray(values, (value) => deserializer(value), {\n skipIfEmpty: false,\n}));\n/**\n * NOTE: this is a workaround for `serializr` to avoid the magic extension mechanism provided\n * by `createModelSchema`, where depending on the order schemas are defined, if the schema of the\n * super class is specified first, when we serialize subclasses, we would get fields of the order\n * of fields from the super classes first, followed by fields from the subclasses, not the order\n * specified in the subclass's schema.\n *\n * See https://github.com/mobxjs/serializr/issues/179\n */\nexport const TEMPORARY__disableModelSchemaExtensionMechanism = (schema) => {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-assignment\n schema.extends = undefined;\n return schema;\n};\n//# sourceMappingURL=SerializationUtils.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { SerializationFactory, LogEvent, uniq, guaranteeNonEmptyString, } from '@finos/legend-shared';\nimport { createModelSchema, custom, list, optional, primitive, } from 'serializr';\nimport { APPLICATION_EVENT } from '../__lib__/LegendApplicationEvent.js';\nexport class DocumentationEntry {\n key;\n markdownText;\n title;\n text;\n url;\n related;\n static serialization = new SerializationFactory(createModelSchema(DocumentationEntry, {\n markdownText: custom((val) => val, (val) => (val.value ? val : undefined)),\n related: optional(list(primitive())),\n title: optional(primitive()),\n text: optional(primitive()),\n url: optional(primitive()),\n }));\n static create(json, documentationKey) {\n const entry = DocumentationEntry.serialization.fromJson(json);\n entry.key = documentationKey;\n return entry;\n }\n}\nexport const collectKeyedDocumentationEntriesFromConfig = (rawEntries) => Object.entries(rawEntries).map((entry) => ({\n key: entry[0],\n content: DocumentationEntry.create(entry[1], entry[0]),\n}));\nexport const collectDocumentationLinkEntryFromConfig = (rawEntries) => Object.entries(rawEntries).map((entry) => ({\n key: guaranteeNonEmptyString(entry[0], \"Documentation link 'key' is missing\"),\n label: guaranteeNonEmptyString(entry[1].label, \"Documentation link 'label' is missing\"),\n url: guaranteeNonEmptyString(entry[1].url, \"Documentation link 'url' is missing\"),\n}));\nexport const collectContextualDocumentationEntries = (config) => Object.entries(config).map((entry) => ({\n context: entry[0],\n documentationKey: entry[1],\n}));\nexport class DocumentationService {\n url;\n links;\n docRegistry = new Map();\n contextualDocIndex = new Map();\n constructor(applicationStore) {\n // set the main documenation site url\n this.url = applicationStore.config.documentationUrl;\n this.links = applicationStore.config.documentationLinkEntries;\n /**\n * NOTE: the order of documentation entry overidding is (the later override the former):\n * 1. Natively specified: specified in the codebase (no overriding allowed within this group of documentation entries):\n * since we have extension mechanism, the order of plugins matter,\n * we do not allow overriding, i.e. so the first specification for a documentation key wins\n * 2. Fetched from documentation registries (no overriding allowed within this group of documentation entries):\n * since we have extension mechanism and allow specifying multiple registry URLS,\n * we do not allow overriding, i.e. so the first specification for a documentation key wins\n * 3. Configured in application config (overiding allowed within this group)\n */\n // build doc registry\n applicationStore.pluginManager\n .getApplicationPlugins()\n .flatMap((plugin) => plugin.getExtraKeyedDocumentationEntries?.() ?? [])\n .forEach((entry) => {\n // NOTE: Entries specified natively will not override each other. This is to prevent entries from extensions\n // accidentally overide entries from core.\n if (this.hasDocEntry(entry.key)) {\n applicationStore.logService.warn(LogEvent.create(APPLICATION_EVENT.DOCUMENTATION_LOAD__SKIP), entry.key);\n }\n else {\n this.docRegistry.set(entry.key, entry.content);\n }\n });\n // entries from config will override entries specified natively\n applicationStore.config.keyedDocumentationEntries.forEach((entry) => this.docRegistry.set(entry.key, entry.content));\n const contextualDocEntries = applicationStore.pluginManager\n .getApplicationPlugins()\n .flatMap((plugin) => plugin.getExtraContextualDocumentationEntries?.() ?? []);\n // verify that required documentations are available\n const missingDocumentationEntries = [];\n uniq(applicationStore.pluginManager\n .getApplicationPlugins()\n .flatMap((plugin) => plugin.getExtraRequiredDocumentationKeys?.() ?? [])\n .concat(contextualDocEntries.map((entry) => entry.documentationKey))).forEach((key) => {\n if (!this.docRegistry.has(key)) {\n missingDocumentationEntries.push(key);\n }\n });\n if (missingDocumentationEntries.length) {\n applicationStore.logService.warn(LogEvent.create(APPLICATION_EVENT.DOCUMENTATION_REQUIREMENT_CHECK__FAILURE), `Can't find corresponding documentation entry for keys:\\n${missingDocumentationEntries\n .map((key) => `- ${key}`)\n .join('\\n')}`);\n }\n // Contextual Documentation\n contextualDocEntries.forEach((entry) => {\n // NOTE: Entries specified natively will not override each other. This is to prevent entries from extensions\n // overriding entries from core.\n //\n // However, it might be useful to allow extending the list of related doc entries.\n // This allows extensions to broaden related doc entries for contextual docs\n // If we need to support this behavior, we could create a dedicated extension method\n if (this.hasContextualDocEntry(entry.context)) {\n applicationStore.logService.warn(LogEvent.create(APPLICATION_EVENT.CONTEXTUAL_DOCUMENTATION_LOAD__SKIP), entry.context);\n }\n else {\n const existingDocEntry = this.getDocEntry(entry.documentationKey);\n if (existingDocEntry) {\n this.contextualDocIndex.set(entry.context, existingDocEntry);\n }\n }\n });\n // entries from config will override entries specified natively\n applicationStore.config.contextualDocEntries.forEach((entry) => {\n const existingDocEntry = this.getDocEntry(entry.documentationKey);\n if (existingDocEntry) {\n this.contextualDocIndex.set(entry.context, existingDocEntry);\n }\n });\n }\n getDocEntry(key) {\n return this.docRegistry.get(key);\n }\n hasDocEntry(key) {\n return this.docRegistry.has(key);\n }\n getContextualDocEntry(key) {\n return this.contextualDocIndex.get(key);\n }\n hasContextualDocEntry(key) {\n return this.contextualDocIndex.has(key);\n }\n getAllDocEntries() {\n return Array.from(this.docRegistry.values());\n }\n publishDocRegistry() {\n const result = {};\n this.docRegistry.forEach((value, key) => {\n result[key] = DocumentationEntry.serialization.toJson(value);\n });\n return result;\n }\n publishContextualDocIndex() {\n const result = {};\n this.contextualDocIndex.forEach((value, key) => {\n result[key] = value.key;\n });\n return result;\n }\n}\n//# sourceMappingURL=DocumentationService.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { action, computed, makeObservable, observable } from 'mobx';\nvar ACTION_STATE;\n(function (ACTION_STATE) {\n ACTION_STATE[\"INITIAL\"] = \"INITIAL\";\n ACTION_STATE[\"IN_PROGRESS\"] = \"IN_PROGRESS\";\n ACTION_STATE[\"SUCCEEDED\"] = \"SUCEEDED\";\n ACTION_STATE[\"FAILED\"] = \"FAILED\";\n})(ACTION_STATE || (ACTION_STATE = {}));\nexport class ActionState {\n state;\n _message;\n _messageFormatter;\n constructor() {\n this.state = ACTION_STATE.INITIAL;\n }\n setMessage(val) {\n this._message = val;\n }\n setMessageFormatter(val) {\n this._messageFormatter = val;\n }\n reset() {\n this.state = ACTION_STATE.INITIAL;\n return this;\n }\n inProgress() {\n this.state = ACTION_STATE.IN_PROGRESS;\n return this;\n }\n fail() {\n this.state = ACTION_STATE.FAILED;\n return this;\n }\n pass() {\n this.state = ACTION_STATE.SUCCEEDED;\n return this;\n }\n complete(hasSucceeded = true) {\n if (hasSucceeded) {\n this.pass();\n }\n else {\n this.fail();\n }\n return this;\n }\n sync(val) {\n const data = val.exportData();\n this.state = data.state;\n this._message = data.message;\n }\n exportData() {\n return {\n state: this.state,\n message: this._message,\n };\n }\n get isInInitialState() {\n return this.state === ACTION_STATE.INITIAL;\n }\n get isInProgress() {\n return this.state === ACTION_STATE.IN_PROGRESS;\n }\n get hasFailed() {\n return this.state === ACTION_STATE.FAILED;\n }\n get hasSucceeded() {\n return this.state === ACTION_STATE.SUCCEEDED;\n }\n get message() {\n return this._message\n ? this._messageFormatter\n ? this._messageFormatter(this._message)\n : this._message\n : undefined;\n }\n /**\n * Use this if only the completion state of the action is of concern,\n * i.e. we don't care if it fails or succeeds.\n */\n get hasCompleted() {\n return this.hasFailed || this.hasSucceeded;\n }\n static create() {\n return makeObservable(new ActionState(), {\n state: observable,\n _message: observable,\n reset: action,\n inProgress: action,\n pass: action,\n fail: action,\n complete: action,\n setMessage: action,\n sync: action,\n isInInitialState: computed,\n isInProgress: computed,\n hasFailed: computed,\n hasSucceeded: computed,\n hasCompleted: computed,\n message: computed,\n });\n }\n}\n//# sourceMappingURL=ActionState.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { AbstractPlugin, } from '../application/AbstractPluginManager.js';\nexport var CORE_TRACER_TAG;\n(function (CORE_TRACER_TAG) {\n CORE_TRACER_TAG[\"USER\"] = \"user\";\n CORE_TRACER_TAG[\"ENV\"] = \"env\";\n CORE_TRACER_TAG[\"RESULT\"] = \"result\";\n CORE_TRACER_TAG[\"ERROR\"] = \"error\";\n CORE_TRACER_TAG[\"HTTP_STATUS\"] = \"status\";\n CORE_TRACER_TAG[\"HTTP_REQUEST_METHOD\"] = \"method\";\n CORE_TRACER_TAG[\"HTTP_REQUEST_URL\"] = \"url\";\n})(CORE_TRACER_TAG || (CORE_TRACER_TAG = {}));\nexport class TracerServicePlugin extends AbstractPlugin {\n install(pluginManager) {\n pluginManager.registerTracerServicePlugin(this);\n }\n}\nexport class Trace {\n traceEntries = [];\n setup(traceEntries) {\n this.traceEntries = traceEntries;\n }\n bootstrap(response) {\n this.traceEntries.forEach((entry) => {\n entry.plugin.bootstrap(entry.clientSpan, response);\n });\n }\n reportSuccess() {\n this.traceEntries.forEach((entry) => {\n entry.plugin.concludeClientSpan(entry.clientSpan, undefined);\n });\n }\n reportError(error) {\n this.traceEntries.forEach((entry) => {\n entry.plugin.concludeClientSpan(entry.clientSpan, error);\n });\n }\n 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 Fuse, {} from 'fuse.js';\nexport const FuzzySearchEngine = Fuse;\n//# sourceMappingURL=FuzzySearch.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { action, computed, makeObservable, observable } from 'mobx';\nexport var ADVANCED_FUZZY_SEARCH_MODE;\n(function (ADVANCED_FUZZY_SEARCH_MODE) {\n ADVANCED_FUZZY_SEARCH_MODE[\"STANDARD\"] = \"standard\";\n ADVANCED_FUZZY_SEARCH_MODE[\"INCLUDE\"] = \"include match\";\n ADVANCED_FUZZY_SEARCH_MODE[\"EXACT\"] = \"exact match\";\n ADVANCED_FUZZY_SEARCH_MODE[\"INVERSE\"] = \"excludes exact match\";\n})(ADVANCED_FUZZY_SEARCH_MODE || (ADVANCED_FUZZY_SEARCH_MODE = {}));\nexport class FuzzySearchAdvancedConfigState {\n currentMode = ADVANCED_FUZZY_SEARCH_MODE.STANDARD;\n onSearchModeChange;\n constructor(onSearchModeChange) {\n makeObservable(this, {\n currentMode: observable,\n isAdvancedSearchActive: computed,\n setCurrentMode: action,\n });\n this.onSearchModeChange = onSearchModeChange;\n }\n get isAdvancedSearchActive() {\n return this.currentMode !== ADVANCED_FUZZY_SEARCH_MODE.STANDARD;\n }\n generateSearchText(val) {\n switch (this.currentMode) {\n case ADVANCED_FUZZY_SEARCH_MODE.INCLUDE: {\n return `'\"${val}\"`;\n }\n case ADVANCED_FUZZY_SEARCH_MODE.EXACT: {\n return `=\"${val}\"`;\n }\n case ADVANCED_FUZZY_SEARCH_MODE.INVERSE: {\n return `!\"${val}\"`;\n }\n default: {\n return val;\n }\n }\n }\n setCurrentMode(val) {\n this.currentMode = val;\n this.onSearchModeChange();\n }\n}\n//# sourceMappingURL=FuzzySearchAdvancedConfigState.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { action, makeObservable, observable, computed } from 'mobx';\nimport { guaranteeNonEmptyString, uuid, isNonNullable, ActionState, FuzzySearchEngine, FuzzySearchAdvancedConfigState, } from '@finos/legend-shared';\nexport var VIRTUAL_ASSISTANT_TAB;\n(function (VIRTUAL_ASSISTANT_TAB) {\n VIRTUAL_ASSISTANT_TAB[\"SEARCH\"] = \"SEARCH\";\n VIRTUAL_ASSISTANT_TAB[\"CONTEXTUAL_SUPPORT\"] = \"CONTEXTUAL_SUPPORT\";\n})(VIRTUAL_ASSISTANT_TAB || (VIRTUAL_ASSISTANT_TAB = {}));\nexport const DOCUMENTATION_SEARCH_RESULTS_LIMIT = 100;\nexport class VirtualAssistantDocumentationEntry {\n uuid = uuid();\n documentationKey;\n title;\n content;\n url;\n isOpen = false;\n constructor(docEntry) {\n makeObservable(this, {\n isOpen: observable,\n setIsOpen: action,\n });\n this.documentationKey = docEntry.key;\n this.title = guaranteeNonEmptyString(docEntry.title);\n this.content = docEntry.markdownText ?? docEntry.text;\n this.url = docEntry.url;\n }\n setIsOpen(val) {\n this.isOpen = val;\n }\n}\nexport class VirtualAssistantContextualDocumentationEntry {\n uuid = uuid();\n context;\n title;\n content;\n url;\n related;\n constructor(context, docEntry, related) {\n this.context = context;\n this.title = docEntry.title;\n this.content = docEntry.markdownText ?? docEntry.text;\n this.url = docEntry.url;\n this.related = related;\n }\n}\n/**\n * NOTE: since we're displaying the documentation entry in virtual assistant\n * we want only user-friendly docs, we will discard anything that doesn't\n * come with a title, or does not have any content/url\n */\nexport const isValidVirtualAssistantDocumentationEntry = (entry) => Boolean(entry.title && (entry.url ?? entry.text ?? entry.markdownText));\n/**\n * Check if the documentation entry should be displayed in virtual assistant,\n * i.e. it has some text content, rather just a link\n */\nexport const shouldDisplayVirtualAssistantDocumentationEntry = (entry) => isValidVirtualAssistantDocumentationEntry(entry) &&\n Boolean(entry.text ?? entry.markdownText);\nexport class AssistantService {\n applicationStore;\n /**\n * This key is used to allow programmatic re-rendering of the assistant panel\n */\n panelRenderingKey = uuid();\n isHidden = true; // hide by default unless specified by the application to show\n isOpen = false;\n isPanelMaximized = false;\n selectedTab = VIRTUAL_ASSISTANT_TAB.SEARCH;\n currentDocumentationEntry;\n // search text\n searchEngine;\n searchConfigurationState;\n searchState = ActionState.create();\n searchText = '';\n searchResults = [];\n showSearchConfigurationMenu = false;\n isOverSearchLimit = false;\n constructor(applicationStore) {\n makeObservable(this, {\n isHidden: observable,\n isOpen: observable,\n isPanelMaximized: observable,\n panelRenderingKey: observable,\n isOverSearchLimit: observable,\n selectedTab: observable,\n searchText: observable,\n searchResults: observable,\n currentDocumentationEntry: observable,\n showSearchConfigurationMenu: observable,\n currentContextualDocumentationEntry: computed,\n setIsHidden: action,\n setIsOpen: action,\n setIsPanelMaximized: action,\n setSelectedTab: action,\n setSearchText: action,\n resetSearch: action,\n search: action,\n openDocumentationEntry: action,\n refreshPanelRendering: action,\n setShowSearchConfigurationMenu: action,\n });\n this.applicationStore = applicationStore;\n this.searchEngine = new FuzzySearchEngine(this.applicationStore.documentationService\n .getAllDocEntries()\n .filter(isValidVirtualAssistantDocumentationEntry), {\n includeScore: true,\n shouldSort: true,\n // Ignore location when computing the search score\n // See https://fusejs.io/concepts/scoring-theory.html\n ignoreLocation: true,\n // This specifies the point the search gives up\n // `0.0` means exact match where `1.0` would match anything\n // We set a relatively low threshold to filter out irrelevant results\n threshold: 0.2,\n keys: [\n {\n // NOTE: for now, we would weight title the most\n name: 'title',\n weight: 4,\n },\n {\n name: 'text',\n weight: 1,\n },\n {\n name: 'markdownText.value',\n weight: 1,\n },\n ],\n // extended search allows for exact word match through single quote\n // See https://fusejs.io/examples.html#extended-search\n useExtendedSearch: true,\n });\n this.searchConfigurationState = new FuzzySearchAdvancedConfigState(() => {\n this.search();\n });\n }\n get currentContextualDocumentationEntry() {\n if (!this.applicationStore.navigationContextService.currentContext) {\n return undefined;\n }\n const currentContext = this.applicationStore.navigationContextService.currentContext.key;\n const currentContextualDocumentationEntry = this.applicationStore.documentationService.getContextualDocEntry(currentContext);\n return currentContextualDocumentationEntry\n ? new VirtualAssistantContextualDocumentationEntry(currentContext, currentContextualDocumentationEntry, (currentContextualDocumentationEntry.related ?? [])\n .map((entry) => this.applicationStore.documentationService.getDocEntry(entry))\n .filter(isNonNullable)\n .filter(isValidVirtualAssistantDocumentationEntry)\n .map((entry) => new VirtualAssistantDocumentationEntry(entry)))\n : undefined;\n }\n openDocumentationEntry(key) {\n const entry = this.applicationStore.documentationService.getDocEntry(key);\n if (entry) {\n this.setIsOpen(true);\n this.setIsHidden(false);\n this.currentDocumentationEntry = new VirtualAssistantDocumentationEntry(entry);\n this.currentDocumentationEntry.setIsOpen(true);\n this.resetSearch();\n }\n }\n openDocumentationEntryLink(key) {\n const entry = this.applicationStore.documentationService.getDocEntry(key);\n if (entry) {\n if (shouldDisplayVirtualAssistantDocumentationEntry(entry)) {\n this.openDocumentationEntry(entry.key);\n }\n else if (entry.url) {\n this.applicationStore.navigationService.navigator.visitAddress(entry.url);\n }\n }\n }\n setIsHidden(val) {\n this.isHidden = val;\n }\n setIsPanelMaximized(val) {\n this.isPanelMaximized = val;\n }\n hideAssistant() {\n this.setIsHidden(true);\n this.setIsOpen(false);\n }\n toggleAssistant() {\n const newVal = !this.isHidden;\n if (newVal) {\n this.hideAssistant();\n }\n else {\n this.setIsHidden(false);\n }\n }\n setIsOpen(val) {\n this.isOpen = val;\n }\n setSelectedTab(val) {\n this.selectedTab = val;\n }\n refreshPanelRendering() {\n this.panelRenderingKey = uuid();\n }\n setSearchText(val) {\n this.searchText = val;\n }\n resetSearch() {\n this.searchText = '';\n this.searchResults = [];\n this.searchState.complete();\n }\n search() {\n if (!this.searchText) {\n this.searchResults = [];\n return;\n }\n this.currentDocumentationEntry = undefined;\n this.searchState.inProgress();\n this.searchResults = Array.from(this.searchEngine\n .search(this.searchConfigurationState.generateSearchText(this.searchText), {\n // NOTE: search for limit + 1 item so we can know if there are more search results\n limit: DOCUMENTATION_SEARCH_RESULTS_LIMIT + 1,\n })\n .values()).map((result) => new VirtualAssistantDocumentationEntry(result.item));\n // check if the search results exceed the limit\n if (this.searchResults.length > DOCUMENTATION_SEARCH_RESULTS_LIMIT) {\n this.isOverSearchLimit = true;\n this.searchResults = this.searchResults.slice(0, DOCUMENTATION_SEARCH_RESULTS_LIMIT);\n }\n else {\n this.isOverSearchLimit = false;\n }\n this.searchState.complete();\n }\n setShowSearchConfigurationMenu(val) {\n this.showSearchConfigurationMenu = val;\n }\n}\n//# sourceMappingURL=AssistantService.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { AbstractPlugin, } from '@finos/legend-shared';\nexport class EventNotifierPlugin extends AbstractPlugin {\n install(pluginManager) {\n pluginManager.registerEventNotifierPlugin(this);\n }\n}\nexport class EventService {\n notifierPlugins = [];\n registerEventNotifierPlugins(plugins) {\n this.notifierPlugins = plugins;\n }\n notify(event, data) {\n this.notifierPlugins.forEach((plugin) => plugin.notify(event, data));\n }\n}\n//# sourceMappingURL=EventService.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { APPLICATION_EVENT } from './LegendApplicationEvent.js';\nexport class LegendApplicationTelemetryHelper {\n static logEvent_ApplicationInitializationSucceeded(service, applicationStore) {\n service.logEvent(APPLICATION_EVENT.APPLICATION_LOAD__SUCCESS, {\n application: {\n name: applicationStore.config.appName,\n version: applicationStore.config.appVersion,\n env: applicationStore.config.env,\n },\n browser: {\n userAgent: navigator.userAgent,\n },\n screen: {\n height: window.screen.height,\n width: window.screen.width,\n },\n });\n }\n static logEvent_ApplicationContextAccessed(service, data) {\n service.logEvent(APPLICATION_EVENT.APPLICATION_CONTEXT__ACCESS, data);\n }\n static logEvent_VirtualAssistantDocumentationEntryAccessed(service, data) {\n service.logEvent(APPLICATION_EVENT.VIRTUAL_ASSISTANT_DOCUMENTATION_ENTRY__ACCESS, data);\n }\n static logEvent_ApplicationUsageInterrupted(service) {\n service.logEvent(APPLICATION_EVENT.APPLICATION_USAGE__INTERRUPT, {});\n }\n}\n//# sourceMappingURL=LegendApplicationTelemetry.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { IllegalStateError } from '@finos/legend-shared';\nimport { action, computed, makeObservable, observable } from 'mobx';\nimport { LegendApplicationTelemetryHelper } from '../__lib__/LegendApplicationTelemetry.js';\n/**\n * Context data refers to the area of the application that the user is\n * currently navigating.\n *\n * NOTE: note that this is navigation-driven, do not associate places\n * which present in the app screen that is not a direct consequence\n * of user's navigation. e.g. the status bar is not a good area to\n * be considered a context, the editor screen is because it means\n * the user must have navigated to the editor screen from somewhere,\n * for instance, the setup page.\n */\nexport class ApplicationNavigationContextData {\n key;\n /**\n * There are 2 types of context data: `standard` and `transient`\n * 1. standard context data represents an application context layer that\n * would be pushed to the stack and the context will be popped as we leave\n * the application, in other words, the context will be properly cleaned up\n * e.g. when we go in an editor, we will push context data to the stack and\n * pop it when we leave that editor\n * 2. transient context does not guarantee to be cleaned up properly, this\n * corresponds to application areas whose presense is transient and not stable:\n * such as those triggered by on-flight events, whose exit-state is hard to capture\n * e.g. user focuses on an input\n *\n * NOTE: transient context must not be mistakened as event, even in the example of\n * user focusing on an input, that's an area of the application that we might want\n * to get record of in terms of context. Events like a notification pop up, failure\n * of some long-running processes are not considered application contexts\n */\n isTransient = false;\n constructor(key, isTransient) {\n this.key = key;\n this.isTransient = isTransient;\n }\n static create(key) {\n return new ApplicationNavigationContextData(key, false);\n }\n static createTransient(key) {\n return new ApplicationNavigationContextData(key, true);\n }\n}\nexport class ApplicationNavigationContextService {\n applicationStore;\n contextStack = [];\n constructor(applicationStore) {\n makeObservable(this, {\n contextStack: observable,\n currentContext: computed,\n push: action,\n pop: action,\n });\n this.applicationStore = applicationStore;\n }\n get currentContext() {\n return this.contextStack.length\n ? this.contextStack[this.contextStack.length - 1]\n : undefined;\n }\n /**\n * Add the context to the stack.\n *\n * If the context is already if the context is already part of the stack\n * we will throw an error. This is to make sure we context is unique in the stack\n * and we do proper context stack cleanups on navigation.\n */\n push(context) {\n // first, filter out all transient contexts, so we can be sure that\n // all of the remaining contexts are standard and they should be cleaned up properly\n // this makes our duplication meaningful\n const newContextStack = this.contextStack.filter((ctx) => !ctx.isTransient);\n if (newContextStack.find((ctx) => ctx.key === context.key)) {\n throw new IllegalStateError(`Found multiple context '${context.key}' in application navigation context stack`);\n }\n newContextStack.push(context);\n // log the context being accessed if it's in the list of interested context keys\n if (this.applicationStore.pluginManager\n .getApplicationPlugins()\n .flatMap((plugin) => plugin.getExtraAccessEventLoggingApplicationContextKeys?.() ?? [])\n .includes(context.key)) {\n LegendApplicationTelemetryHelper.logEvent_ApplicationContextAccessed(this.applicationStore.telemetryService, {\n key: context.key,\n });\n }\n this.contextStack = newContextStack;\n }\n /**\n * Remove the context from the stack.\n *\n * NOTE: we will check from bottom of the stack up, for the specified context,\n * if it's found in the context stack, we will pop until the specified context.\n * This is to allow popping deeper context layers from very high up in the application\n * context stack, e.g. removing a context of an element editor when leaving the editor\n * to go to setup page.\n */\n pop(context) {\n const existingCtx = this.contextStack.find((ctx) => ctx.key === context.key);\n if (!existingCtx) {\n return;\n }\n // NOTE: since we should not have any duplicated contexts\n // it's safe to search from bottom to top of the stack\n const idx = this.contextStack.indexOf(existingCtx);\n if (idx !== -1) {\n this.contextStack = this.contextStack\n .slice(0, idx)\n // remove all transient contexts\n .filter((ctx) => !ctx.isTransient);\n }\n }\n}\n//# sourceMappingURL=ApplicationNavigationContextService.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { LogEvent } from '@finos/legend-shared';\nimport { action, makeObservable, observable } from 'mobx';\nimport { APPLICATION_EVENT } from '../__lib__/LegendApplicationEvent.js';\nexport const collectKeyedCommandConfigEntriesFromConfig = (rawEntries) => Object.entries(rawEntries).map((entry) => ({\n key: entry[0],\n content: entry[1],\n}));\nexport class CommandService {\n applicationStore;\n commandRegistry = new Map();\n constructor(applicationStore) {\n makeObservable(this, {\n commandRegistry: observable,\n registerCommand: action,\n deregisterCommand: action,\n });\n this.applicationStore = applicationStore;\n }\n registerCommand(command) {\n const commandKey = command.key;\n if (this.commandRegistry.has(commandKey)) {\n this.applicationStore.logService.warn(LogEvent.create(APPLICATION_EVENT.COMMAND_CENTER_REGISTRATION__FAILURE), `Can't register command: command is already registered`);\n return;\n }\n this.commandRegistry.set(commandKey, command);\n }\n deregisterCommand(commandKey) {\n this.commandRegistry.delete(commandKey);\n }\n runCommand(commandKey, args) {\n const command = this.commandRegistry.get(commandKey);\n if (command && (!command.trigger || command.trigger())) {\n command.action?.(args);\n return true;\n }\n return false;\n }\n}\n//# sourceMappingURL=CommandService.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { isNonNullable } from '@finos/legend-shared';\nimport { action, makeObservable, observable } from 'mobx';\nexport class KeyboardShortcutsService {\n applicationStore;\n /**\n * NOTE: with this design, the relationship between command and key is many-to-many\n * We can have multiple commands being mapped to the same key combination, and vice versa\n */\n keyMap = new Map();\n commandKeyMap = new Map();\n isHotkeysBlocked = false;\n constructor(applicationStore) {\n makeObservable(this, {\n keyMap: observable,\n commandKeyMap: observable,\n isHotkeysBlocked: observable,\n addHotkey: action,\n blockGlobalHotkeys: action,\n unblockGlobalHotkeys: action,\n });\n this.applicationStore = applicationStore;\n this.applicationStore.pluginManager\n .getApplicationPlugins()\n .flatMap((plugin) => plugin.getExtraKeyedCommandConfigEntries?.() ?? [])\n .forEach((entry) => {\n // NOTE: since we allow mapping multiple commands to the same key combination\n // and when dispatching the command with a particular key combination, we only\n // execute the first matching command, if we override the config, we would need\n // to add them to the beginning of this list.\n // TODO: do validation on hot keys, hot keys which consist only of modifier keys, e.g. `Shift Shift` should not be supported\n const shortcuts = [\n entry.content.defaultKeyboardShortcut,\n ...(entry.content.additionalKeyboardShortcuts ?? []),\n ].filter(isNonNullable);\n if (shortcuts.length) {\n shortcuts.forEach((shortcut) => this.addHotkey(entry.key, shortcut));\n }\n else {\n if (!this.commandKeyMap.has(entry.key)) {\n this.commandKeyMap.set(entry.key, []);\n }\n }\n });\n }\n blockGlobalHotkeys() {\n this.isHotkeysBlocked = true;\n }\n unblockGlobalHotkeys() {\n this.isHotkeysBlocked = false;\n }\n addHotkey(commandKey, keyCombination) {\n // add shortcut to command key map\n this.commandKeyMap.set(commandKey, [\n ...(this.commandKeyMap.get(commandKey) ?? []),\n keyCombination,\n ]);\n // add new key map\n this.keyMap.set(keyCombination, [\n ...(this.keyMap.get(keyCombination) ?? []).filter((key) => key !== commandKey),\n commandKey,\n ]);\n }\n dispatch(keyCombination) {\n if (this.isHotkeysBlocked) {\n return;\n }\n const mappedCommandKeys = this.keyMap.get(keyCombination) ?? [];\n for (const commandKey of mappedCommandKeys) {\n // find the first command that works then escape\n if (this.applicationStore.commandService.runCommand(commandKey)) {\n return;\n }\n }\n }\n}\n//# sourceMappingURL=KeyboardShortcutsService.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport const DEFAULT_TAB_SIZE = 2;\nexport const DEFAULT_MONOSPACED_FONT_FAMILY = 'Roboto Mono';\nexport const DEFAULT_DATE_TIME_FORMAT = \"yyyy-MM-dd'T'HH:mm:ss\";\nexport const DEFAULT_TYPEAHEAD_SEARCH_MINIMUM_SEARCH_LENGTH = 2;\nexport const DEFAULT_TYPEAHEAD_SEARCH_LIMIT = 10;\n//# sourceMappingURL=ApplicationConfig.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { action, makeObservable, observable } from 'mobx';\n// NOTE: using Unicode for ANSI escape\n// See https://stackoverflow.com/questions/26153308/best-ansi-escape-beginning\n// See https://gist.github.com/fnky/458719343aabd01cfb17a3a4f7296797\nexport var DISPLAY_ANSI_ESCAPE;\n(function (DISPLAY_ANSI_ESCAPE) {\n DISPLAY_ANSI_ESCAPE[\"RESET\"] = \"\\u001B[0m\";\n // text decoration\n DISPLAY_ANSI_ESCAPE[\"BOLD\"] = \"\\u001B[1m\";\n DISPLAY_ANSI_ESCAPE[\"DIM\"] = \"\\u001B[2m\";\n DISPLAY_ANSI_ESCAPE[\"ITALIC\"] = \"\\u001B[3m\";\n DISPLAY_ANSI_ESCAPE[\"UNDERLINE\"] = \"\\u001B[4m\";\n DISPLAY_ANSI_ESCAPE[\"BLINKING\"] = \"\\u001B[5m\";\n DISPLAY_ANSI_ESCAPE[\"STRIKETHROUGH\"] = \"\\u001B[9m\";\n // foreground\n DISPLAY_ANSI_ESCAPE[\"BLACK\"] = \"\\u001B[30m\";\n DISPLAY_ANSI_ESCAPE[\"RED\"] = \"\\u001B[31m\";\n DISPLAY_ANSI_ESCAPE[\"GREEN\"] = \"\\u001B[32m\";\n DISPLAY_ANSI_ESCAPE[\"YELLOW\"] = \"\\u001B[33m\";\n DISPLAY_ANSI_ESCAPE[\"BLUE\"] = \"\\u001B[34m\";\n DISPLAY_ANSI_ESCAPE[\"MAGENTA\"] = \"\\u001B[35m\";\n DISPLAY_ANSI_ESCAPE[\"CYAN\"] = \"\\u001B[36m\";\n DISPLAY_ANSI_ESCAPE[\"WHITE\"] = \"\\u001B[37m\";\n DISPLAY_ANSI_ESCAPE[\"BRIGHT_BLACK\"] = \"\\u001B[1;30m\";\n DISPLAY_ANSI_ESCAPE[\"BRIGHT_RED\"] = \"\\u001B[1;31m\";\n DISPLAY_ANSI_ESCAPE[\"BRIGHT_GREEN\"] = \"\\u001B[1;32m\";\n DISPLAY_ANSI_ESCAPE[\"BRIGHT_YELLOW\"] = \"\\u001B[1;33m\";\n DISPLAY_ANSI_ESCAPE[\"BRIGHT_BLUE\"] = \"\\u001B[1;34m\";\n DISPLAY_ANSI_ESCAPE[\"BRIGHT_MAGENTA\"] = \"\\u001B[1;35m\";\n DISPLAY_ANSI_ESCAPE[\"BRIGHT_CYAN\"] = \"\\u001B[1;36m\";\n DISPLAY_ANSI_ESCAPE[\"BRIGHT_WHITE\"] = \"\\u001B[1;37m\";\n DISPLAY_ANSI_ESCAPE[\"DIMMED_BLACK\"] = \"\\u001B[2;30m\";\n DISPLAY_ANSI_ESCAPE[\"DIMMED_RED\"] = \"\\u001B[2;31m\";\n DISPLAY_ANSI_ESCAPE[\"DIMMED_GREEN\"] = \"\\u001B[2;32m\";\n DISPLAY_ANSI_ESCAPE[\"DIMMED_YELLOW\"] = \"\\u001B[2;33m\";\n DISPLAY_ANSI_ESCAPE[\"DIMMED_BLUE\"] = \"\\u001B[2;34m\";\n DISPLAY_ANSI_ESCAPE[\"DIMMED_MAGENTA\"] = \"\\u001B[2;35m\";\n DISPLAY_ANSI_ESCAPE[\"DIMMED_CYAN\"] = \"\\u001B[2;36m\";\n DISPLAY_ANSI_ESCAPE[\"DIMMED_WHITE\"] = \"\\u001B[2;37m\";\n // background\n DISPLAY_ANSI_ESCAPE[\"BLACK_BG\"] = \"\\u001B[40m\";\n DISPLAY_ANSI_ESCAPE[\"RED_BG\"] = \"\\u001B[41m\";\n DISPLAY_ANSI_ESCAPE[\"GREEN_BG\"] = \"\\u001B[42m\";\n DISPLAY_ANSI_ESCAPE[\"YELLOW_BG\"] = \"\\u001B[43m\";\n DISPLAY_ANSI_ESCAPE[\"BLUE_BG\"] = \"\\u001B[44m\";\n DISPLAY_ANSI_ESCAPE[\"MAGENTA_BG\"] = \"\\u001B[45m\";\n DISPLAY_ANSI_ESCAPE[\"CYAN_BG\"] = \"\\u001B[46m\";\n DISPLAY_ANSI_ESCAPE[\"WHITE_BG\"] = \"\\u001B[47m\";\n DISPLAY_ANSI_ESCAPE[\"BRIGHT_BLACK_BG\"] = \"\\u001B[1;40m\";\n DISPLAY_ANSI_ESCAPE[\"BRIGHT_RED_BG\"] = \"\\u001B[1;41m\";\n DISPLAY_ANSI_ESCAPE[\"BRIGHT_GREEN_BG\"] = \"\\u001B[1;42m\";\n DISPLAY_ANSI_ESCAPE[\"BRIGHT_YELLOW_BG\"] = \"\\u001B[1;43m\";\n DISPLAY_ANSI_ESCAPE[\"BRIGHT_BLUE_BG\"] = \"\\u001B[1;44m\";\n DISPLAY_ANSI_ESCAPE[\"BRIGHT_MAGENTA_BG\"] = \"\\u001B[1;45m\";\n DISPLAY_ANSI_ESCAPE[\"BRIGHT_CYAN_BG\"] = \"\\u001B[1;46m\";\n DISPLAY_ANSI_ESCAPE[\"BRIGHT_WHITE_BG\"] = \"\\u001B[1;47m\";\n DISPLAY_ANSI_ESCAPE[\"DIMMED_BLACK_BG\"] = \"\\u001B[2;40m\";\n DISPLAY_ANSI_ESCAPE[\"DIMMED_RED_BG\"] = \"\\u001B[2;41m\";\n DISPLAY_ANSI_ESCAPE[\"DIMMED_GREEN_BG\"] = \"\\u001B[2;42m\";\n DISPLAY_ANSI_ESCAPE[\"DIMMED_YELLOW_BG\"] = \"\\u001B[2;43m\";\n DISPLAY_ANSI_ESCAPE[\"DIMMED_BLUE_BG\"] = \"\\u001B[2;44m\";\n DISPLAY_ANSI_ESCAPE[\"DIMMED_MAGENTA_BG\"] = \"\\u001B[2;45m\";\n DISPLAY_ANSI_ESCAPE[\"DIMMED_CYAN_BG\"] = \"\\u001B[2;46m\";\n DISPLAY_ANSI_ESCAPE[\"DIMMED_WHITE_BG\"] = \"\\u001B[2;47m\";\n})(DISPLAY_ANSI_ESCAPE || (DISPLAY_ANSI_ESCAPE = {}));\n/**\n * NOTE: this is the line and the column of the viewport of the terminal;\n * Also, line and column start from 1\n */\nexport const ANSI_moveCursor = (line, column) => `\\x1b[${line};${column}H`;\nexport const ANSI_moveCursorUp = (val, start) => start ? `\\x1b[${val}F` : `\\x1b[${val}A`;\nexport const ANSI_moveCursorDown = (val, start) => start ? `\\x1b[${val}E` : `\\x1b[${val}B`;\nexport const ANSI_moveCursorRight = (val) => `\\x1b[${val}C`;\nexport const ANSI_moveCursorLeft = (val) => `\\x1b[${val}D`;\nexport const ANSI_moveCursorToColumn = (val) => `\\x1b[${val}G`;\nclass ConsoleSearchConfiguration {\n searchInput;\n searchText = '';\n useRegex = false;\n matchWholeWord = false;\n matchCaseSensitive = false;\n resultCount;\n currentResultIndex;\n constructor() {\n makeObservable(this, {\n searchText: observable,\n useRegex: observable,\n matchWholeWord: observable,\n matchCaseSensitive: observable,\n resultCount: observable,\n currentResultIndex: observable,\n });\n }\n setSearchInput(el) {\n this.searchInput = el;\n }\n focus() {\n this.searchInput?.focus();\n }\n}\nexport class Console {\n applicationStore;\n searchConfig = new ConsoleSearchConfiguration();\n constructor(applicationStore) {\n makeObservable(this, {\n setSearchText: action,\n setSearchRegex: action,\n setSearchWholeWord: action,\n setSearchCaseSensitive: action,\n setSearchResultCount: action,\n setSearchCurrentResultIndex: action,\n });\n this.applicationStore = applicationStore;\n }\n setSearchText(val) {\n this.searchConfig.searchText = val;\n }\n setSearchRegex(val) {\n this.searchConfig.useRegex = val;\n }\n setSearchWholeWord(val) {\n this.searchConfig.matchWholeWord = val;\n }\n setSearchCaseSensitive(val) {\n this.searchConfig.matchCaseSensitive = val;\n }\n setSearchResultCount(val) {\n this.searchConfig.resultCount = val;\n }\n setSearchCurrentResultIndex(val) {\n this.searchConfig.currentResultIndex = val;\n }\n}\nexport class OutputConsole extends Console {\n}\nexport class Terminal extends Console {\n preserveLog = false;\n commandRegistry = new Map();\n constructor(applicationStore) {\n super(applicationStore);\n makeObservable(this, {\n preserveLog: observable,\n setPreserveLog: action,\n });\n }\n setPreserveLog(val) {\n this.preserveLog = val;\n }\n showHelp() {\n // do nothing\n }\n showCommonANSIEscapeSequences() {\n // do nothing\n }\n}\n//# sourceMappingURL=Terminal.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { stringify as losslessStringify, parse as losslessParse, isSafeNumber as lossIsSafeNumber, } from 'lossless-json';\nimport CSVParser from 'papaparse';\nimport { assertNonNullable } from '../error/AssertionUtils.js';\nexport const capitalize = (value) => value.length >= 1\n ? `${value[0].toUpperCase()}${value.substring(1, value.length)}`\n : value;\nexport const toSentenceCase = (value) => (value ?? '').trim().replace(/^(?:\\w+)\\b/u, (val) => capitalize(val));\nexport const TITLE_CASE_EXCEPTION_WORDS = [\n // We roughly follow AP style for simplicity\n // See https://en.wikipedia.org/wiki/Title_case\n 'a',\n 'an',\n 'the',\n 'but',\n 'by',\n 'nor',\n 'and',\n 'or',\n 'so',\n 'as',\n 'yet',\n 'for',\n 'in',\n 'nor',\n 'of',\n 'on',\n 'at',\n 'out',\n 'to',\n 'up',\n];\nexport const toTitleCase = (value) => (value ?? '')\n .trim()\n .replace(/\\b(?:\\w+)\\b/gu, (val) => {\n // lowercase minor words (typically articles, short prepositions, and some conjunctions)\n if (TITLE_CASE_EXCEPTION_WORDS.includes(val.toLowerCase())) {\n return val.toLowerCase();\n }\n return capitalize(val);\n})\n // always capitalize first and last word\n .replace(/^(?:\\w+)\\b/u, (val) => capitalize(val))\n .replace(/\\b(?:\\w+)$/u, (val) => capitalize(val));\nexport const prettyCONSTName = (value) => {\n if (!value) {\n return '';\n }\n // This handles our constant naming convention, e.g. SOME_VALUE, __PRIVATE_VALUE__, etc.\n if (value.trim().match(/^[A-Z_]+$/)) {\n return toTitleCase(value.trim().replace(/_+/gu, ' ').toLowerCase());\n }\n return (capitalize(value.trim())\n // NOTE: here we must use capturing group as we also need to capture the breakpoint/separator as chunks\n .split(/(?<chunk>[A-Z][a-z]+|[0-9]+)/)\n .map((chunk) => chunk.toUpperCase() === chunk\n ? chunk\n : chunk.charAt(0).toUpperCase() + chunk.slice(1).toLowerCase())\n .filter(Boolean)\n .join(' ')\n .replace(/_+/gu, ' ')\n .replace(/\\s+/gu, ' '));\n};\nexport const tryToFormatJSONString = (value, tabSize = 2) => {\n try {\n return JSON.stringify(JSON.parse(value), undefined, tabSize);\n }\n catch {\n return value;\n }\n};\nexport const tryToMinifyJSONString = (value) => {\n try {\n return JSON.stringify(JSON.parse(value));\n }\n catch {\n return value.replace(/\\n\\s*/g, '');\n }\n};\n/**\n * NOTE: this splits a string value into an array of strings by using a\n * delimiter of a comma if the string is only one line. However, if the\n * string has multiple lines, the delimiter will not be applied. This is so\n * that for an example input of multiple lines like\n * One, Comma in One\n * Two\n * Three\n * will still equal 3 elements (['One, Comma in One', 'Two', 'Three']) rather than 4\n */\nexport const parseCSVString = (value) => {\n let parseData;\n if (value.includes('\\n')) {\n parseData = value.trim().split(/\\r?\\n|\\r|\\n/g);\n return parseData;\n }\n else {\n const parseResult = CSVParser.parse(value.trim(), {\n delimiter: ',',\n });\n parseData = parseResult.data.flat();\n if (parseResult.errors.length) {\n // if (\n // parseResult.errors[0] &&\n // parseResult.errors[0].code === 'UndetectableDelimiter' &&\n // parseResult.errors[0].type === 'Delimiter' &&\n // parseResult.data.length === 1\n // ) {\n // // NOTE: this happens when the user only put one item in the value input\n // // we can go the other way by ensure the input has a comma but this is arguably neater\n // // as it tinkers with the parser\n // } else {\n // // there were some parsing error, escape\n // // NOTE: ideally, we could show a warning here\n // }\n return undefined;\n }\n else {\n return parseData;\n }\n }\n};\nexport const csvStringify = (value) => CSVParser.unparse(value);\n/**\n * One very common use case is that we get the JSON as response from the server than we will convert this to a string and persist\n * in the protocol. As such, we have to make sure this string is safe in PURE grammar format, i.e. it will escape single quotes\n * properly since PURE strings are wrapped in a pair of single quotes. The following pair of escape/unescape method does the simple job of\n * converting a JSON string to/from PURE grammar string\n *\n * NOTE: this is slightly different than escaping/unescaping JS string or normal JSON string, this is conversion is actually simplier since\n * the escaping is naturally handling by string conversion in Javascript, we just need to have special handling for the escaping of single-quotes\n * See https://stackoverflow.com/questions/3020094/how-should-i-escape-strings-in-json\n * See https://github.com/joliss/js-string-escape/blob/master/index.js\n */\nexport const fromGrammarString = (value) => value.replace(/\\\\'/gu, \"'\");\nexport const toGrammarString = (value) => value.replace(/'/gu, \"\\\\'\");\n/**\n * These are the sets of methods that helps with lossless conversion of JSON to/from text.\n *\n * The implementation of `JSON.parse` and `JSON.stringify` in Javascript is not lossless, e.g. values like 1.0 (a double) is automatically converted to 1 (an integer).\n * This pairs of method will convert the JSON losslessly. One caveat is that numeric values are stored as LosslessNumber, a data type which stores the numeric value as a string.\n *\n * NOTE: One can perform regular operations with a LosslessNumber, and it will throw an error when this would result in losing information.\n * But use this with discretion since it it does not result in the same object as `JSON.parse`\n */\nexport { losslessParse as parseLosslessJSON };\nexport { lossIsSafeNumber as isLossSafeNumber };\nexport const stringifyLosslessJSON = (val, replacer, space) => {\n const result = losslessStringify(val, replacer, space);\n assertNonNullable(result, `Can't stringify lossless JSON value`);\n return result;\n};\nexport const tryToFormatLosslessJSONString = (value, tabSize = 2) => {\n try {\n return stringifyLosslessJSON(losslessParse(value), undefined, tabSize);\n }\n catch {\n return value;\n }\n};\nexport const tryToMinifyLosslessJSONString = (value) => {\n try {\n return tryToFormatLosslessJSONString(value, 0);\n }\n catch {\n return value.replace(/\\n\\s*/g, '');\n }\n};\nexport const indent = (value, indentText) => value\n .split('\\n')\n .map((line) => `${indentText}${line}`)\n .join('\\n');\nexport const quantify = (value, label, pluralForm) => value <= 0\n ? `no ${pluralForm ?? `${label}s`}`\n : value > 1\n ? `${value} ${pluralForm ?? `${label}s`}`\n : `1 ${label}`;\nexport const quantifyList = (val, label, pluralForm) => quantify(val.length, label, pluralForm);\n//# sourceMappingURL=FormatterUtils.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { uniqBy } from '../CommonUtils.js';\nimport { guaranteeNonNullable } from '../error/AssertionUtils.js';\n/**\n * List of keyboard named key\n * See https://www.w3.org/TR/uievents-key/#named-key-attribute-values\n * See https://developer.mozilla.org/en-US/docs/Web/API/UI_Events/Keyboard_event_key_values\n */\nexport var KEYBOARD_NAMED_KEY;\n(function (KEYBOARD_NAMED_KEY) {\n KEYBOARD_NAMED_KEY[\"TAB\"] = \"Tab\";\n KEYBOARD_NAMED_KEY[\"CAPSLOCK\"] = \"CapsLock\";\n KEYBOARD_NAMED_KEY[\"SHIFT\"] = \"Shift\";\n KEYBOARD_NAMED_KEY[\"META\"] = \"Meta\";\n KEYBOARD_NAMED_KEY[\"ALT\"] = \"Alt\";\n KEYBOARD_NAMED_KEY[\"CONTROL\"] = \"Control\";\n KEYBOARD_NAMED_KEY[\"SPACE\"] = \"Space\";\n KEYBOARD_NAMED_KEY[\"ESC\"] = \"Escape\";\n KEYBOARD_NAMED_KEY[\"LEFT\"] = \"ArrowLeft\";\n KEYBOARD_NAMED_KEY[\"RIGHT\"] = \"ArrowRight\";\n KEYBOARD_NAMED_KEY[\"UP\"] = \"ArrowUp\";\n KEYBOARD_NAMED_KEY[\"DOWN\"] = \"ArrowDown\";\n KEYBOARD_NAMED_KEY[\"ENTER\"] = \"Enter\";\n KEYBOARD_NAMED_KEY[\"DELETE\"] = \"Delete\";\n KEYBOARD_NAMED_KEY[\"BACKSPACE\"] = \"Backspace\";\n KEYBOARD_NAMED_KEY[\"BACKQUOTE\"] = \"Backquote\";\n})(KEYBOARD_NAMED_KEY || (KEYBOARD_NAMED_KEY = {}));\n/**\n * Parses key bindings and pack them into parts\n *\n * grammar = `<sequence>`\n * <sequence> = `<press> <press> <press> ...`\n * <press> = `<key>` or `<mods>+<key>`\n * <mods> = `<mod>+<mod>+...`\n */\nexport function parseKeybinding(value) {\n return value\n .trim()\n .split(' ')\n .map((press) => {\n const modifiers = press.split(/\\b\\+/);\n const key = guaranteeNonNullable(modifiers.pop(), `Can't parse key binding: last part must be a non-modifier key`);\n return { modifiers, key };\n });\n}\n/**\n * Checks if a series of keypress events matches a key binding sequence either partially or exactly.\n */\nexport const isMatchingKeyPressData = (event, keyPressData) => \n// NOTE: we allow specifying with `event.code` only\n// - key: value of the key pressed by the user, taking into consideration the state of modifier keys\n// such as `Shift` as well as the keyboard locale and layout. This is not desirable, because\n// for matching, we have to do uppercase comparison, in Mac, if we presss Alt+B for example, we will\n// get symbols\n// - code: represents a physical key on the keyboard (as opposed to the character generated by pressing the key);\n// i.e. this property returns a value that isn't altered by keyboard layout or the state of the modifier keys\n// See https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key\n// See https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/code\nkeyPressData.key === event.code &&\n // ensure all the modifiers in the keybinding are pressed\n keyPressData.modifiers.every((modifier) => event.getModifierState(modifier)) &&\n // modifier keys (Shift, Control, etc.) change the meaning of a keybinding,\n // so if they are pressed but aren't part of the current keypress sequence, it's not a match.\n ![\n KEYBOARD_NAMED_KEY.SHIFT,\n KEYBOARD_NAMED_KEY.META,\n KEYBOARD_NAMED_KEY.ALT,\n KEYBOARD_NAMED_KEY.CONTROL,\n ].find((modifier) => \n // check if the current key pressed is one of the modifier keys\n keyPressData.key !== modifier &&\n event.getModifierState(modifier) &&\n // check if the modifier key pressed is part of the key combination\n !keyPressData.modifiers.includes(modifier));\nexport const isMatchingKeyCombination = (event, keyCombination) => isMatchingKeyPressData(event, guaranteeNonNullable(parseKeybinding(keyCombination)[0]));\n/**\n * Create event listener for keyboard event (recommended to be used with `keydown/keyup` event)\n *\n * This succinct logic is adapted from `tinykeys`\n * See https://github.com/jamiebuilds/tinykeys\n */\nexport function createKeybindingsHandler(config) {\n // this holds the possible hotkey matches for the current sequence of keyboard events\n const possibleMatches = new Map();\n // NOTE: this timer is used to time the duration between key presses to determine when to\n // cancel the sequence, we set the default timeout to be 1000, as short timeout\n // can be slightly too fast for users\n let timer = null;\n const DEFAULT_TIMEOUT_DURATION = 1000;\n return (event) => {\n // Ensure and stop any event that isn't an keyboard event.\n // e.g. auto-complete option navigation and selection could fire an event\n if (!(event instanceof KeyboardEvent)) {\n return;\n }\n // NOTE: create a flat collection of key combination to handler, make sure\n // for each combination, only the first matching entry is considered,\n // i.e. explicitly here, we don't handle multiple handling\n // See https://github.com/finos/legend-studio/issues/1969\n uniqBy(Object.values(config)\n .flatMap((entry) => entry.combinations.map((combination) => ({\n combination,\n handler: entry.handler,\n })))\n .filter((entry) => entry.combination.length), (val) => val.combination)\n // here, we go through each hotkey combination, and:\n // 1. parse the key combination\n // 2. if the key combination is already part of the possible matches,\n // retrieve the current match result: this result is the list of the\n // keypresses left to complete the combination, else, we just add the\n // new combination and proceed the same way\n .forEach((entry) => {\n const keyCombination = entry.combination;\n const parsedKeyCombination = parseKeybinding(entry.combination);\n // abort when we encounter an empty key combination\n if (!parsedKeyCombination.length) {\n return;\n }\n const remainingExpectedKeyPresses = possibleMatches.get(keyCombination) ?? parsedKeyCombination;\n // this should never be empty, as it becomes empty, it must mean:\n // 1. either the key combination has been matched before and not cleared\n // 2. the key combination is empty, which should not be possible due to the guard above\n const currentExpectedKeyPress = guaranteeNonNullable(remainingExpectedKeyPresses[0]);\n const matches = isMatchingKeyPressData(event, currentExpectedKeyPress);\n if (!matches) {\n // if the current key pressed is a modifier key\n // we don't consider this as a non-match yet\n // NOTE: here we use `event.key` instead of `event.code` since for `Shift` key,\n // the key is always `Shift` where the key code can be `ShiftLeft`\n if (!event.getModifierState(event.key)) {\n possibleMatches.delete(keyCombination);\n }\n }\n else if (remainingExpectedKeyPresses.length > 1) {\n // matches found, not all keypresses of the key combination have been fulfilled, remove\n // the matched keypress part of the combination (if it's in the list of possible matches)\n possibleMatches.set(keyCombination, remainingExpectedKeyPresses.slice(1));\n }\n else {\n // matches found, all keypresses of the combination have been fulfilled, call the handler\n possibleMatches.delete(keyCombination);\n entry.handler(keyCombination, event);\n }\n });\n if (timer) {\n clearTimeout(timer);\n }\n timer = setTimeout(possibleMatches.clear.bind(possibleMatches), DEFAULT_TIMEOUT_DURATION);\n };\n}\n//# sourceMappingURL=KeyBinding.js.map","import { jsx as _jsx } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { createTheme, 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), \"data-testid\": props['data-testid'], children: children }));\n };\n component.displayName = componentName;\n return component;\n};\n//# sourceMappingURL=ComponentCreatorUtils.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { prettyCONSTName, toTitleCase } from '@finos/legend-shared';\nimport { clsx } from 'clsx';\nimport { generateSimpleDIVComponent } from '../utils/ComponentCreatorUtils.js';\nexport const Modal = (props) => {\n const { children, darkMode, className } = props;\n return (_jsx(\"div\", { className: clsx('modal', { 'modal--dark': darkMode }, className), children: children }));\n};\nexport const ModalTitle = (props) => {\n const { title, icon, className } = props;\n return (_jsxs(\"div\", { className: clsx('modal__title', className), children: [icon && _jsx(\"div\", { className: \"modal__title__icon\", children: icon }), _jsx(\"div\", { className: \"modal__title__label\", children: toTitleCase(title) })] }));\n};\nexport const ModalHeader = (props) => {\n const { title, children, className } = props;\n if (!children && title) {\n return (_jsx(\"div\", { className: clsx('modal__header', className), children: _jsx(ModalTitle, { title: title }) }));\n }\n return _jsx(\"div\", { className: clsx('modal__header', className), children: children });\n};\nexport const ModalHeaderActions = generateSimpleDIVComponent('ModalHeaderActions', 'modal__header__actions');\nexport const ModalBody = generateSimpleDIVComponent('ModalBody', 'modal__body');\nexport const ModalFooter = generateSimpleDIVComponent('ModalFooter', 'modal__footer');\nexport const ModalFooterStatus = generateSimpleDIVComponent('ModalFooterStatus', 'modal__footer__status');\nexport const ModalFooterButton = (props) => {\n const { onClick, inProgressText, text, title, children, disabled, className, darkMode, formatText, type, preventFormSubmit, } = props;\n const isDarkMode = darkMode ?? true;\n const isFormatText = formatText ?? true;\n const isSecondary = type === 'secondary';\n const isPreventFormSubmit = preventFormSubmit ?? false;\n return (_jsxs(\"button\", { className: clsx('btn', 'modal__footer__btn', {\n 'btn--dark': isDarkMode,\n 'btn--light': !isDarkMode,\n 'modal__footer__btn--primary': !isSecondary,\n 'modal__footer__btn--secondary': isSecondary,\n }, className), title: title, onClick: onClick, disabled: Boolean(inProgressText) || disabled, type: isPreventFormSubmit ? 'button' : undefined, children: [inProgressText\n ? prettyCONSTName(inProgressText)\n : isFormatText\n ? prettyCONSTName(text)\n : text, children] }));\n};\n//# sourceMappingURL=Modal.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { action, makeObservable, observable } from 'mobx';\nexport var ActionAlertType;\n(function (ActionAlertType) {\n ActionAlertType[\"STANDARD\"] = \"STANDARD\";\n ActionAlertType[\"CAUTION\"] = \"CAUTION\";\n ActionAlertType[\"ERROR\"] = \"ERROR\";\n})(ActionAlertType || (ActionAlertType = {}));\nexport var ActionAlertActionType;\n(function (ActionAlertActionType) {\n ActionAlertActionType[\"STANDARD\"] = \"STANDARD\";\n ActionAlertActionType[\"PROCEED_WITH_CAUTION\"] = \"PROCEED_WITH_CAUTION\";\n ActionAlertActionType[\"PROCEED\"] = \"PROCEED\";\n})(ActionAlertActionType || (ActionAlertActionType = {}));\nexport class AlertService {\n applicationStore;\n blockingAlertInfo;\n actionAlertInfo;\n constructor(applicationStore) {\n makeObservable(this, {\n blockingAlertInfo: observable,\n actionAlertInfo: observable,\n setBlockingAlert: action,\n setActionAlertInfo: action,\n });\n this.applicationStore = applicationStore;\n }\n setBlockingAlert(alertInfo) {\n if (alertInfo) {\n this.applicationStore.keyboardShortcutsService.blockGlobalHotkeys();\n }\n else {\n this.applicationStore.keyboardShortcutsService.unblockGlobalHotkeys();\n }\n this.blockingAlertInfo = alertInfo;\n }\n setActionAlertInfo(alertInfo) {\n if (this.actionAlertInfo && alertInfo) {\n this.applicationStore.notificationService.notifyIllegalState('Action alert is stacked: new alert is invoked while another one is being displayed');\n }\n if (alertInfo) {\n this.applicationStore.keyboardShortcutsService.blockGlobalHotkeys();\n }\n else {\n this.applicationStore.keyboardShortcutsService.unblockGlobalHotkeys();\n }\n this.actionAlertInfo = alertInfo;\n }\n}\n//# sourceMappingURL=AlertService.js.map","import { jsx as _jsx } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { createContext, useContext } from 'react';\nimport { useLocalObservable } from 'mobx-react-lite';\nimport { guaranteeNonNullable } from '@finos/legend-shared';\nconst ApplicationStoreContext = createContext(undefined);\nexport const useApplicationStore = () => guaranteeNonNullable(useContext(ApplicationStoreContext), `Can't find application store in context`);\nexport const ApplicationStoreProvider = ({ children, store, }) => {\n const applicationStore = useLocalObservable(() => store);\n return (_jsx(ApplicationStoreContext.Provider, { value: applicationStore, children: children }));\n};\n//# sourceMappingURL=ApplicationStoreProvider.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { Dialog, ModalBody, ModalFooter, ModalHeader } from '@finos/legend-art';\nimport { ActionAlertActionType, ActionAlertType, } from '../stores/AlertService.js';\nimport { observer } from 'mobx-react-lite';\nimport { noop } from '@finos/legend-shared';\nimport { useApplicationStore } from './ApplicationStoreProvider.js';\nconst getActionButtonClassName = (type) => {\n switch (type) {\n case ActionAlertActionType.PROCEED_WITH_CAUTION:\n return 'btn--caution';\n case ActionAlertActionType.PROCEED:\n case ActionAlertActionType.STANDARD:\n default:\n return 'btn--dark';\n }\n};\nconst ActionAlertContent = observer((props) => {\n const { info } = props;\n const applicationStore = useApplicationStore();\n const { title, message, prompt, type, onClose, onEnter, actions } = info;\n const handleClose = () => {\n onClose?.();\n applicationStore.alertService.setActionAlertInfo(undefined);\n };\n const handleEnter = () => onEnter?.();\n const handleSubmit = () => {\n actions.find((action) => action.default)?.handler?.();\n handleClose();\n };\n return (_jsx(Dialog, { open: Boolean(applicationStore.alertService.actionAlertInfo), onClose: noop, 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, idx) => {\n // NOTE: need to prevent default for the submit button, otherwise, we would get the warning \"Form submission canceled because the form is not connected\"\n // See https://stackoverflow.com/a/58234405\n const handler = (e) => {\n e.preventDefault();\n action.handler?.();\n handleClose();\n };\n return (_jsx(\"button\", { type: action.default ? 'submit' : 'button', className: `btn btn--dark ${getActionButtonClassName(action.type ?? ActionAlertActionType.STANDARD)}`, onClick: handler, autoFocus: Boolean(action.default), children: action.label }, idx));\n }), !actions.length && (_jsx(\"button\", { type: \"button\" // prevent this toggler being activated on form submission\n , className: \"btn btn--dark blocking-alert__action--standard\", onClick: handleClose, children: \"Cancel\" }))] })] }) }));\n});\nexport const ActionAlert = observer(() => {\n const applicationStore = useApplicationStore();\n const actionAlertInfo = applicationStore.alertService.actionAlertInfo;\n if (!actionAlertInfo) {\n return null;\n }\n return _jsx(ActionAlertContent, { info: actionAlertInfo });\n});\n//# sourceMappingURL=ActionAlert.js.map","import { jsx as _jsx } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { useEffect, useRef } from 'react';\nimport { clsx } from '../utils/ComponentUtils.js';\nexport const PanelLoadingIndicator = (props) => {\n const { isLoading, className } = props;\n const ref = useRef(null);\n useEffect(() => {\n if (ref.current) {\n if (isLoading) {\n ref.current.parentElement?.classList.add('panel-loading-indicator__container');\n }\n else {\n ref.current.parentElement?.classList.remove('panel-loading-indicator__container');\n }\n }\n }, [isLoading]);\n return (_jsx(\"div\", { ref: ref, className: clsx(className, `panel-loading-indicator${isLoading ? '' : '--disabled'}`) }));\n};\n//# sourceMappingURL=PanelLoadingIndicator.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { observer } from 'mobx-react-lite';\nimport { PanelLoadingIndicator, Dialog, Modal, ModalBody, } from '@finos/legend-art';\nimport { noop } from '@finos/legend-shared';\nimport { useApplicationStore } from './ApplicationStoreProvider.js';\n/**\n * The users of this need to justify their use case because blocking app disrupts the UX flow.\n * Of course there are legitimate use cases but please consult the team when you do so.\n * See https://material.io/components/dialogs#usage\n */\nexport const BlockingAlert = observer(() => {\n const applicationStore = useApplicationStore();\n const info = applicationStore.alertService.blockingAlertInfo;\n if (!info) {\n return null;\n }\n return (_jsx(Dialog, { open: Boolean(info), onClose: noop, classes: {\n root: 'blocking-alert__root-container',\n container: 'blocking-alert__container',\n }, children: _jsxs(Modal, { darkMode: !applicationStore.layoutService.TEMPORARY__isLightColorThemeEnabled, className: \"blocking-alert\", children: [_jsx(PanelLoadingIndicator, { isLoading: Boolean(info.showLoading) }), _jsxs(ModalBody, { children: [_jsx(\"div\", { className: \"blocking-alert__message\", children: info.message }), info.prompt && (_jsx(\"div\", { className: \"blocking-alert__message__prompt\", children: info.prompt }))] })] }) }));\n});\n//# sourceMappingURL=BlockingAlert.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//======================================================= TB =======================================================\nimport { TbArrowsJoin2, TbArrowsSplit2, TbMathFunction, TbBook, TbCircleOff, TbCalendarTime, TbClockEdit, TbSql, TbBrandSnowflake, } from 'react-icons/tb';\nexport const ArrowsJoinIcon = TbArrowsJoin2;\nexport const ArrowsSplitIcon = TbArrowsSplit2;\nexport const FunctionIcon = TbMathFunction;\nexport const RepoIcon = TbBook;\nexport const OffIcon = TbCircleOff;\nexport const CalendarClockIcon = TbCalendarTime;\nexport const LastModifiedIcon = TbClockEdit;\nexport const SQLIcon = TbSql;\nexport const Snowflake_BrandIcon = TbBrandSnowflake;\n//======================================================= MD =======================================================\nimport { MdManageSearch, MdModeEdit, MdTextFields, MdMoreVert, MdMoreHoriz, MdWrapText, MdSaveAs, MdSave, MdVerticalAlignBottom, MdRefresh, MdFunctions, MdCompareArrows, MdPlaylistAddCheck, MdAdd, // to be reviewed\nMdEdit, // to be reviewed\nMdSubject, MdViewHeadline, MdAssistant, MdSettingsEthernet, MdLink, MdWindow, MdReviews, MdCalculate, MdRocketLaunch, MdOutlineDataset, MdVerified, MdQueryStats, MdFilterCenterFocus, MdOutlineDescription, MdQuestionAnswer, MdUnfoldLess, MdUnfoldMore, } from 'react-icons/md';\nexport const ManageSearchIcon = MdManageSearch; // to be reviewed\nexport const PencilIcon = MdModeEdit;\nexport const StringTypeIcon = MdTextFields;\nexport const MoreVerticalIcon = MdMoreVert;\nexport const MoreHorizontalIcon = MdMoreHoriz;\nexport const WrapTextIcon = MdWrapText;\nexport const SaveAsIcon = MdSaveAs;\nexport const SaveCurrIcon = MdSave;\nexport const VerticalAlignBottomIcon = MdVerticalAlignBottom;\nexport const RefreshIcon = MdRefresh;\nexport const SigmaIcon = MdFunctions;\nexport const CompareIcon = MdCompareArrows;\nexport const CheckListIcon = MdPlaylistAddCheck;\nexport const AddIcon = MdAdd; // to be reviewed\nexport const EditIcon = MdEdit; // to be reviewed\nexport const SubjectIcon = MdSubject;\nexport const ViewHeadlineIcon = MdViewHeadline;\nexport const AssistantIcon = MdAssistant;\nexport const SettingsEthernetIcon = MdSettingsEthernet;\nexport const LinkIcon = MdLink;\nexport const WindowIcon = MdWindow;\nexport const ReviewIcon = MdReviews;\nexport const CalculateIcon = MdCalculate;\nexport const LaunchIcon = MdRocketLaunch;\nexport const DatasetIcon = MdOutlineDataset;\nexport const VerifiedIcon = MdVerified;\nexport const QueryIcon = MdQueryStats;\nexport const CenterFocusIcon = MdFilterCenterFocus;\nexport const DescriptionIcon = MdOutlineDescription;\nexport const QuestionAnswerIcon = MdQuestionAnswer;\nexport const FoldIcon = MdUnfoldLess;\nexport const UnfoldIcon = MdUnfoldMore;\n//======================================================= VSC =======================================================\nimport { VscDebug, VscError, VscWarning, VscWordWrap, VscGoToFile, VscClose, VscRunAll, VscRunErrors, VscOpenPreview, VscDiff, VscRegex, VscVersions, VscCaseSensitive, VscWholeWord, VscReferences, VscWand, VscCollapseAll, VscExpandAll, VscJson, VscTable, } from 'react-icons/vsc';\nexport const DebugIcon = VscDebug;\nexport const ErrorIcon = VscError;\nexport const WarningIcon = VscWarning;\nexport const WordWrapIcon = VscWordWrap;\nexport const GoToFileIcon = VscGoToFile;\nexport const CloseIcon = VscClose;\nexport const RunAllIcon = VscRunAll;\nexport const RunErrorsIcon = VscRunErrors;\nexport const OpenPreviewIcon = VscOpenPreview;\nexport const DiffIcon = VscDiff;\nexport const RegexIcon = VscRegex;\nexport const VersionsIcon = VscVersions;\nexport const CaseSensitiveIcon = VscCaseSensitive;\nexport const WholeWordMatchIcon = VscWholeWord;\nexport const ReferencesIcon = VscReferences;\nexport const WandIcon = VscWand;\nexport const CollapseTreeIcon = VscCollapseAll;\nexport const ExpandTreeIcon = VscExpandAll;\nexport const SerializeIcon = VscJson;\nexport const TableIcon = VscTable;\n//======================================================= BS =======================================================\nimport { BsFillTriangleFill, BsFillFileEarmarkSpreadsheetFill, BsBoxSeam, BsGripVertical, BsAlignTop, BsAlignMiddle, BsAlignBottom, BsAlignStart, BsAlignCenter, BsAlignEnd, BsDistributeHorizontal, BsDistributeVertical, BsDatabaseFillLock, BsDatabaseFillCheck, BsChevronUp, BsChevronDown, BsChevronRight, BsChevronLeft, BsQuestionSquare, BsQuestionSquareFill, BsTextLeft, } from 'react-icons/bs';\nexport const FilledTriangleIcon = BsFillTriangleFill;\nexport const TabulatedDataFileIcon = BsFillFileEarmarkSpreadsheetFill;\nexport const BundleIcon = BsBoxSeam;\nexport const ThinVerticalDragHandleIcon = BsGripVertical;\nexport const AlignTopIcon = BsAlignTop;\nexport const AlignMiddleIcon = BsAlignMiddle;\nexport const AlignBottomIcon = BsAlignBottom;\nexport const AlignStartIcon = BsAlignStart;\nexport const AlignCenterIcon = BsAlignCenter;\nexport const AlignEndIcon = BsAlignEnd;\nexport const DistributeHorizontalIcon = BsDistributeHorizontal;\nexport const DistributeVerticalIcon = BsDistributeVertical;\nexport const DataAccessIcon = BsDatabaseFillLock;\nexport const DataReadyIcon = BsDatabaseFillCheck;\nexport const ThinChevronUpIcon = BsChevronUp;\nexport const ThinChevronDownIcon = BsChevronDown;\nexport const ThinChevronRightIcon = BsChevronRight;\nexport const ThinChevronLeftIcon = BsChevronLeft;\nexport const QuestionSquareIcon = BsQuestionSquare;\nexport const QuestionSquareFillIcon = BsQuestionSquareFill;\nexport const GenericTextFileIcon = BsTextLeft;\n//======================================================= HI =======================================================\nimport { HiCode, HiHome, HiOutlineDocumentReport } from 'react-icons/hi';\nexport const ReportIcon = HiOutlineDocumentReport;\nexport const CodeIcon = HiCode;\nexport const HomeIcon = HiHome;\n//======================================================= io5 =======================================================\nimport { IoOpenOutline, IoResize, IoFileTrayFullOutline, IoMenuOutline, IoBeaker, IoFlaskSharp, IoSyncCircleSharp, IoStatsChart, IoHelpBuoy, IoCloudDownloadOutline, IoCloudUploadOutline, IoHelp, IoSunnyOutline, IoMoon, } from 'react-icons/io5';\nexport const OpenIcon = IoOpenOutline;\nexport const ResizeIcon = IoResize;\nexport const FileTrayIcon = IoFileTrayFullOutline;\nexport const MenuIcon = IoMenuOutline;\nexport const BeakerIcon = IoBeaker;\nexport const FlaskIcon = IoFlaskSharp;\nexport const AvailabilityIcon = IoSyncCircleSharp;\nexport const StatisticsIcon = IoStatsChart;\nexport const SupportIcon = IoHelpBuoy;\nexport const CloudDownloadIcon = IoCloudDownloadOutline;\nexport const CloudUploadIcon = IoCloudUploadOutline;\nexport const QuestionThinIcon = IoHelp;\nexport const SunIcon = IoSunnyOutline;\nexport const MoonIcon = IoMoon;\n//======================================================= FA =======================================================\nimport { FaHistory, FaCrosshairs, FaLayerGroup, FaGhost, FaLock, FaMask, FaFile, FaLongArrowAltRight, FaTimes, FaTimesCircle, FaPlus, FaCog, FaEye, FaEyeSlash, FaCaretUp, FaCaretDown, FaFire, FaSave, FaSquare, FaRegSquare, FaCheckSquare, FaMinusSquare, FaHashtag, FaHammer, FaCommentDots, FaClock, FaRegClock, FaToggleOn, FaQuestion, FaQuestionCircle, FaInfoCircle, FaCompress, FaMap, FaPlay, FaGripVertical, FaRobot, FaArrowLeft, FaArrowRight, FaArrowAltCircleDown, FaArrowAltCircleRight, FaArrowCircleRight, FaUser, FaShapes, FaEnvelope, FaSkull, FaDollarSign, FaSearch, FaStar, FaKey, FaExternalLinkAlt, FaExternalLinkSquareAlt, FaLightbulb, FaRegLightbulb, FaList, FaCircle, FaMinusCircle, FaTrash, FaRegCircle, FaShieldAlt, FaTag, FaTags, FaBolt, FaCheckCircle, FaExclamationTriangle, FaBug, FaCircleNotch, FaRegKeyboard, FaUserSecret, FaBuffer, FaSitemap, FaExpand, FaExpandArrowsAlt, FaSortAlphaDown, FaSort, FaSortAlphaDownAlt, FaFolderPlus, FaCaretRight, FaCaretLeft, FaWrench, FaArrowDown, FaArrowUp, FaTerminal, FaTruckLoading, FaFileCsv, FaFolderOpen, FaFolder, FaFileCode, FaCodeBranch, FaArrowAltCircleUp, FaArrowAltCircleLeft, FaRegStopCircle, FaAsterisk, FaFilter, FaExclamationCircle, FaRocket, FaCheck, FaBan, FaFileImport, FaUserFriends, FaDownload, FaUpload, FaRegWindowRestore, FaPauseCircle, FaShare, FaRegCopy, FaFileAlt, FaEdit, FaArrowsAltH, FaRegWindowMaximize, FaWindowMaximize, FaLongArrowAltDown, FaLongArrowAltUp, FaMeteor, FaPiedPiperSquare, FaPuzzlePiece, FaToggleOff, FaMapMarkerAlt, FaHatWizard, FaRegLaughWink, FaRegChartBar, FaRegSadTear, FaBusinessTime, FaDatabase, FaServer, FaArchive, FaBrain, FaBookOpen, FaLevelDownAlt, FaRegCalendarAlt, FaCalculator, FaReadme, FaRedo, FaUndo, } from 'react-icons/fa';\nexport const HistoryIcon = FaHistory;\nexport const CrosshairsIcon = FaCrosshairs;\nexport const LayerGroupIcon = FaLayerGroup;\nexport const GhostIcon = FaGhost;\nexport const LockIcon = FaLock;\nexport const MaskIcon = FaMask;\nexport const FileIcon = FaFile;\nexport const LongArrowRightIcon = FaLongArrowAltRight;\nexport const TimesIcon = FaTimes;\nexport const TimesCircleIcon = FaTimesCircle;\nexport const PlusIcon = FaPlus;\nexport const CogIcon = FaCog;\nexport const EyeIcon = FaEye;\nexport const CloseEyeIcon = FaEyeSlash;\nexport const CaretUpIcon = FaCaretUp;\nexport const CaretDownIcon = FaCaretDown;\nexport const FireIcon = FaFire;\nexport const SaveIcon = FaSave;\nexport const SquareIcon = FaSquare;\nexport const EmptySquareIcon = FaRegSquare;\nexport const CheckSquareIcon = FaCheckSquare;\nexport const MinusSquareIcon = FaMinusSquare;\nexport const HashtagIcon = FaHashtag;\nexport const HammerIcon = FaHammer;\nexport const ChatIcon = FaCommentDots;\nexport const ClockIcon = FaClock;\nexport const EmptyClockIcon = FaRegClock;\nexport const ToggleIcon = FaToggleOn;\nexport const QuestionIcon = FaQuestion;\nexport const QuestionCircleIcon = FaQuestionCircle;\nexport const InfoCircleIcon = FaInfoCircle;\nexport const CompressIcon = FaCompress;\nexport const MapIcon = FaMap;\nexport const PlayIcon = FaPlay;\nexport const VerticalDragHandleIcon = FaGripVertical;\nexport const RobotIcon = FaRobot;\nexport const ArrowLeftIcon = FaArrowLeft;\nexport const ArrowRightIcon = FaArrowRight;\nexport const ArrowCircleDownIcon = FaArrowAltCircleDown;\nexport const ArrowCircleRightIcon = FaArrowAltCircleRight;\nexport const StickArrowCircleRightIcon = FaArrowCircleRight;\nexport const UserIcon = FaUser;\nexport const ShapesIcon = FaShapes;\nexport const EnvelopIcon = FaEnvelope;\nexport const SkullIcon = FaSkull;\nexport const DollarIcon = FaDollarSign;\nexport const SearchIcon = FaSearch;\nexport const StarIcon = FaStar;\nexport const KeyIcon = FaKey;\nexport const ExternalLinkIcon = FaExternalLinkAlt;\nexport const ExternalLinkSquareIcon = FaExternalLinkSquareAlt;\nexport const LightBulbIcon = FaLightbulb;\nexport const EmptyLightBulbIcon = FaRegLightbulb;\nexport const ListIcon = FaList;\nexport const CircleIcon = FaCircle;\nexport const MinusCircleIcon = FaMinusCircle;\nexport const TrashIcon = FaTrash;\nexport const EmptyCircleIcon = FaRegCircle;\nexport const ShieldIcon = FaShieldAlt;\nexport const TagIcon = FaTag;\nexport const TagsIcon = FaTags;\nexport const BoltIcon = FaBolt;\nexport const CheckCircleIcon = FaCheckCircle;\nexport const ExclamationTriangleIcon = FaExclamationTriangle;\nexport const BugIcon = FaBug;\nexport const CircleNotchIcon = FaCircleNotch;\nexport const KeyboardIcon = FaRegKeyboard;\nexport const HackerIcon = FaUserSecret;\nexport const BufferIcon = FaBuffer; // to be reviewed, moved to LegendIcon\nexport const SitemapIcon = FaSitemap; // to be reviewed, moved to LegendIcon\nexport const ExpandIcon = FaExpand;\nexport const ExpandAllIcon = FaExpandArrowsAlt;\nexport const SortDownIcon = FaSortAlphaDown;\nexport const SortIcon = FaSort;\nexport const SortDownAltIcon = FaSortAlphaDownAlt;\nexport const NewFolderIcon = FaFolderPlus;\nexport const CaretRightIcon = FaCaretRight;\nexport const CaretLeftIcon = FaCaretLeft;\nexport const WrenchIcon = FaWrench;\nexport const ArrowDownIcon = FaArrowDown;\nexport const ArrowUpIcon = FaArrowUp;\nexport const TerminalIcon = FaTerminal;\nexport const TruckLoadingIcon = FaTruckLoading;\nexport const FolderOpenIcon = FaFolderOpen;\nexport const FolderIcon = FaFolder;\nexport const FileCodeIcon = FaFileCode;\nexport const CodeBranchIcon = FaCodeBranch;\nexport const ArrowCircleUpIcon = FaArrowAltCircleUp;\nexport const ArrowCircleLeftIcon = FaArrowAltCircleLeft;\nexport const EmptyStopCircleIcon = FaRegStopCircle;\nexport const AsteriskIcon = FaAsterisk;\nexport const FilterIcon = FaFilter;\nexport const ExclamationCircleIcon = FaExclamationCircle;\nexport const RocketIcon = FaRocket;\nexport const CheckIcon = FaCheck;\nexport const BanIcon = FaBan;\nexport const FileImportIcon = FaFileImport;\nexport const UsersIcon = FaUserFriends;\nexport const DownloadIcon = FaDownload;\nexport const UploadIcon = FaUpload;\nexport const EmptyWindowRestoreIcon = FaRegWindowRestore;\nexport const PauseCircleIcon = FaPauseCircle;\nexport const ShareIcon = FaShare;\nexport const CopyIcon = FaRegCopy;\nexport const FileAltIcon = FaFileAlt; // to be reviewed/combined\nexport const PencilEditIcon = FaEdit; // to be reviewed/combined\nexport const ArrowsAltHIcon = FaArrowsAltH; // to be reviewed/combined\nexport const WindowMaximizeIcon = FaRegWindowMaximize; // to be reviewed/combined\nexport const FilledWindowMaximizeIcon = FaWindowMaximize; // to be reviewed/combined\nexport const LongArrowAltDownIcon = FaLongArrowAltDown; // to be reviewed/combined\nexport const LongArrowAltUpIcon = FaLongArrowAltUp; // to be reviewed/combined\nexport const MeteorIcon = FaMeteor; // to be reviewed/combined\nexport const PiedPiperSquareIcon = FaPiedPiperSquare; // to be reviewed/combined\nexport const PuzzlePieceIcon = FaPuzzlePiece; // to be reviewed/combined\nexport const ToggleOffIcon = FaToggleOff;\nexport const MapMarkerIcon = FaMapMarkerAlt;\nexport const WizardHatIcon = FaHatWizard;\nexport const FaceLaughWinkIcon = FaRegLaughWink;\nexport const ChartIcon = FaRegChartBar;\nexport const CsvIcon = FaFileCsv;\nexport const FaceSadTearIcon = FaRegSadTear;\nexport const BusinessTimeIcon = FaBusinessTime; // to be reviewed/combined\nexport const DatabaseIcon = FaDatabase;\nexport const ServerIcon = FaServer;\nexport const ArchiveIcon = FaArchive;\nexport const BrainIcon = FaBrain;\nexport const DocumentationIcon = FaBookOpen;\nexport const LevelDownIcon = FaLevelDownAlt; // to be reviewed/combined\nexport const CalendarIcon = FaRegCalendarAlt;\nexport const CalculatorIcon = FaCalculator;\nexport const ReadMeIcon = FaReadme;\nexport const UndoIcon = FaUndo;\nexport const RedoIcon = FaRedo;\n//======================================================= GI =======================================================\nimport { GiWaterDrop, GiBeard, GiSunglasses, GiHouseKeys, } from 'react-icons/gi';\nexport const WaterDropIcon = GiWaterDrop;\nexport const BeardIcon = GiBeard;\nexport const SunglassesIcon = GiSunglasses;\nexport const HouseKeys = GiHouseKeys;\n//======================================================= GO =======================================================\nimport { GoChevronDown, GoChevronUp, GoChevronLeft, GoChevronRight, GoFileBinary, GoGitPullRequest, GoGitMerge, GoSync, GoGitBranch, GoX, GoPlug, } from 'react-icons/go';\nexport const ChevronDownIcon = GoChevronDown;\nexport const ChevronUpIcon = GoChevronUp;\nexport const ChevronLeftIcon = GoChevronLeft;\nexport const ChevronRightIcon = GoChevronRight;\nexport const BinaryTypeIcon = GoFileBinary;\nexport const GitPullRequestIcon = GoGitPullRequest;\nexport const GitMergeIcon = GoGitMerge;\nexport const SyncIcon = GoSync;\nexport const GitBranchIcon = GoGitBranch;\nexport const XIcon = GoX;\nexport const PluginIcon = GoPlug;\n//======================================================= SI =======================================================\nimport { SiSwagger } from 'react-icons/si';\nexport const SwaggerIcon = SiSwagger; // to be reviewed\n//======================================================= BI =======================================================\nimport { BiShapeTriangle, BiAtom, BiCabinet } from 'react-icons/bi';\nexport const ShapeTriangleIcon = BiShapeTriangle;\nexport const AtomIcon = BiAtom;\nexport const CabinetIcon = BiCabinet;\n//======================================================= CG =======================================================\nimport { CgOptions } from 'react-icons/cg';\nexport const OptionsIcon = CgOptions;\n//======================================================= FI =======================================================\nimport { FiPackage, FiMinus, FiMousePointer, FiMove, FiPlusCircle, FiSidebar, FiTriangle, FiZoomIn, FiZoomOut, FiGitMerge, FiLink, } from 'react-icons/fi';\nexport const PackageIcon = FiPackage;\nexport const MinusIcon = FiMinus;\nexport const MousePointerIcon = FiMousePointer;\nexport const MoveIcon = FiMove;\nexport const PlusCircleIcon = FiPlusCircle;\nexport const SidebarIcon = FiSidebar;\nexport const TriangleIcon = FiTriangle;\nexport const ZoomInIcon = FiZoomIn;\nexport const ZoomOutIcon = FiZoomOut;\nexport const TruncatedGitMergeIcon = FiGitMerge; // to be reviewed/combined\nexport const AnchorLinkIcon = FiLink;\n//======================================================= RI =======================================================\nimport { RiShapeLine, RiShareBoxFill, RiTestTubeFill, RiRobotFill, RiGovernmentFill, RiMoneyDollarCircleFill, } from 'react-icons/ri';\nexport const ShareBoxIcon = RiShareBoxFill;\nexport const ShapeLineIcon = RiShapeLine;\nexport const TestTubeIcon = RiTestTubeFill;\nexport const DroidIcon = RiRobotFill;\nexport const GovernanceIcon = RiGovernmentFill;\nexport const CostCircleIcon = RiMoneyDollarCircleFill;\n//======================================================= FC =======================================================\nimport { FcWorkflow } from 'react-icons/fc';\nexport const WorkflowIcon = FcWorkflow;\n//# sourceMappingURL=Icon.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { ApplicationError, assertErrorThrown, assertTrue, isString, } from '@finos/legend-shared';\nimport { action, makeObservable, observable } from 'mobx';\nexport const DEFAULT_NOTIFICATION_HIDE_TIME = 6000; // ms\nexport const DEFAULT_ERROR_NOTIFICATION_HIDE_TIME = 10000; // ms\nexport var NOTIFCATION_SEVERITY;\n(function (NOTIFCATION_SEVERITY) {\n NOTIFCATION_SEVERITY[\"ILEGAL_STATE\"] = \"ILEGAL_STATE\";\n NOTIFCATION_SEVERITY[\"ERROR\"] = \"ERROR\";\n NOTIFCATION_SEVERITY[\"WARNING\"] = \"WARNING\";\n NOTIFCATION_SEVERITY[\"SUCCESS\"] = \"SUCCESS\";\n NOTIFCATION_SEVERITY[\"INFO\"] = \"INFO\";\n})(NOTIFCATION_SEVERITY || (NOTIFCATION_SEVERITY = {}));\nexport class Notification {\n severity;\n message;\n 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 NotificationService {\n notification;\n constructor() {\n makeObservable(this, {\n notification: observable,\n setNotification: action,\n notify: action,\n notifySuccess: action,\n notifyWarning: action,\n notifyIllegalState: action,\n notifyError: action,\n });\n }\n setNotification(notification) {\n this.notification = notification;\n }\n notify(message, 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 notifyError(content, actions) {\n const message = this.getErrorMessage(content);\n if (message) {\n this.setNotification(new Notification(NOTIFCATION_SEVERITY.ERROR, message, actions ?? [], undefined));\n }\n }\n getErrorMessage(content) {\n let message;\n if (content instanceof ApplicationError) {\n message = content.detail;\n }\n else if (content instanceof Error) {\n message = content.message;\n }\n else {\n assertTrue(isString(content), `Can't display error`);\n message = content;\n }\n return message;\n }\n notifyIllegalState(message, 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 notifyUnsupportedFeature(featureName) {\n this.notifyWarning(`Unsupported feature: ${featureName}`);\n }\n /**\n * This function creates a more user-friendly way to throw error in the UI. Rather than crashing the whole app, we will\n * just notify and replacing the value should get with an alternative (e.g. `undefined`). A good use-case for this\n * is where we would not expect an error to throw (i.e. `IllegalStateError`), but we want to be sure that if the error\n * ever occurs, it still shows very apparently in the UI, as such, printing out in the console is not good enough,\n * but crashing the app is bad too, so this is a good balance.\n */\n notifyAndReturnAlternativeOnError = (fn, alternative) => {\n try {\n return fn();\n }\n catch (error) {\n assertErrorThrown(error);\n this.notifyIllegalState(error.message);\n return alternative;\n }\n };\n}\n//# sourceMappingURL=NotificationService.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { observer } from 'mobx-react-lite';\nimport { useApplicationStore } from './ApplicationStoreProvider.js';\nimport { Notification, NotificationContent, ChevronDownIcon, ChevronUpIcon, TimesIcon, ExclamationTriangleIcon, TimesCircleIcon, CheckCircleIcon, InfoCircleIcon, BugIcon, clsx, } from '@finos/legend-art';\nimport { useState } from 'react';\nimport { DEFAULT_NOTIFICATION_HIDE_TIME, NOTIFCATION_SEVERITY, } from '../stores/NotificationService.js';\nexport const NotificationManager = observer(() => {\n const applicationStore = useApplicationStore();\n const notification = applicationStore.notificationService.notification;\n const isOpen = Boolean(notification);\n const message = notification?.message ?? '';\n const severity = notification?.severity ?? NOTIFCATION_SEVERITY.INFO;\n const [isExpanded, setIsExpanded] = useState(false);\n let notificationIcon = (_jsx(\"div\", { className: \"notification__message__content__icon notification__message__content__icon--info\", children: _jsx(InfoCircleIcon, {}) }));\n switch (severity) {\n case NOTIFCATION_SEVERITY.ILEGAL_STATE:\n notificationIcon = (_jsx(\"div\", { className: \"notification__message__content__icon notification__message__content__icon--error\", children: _jsx(BugIcon, {}) }));\n break;\n case NOTIFCATION_SEVERITY.ERROR:\n notificationIcon = (_jsx(\"div\", { className: \"notification__message__content__icon notification__message__content__icon--error\", children: _jsx(TimesCircleIcon, {}) }));\n break;\n case NOTIFCATION_SEVERITY.WARNING:\n notificationIcon = (_jsx(\"div\", { className: \"notification__message__content__icon notification__message__content__icon--warning\", children: _jsx(ExclamationTriangleIcon, {}) }));\n break;\n case NOTIFCATION_SEVERITY.SUCCESS:\n notificationIcon = (_jsx(\"div\", { className: \"notification__message__content__icon notification__message__content__icon--success\", children: _jsx(CheckCircleIcon, {}) }));\n break;\n default:\n break;\n }\n const handleClose = () => {\n applicationStore.notificationService.setNotification(undefined);\n setIsExpanded(false);\n };\n const handleCopy = applicationStore.guardUnhandledError(() => applicationStore.clipboardService.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: notification\n ? (notification.autoHideDuration ?? null)\n : DEFAULT_NOTIFICATION_HIDE_TIME, onClose: onSnackbarAutoHideOrClickAway, children: _jsx(NotificationContent, { classes: {\n root: 'notification__content',\n message: 'notification__message',\n action: 'notification__actions',\n }, message: _jsxs(\"div\", { className: \"notification__message__content\", children: [notificationIcon, _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\", onClick: toggleExpansion, tabIndex: -1, title: isExpanded ? 'Collapse' : 'Expand', children: isExpanded ? _jsx(ChevronDownIcon, {}) : _jsx(ChevronUpIcon, {}) }, \"expand\"),\n _jsx(\"button\", { className: \"notification__action\", onClick: handleClose, tabIndex: -1, title: \"Dismiss\", children: _jsx(TimesIcon, {}) }, \"close\"),\n ] }) }, typeof message === 'string' || typeof message === 'number'\n ? message\n : ''));\n});\n//# sourceMappingURL=NotificationManager.js.map","import { jsx as _jsx } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { Menu as MuiMenu, MenuItem as MuiMenuItem, } from '@mui/material';\nexport const Menu = (props) => {\n const { children, classes, ...otherProps } = props;\n return (_jsx(MuiMenu, { classes: {\n ...(classes ?? {}),\n paper: 'mui-menu__paper',\n list: 'mui-menu__list',\n }, transitionDuration: 0, ...otherProps, children: props.children }));\n};\nexport { MuiMenuItem as BaseMenuItem, MuiMenu as BaseMenu };\n//# sourceMappingURL=BaseMenu.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { useState, useRef } from 'react';\nimport { Menu } from './BaseMenu.js';\nexport const ContextMenu = (props) => {\n const { className, children, menuProps, content, disabled, onClose, onOpen } = props;\n const contextMenuRoot = useRef(null);\n const [isOpen, setIsOpen] = useState(false);\n const [anchorEl, setAnchorEl] = useState();\n const [left, setLeft] = useState(0);\n const [top, setTop] = useState(0);\n const reset = () => {\n setAnchorEl(undefined);\n setIsOpen(false);\n setTop(0);\n setLeft(0);\n };\n const close = (event) => {\n event.stopPropagation();\n event.preventDefault();\n reset();\n onClose?.();\n };\n const onContextMenu = (event) => {\n event.stopPropagation();\n event.preventDefault();\n if (disabled) {\n return;\n }\n onOpen?.();\n if (contextMenuRoot.current) {\n // Get position of the container element relative to the page document\n // See https://plainjs.com/javascript/styles/get-the-position-of-an-element-relative-to-the-document-24/\n const containerRect = contextMenuRoot.current.getBoundingClientRect();\n const containerLeft = containerRect.left +\n (window.scrollX || document.documentElement.scrollLeft);\n const containerTop = containerRect.top +\n (window.scrollY || document.documentElement.scrollTop);\n const { clientX, clientY, target } = event;\n const eventTarget = target;\n if (anchorEl !== eventTarget) {\n // NOTE: since this method is not supported in JSDom, we will disable this optimization in test\n // eslint-disable-next-line no-process-env\n if (process.env.NODE_ENV !== 'test') {\n const elements = document.elementsFromPoint(clientX, clientY);\n // Besides checking for the element containment, we also want to check for position as MUI\n // Menu have a background that spans the whole screen to check for clickout and trap focus\n // which means right click on other part of the screen will also result in context menu being shown\n const hasAnchor = elements.some((element) => element === eventTarget) &&\n containerLeft <= clientX &&\n clientX <= containerLeft + containerRect.width &&\n containerTop <= clientY &&\n clientY <= containerTop + containerRect.height;\n if (!hasAnchor) {\n reset();\n onClose?.();\n return;\n }\n }\n }\n setAnchorEl(eventTarget);\n setIsOpen(true);\n setTop(clientY);\n setLeft(clientX);\n }\n };\n return (_jsxs(\"div\", { ref: contextMenuRoot, className: className, onContextMenu: onContextMenu, children: [children, _jsx(Menu, { open: isOpen, anchorPosition: { left, top }, onClose: close, anchorReference: \"anchorPosition\", BackdropProps: {\n invisible: true,\n onContextMenu,\n }, disableRestoreFocus: true, transitionDuration: 0, onClick: close, ...menuProps, children: isOpen && content }, `${left}, ${top}`)] }));\n};\n//# sourceMappingURL=ContextMenu.js.map","import { jsx as _jsx } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { forwardRef } from 'react';\nimport { clsx } from 'clsx';\nimport { generateSimpleDIVComponent } from '../utils/ComponentCreatorUtils.js';\nexport const MenuContent = forwardRef(function MenuContent(props, ref) {\n const { className, children, ...otherProps } = props;\n return (_jsx(\"div\", { ref: ref, className: clsx('menu', className), ...otherProps, children: children }));\n});\nexport const MenuContentItem = (props) => {\n const { className, onClick, title, disabled, children, ...otherProps } = props;\n return (_jsx(\"button\", { className: clsx('menu__item', className), disabled: Boolean(disabled), title: title, onClick: onClick, ...otherProps, children: children }));\n};\nexport const MenuContentDivider = generateSimpleDIVComponent('MenuContentDivider', 'menu__divider');\nexport const MenuContentItemIcon = generateSimpleDIVComponent('MenuContentItemIcon', 'menu__item__icon');\nexport const MenuContentItemBlankIcon = (props) => {\n const { className, ...otherProps } = props;\n return (_jsx(\"div\", { className: clsx('menu__item__icon', className), ...otherProps }));\n};\nexport const MenuContentItemLabel = generateSimpleDIVComponent('MenuContentItemLabel', 'menu__item__label');\n//# sourceMappingURL=MenuContent.js.map","import { jsx as _jsx } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport ReactMarkdown from 'react-markdown';\nimport remarkGFM from 'remark-gfm';\nimport { clsx } from 'clsx';\nimport { useEffect } from 'react';\nimport mermaid from 'mermaid';\nexport const MarkdownTextViewer = (props) => {\n useEffect(() => {\n // this will render the mermaid diagram\n mermaid.initialize({ startOnLoad: true, theme: 'dark' });\n mermaid.contentLoaded();\n }, [props.value]);\n return (_jsx(ReactMarkdown, { className: clsx('markdown-content', props.className), remarkPlugins: [remarkGFM], components: props.components ?? {\n // customize the rendering of the <code> block, if the language is mermaid\n // the class name must include `mermaid` and it will get picked up by the mermaid renderer\n code: (_props) => {\n const { children, className, node, ...rest } = _props;\n const match = /language-(?<language>\\w+)/.exec(className ?? '');\n return match?.groups?.language ? (_jsx(\"code\", { ...rest, className: clsx(match.groups.language), children: children })) : (_jsx(\"code\", { ...rest, className: className, children: children }));\n },\n }, children: props.value.value }));\n};\n//# sourceMappingURL=MarkdownTextViewer.js.map","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, jsxs as _jsxs } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { RadioGroup as MuiRadioGroup, FormControlLabel, Radio, } from '@mui/material';\nimport { clsx } from 'clsx';\nconst transformToMatrix = (arr, stepSize) => {\n const matrix = [];\n for (let i = 0; i < arr.length; i += stepSize) {\n matrix.push(arr.slice(i, i + stepSize));\n }\n return matrix;\n};\nexport const BaseRadioGroup = (props) => {\n const { children, options, size, className, ...otherProps } = props;\n // For displaying avaible options in a [n,size] matrix\n const targetOptionsValuesInMatrix = transformToMatrix(options, size);\n return (_jsxs(\"div\", { className: clsx('mui-radio-group', className), children: [targetOptionsValuesInMatrix.map((row, idx) => (\n // eslint-disable-next-line react/no-array-index-key\n _jsx(\"div\", { children: _jsx(MuiRadioGroup, { className: \"mui-radio-group__group\", ...otherProps, children: row.map((op) => (_jsx(FormControlLabel, { className: \"mui-radio-group__group__column\", style: { width: `${100 / size}%` }, value: op, control: _jsx(Radio, { className: \"mui-radio-group__group__item__radio-btn\", classes: {\n checked: 'mui-radio-group__group__item__radio-btn--checked',\n } }), label: _jsx(\"div\", { className: \"mui-radio-group__group__item__label\", children: op }) }, op))) }) }, idx))), children] }));\n};\n//# sourceMappingURL=BaseRadioGroup.js.map","import { jsx as _jsx } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { Popover as MuiPopover, } from '@mui/material';\nexport const BasePopover = (props) => {\n const { children, ...otherProps } = props;\n return (_jsx(MuiPopover, { classes: {\n paper: 'mui-popover__paper',\n }, transitionDuration: 0, ...otherProps, children: props.children }));\n};\n//# sourceMappingURL=BasePopover.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport var LEGEND_APPLICATION_DOCUMENTATION_KEY;\n(function (LEGEND_APPLICATION_DOCUMENTATION_KEY) {\n LEGEND_APPLICATION_DOCUMENTATION_KEY[\"QUESTION_HOW_TO_USE_ADVANCED_SEARCH_SYNTAX\"] = \"question.how-to-use-advanced-search-syntax\";\n})(LEGEND_APPLICATION_DOCUMENTATION_KEY || (LEGEND_APPLICATION_DOCUMENTATION_KEY = {}));\n//# sourceMappingURL=LegendApplicationDocumentation.js.map","import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { clsx, TimesIcon, SearchIcon, MapMarkerIcon, CloseIcon, ContextMenu, MenuContent, MenuContentItem, MarkdownTextViewer, ChevronDownIcon, ChevronRightIcon, BlankPanelContent, BeardIcon, SunglassesIcon, WizardHatIcon, FaceLaughWinkIcon, ThinVerticalDragHandleIcon, PanelLoadingIndicator, BasePopover, FaceSadTearIcon, CogIcon, Draggable, BaseRadioGroup, QuestionCircleIcon, EmptyWindowRestoreIcon, WindowMaximizeIcon, MinusCircleIcon, } from '@finos/legend-art';\nimport { ADVANCED_FUZZY_SEARCH_MODE, ContentType, debounce, downloadFileUsingDataURI, formatDate, isString, uuid, } from '@finos/legend-shared';\nimport { observer } from 'mobx-react-lite';\nimport { useEffect, useMemo, useRef, useState } from 'react';\nimport { DEFAULT_DATE_TIME_FORMAT, DEFAULT_TAB_SIZE, } from '../stores/ApplicationConfig.js';\nimport { VIRTUAL_ASSISTANT_TAB, } from '../stores/AssistantService.js';\nimport { useApplicationStore } from './ApplicationStoreProvider.js';\nimport { LegendApplicationTelemetryHelper } from '../__lib__/LegendApplicationTelemetry.js';\nimport { LEGEND_APPLICATION_DOCUMENTATION_KEY } from '../__lib__/LegendApplicationDocumentation.js';\nconst WIZARD_GREETING = `Bonjour, It's Pierre!`;\nconst VirtualAssistantDocumentationEntryViewer = observer((props) => {\n const { entry } = props;\n const applicationStore = useApplicationStore();\n const toggleExpand = () => {\n if (!entry.isOpen) {\n LegendApplicationTelemetryHelper.logEvent_VirtualAssistantDocumentationEntryAccessed(applicationStore.telemetryService, {\n key: entry.documentationKey,\n });\n }\n entry.setIsOpen(!entry.isOpen);\n };\n const onDocumentationLinkClick = () => {\n LegendApplicationTelemetryHelper.logEvent_VirtualAssistantDocumentationEntryAccessed(applicationStore.telemetryService, {\n key: entry.documentationKey,\n });\n };\n const copyDocumentationKey = applicationStore.guardUnhandledError(() => applicationStore.clipboardService.copyTextToClipboard(entry.documentationKey));\n return (_jsx(ContextMenu, { className: \"virtual-assistant__doc-entry\", menuProps: {\n elevation: 7,\n classes: {\n root: 'virtual-assistant__context-menu',\n },\n }, content: _jsx(MenuContent, { children: _jsx(MenuContentItem, { onClick: copyDocumentationKey, children: \"Copy Documentation Key\" }) }), children: _jsxs(\"div\", { className: \"virtual-assistant__doc-entry\", children: [_jsxs(\"div\", { className: \"virtual-assistant__doc-entry__header\", children: [_jsx(\"button\", { className: clsx('virtual-assistant__doc-entry__expand-icon', {\n 'virtual-assistant__doc-entry__expand-icon--disabled': !entry.content,\n }), disabled: !entry.content, tabIndex: -1, onClick: toggleExpand, children: entry.isOpen ? _jsx(ChevronDownIcon, {}) : _jsx(ChevronRightIcon, {}) }), entry.url ? (_jsx(\"a\", { className: \"virtual-assistant__doc-entry__title virtual-assistant__doc-entry__title--link\", rel: \"noopener noreferrer\", target: \"_blank\", href: entry.url, onClick: onDocumentationLinkClick, title: \"Click to see external documentation\", children: entry.title })) : (_jsx(\"div\", { className: \"virtual-assistant__doc-entry__title\", onClick: toggleExpand, children: entry.title }))] }), entry.isOpen && entry.content && (_jsx(\"div\", { className: \"virtual-assistant__doc-entry__content\", children: isString(entry.content) ? (_jsx(\"div\", { className: \"virtual-assistant__doc-entry__content__text\", children: entry.content })) : (_jsx(MarkdownTextViewer, { className: \"virtual-assistant__doc-entry__content__markdown-text\", value: entry.content })) }))] }) }));\n});\nconst VirtualAssistantContextualSupportPanel = observer(() => {\n const applicationStore = useApplicationStore();\n const assistantService = applicationStore.assistantService;\n const contextualEntry = assistantService.currentContextualDocumentationEntry;\n const copyContextIDToClipboard = applicationStore.guardUnhandledError(() => applicationStore.clipboardService.copyTextToClipboard(contextualEntry?.context ?? ''));\n const copyCurrentContextIDToClipboard = applicationStore.guardUnhandledError(() => applicationStore.clipboardService.copyTextToClipboard(applicationStore.navigationContextService.currentContext?.key ?? ''));\n const copyContextStackToClipboard = applicationStore.guardUnhandledError(() => applicationStore.clipboardService.copyTextToClipboard(applicationStore.navigationContextService.contextStack\n .map((context) => context.key)\n .join(' > ')));\n return (_jsxs(ContextMenu, { className: \"virtual-assistant__contextual-support\", disabled: !contextualEntry, menuProps: {\n elevation: 7,\n classes: {\n root: 'virtual-assistant__context-menu',\n },\n }, content: _jsxs(MenuContent, { children: [_jsx(MenuContentItem, { onClick: copyContextIDToClipboard, children: \"Copy Context ID\" }), _jsx(MenuContentItem, { onClick: copyCurrentContextIDToClipboard, children: \"Copy Current Context ID\" }), _jsx(MenuContentItem, { onClick: copyContextStackToClipboard, children: \"Copy Context Stack\" })] }), children: [contextualEntry && (_jsxs(\"div\", { className: \"virtual-assistant__contextual-support__content\", children: [contextualEntry.title && (_jsx(\"div\", { className: \"virtual-assistant__contextual-support__title\", children: contextualEntry.title })), contextualEntry.content && (_jsx(_Fragment, { children: isString(contextualEntry.content) ? (_jsx(\"div\", { className: \"virtual-assistant__contextual-support__text\", children: contextualEntry.content })) : (_jsx(MarkdownTextViewer, { className: \"virtual-assistant__contextual-support__markdown-text\", value: contextualEntry.content })) })), contextualEntry.related.length && (_jsxs(\"div\", { className: \"virtual-assistant__contextual-support__relevant-entries\", children: [_jsxs(\"div\", { className: \"virtual-assistant__contextual-support__relevant-entries__title\", children: [\"Related entries (\", contextualEntry.related.length, \")\"] }), contextualEntry.related.map((entry) => (_jsx(VirtualAssistantDocumentationEntryViewer, { entry: entry }, entry.uuid)))] }))] })), !contextualEntry && (_jsx(BlankPanelContent, { children: _jsxs(\"div\", { className: \"virtual-assistant__panel__placeholder\", children: [_jsx(FaceLaughWinkIcon, { className: \"virtual-assistant__panel__placeholder__icon\" }), _jsx(\"div\", { className: \"virtual-assistant__panel__placeholder__message\", children: \"No contextual documentation found!\" }), _jsx(\"div\", { className: \"virtual-assistant__panel__placeholder__instruction\", children: \"Keep using the app. When contextual help is available, we will let you know!\" })] }) }))] }));\n});\nconst VirtualAssistantSearchPanel = observer(() => {\n const applicationStore = useApplicationStore();\n const searchInputRef = useRef(null);\n const assistantService = applicationStore.assistantService;\n // search text\n const searchText = assistantService.searchText;\n const debouncedSearch = useMemo(() => debounce(() => assistantService.search(), 100), [assistantService]);\n const onSearchTextChange = (event) => {\n assistantService.setSearchText(event.target.value);\n debouncedSearch();\n };\n const clearSearchText = () => {\n assistantService.resetSearch();\n assistantService.currentDocumentationEntry = undefined;\n searchInputRef.current?.focus();\n };\n const toggleSearchConfigMenu = () => assistantService.setShowSearchConfigurationMenu(!assistantService.showSearchConfigurationMenu);\n const downloadDocRegistry = () => {\n downloadFileUsingDataURI(`documentation-registry_${formatDate(new Date(Date.now()), DEFAULT_DATE_TIME_FORMAT)}.json`, JSON.stringify(applicationStore.documentationService.publishDocRegistry(), undefined, DEFAULT_TAB_SIZE), ContentType.APPLICATION_JSON);\n };\n const downloadContextualDocIndex = () => {\n downloadFileUsingDataURI(`documentation-registry_${formatDate(new Date(Date.now()), DEFAULT_DATE_TIME_FORMAT)}.json`, JSON.stringify(applicationStore.documentationService.publishContextualDocIndex(), undefined, DEFAULT_TAB_SIZE), ContentType.APPLICATION_JSON);\n };\n useEffect(() => {\n searchInputRef.current?.focus();\n }, []);\n return (_jsxs(\"div\", { className: \"virtual-assistant__search\", children: [_jsxs(\"div\", { className: \"virtual-assistant__search__header\", children: [_jsx(\"input\", { ref: searchInputRef, \n /**\n * NOTE: In the scenario where another modal is opened at the same time the assistant panel\n * is open, the focus will be stolen by the newly opened modal. In that case, we need\n * to take back the focus. The trick here is to remount the whole panel (modal/popover)\n * by refreshing the `key` prop of the panel. This will cause `mui` to recompute the\n * focus-trap and allow the input field to be selectable again. Basically, we are stealing\n * back the focus for the assistant.\n *\n * However, the caveat is that this will cause the component states, such as scroll positions,\n * to be reset as such, we need to do this really sparingly. In fact, the only\n * scenario where we need to do this is when a new modal is opened when the assistant panel\n * is already opened. Basically, Other scenarios, such as when the assistant is opened after the modal\n * is opened seem to pose no issue.\n */\n onClick: () => {\n if (\n // only when there are dialogs being opened\n // NOTE: this seems rather hacky, but querying by role is the least\n // vendor-dependent approach we can think of at the moment\n document.querySelectorAll('[role=\"dialog\"]').length &&\n // only when the focus is not already with the input field\n // this means the focus is being stolen from the assistant because\n // the newly opened modal is opened more recently than the assistant\n //\n // once the focus has been gained by the assistant\n // we will not need to do this anymore\n searchInputRef.current !== document.activeElement) {\n assistantService.refreshPanelRendering();\n }\n }, className: clsx('virtual-assistant__search__input input--dark', {\n 'virtual-assistant__search__input--searching': searchText,\n }), spellCheck: false, onChange: onSearchTextChange, value: searchText, placeholder: \"Ask me a question\" }), searchText && (_jsx(\"div\", { className: \"virtual-assistant__search__input__search__count\", children: assistantService.searchResults.length +\n (assistantService.isOverSearchLimit ? '+' : '') })), _jsx(\"button\", { className: clsx('virtual-assistant__search__input__config__trigger', {\n 'virtual-assistant__search__input__config__trigger--toggled': assistantService.showSearchConfigurationMenu,\n 'virtual-assistant__search__input__config__trigger--active': assistantService.searchConfigurationState.isAdvancedSearchActive,\n }), tabIndex: -1, onClick: toggleSearchConfigMenu, title: `${assistantService.searchConfigurationState.isAdvancedSearchActive\n ? 'Advanced search is currently active\\n'\n : ''}Click to toggle search config menu`, children: _jsx(CogIcon, {}) }), !searchText ? (_jsx(\"div\", { className: \"virtual-assistant__search__input__search__icon\", children: _jsx(SearchIcon, {}) })) : (_jsx(\"button\", { className: \"virtual-assistant__search__input__clear-btn\", tabIndex: -1, onClick: clearSearchText, title: \"Clear\", children: _jsx(TimesIcon, {}) }))] }), _jsxs(\"div\", { className: \"virtual-assistant__search__content\", children: [_jsx(PanelLoadingIndicator, { isLoading: assistantService.searchState.isInProgress }), _jsx(\"div\", { className: clsx('virtual-assistant__search__input__config__panel', {\n 'virtual-assistant__search__input__config__panel--toggled': assistantService.showSearchConfigurationMenu,\n }), children: _jsxs(\"div\", { className: \"virtual-assistant__search__input__advanced-config__panel\", children: [_jsxs(\"div\", { className: \"virtual-assistant__search__input__advanced-config__panel__header__label\", children: [\"search config\", applicationStore.documentationService.hasDocEntry(LEGEND_APPLICATION_DOCUMENTATION_KEY.QUESTION_HOW_TO_USE_ADVANCED_SEARCH_SYNTAX) && (_jsx(\"div\", { onClick: () => assistantService.openDocumentationEntryLink(LEGEND_APPLICATION_DOCUMENTATION_KEY.QUESTION_HOW_TO_USE_ADVANCED_SEARCH_SYNTAX), title: \"Click to see documentation\", className: \"virtual-assistant__search__input__advanced-config__panel__header__label__hint\", children: _jsx(QuestionCircleIcon, {}) }))] }), _jsx(\"div\", { children: _jsx(BaseRadioGroup, { value: assistantService.searchConfigurationState.currentMode, onChange: (event) => {\n const searchMode = event.target\n .value;\n assistantService.searchConfigurationState.setCurrentMode(searchMode);\n }, row: false, options: [\n ADVANCED_FUZZY_SEARCH_MODE.STANDARD,\n ADVANCED_FUZZY_SEARCH_MODE.INCLUDE,\n ADVANCED_FUZZY_SEARCH_MODE.EXACT,\n ADVANCED_FUZZY_SEARCH_MODE.INVERSE,\n ], size: 1 }) })] }) }), assistantService.currentDocumentationEntry && (_jsx(\"div\", { className: \"virtual-assistant__search__results\", children: _jsx(VirtualAssistantDocumentationEntryViewer, { entry: assistantService.currentDocumentationEntry }, assistantService.currentDocumentationEntry.uuid) })), !assistantService.currentDocumentationEntry && (_jsxs(_Fragment, { children: [Boolean(assistantService.searchResults.length) && (_jsx(\"div\", { className: \"virtual-assistant__search__results\", children: assistantService.searchResults.map((result) => (_jsx(VirtualAssistantDocumentationEntryViewer, { entry: result }, result.uuid))) })), searchText && !assistantService.searchResults.length && (_jsx(BlankPanelContent, { children: _jsxs(\"div\", { className: \"virtual-assistant__panel__placeholder\", children: [_jsx(FaceSadTearIcon, { className: \"virtual-assistant__panel__placeholder__icon\" }), _jsx(\"div\", { className: \"virtual-assistant__panel__placeholder__message\", children: \"No result...\" })] }) })), !searchText && !assistantService.searchResults.length && (_jsx(ContextMenu, { className: \"virtual-assistant__character__container\", menuProps: {\n elevation: 7,\n classes: {\n root: 'virtual-assistant__context-menu',\n },\n }, content: _jsxs(MenuContent, { children: [_jsx(MenuContentItem, { onClick: downloadDocRegistry, children: \"Download documentation registry\" }), _jsx(MenuContentItem, { onClick: downloadContextualDocIndex, children: \"Download contextual documentation mapping\" })] }), children: _jsxs(\"div\", { className: \"virtual-assistant__character\", children: [_jsxs(\"div\", { className: \"virtual-assistant__character__figure\", children: [_jsx(WizardHatIcon, { className: \"virtual-assistant__character__hat\" }), _jsx(SunglassesIcon, { className: \"virtual-assistant__character__glasses\" }), _jsx(BeardIcon, { className: \"virtual-assistant__character__beard\" })] }), _jsx(\"div\", { className: \"virtual-assistant__character__greeting\", children: WIZARD_GREETING }), _jsx(\"div\", { className: \"virtual-assistant__character__question\", children: \"How can I help today?\" })] }) }))] }))] })] }));\n});\nconst VirtualAssistantPanel = observer((props) => {\n const { triggerElement } = props;\n const applicationStore = useApplicationStore();\n const assistantService = applicationStore.assistantService;\n const currentContextualDocumentationEntry = assistantService.currentContextualDocumentationEntry;\n const selectedTab = assistantService.selectedTab;\n const extraViewConfigurations = applicationStore.pluginManager\n .getApplicationPlugins()\n .flatMap((plugin) => plugin.getExtraVirtualAssistantViewConfigurations?.() ?? []);\n const currentExtensionView = extraViewConfigurations.find((config) => config.key === selectedTab);\n const toggleMaximize = () => assistantService.setIsPanelMaximized(!assistantService.isPanelMaximized);\n const selectSearch = () => assistantService.setSelectedTab(VIRTUAL_ASSISTANT_TAB.SEARCH);\n const selectContextualDoc = () => assistantService.setSelectedTab(VIRTUAL_ASSISTANT_TAB.CONTEXTUAL_SUPPORT);\n const closeAssistantPanel = () => assistantService.setIsOpen(false);\n return (\n /**\n * The most appropriate component to use is `Popper`\n * as it does not block click-away\n * See https://mui.com/material-ui/react-popper/\n *\n * However, the caveat is that in the implementation of mui Popper\n * focus trap is not supported. As such, we could end up in a situation\n * where the assistant input fields will not be focusable\n * when another modal is being opened, as that newly opened modal will\n * **steal** the focus\n *\n * See https://github.com/finos/legend-studio/issues/1255\n * See https://mui.com/material-ui/react-modal/#focus-trap\n * See https://github.com/mui/material-ui/issues/17497\n */\n _jsx(BasePopover, { open: assistantService.isOpen, className: \"virtual-assistant__panel__container\", anchorEl: triggerElement, \n // we need to get rid of the backdrop and the click-away trap\n // to make this popover behave like a popper\n // NOTE: we will cancel the effect of click-away trap using CSS\n hideBackdrop: true, 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: clsx('virtual-assistant__panel', {\n 'virtual-assistant__panel--maximized': assistantService.isPanelMaximized,\n }), \n // NOTE: here we block `tabbing` (to move focus). This is to counter the effect of\n // `disableEnforceFocus={true}` set in the assistant panel popover\n // this is the poor-man focus trap for the assistant to ensure\n // that we don't leak focus tab down to other parts of the app\n //\n // Especially, due to the hack we do to compete for focus when another modal\n // is opened, we need to do this to avoid leaking of focus to components\n // beneath the modal via assistant\n //\n // setting `tabIndex={0}` is a hack to make this DOM node focusable\n // and hence, we could trap the focus here using `onKeyDown`\n // See https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex\n tabIndex: 0, onKeyDown: (event) => {\n if (event.key === 'Tab') {\n event.preventDefault();\n event.stopPropagation();\n }\n }, children: [_jsxs(\"div\", { className: \"virtual-assistant__panel__header\", children: [_jsxs(\"div\", { className: \"virtual-assistant__panel__header__tabs\", children: [_jsx(\"div\", { className: clsx('virtual-assistant__panel__header__tab', {\n 'virtual-assistant__panel__header__tab--active': selectedTab === VIRTUAL_ASSISTANT_TAB.SEARCH,\n }), onClick: selectSearch, title: \"Search\", children: _jsx(\"div\", { className: \"virtual-assistant__panel__header__tab__content\", children: _jsx(SearchIcon, {}) }) }), _jsx(\"div\", { className: clsx('virtual-assistant__panel__header__tab', {\n 'virtual-assistant__panel__header__tab--active': selectedTab === VIRTUAL_ASSISTANT_TAB.CONTEXTUAL_SUPPORT,\n }), onClick: selectContextualDoc, title: \"Contextual Support\", children: _jsxs(\"div\", { className: \"virtual-assistant__panel__header__tab__content\", children: [_jsx(MapMarkerIcon, {}), currentContextualDocumentationEntry && (_jsx(\"div\", { className: \"virtual-assistant__panel__header__tab__indicator\", title: \"Contextual support available\" }))] }) }), extraViewConfigurations.map((config) => (_jsx(\"div\", { className: clsx('virtual-assistant__panel__header__tab', {\n 'virtual-assistant__panel__header__tab--active': selectedTab === config.key,\n }), onClick: () => {\n assistantService.setSelectedTab(config.key);\n if (config.autoExpandOnOpen) {\n assistantService.setIsPanelMaximized(true);\n }\n }, title: config.title, children: _jsx(\"div\", { className: \"virtual-assistant__panel__header__tab__content\", children: config.icon ?? _jsx(QuestionCircleIcon, {}) }) }, config.key)))] }), _jsxs(\"div\", { className: \"virtual-assistant__panel__header__actions\", children: [_jsx(\"button\", { className: \"virtual-assistant__panel__header__action\", tabIndex: -1, onClick: toggleMaximize, title: assistantService.isPanelMaximized ? 'Minimize' : 'Maximize', children: assistantService.isPanelMaximized ? (_jsx(EmptyWindowRestoreIcon, {})) : (_jsx(WindowMaximizeIcon, {})) }), _jsx(\"button\", { className: \"virtual-assistant__panel__header__action\", tabIndex: -1, onClick: closeAssistantPanel, title: \"Close\", children: _jsx(CloseIcon, { className: \"virtual-assistant__panel__icon__close\" }) })] })] }), _jsxs(\"div\", { className: \"virtual-assistant__panel__content\", children: [selectedTab === VIRTUAL_ASSISTANT_TAB.SEARCH && (_jsx(VirtualAssistantSearchPanel, {})), selectedTab === VIRTUAL_ASSISTANT_TAB.CONTEXTUAL_SUPPORT && (_jsx(VirtualAssistantContextualSupportPanel, {})), currentExtensionView?.renderer()] })] }) }, assistantService.panelRenderingKey));\n});\nexport const VirtualAssistant = observer(() => {\n const [isDragging, setIsDragging] = useState(false);\n const [_key, _setKey] = useState(uuid());\n const applicationStore = useApplicationStore();\n const assistantRef = useRef(null);\n const assistantService = applicationStore.assistantService;\n const currentContextualDocumentationEntry = assistantService.currentContextualDocumentationEntry;\n const toggleAssistantPanel = () => {\n const newVal = !assistantService.isOpen;\n // open the contextual help tab when contextual help is available\n if (newVal && currentContextualDocumentationEntry) {\n assistantService.setSelectedTab(VIRTUAL_ASSISTANT_TAB.CONTEXTUAL_SUPPORT);\n }\n assistantService.setIsOpen(!assistantService.isOpen);\n };\n const hideAssistant = () => applicationStore.assistantService.hideAssistant();\n const resetPosition = () => {\n // close the panel since\n assistantService.setIsOpen(false);\n _setKey(uuid());\n };\n // drag and drop\n const onDragEnd = () => setIsDragging(false);\n const onDragStart = () => setIsDragging(true);\n useEffect(() => {\n if (assistantService.isHidden) {\n // reset to default position when we hide the assistant\n // so that when we open it the position is reset\n _setKey(uuid());\n }\n }, [assistantService.isHidden]);\n return (_jsx(Draggable\n // this is a trick so we could reset the default position of the assistant\n // See https://github.com/react-grid-layout/react-draggable/issues/214#issuecomment-270021423\n , { \n // make sure we cannot drag and drop outside of the screen\n bounds: \"parent\", onStart: onDragStart, onStop: onDragEnd, \n // Avoid using deprecated findDOMNode method to rid of React warning\n // See https://github.com/react-grid-layout/react-draggable/issues/749\n nodeRef: assistantRef, \n // limit the dnd trigger to only the drag handle\n handle: \".virtual-assistant__station__drag-handle\", children: _jsxs(\"div\", { className: \"virtual-assistant\", \n // NOTE: we have to set the `ref` at this level so even when the assistant is hidden\n // the element is still in the DOM so when we programmatically show the assistant panel\n // the anchor is available in time\n ref: assistantRef, children: [_jsxs(\"div\", { className: clsx('virtual-assistant__station', {\n 'virtual-assistant__station--hidden': assistantService.isHidden,\n 'virtual-assistant__station--active': Boolean(currentContextualDocumentationEntry),\n }), children: [_jsx(\"button\", { className: \"virtual-assistant__station__hide-button\", title: \"Hide assistant\", onClick: () => {\n applicationStore.assistantService.toggleAssistant();\n }, children: _jsx(MinusCircleIcon, {}) }), _jsx(\"button\", { className: \"virtual-assistant__station__trigger\", tabIndex: -1, onClick: toggleAssistantPanel, title: assistantService.isOpen\n ? `Click to close assistant panel`\n : `${currentContextualDocumentationEntry\n ? 'Contextual support available.\\n'\n : ''}Click to open Assistant...`, children: _jsxs(\"div\", { className: \"virtual-assistant__station__character\", children: [_jsx(WizardHatIcon, { className: \"virtual-assistant__station__character__hat\" }), _jsx(SunglassesIcon, { className: \"virtual-assistant__station__character__glasses\" }), _jsx(BeardIcon, { className: \"virtual-assistant__station__character__beard\" })] }) }), _jsx(\"div\", { className: \"virtual-assistant__station__label\", onClick: toggleAssistantPanel, children: \"Assistant\" }), _jsx(ContextMenu, { className: clsx('virtual-assistant__station__drag-handle', {\n 'virtual-assistant__station__drag-handle--dragging': isDragging,\n }), menuProps: {\n elevation: 7,\n classes: {\n root: 'virtual-assistant__context-menu',\n },\n }, content: _jsxs(MenuContent, { children: [_jsx(MenuContentItem, { onClick: resetPosition, children: \"Reset Position\" }), _jsx(MenuContentItem, { onClick: hideAssistant, children: \"Hide Assistant\" })] }), children: _jsx(\"div\", { className: \"virtual-assistant__station__drag-handle__content\", title: isDragging ? undefined : 'Grab to drag assistant', children: _jsx(ThinVerticalDragHandleIcon, {}) }) })] }, currentContextualDocumentationEntry?.uuid ?? ''), !isDragging &&\n assistantService.isOpen &&\n !assistantService.isHidden &&\n assistantRef.current && (_jsx(VirtualAssistantPanel, { triggerElement: assistantRef.current }))] }) }, _key));\n});\n//# sourceMappingURL=VirtualAssistant.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { Backdrop, LegendStyleProvider, Portal } from '@finos/legend-art';\nimport { observer } from 'mobx-react-lite';\nimport { DndProvider } from 'react-dnd';\nimport { HTML5Backend } from 'react-dnd-html5-backend';\nimport { ActionAlert } from './ActionAlert.js';\nimport { useApplicationStore } from './ApplicationStoreProvider.js';\nimport { BlockingAlert } from './BlockingAlert.js';\nimport { NotificationManager } from './NotificationManager.js';\nimport { useEffect } from 'react';\nimport { createKeybindingsHandler, } from '@finos/legend-shared';\nimport { VirtualAssistant } from './VirtualAssistant.js';\nimport { LegendApplicationTelemetryHelper } from '../__lib__/LegendApplicationTelemetry.js';\nvar APPLICATION_COMPONENT_ELEMENT_ID;\n(function (APPLICATION_COMPONENT_ELEMENT_ID) {\n APPLICATION_COMPONENT_ELEMENT_ID[\"TOP_LEVEL_CONTAINER\"] = \"application.top-level-container\";\n APPLICATION_COMPONENT_ELEMENT_ID[\"BACKDROP_CONTAINER\"] = \"application.backdrop-container\";\n})(APPLICATION_COMPONENT_ELEMENT_ID || (APPLICATION_COMPONENT_ELEMENT_ID = {}));\nconst PLATFORM_NATIVE_KEYBOARD_SHORTCUTS = [\n 'Meta+KeyP', // Print\n 'Control+KeyP',\n 'Meta+KeyS', // Save\n 'Control+KeyS',\n 'F8', // Chrome: Developer Tools > Sources: Run or pause script\n 'F10', // Chrome: Developer Tools > Sources: Step over next function call\n 'F11', // Chrome: Developer Tools > Sources: Step into next function call\n 'Meta+Shift+KeyP', // Chrome: Developer Tools: Open Command Prompt inside developer tools\n 'Control+Backquote', // Chrome: Developer Tools: Open console\n 'Control+Shift+KeyN', // Chrome: Open Private Browsing (incognito)\n 'Control+Shift+KeyP', // Firefox: Open Private Browsing\n 'Meta+KeyB', // Firefox: Open bookmark sidebar\n 'Control+KeyB',\n 'F7', // Firefox: Caret browsing\n 'Alt+F7', // Firefox: Caret browsing (Mac)\n 'Control+Shift+KeyB',\n 'Alt+KeyZ', // Mac: special symbol\n];\nconst buildHotkeysConfiguration = (commandKeyMap, handler) => {\n const keyMap = {};\n commandKeyMap.forEach((keyCombinations, commandKey) => {\n if (keyCombinations.length) {\n keyMap[commandKey] = {\n combinations: keyCombinations,\n handler,\n };\n }\n });\n // Disable platform native keyboard shortcuts\n // NOTE: due to the order in which hotkey configuration is searched and applied,\n // we must place these after application hotkey configuration\n const PLATFORM_NATIVE_KEYBOARD_COMMAND = 'INTERNAL__PLATFORM_NATIVE_KEYBOARD_COMMAND';\n keyMap[PLATFORM_NATIVE_KEYBOARD_COMMAND] = {\n combinations: PLATFORM_NATIVE_KEYBOARD_SHORTCUTS,\n handler: (keyCombination, event) => {\n // prevent default from potentially clashing key combinations\n event.preventDefault();\n },\n };\n return keyMap;\n};\n/**\n * Some elements (e.g. <canvas>) and components that we do not control the implementation\n * might have special logic to prevent `keydown` event bubbling naturally, this\n * method forces those event to surface to the top of the app and being handled\n * by keybinding service\n */\nexport const forceDispatchKeyboardEvent = (event, applicationStore) => {\n applicationStore.layoutService\n .getElementByID(APPLICATION_COMPONENT_ELEMENT_ID.TOP_LEVEL_CONTAINER)\n ?.dispatchEvent(new KeyboardEvent(event.type, event));\n};\n/**\n * Potential location to mount backdrop on\n *\n * NOTE: we usually want the backdrop container to be the first child of its immediate parent\n * so that it properly lies under the content that we pick to show on top of the backdrop\n */\nexport const BackdropContainer = (props) => (_jsx(\"div\", { className: \"backdrop__container\", \"data-elementid\": props.elementId }));\nexport const ApplicationComponentFrameworkProvider = observer((props) => {\n const { children } = props;\n const applicationStore = useApplicationStore();\n const disableContextMenu = (event) => {\n event.stopPropagation();\n event.preventDefault();\n };\n const keyBindingMap = buildHotkeysConfiguration(applicationStore.keyboardShortcutsService.commandKeyMap, (keyCombination, event) => {\n // prevent default from potentially clashing key combinations with platform native keyboard shortcuts\n // NOTE: Though tempting since it's a good way to simplify and potentially avoid conflicts,\n // we should not call `preventDefault()` because if we have any hotkey sequence which is too short,\n // such as `r`, `a` - we risk blocking some very common interaction, i.e. user typing, or even\n // constructing longer key combinations\n if (PLATFORM_NATIVE_KEYBOARD_SHORTCUTS.includes(keyCombination)) {\n event.preventDefault();\n }\n applicationStore.keyboardShortcutsService.dispatch(keyCombination);\n });\n useEffect(() => {\n const onKeyEvent = createKeybindingsHandler(keyBindingMap);\n document.addEventListener('keydown', onKeyEvent);\n return () => {\n document.removeEventListener('keydown', onKeyEvent);\n };\n }, [keyBindingMap]);\n /**\n * Keep track of when the application usage is interrupted (e.g. when the app window/tab is not in focus),\n * since for certain platform, background contexts are de-prioritized, given less resources, and hence, would\n * run less performantly; and might require particular handlings.\n *\n * See https://developer.mozilla.org/en-US/docs/Web/API/Page_Visibility_API#policies_in_place_to_aid_background_page_performance\n * See https://plumbr.io/blog/performance-blog/background-tabs-in-browser-load-20-times-slower\n */\n useEffect(() => {\n const onVisibilityChange = () => {\n if (document.hidden) {\n LegendApplicationTelemetryHelper.logEvent_ApplicationUsageInterrupted(applicationStore.telemetryService);\n applicationStore.timeService.recordUsageInterruption();\n }\n };\n document.addEventListener('visibilitychange', onVisibilityChange);\n return () => {\n document.removeEventListener('visibilitychange', onVisibilityChange);\n };\n }, [applicationStore]);\n return (_jsxs(LegendStyleProvider, { children: [_jsx(BlockingAlert, {}), _jsx(ActionAlert, {}), _jsx(NotificationManager, {}), _jsx(VirtualAssistant, {}), applicationStore.layoutService.showBackdrop && (\n // We use <Portal> here to insert backdrop into different parts of the app\n // as backdrop relies heavily on z-index mechanism so its location in the DOM\n // really matters.\n // For example, the default location of the backdrop works fine for most cases\n // but if we want to use the backdrop for elements within modal dialogs, we would\n // need to mount the backdrop at a different location\n _jsx(Portal, { container: applicationStore.layoutService.getElementByID(applicationStore.layoutService.backdropContainerElementID ??\n APPLICATION_COMPONENT_ELEMENT_ID.BACKDROP_CONTAINER) ?? null, children: _jsx(Backdrop, { className: \"backdrop\", open: applicationStore.layoutService.showBackdrop }) })), _jsx(DndProvider, { backend: HTML5Backend, children: _jsxs(\"div\", { className: \"app__container\", \"data-elementid\": APPLICATION_COMPONENT_ELEMENT_ID.TOP_LEVEL_CONTAINER, \n // Disable global context menu so that only places in the app that supports context-menu will be effective\n onContextMenu: disableContextMenu, children: [_jsx(BackdropContainer, { elementId: APPLICATION_COMPONENT_ELEMENT_ID.BACKDROP_CONTAINER }), children] }) })] }));\n});\nexport const SimpleApplicationComponentFrameworkProvider = observer((props) => {\n const { children } = props;\n const applicationStore = useApplicationStore();\n const disableContextMenu = (event) => {\n event.stopPropagation();\n event.preventDefault();\n };\n const keyBindingMap = buildHotkeysConfiguration(applicationStore.keyboardShortcutsService.commandKeyMap, (keyCombination, event) => {\n // prevent default from potentially clashing key combinations with platform native keyboard shortcuts\n // NOTE: Though tempting since it's a good way to simplify and potentially avoid conflicts,\n // we should not call `preventDefault()` because if we have any hotkey sequence which is too short,\n // such as `r`, `a` - we risk blocking some very common interaction, i.e. user typing, or even\n // constructing longer key combinations\n if (PLATFORM_NATIVE_KEYBOARD_SHORTCUTS.includes(keyCombination)) {\n event.preventDefault();\n }\n applicationStore.keyboardShortcutsService.dispatch(keyCombination);\n });\n useEffect(() => {\n const onKeyEvent = createKeybindingsHandler(keyBindingMap);\n document.addEventListener('keydown', onKeyEvent);\n return () => {\n document.removeEventListener('keydown', onKeyEvent);\n };\n }, [keyBindingMap]);\n return (_jsx(LegendStyleProvider, { children: _jsx(DndProvider, { backend: HTML5Backend, children: _jsxs(\"div\", { className: \"app__container\", \"data-elementid\": APPLICATION_COMPONENT_ELEMENT_ID.TOP_LEVEL_CONTAINER, \n // Disable global context menu so that only places in the app that supports context-menu will be effective\n onContextMenu: disableContextMenu, children: [_jsx(BackdropContainer, { elementId: APPLICATION_COMPONENT_ELEMENT_ID.BACKDROP_CONTAINER }), children] }) }) }));\n});\n//# sourceMappingURL=ApplicationComponentFrameworkProvider.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { Terminal as XTermTerminal, } from 'xterm';\nimport { WebLinksAddon as XTermWebLinksAddon } from 'xterm-addon-web-links';\nimport { FitAddon as XTermFitAddon } from 'xterm-addon-fit';\nimport { SearchAddon as XTermSearchAddon, } from 'xterm-addon-search';\nimport { Unicode11Addon as XTermUnicode11Addon } from 'xterm-addon-unicode11';\nimport { WebglAddon as XTermWebglAddon } from 'xterm-addon-webgl';\nimport { DEFAULT_MONOSPACED_FONT_FAMILY, DEFAULT_TAB_SIZE, } from '../ApplicationConfig.js';\nimport { Terminal, DISPLAY_ANSI_ESCAPE, ANSI_moveCursor, } from './Terminal.js';\nimport { ActionState, guaranteeNonNullable, IllegalStateError, isMatchingKeyCombination, LogEvent, noop, prettyCONSTName, uniqBy, } from '@finos/legend-shared';\nimport { APPLICATION_EVENT } from '../../__lib__/LegendApplicationEvent.js';\nimport { forceDispatchKeyboardEvent } from '../../components/ApplicationComponentFrameworkProvider.js';\nconst LEGEND_XTERM_THEME = {\n foreground: '#cccccc',\n background: '#1e1e1e',\n cursor: '#cccccc',\n /** The accent color of the cursor (fg color for a block cursor) */\n // cursorAccent?: string;\n /** The selection background color when the terminal does not have focus (can be transparent) */\n // selectionInactiveBackground?: string;\n selectionBackground: '#264f78', // blue\n black: '#000000',\n red: '#cd3131',\n green: '#0dbc79',\n yellow: '#e5e510',\n blue: '#2472c8',\n magenta: '#bc3fbc',\n cyan: '#11a8cd',\n white: '#e5e5e5',\n brightBlack: '#666666',\n brightRed: '#f14c4c',\n brightGreen: '#23d18b',\n brightYellow: '#f5f543',\n brightBlue: '#3b8eea',\n brightMagenta: '#d670d6',\n brightCyan: '#29b8db',\n brightWhite: '#e5e5e5',\n};\nconst LEGEND_XTERM_SEARCH_THEME = {\n matchOverviewRuler: '#d186167e',\n activeMatchColorOverviewRuler: '#A0A0A0CC',\n matchBackground: '#62331c',\n activeMatchBackground: '#515C6A',\n};\n// robot acsii art\n// See https://asciiartist.com/ascii-art-micro-robot/\nconst getHelpCommandContent = (commandRegistry) => `\n${DISPLAY_ANSI_ESCAPE.BRIGHT_BLACK}+-------------------------------------------------------+${DISPLAY_ANSI_ESCAPE.RESET}\n${DISPLAY_ANSI_ESCAPE.BRIGHT_BLACK}|${DISPLAY_ANSI_ESCAPE.RESET} ${DISPLAY_ANSI_ESCAPE.BRIGHT_GREEN}[@@]${DISPLAY_ANSI_ESCAPE.RESET} \"Hi! Welcome to the HELP menu of Pure IDE\" ${DISPLAY_ANSI_ESCAPE.BRIGHT_BLACK}|${DISPLAY_ANSI_ESCAPE.RESET}\n${DISPLAY_ANSI_ESCAPE.BRIGHT_BLACK}|${DISPLAY_ANSI_ESCAPE.RESET} ${DISPLAY_ANSI_ESCAPE.BRIGHT_GREEN}/|__|\\\\${DISPLAY_ANSI_ESCAPE.RESET} ${DISPLAY_ANSI_ESCAPE.BRIGHT_BLACK}|${DISPLAY_ANSI_ESCAPE.RESET}\n${DISPLAY_ANSI_ESCAPE.BRIGHT_BLACK}+--${DISPLAY_ANSI_ESCAPE.RESET} ${DISPLAY_ANSI_ESCAPE.BRIGHT_GREEN}d b${DISPLAY_ANSI_ESCAPE.RESET} ${DISPLAY_ANSI_ESCAPE.BRIGHT_BLACK}-----------------------------------------------+${DISPLAY_ANSI_ESCAPE.RESET}\n\nFollowing is the list of supported commands:\n\n${uniqBy(Array.from(commandRegistry.values()), (config) => config.command)\n .map((config) => `${DISPLAY_ANSI_ESCAPE.BRIGHT_GREEN}${config.command.padEnd(30)}${DISPLAY_ANSI_ESCAPE.RESET}${config.description}${config.aliases?.length\n ? `\\n${''.padEnd(30)}Aliases: ${config.aliases.join(', ')}`\n : ''}\\n${''.padEnd(30)}Usage: ${DISPLAY_ANSI_ESCAPE.DIM}${config.usage}${DISPLAY_ANSI_ESCAPE.RESET}`)\n .join('\\n')}`;\nconst getCommonANSIEscapeSequencesForStyling = () => `\nCommon ANSI Escape Sequences for Styling:\n\n${Object.entries(DISPLAY_ANSI_ESCAPE)\n .map(([key, value]) => `${value}${prettyCONSTName(key).padEnd(20)}${DISPLAY_ANSI_ESCAPE.RESET\n// NOTE: since these are recommended ANSI escape sequences which can be used\n// by users in strings input in Pure IDE, they have to be Unicode escape, if we send\n// the original hexadecimal escape as part of the string, some string escape handling\n// in Pure seems to escape the leading slash of the ANSI escape sequence \\x1B; however\n// this is not the case of the escape sequence for Unicode, \\u001b hence our logic here\n} ${value.replace('\\x1b', '\\\\u001b')}`)\n .join('\\n')}`;\nconst DEFAULT_USER = 'purist';\nconst DEFAULT_COMMAND_HEADER = `\n${DISPLAY_ANSI_ESCAPE.BOLD}${DISPLAY_ANSI_ESCAPE.BRIGHT_BLUE}$${DEFAULT_USER}${DISPLAY_ANSI_ESCAPE.RESET}\n${DISPLAY_ANSI_ESCAPE.BOLD}${DISPLAY_ANSI_ESCAPE.MAGENTA}\\u276f${DISPLAY_ANSI_ESCAPE.RESET} `;\nconst COMMAND_START = '\\u276f ';\nexport class XTerm extends Terminal {\n instance;\n resizer;\n renderer;\n searcher;\n webLinkProvider;\n _TEMPORARY__onKeyListener;\n _TEMPORARY__onDataListener;\n command = '';\n commandHistory = [];\n currentCommandSearchString = '';\n commandHistoryNavigationIdx = undefined;\n isRunningCommand = false;\n setupState = ActionState.create();\n constructor(applicationStore) {\n super(applicationStore);\n this.instance = new XTermTerminal({\n allowProposedApi: true,\n fontSize: 12,\n letterSpacing: 2,\n fontWeight: 400,\n fontWeightBold: 700,\n fontFamily: `\"${DEFAULT_MONOSPACED_FONT_FAMILY}\", Menlo, Consolas, monospace`,\n tabStopWidth: DEFAULT_TAB_SIZE,\n theme: LEGEND_XTERM_THEME,\n overviewRulerWidth: 14, // 14px\n scrollback: 100000, // buffer a substantial content length\n convertEol: true, // treat \\n as new line\n // this is needed so we can control the cursor programmatically using escape sequences\n scrollOnUserInput: false,\n });\n this.resizer = new XTermFitAddon();\n this.searcher = new XTermSearchAddon();\n this.renderer = new XTermWebglAddon();\n }\n setup(configuration) {\n if (this.setupState.hasCompleted) {\n throw new IllegalStateError(`Terminal is already set up`);\n }\n this.setupState.complete();\n // Handling context loss: The browser may drop WebGL contexts for various reasons like OOM or after the system has been suspended.\n // An easy, but suboptimal way, to handle this is by disposing of WebglAddon when the `webglcontextlost` event fires\n // NOTE: we don't really have a resilient way to fallback right now, hopefully, the fallback is to render in DOM\n this.renderer.onContextLoss(() => {\n this.renderer.dispose();\n });\n this.instance.loadAddon(this.resizer);\n this.instance.loadAddon(this.searcher);\n this.instance.loadAddon(this.renderer);\n this.instance.loadAddon(new XTermUnicode11Addon());\n this.instance.unicode.activeVersion = '11';\n // NOTE: since we render the terminal using webgl/canvas, event is not bubbled\n // naturally through the DOM tree, we have to manually force this\n this.instance.attachCustomKeyEventHandler((event) => {\n // NOTE: this is a cheap way to handle hotkey, but this is really the only\n // hotkey we want to support at local scope of the terminal\n // also, since here we have prevent default and stop propagation, we have to do\n // this here instead at in `onKey` handler\n if (isMatchingKeyCombination(event, 'Control+KeyF') ||\n isMatchingKeyCombination(event, 'Meta+KeyF')) {\n // prevent default so as to not trigger browser platform search command\n event.preventDefault();\n event.stopPropagation();\n this.searchConfig.focus();\n return false;\n }\n else if (\n // NOTE: by default Ctrl+C gets sent to the shell as you wouldn't be able to use bash otherwise.\n // We need this special handling here for normal copy behavior on Windows.\n // Paste (Ctrl+V) not working on Windows could also be due to the same reason, so we would not\n // manually handle that using `xterm.onKey` neither\n // See https://github.com/xtermjs/xterm.js/issues/1868\n // See https://github.com/microsoft/vscode/issues/6451\n (isMatchingKeyCombination(event, 'Control+KeyC') &&\n this.instance.hasSelection()) ||\n isMatchingKeyCombination(event, 'Control+KeyV')) {\n return false;\n }\n return true; // return true to indicate the event should still be handled by xterm\n });\n this.webLinkProvider = configuration?.webLinkProvider\n ? new XTermWebLinksAddon(configuration.webLinkProvider.handler, {\n urlRegex: configuration.webLinkProvider.regex,\n })\n : new XTermWebLinksAddon();\n this.instance.loadAddon(this.webLinkProvider);\n (configuration?.commands ?? []).forEach((commandConfig) => {\n [commandConfig.command, ...(commandConfig.aliases ?? [])].forEach((command) => {\n if (!this.commandRegistry.has(command)) {\n this.commandRegistry.set(command, commandConfig);\n }\n else {\n this.applicationStore.logService.warn(LogEvent.create(APPLICATION_EVENT.TERMINAL_COMMAND_CONFIGURATION_CHECK__FAILURE), `Found multiple duplicated terminal commands '${command}'`);\n }\n });\n });\n this.searcher.onDidChangeResults((result) => {\n this.setSearchResultCount(result.resultCount);\n this.setSearchCurrentResultIndex(result.resultIndex);\n });\n // NOTE: `xterm` expects to be attached to a proper terminal program which handles\n // input, since we can't do that yet, we implement a fairly basic input handling flow\n // See https://github.com/xtermjs/xterm.js/issues/617#issuecomment-288849502\n this._TEMPORARY__onKeyListener = this.instance.onKey(({ key, domEvent }) => {\n // take care of command history navigation\n if (domEvent.code === 'ArrowUp') {\n this.setCommandFromHistory(this.commandHistoryNavigationIdx !== undefined\n ? this.commandHistoryNavigationIdx + 1\n : 0);\n return;\n // reset current command in place\n }\n else if (domEvent.code === 'ArrowDown') {\n if (this.commandHistoryNavigationIdx !== undefined) {\n this.setCommandFromHistory(this.commandHistoryNavigationIdx === 0\n ? undefined\n : this.commandHistoryNavigationIdx - 1);\n }\n return;\n }\n else {\n // reset navigation history the moment any other key is pressed\n this.commandHistoryNavigationIdx = undefined;\n }\n if (domEvent.code === 'Enter') {\n // run command\n if (this.command.trim()) {\n const text = this.command;\n const [command, ...args] = text.replaceAll(/\\s+/g, ' ').split(' ');\n this.addCommandToHistory(this.command);\n if (!command) {\n return;\n }\n const matchingCommand = this.commandRegistry.get(command);\n if (!matchingCommand) {\n this.fail(`command not found: ${command}`);\n return;\n }\n if (this.isRunningCommand) {\n return;\n }\n this.isRunningCommand = true;\n matchingCommand\n .handler(args.map((arg) => arg.trim()), command, text)\n .catch(noop())\n .finally(() => {\n this.isRunningCommand = false;\n if (!this.isFlushed) {\n this.abort();\n }\n });\n }\n }\n else if (isMatchingKeyCombination(domEvent, 'Control+KeyD') ||\n // NOTE: this handling here makes the assumption that the hotkey used for copying is\n // fixed to `Control+KeyC` (for Windows), it doesn't handling a different assignment\n (isMatchingKeyCombination(domEvent, 'Control+KeyC') &&\n !this.instance.hasSelection())) {\n // abort command\n this.abort();\n }\n else if (domEvent.code === 'Backspace') {\n // Alt: jump word only, Ctrl: jump to end\n // this would apply for Delete, ArrowLeft, ArrowRight\n this.deleteFromCommand(domEvent.altKey || domEvent.ctrlKey\n ? this.computeCursorJumpMovement(true)\n : -1);\n }\n else if (domEvent.code === 'Delete') {\n this.deleteFromCommand(domEvent.altKey || domEvent.ctrlKey\n ? this.computeCursorJumpMovement(false)\n : 1);\n }\n else if (domEvent.code === 'ArrowLeft') {\n const movement = this.computeCursorMovement(domEvent.altKey || domEvent.ctrlKey\n ? this.computeCursorJumpMovement(true)\n : -1);\n this.instance.scrollLines(movement.scroll);\n this.instance.write(movement.seq);\n }\n else if (domEvent.code === 'ArrowRight') {\n const movement = this.computeCursorMovement(domEvent.altKey || domEvent.ctrlKey\n ? this.computeCursorJumpMovement(false)\n : 1);\n this.instance.scrollLines(movement.scroll);\n this.instance.write(movement.seq);\n }\n else if (\n // use key here so we absolute do not allow any characters other than these\n // being added to the input command\n key.match(/^[A-Za-z0-9!@#$%^&*()\\-_=+\"':;,.<>/?[\\]{}|\\\\~` ]$/)) {\n // commonly supported keys\n this.writeToCommand(key);\n }\n else {\n // for the rest, allow the keyboard event to be bubbled to\n // application keyboard shortcuts handler\n forceDispatchKeyboardEvent(domEvent, this.applicationStore);\n }\n });\n // this is needed to support copy-pasting\n this._TEMPORARY__onDataListener = this.instance.onData((val) => {\n // only support pasting (not meant for 1 character though) and special functions starting with special\n // ANSI escape sequence\n if (val.length > 1 && !val.startsWith('\\x1b')) {\n this.writeToCommand(val\n // remove all unsupported characters, including newline\n .replaceAll(/[^A-Za-z0-9!@#$%^&*()\\-_=+\"':;,.<>/?[\\]{}|\\\\~` ]/g, '')\n .trimEnd());\n }\n });\n }\n // NOTE: this is fairly HACKY way to detect command\n // we don't really have a better solution at the moment,\n // but we should come with more systematic way of persisting the start line of command\n // the challenge with this is due to text-reflow\n //\n // there is also a quriky known issue with text-reflow and the line with cursor\n // See https://github.com/xtermjs/xterm.js/issues/1941#issuecomment-463660633\n getCommandRange() {\n const buffer = this.instance.buffer.active;\n const cols = this.instance.cols;\n const commandText = `${COMMAND_START}${this.command}`;\n const commandFirstLine = `${COMMAND_START}${this.command.substring(0, cols - COMMAND_START.length)}${this.command.length < cols - COMMAND_START.length\n ? ' '.repeat(cols - this.command.length - COMMAND_START.length)\n : ''}`;\n let startY = 0;\n let cursorIdx = 0;\n for (let i = buffer.baseY + buffer.cursorY; i > -1; --i) {\n const line = guaranteeNonNullable(buffer.getLine(i));\n const lineText = line.translateToString();\n if (lineText === commandFirstLine) {\n startY = i;\n cursorIdx +=\n (i === buffer.baseY + buffer.cursorY ? buffer.cursorX : cols) -\n COMMAND_START.length;\n break;\n }\n else {\n cursorIdx +=\n i === buffer.baseY + buffer.cursorY ? buffer.cursorX : cols;\n }\n }\n // start line == -1 is the rare case where the command is too long and exceeds the buffer length\n // leading to incomplete command being captured\n return {\n startY,\n startX: COMMAND_START.length,\n endY: startY + (commandText.length - (commandText.length % cols)) / cols,\n endX: commandText.length % cols,\n cursorIdx,\n };\n }\n computeCursorJumpMovement(back) {\n const range = this.getCommandRange();\n let distance = undefined;\n let foundWord = false;\n // scan for the boundary of the closest word to the cursor position\n if (back) {\n for (let i = range.cursorIdx - 1; i > -1; --i) {\n const char = this.command.charAt(i);\n if (char.match(/\\w/)) {\n if (!foundWord) {\n foundWord = true;\n }\n }\n else {\n if (foundWord) {\n distance = range.cursorIdx - i - 1;\n break;\n }\n }\n }\n }\n else {\n for (let i = range.cursorIdx + 1; i < this.command.length; ++i) {\n const char = this.command.charAt(i);\n if (char.match(/\\w/)) {\n if (!foundWord) {\n foundWord = true;\n }\n }\n else {\n if (foundWord) {\n distance = i - range.cursorIdx - 1;\n break;\n }\n }\n }\n }\n if (distance === undefined) {\n distance = back ? range.cursorIdx : this.command.length - range.cursorIdx;\n }\n return back ? -distance : distance;\n }\n /**\n * Generate the ANSI escape sequence for new cursor position\n * after being moved by the the number of cells.\n *\n * @param val a number (negative means cursor move leftwards)\n * @param limit whether to limit the movement of the cursor by the command range\n * @returns cursor movement information including the ANSI escape sequence for new cursor position and scroll distance\n */\n computeCursorMovement(val, limit = true) {\n const buffer = this.instance.buffer.active;\n const cols = this.instance.cols;\n const rows = this.instance.rows;\n const range = this.getCommandRange();\n const maxDistance = limit\n ? val < 0\n ? range.cursorIdx\n : this.command.length - range.cursorIdx\n : val;\n const distance = Math.min(Math.abs(val), maxDistance);\n let newCursorX = buffer.cursorX;\n let newCursorY = buffer.cursorY;\n let abs_cursorY = buffer.baseY + buffer.cursorY;\n if (val < 0) {\n // move leftwards\n newCursorX = (cols + ((buffer.cursorX - distance) % cols)) % cols;\n newCursorY =\n buffer.cursorY -\n (distance > buffer.cursorX ? Math.ceil(distance / cols) : 0);\n abs_cursorY = newCursorY + buffer.baseY;\n newCursorY = Math.max(newCursorY, -1);\n }\n else if (val > 0) {\n // move rightwards\n newCursorX = (buffer.cursorX + distance) % cols;\n newCursorY =\n buffer.cursorY +\n (buffer.cursorX + distance >= cols\n ? Math.floor((buffer.cursorX + distance) / cols)\n : 0);\n abs_cursorY = newCursorY + buffer.baseY;\n newCursorY = Math.min(newCursorY, rows - 1);\n }\n const scroll = abs_cursorY > buffer.viewportY + rows\n ? abs_cursorY - (buffer.viewportY + rows)\n : abs_cursorY < buffer.viewportY\n ? abs_cursorY - buffer.viewportY\n : 0;\n return {\n // NOTE: currently, there is a design limitation with programmatically set the cursor using escape sequence\n // by design, the scrollback (everything above the viewport/ybase) is readonly, and most terminals work like this.\n // So for very long command that causes an overflow, one cannot set the cursor position pass the `baseY`\n // this will affect both navigation and delete/backspace behavior\n // See https://github.com/xtermjs/xterm.js/issues/4405\n seq: ANSI_moveCursor(newCursorY + 1, newCursorX + 1),\n scroll,\n };\n }\n /**\n * Write value to command with awareness of the current cursor position\n */\n writeToCommand(val) {\n const range = this.getCommandRange();\n const left = this.command.slice(0, range.cursorIdx);\n const right = this.command.slice(range.cursorIdx);\n const movement = this.computeCursorMovement(val.length, false);\n this.instance.scrollLines(movement.scroll);\n this.instance.write(val +\n right +\n // update the cursor\n movement.seq);\n this.setCommand(left + val + right);\n }\n /**\n * Remove number of characters from command with awareness of the current cursor position\n * NOTE: negative number means backward deleting (i.e. backspace)\n */\n deleteFromCommand(val) {\n const range = this.getCommandRange();\n const maxDistance = val < 0 ? range.cursorIdx : this.command.length - range.cursorIdx;\n const distance = Math.min(Math.abs(val), maxDistance);\n let left;\n let right;\n let cursorMovement;\n if (val === 0) {\n return;\n }\n else if (val < 0) {\n // remove leftwards\n left = this.command.slice(0, range.cursorIdx - distance);\n right = this.command.slice(range.cursorIdx, this.command.length);\n cursorMovement = -distance;\n }\n else {\n // remove rightwards\n left = this.command.slice(0, range.cursorIdx);\n right = this.command.slice(range.cursorIdx + distance, this.command.length);\n cursorMovement = 0;\n }\n const movement = this.computeCursorMovement(cursorMovement);\n this.instance.scrollLines(movement.scroll);\n this.instance.write(\n // reset cursor to start of command, basically here, we're rewriting the entire command\n ANSI_moveCursor(range.startY + 1, range.startX + 1) +\n left +\n right +\n // fill space to erase cells rendered from previous command\n ' '.repeat(distance) +\n // move the cursor as well\n movement.seq);\n this.setCommand(left + right);\n }\n get isSetup() {\n return this.setupState.hasCompleted;\n }\n isFocused() {\n return document.activeElement === this.instance.textarea;\n }\n mount(container) {\n if (!this.setupState.hasCompleted) {\n throw new IllegalStateError(`XTerm terminal has not been set up yet`);\n }\n this.instance.open(container);\n }\n dispose() {\n this.searcher.dispose();\n this.resizer.dispose();\n this.renderer.dispose();\n this.webLinkProvider?.dispose();\n this._TEMPORARY__onKeyListener?.dispose();\n this._TEMPORARY__onDataListener?.dispose();\n this.instance.dispose();\n }\n autoResize() {\n this.resizer.fit();\n }\n focus() {\n this.instance.focus();\n }\n addCommandToHistory(val) {\n // if this is the same as previous command, do not push it to the history stack\n if (val === this.commandHistory.at(0)) {\n return;\n }\n // history command is essentially a stack, so we only insert at the beginning\n this.commandHistory.unshift(val);\n }\n /**\n * This methods help update the current command to a command in history\n * stack, it does the necessary resetting and helps properly update\n * the history navigation index\n */\n setCommandFromHistory(idx) {\n const val = idx === undefined\n ? this.currentCommandSearchString\n : // NOTE: only consider commands starting with the original command\n // also note that empty string naturaly match all history command\n this.commandHistory\n .filter((command) => command.startsWith(this.currentCommandSearchString))\n .at(idx);\n if (val !== undefined) {\n let range = this.getCommandRange();\n this.instance.write(\n // reset cursor to start of command and rewrite the entire command\n ANSI_moveCursor(range.startY + 1, range.startX + 1) +\n val.padEnd(this.command.length));\n this.command = val;\n range = this.getCommandRange();\n this.instance.write(\n // reset cursor to command end\n ANSI_moveCursor(range.endY + 1, range.endX + 1));\n this.commandHistoryNavigationIdx = idx;\n }\n }\n setCommand(val) {\n this.command = val;\n this.currentCommandSearchString = val;\n this.commandHistoryNavigationIdx = undefined;\n }\n newCommand() {\n this.instance.write(DEFAULT_COMMAND_HEADER);\n this.setCommand('');\n }\n newSystemCommand(command) {\n // if another command is already running, we don't need to print the command header anymore\n // the potential pitfall here is that we could have another process prints to the\n // terminal while the command is being run. Nothing much we can do here for now.\n if (!this.isRunningCommand) {\n if (this.command) {\n this.abort();\n this.newCommand();\n }\n this.instance.write(`${DISPLAY_ANSI_ESCAPE.DIM}(system: ${command})\\n${DISPLAY_ANSI_ESCAPE.RESET}`);\n }\n }\n /**\n * Flush the terminal screen completely\n *\n * Probably due to write buffer batching, calling `reset` or `clear` on xterm terminal immediately after\n * write commands will not work. To solve this, we can either promisify the `reset` call or write the ANSI\n * reset sequence \\x1bc\n */\n flushScreen() {\n this.instance.write('\\x1bc');\n this.instance.reset();\n }\n get isFlushed() {\n const buffer = this.instance.buffer.active;\n let isLastLineEmpty = true;\n for (let i = buffer.baseY + buffer.cursorY; i > -1; --i) {\n const line = guaranteeNonNullable(buffer.getLine(i));\n const lineText = line.translateToString();\n // skip empty lines\n if (!lineText.trim()) {\n continue;\n }\n else {\n isLastLineEmpty = lineText !== COMMAND_START;\n break;\n }\n }\n return this.command === '' && isLastLineEmpty;\n }\n clear() {\n this.flushScreen();\n this.instance.scrollToTop();\n this.newCommand();\n }\n resetANSIStyling() {\n this.instance.write(DISPLAY_ANSI_ESCAPE.RESET);\n }\n showHelp() {\n this.resetANSIStyling();\n this.instance.scrollToBottom();\n if (!this.isFlushed && !this.isRunningCommand) {\n this.abort();\n }\n this.instance.write(getHelpCommandContent(this.commandRegistry));\n this.abort();\n }\n showCommonANSIEscapeSequences() {\n this.resetANSIStyling();\n this.instance.scrollToBottom();\n if (!this.isFlushed && !this.isRunningCommand) {\n this.abort();\n }\n this.instance.write(getCommonANSIEscapeSequencesForStyling());\n this.abort();\n }\n abort() {\n this.resetANSIStyling();\n this.instance.write('\\n');\n this.newCommand();\n this.instance.scrollToBottom();\n this.isRunningCommand = false;\n }\n fail(error, opts) {\n if (opts?.systemCommand) {\n this.newSystemCommand(opts.systemCommand);\n }\n this.instance.write(`\\n${DISPLAY_ANSI_ESCAPE.RED}${error}${DISPLAY_ANSI_ESCAPE.RED}`);\n this.abort();\n }\n output(val, opts) {\n this.resetANSIStyling();\n if ((!opts?.clear || this.preserveLog) && opts?.systemCommand) {\n this.newSystemCommand(opts.systemCommand);\n }\n if (!this.preserveLog && opts?.clear) {\n this.flushScreen();\n }\n else if (this.preserveLog || this.isRunningCommand) {\n this.instance.write('\\n');\n }\n this.instance.write(val);\n this.resetANSIStyling();\n this.instance.write('\\n');\n this.instance.scrollToBottom();\n this.newCommand();\n }\n search(val) {\n this.searcher.findNext(val, {\n decorations: LEGEND_XTERM_SEARCH_THEME,\n regex: this.searchConfig.useRegex,\n wholeWord: this.searchConfig.matchWholeWord,\n caseSensitive: this.searchConfig.matchCaseSensitive,\n // do incremental search so that the expansion will be expanded the selection if it\n // still matches the term the user typed.\n incremental: true,\n });\n }\n clearSearch() {\n this.searcher.clearDecorations();\n this.instance.clearSelection();\n this.setSearchText('');\n this.setSearchResultCount(undefined);\n this.setSearchCurrentResultIndex(undefined);\n }\n findPrevious() {\n this.searcher.findPrevious(this.searchConfig.searchText, {\n decorations: LEGEND_XTERM_SEARCH_THEME,\n regex: this.searchConfig.useRegex,\n wholeWord: this.searchConfig.matchWholeWord,\n caseSensitive: this.searchConfig.matchCaseSensitive,\n });\n }\n findNext() {\n this.searcher.findNext(this.searchConfig.searchText, {\n decorations: LEGEND_XTERM_SEARCH_THEME,\n regex: this.searchConfig.useRegex,\n wholeWord: this.searchConfig.matchWholeWord,\n caseSensitive: this.searchConfig.matchCaseSensitive,\n });\n }\n getContent() {\n const buffer = this.instance.buffer.active;\n const lines = [];\n for (let i = 0; i < buffer.length; ++i) {\n const line = guaranteeNonNullable(buffer.getLine(i));\n lines.push(line.translateToString());\n }\n return lines.join('\\n').trimEnd();\n }\n copy() {\n if (!this.instance.hasSelection()) {\n this.applicationStore.notificationService.notifyWarning(`Ther terminal has no selection to copy`);\n return;\n }\n this.applicationStore.clipboardService\n .copyTextToClipboard(this.instance.getSelection())\n .catch(this.applicationStore.alertUnhandledError);\n }\n copyAll() {\n this.applicationStore.clipboardService\n .copyTextToClipboard(this.getContent())\n .catch(this.applicationStore.alertUnhandledError);\n }\n}\n//# sourceMappingURL=XTerm.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { XTerm } from './terminal/XTerm.js';\nexport class TerminalService {\n applicationStore;\n terminal;\n constructor(applicationStore) {\n this.applicationStore = applicationStore;\n this.terminal = new XTerm(applicationStore);\n }\n}\n//# sourceMappingURL=TerminalService.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { action, makeObservable, observable } from 'mobx';\nconst UNKNOWN_USER_ID = '(unknown)';\nexport class IdentityService {\n applicationStore;\n currentUser = UNKNOWN_USER_ID;\n constructor(applicationStore) {\n makeObservable(this, {\n currentUser: observable,\n setCurrentUser: action,\n });\n this.applicationStore = applicationStore;\n }\n get isAnonymous() {\n return this.currentUser === UNKNOWN_USER_ID;\n }\n setCurrentUser(val) {\n this.currentUser = val;\n }\n}\n//# sourceMappingURL=IdentityService.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport var LEGEND_APPLICATION_COLOR_THEME;\n(function (LEGEND_APPLICATION_COLOR_THEME) {\n LEGEND_APPLICATION_COLOR_THEME[\"DEFAULT_DARK\"] = \"default-dark\";\n LEGEND_APPLICATION_COLOR_THEME[\"LEGACY_LIGHT\"] = \"legacy-light\";\n LEGEND_APPLICATION_COLOR_THEME[\"HIGH_CONTRAST_LIGHT\"] = \"hc-light\";\n})(LEGEND_APPLICATION_COLOR_THEME || (LEGEND_APPLICATION_COLOR_THEME = {}));\nexport const DEFAULT_DARK_COLOR_THEME = {\n name: 'Default Dark (default)',\n key: LEGEND_APPLICATION_COLOR_THEME.DEFAULT_DARK,\n TEMPORARY__globalCSSClassName: 'theme__default-dark',\n colors: {\n 'data-access-overview.chart.access-granted': '#6a9955',\n 'data-access-overview.chart.access-approved': '#007acc',\n 'data-access-overview.chart.access-requested': '#fbbc05',\n 'data-access-overview.chart.access-not-granted': '#ea4646',\n 'data-access-overview.chart.unsupported-access': '#2d2d2d',\n },\n};\nexport const LEGACY_LIGHT_COLOR_THEME = {\n name: 'Legacy Light',\n key: LEGEND_APPLICATION_COLOR_THEME.LEGACY_LIGHT,\n TEMPORARY__globalCSSClassName: 'theme__legacy-light',\n};\nexport const HIGH_CONTRAST_LIGHT_COLOR_THEME = {\n name: 'High-Contrast Light',\n key: LEGEND_APPLICATION_COLOR_THEME.HIGH_CONTRAST_LIGHT,\n TEMPORARY__globalCSSClassName: 'theme__hc-light',\n colors: {\n 'data-access-overview.chart.access-granted': '#52a31d',\n 'data-access-overview.chart.access-approved': '#3d8df5',\n 'data-access-overview.chart.access-requested': '#f5c518',\n 'data-access-overview.chart.access-not-granted': '#fa5343',\n 'data-access-overview.chart.unsupported-access': '#e1e7ea',\n },\n};\n//# sourceMappingURL=LegendApplicationColorTheme.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { guaranteeNonNullable } from '@finos/legend-shared';\nexport class LocalStorage {\n get localStorage() {\n return guaranteeNonNullable(window.localStorage, `'window.localStorage' object is not available in non-web environment`);\n }\n setItem(key, value) {\n this.localStorage.setItem(key, value);\n }\n getItem(key) {\n return this.localStorage.getItem(key);\n }\n removeItem(key) {\n this.localStorage.removeItem(key);\n }\n clear() {\n this.localStorage.clear();\n }\n hasItem(key) {\n return this.localStorage.hasItem(key);\n }\n}\n//# sourceMappingURL=ApplicationStorage.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { guaranteeIsNumber, guaranteeIsString, guaranteeIsBoolean, guaranteeIsObject, isNonNullable, returnUndefOnError, isEmpty, } from '@finos/legend-shared';\nimport { LocalStorage } from './ApplicationStorage.js';\nexport class StorageStore {\n storeIndex;\n storageService;\n data;\n constructor(storageService, storeIndex) {\n this.storageService = storageService;\n this.storeIndex = storeIndex;\n this.data = this.storageService.getIndex(this.storeIndex) ?? {};\n }\n getValue(key) {\n return this.data[key];\n }\n getNumericValue(key) {\n const value = this.getValue(key);\n return value !== undefined ? guaranteeIsNumber(value) : undefined;\n }\n getStringValue(key) {\n const value = this.getValue(key);\n return value !== undefined ? guaranteeIsString(value) : undefined;\n }\n getBooleanValue(key) {\n const value = this.getValue(key);\n return value !== undefined ? guaranteeIsBoolean(value) : undefined;\n }\n getObjectValue(key) {\n const value = this.getValue(key);\n return value !== undefined ? guaranteeIsObject(value) : undefined;\n }\n hasValue(key) {\n return isNonNullable(this.data[key]);\n }\n persistValue(key, value) {\n if (value !== undefined) {\n this.data[key] = value;\n }\n else {\n delete this.data[key];\n }\n this.storageService.updateIndex(this.storeIndex, this.data);\n }\n}\nexport class StorageService {\n applicationStore;\n storage;\n data;\n constructor(applicationStore) {\n this.applicationStore = applicationStore;\n this.storage = new LocalStorage();\n const data = this.storage.getItem(applicationStore.config.applicationStorageKey);\n this.data = data\n ? (returnUndefOnError(() => JSON.parse(data)) ?? {})\n : {};\n }\n getIndex(index) {\n return this.data[index];\n }\n updateIndex(index, value) {\n if (isEmpty(value)) {\n delete this.data[index];\n }\n else {\n this.data[index] = value;\n }\n this.storage.setItem(this.applicationStore.config.applicationStorageKey, JSON.stringify(this.data));\n }\n}\n//# sourceMappingURL=StorageService.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { AbstractPlugin, } from '@finos/legend-shared';\nexport class TelemetryServicePlugin extends AbstractPlugin {\n userId;\n appName;\n appVersion;\n appEnv;\n appSessionId;\n appStartTime;\n install(pluginManager) {\n pluginManager.registerTelemetryServicePlugin(this);\n }\n setup(config) {\n this.userId = config.userId;\n this.appName = config.appName;\n this.appVersion = config.appVersion;\n this.appEnv = config.appEnv;\n this.appSessionId = config.appSessionId;\n this.appStartTime = config.appStartTime;\n }\n}\nexport class TelemetryService {\n applicationStore;\n plugins = [];\n constructor(applicationStore) {\n this.applicationStore = applicationStore;\n }\n registerPlugins(plugins) {\n this.plugins = plugins;\n }\n setup() {\n const config = {\n userId: this.applicationStore.identityService.currentUser,\n appName: this.applicationStore.config.appName,\n appEnv: this.applicationStore.config.env,\n appVersion: this.applicationStore.config.appVersion,\n appSessionId: this.applicationStore.uuid,\n appStartTime: this.applicationStore.timeService.timestamp,\n };\n this.plugins.forEach((plugin) => plugin.setup(config));\n }\n logEvent(eventType, data) {\n this.plugins.forEach((plugin) => plugin.logEvent(eventType, data));\n }\n}\n//# sourceMappingURL=TelemetryService.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport class TimeService {\n timestamp = Date.now();\n /**\n * Record the instances where the application usage is interrupted (e.g. when the app window/tab is not in focus),\n * this is useful to know since for certain platform, background contexts are de-prioritized, given less resources,\n * and hence, would run less performantly.\n *\n * See https://developer.mozilla.org/en-US/docs/Web/API/Page_Visibility_API#policies_in_place_to_aid_background_page_performance\n * See https://plumbr.io/blog/performance-blog/background-tabs-in-browser-load-20-times-slower\n *\n * This impacts certain operations such as scheduler and timer in the app, so it's useful to keep track of these here.\n */\n interruptions = [];\n recordUsageInterruption() {\n this.interruptions.push(Date.now());\n }\n finalizeTimingsRecord(stopWatch, timings) {\n const totalTime = stopWatch.elapsed;\n const startTime = stopWatch.startTime;\n const endTime = startTime + totalTime;\n const record = {\n ...(timings ?? {}),\n ...Object.fromEntries(stopWatch.records),\n total: totalTime,\n };\n // count the number of interruptions\n let numberOfInteruptions = 0;\n for (const interruption of this.interruptions) {\n if (interruption >= startTime && interruption <= endTime) {\n numberOfInteruptions++;\n }\n else if (interruption > endTime) {\n break;\n }\n }\n return numberOfInteruptions > 0\n ? { ...record, __numberOfInteruptions: numberOfInteruptions }\n : record;\n }\n}\n//# sourceMappingURL=TimeService.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { LEGEND_APPLICATION_COLOR_THEME } from './LegendApplicationColorTheme.js';\nexport var LEGEND_APPLICATION_SETTING_KEY;\n(function (LEGEND_APPLICATION_SETTING_KEY) {\n LEGEND_APPLICATION_SETTING_KEY[\"COLOR_THEME\"] = \"application.layout.colorTheme\";\n})(LEGEND_APPLICATION_SETTING_KEY || (LEGEND_APPLICATION_SETTING_KEY = {}));\nexport const LEGEND_APPLICATION_SETTING_CONFIG = {\n [LEGEND_APPLICATION_SETTING_KEY.COLOR_THEME]: {\n defaultValue: LEGEND_APPLICATION_COLOR_THEME.DEFAULT_DARK,\n },\n};\n//# sourceMappingURL=LegendApplicationSetting.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { action, computed, makeObservable, observable } from 'mobx';\nimport { LEGEND_APPLICATION_SETTING_KEY } from '../__lib__/LegendApplicationSetting.js';\nimport { LogEvent, guaranteeNonNullable } from '@finos/legend-shared';\nimport { APPLICATION_EVENT } from '../__lib__/LegendApplicationEvent.js';\nimport { DEFAULT_DARK_COLOR_THEME, LEGEND_APPLICATION_COLOR_THEME, } from '../__lib__/LegendApplicationColorTheme.js';\nexport class LayoutService {\n applicationStore;\n // backdrop\n backdropContainerElementID;\n showBackdrop = false;\n // color theme\n colorThemeRegistry = new Map();\n currentColorTheme;\n constructor(applicationStore) {\n makeObservable(this, {\n currentColorTheme: observable.ref,\n TEMPORARY__isLightColorThemeEnabled: computed,\n backdropContainerElementID: observable,\n showBackdrop: observable,\n setBackdropContainerElementID: action,\n setShowBackdrop: action,\n setColorTheme: action,\n });\n this.applicationStore = applicationStore;\n // register core color themes\n // TODO: we might want to cover at least: a dark theme, a light theme, and a high contrast theme (etc.)\n // as part of core\n this.colorThemeRegistry.set(LEGEND_APPLICATION_COLOR_THEME.DEFAULT_DARK, DEFAULT_DARK_COLOR_THEME);\n // register color themes from extensions\n this.applicationStore.pluginManager\n .getApplicationPlugins()\n .flatMap((plugin) => plugin.getExtraColorThemes?.() ?? [])\n .forEach((colorTheme) => {\n // NOTE: in the future, when we need to make theme extensible, we might want to reconsider this decision here\n // perhaps, each extension can define a new set of color keys that each theme supports and the core theme is extensible\n // while non-core themes are left in a separate package/module and might/might not have support for those color keys\n if (this.colorThemeRegistry.has(colorTheme.key)) {\n this.applicationStore.logService.warn(LogEvent.create(APPLICATION_EVENT.COLOR_THEME_CONFIGURATION_CHECK__FAILURE), `Found duplicated color themes with key '${colorTheme.key}'`);\n return;\n }\n this.colorThemeRegistry.set(colorTheme.key, colorTheme);\n });\n const themeKey = this.applicationStore.settingService.getStringValue(LEGEND_APPLICATION_SETTING_KEY.COLOR_THEME) ?? LEGEND_APPLICATION_COLOR_THEME.DEFAULT_DARK;\n this.currentColorTheme = guaranteeNonNullable(this.colorThemeRegistry.get(themeKey));\n this.TEMPORARY__syncGlobalCSSClassName(this.currentColorTheme, undefined);\n }\n getElementByID(val) {\n return document.querySelector(`[data-elementid='${val}']`) ?? undefined;\n }\n setWindowTitle(value) {\n document.title = value;\n }\n /**\n * Change the ID used to find the base element to mount the backdrop on.\n * This is useful when we want to use backdrop with embedded application which\n * requires its own backdrop usage.\n *\n * TODO?: we can consider making backdrop container component auto-register its ID\n * as it gets rendered in the application\n */\n setBackdropContainerElementID(val) {\n this.backdropContainerElementID = val;\n }\n setShowBackdrop(val) {\n this.showBackdrop = val;\n }\n /**\n * NOTE: this is the poor man way of doing theming as we only properly support dark color theme\n * This flag is binary because we did light color theme in rush\n *\n * See https://github.com/finos/legend-studio/issues/264\n */\n get TEMPORARY__isLightColorThemeEnabled() {\n return (this.currentColorTheme.key !== LEGEND_APPLICATION_COLOR_THEME.DEFAULT_DARK);\n }\n TEMPORARY__syncGlobalCSSClassName(theme, previousTheme) {\n if (previousTheme) {\n document.body.classList.remove(previousTheme.TEMPORARY__globalCSSClassName);\n }\n document.body.classList.add(theme.TEMPORARY__globalCSSClassName);\n }\n setColorTheme(key, options) {\n const newColorTheme = this.colorThemeRegistry.get(key);\n if (key === this.currentColorTheme.key || !newColorTheme) {\n return;\n }\n const previousColorTheme = this.currentColorTheme;\n this.currentColorTheme = newColorTheme;\n this.TEMPORARY__syncGlobalCSSClassName(newColorTheme, previousColorTheme);\n if (options?.persist) {\n this.applicationStore.settingService.persistValue(LEGEND_APPLICATION_SETTING_KEY.COLOR_THEME, key);\n }\n }\n getColor(key) {\n return (this.currentColorTheme.colors?.[key] ??\n guaranteeNonNullable(this.colorThemeRegistry.get(LEGEND_APPLICATION_COLOR_THEME.DEFAULT_DARK)).colors?.[key] ??\n 'transparent');\n }\n}\n//# sourceMappingURL=LayoutService.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport class ClipboardService {\n applicationStore;\n constructor(applicationStore) {\n this.applicationStore = applicationStore;\n }\n async copyTextToClipboard(text, options) {\n // This is a much cleaner way which requires HTTPS\n // See https://developers.google.com/web/updates/2018/03/clipboardapi\n await navigator.clipboard\n .writeText(text)\n .catch((error) => {\n this.applicationStore.notificationService.notifyError(error);\n })\n .finally(() => {\n if (options?.notifySuccessMessage) {\n this.applicationStore.notificationService.notifySuccess(options.notifySuccessMessage);\n }\n });\n }\n}\n//# sourceMappingURL=ClipboardService.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport const NAVIGATION_ZONE_SEPARATOR = '.';\nexport const NAVIGATION_ZONE_PREFIX = '#';\nexport class NavigationService {\n navigator;\n constructor(navigator) {\n this.navigator = navigator;\n }\n}\n//# sourceMappingURL=NavigationService.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { deepEqual, isBoolean, isNumber, isObject, isString, LogEvent, } from '@finos/legend-shared';\nimport { APPLICATION_EVENT } from '../__lib__/LegendApplicationEvent.js';\nimport { StorageStore } from './storage/StorageService.js';\nexport const collectSettingConfigurationEntriesFromConfig = (data) => Object.entries(data).map((entry) => ({\n key: entry[0],\n ...entry[1],\n}));\nconst APPLICATION_SETTING_STORAGE_KEY = 'application-settings-storage';\nexport class SettingService {\n applicationStore;\n storage;\n registry = new Map();\n constructor(applicationStore) {\n this.applicationStore = applicationStore;\n this.storage = new StorageStore(this.applicationStore.storageService, APPLICATION_SETTING_STORAGE_KEY);\n this.applicationStore.pluginManager\n .getApplicationPlugins()\n .flatMap((plugin) => plugin.getExtraSettingConfigurationEntries?.() ?? [])\n .forEach((entry) => {\n if (this.registry.has(entry.key)) {\n this.applicationStore.logService.warn(LogEvent.create(APPLICATION_EVENT.SETTING_CONFIGURATION_CHECK__FAILURE), `Found duplicated setting with key '${entry.key}'`);\n return;\n }\n // TODO: do validation check here\n // See https://github.com/finos/legend-studio/issues/407\n this.registry.set(entry.key, entry);\n });\n }\n getNumericValue(key) {\n const value = this.storage.getValue(key) ?? this.registry.get(key)?.defaultValue;\n if (!isNumber(value)) {\n this.applicationStore.logService.warn(LogEvent.create(APPLICATION_EVENT.SETTING_RETRIVE_FAILURE), `Can't retrieve numeric value for setting '${key}'`);\n return undefined;\n }\n return value;\n }\n getStringValue(key) {\n const value = this.storage.getValue(key) ?? this.registry.get(key)?.defaultValue;\n if (!isString(value)) {\n this.applicationStore.logService.warn(LogEvent.create(APPLICATION_EVENT.SETTING_RETRIVE_FAILURE), `Can't retrieve string value for setting '${key}'`);\n return undefined;\n }\n return value;\n }\n getBooleanValue(key) {\n const value = this.storage.getValue(key) ?? this.registry.get(key)?.defaultValue;\n if (!isBoolean(value)) {\n this.applicationStore.logService.warn(LogEvent.create(APPLICATION_EVENT.SETTING_RETRIVE_FAILURE), `Can't retrieve boolean value for setting '${key}'`);\n return undefined;\n }\n return value;\n }\n getObjectValue(key) {\n const value = this.storage.getValue(key) ?? this.registry.get(key)?.defaultValue;\n if (!isObject(value)) {\n this.applicationStore.logService.warn(LogEvent.create(APPLICATION_EVENT.SETTING_RETRIVE_FAILURE), `Can't retrieve object value for setting '${key}'`);\n return undefined;\n }\n return value;\n }\n persistValue(key, value) {\n const defaultValue = this.registry.get(key)?.defaultValue;\n this.storage.persistValue(key, \n // NOTE: if the value equals to default value, the value will be unset instead\n defaultValue !== undefined && deepEqual(defaultValue, value)\n ? undefined\n : value);\n }\n}\n//# sourceMappingURL=SettingService.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { UnsupportedOperationError } from '@finos/legend-shared';\nimport {} from './NavigationService.js';\nexport class DefaultNavigator {\n goToLocation(location, options) {\n throw new UnsupportedOperationError(`Navigator does not support this operation`);\n }\n reload(options) {\n throw new UnsupportedOperationError(`Navigator does not support this operation`);\n }\n goToAddress(address, options) {\n throw new UnsupportedOperationError(`Navigator does not support this operation`);\n }\n visitAddress(address) {\n throw new UnsupportedOperationError(`Navigator does not support this operation`);\n }\n generateAddress(location) {\n throw new UnsupportedOperationError(`Navigator does not support this operation`);\n }\n updateCurrentLocation(location) {\n throw new UnsupportedOperationError(`Navigator does not support this operation`);\n }\n updateCurrentZone(zone) {\n throw new UnsupportedOperationError(`Navigator does not support this operation`);\n }\n resetZone() {\n throw new UnsupportedOperationError(`Navigator does not support this operation`);\n }\n getCurrentBaseAddress(options) {\n throw new UnsupportedOperationError(`Navigator does not support this operation`);\n }\n getCurrentAddress() {\n throw new UnsupportedOperationError(`Navigator does not support this operation`);\n }\n getCurrentLocation() {\n throw new UnsupportedOperationError(`Navigator does not support this operation`);\n }\n getCurrentLocationParameters() {\n throw new UnsupportedOperationError(`Navigator does not support this operation`);\n }\n getCurrentLocationParameterValue(key) {\n throw new UnsupportedOperationError(`Navigator does not support this operation`);\n }\n getCurrentZone() {\n throw new UnsupportedOperationError(`Navigator does not support this operation`);\n }\n blockNavigation(blockCheckers, onBlock, onNativePlatformNavigationBlock) {\n throw new UnsupportedOperationError(`Navigator does not support this operation`);\n }\n unblockNavigation() {\n throw new UnsupportedOperationError(`Navigator does not support this operation`);\n }\n get isNavigationBlocked() {\n throw new UnsupportedOperationError(`Navigator does not support this operation`);\n }\n INTERNAL__internalizeTransientParameter(key) {\n throw new UnsupportedOperationError(`Navigator does not support this operation`);\n }\n}\n//# sourceMappingURL=DefaultNavigator.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { LogEvent, isBoolean, isNumber, isObject, isString, } from '@finos/legend-shared';\nimport { StorageStore } from './storage/StorageService.js';\nimport { APPLICATION_EVENT } from '../__lib__/LegendApplicationEvent.js';\nconst APPLICATION_USER_DATA_STORAGE_KEY = 'application-user-data-storage';\nexport class UserDataService {\n applicationStore;\n storage;\n constructor(applicationStore) {\n this.applicationStore = applicationStore;\n this.storage = new StorageStore(this.applicationStore.storageService, APPLICATION_USER_DATA_STORAGE_KEY);\n }\n getNumericValue(key) {\n const value = this.storage.getValue(key);\n if (!isNumber(value)) {\n this.applicationStore.logService.warn(LogEvent.create(APPLICATION_EVENT.USER_DATA_RETRIEVE_FAILURE), `Can't retrieve numeric value for user data '${key}'`);\n return undefined;\n }\n return value;\n }\n getStringValue(key) {\n const value = this.storage.getValue(key);\n if (!isString(value)) {\n this.applicationStore.logService.warn(LogEvent.create(APPLICATION_EVENT.USER_DATA_RETRIEVE_FAILURE), `Can't retrieve string value for user data '${key}'`);\n return undefined;\n }\n return value;\n }\n getBooleanValue(key) {\n const value = this.storage.getValue(key);\n if (!isBoolean(value)) {\n this.applicationStore.logService.warn(LogEvent.create(APPLICATION_EVENT.USER_DATA_RETRIEVE_FAILURE), `Can't retrieve boolean value for user data '${key}'`);\n return undefined;\n }\n return value;\n }\n getObjectValue(key) {\n const value = this.storage.getValue(key);\n if (!isObject(value)) {\n this.applicationStore.logService.warn(LogEvent.create(APPLICATION_EVENT.USER_DATA_RETRIEVE_FAILURE), `Can't retrieve object value for user data '${key}'`);\n return undefined;\n }\n return value;\n }\n persistValue(key, value) {\n this.storage.persistValue(key, value);\n }\n}\n//# sourceMappingURL=UserDataService.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Compare SemVer versions.\n *\n * NOTE: SemVer could have been the perfect library to use here but we can't use it since it's meant for `Node` only\n * `compare-versions` works for browser but seems way overkill, especially when the version format is very\n * standard, i.e. `x.y.z`, no prerelease, etc.\n * As such, we can use the lean comparison algo using `localeCompare` with numeric settings\n *\n * See https://stackoverflow.com/questions/55466274/simplify-semver-version-compare-logic/55466325#55466325\n * See omichelsen/compare-versions#45\n */\nexport const compareSemVerVersions = (val1, val2) => \n// TODO: verify if the version match certain patterns\nval1.localeCompare(val2, undefined, { numeric: true });\n// regex to validate semver: https://github.com/semver/semver/issues/232\nexport const isSemVer = (val) => /^(?:0|[1-9]\\d*)\\.(?:0|[1-9]\\d*)\\.(?:0|[1-9]\\d*)(?:-(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(?:\\+[0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*)?$/.test(val);\n//# sourceMappingURL=StringCompareUtil.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { compareSemVerVersions, guaranteeNonEmptyString, isSemVer, } from '@finos/legend-shared';\nimport { action, makeObservable, observable } from 'mobx';\nexport var RELEASE_UPDATE_TYPE;\n(function (RELEASE_UPDATE_TYPE) {\n RELEASE_UPDATE_TYPE[\"BUG_FIX\"] = \"BUG_FIX\";\n RELEASE_UPDATE_TYPE[\"ENHANCEMENT\"] = \"ENHANCEMENT\";\n})(RELEASE_UPDATE_TYPE || (RELEASE_UPDATE_TYPE = {}));\nexport const collectReleaseNotes = (releaseNotes) => releaseNotes.map((release) => {\n guaranteeNonEmptyString(release.version, \"Release notes 'version' is missing\");\n release.notes?.map((note) => {\n guaranteeNonEmptyString(note.type, \"Release note 'type' is missing\");\n guaranteeNonEmptyString(note.description, \"Release note 'description' is missing\");\n return note;\n });\n return release;\n});\nexport const APPLICATION_LAST_OPENED_VERSION = 'application.lastOpenedVersion';\nexport class ReleaseNotesService {\n applicationStore;\n releaseNotes;\n showCurrentReleaseModal = true;\n showReleaseLog = false;\n isConfigured = false;\n constructor(applicationStore) {\n makeObservable(this, {\n showCurrentReleaseModal: observable,\n showReleaseLog: observable,\n isConfigured: observable,\n setShowCurrentRelease: action,\n configure: action,\n setReleaseLog: action,\n });\n this.applicationStore = applicationStore;\n }\n configure(releaseNotes) {\n this.isConfigured = true;\n this.releaseNotes = collectReleaseNotes(releaseNotes);\n }\n setShowCurrentRelease(val) {\n this.showCurrentReleaseModal = val;\n }\n setReleaseLog(val) {\n this.showReleaseLog = val;\n }\n getViewedVersion() {\n return this.applicationStore.userDataService.getStringValue(APPLICATION_LAST_OPENED_VERSION);\n }\n updateViewedVersion() {\n this.applicationStore.userDataService.persistValue(APPLICATION_LAST_OPENED_VERSION, this.applicationStore.config.appVersion);\n }\n showVersion(versionNotes, lastOpenedVersion) {\n const version = versionNotes.version;\n if (isSemVer(version) && isSemVer(lastOpenedVersion)) {\n if (compareSemVerVersions(version, lastOpenedVersion) === 1) {\n return true;\n }\n }\n return false;\n }\n showableVersions() {\n const lastOpenedVersion = this.getViewedVersion();\n if (!lastOpenedVersion) {\n return undefined;\n }\n return this.releaseNotes?.filter((val) => this.showVersion(val, lastOpenedVersion));\n }\n}\n//# sourceMappingURL=ReleaseNotesService.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { TracerService, LogService, LogEvent, uuid, ActionState, assertErrorThrown, IllegalStateError, isNonNullable, } from '@finos/legend-shared';\nimport { APPLICATION_EVENT } from '../__lib__/LegendApplicationEvent.js';\nimport { DocumentationService } from './DocumentationService.js';\nimport { AssistantService } from './AssistantService.js';\nimport { EventService } from './event/EventService.js';\nimport { ApplicationNavigationContextService } from './ApplicationNavigationContextService.js';\nimport { CommandService } from './CommandService.js';\nimport { KeyboardShortcutsService } from './KeyboardShortcutsService.js';\nimport { TerminalService } from './TerminalService.js';\nimport { AlertService } from './AlertService.js';\nimport { NotificationService } from './NotificationService.js';\nimport { IdentityService } from './IdentityService.js';\nimport { StorageService } from './storage/StorageService.js';\nimport { TelemetryService } from './TelemetryService.js';\nimport { TimeService } from './TimeService.js';\nimport { LayoutService } from './LayoutService.js';\nimport { ClipboardService } from './ClipboardService.js';\nimport { NavigationService } from './navigation/NavigationService.js';\nimport { SettingService } from './SettingService.js';\nimport { DefaultNavigator } from './navigation/DefaultNavigator.js';\nimport { UserDataService } from './UserDataService.js';\nimport { ReleaseNotesService } from './ReleaseNotesService.js';\nexport class ApplicationExtensionState {\n /**\n * This helps to better type-check for this empty abtract type\n * See https://github.com/finos/legend-studio/blob/master/docs/technical/typescript-usage.md#understand-typescript-structual-type-system\n */\n _$nominalTypeBrand;\n}\nexport class ApplicationStore {\n uuid = uuid();\n /**\n * This is a mechanism to have the store holds references to extension states\n * so that we can refer back to these states when needed or do cross-extensions\n * operations\n */\n extensionStates = [];\n config;\n pluginManager;\n initState = ActionState.create();\n platform;\n // core\n timeService;\n logService;\n storageService;\n userDataService;\n settingService;\n alertService;\n notificationService;\n identityService;\n commandService;\n keyboardShortcutsService;\n layoutService;\n clipboardService;\n terminalService;\n navigationService;\n navigationContextService;\n // support\n documentationService;\n assistantService;\n // release\n releaseNotesService;\n // event\n eventService;\n telemetryService;\n tracerService;\n constructor(config, pluginManager) {\n this.config = config;\n this.pluginManager = pluginManager;\n this.timeService = new TimeService();\n // NOTE: set the logger first so other loading could use the configured logger\n this.logService = new LogService();\n this.logService.registerPlugins(pluginManager.getLoggerPlugins());\n this.storageService = new StorageService(this);\n this.settingService = new SettingService(this);\n this.userDataService = new UserDataService(this);\n this.alertService = new AlertService(this);\n this.notificationService = new NotificationService();\n this.identityService = new IdentityService(this);\n this.layoutService = new LayoutService(this);\n this.clipboardService = new ClipboardService(this);\n this.terminalService = new TerminalService(this);\n this.commandService = new CommandService(this);\n this.keyboardShortcutsService = new KeyboardShortcutsService(this);\n this.navigationService = new NavigationService(new DefaultNavigator());\n this.navigationContextService = new ApplicationNavigationContextService(this);\n this.documentationService = new DocumentationService(this);\n this.assistantService = new AssistantService(this);\n this.releaseNotesService = new ReleaseNotesService(this);\n this.eventService = new EventService();\n this.eventService.registerEventNotifierPlugins(pluginManager.getEventNotifierPlugins());\n this.telemetryService = new TelemetryService(this);\n this.telemetryService.registerPlugins(pluginManager.getTelemetryServicePlugins());\n this.telemetryService.setup();\n this.tracerService = new TracerService();\n this.tracerService.registerPlugins(pluginManager.getTracerServicePlugins());\n // extensions\n this.extensionStates = this.pluginManager\n .getApplicationPlugins()\n .flatMap((plugin) => plugin.getExtraApplicationExtensionStateBuilders?.() ?? [])\n .map((creator) => creator(this))\n .filter(isNonNullable);\n }\n async initialize(platform) {\n if (!this.initState.isInInitialState) {\n // eslint-disable-next-line no-process-env\n if (process.env.NODE_ENV === 'production') {\n this.notificationService.notifyIllegalState('Application store is re-initialized');\n }\n else {\n this.logService.debug(LogEvent.create(APPLICATION_EVENT.DEBUG), 'Application store is re-initialized');\n }\n return;\n }\n this.initState.inProgress();\n try {\n if (this.platform) {\n throw new IllegalStateError(`Platform is already configured`);\n }\n this.platform = platform;\n this.navigationService =\n new NavigationService(platform.getNavigator());\n await platform.initialize();\n this.initState.pass();\n }\n catch (error) {\n assertErrorThrown(error);\n this.notificationService.notifyError(error);\n this.logService.error(LogEvent.create(APPLICATION_EVENT.APPLICATION_LOAD__FAILURE), 'Failed to load Legend application');\n this.initState.fail();\n }\n }\n /**\n * When we call store/state functions from the component, we should handle error thrown at these functions instead\n * of throwing them to the UI. This enforces that by throwing `IllegalStateError`\n */\n alertUnhandledError = (error) => {\n this.logUnhandledError(error);\n this.notificationService.notifyIllegalState(error.message);\n };\n logUnhandledError = (error) => {\n this.logService.error(LogEvent.create(APPLICATION_EVENT.ILLEGAL_APPLICATION_STATE_OCCURRED), 'Encountered unhandled error in component tree', error);\n };\n debugProcess(processName, ...data) {\n this.logService.debug(LogEvent.create(APPLICATION_EVENT.DEBUG), `\\n------ START DEBUG PROCESS: ${processName} ------\\n`, ...data, `\\n------- END DEBUG PROCESS: ${processName} -------\\n`);\n }\n /**\n * Guarantee that the action being used by the component does not throw unhandled errors\n */\n guardUnhandledError = (actionFn) => () => {\n actionFn().catch(this.alertUnhandledError);\n };\n}\n//# sourceMappingURL=ApplicationStore.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { downloadFileUsingDataURI, guaranteeNonNullable, } from '@finos/legend-shared';\nvar DOWNLOAD_EVENTS;\n(function (DOWNLOAD_EVENTS) {\n DOWNLOAD_EVENTS[\"TAG_REQUEST\"] = \"download-request\";\n DOWNLOAD_EVENTS[\"TAG_RESPONSE\"] = \"download-response\";\n DOWNLOAD_EVENTS[\"STREAM_CLOSED\"] = \"#stream-closed\";\n DOWNLOAD_EVENTS[\"STREAM_ABORTED\"] = \"#stream-aborted\";\n})(DOWNLOAD_EVENTS || (DOWNLOAD_EVENTS = {}));\nfunction createWritableStreamFromMessageChannel(channel) {\n return new WritableStream({\n write(chunk) {\n channel.port1.postMessage(chunk);\n },\n close() {\n channel.port1.postMessage(DOWNLOAD_EVENTS.STREAM_CLOSED);\n },\n abort() {\n channel.port1.postMessage(DOWNLOAD_EVENTS.STREAM_ABORTED);\n closeMessagePort(channel.port1);\n closeMessagePort(channel.port2);\n },\n });\n}\nfunction closeMessagePort(port) {\n port.onmessage = null;\n port.close();\n}\nasync function getServiceWorker() {\n if (!('serviceWorker' in navigator)) {\n return Promise.reject(new Error('Service worker is not available. Service Worker requires HTTPS protocol'));\n }\n return navigator.serviceWorker\n .getRegistration()\n .then((workerRegistration) => {\n if (workerRegistration === undefined) {\n return undefined;\n }\n const pending = workerRegistration.installing ?? workerRegistration.waiting;\n return (workerRegistration.active ??\n new Promise((resolve) => {\n // if not activated, add listener to waiting or installing registration\n const listener = () => {\n if (pending?.state === 'activated') {\n pending.removeEventListener('statechange', listener);\n resolve(workerRegistration.active ?? undefined);\n }\n };\n pending?.addEventListener('statechange', listener);\n }));\n });\n}\nfunction createDownloadRequest(filename) {\n const PREFIX = 6;\n const prefix = String(Math.random()).slice(-PREFIX);\n const url = new URL(`${prefix}/${filename}`, window.location.href).toString();\n return { tag: DOWNLOAD_EVENTS.TAG_REQUEST, filename, url };\n}\nfunction handleServiceWorkerDownloadResponse(event) {\n const data = event.data;\n if (data?.tag === DOWNLOAD_EVENTS.TAG_RESPONSE && data.downloadUrl.length) {\n openInIframe(data.downloadUrl);\n }\n}\nfunction openInIframe(src) {\n const iframe = document.createElement('iframe');\n iframe.hidden = true;\n iframe.src = src;\n document.body.appendChild(iframe);\n return iframe;\n}\nexport async function downloadStream(response, filename, contentType) {\n const responseBody = guaranteeNonNullable(response.body);\n // creates communication channel with service worker with response handler\n const channel = new MessageChannel();\n channel.port1.onmessage = handleServiceWorkerDownloadResponse;\n // grabs service worker and handles it download along with response channel port\n const serviceWorker = await getServiceWorker();\n if (!serviceWorker) {\n // TODO: remove once service worker workflow is tested\n const text = await response.text();\n // eslint-disable-next-line no-console\n console.debug('service worker not found. Using in memory file download');\n downloadFileUsingDataURI(filename, text, contentType);\n return;\n }\n // eslint-disable-next-line no-console\n console.debug('Service worker found. Continuing download');\n const downloadRequest = createDownloadRequest(filename);\n serviceWorker.postMessage(downloadRequest, [channel.port2]);\n // creates new data stream over communication channel and pipes given stream in it\n responseBody\n .pipeTo(createWritableStreamFromMessageChannel(channel))\n .then(() => {\n // TODO: trace success\n })\n .catch(() => {\n // TODO: fail\n });\n}\nexport function registerDownloadHelperServiceWorker(workerPath) {\n if ('serviceWorker' in navigator) {\n const path = workerPath ?? '/ServiceWorker.js';\n navigator.serviceWorker\n .register(path)\n .then((reg) => {\n // TODO: add trace\n // eslint-disable-next-line no-console\n console.debug(`register service worker success with path: ${path}`, reg);\n })\n .catch((error) => {\n // TODO: add trace\n // eslint-disable-next-line no-console\n console.debug(`register service worker error with path: ${path}`, error);\n });\n }\n}\n//# sourceMappingURL=DownloadHelperServiceWorker.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { assertErrorThrown, LogEvent, guaranteeNonEmptyString, assertNonNullable, NetworkClient, createRegExpPatternFromWildcardPattern, } from '@finos/legend-shared';\nimport { APPLICATION_EVENT } from '../__lib__/LegendApplicationEvent.js';\nimport { collectKeyedDocumentationEntriesFromConfig, } from '../stores/DocumentationService.js';\nimport { ApplicationStore, } from '../stores/ApplicationStore.js';\nimport { registerDownloadHelperServiceWorker } from '../util/DownloadHelperServiceWorker.js';\nexport class LegendApplicationLogger {\n}\nexport class LegendApplicationWebConsole extends LegendApplicationLogger {\n debug(event, ...data) {\n // eslint-disable-next-line no-console\n console.debug(`[${event.timestamp}] ${event.name} ${data.length ? ':' : ''}`, ...data);\n }\n info(event, ...data) {\n // eslint-disable-next-line no-console\n console.info(`[${event.timestamp}] ${event.name} ${data.length ? ':' : ''}`, ...data);\n }\n warn(event, ...data) {\n // eslint-disable-next-line no-console\n console.warn(`[${event.timestamp}] ${event.name} ${data.length ? ':' : ''}`, ...data);\n }\n error(event, ...data) {\n // eslint-disable-next-line no-console\n console.error(`[${event.timestamp}] ${event.name} ${data.length ? ':' : ''}`, ...data);\n }\n}\nexport class LegendApplication {\n config;\n logger;\n pluginManager;\n basePresets = [];\n basePlugins = [];\n baseAddress;\n pluginRegister;\n _isConfigured = false;\n downloadHelperServiceWorkerPath;\n downloadHelper = false;\n releaseNotes;\n constructor(pluginManager) {\n this.pluginManager = pluginManager;\n this.logger = new LegendApplicationWebConsole();\n }\n setup(options) {\n this.baseAddress = guaranteeNonEmptyString(options.baseAddress, `Can't setup application: 'baseAddress' is missing or empty`);\n this.pluginRegister = options.pluginRegister;\n this._isConfigured = true;\n return this;\n }\n withBasePresets(presets) {\n this.basePresets = presets;\n return this.withPresets([]); // this will reset the preset list and prepend with base presets\n }\n withBasePlugins(plugins) {\n this.basePlugins = plugins;\n return this.withPlugins([]); // this will reset the plugin list and prepend with base plugins\n }\n withPresets(presets) {\n this.pluginManager.usePresets([...this.basePresets, ...presets]);\n return this;\n }\n withPlugins(plugins) {\n this.pluginManager.usePlugins([...this.basePlugins, ...plugins]);\n return this;\n }\n withDownloadHelper(path) {\n this.downloadHelper = true;\n this.downloadHelperServiceWorkerPath = path;\n return this;\n }\n withReleaseNotes(releaseNotes) {\n this.releaseNotes = releaseNotes;\n return this;\n }\n setupApplicationStore(store) {\n if (this.releaseNotes) {\n store.releaseNotesService.configure(this.releaseNotes);\n }\n }\n async fetchApplicationConfiguration(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 baseAddress: 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.DOCUMENTATION_FETCH__FAILURE), error);\n }\n }));\n // NOTE: config entries will override\n config.keyedDocumentationEntries = [\n ...collectKeyedDocumentationEntriesFromConfig(entries),\n ...config.keyedDocumentationEntries,\n ];\n }\n async start() {\n assertNonNullable(this._isConfigured, 'Legend application has not been configured properly. Make sure to run setup() before start()');\n try {\n // fetch application config\n const [config, extensionConfigData] = await this.fetchApplicationConfiguration(this.baseAddress);\n this.config = config;\n // setup plugins\n this.pluginRegister?.(this.pluginManager, this.config);\n this.pluginManager.configure(extensionConfigData);\n this.pluginManager.install();\n // other setups\n await Promise.all(\n // NOTE: to be done in parallel to save time\n [this.loadDocumentationRegistryData(config)]);\n // setup application store\n const applicationStore = new ApplicationStore(this.config, this.pluginManager);\n await Promise.all(this.pluginManager\n .getApplicationPlugins()\n .flatMap((plugin) => plugin.getExtraApplicationSetups?.() ?? [])\n .map((setup) => setup(applicationStore)));\n // set up application\n this.setupApplicationStore(applicationStore);\n // load application\n await this.loadApplication(applicationStore);\n this.logger.info(LogEvent.create(APPLICATION_EVENT.APPLICATION_LOAD__SUCCESS), 'Legend application loaded');\n if (this.downloadHelper) {\n registerDownloadHelperServiceWorker(this.downloadHelperServiceWorkerPath);\n }\n }\n catch (error) {\n assertErrorThrown(error);\n this.logger.error(LogEvent.create(APPLICATION_EVENT.APPLICATION_LOAD__FAILURE), 'Failed to load Legend application');\n throw error;\n }\n }\n}\nexport const LEGEND_APPLICATION_ROOT_ELEMENT_TAG = 'legend-application-root';\n// NOTE: we use a special tag to mount the application to avoid styling conflicts\nexport const getApplicationRootElement = () => {\n let rootEl = document.getElementsByTagName(LEGEND_APPLICATION_ROOT_ELEMENT_TAG).length\n ? document.getElementsByTagName(LEGEND_APPLICATION_ROOT_ELEMENT_TAG)[0]\n : undefined;\n if (!rootEl) {\n rootEl = document.createElement(LEGEND_APPLICATION_ROOT_ELEMENT_TAG);\n document.body.appendChild(rootEl);\n }\n rootEl.setAttribute('style', 'height: 100%; width: 100%; display: block');\n return rootEl;\n};\n//# sourceMappingURL=LegendApplication.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport const createRegExpPatternFromWildcardPattern = (value) => new RegExp(\n// trim and add start/end regexp to make sure the wildcard pattern must be a full match\n`^${value\n .trim()\n // escape special characters except for wilcard *\n .replace(/[\\^$\\\\.+?()[\\]{}|]/g, '\\\\$&')\n // translate wildcard * to .*\n .replace(/\\*/g, '.*')}$`);\n//# sourceMappingURL=MatcherUtils.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { AbstractPlugin } from '@finos/legend-shared';\nexport class LegendApplicationPlugin extends AbstractPlugin {\n}\n//# sourceMappingURL=LegendApplicationPlugin.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF 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' assert { type: 'json' };\nimport { LEGEND_APPLICATION_SETTING_CONFIG } from '../__lib__/LegendApplicationSetting.js';\nimport { HIGH_CONTRAST_LIGHT_COLOR_THEME, LEGACY_LIGHT_COLOR_THEME, } from '../__lib__/LegendApplicationColorTheme.js';\nimport { LegendApplicationPlugin, } from './LegendApplicationPlugin.js';\nimport { collectSettingConfigurationEntriesFromConfig, } from './SettingService.js';\nimport { configure as configureMobx } from 'mobx';\nimport { configureComponents } from '@finos/legend-art';\nexport class Core_LegendApplicationPlugin extends LegendApplicationPlugin {\n static NAME = packageJson.extensions.applicationPlugin;\n constructor() {\n super(Core_LegendApplicationPlugin.NAME, packageJson.version);\n }\n install(pluginManager) {\n pluginManager.registerApplicationPlugin(this);\n }\n getExtraApplicationSetups() {\n return [\n async (applicationStore) => {\n // configure `mobx`\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 // configure UI components\n configureComponents();\n },\n ];\n }\n getExtraColorThemes() {\n return [LEGACY_LIGHT_COLOR_THEME, HIGH_CONTRAST_LIGHT_COLOR_THEME];\n }\n getExtraSettingConfigurationEntries() {\n return collectSettingConfigurationEntriesFromConfig(LEGEND_APPLICATION_SETTING_CONFIG);\n }\n}\n//# sourceMappingURL=Core_LegendApplicationPlugin.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { guaranteeNonEmptyString, guaranteeNonNullable, URL_SEPARATOR, } from '@finos/legend-shared';\nimport { collectKeyedDocumentationEntriesFromConfig, collectContextualDocumentationEntries, collectDocumentationLinkEntryFromConfig, } from '../stores/DocumentationService.js';\nexport class LegendApplicationConfig {\n appName;\n baseAddress;\n env;\n applicationStorageKey;\n // documentation\n documentationUrl;\n documentationLinkEntries = [];\n documentationRegistryEntries = [];\n keyedDocumentationEntries = [];\n contextualDocEntries = [];\n // version\n appVersion;\n appVersionBuildTime;\n appVersionCommitId;\n constructor(input) {\n this.baseAddress = input.baseAddress;\n this.appName = guaranteeNonEmptyString(input.configData.appName, `Can't configure application: 'appName' field is missing or empty`);\n this.env = guaranteeNonEmptyString(input.configData.env, `Can't configure application: 'env' field is missing or empty`);\n this.applicationStorageKey =\n input.configData.application?.storageKey ??\n this.getDefaultApplicationStorageKey();\n // Documentation\n this.documentationUrl = input.configData.documentation?.url;\n this.documentationLinkEntries = collectDocumentationLinkEntryFromConfig(input.configData.documentation?.links ?? {});\n this.documentationRegistryEntries =\n input.configData.documentation?.registry ?? [];\n this.keyedDocumentationEntries = collectKeyedDocumentationEntriesFromConfig(input.configData.documentation?.entries ?? {});\n this.contextualDocEntries = collectContextualDocumentationEntries(input.configData.documentation?.contextualEntries ?? {});\n // Version\n this.appVersion = guaranteeNonNullable(input.versionData.version, `Can't collect application version: 'version' field is missing`);\n this.appVersionBuildTime = 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 static resolveAbsoluteUrl(url) {\n if (url.trim().startsWith(URL_SEPARATOR)) {\n return window.location.origin + url;\n }\n return url;\n }\n}\n//# sourceMappingURL=LegendApplicationConfig.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { assertNonNullable, guaranteeNonEmptyString, } from '@finos/legend-shared';\nimport { LegendApplicationConfig, } from '@finos/legend-application';\nexport class LegendREPLApplicationConfig extends LegendApplicationConfig {\n replUrl;\n useDynamicREPLServer = false;\n constructor(input) {\n super(input);\n assertNonNullable(input.configData.repl, `Can't configure application: 'repl' field is missing`);\n this.replUrl = LegendApplicationConfig.resolveAbsoluteUrl(guaranteeNonEmptyString(input.configData.repl.url, `Can't configure application: 'repl.url' field is missing or empty`));\n if (input.configData.repl.dynamic !== undefined) {\n this.useDynamicREPLServer = Boolean(input.configData.repl.dynamic);\n }\n }\n getDefaultApplicationStorageKey() {\n return 'legend-repl';\n }\n}\n//# sourceMappingURL=LegendREPLApplicationConfig.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF 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 LegendREPLPluginManager extends LegendApplicationPluginManager {\n pureProtocolProcessorPlugins = [];\n pureGraphManagerPlugins = [];\n pureGraphPlugins = [];\n constructor() {\n super();\n }\n static create() {\n return new LegendREPLPluginManager();\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=LegendREPLPluginManager.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS 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_PARAM_TOKEN;\n(function (LEGEND_APPLICATION_PARAM_TOKEN) {\n LEGEND_APPLICATION_PARAM_TOKEN[\"INITIAL_COLOR_THEME\"] = \"initialColorTheme\";\n})(LEGEND_APPLICATION_PARAM_TOKEN || (LEGEND_APPLICATION_PARAM_TOKEN = {}));\n//# sourceMappingURL=LegendApplicationNavigation.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { addQueryParametersToUrl, getQueryParameterValue, getQueryParameters, guaranteeNonNullable, sanitizeURL, stringifyQueryParams, } from '@finos/legend-shared';\nimport { action, computed, makeObservable, observable } from 'mobx';\nimport { NAVIGATION_ZONE_PREFIX, } from './NavigationService.js';\nimport { Route, Switch, Redirect, matchPath, generatePath, useParams, useLocation, } from 'react-router';\nexport { BrowserRouter } from 'react-router-dom';\nexport { Route, Switch, Redirect, useParams, matchPath, generatePath };\nexport const useNavigationZone = () => {\n const location = useLocation(); // TODO: this is a temporary hack until we upgrade react-router\n return location.hash.substring(NAVIGATION_ZONE_PREFIX.length);\n};\n/**\n * Prefix URL patterns coming from extensions with `/extensions/`\n * to avoid potential conflicts with main routes.\n */\nexport const generateExtensionUrlPattern = (pattern) => `/extensions/${pattern}`.replace(/^\\/extensions\\/\\//, '/extensions/');\nexport class BrowserNavigator {\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 generateAddress(location) {\n return (this.window.location.origin +\n this.historyAPI.createHref({ pathname: location }));\n }\n updateCurrentLocation(location) {\n this.historyAPI.push(location);\n }\n updateCurrentZone(zone) {\n this.window.location.hash = NAVIGATION_ZONE_PREFIX + zone;\n }\n resetZone() {\n this.updateCurrentLocation(this.getCurrentLocation());\n }\n getCurrentBaseAddress(options) {\n if (options?.withAppRoot) {\n return this.generateAddress('');\n }\n return this.window.location.origin;\n }\n getCurrentAddress() {\n return this.window.location.href;\n }\n getCurrentLocation() {\n return this.historyAPI.location.pathname;\n }\n getCurrentLocationParameters() {\n const result = {};\n const parameters = getQueryParameters(sanitizeURL(this.getCurrentAddress()), true);\n Object.keys(parameters).forEach((key) => {\n result[key] = getQueryParameterValue(key, parameters);\n });\n return result;\n }\n getCurrentLocationParameterValue(key) {\n return this.getCurrentLocationParameters()[key];\n }\n getCurrentZone() {\n return this.window.location.hash.substring(NAVIGATION_ZONE_PREFIX.length);\n }\n blockNavigation(blockCheckers, onBlock, onNativePlatformNavigationBlock) {\n this._isNavigationBlocked = true;\n this.onBlock = onBlock;\n this.onNativePlatformNavigationBlock = onNativePlatformNavigationBlock;\n // 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 INTERNAL__internalizeTransientParameter(key) {\n const currentZone = this.getCurrentZone();\n const parameters = this.getCurrentLocationParameters();\n delete parameters[key];\n this.updateCurrentLocation(addQueryParametersToUrl(this.getCurrentLocation(), stringifyQueryParams(parameters)));\n this.updateCurrentZone(currentZone);\n }\n}\n//# sourceMappingURL=BrowserNavigator.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport class ApplicationPlatform {\n applicationStore;\n constructor(applicationStore) {\n this.applicationStore = applicationStore;\n }\n async initialize() {\n // do nothing\n }\n}\n//# sourceMappingURL=ApplicationPlatform.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { BrowserNavigator } from '../navigation/BrowserNavigator.js';\nimport { ApplicationPlatform } from './ApplicationPlatform.js';\nimport { LEGEND_APPLICATION_PARAM_TOKEN } from '../../__lib__/LegendApplicationNavigation.js';\nexport class BrowserPlatform extends ApplicationPlatform {\n navigator;\n constructor(applicationStore, config) {\n super(applicationStore);\n this.navigator = new BrowserNavigator(config.historyAPI);\n }\n getNavigator() {\n return this.navigator;\n }\n async initialize() {\n // set initial color theme\n // NOTE: we allow this to avoid the flash of default color theme\n // when loading the page from another page/ when using the application in an iframe\n const initialColorTheme = this.applicationStore.navigationService.navigator.getCurrentLocationParameterValue(LEGEND_APPLICATION_PARAM_TOKEN.INITIAL_COLOR_THEME);\n if (initialColorTheme) {\n this.applicationStore.layoutService.setColorTheme(initialColorTheme);\n this.applicationStore.navigationService.navigator.INTERNAL__internalizeTransientParameter(LEGEND_APPLICATION_PARAM_TOKEN.INITIAL_COLOR_THEME);\n }\n }\n}\n//# sourceMappingURL=BrowserPlatform.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { guaranteeNonNullable } from '@finos/legend-shared';\nimport { createContext, useContext } from 'react';\nexport const ApplicationPlatformContext = createContext(undefined);\nexport const useApplicationPlatform = () => guaranteeNonNullable(useContext(ApplicationPlatformContext), `Can't find application platform in context`);\n//# sourceMappingURL=ApplicationPlatformProvider.js.map","import { jsx as _jsx } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport {} from 'history';\nimport { useLocalObservable } from 'mobx-react-lite';\nimport { useHistory } from 'react-router';\nimport { BrowserRouter } from 'react-router-dom';\nimport { BrowserPlatform } from '../stores/platform/BrowserPlatform.js';\nimport { ApplicationPlatformContext } from './ApplicationPlatformProvider.js';\nimport { useApplicationStore } from './ApplicationStoreProvider.js';\nconst BrowserPlatformProvider = ({ children }) => {\n const applicationStore = useApplicationStore();\n const historyAPI = useHistory(); // TODO: this is a temporary hack until we upgrade react-router\n const platform = useLocalObservable(() => new BrowserPlatform(applicationStore, { historyAPI }));\n return (_jsx(ApplicationPlatformContext.Provider, { value: platform, children: children }));\n};\nexport const BrowserEnvironmentProvider = ({ children, baseUrl }) => (_jsx(BrowserRouter, { basename: baseUrl, children: _jsx(BrowserPlatformProvider, { children: children }) }));\n//# sourceMappingURL=BrowserEnvironmentProvider.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { guaranteeNonNullable, } from '@finos/legend-shared';\nexport class REPLServerClient {\n networkClient;\n constructor(networkClient) {\n this.networkClient = networkClient;\n }\n get baseUrl() {\n return guaranteeNonNullable(this.networkClient.baseUrl, `REPL server client has not been configured properly`);\n }\n get dataCube() {\n return `${this.baseUrl}/api/dataCube`;\n }\n async getInfrastructureInfo() {\n return this.networkClient.get(`${this.dataCube}/infrastructureInfo`);\n }\n async getQueryTypeahead(input) {\n return this.networkClient.post(`${this.dataCube}/typeahead`, input);\n }\n // TODO: @akphi - we might need to support batch, source information offset, etc.\n async parseQuery(input) {\n return this.networkClient.post(`${this.dataCube}/parseQuery`, input);\n }\n async getQueryCode(input) {\n return this.networkClient.post(`${this.dataCube}/getQueryCode`, input);\n }\n async getBaseQuery() {\n return this.networkClient.get(`${this.dataCube}/getBaseQuery`);\n }\n async getRelationReturnType(input) {\n return this.networkClient.post(`${this.dataCube}/getRelationReturnType`, input);\n }\n async executeQuery(input) {\n return this.networkClient.post(`${this.dataCube}/executeQuery`, input);\n }\n}\n//# sourceMappingURL=REPLServerClient.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport hash from 'hash.js';\nimport { default as objectHash, } from 'object-hash';\nimport { assertTrue, isObject, isBoolean, isNumber, isString, isNonNullable, } from '../error/AssertionUtils.js';\nexport const hashValue = (val) => hash.sha1().update(val).digest('hex');\nexport const hashUnknownValue = (val) => {\n assertTrue(isString(val) || isBoolean(val) || isNumber(val), `Can't hash non-primitive value`);\n return hashValue(val);\n};\nexport const hashArray = (arr) => hashValue(arr\n .filter(isNonNullable)\n .map((val) => typeof val === 'string' ||\n typeof val === 'boolean' ||\n typeof val === 'number'\n ? hashValue(val)\n : val.hashCode)\n .join(','));\n/**\n * NOTE: `node-object-hash` seems to be the much more efficient library. But it's based on Node's `crypto` module\n * which is not supported in browser (so we have map `crypto` module to `crypto-browserify` or `crypto-js`).\n * If this object-hashing becomes the performance bottle-neck, we should think about adopting this hashing library\n * See https://www.npmjs.com/package/node-object-hash\n */\nexport const hashObject = (value, options) => {\n assertTrue(isObject(value), `Can't hash non-object value`);\n return objectHash(value, options);\n};\n/**\n * This method can be used to debug hashing.\n *\n * We have tried to come up with a more robust way to debug hash, such as to construct the hash tree, but that's not\n * quite feasible for the following reasons:\n * 1. Since sometimes there are properties we don't drill down like for a class, we just take the path, we don't have\n * a systematic way to construct the hash tree, so we have to rely on the implementation of the hashCode function\n * in each element, which defeats the purpose of having a generic approach for debugging hash\n * 2. If we ignore the implementation detail of `get hashCode` and expand the property if it has `hashCode` then we\n * might risk getting into an infinite loop\n * 3. The manual way to come up with the `get hashCode` is in order to reconcile the differences between metamodels and\n * protocol models. If we only compare metamodels to protocol models for example, the problem might be less complicated,\n * but we're dealing with 2 hash systems (in a way)\n * 4. As such, the best solution at the moment is to come up with a function like this\n * to debug hash where we can put it at a top level structure like `Mapping` and then choose which part of the hash\n * we would like to `explore`\n *\n * @param typesToExpand when we trickle down the object properties, we want to drill down so we want to choose\n * the property to drill down (by its type) since sometimes we don't need to compute the\n * actual hash code for the property (for example: a class, or an enumeration) while computing\n * the hash, just their path.\n */\nexport const debugHash = (obj, typesToExpand, depth = 0) => {\n let res = depth !== 0 ? `${obj.hashCode}` : '';\n res += ` {\\n`;\n Object.entries(obj)\n .filter(([key, value]) => typeof value === 'object' &&\n (!Array.isArray(value) ||\n (value.length !== 0 &&\n value.every((v) => typesToExpand.some((typeToExpand) => v instanceof typeToExpand)))) &&\n (Array.isArray(value) ||\n typesToExpand.some((typeToExpand) => value instanceof typeToExpand)))\n .forEach(([key, value]) => {\n res += `${' '.repeat(depth + 1)}${key}: ${Array.isArray(value)\n ? !value.length\n ? '[]'\n : `[\\n${' '.repeat(depth + 2)}${value\n .map((val, idx) => `${idx}: ${debugHash(val, typesToExpand, depth + 2)}`)\n .join(`\\n${' '.repeat(depth + 2)}`)}\\n${' '.repeat(depth + 1)}]`\n : debugHash(value, typesToExpand, depth + 1)}\\n`;\n });\n res += `${' '.repeat(depth)}}`;\n return res;\n};\n//# sourceMappingURL=HashUtils.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport class V1_ValueSpecification {\n}\n//# sourceMappingURL=V1_ValueSpecification.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF 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_ValueSpecification, } from '../../model/valueSpecification/V1_ValueSpecification.js';\nexport class V1_Variable extends V1_ValueSpecification {\n name;\n multiplicity;\n class;\n accept_ValueSpecificationVisitor(visitor) {\n return visitor.visit_Variable(this);\n }\n}\n//# sourceMappingURL=V1_Variable.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS 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_GraphFetchTree {\n subTrees = [];\n subTypeTrees = [];\n}\n//# sourceMappingURL=V1_GraphFetchTree.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { hashArray, hashObject, hashValue } from '@finos/legend-shared';\nimport { SOURCE_INFORMATION_PROPERTY_KEY_SUFFIX } from './MetaModelConst.js';\n/**\n * The main point of maintaining this enum is to keep lessen magic string in hash computation\n * so that we are less error-prone in the process of defining hash.\n *\n * These tokens will be used in the definition of the hash as marker for the type of the strucure\n * arguably some of these can be redundant since this information is encoded in the resulting hash\n * code anyway, but sometimes when polymorphism manifests, such as when we have an array of structure\n * which are subclasses of an abstract stucture, hashing the marker is sometimes the only way to\n * discern between instances of different sub-structures\n *\n * TODO: when we refactor hashing, we could potentially move this to graphManager/changeDetection/\n */\nexport var CORE_HASH_STRUCTURE;\n(function (CORE_HASH_STRUCTURE) {\n CORE_HASH_STRUCTURE[\"INTERNAL__UNKNOWN_ELEMENT\"] = \"INTERNAL__UNKNOWN_ELEMENT\";\n CORE_HASH_STRUCTURE[\"INTERNAL__UNKNOWN_PACKAGEABLE_ELEMENT\"] = \"INTERNAL__UNKNOWN_PACKAGEABLE_ELEMENT\";\n CORE_HASH_STRUCTURE[\"INTERNAL__UNKNOWN_FUNCTION_ACTIVATOR\"] = \"INTERNAL__UNKNOWN_FUNCTION_ACTIVATOR\";\n CORE_HASH_STRUCTURE[\"PACKAGE\"] = \"PACKAGE\";\n CORE_HASH_STRUCTURE[\"PACKAGEABLE_ELEMENT\"] = \"PACKAGEABLE_ELEMENT\";\n CORE_HASH_STRUCTURE[\"PACKAGEABLE_ELEMENT_POINTER\"] = \"PACKAGEABLE_ELEMENT_POINTER\";\n // domain\n CORE_HASH_STRUCTURE[\"PROFILE\"] = \"PROFILE\";\n CORE_HASH_STRUCTURE[\"TAG_POINTER\"] = \"TAG_POINTER\";\n CORE_HASH_STRUCTURE[\"STEREOTYPE_POINTER\"] = \"STEREOTYPE_POINTER\";\n CORE_HASH_STRUCTURE[\"TAGGED_VALUE\"] = \"TAGGED_VALUE\";\n CORE_HASH_STRUCTURE[\"ENUMERATION\"] = \"ENUMERATION\";\n CORE_HASH_STRUCTURE[\"ENUM_VALUE\"] = \"ENUM_VALUE\";\n CORE_HASH_STRUCTURE[\"CLASS\"] = \"CLASS\";\n CORE_HASH_STRUCTURE[\"PROPERTY\"] = \"PROPERTY\";\n CORE_HASH_STRUCTURE[\"PROPERTY_DEFAULT_VALUE\"] = \"PROPERTY_DEFAULT_VALUE\";\n CORE_HASH_STRUCTURE[\"PROPERTY_POINTER\"] = \"PROPERTY_POINTER\";\n CORE_HASH_STRUCTURE[\"MULTIPLICITY\"] = \"MULTIPLICITY\";\n CORE_HASH_STRUCTURE[\"CONSTRAINT\"] = \"CONSTRAINT\";\n CORE_HASH_STRUCTURE[\"DERIVED_PROPERTY\"] = \"DERIVED_PROPERTY\";\n CORE_HASH_STRUCTURE[\"ASSOCIATION\"] = \"ASSOCIATION\";\n CORE_HASH_STRUCTURE[\"FUNCTION\"] = \"FUNCTION\";\n CORE_HASH_STRUCTURE[\"MEASURE\"] = \"MEASURE\";\n CORE_HASH_STRUCTURE[\"UNIT\"] = \"UNIT\";\n // function test\n CORE_HASH_STRUCTURE[\"FUNCTION_TEST_SUITE\"] = \"FUNCTION_TEST_SUITE\";\n CORE_HASH_STRUCTURE[\"FUNCTION_TEST\"] = \"FUNCTION_TEST\";\n CORE_HASH_STRUCTURE[\"FUNCTION_STORE_TEST_DATA\"] = \"FUNCTION_STORE_TEST_DATA\";\n CORE_HASH_STRUCTURE[\"FUNCTION_PARAMETER_VALUE\"] = \"FUNCTION_PARAMETER_VALUE\";\n // testable\n CORE_HASH_STRUCTURE[\"ASSERT_FAIL\"] = \"ASSERT_FAIL\";\n CORE_HASH_STRUCTURE[\"ASSERT_PASS\"] = \"ASSERT_PASS\";\n CORE_HASH_STRUCTURE[\"EQUAL_TO_JSON_ASSERT_FAIL\"] = \"EQUAL_TO_JSON_ASSERT_FAIL\";\n CORE_HASH_STRUCTURE[\"EQUAL_TO\"] = \"EQUAL_TO\";\n CORE_HASH_STRUCTURE[\"EQUAL_TO_JSON\"] = \"EQUAL_TO_JSON\";\n CORE_HASH_STRUCTURE[\"EQUAL_TO_TDS\"] = \"EQUAL_TO_TDS\";\n // section index\n CORE_HASH_STRUCTURE[\"SECTION_INDEX\"] = \"SECTION_INDEX\";\n CORE_HASH_STRUCTURE[\"SECTION\"] = \"SECTION\";\n CORE_HASH_STRUCTURE[\"IMPORT_AWARE_CODE_SECTION\"] = \"IMPORT_AWARE_CODE_SECTION\";\n CORE_HASH_STRUCTURE[\"DEFAULT_CODE_SECTION\"] = \"DEFAULT_CODE_SECTION\";\n // raw value specification\n CORE_HASH_STRUCTURE[\"RAW_LAMBDA\"] = \"RAW_LAMBDA\";\n CORE_HASH_STRUCTURE[\"RAW_VARIABLE\"] = \"RAW_VARIABLE\";\n CORE_HASH_STRUCTURE[\"RAW_INSTANCE_VALUE\"] = \"RAW_INSTANCE_VALUE\";\n CORE_HASH_STRUCTURE[\"BINDING_TRANSFORMER\"] = \"BINDING_TRANSFORMER\";\n // value specification\n CORE_HASH_STRUCTURE[\"INTERNAL__UNKNOWN_VALUE_SPECIFICATION\"] = \"INTERNAL__UNKNOWN_VALUE_SPECIFICATION\";\n CORE_HASH_STRUCTURE[\"INTERNAL__PROPAGATED_VALUE\"] = \"INTERNAL__PROPAGATED_VALUE\";\n CORE_HASH_STRUCTURE[\"VARIABLE_EXPRESSION\"] = \"VARIABLE_EXPRESSION\";\n CORE_HASH_STRUCTURE[\"EXPRESSION\"] = \"EXPRESSION\";\n CORE_HASH_STRUCTURE[\"FUNCTION_EXPRESSION\"] = \"FUNCTION_EXPRESSION\";\n CORE_HASH_STRUCTURE[\"SIMPLE_FUNCTION_EXPRESSION\"] = \"SIMPLE_FUNCTION_EXPRESSION\";\n CORE_HASH_STRUCTURE[\"ABSTRACT_PROPERTY_EXPRESSION\"] = \"ABSTRACT_PROPERTY_EXPRESSION\";\n CORE_HASH_STRUCTURE[\"INSTANCE_VALUE\"] = \"INSTANCE_VALUE\";\n CORE_HASH_STRUCTURE[\"PRIMITIVE_INSTANCE_VALUE\"] = \"PRIMITIVE_INSTANCE_VALUE\";\n CORE_HASH_STRUCTURE[\"ENUM_INSTANCE_VALUE\"] = \"ENUM_INSTANCE_VALUE\";\n CORE_HASH_STRUCTURE[\"KEY_EXPRESSION_INSTANCE_VALUE\"] = \"KEY_EXPRESSION_INSTANCE_VALUE\";\n CORE_HASH_STRUCTURE[\"KEY_EXPRESSION_VALUE\"] = \"KEY_EXPRESSION_VALUE\";\n CORE_HASH_STRUCTURE[\"RUNTIME_INSTANCE_VALUE\"] = \"RUNTIME_INSTANCE_VALUE\";\n CORE_HASH_STRUCTURE[\"PAIR_INSTANCE_VALUE\"] = \"PAIR_INSTANCE_VALUE\";\n CORE_HASH_STRUCTURE[\"MAPPING_INSTANCE_VALUE\"] = \"MAPPING_INSTANCE_VALUE\";\n CORE_HASH_STRUCTURE[\"PURE_LIST_INSTANCE_VALUE\"] = \"PURE_LIST_INSTANCE_VALUE\";\n CORE_HASH_STRUCTURE[\"COLLECTION_INSTANCE_VALUE\"] = \"COLLECTION_INSTANCE_VALUE\";\n CORE_HASH_STRUCTURE[\"LAMBDA_FUNCTION_INSTANCE_VALUE\"] = \"LAMBDA_FUNCTION_INSTANCE_VALUE\";\n CORE_HASH_STRUCTURE[\"FUNCTION_TYPE\"] = \"FUNCTION_TYPE\";\n CORE_HASH_STRUCTURE[\"LAMBDA_FUNCTION\"] = \"LAMBDA_FUNCTION\";\n CORE_HASH_STRUCTURE[\"ALLOY_SERIALIZATION_CONFIG_INSTANCE_VALUE\"] = \"ALLOY_SERIALIZATION_CONFIG_INSTANCE_VALUE\";\n CORE_HASH_STRUCTURE[\"ALLOY_SERIALIZATION_CONFIG\"] = \"ALLOY_SERIALIZATION_CONFIG\";\n CORE_HASH_STRUCTURE[\"ROOT_GRAPH_FETCH_TREE\"] = \"ROOT_GRAPH_FETCH_TREE\";\n CORE_HASH_STRUCTURE[\"PROPERTY_GRAPH_FETCH_TREE\"] = \"PROPERTY_GRAPH_FETCH_TREE\";\n CORE_HASH_STRUCTURE[\"SUBTYPE_GRAPH_FETCH_TREE\"] = \"SUBTYPE_GRAPH_FETCH_TREE\";\n CORE_HASH_STRUCTURE[\"SUBTYPE_GRAPH_FETCH_TREE_INSTANCE_VALUE\"] = \"SUBTYPE_GRAPH_FETCH_TREE_INSTANCE_VALUE\";\n CORE_HASH_STRUCTURE[\"PROPERTY_GRAPH_FETCH_TREE_INSTANCE_VALUE\"] = \"PROEPRTY_GRAPH_FETCH_TREE_INSTANCE_VALUE\";\n CORE_HASH_STRUCTURE[\"ROOT_GRAPH_FETCH_TREE_INSTANCE_VALUE\"] = \"ROOT_GRAPH_FETCH_TREE_INSTANCE_VALUE\";\n CORE_HASH_STRUCTURE[\"RELATION_COL_SPEC_ARRAY\"] = \"RELATION_COL_SPEC_ARRAY\";\n CORE_HASH_STRUCTURE[\"RELATION_COL_SPEC\"] = \"RELATION_COL_SPEC\";\n // ---------------------------------- DSL Mapping --------------------------------------\n CORE_HASH_STRUCTURE[\"INTERNAL__UNKNOWN_STORE\"] = \"INTERNAL__UNKNOWN_STORE\";\n CORE_HASH_STRUCTURE[\"INTERNAL__UNKNOWN_CONNECTION\"] = \"INTERNAL__UNKNOWN_CONNECTION\";\n CORE_HASH_STRUCTURE[\"INTERNAL__UNKNOWN_PROPERTY_MAPPING\"] = \"INTERNAL__UNKNOWN_PROPERTY_MAPPING\";\n CORE_HASH_STRUCTURE[\"INTERNAL__UNKNOWN_CLASS_MAPPING\"] = \"INTERNAL__UNKNOWN_CLASS_MAPPING\";\n CORE_HASH_STRUCTURE[\"INTERNAL__UNKNOWN_MAPPING_INCLUDE\"] = \"INTERNAL__UNKNOWN_MAPPING_INCLUDE\";\n CORE_HASH_STRUCTURE[\"MAPPING\"] = \"MAPPING\";\n CORE_HASH_STRUCTURE[\"MAPPING_INCLUDE_MAPPING\"] = \"MAPPING_INCLUDE_MAPPING\";\n CORE_HASH_STRUCTURE[\"ASSOCIATION_IMPLEMENTATION\"] = \"ASSOCIATION_IMPLEMENTATION\";\n CORE_HASH_STRUCTURE[\"RELATIONAL_ASSOCIATION_IMPLEMENTATION\"] = \"RELATIONAL_ASSOCIATION_IMPLEMENTATION\";\n CORE_HASH_STRUCTURE[\"XSTORE_ASSOCIATION_IMPLEMENTATION\"] = \"XSTORE_ASSOCIATION_IMPLEMENTATION\";\n CORE_HASH_STRUCTURE[\"ENUMERATION_MAPPING\"] = \"ENUMERATION_MAPPING\";\n CORE_HASH_STRUCTURE[\"ENUM_VALUE_MAPPING\"] = \"ENUM_VALUE_MAPPING\";\n CORE_HASH_STRUCTURE[\"SET_IMPLEMENTATION\"] = \"SET_IMPLEMENTATION\";\n CORE_HASH_STRUCTURE[\"OPERATION_SET_IMPLEMENTATION\"] = \"OPERATION_SET_IMPLEMENTATION\";\n CORE_HASH_STRUCTURE[\"PURE_INSTANCE_SET_IMPLEMENTATION\"] = \"PURE_INSTANCE_SET_IMPLEMENTATION\";\n CORE_HASH_STRUCTURE[\"PROPERTY_MAPPING\"] = \"PROPERTY_MAPPING\";\n CORE_HASH_STRUCTURE[\"LOCAL_MAPPING_PROPERTY\"] = \"LOCAL_MAPPING_PROPERTY\";\n CORE_HASH_STRUCTURE[\"PURE_PROPERTY_MAPPING\"] = \"PURE_PROPERTY_MAPPING\";\n CORE_HASH_STRUCTURE[\"XSTORE_PROPERTY_MAPPING\"] = \"XSTORE_PROPERTY_MAPPING\";\n CORE_HASH_STRUCTURE[\"MAPPING_TEST_LEGACY\"] = \"MAPPING_TEST_LEGACY\";\n CORE_HASH_STRUCTURE[\"MAPPING_TEST_SUITE\"] = \"MAPPING_TEST_SUITE\";\n CORE_HASH_STRUCTURE[\"MAPPING_TEST\"] = \"MAPPING_TEST\";\n CORE_HASH_STRUCTURE[\"STORE_TEST_DATA\"] = \"STORE_TEST_DATA\";\n CORE_HASH_STRUCTURE[\"INPUT_DATA\"] = \"INPUT_DATA\";\n CORE_HASH_STRUCTURE[\"FLAT_DATA_INPUT_DATA\"] = \"FLAT_DATA_INPUT_DATA\";\n CORE_HASH_STRUCTURE[\"RELATIONAL_INPUT_DATA\"] = \"RELATIONAL_INPUT_DATA\";\n CORE_HASH_STRUCTURE[\"OBJECT_INPUT_DATA\"] = \"OBJECT_INPUT_DATA\";\n CORE_HASH_STRUCTURE[\"MAPPING_TEST_ASSERT\"] = \"MAPPING_TEST_ASSERT\";\n CORE_HASH_STRUCTURE[\"EXPECTED_OUTPUT_MAPPING_TEST_ASSERT\"] = \"EXPECTED_OUTPUT_MAPPING_TEST_ASSERT\";\n CORE_HASH_STRUCTURE[\"FILTER_MAPPING\"] = \"FILTER_MAPPING\";\n CORE_HASH_STRUCTURE[\"COLUMN_MAPPING\"] = \"COLUMN_MAPPING\";\n CORE_HASH_STRUCTURE[\"GROUP_BY_MAPPING\"] = \"GROUP_BY_MAPPING\";\n // runtime\n CORE_HASH_STRUCTURE[\"RUNTIME\"] = \"RUNTIME\";\n CORE_HASH_STRUCTURE[\"PACKAGEABLE_RUNTIME\"] = \"PACKAGEABLE_RUNTIME\";\n CORE_HASH_STRUCTURE[\"ENGINE_RUNTIME\"] = \"ENGINE_RUNTIME\";\n CORE_HASH_STRUCTURE[\"SINGLE_ENGINE_RUNTIME\"] = \"SINGLE_ENGINE_RUNTIME\";\n CORE_HASH_STRUCTURE[\"LEGACY_RUNTIME\"] = \"LEGACY_RUNTIME\";\n CORE_HASH_STRUCTURE[\"RUNTIME_POINTER\"] = \"RUNTIME_POINTER\";\n CORE_HASH_STRUCTURE[\"STORE_CONNECTIONS\"] = \"STORE_CONNECTIONS\";\n CORE_HASH_STRUCTURE[\"IDENTIFIED_CONNECTION\"] = \"IDENTIFIED_CONNECTION\";\n // connection\n CORE_HASH_STRUCTURE[\"PACKAGEABLE_CONNECTION\"] = \"PACKAGEABLE_CONNECTION\";\n CORE_HASH_STRUCTURE[\"CONNECTION_POINTER\"] = \"CONNECTION_POINTER\";\n CORE_HASH_STRUCTURE[\"XML_MODEL_CONNECTION\"] = \"XML_MODEL_CONNECTION\";\n CORE_HASH_STRUCTURE[\"JSON_MODEL_CONNECTION\"] = \"JSON_MODEL_CONNECTION\";\n CORE_HASH_STRUCTURE[\"MODEL_CHAIN_CONNECTION\"] = \"MODEL_CHAIN_CONNECTION\";\n CORE_HASH_STRUCTURE[\"FLAT_DATA_CONNECTION\"] = \"FLAT_DATA_CONNECTION\";\n // aggregation aware mapping\n CORE_HASH_STRUCTURE[\"AGGREGATION_AWARE_MAPPING\"] = \"AGGREGATION_AWARE_MAPPING\";\n CORE_HASH_STRUCTURE[\"AGGREGATION_AWARE_SPECIFICATION\"] = \"AGGREGATION_AWARE_SPECIFICATION\";\n CORE_HASH_STRUCTURE[\"AGGREGATION_AWARE_SET_IMPLEMENTATION_CONTAINER\"] = \"AGGREGATION_AWARE_SET_IMPLEMENTATION_CONTAINER\";\n CORE_HASH_STRUCTURE[\"AGGREGATE_FUNCTION\"] = \"AGGREGATE_FUNCTION\";\n CORE_HASH_STRUCTURE[\"GROUP_BY_FUNCTION\"] = \"GROUP_BY_FUNCTION\";\n // ---------------------------------- DSL Generation --------------------------------------\n CORE_HASH_STRUCTURE[\"GENERATION_TREE\"] = \"GENERATION_TREE\";\n CORE_HASH_STRUCTURE[\"GENERATION_TREE_NODE\"] = \"GENERATION_TREE_NODE\";\n CORE_HASH_STRUCTURE[\"FILE_GENERATION\"] = \"FILE_GENERATION\";\n CORE_HASH_STRUCTURE[\"CONFIGURATION_PROPERTY\"] = \"CONFIGURATION_PROPERTY\";\n // ---------------------------------- DSL Data --------------------------------------\n CORE_HASH_STRUCTURE[\"INTERNAL__UNKNOWN_EMBEDDED_DATA\"] = \"INTERNAL__UNKNOWN_EMBEDDED_DATA\";\n CORE_HASH_STRUCTURE[\"EXTERNAL_FORMAT_DATA\"] = \"EXTERNAL_FORMAT_DATA\";\n CORE_HASH_STRUCTURE[\"MODEL_STORE_DATA\"] = \"MODEL_STORE_DATA\";\n CORE_HASH_STRUCTURE[\"MODEL_DATA\"] = \"MODEL_DATA\";\n CORE_HASH_STRUCTURE[\"MODEL_EMBEDDED_DATA\"] = \"MODEL_EMBEDDED_DATA\";\n CORE_HASH_STRUCTURE[\"MODEL_INSTANCE_DATA\"] = \"MODEL_INSTANCE_DATA\";\n CORE_HASH_STRUCTURE[\"DATA_ELEMENT_REFERENCE\"] = \"DATA_ELEMENT_REFERENCE\";\n CORE_HASH_STRUCTURE[\"DATA_ELEMENT\"] = \"DATA_ELEMENT\";\n CORE_HASH_STRUCTURE[\"RELATIONAL_CSV_DATA\"] = \"RELATIONAL_CSV_DATA\";\n CORE_HASH_STRUCTURE[\"RELATIONAL_TDS\"] = \"RELATIONAL_TDS\";\n CORE_HASH_STRUCTURE[\"RELATIONAL_CSV_DATA_TABLE\"] = \"RELATIONAL_CSV_DATA_TABLE\";\n // ---------------------------------- DSL External Format --------------------------------------\n CORE_HASH_STRUCTURE[\"BINDING\"] = \"BINDING\";\n CORE_HASH_STRUCTURE[\"SCHEMA_SET\"] = \"SCHEMA_SET\";\n CORE_HASH_STRUCTURE[\"SCHEMA\"] = \"SCHEMA\";\n CORE_HASH_STRUCTURE[\"MODEL_UNIT\"] = \"MODEL_UNIT\";\n CORE_HASH_STRUCTURE[\"URL_STREAM\"] = \"URL_STREAM\";\n CORE_HASH_STRUCTURE[\"EXTERNAL_FORMAT_CONNECTION\"] = \"EXTERNAL_FORMAT_CONNECTION\";\n // ---------------------------------- DSL Service --------------------------------------\n CORE_HASH_STRUCTURE[\"SERVICE\"] = \"SERVICE\";\n CORE_HASH_STRUCTURE[\"SERVICE_OWNER\"] = \"SERVICE_OWNER\";\n CORE_HASH_STRUCTURE[\"SERVICE_PURE_EXECUTION\"] = \"SERVICE_PURE_EXECUTION\";\n CORE_HASH_STRUCTURE[\"SERVICE_PURE_SINGLE_EXECUTION\"] = \"SERVICE_PURE_SINGLE_EXECUTION\";\n CORE_HASH_STRUCTURE[\"SERVICE_KEYED_EXECUTION_PARAMETER\"] = \"SERVICE_KEYED_EXECUTION_PARAMETER\";\n CORE_HASH_STRUCTURE[\"SERVICE_PURE_MULTI_EXECUTION\"] = \"SERVICE_PURE_MULTI_EXECUTION\";\n CORE_HASH_STRUCTURE[\"SERVICE_TEST_CONTAINER\"] = \"SERVICE_TEST_CONTAINER\";\n CORE_HASH_STRUCTURE[\"SERVICE_LEGACY_SINGLE_EXECUTION_TEST\"] = \"SERVICE_LEGACY_SINGLE_EXECUTION_TEST\";\n CORE_HASH_STRUCTURE[\"SERVICE_LEGACY_KEYED_SINGLE_EXECUTION_TEST\"] = \"SERVICE_LEGACY_KEYED_SINGLE_EXECUTION_TEST\";\n CORE_HASH_STRUCTURE[\"SERVICE_LEGACY_MULTI_EXECUTION_TEST\"] = \"SERVICE_LEGACY_MULTI_EXECUTION_TEST\";\n CORE_HASH_STRUCTURE[\"SERVICE_CONNECTION_TEST_DATA\"] = \"SERVICE_CONNECTION_TEST_DATA\";\n CORE_HASH_STRUCTURE[\"SERVICE_TEST_DATA\"] = \"SERVICE_TEST_DATA\";\n CORE_HASH_STRUCTURE[\"SERVICE_TEST_SUITE\"] = \"SERVICE_TEST_SUITE\";\n CORE_HASH_STRUCTURE[\"SERVICE_TEST\"] = \"SERVICE_TEST\";\n CORE_HASH_STRUCTURE[\"SERVICE_PARAMETER_VALUE\"] = \"SERVICE_PARAMETER_VALUE\";\n CORE_HASH_STRUCTURE[\"SERVICE_POST_VALIDATION\"] = \"SERVICE_POST_VALIDATION\";\n CORE_HASH_STRUCTURE[\"SERVICE_POST_VALIDATION_ASSERTION\"] = \"SERVICE_POST_VALIDATION_ASSERTION\";\n // execution environment instance\n CORE_HASH_STRUCTURE[\"EXECUTION_ENVIRONMENT_INSTANCE\"] = \"EXECUTION_ENVIRONMENT_INSTANCE\";\n CORE_HASH_STRUCTURE[\"SINGLE_EXECUTION_PARAMETER\"] = \"SINGLE_EXECUTION_PARAMETER\";\n CORE_HASH_STRUCTURE[\"MULTI_EXECUTION_PARAMETER\"] = \"MULTI_EXECUTION_PARAMETER\";\n // ---------------------------------- STO Relational --------------------------------------\n CORE_HASH_STRUCTURE[\"INTERNAL__UNKNOWN_DATASOURCE_SPECIFICATION\"] = \"INTERNAL__UNKNOWN_DATASOURCE_SPECIFICATION\";\n CORE_HASH_STRUCTURE[\"INTERNAL__UNKNOWN_AUTHENTICATION_STRATEGY\"] = \"INTERNAL__UNKNOWN_AUTHENTICATION_STRATEGY\";\n CORE_HASH_STRUCTURE[\"INTERNAL__UNKNOWN_POST_PROCESSOR\"] = \"INTERNAL__UNKNOWN_POST_PROCESSOR\";\n // database\n CORE_HASH_STRUCTURE[\"DATABASE\"] = \"DATABASE\";\n CORE_HASH_STRUCTURE[\"DATABASE_SCHEMA\"] = \"DATABASE_SCHEMA\";\n CORE_HASH_STRUCTURE[\"DATABASE_JOIN\"] = \"DATABASE_JOIN\";\n CORE_HASH_STRUCTURE[\"DATABASE_FILTER\"] = \"DATABASE_FILTER\";\n CORE_HASH_STRUCTURE[\"DATBASE_VIEW\"] = \"DATBASE_VIEW\";\n CORE_HASH_STRUCTURE[\"DATABASE_SCHEMA_TABLE\"] = \"DATABASE_SCHEMA_TABLE\";\n CORE_HASH_STRUCTURE[\"DATABASE_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 CORE_HASH_STRUCTURE[\"RELATIONAL_DATATYPE_JSON\"] = \"RELATIONAL_DATATYPE_JSON\";\n // relational mapping\n CORE_HASH_STRUCTURE[\"ROOT_RELATIONAL_INSTANCE_SET_IMPLEMENTATION\"] = \"ROOT_RELATIONAL_INSTANCE_SET_IMPLEMENTATION\";\n CORE_HASH_STRUCTURE[\"RELATIONAL_INSTANCE_SET_IMPLEMENTATION\"] = \"RELATIONAL_INSTANCE_SET_IMPLEMENTATION\";\n CORE_HASH_STRUCTURE[\"REALTIONAL_PROPERTY_MAPPING\"] = \"REALTIONAL_PROPERTY_MAPPING\";\n CORE_HASH_STRUCTURE[\"EMBEDDED_REALTIONAL_PROPERTY_MAPPING\"] = \"EMBEDDED_REALTIONAL_PROPERTY_MAPPING\";\n CORE_HASH_STRUCTURE[\"INLINE_EMBEDDED_REALTIONAL_PROPERTY_MAPPING\"] = \"INLINE_EMBEDDED_REALTIONAL_PROPERTY_MAPPING\";\n CORE_HASH_STRUCTURE[\"OTHERWISE_EMBEDDED_REALTIONAL_PROPERTY_MAPPING\"] = \"OTHERWISE_EMBEDDED_REALTIONAL_PROPERTY_MAPPING\";\n // 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\n CORE_HASH_STRUCTURE[\"RELATIONAL_DATABASE_CONNECTION\"] = \"RELATIONAL_DATABASE_CONNECTION\";\n // relational database connection datasource specification\n CORE_HASH_STRUCTURE[\"STATIC_DATASOURCE_SPECIFICATION\"] = \"STATIC_DATASOURCE_SPECIFICATION\";\n CORE_HASH_STRUCTURE[\"LOCAL_H2_DATASOURCE_SPECIFICATION\"] = \"LOCAL_H2_DATASOURCE_SPECIFICATION\";\n CORE_HASH_STRUCTURE[\"EMBEDDED_H2_DATASOURCE_SPECIFICATION\"] = \"EMBEDDED_H2_DATASOURCE_SPECIFICATION\";\n CORE_HASH_STRUCTURE[\"SNOWFLAKE_DATASOURCE_SPECIFICATION\"] = \"SNOWFLAKE_DATASOURCE_SPECIFICATION\";\n CORE_HASH_STRUCTURE[\"REDSHIFT_DATASOURCE_SPECIFICATION\"] = \"REDSHIFT_DATASOURCE_SPECIFICATION\";\n CORE_HASH_STRUCTURE[\"BIGQUERY_DATASOURCE_SPECIFICATION\"] = \"BIGQUERY_DATASOURCE_SPECIFICATION\";\n CORE_HASH_STRUCTURE[\"DATABRICKS_DATASOURCE_SPECIFICATION\"] = \"DATABRICKS_DATASOURCE_SPECIFICATION\";\n CORE_HASH_STRUCTURE[\"SPANNER_DATASOURCE_SPECIFICATION\"] = \"SPANNER_DATASOURCE_SPECIFICATION\";\n CORE_HASH_STRUCTURE[\"TRINO_DATASOURCE_SPECIFICATION\"] = \"TRINO_DATASOURCE_SPECIFICATION\";\n CORE_HASH_STRUCTURE[\"TRINO_SSL_SPECIFICATION\"] = \"TRINO_SSL_SPECIFICATION\";\n // relational database connection authentication strategy\n CORE_HASH_STRUCTURE[\"DELEGRATED_KEREBEROS_AUTHENTICATION_STRATEGY\"] = \"DELEGRATED_KEREBEROS_AUTHENTICATION_STRATEGY\";\n CORE_HASH_STRUCTURE[\"DEFAULT_H2_AUTHENTICATION_STRATEGY\"] = \"DEFAULT_H2_AUTHENTICATION_STRATEGY\";\n CORE_HASH_STRUCTURE[\"SNOWFLAKE_PUBLIC_AUTHENTICATION_STRATEGY\"] = \"SNOWFLAKE_PUBLIC_AUTHENTICATION_STRATEGY\";\n CORE_HASH_STRUCTURE[\"API_TOKEN_AUTHENTICATION_STRATEGY\"] = \"API_TOKEN_AUTHENTICATION_STRATEGY\";\n CORE_HASH_STRUCTURE[\"GCP_APPLICATION_DEFAULT_CREDENTIALS_AUTHENTICATION_STRATEGY\"] = \"GCP_APPLICATION_DEFAULT_CREDENTIALS_AUTHENTICATION_STRATEGY\";\n CORE_HASH_STRUCTURE[\"USERNAME_PASSWORD_AUTHENTICATION_STRATEGY\"] = \"USERNAME_PASSWORD_AUTHENTICATION_STRATEGY\";\n CORE_HASH_STRUCTURE[\"OAUTH_AUTHENTICATION_STRATEGY\"] = \"OAUTH_AUTHENTICATION_STRATEGY\";\n CORE_HASH_STRUCTURE[\"GCP_WORKLOAD_IDENTITY_FEDERATION_AUTHENTICATION_STRATEGY\"] = \"GCP_WORKLOAD_IDENTITY_FEDERATION_AUTHENTICATION_STRATEGY\";\n CORE_HASH_STRUCTURE[\"MIDDLE_TIER_USERNAME_PASSWORD_AUTHENTICATION_STRATEGY\"] = \"MIDDLE_TIER_USERNAME_PASSWORD_AUTHENTICATION_STRATEGY\";\n CORE_HASH_STRUCTURE[\"TRINO_DELEGATED_KERBEROS_AUTHENTICATION_STRATEGY\"] = \"TRINO_KEREBEROS_AUTHENTICATION_STRATEGY\";\n // relational database connection post-processors\n CORE_HASH_STRUCTURE[\"MAPPER_POST_PROCESSOR\"] = \"MAPPER_POST_PROCESSOR\";\n CORE_HASH_STRUCTURE[\"SCHEMA_MAPPER\"] = \"SCHEMA_MAPPER\";\n CORE_HASH_STRUCTURE[\"TABLE_MAPPER\"] = \"TABLE_MAPPER\";\n // ---------------------------------- STO Flat-Data --------------------------------------\n CORE_HASH_STRUCTURE[\"FLAT_DATA\"] = \"FLAT_DATA\";\n CORE_HASH_STRUCTURE[\"FLAT_DATA_SECTION\"] = \"FLAT_DATA_SECTION\";\n CORE_HASH_STRUCTURE[\"FLAT_DATA_PROPERTY\"] = \"FLAT_DATA_PROPERTY\";\n CORE_HASH_STRUCTURE[\"FLAT_DATA_ROOT_RECORD_TYPE\"] = \"FLAT_DATA_ROOT_RECORD_TYPE\";\n CORE_HASH_STRUCTURE[\"FLAT_DATA_RECORD_TYPE\"] = \"FLAT_DATA_RECORD_TYPE\";\n CORE_HASH_STRUCTURE[\"FLAT_DATA_RECORD_FIELD\"] = \"FLAT_DATA_RECORD_FIELD\";\n CORE_HASH_STRUCTURE[\"FLAT_DATA_STRING\"] = \"FLAT_DATA_STRING\";\n CORE_HASH_STRUCTURE[\"FLAT_DATA_BOOLEAN\"] = \"FLAT_DATA_BOOLEAN\";\n CORE_HASH_STRUCTURE[\"FLAT_DATA_NUMBER\"] = \"FLAT_DATA_NUMBER\";\n CORE_HASH_STRUCTURE[\"FLAT_DATA_INTEGER\"] = \"FLAT_DATA_INTEGER\";\n CORE_HASH_STRUCTURE[\"FLAT_DATA_FLOAT\"] = \"FLAT_DATA_FLOAT\";\n CORE_HASH_STRUCTURE[\"FLAT_DATA_DECIMAL\"] = \"FLAT_DATA_DECIMAL\";\n CORE_HASH_STRUCTURE[\"FLAT_DATA_DATE\"] = \"FLAT_DATA_DATE\";\n CORE_HASH_STRUCTURE[\"FLAT_DATA_DATE_TIME\"] = \"FLAT_DATA_DATE_TIME\";\n CORE_HASH_STRUCTURE[\"FLAT_DATA_STRICT_DATE\"] = \"FLAT_DATA_STRICT_DATE\";\n CORE_HASH_STRUCTURE[\"FLAT_DATA_INSTANCE_SET_IMPLEMENTATION\"] = \"FLAT_DATA_INSTANCE_SET_IMPLEMENTATION\";\n CORE_HASH_STRUCTURE[\"FLAT_DATA_PROPERTY_MAPPING\"] = \"FLAT_DATA_PROPERTY_MAPPING\";\n CORE_HASH_STRUCTURE[\"FLAT_DATA_ASSOCIATION_IMPLEMENTATION\"] = \"FLAT_DATA_ASSOCIATION_IMPLEMENTATION\";\n CORE_HASH_STRUCTURE[\"FLAT_DATA_ASSOCIATION_PROPERTY_MAPPING\"] = \"FLAT_DATA_ASSOCIATION_PROPERTY_MAPPING\";\n CORE_HASH_STRUCTURE[\"EMBEDDED_FLAT_DATA_PROPERTY_MAPPING\"] = \"EMBEDDED_FLAT_DATA_PROPERTY_MAPPING\";\n CORE_HASH_STRUCTURE[\"FLAT_DATA_SECTION_POINTER\"] = \"FLAT_DATA_SECTION_POINTER\";\n // -------------------------------------- Function Activator --------------------------------------\n CORE_HASH_STRUCTURE[\"SNOWFLAKE_APP\"] = \"SNOWFLAKE_APP\";\n CORE_HASH_STRUCTURE[\"HOSTED_SERVICE\"] = \"HOSTED_SERVICE\";\n CORE_HASH_STRUCTURE[\"HOSTED_SERVICE_OWNER\"] = \"HOSTED_SERVICE_OWNER\";\n})(CORE_HASH_STRUCTURE || (CORE_HASH_STRUCTURE = {}));\nexport const hashObjectWithoutSourceInformation = (val) => hashObject(val, {\n /**\n * NOTE: this is over-simplification as there could be source information fields with other names\n * see note in {@link pruneSourceInformation}\n */\n excludeKeys: (propKey) => propKey\n .toLowerCase()\n .endsWith(SOURCE_INFORMATION_PROPERTY_KEY_SUFFIX.toLowerCase()),\n});\nexport const hashRawLambda = (parameters, body) => hashArray([\n parameters ? hashObjectWithoutSourceInformation(parameters) : '',\n body ? hashObjectWithoutSourceInformation(body) : '',\n]);\nexport const hashElementPointer = (pointerType, path) => [CORE_HASH_STRUCTURE.PACKAGEABLE_ELEMENT_POINTER, pointerType ?? '', path]\n .map(hashValue)\n .join(',');\n//# sourceMappingURL=Core_HashUtils.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport const MULTIPLICITY_INFINITE = '*';\nexport const ELEMENT_PATH_DELIMITER = '::';\nexport const MULTIPLICITY_RANGE_OPERATOR = '..';\nexport const PROPERTY_ACCESSOR = '.';\nexport const UNIT_PATH_DELIMITER = '~';\nexport const LAMBDA_PIPE = '|';\nexport const DEFAULT_SOURCE_PARAMETER_NAME = 'src';\nexport const DEFAULT_DATABASE_SCHEMA_NAME = 'default';\nexport const SECTION_INDEX_ELEMENT_PATH = '__internal__::SectionIndex';\nexport const VARIABLE_REFERENCE_TOKEN = '$';\nexport const TYPE_CAST_TOKEN = '@';\nexport const ARROW_FUNCTION_TOKEN = '->';\nexport const LATEST_DATE = '%latest';\nexport const PARSER_SECTION_MARKER = '###';\nexport const FUNCTION_SIGNATURE_MULTIPLICITY_INFINITE_TOKEN = 'MANY';\nexport const DIRECTORY_PATH_DELIMITER = '/';\nexport const SOURCE_INFORMATION_PROPERTY_KEY_SUFFIX = 'sourceInformation';\nexport const RESERVERD_PACKAGE_NAMES = ['$implicit'];\nexport var ROOT_PACKAGE_NAME;\n(function (ROOT_PACKAGE_NAME) {\n ROOT_PACKAGE_NAME[\"CORE\"] = \"CORE\";\n ROOT_PACKAGE_NAME[\"MAIN\"] = \"ROOT\";\n ROOT_PACKAGE_NAME[\"MODEL_GENERATION\"] = \"MODEL_GENERATION_ROOT\";\n ROOT_PACKAGE_NAME[\"SYSTEM\"] = \"SYSTEM_ROOT\";\n ROOT_PACKAGE_NAME[\"PROJECT_DEPENDENCY_ROOT\"] = \"PROJECT_DEPENDENCY_ROOT\";\n})(ROOT_PACKAGE_NAME || (ROOT_PACKAGE_NAME = {}));\nexport var PRIMITIVE_TYPE;\n(function (PRIMITIVE_TYPE) {\n PRIMITIVE_TYPE[\"STRING\"] = \"String\";\n PRIMITIVE_TYPE[\"BOOLEAN\"] = \"Boolean\";\n PRIMITIVE_TYPE[\"BINARY\"] = \"Binary\";\n PRIMITIVE_TYPE[\"NUMBER\"] = \"Number\";\n PRIMITIVE_TYPE[\"INTEGER\"] = \"Integer\";\n PRIMITIVE_TYPE[\"FLOAT\"] = \"Float\";\n PRIMITIVE_TYPE[\"DECIMAL\"] = \"Decimal\";\n PRIMITIVE_TYPE[\"DATE\"] = \"Date\";\n PRIMITIVE_TYPE[\"STRICTDATE\"] = \"StrictDate\";\n PRIMITIVE_TYPE[\"DATETIME\"] = \"DateTime\";\n PRIMITIVE_TYPE[\"STRICTTIME\"] = \"StrictTime\";\n // NOTE: `LatestDate` is a special type that is used for milestoning in store so its used in the body of function and lamdba but never should be exposed to users\n // as such, if there is a day we want to have `LatestDate` in the graph but not exposed to the users\n PRIMITIVE_TYPE[\"LATESTDATE\"] = \"LatestDate\";\n PRIMITIVE_TYPE[\"BYTE\"] = \"Byte\";\n})(PRIMITIVE_TYPE || (PRIMITIVE_TYPE = {}));\nexport var ATOMIC_TEST_TYPE;\n(function (ATOMIC_TEST_TYPE) {\n ATOMIC_TEST_TYPE[\"Service_Test\"] = \"serviceTest\";\n ATOMIC_TEST_TYPE[\"Mapping_Test\"] = \"mappingTest\";\n ATOMIC_TEST_TYPE[\"Function_Test\"] = \"functionTest\";\n})(ATOMIC_TEST_TYPE || (ATOMIC_TEST_TYPE = {}));\n// NOTE: the list of auto-import are kept in `m3.pure` file in `finos/legend-pure`,\n// this includes a more extensive list of 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 // type\n CORE_PURE_PATH[\"ANY\"] = \"meta::pure::metamodel::type::Any\";\n CORE_PURE_PATH[\"NIL\"] = \"meta::pure::metamodel::type::Nil\";\n // profile\n CORE_PURE_PATH[\"PROFILE_DOC\"] = \"meta::pure::profiles::doc\";\n CORE_PURE_PATH[\"PROFILE_TEMPORAL\"] = \"meta::pure::profiles::temporal\";\n // classifier paths\n CORE_PURE_PATH[\"PROFILE\"] = \"meta::pure::metamodel::extension::Profile\";\n CORE_PURE_PATH[\"ENUMERATION\"] = \"meta::pure::metamodel::type::Enumeration\";\n CORE_PURE_PATH[\"MEASURE\"] = \"meta::pure::metamodel::type::Measure\";\n CORE_PURE_PATH[\"CLASS\"] = \"meta::pure::metamodel::type::Class\";\n CORE_PURE_PATH[\"ASSOCIATION\"] = \"meta::pure::metamodel::relationship::Association\";\n CORE_PURE_PATH[\"FUNCTION\"] = \"meta::pure::metamodel::function::ConcreteFunctionDefinition\";\n CORE_PURE_PATH[\"FLAT_DATA\"] = \"meta::flatData::metamodel::FlatData\";\n CORE_PURE_PATH[\"DATABASE\"] = \"meta::relational::metamodel::Database\";\n CORE_PURE_PATH[\"MAPPING\"] = \"meta::pure::mapping::Mapping\";\n CORE_PURE_PATH[\"SERVICE\"] = \"meta::legend::service::metamodel::Service\";\n CORE_PURE_PATH[\"CONNECTION\"] = \"meta::pure::runtime::PackageableConnection\";\n CORE_PURE_PATH[\"RUNTIME\"] = \"meta::pure::runtime::PackageableRuntime\";\n CORE_PURE_PATH[\"EXECUTION_ENVIRONMENT\"] = \"meta::legend::service::metamodel::ExecutionEnvironmentInstance\";\n CORE_PURE_PATH[\"FILE_GENERATION\"] = \"meta::pure::generation::metamodel::GenerationConfiguration\";\n CORE_PURE_PATH[\"GENERATION_SPECIFICATION\"] = \"meta::pure::generation::metamodel::GenerationSpecification\";\n CORE_PURE_PATH[\"SECTION_INDEX\"] = \"meta::pure::metamodel::section::SectionIndex\";\n CORE_PURE_PATH[\"DATA_ELEMENT\"] = \"meta::pure::data::DataElement\";\n CORE_PURE_PATH[\"SNOWFLAKE_APP\"] = \"meta::external::function::activator::snowflakeApp::SnowflakeApp\";\n CORE_PURE_PATH[\"HOSTED_SERVICE\"] = \"meta::external::function::activator::hostedService::HostedService\";\n})(CORE_PURE_PATH || (CORE_PURE_PATH = {}));\nexport const PURE_DOC_TAG = 'doc';\nexport const PURE_DEPRECATED_STEREOTYPE = 'deprecated';\nexport var MILESTONING_STEREOTYPE;\n(function (MILESTONING_STEREOTYPE) {\n MILESTONING_STEREOTYPE[\"BUSINESS_TEMPORAL\"] = \"businesstemporal\";\n MILESTONING_STEREOTYPE[\"PROCESSING_TEMPORAL\"] = \"processingtemporal\";\n MILESTONING_STEREOTYPE[\"BITEMPORAL\"] = \"bitemporal\";\n})(MILESTONING_STEREOTYPE || (MILESTONING_STEREOTYPE = {}));\nexport var MILESTONING_VERSION_PROPERTY_SUFFIX;\n(function (MILESTONING_VERSION_PROPERTY_SUFFIX) {\n MILESTONING_VERSION_PROPERTY_SUFFIX[\"ALL_VERSIONS\"] = \"AllVersions\";\n MILESTONING_VERSION_PROPERTY_SUFFIX[\"ALL_VERSIONS_IN_RANGE\"] = \"AllVersionsInRange\";\n})(MILESTONING_VERSION_PROPERTY_SUFFIX || (MILESTONING_VERSION_PROPERTY_SUFFIX = {}));\nexport const MILESTONING_START_DATE_PARAMETER_NAME = 'startDate';\nexport const MILESTONING_END_DATE_PARAMETER_NAME = 'endDate';\nexport const PROCESSING_DATE_MILESTONING_PROPERTY_NAME = 'processingDate';\nexport const BUSINESS_DATE_MILESTONING_PROPERTY_NAME = 'businessDate';\nexport var PackageableElementPointerType;\n(function (PackageableElementPointerType) {\n PackageableElementPointerType[\"CLASS\"] = \"CLASS\";\n PackageableElementPointerType[\"STORE\"] = \"STORE\";\n PackageableElementPointerType[\"MAPPING\"] = \"MAPPING\";\n PackageableElementPointerType[\"RUNTIME\"] = \"RUNTIME\";\n PackageableElementPointerType[\"FUNCTION\"] = \"FUNCTION\";\n PackageableElementPointerType[\"FILE_GENERATION\"] = \"FILE_GENERATION\";\n PackageableElementPointerType[\"SERVICE\"] = \"SERVICE\";\n PackageableElementPointerType[\"DATA\"] = \"DATA\";\n})(PackageableElementPointerType || (PackageableElementPointerType = {}));\nexport var SUPPORTED_FUNCTIONS;\n(function (SUPPORTED_FUNCTIONS) {\n SUPPORTED_FUNCTIONS[\"LET\"] = \"meta::pure::functions::lang::letFunction\";\n SUPPORTED_FUNCTIONS[\"NEW\"] = \"meta::pure::functions::meta::new\";\n // from\n SUPPORTED_FUNCTIONS[\"FROM\"] = \"meta::pure::mapping::from\";\n})(SUPPORTED_FUNCTIONS || (SUPPORTED_FUNCTIONS = {}));\nexport const DATE_TIME_FORMAT_WITH_MILLISECONDS = \"yyyy-MM-dd'T'HH:mm:ss.SSSxxxx\";\nexport const DATE_TIME_FORMAT = \"yyyy-MM-dd'T'HH:mm:ssxxxx\";\nexport const DATE_FORMAT = 'yyyy-MM-dd';\n// Generation Const\nexport const DEFAULT_GENERATION_PACKAGE = 'generated';\n// Query\nexport const QUERY_PROFILE_TAG_CLASS = 'class';\nexport const QUERY_PROFILE_PATH = 'meta::pure::profiles::query';\n//# sourceMappingURL=MetaModelConst.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { V1_GraphFetchTree, } from './V1_GraphFetchTree.js';\nimport { CORE_HASH_STRUCTURE } from '../../../../../../../../../graph/Core_HashUtils.js';\nimport { hashArray } from '@finos/legend-shared';\nexport class V1_RootGraphFetchTree extends V1_GraphFetchTree {\n class;\n accept_GraphFetchTreeVisitor(visitor) {\n return visitor.visit_RootGraphFetchTree(this);\n }\n get hashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.ROOT_GRAPH_FETCH_TREE,\n hashArray(this.subTrees),\n hashArray(this.subTypeTrees),\n this.class,\n ]);\n }\n}\n//# sourceMappingURL=V1_RootGraphFetchTree.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF 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 { V1_Multiplicity } from '../../packageableElements/domain/V1_Multiplicity.js';\nimport { V1_ValueSpecification } from '../V1_ValueSpecification.js';\n/**\n * Similar to class instances, but these constructs are too fundamental for the system\n * so we group them as **core** class instances.\n */\nexport class V1_CoreClassInstance extends V1_ValueSpecification {\n multiplicity = V1_Multiplicity.ONE;\n}\n//# sourceMappingURL=V1_CoreClassInstance.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF 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_CoreClassInstance } from './V1_CoreClassInstance.js';\nexport class V1_Lambda extends V1_CoreClassInstance {\n body = [];\n parameters = [];\n accept_ValueSpecificationVisitor(visitor) {\n return visitor.visit_Lambda(this);\n }\n}\n//# sourceMappingURL=V1_Lambda.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF 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 '../../packageableElements/domain/V1_Multiplicity.js';\nimport { V1_ValueSpecification } from '../V1_ValueSpecification.js';\nexport class V1_DataTypeValueSpecification extends V1_ValueSpecification {\n multiplicity = V1_Multiplicity.ONE;\n}\n//# sourceMappingURL=V1_DataTypeValueSpecification.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS 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_Path {\n name;\n startType;\n path = [];\n}\n//# sourceMappingURL=V1_Path.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF 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 '../../packageableElements/domain/V1_Multiplicity.js';\nimport { V1_ValueSpecification } from '../V1_ValueSpecification.js';\nexport class V1_AbstractAppliedFunction extends V1_ValueSpecification {\n multiplicity = V1_Multiplicity.ONE;\n}\n//# sourceMappingURL=V1_AbstractAppliedFunction.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF 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_AbstractAppliedFunction } from '../raw/V1_AbstractAppliedFunction.js';\nexport class V1_AppliedFunction extends V1_AbstractAppliedFunction {\n function;\n fControl;\n parameters = [];\n accept_ValueSpecificationVisitor(visitor) {\n return visitor.visit_AppliedFunction(this);\n }\n}\n//# sourceMappingURL=V1_AppliedFunction.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF 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_ValueSpecification, } from '../../../model/valueSpecification/V1_ValueSpecification.js';\nimport { V1_Multiplicity } from '../../../model/packageableElements/domain/V1_Multiplicity.js';\nexport class V1_Collection extends V1_ValueSpecification {\n multiplicity = V1_Multiplicity.ONE_MANY;\n values = [];\n accept_ValueSpecificationVisitor(visitor) {\n return visitor.visit_Collection(this);\n }\n}\n//# sourceMappingURL=V1_Collection.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF 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_DataTypeValueSpecification } from './V1_DataTypeValueSpecification.js';\nexport class V1_PrimitiveValueSpecification extends V1_DataTypeValueSpecification {\n}\n//# sourceMappingURL=V1_PrimitiveValueSpecification.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF 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_PrimitiveValueSpecification } from './V1_PrimitiveValueSpecification.js';\nexport class V1_CDecimal extends V1_PrimitiveValueSpecification {\n value;\n accept_ValueSpecificationVisitor(visitor) {\n return visitor.visit_CDecimal(this);\n }\n}\n//# sourceMappingURL=V1_CDecimal.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF 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_PrimitiveValueSpecification } from './V1_PrimitiveValueSpecification.js';\nexport class V1_CInteger extends V1_PrimitiveValueSpecification {\n value;\n accept_ValueSpecificationVisitor(visitor) {\n return visitor.visit_CInteger(this);\n }\n}\n//# sourceMappingURL=V1_CInteger.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF 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_PrimitiveValueSpecification } from './V1_PrimitiveValueSpecification.js';\nexport class V1_CString extends V1_PrimitiveValueSpecification {\n value;\n accept_ValueSpecificationVisitor(visitor) {\n return visitor.visit_CString(this);\n }\n}\n//# sourceMappingURL=V1_CString.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF 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_PrimitiveValueSpecification } from './V1_PrimitiveValueSpecification.js';\nexport class V1_CFloat extends V1_PrimitiveValueSpecification {\n value;\n accept_ValueSpecificationVisitor(visitor) {\n return visitor.visit_CFloat(this);\n }\n}\n//# sourceMappingURL=V1_CFloat.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF 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_PrimitiveValueSpecification } from './V1_PrimitiveValueSpecification.js';\nexport class V1_CDate extends V1_PrimitiveValueSpecification {\n}\n//# sourceMappingURL=V1_CDate.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF 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_CDate } from './V1_CDate.js';\nexport class V1_CDateTime extends V1_CDate {\n value;\n accept_ValueSpecificationVisitor(visitor) {\n return visitor.visit_CDateTime(this);\n }\n}\n//# sourceMappingURL=V1_CDateTime.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF 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_CDate } from './V1_CDate.js';\nexport class V1_CStrictDate extends V1_CDate {\n value;\n accept_ValueSpecificationVisitor(visitor) {\n return visitor.visit_CStrictDate(this);\n }\n}\n//# sourceMappingURL=V1_CStrictDate.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF 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_PrimitiveValueSpecification } from './V1_PrimitiveValueSpecification.js';\nexport class V1_CStrictTime extends V1_PrimitiveValueSpecification {\n value;\n accept_ValueSpecificationVisitor(visitor) {\n return visitor.visit_CStrictTime(this);\n }\n}\n//# sourceMappingURL=V1_CStrictTime.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF 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_PrimitiveValueSpecification } from './V1_PrimitiveValueSpecification.js';\nexport class V1_CBoolean extends V1_PrimitiveValueSpecification {\n value;\n accept_ValueSpecificationVisitor(visitor) {\n return visitor.visit_CBoolean(this);\n }\n}\n//# sourceMappingURL=V1_CBoolean.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS 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_AggregateValue {\n mapFn;\n aggregateFn;\n}\n//# sourceMappingURL=V1_AggregateValue.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS 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_Pair {\n first;\n second;\n}\n//# sourceMappingURL=V1_Pair.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS 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_RuntimeInstance {\n runtime;\n}\n//# sourceMappingURL=V1_RuntimeInstance.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS 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_ExecutionContextInstance {\n executionContext;\n}\n//# sourceMappingURL=V1_ExecutionContextInstance.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF 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_GraphFetchTree, } from './V1_GraphFetchTree.js';\nimport { hashArray } from '@finos/legend-shared';\nimport { CORE_HASH_STRUCTURE } from '../../../../../../../../../graph/Core_HashUtils.js';\nexport class V1_PropertyGraphFetchTree extends V1_GraphFetchTree {\n property;\n parameters = [];\n alias;\n subType;\n accept_GraphFetchTreeVisitor(visitor) {\n return visitor.visit_PropertyGraphFetchTree(this);\n }\n get hashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.PROPERTY_GRAPH_FETCH_TREE,\n hashArray(this.subTrees),\n this.property,\n this.alias ?? '',\n this.subType ?? '',\n ]);\n }\n}\n//# sourceMappingURL=V1_PropertyGraphFetchTree.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF 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_GraphFetchTree, } from './V1_GraphFetchTree.js';\nimport { CORE_HASH_STRUCTURE } from '../../../../../../../../../graph/Core_HashUtils.js';\nimport { hashArray } from '@finos/legend-shared';\nexport class V1_SubTypeGraphFetchTree extends V1_GraphFetchTree {\n subTypeClass;\n accept_GraphFetchTreeVisitor(visitor) {\n return visitor.visit_SubTypeGraphFetchTree(this);\n }\n get hashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.SUBTYPE_GRAPH_FETCH_TREE,\n hashArray(this.subTrees),\n this.subTypeClass,\n ]);\n }\n}\n//# sourceMappingURL=V1_SubTypeGraphFetchTree.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS 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_SerializationConfig {\n includeType;\n typeKeyName;\n includeEnumType;\n removePropertiesWithNullValues;\n removePropertiesWithEmptySets;\n fullyQualifiedTypePath;\n includeObjectReference;\n}\n//# sourceMappingURL=V1_SerializationConfig.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF 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_CoreClassInstance } from './V1_CoreClassInstance.js';\nexport class V1_KeyExpression extends V1_CoreClassInstance {\n add;\n expression;\n key;\n accept_ValueSpecificationVisitor(visitor) {\n return visitor.visit_KeyExpression(this);\n }\n}\n//# sourceMappingURL=V1_KeyExpression.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS 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_PureList {\n values = [];\n}\n//# sourceMappingURL=V1_PureList.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS 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_TDSAggregateValue {\n name;\n pmapFn;\n aggregateFn;\n}\n//# sourceMappingURL=V1_TDSAggregateValue.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS 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_TDSColumnInformation {\n name;\n columnFn;\n}\n//# sourceMappingURL=V1_TDSColumnInformation.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS 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_TDSSortInformation {\n column;\n direction;\n}\n//# sourceMappingURL=V1_TDSSortInformation.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS 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_TDSOlapRank {\n function;\n}\n//# sourceMappingURL=V1_TDSOlapRank.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS 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_TDSOlapAggregation {\n function;\n columnName;\n}\n//# sourceMappingURL=V1_TDSOlapAggregation.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS 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_ColSpecArray {\n colSpecs = [];\n}\n//# sourceMappingURL=V1_ColSpecArray.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS 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_ColSpec {\n name;\n type;\n function1;\n function2;\n}\n//# sourceMappingURL=V1_ColSpec.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS 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_RelationStoreAccessor {\n path = [];\n}\n//# sourceMappingURL=V1_RelationStoreAccessor.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF 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 { primitive, createModelSchema, optional } from 'serializr';\nimport { SerializationFactory, optionalCustomUsingModelSchema, } 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 class V1_INTERNAL__PackageableElementWithSourceInformation {\n package;\n name;\n sourceInformation;\n static serialization = new SerializationFactory(createModelSchema(V1_INTERNAL__PackageableElementWithSourceInformation, {\n package: primitive(),\n name: primitive(),\n sourceInformation: optionalCustomUsingModelSchema(V1_sourceInformationSerialization.schema),\n }));\n}\nexport const V1_packageableElementPointerModelSchema = createModelSchema(V1_PackageableElementPointer, {\n path: primitive(),\n type: optional(primitive()),\n});\nexport const V1_multiplicityModelSchema = 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 */\nexport class V1_PathElement {\n}\n//# sourceMappingURL=V1_PathElement.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF 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_PathElement } from './V1_PathElement.js';\nexport class V1_PropertyPathElement extends V1_PathElement {\n property;\n parameters = [];\n}\n//# sourceMappingURL=V1_PropertyPathElement.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF 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_AbstractAppliedFunction } from '../raw/V1_AbstractAppliedFunction.js';\nexport class V1_AppliedProperty extends V1_AbstractAppliedFunction {\n class;\n property;\n parameters = [];\n accept_ValueSpecificationVisitor(visitor) {\n return visitor.visit_AppliedProperty(this);\n }\n}\n//# sourceMappingURL=V1_AppliedProperty.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF 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_Runtime {\n}\nexport class V1_IdentifiedConnection {\n id;\n connection;\n get hashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.IDENTIFIED_CONNECTION,\n this.id,\n this.connection,\n ]);\n }\n}\nexport class V1_StoreConnections {\n store;\n storeConnections = [];\n get hashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.STORE_CONNECTIONS,\n this.store,\n hashArray(this.storeConnections),\n ]);\n }\n}\nexport class V1_ConnectionStores {\n connectionPointer;\n storePointers = [];\n get hashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.STORE_CONNECTIONS,\n this.connectionPointer,\n hashArray(this.storePointers),\n ]);\n }\n}\nexport class V1_EngineRuntime extends V1_Runtime {\n mappings = [];\n connectionStores = [];\n connections = [];\n get hashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.ENGINE_RUNTIME,\n hashArray(this.mappings),\n hashArray(this.connectionStores),\n hashArray(this.connections),\n ]);\n }\n}\nexport class V1_SingleConnectionEngineRuntime extends V1_EngineRuntime {\n get hashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.SINGLE_ENGINE_RUNTIME,\n hashArray(this.mappings),\n hashArray(this.connectionStores),\n hashArray(this.connections),\n ]);\n }\n}\nexport class V1_LegacyRuntime extends V1_Runtime {\n mappings = [];\n connections = [];\n get hashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.LEGACY_RUNTIME,\n hashArray(this.mappings),\n hashArray(this.connections),\n ]);\n }\n}\nexport class V1_RuntimePointer extends V1_Runtime {\n runtime;\n get hashCode() {\n return hashArray([CORE_HASH_STRUCTURE.RUNTIME_POINTER, this.runtime]);\n }\n}\n//# sourceMappingURL=V1_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 */\nimport { createModelSchema, primitive, list, custom, serialize, deserialize, object, } from 'serializr';\nimport { usingConstantValueSchema, UnsupportedOperationError, usingModelSchema, } from '@finos/legend-shared';\nimport { V1_packageableElementPointerModelSchema } from '../../../transformation/pureProtocol/serializationHelpers/V1_CoreSerializationHelper.js';\nimport { V1_PackageableRuntime } from '../../../model/packageableElements/runtime/V1_PackageableRuntime.js';\nimport { V1_EngineRuntime, V1_IdentifiedConnection, V1_LegacyRuntime, V1_RuntimePointer, V1_StoreConnections, V1_ConnectionStores, V1_SingleConnectionEngineRuntime, } from '../../../model/packageableElements/runtime/V1_Runtime.js';\nimport { V1_serializeConnectionValue, V1_deserializeConnectionValue, V1_connectionPointerModelSchema, } from './V1_ConnectionSerializationHelper.js';\nexport const V1_PACKAGEABLE_RUNTIME_ELEMENT_PROTOCOL_TYPE = 'runtime';\nexport var V1_RuntimeType;\n(function (V1_RuntimeType) {\n V1_RuntimeType[\"RUNTIME_POINTER\"] = \"runtimePointer\";\n V1_RuntimeType[\"LEGACY_RUNTIME\"] = \"legacyRuntime\";\n V1_RuntimeType[\"ENGINE_RUNTIME\"] = \"engineRuntime\";\n V1_RuntimeType[\"SINGLE_ENGINE_RUNTIME\"] = \"localEngineRuntime\";\n})(V1_RuntimeType || (V1_RuntimeType = {}));\nexport const V1_runtimePointerModelSchema = createModelSchema(V1_RuntimePointer, {\n _type: usingConstantValueSchema(V1_RuntimeType.RUNTIME_POINTER),\n runtime: primitive(),\n});\nexport const V1_setupLegacyRuntimeSerialization = (plugins) => {\n createModelSchema(V1_LegacyRuntime, {\n _type: usingConstantValueSchema(V1_RuntimeType.LEGACY_RUNTIME),\n connections: list(custom((val) => V1_serializeConnectionValue(val, true, plugins), (val) => V1_deserializeConnectionValue(val, true, plugins))),\n mappings: list(usingModelSchema(V1_packageableElementPointerModelSchema)),\n });\n};\nexport const V1_setupEngineRuntimeSerialization = (plugins) => {\n createModelSchema(V1_IdentifiedConnection, {\n connection: custom((val) => V1_serializeConnectionValue(val, true, plugins), (val) => V1_deserializeConnectionValue(val, true, plugins)),\n id: primitive(),\n });\n createModelSchema(V1_ConnectionStores, {\n connectionPointer: usingModelSchema(V1_connectionPointerModelSchema),\n storePointers: list(usingModelSchema(V1_packageableElementPointerModelSchema)),\n });\n createModelSchema(V1_StoreConnections, {\n store: usingModelSchema(V1_packageableElementPointerModelSchema),\n storeConnections: list(object(V1_IdentifiedConnection)),\n });\n createModelSchema(V1_EngineRuntime, {\n _type: usingConstantValueSchema(V1_RuntimeType.ENGINE_RUNTIME),\n connectionStores: list(object(V1_ConnectionStores)),\n connections: list(object(V1_StoreConnections)),\n mappings: list(usingModelSchema(V1_packageableElementPointerModelSchema)),\n });\n createModelSchema(V1_SingleConnectionEngineRuntime, {\n _type: usingConstantValueSchema(V1_RuntimeType.SINGLE_ENGINE_RUNTIME),\n connectionStores: list(object(V1_ConnectionStores)),\n connections: list(object(V1_StoreConnections)),\n mappings: list(usingModelSchema(V1_packageableElementPointerModelSchema)),\n });\n};\nexport const V1_serializeRuntime = (protocol) => {\n if (protocol instanceof V1_EngineRuntime) {\n return serialize(V1_EngineRuntime, protocol);\n }\n else if (protocol instanceof V1_RuntimePointer) {\n return serialize(V1_runtimePointerModelSchema, protocol);\n }\n // NOTE: we don't want to serialize legacy runtime as we no longer want to circulate it any further\n throw new UnsupportedOperationError(`Can't serialize runtime`, protocol);\n};\nexport const V1_deserializeRuntime = (json) => {\n switch (json._type) {\n case V1_RuntimeType.RUNTIME_POINTER:\n return deserialize(V1_runtimePointerModelSchema, json);\n case V1_RuntimeType.ENGINE_RUNTIME:\n return deserialize(V1_EngineRuntime, json);\n case V1_RuntimeType.LEGACY_RUNTIME:\n case undefined:\n return deserialize(V1_LegacyRuntime, json);\n default:\n throw new UnsupportedOperationError(`Can't deeserialize runtime of type '${json._type}'`);\n }\n};\nexport const V1_serializeRuntimeValue = (protocol) => {\n if (protocol instanceof V1_SingleConnectionEngineRuntime) {\n return serialize(V1_SingleConnectionEngineRuntime, protocol);\n }\n return serialize(V1_EngineRuntime, protocol);\n};\nexport const V1_deserializeRuntimeValue = (json) => {\n if (json._type === V1_RuntimeType.SINGLE_ENGINE_RUNTIME) {\n return deserialize(V1_SingleConnectionEngineRuntime, json);\n }\n return deserialize(V1_EngineRuntime, json);\n};\nexport const V1_packageableRuntimeModelSchema = createModelSchema(V1_PackageableRuntime, {\n _type: usingConstantValueSchema(V1_PACKAGEABLE_RUNTIME_ELEMENT_PROTOCOL_TYPE),\n name: primitive(),\n package: primitive(),\n runtimeValue: custom((val) => V1_serializeRuntimeValue(val), (val) => V1_deserializeRuntimeValue(val)),\n});\n//# sourceMappingURL=V1_RuntimeSerializationHelper.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF 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_PackageableRuntime extends V1_PackageableElement {\n runtimeValue;\n get hashCode() {\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=V1_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 */\nexport class V1_ExecutionContext {\n queryTimeOutInSeconds;\n enableConstraints;\n}\n//# sourceMappingURL=V1_ExecutionContext.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF 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_ExecutionContext } from './V1_ExecutionContext.js';\nexport class V1_AnalyticsExecutionContext extends V1_ExecutionContext {\n useAnalytics;\n toFlowSetFunction;\n}\n//# sourceMappingURL=V1_AnalyticsExecutionContext.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF 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_ExecutionContext } from './V1_ExecutionContext.js';\nexport class V1_BaseExecutionContext extends V1_ExecutionContext {\n}\n//# sourceMappingURL=V1_BaseExecutionContext.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF 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_ValueSpecification, } from '../../../model/valueSpecification/V1_ValueSpecification.js';\nimport { V1_Multiplicity } from '../../packageableElements/domain/V1_Multiplicity.js';\nexport class V1_PackageableElementPtr extends V1_ValueSpecification {\n multiplicity = V1_Multiplicity.ONE;\n fullPath;\n accept_ValueSpecificationVisitor(visitor) {\n return visitor.visit_PackageableElementPtr(this);\n }\n}\n//# sourceMappingURL=V1_PackageableElementPtr.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF 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_PackageableElementPtr } from './V1_PackageableElementPtr.js';\nexport class V1_GenericTypeInstance extends V1_PackageableElementPtr {\n accept_ValueSpecificationVisitor(visitor) {\n return visitor.visit_GenericTypeInstance(this);\n }\n}\n//# sourceMappingURL=V1_GenericTypeInstance.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF 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 '../../packageableElements/domain/V1_Multiplicity.js';\nimport { V1_ValueSpecification, } from '../V1_ValueSpecification.js';\n/**\n * This is the mechanism by which we scale the system. Pretty much any constructs like\n * graph-fetch, path, etc, which have the need to store some data and manifest in value\n * specification space can be wrapped in form of a class instance. Here, we also keep\n * track of the type in order to interpret the value for processing.\n */\nexport class V1_ClassInstance extends V1_ValueSpecification {\n multiplicity = V1_Multiplicity.ONE;\n type;\n value;\n accept_ValueSpecificationVisitor(visitor) {\n return visitor.visit_ClassInstance(this);\n }\n}\n//# sourceMappingURL=V1_ClassInstance.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF 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, serialize, SKIP, list, custom, deserialize, optional, } from 'serializr';\nimport { usingConstantValueSchema, UnsupportedOperationError, usingModelSchema, guaranteeIsString, isString, isPlainObject, } from '@finos/legend-shared';\nimport { V1_Variable } from '../../../model/valueSpecification/V1_Variable.js';\nimport { V1_RootGraphFetchTree } from '../../../model/valueSpecification/raw/classInstance/graph/V1_RootGraphFetchTree.js';\nimport { V1_Lambda } from '../../../model/valueSpecification/raw/V1_Lambda.js';\nimport { V1_EnumValue } from '../../../model/valueSpecification/raw/V1_EnumValue.js';\nimport { V1_Path } from '../../../model/valueSpecification/raw/classInstance/path/V1_Path.js';\nimport { V1_AppliedFunction } from '../../../model/valueSpecification/application/V1_AppliedFunction.js';\nimport { V1_Collection } from '../../../model/valueSpecification/raw/V1_Collection.js';\nimport { V1_CDecimal } from '../../../model/valueSpecification/raw/V1_CDecimal.js';\nimport { V1_CInteger } from '../../../model/valueSpecification/raw/V1_CInteger.js';\nimport { V1_CString } from '../../../model/valueSpecification/raw/V1_CString.js';\nimport { V1_CFloat } from '../../../model/valueSpecification/raw/V1_CFloat.js';\nimport { V1_CDateTime } from '../../../model/valueSpecification/raw/V1_CDateTime.js';\nimport { V1_CStrictDate } from '../../../model/valueSpecification/raw/V1_CStrictDate.js';\nimport { V1_CStrictTime } from '../../../model/valueSpecification/raw/V1_CStrictTime.js';\nimport { V1_CLatestDate } from '../../../model/valueSpecification/raw/V1_CLatestDate.js';\nimport { V1_CBoolean } from '../../../model/valueSpecification/raw/V1_CBoolean.js';\nimport { V1_AggregateValue } from '../../../model/valueSpecification/raw/classInstance/V1_AggregateValue.js';\nimport { V1_Pair } from '../../../model/valueSpecification/raw/classInstance/V1_Pair.js';\nimport { V1_RuntimeInstance } from '../../../model/valueSpecification/raw/classInstance/V1_RuntimeInstance.js';\nimport { V1_ExecutionContextInstance } from '../../../model/valueSpecification/raw/classInstance/V1_ExecutionContextInstance.js';\nimport { V1_PropertyGraphFetchTree } from '../../../model/valueSpecification/raw/classInstance/graph/V1_PropertyGraphFetchTree.js';\nimport { V1_SubTypeGraphFetchTree } from '../../../model/valueSpecification/raw/classInstance/graph/V1_SubTypeGraphFetchTree.js';\nimport { V1_SerializationConfig } from '../../../model/valueSpecification/raw/classInstance/V1_SerializationConfig.js';\nimport { V1_KeyExpression } from '../../../model/valueSpecification/raw/V1_KeyExpression.js';\nimport { V1_PureList } from '../../../model/valueSpecification/raw/classInstance/V1_PureList.js';\nimport { V1_TDSAggregateValue } from '../../../model/valueSpecification/raw/classInstance/V1_TDSAggregateValue.js';\nimport { V1_TDSColumnInformation } from '../../../model/valueSpecification/raw/classInstance/V1_TDSColumnInformation.js';\nimport { V1_TDSSortInformation } from '../../../model/valueSpecification/raw/classInstance/V1_TDSSortInformation.js';\nimport { V1_TDSOlapRank } from '../../../model/valueSpecification/raw/classInstance/V1_TDSOlapRank.js';\nimport { V1_TDSOlapAggregation } from '../../../model/valueSpecification/raw/classInstance/V1_TDSOlapAggregation.js';\nimport { V1_ColSpecArray } from '../../../model/valueSpecification/raw/classInstance/relation/V1_ColSpecArray.js';\nimport { V1_ColSpec } from '../../../model/valueSpecification/raw/classInstance/relation/V1_ColSpec.js';\nimport { V1_RelationStoreAccessor } from '../../../model/valueSpecification/raw/classInstance/relation/V1_RelationStoreAccessor.js';\nimport { V1_multiplicityModelSchema } from './V1_CoreSerializationHelper.js';\nimport { V1_PropertyPathElement } from '../../../model/valueSpecification/raw/classInstance/path/V1_PropertyPathElement.js';\nimport { V1_AppliedProperty } from '../../../model/valueSpecification/application/V1_AppliedProperty.js';\nimport { V1_serializeRuntime } from './V1_RuntimeSerializationHelper.js';\nimport { V1_AnalyticsExecutionContext } from '../../../model/valueSpecification/raw/executionContext/V1_AnalyticsExecutionContext.js';\nimport { V1_BaseExecutionContext } from '../../../model/valueSpecification/raw/executionContext/V1_BaseExecutionContext.js';\nimport { V1_PackageableElementPtr } from '../../../model/valueSpecification/raw/V1_PackageableElementPtr.js';\nimport { V1_EngineRuntime } from '../../../model/packageableElements/runtime/V1_Runtime.js';\nimport { V1_GenericTypeInstance } from '../../../model/valueSpecification/raw/V1_GenericTypeInstance.js';\nimport { V1_Multiplicity } from '../../../model/packageableElements/domain/V1_Multiplicity.js';\nimport { V1_ClassInstance } from '../../../model/valueSpecification/raw/V1_ClassInstance.js';\nimport { V1_CByteArray } from '../../../model/valueSpecification/raw/V1_CByteArray.js';\nvar V1_ExecutionContextType;\n(function (V1_ExecutionContextType) {\n V1_ExecutionContextType[\"BASE_EXECUTION_CONTEXT\"] = \"BaseExecutionContext\";\n V1_ExecutionContextType[\"ANALYTICS_EXECUTION_CONTEXT\"] = \"AnalyticsExecutionContext\";\n})(V1_ExecutionContextType || (V1_ExecutionContextType = {}));\nvar V1_PathElementType;\n(function (V1_PathElementType) {\n V1_PathElementType[\"PROPERTY_PATH_ELEMENT\"] = \"propertyPath\";\n})(V1_PathElementType || (V1_PathElementType = {}));\nexport var V1_GraphFetchTreeType;\n(function (V1_GraphFetchTreeType) {\n V1_GraphFetchTreeType[\"PROPERTY_GRAPH_FETCH_TREE\"] = \"propertyGraphFetchTree\";\n})(V1_GraphFetchTreeType || (V1_GraphFetchTreeType = {}));\nexport var V1_ClassInstanceType;\n(function (V1_ClassInstanceType) {\n V1_ClassInstanceType[\"ROOT_GRAPH_FETCH_TREE\"] = \"rootGraphFetchTree\";\n V1_ClassInstanceType[\"SUBTYPE_GRAPH_FETCH_TREE\"] = \"subTypeGraphFetchTree\";\n V1_ClassInstanceType[\"PATH\"] = \"path\";\n V1_ClassInstanceType[\"AGGREGATE_VALUE\"] = \"aggregateValue\";\n V1_ClassInstanceType[\"EXECUTION_CONTEXT_INSTANCE\"] = \"executionContextInstance\";\n V1_ClassInstanceType[\"PAIR\"] = \"pair\";\n V1_ClassInstanceType[\"PURE_LIST\"] = \"listInstance\";\n V1_ClassInstanceType[\"RUNTIME_INSTANCE\"] = \"runtimeInstance\";\n V1_ClassInstanceType[\"SERIALIZATION_CONFIG\"] = \"alloySerializationConfig\";\n V1_ClassInstanceType[\"COL_SPEC\"] = \"colSpec\";\n V1_ClassInstanceType[\"COL_SPEC_ARRAY\"] = \"colSpecArray\";\n V1_ClassInstanceType[\"RELATION_STORE_ACCESSOR\"] = \">\";\n V1_ClassInstanceType[\"TDS_AGGREGATE_VALUE\"] = \"tdsAggregateValue\";\n V1_ClassInstanceType[\"TDS_COLUMN_INFORMATION\"] = \"tdsColumnInformation\";\n V1_ClassInstanceType[\"TDS_SORT_INFORMATION\"] = \"tdsSortInformation\";\n V1_ClassInstanceType[\"TDS_OLAP_RANK\"] = \"tdsOlapRank\";\n V1_ClassInstanceType[\"TDS_OLAP_AGGREGATION\"] = \"tdsOlapAggregation\";\n})(V1_ClassInstanceType || (V1_ClassInstanceType = {}));\nvar V1_ValueSpecificationType;\n(function (V1_ValueSpecificationType) {\n V1_ValueSpecificationType[\"VARIABLE\"] = \"var\";\n V1_ValueSpecificationType[\"LAMBDA\"] = \"lambda\";\n V1_ValueSpecificationType[\"KEY_EXPRESSION\"] = \"keyExpression\";\n V1_ValueSpecificationType[\"APPLIED_FUNCTION\"] = \"func\";\n V1_ValueSpecificationType[\"APPLIED_PROPERTY\"] = \"property\";\n V1_ValueSpecificationType[\"PACKAGEABLE_ELEMENT_PTR\"] = \"packageableElementPtr\";\n V1_ValueSpecificationType[\"GENERIC_TYPE_INSTANCE\"] = \"genericTypeInstance\";\n V1_ValueSpecificationType[\"ENUM_VALUE\"] = \"enumValue\";\n V1_ValueSpecificationType[\"COLLECTION\"] = \"collection\";\n V1_ValueSpecificationType[\"CINTEGER\"] = \"integer\";\n V1_ValueSpecificationType[\"CDECIMAL\"] = \"decimal\";\n V1_ValueSpecificationType[\"CSTRING\"] = \"string\";\n V1_ValueSpecificationType[\"CBOOLEAN\"] = \"boolean\";\n V1_ValueSpecificationType[\"CBYTEARRAY\"] = \"byteArray\";\n V1_ValueSpecificationType[\"CFLOAT\"] = \"float\";\n V1_ValueSpecificationType[\"CDATETIME\"] = \"dateTime\";\n V1_ValueSpecificationType[\"CSTRICTDATE\"] = \"strictDate\";\n V1_ValueSpecificationType[\"CSTRICTTIME\"] = \"strictTime\";\n V1_ValueSpecificationType[\"CLATESTDATE\"] = \"latestDate\";\n V1_ValueSpecificationType[\"CLASS_INSTANCE\"] = \"classInstance\";\n // ------------------------------ DEPRECATED ----------------------------------\n V1_ValueSpecificationType[\"HACKED_CLASS\"] = \"hackedClass\";\n V1_ValueSpecificationType[\"HACKED_UNIT\"] = \"hackedUnit\";\n V1_ValueSpecificationType[\"UNIT_TYPE\"] = \"unitType\";\n V1_ValueSpecificationType[\"PRIMITIVE_TYPE\"] = \"primitiveType\";\n V1_ValueSpecificationType[\"CLASS\"] = \"class\";\n V1_ValueSpecificationType[\"ENUM\"] = \"enum\";\n V1_ValueSpecificationType[\"MAPPING_INSTANCE\"] = \"mappingInstance\";\n})(V1_ValueSpecificationType || (V1_ValueSpecificationType = {}));\n// ---------------------------------------- Value Specification --------------------------------------\nexport const V1_variableModelSchema = createModelSchema(V1_Variable, {\n _type: usingConstantValueSchema(V1_ValueSpecificationType.VARIABLE),\n class: optional(primitive()),\n multiplicity: usingModelSchema(V1_multiplicityModelSchema),\n name: primitive(),\n});\nexport const V1_lambdaModelSchema = (plugins) => createModelSchema(V1_Lambda, {\n _type: usingConstantValueSchema(V1_ValueSpecificationType.LAMBDA),\n body: list(custom((val) => V1_serializeValueSpecification(val, plugins), (val) => V1_deserializeValueSpecification(val, plugins))),\n parameters: list(usingModelSchema(V1_variableModelSchema)),\n});\nconst keyExpressionModelSchema = (plugins) => createModelSchema(V1_KeyExpression, {\n _type: usingConstantValueSchema(V1_ValueSpecificationType.KEY_EXPRESSION),\n add: optional(primitive()),\n expression: custom((val) => V1_serializeValueSpecification(val, plugins), (val) => V1_deserializeValueSpecification(val, plugins)),\n key: custom((val) => V1_serializeValueSpecification(val, plugins), (val) => V1_deserializeValueSpecification(val, plugins)),\n});\nconst appliedFunctionModelSchema = (plugins) => createModelSchema(V1_AppliedFunction, {\n _type: usingConstantValueSchema(V1_ValueSpecificationType.APPLIED_FUNCTION),\n function: primitive(),\n parameters: list(custom((val) => V1_serializeValueSpecification(val, plugins), (val) => V1_deserializeValueSpecification(val, plugins))),\n});\nconst appliedPropertyModelSchema = (plugins) => createModelSchema(V1_AppliedProperty, {\n _type: usingConstantValueSchema(V1_ValueSpecificationType.APPLIED_PROPERTY),\n class: optional(primitive()),\n parameters: list(custom((val) => V1_serializeValueSpecification(val, plugins), (val) => V1_deserializeValueSpecification(val, plugins))),\n property: primitive(),\n});\nconst packageableElementPtrSchema = createModelSchema(V1_PackageableElementPtr, {\n _type: usingConstantValueSchema(V1_ValueSpecificationType.PACKAGEABLE_ELEMENT_PTR),\n fullPath: primitive(),\n});\nconst genericTypeInstanceSchema = createModelSchema(V1_GenericTypeInstance, {\n _type: usingConstantValueSchema(V1_ValueSpecificationType.GENERIC_TYPE_INSTANCE),\n fullPath: primitive(),\n});\n/**\n * @backwardCompatibility\n */\nconst deserializeHackedUnit = (json) => {\n const protocol = new V1_GenericTypeInstance();\n if (isString(json.unitType)) {\n protocol.fullPath = json.unitType;\n }\n else {\n protocol.fullPath = guaranteeIsString(json.fullPath, `Can't deserialize hacked unit: either field 'fullPath' or 'unitType' must be a non-empty string`);\n }\n return protocol;\n};\n/**\n * @backwardCompatibility\n */\nconst deserializeHackedClass = (json) => {\n const protocol = new V1_GenericTypeInstance();\n protocol.fullPath = guaranteeIsString(json.fullPath, `Can't deserialize hacked class: field 'fullPath' must be a non-empty string`);\n return protocol;\n};\nconst collectionModelSchema = (plugins) => createModelSchema(V1_Collection, {\n _type: usingConstantValueSchema(V1_ValueSpecificationType.COLLECTION),\n multiplicity: usingModelSchema(V1_multiplicityModelSchema),\n values: list(custom((val) => V1_serializeValueSpecification(val, plugins), (val) => V1_deserializeValueSpecification(val, plugins))),\n});\nconst enumValueModelSchema = createModelSchema(V1_EnumValue, {\n _type: usingConstantValueSchema(V1_ValueSpecificationType.ENUM_VALUE),\n fullPath: primitive(),\n value: primitive(),\n});\nconst CDecimalModelSchema = createModelSchema(V1_CDecimal, {\n _type: usingConstantValueSchema(V1_ValueSpecificationType.CDECIMAL),\n value: primitive(),\n});\nconst CIntegerModelSchema = createModelSchema(V1_CInteger, {\n _type: usingConstantValueSchema(V1_ValueSpecificationType.CINTEGER),\n value: primitive(),\n});\nconst CStringModelSchema = createModelSchema(V1_CString, {\n _type: usingConstantValueSchema(V1_ValueSpecificationType.CSTRING),\n value: primitive(),\n});\nconst CFloatModelSchema = createModelSchema(V1_CFloat, {\n _type: usingConstantValueSchema(V1_ValueSpecificationType.CFLOAT),\n value: primitive(),\n});\nconst CDateTimeModelSchema = createModelSchema(V1_CDateTime, {\n _type: usingConstantValueSchema(V1_ValueSpecificationType.CDATETIME),\n value: primitive(),\n});\nconst CStrictTimeModelSchema = createModelSchema(V1_CStrictTime, {\n _type: usingConstantValueSchema(V1_ValueSpecificationType.CSTRICTTIME),\n value: primitive(),\n});\nconst CStrictDateModelSchema = createModelSchema(V1_CStrictDate, {\n _type: usingConstantValueSchema(V1_ValueSpecificationType.CSTRICTDATE),\n value: primitive(),\n});\nconst CLatestDateModelSchema = createModelSchema(V1_CLatestDate, {\n _type: usingConstantValueSchema(V1_ValueSpecificationType.CLATESTDATE),\n});\nconst CBooleanModelSchema = createModelSchema(V1_CBoolean, {\n _type: usingConstantValueSchema(V1_ValueSpecificationType.CBOOLEAN),\n value: primitive(),\n});\nconst CByteArrayModelSchema = createModelSchema(V1_CByteArray, {\n _type: usingConstantValueSchema(V1_ValueSpecificationType.CBYTEARRAY),\n value: primitive(),\n});\n/**\n * @backwardCompatibility\n */\nconst deserializePrimitiveValueSpecification = (json, plugins, deserializer) => {\n if (Array.isArray(json.values)) {\n if (json.values.length === 0) {\n const collection = new V1_Collection();\n collection.multiplicity = V1_Multiplicity.ZERO;\n return collection;\n }\n else if (json.values.length === 1) {\n return deserializer({\n ...json,\n value: json.values[0],\n });\n }\n else {\n return V1_deserializeValueSpecification({\n ...json,\n _type: V1_ValueSpecificationType.COLLECTION,\n }, plugins);\n }\n }\n return deserializer(json);\n};\n// ---------------------------------------- Class Instance --------------------------------------\nconst classInstanceModelSchema = (plugins) => createModelSchema(V1_ClassInstance, {\n _type: usingConstantValueSchema(V1_ValueSpecificationType.CLASS_INSTANCE),\n multiplicity: usingModelSchema(V1_multiplicityModelSchema),\n type: primitive(),\n value: custom((val) => V1_serializeClassInstanceValue(val, plugins), (val, context) => V1_deserializeClassInstanceValue(val, context.json.type, plugins)),\n});\n// path\nconst propertyPathElementModelSchema = (plugins) => createModelSchema(V1_PropertyPathElement, {\n _type: usingConstantValueSchema(V1_PathElementType.PROPERTY_PATH_ELEMENT),\n property: primitive(),\n parameters: list(custom((val) => V1_serializeValueSpecification(val, plugins), (val) => V1_deserializeValueSpecification(val, plugins))),\n});\nfunction V1_serializePathElement(protocol, plugins) {\n if (protocol instanceof V1_PropertyPathElement) {\n return serialize(propertyPathElementModelSchema(plugins), protocol);\n }\n return SKIP;\n}\nfunction V1_deserializePathElement(json, plugins) {\n switch (json._type) {\n case V1_PathElementType.PROPERTY_PATH_ELEMENT:\n return deserialize(propertyPathElementModelSchema(plugins), json);\n default:\n return SKIP;\n }\n}\nconst pathModelSchema = (plugins) => createModelSchema(V1_Path, {\n _type: usingConstantValueSchema(V1_ClassInstanceType.PATH),\n name: primitive(),\n startType: primitive(),\n path: list(custom((val) => V1_serializePathElement(val, plugins), (val) => V1_deserializePathElement(val, plugins))),\n});\n// graph fetch tree\nconst rootGraphFetchTreeModelSchema = (plugins) => createModelSchema(V1_RootGraphFetchTree, {\n _type: usingConstantValueSchema(V1_ClassInstanceType.ROOT_GRAPH_FETCH_TREE),\n class: primitive(),\n subTrees: list(custom((val) => V1_serializeGraphFetchTree(val, plugins), (val) => V1_deserializeGraphFetchTree(val, plugins))),\n subTypeTrees: list(custom((val) => V1_serializeGraphFetchTree(val, plugins), (val) => V1_deserializeGraphFetchTree(val, plugins))),\n});\nconst propertyGraphFetchTreeModelSchema = (plugins) => createModelSchema(V1_PropertyGraphFetchTree, {\n _type: usingConstantValueSchema(V1_GraphFetchTreeType.PROPERTY_GRAPH_FETCH_TREE),\n alias: optional(primitive()),\n parameters: list(custom((val) => V1_serializeValueSpecification(val, plugins), (val) => V1_deserializeValueSpecification(val, plugins))),\n property: primitive(),\n subTrees: list(custom((val) => V1_serializeGraphFetchTree(val, plugins), (val) => V1_deserializeGraphFetchTree(val, plugins))),\n subTypeTrees: list(custom((val) => V1_serializeGraphFetchTree(val, plugins), (val) => V1_deserializeGraphFetchTree(val, plugins))),\n subType: optional(primitive()),\n});\nconst subTypeGraphFetchTreeModelSchema = (plugins) => createModelSchema(V1_SubTypeGraphFetchTree, {\n _type: usingConstantValueSchema(V1_ClassInstanceType.SUBTYPE_GRAPH_FETCH_TREE),\n subTrees: list(custom((val) => V1_serializeGraphFetchTree(val, plugins), (val) => V1_deserializeGraphFetchTree(val, plugins))),\n subTypeClass: primitive(),\n});\nexport function V1_serializeGraphFetchTree(protocol, plugins) {\n if (protocol instanceof V1_PropertyGraphFetchTree) {\n return serialize(propertyGraphFetchTreeModelSchema(plugins), protocol);\n }\n else if (protocol instanceof V1_RootGraphFetchTree) {\n return serialize(rootGraphFetchTreeModelSchema(plugins), protocol);\n }\n else if (protocol instanceof V1_SubTypeGraphFetchTree) {\n return serialize(subTypeGraphFetchTreeModelSchema(plugins), protocol);\n }\n throw new UnsupportedOperationError(`Can't serialize graph fetch tree`, protocol);\n}\nexport function V1_deserializeGraphFetchTree(json, plugins) {\n switch (json._type) {\n case V1_GraphFetchTreeType.PROPERTY_GRAPH_FETCH_TREE:\n return deserialize(propertyGraphFetchTreeModelSchema(plugins), json);\n case V1_ClassInstanceType.ROOT_GRAPH_FETCH_TREE:\n return deserialize(rootGraphFetchTreeModelSchema(plugins), json);\n case V1_ClassInstanceType.SUBTYPE_GRAPH_FETCH_TREE:\n return deserialize(subTypeGraphFetchTreeModelSchema(plugins), json);\n default:\n throw new UnsupportedOperationError(`Can't deserialize graph fetch tree node of type '${json._type}'`);\n }\n}\n// execution context\nconst analyticsExecutionContextModelSchema = (plugins) => createModelSchema(V1_AnalyticsExecutionContext, {\n _type: usingConstantValueSchema(V1_ExecutionContextType.ANALYTICS_EXECUTION_CONTEXT),\n enableConstraints: optional(primitive()),\n queryTimeOutInSeconds: optional(primitive()),\n toFlowSetFunction: usingModelSchema(V1_lambdaModelSchema(plugins)),\n useAnalytics: primitive(),\n});\nconst baseExecutionContextModelSchema = createModelSchema(V1_BaseExecutionContext, {\n _type: usingConstantValueSchema(V1_ExecutionContextType.BASE_EXECUTION_CONTEXT),\n enableConstraints: optional(primitive()),\n queryTimeOutInSeconds: optional(primitive()),\n});\nfunction V1_serializeExecutionContext(protocol, plugins) {\n if (protocol instanceof V1_AnalyticsExecutionContext) {\n return serialize(analyticsExecutionContextModelSchema(plugins), protocol);\n }\n else if (protocol instanceof V1_BaseExecutionContext) {\n return serialize(baseExecutionContextModelSchema, protocol);\n }\n return SKIP;\n}\nfunction V1_deserializeExecutionContext(json, plugins) {\n switch (json._type) {\n case V1_ExecutionContextType.ANALYTICS_EXECUTION_CONTEXT:\n return deserialize(analyticsExecutionContextModelSchema(plugins), json);\n case V1_ExecutionContextType.BASE_EXECUTION_CONTEXT:\n return deserialize(baseExecutionContextModelSchema, json);\n default:\n return SKIP;\n }\n}\nconst executionContextInstanceModelSchema = (plugins) => createModelSchema(V1_ExecutionContextInstance, {\n _type: usingConstantValueSchema(V1_ClassInstanceType.EXECUTION_CONTEXT_INSTANCE),\n executionContext: custom((val) => V1_serializeExecutionContext(val, plugins), (val) => V1_deserializeExecutionContext(val, plugins)),\n});\n// others\nconst aggregationValueModelSchema = (plugins) => createModelSchema(V1_AggregateValue, {\n _type: usingConstantValueSchema(V1_ClassInstanceType.AGGREGATE_VALUE),\n mapFn: usingModelSchema(V1_lambdaModelSchema(plugins)),\n aggregateFn: usingModelSchema(V1_lambdaModelSchema(plugins)),\n});\nconst pairModelSchema = (plugins) => createModelSchema(V1_Pair, {\n _type: usingConstantValueSchema(V1_ClassInstanceType.PAIR),\n first: custom((val) => V1_serializeValueSpecification(val, plugins), (val) => V1_deserializeValueSpecification(val, plugins)),\n second: custom((val) => V1_serializeValueSpecification(val, plugins), (val) => V1_deserializeValueSpecification(val, plugins)),\n});\nconst runtimeInstanceModelSchema = createModelSchema(V1_RuntimeInstance, {\n _type: usingConstantValueSchema(V1_ClassInstanceType.RUNTIME_INSTANCE),\n runtime: custom((val) => V1_serializeRuntime(val), (val) => deserialize(V1_EngineRuntime, val)),\n});\nconst pureListModelSchema = (plugins) => createModelSchema(V1_PureList, {\n _type: usingConstantValueSchema(V1_ClassInstanceType.PURE_LIST),\n values: list(custom((val) => V1_serializeValueSpecification(val, plugins), (val) => V1_deserializeValueSpecification(val, plugins))),\n});\nconst serializationConfigModelSchema = createModelSchema(V1_SerializationConfig, {\n _type: usingConstantValueSchema(V1_ClassInstanceType.SERIALIZATION_CONFIG),\n includeType: optional(primitive()),\n typeKeyName: primitive(),\n includeEnumTypee: optional(primitive()),\n removePropertiesWithNullValuese: optional(primitive()),\n removePropertiesWithEmptySetse: optional(primitive()),\n fullyQualifiedTypePathe: optional(primitive()),\n includeObjectReferencee: optional(primitive()),\n});\n// TDS\nconst tdsAggregrateValueModelSchema = (plugins) => createModelSchema(V1_TDSAggregateValue, {\n _type: usingConstantValueSchema(V1_ClassInstanceType.TDS_AGGREGATE_VALUE),\n name: primitive(),\n pmapFn: usingModelSchema(V1_lambdaModelSchema(plugins)),\n aggregateFn: usingModelSchema(V1_lambdaModelSchema(plugins)),\n});\nconst tdsColumnInformationModelSchema = (plugins) => createModelSchema(V1_TDSColumnInformation, {\n _type: usingConstantValueSchema(V1_ClassInstanceType.TDS_COLUMN_INFORMATION),\n name: primitive(),\n columnFn: usingModelSchema(V1_lambdaModelSchema(plugins)),\n});\nconst tdsSortInformationModelSchema = createModelSchema(V1_TDSSortInformation, {\n _type: usingConstantValueSchema(V1_ClassInstanceType.TDS_SORT_INFORMATION),\n column: primitive(),\n direction: primitive(),\n});\nconst relationStoreAccessorModelSchema = createModelSchema(V1_RelationStoreAccessor, {\n path: list(primitive()),\n});\nconst colSpecModelSchema = (plugins) => createModelSchema(V1_ColSpec, {\n function1: optional(usingModelSchema(V1_lambdaModelSchema(plugins))),\n function2: optional(usingModelSchema(V1_lambdaModelSchema(plugins))),\n name: primitive(),\n type: optional(primitive()),\n});\nconst colSpecArrayModelSchema = (plugins) => createModelSchema(V1_ColSpecArray, {\n colSpecs: list(usingModelSchema(colSpecModelSchema(plugins))),\n});\nconst tdsOlapRankModelSchema = (plugins) => createModelSchema(V1_TDSOlapRank, {\n _type: usingConstantValueSchema(V1_ClassInstanceType.TDS_OLAP_RANK),\n function: usingModelSchema(V1_lambdaModelSchema(plugins)),\n});\nconst tdsOlapAggregationModelSchema = (plugins) => createModelSchema(V1_TDSOlapAggregation, {\n _type: usingConstantValueSchema(V1_ClassInstanceType.TDS_OLAP_AGGREGATION),\n function: usingModelSchema(V1_lambdaModelSchema(plugins)),\n columnName: primitive(),\n});\nexport function V1_deserializeClassInstanceValue(json, type, plugins) {\n switch (type) {\n case V1_ClassInstanceType.PATH:\n return deserialize(pathModelSchema(plugins), json);\n case V1_ClassInstanceType.ROOT_GRAPH_FETCH_TREE:\n return deserialize(rootGraphFetchTreeModelSchema(plugins), json);\n case V1_ClassInstanceType.AGGREGATE_VALUE:\n return deserialize(aggregationValueModelSchema(plugins), json);\n case V1_ClassInstanceType.EXECUTION_CONTEXT_INSTANCE:\n return deserialize(executionContextInstanceModelSchema(plugins), json);\n case V1_ClassInstanceType.PAIR:\n return deserialize(pairModelSchema(plugins), json);\n case V1_ClassInstanceType.PURE_LIST:\n return deserialize(pureListModelSchema(plugins), json);\n case V1_ClassInstanceType.RUNTIME_INSTANCE:\n return deserialize(runtimeInstanceModelSchema, json);\n case V1_ClassInstanceType.SERIALIZATION_CONFIG:\n return deserialize(serializationConfigModelSchema, json);\n case V1_ClassInstanceType.TDS_AGGREGATE_VALUE:\n return deserialize(tdsAggregrateValueModelSchema(plugins), json);\n case V1_ClassInstanceType.TDS_COLUMN_INFORMATION:\n return deserialize(tdsColumnInformationModelSchema(plugins), json);\n case V1_ClassInstanceType.TDS_OLAP_AGGREGATION:\n return deserialize(tdsOlapAggregationModelSchema(plugins), json);\n case V1_ClassInstanceType.TDS_OLAP_RANK:\n return deserialize(tdsOlapRankModelSchema(plugins), json);\n case V1_ClassInstanceType.TDS_SORT_INFORMATION:\n return deserialize(tdsSortInformationModelSchema, json);\n case V1_ClassInstanceType.COL_SPEC:\n return deserialize(colSpecModelSchema(plugins), json);\n case V1_ClassInstanceType.COL_SPEC_ARRAY:\n return deserialize(colSpecArrayModelSchema(plugins), json);\n case V1_ClassInstanceType.RELATION_STORE_ACCESSOR:\n return deserialize(relationStoreAccessorModelSchema, json);\n default: {\n const deserializers = plugins.flatMap((plugin) => plugin.V1_getExtraClassInstanceValueProtocolDeserializers?.() ?? []);\n for (const deserializer of deserializers) {\n const protocol = deserializer(json, type, plugins);\n if (protocol) {\n return protocol;\n }\n }\n throw new UnsupportedOperationError(`Can't deserialize value specification of type '${json._type}': no compatible deserializer available from plugins`);\n }\n }\n}\nexport function V1_serializeClassInstanceValue(protocol, plugins) {\n if (protocol instanceof V1_Path) {\n return serialize(pathModelSchema(plugins), protocol);\n }\n else if (protocol instanceof V1_RootGraphFetchTree) {\n return serialize(rootGraphFetchTreeModelSchema(plugins), protocol);\n }\n else if (protocol instanceof V1_ExecutionContextInstance) {\n return serialize(executionContextInstanceModelSchema(plugins), protocol);\n }\n else if (protocol instanceof V1_AggregateValue) {\n return serialize(aggregationValueModelSchema(plugins), protocol);\n }\n else if (protocol instanceof V1_Pair) {\n return serialize(pairModelSchema(plugins), protocol);\n }\n else if (protocol instanceof V1_PureList) {\n return serialize(pureListModelSchema(plugins), protocol);\n }\n else if (protocol instanceof V1_RuntimeInstance) {\n return serialize(runtimeInstanceModelSchema, protocol);\n }\n else if (protocol instanceof V1_SerializationConfig) {\n return serialize(serializationConfigModelSchema, protocol);\n }\n else if (protocol instanceof V1_TDSAggregateValue) {\n return serialize(tdsAggregrateValueModelSchema(plugins), protocol);\n }\n else if (protocol instanceof V1_TDSColumnInformation) {\n return serialize(tdsColumnInformationModelSchema(plugins), protocol);\n }\n else if (protocol instanceof V1_TDSOlapAggregation) {\n return serialize(tdsOlapAggregationModelSchema(plugins), protocol);\n }\n else if (protocol instanceof V1_TDSOlapRank) {\n return serialize(tdsOlapRankModelSchema(plugins), protocol);\n }\n else if (protocol instanceof V1_TDSSortInformation) {\n return serialize(tdsSortInformationModelSchema, protocol);\n }\n else if (protocol instanceof V1_ColSpec) {\n return serialize(colSpecModelSchema(plugins), protocol);\n }\n else if (protocol instanceof V1_ColSpecArray) {\n return serialize(colSpecArrayModelSchema(plugins), protocol);\n }\n else if (protocol instanceof V1_RelationStoreAccessor) {\n return serialize(relationStoreAccessorModelSchema, protocol);\n }\n const serializers = plugins.flatMap((plugin) => plugin.V1_getExtraClassInstanceValueProtocolSerializers?.() ?? []);\n for (const serializer of serializers) {\n const json = serializer(protocol, plugins);\n if (json) {\n return json;\n }\n }\n throw new UnsupportedOperationError(`Can't serialize class instance value: no compatible serializer available from plugins`, protocol);\n}\n// ---------------------------------------- Serialization Methods --------------------------------------\nclass V1_ValueSpecificationSerializer {\n plugins = [];\n constructor(plugins) {\n this.plugins = plugins;\n }\n visit_INTERNAL__UnknownValueSpecfication(valueSpecification) {\n return valueSpecification.content;\n }\n visit_Variable(valueSpecification) {\n return serialize(V1_variableModelSchema, valueSpecification);\n }\n visit_Lambda(valueSpecification) {\n return serialize(V1_lambdaModelSchema(this.plugins), valueSpecification);\n }\n visit_KeyExpression(valueSpecification) {\n return serialize(keyExpressionModelSchema(this.plugins), valueSpecification);\n }\n visit_PackageableElementPtr(valueSpecification) {\n return serialize(packageableElementPtrSchema, valueSpecification);\n }\n visit_GenericTypeInstance(valueSpecification) {\n return serialize(genericTypeInstanceSchema, valueSpecification);\n }\n visit_AppliedFunction(valueSpecification) {\n return serialize(appliedFunctionModelSchema(this.plugins), valueSpecification);\n }\n visit_AppliedProperty(valueSpecification) {\n return serialize(appliedPropertyModelSchema(this.plugins), valueSpecification);\n }\n visit_Collection(valueSpecification) {\n return serialize(collectionModelSchema(this.plugins), valueSpecification);\n }\n visit_EnumValue(valueSpecification) {\n return serialize(enumValueModelSchema, valueSpecification);\n }\n visit_CInteger(valueSpecification) {\n return serialize(CIntegerModelSchema, valueSpecification);\n }\n visit_CDecimal(valueSpecification) {\n return serialize(CDecimalModelSchema, valueSpecification);\n }\n visit_CString(valueSpecification) {\n return serialize(CStringModelSchema, valueSpecification);\n }\n visit_CBoolean(valueSpecification) {\n return serialize(CBooleanModelSchema, valueSpecification);\n }\n visit_CByteArray(valueSpecification) {\n return serialize(CByteArrayModelSchema, valueSpecification);\n }\n visit_CFloat(valueSpecification) {\n return serialize(CFloatModelSchema, valueSpecification);\n }\n visit_CDateTime(valueSpecification) {\n return serialize(CDateTimeModelSchema, valueSpecification);\n }\n visit_CStrictDate(valueSpecification) {\n return serialize(CStrictDateModelSchema, valueSpecification);\n }\n visit_CStrictTime(valueSpecification) {\n return serialize(CStrictTimeModelSchema, valueSpecification);\n }\n visit_CLatestDate(valueSpecification) {\n return serialize(CLatestDateModelSchema, valueSpecification);\n }\n visit_ClassInstance(valueSpecification) {\n return serialize(classInstanceModelSchema(this.plugins), valueSpecification);\n }\n}\nexport function V1_deserializeValueSpecification(json, plugins) {\n switch (json._type) {\n case V1_ValueSpecificationType.APPLIED_FUNCTION:\n return deserialize(appliedFunctionModelSchema(plugins), json);\n case V1_ValueSpecificationType.APPLIED_PROPERTY:\n return deserialize(appliedPropertyModelSchema(plugins), json);\n case V1_ValueSpecificationType.VARIABLE:\n return deserialize(V1_variableModelSchema, json);\n case V1_ValueSpecificationType.LAMBDA:\n return deserialize(V1_lambdaModelSchema(plugins), json);\n case V1_ValueSpecificationType.KEY_EXPRESSION:\n return deserialize(keyExpressionModelSchema(plugins), json);\n case V1_ValueSpecificationType.COLLECTION:\n return deserialize(collectionModelSchema(plugins), json);\n case V1_ValueSpecificationType.ENUM_VALUE:\n return deserialize(enumValueModelSchema, json);\n // primitive values\n case V1_ValueSpecificationType.CBOOLEAN:\n return deserializePrimitiveValueSpecification(json, plugins, (val) => deserialize(CBooleanModelSchema, val));\n case V1_ValueSpecificationType.CBYTEARRAY: {\n return deserializePrimitiveValueSpecification(json, plugins, (val) => deserialize(CByteArrayModelSchema, val));\n }\n case V1_ValueSpecificationType.CDATETIME:\n return deserializePrimitiveValueSpecification(json, plugins, (val) => deserialize(CDateTimeModelSchema, val));\n case V1_ValueSpecificationType.CSTRICTTIME:\n return deserializePrimitiveValueSpecification(json, plugins, (val) => deserialize(CStrictTimeModelSchema, val));\n case V1_ValueSpecificationType.CDECIMAL:\n return deserializePrimitiveValueSpecification(json, plugins, (val) => deserialize(CDecimalModelSchema, val));\n case V1_ValueSpecificationType.CFLOAT:\n return deserializePrimitiveValueSpecification(json, plugins, (val) => deserialize(CFloatModelSchema, val));\n case V1_ValueSpecificationType.CINTEGER:\n return deserializePrimitiveValueSpecification(json, plugins, (val) => deserialize(CIntegerModelSchema, val));\n case V1_ValueSpecificationType.CLATESTDATE:\n return deserializePrimitiveValueSpecification(json, plugins, (val) => deserialize(CLatestDateModelSchema, val));\n case V1_ValueSpecificationType.CSTRICTDATE:\n return deserializePrimitiveValueSpecification(json, plugins, (val) => deserialize(CStrictDateModelSchema, val));\n case V1_ValueSpecificationType.CSTRING: {\n // This workaround is intended to handle an edge case where CString is sent with empty values\n // we will convert it to an empty string instead\n // See https://github.com/finos/legend-engine/pull/1076\n if (Array.isArray(json.values) &&\n !json.values.length &&\n isPlainObject(json.multiplicity) &&\n json.multiplicity.upperBound === 1) {\n const result = new V1_CString();\n result.value = '';\n return result;\n }\n return deserializePrimitiveValueSpecification(json, plugins, (val) => deserialize(CStringModelSchema, val));\n }\n // class instance\n case V1_ValueSpecificationType.CLASS_INSTANCE:\n return deserialize(classInstanceModelSchema(plugins), json);\n /**\n * NOTE: the following types are here for backward compatibility\n * as some of these are used to be value specifications, but now\n * transformed into class instances\n *\n * @backwardCompatibility\n */\n case V1_ClassInstanceType.PAIR:\n case V1_ClassInstanceType.AGGREGATE_VALUE:\n case V1_ClassInstanceType.EXECUTION_CONTEXT_INSTANCE:\n case V1_ClassInstanceType.PATH:\n case V1_ClassInstanceType.ROOT_GRAPH_FETCH_TREE:\n case V1_ClassInstanceType.PURE_LIST:\n case V1_ClassInstanceType.RUNTIME_INSTANCE:\n case V1_ClassInstanceType.SERIALIZATION_CONFIG:\n case V1_ClassInstanceType.TDS_AGGREGATE_VALUE:\n case V1_ClassInstanceType.TDS_COLUMN_INFORMATION:\n case V1_ClassInstanceType.TDS_OLAP_AGGREGATION:\n case V1_ClassInstanceType.TDS_OLAP_RANK:\n case V1_ClassInstanceType.TDS_SORT_INFORMATION:\n return deserialize(classInstanceModelSchema(plugins), {\n _type: V1_ValueSpecificationType.CLASS_INSTANCE,\n type: json._type,\n value: json,\n });\n // packageable element pointer\n case V1_ValueSpecificationType.HACKED_CLASS: // deprecated\n return deserializeHackedClass(json);\n case V1_ValueSpecificationType.UNIT_TYPE: // deprecated\n case V1_ValueSpecificationType.HACKED_UNIT: // deprecated\n return deserializeHackedUnit(json);\n case V1_ValueSpecificationType.PRIMITIVE_TYPE: // deprecated\n case V1_ValueSpecificationType.ENUM: // deprecated\n case V1_ValueSpecificationType.CLASS: // deprecated\n case V1_ValueSpecificationType.MAPPING_INSTANCE: // deprecated\n case V1_ValueSpecificationType.PACKAGEABLE_ELEMENT_PTR:\n return deserialize(packageableElementPtrSchema, json);\n case V1_ValueSpecificationType.GENERIC_TYPE_INSTANCE:\n return deserialize(genericTypeInstanceSchema, json);\n default:\n throw new UnsupportedOperationError(`Can't deserialize value specification of type '${json._type}'`);\n }\n}\nexport function V1_serializeValueSpecification(protocol, plugins) {\n return protocol.accept_ValueSpecificationVisitor(new V1_ValueSpecificationSerializer(plugins));\n}\n//# sourceMappingURL=V1_ValueSpecificationSerializer.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF 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_DataTypeValueSpecification } from './V1_DataTypeValueSpecification.js';\nexport class V1_EnumValue extends V1_DataTypeValueSpecification {\n fullPath;\n value;\n accept_ValueSpecificationVisitor(visitor) {\n return visitor.visit_EnumValue(this);\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 { V1_CDate } from './V1_CDate.js';\nexport class V1_CLatestDate extends V1_CDate {\n accept_ValueSpecificationVisitor(visitor) {\n return visitor.visit_CLatestDate(this);\n }\n}\n//# sourceMappingURL=V1_CLatestDate.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF 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_PrimitiveValueSpecification } from './V1_PrimitiveValueSpecification.js';\nexport class V1_CByteArray extends V1_PrimitiveValueSpecification {\n value; // the Base64String transformed from byte[] by Jackson\n accept_ValueSpecificationVisitor(visitor) {\n return visitor.visit_CByteArray(this);\n }\n}\n//# sourceMappingURL=V1_CByteArray.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS 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, } from './MetaModelConst.js';\nimport { findLast, guaranteeNonNullable, isString, recursiveOmit, } from '@finos/legend-shared';\nexport const extractElementNameFromPath = (fullPath) => guaranteeNonNullable(findLast(fullPath.split(ELEMENT_PATH_DELIMITER)));\nexport const extractPackagePathFromPath = (fullPath) => {\n const idx = fullPath.lastIndexOf(ELEMENT_PATH_DELIMITER);\n return idx === -1 ? undefined : fullPath.substring(0, idx);\n};\nexport const isValidIdentifier = (input, allowDollarSymbol) => allowDollarSymbol\n ? Boolean(input.match(/^[a-z][\\w\\d$]*$/))\n : Boolean(input.match(/^[a-z][\\w\\d]*$/));\nexport const matchFunctionName = (functionName, functionFullPaths) => Array.isArray(functionFullPaths)\n ? functionFullPaths.some((functionFullPath) => matchFunctionName(functionName, functionFullPath))\n : functionName === functionFullPaths ||\n extractElementNameFromPath(functionFullPaths) === functionName;\n/**\n * This method concatenate 2 fully-qualified elementh paths to form a single one\n * and then extracts the name and package part from it.\n */\nexport const resolvePackagePathAndElementName = (path, defaultPath) => {\n const index = path.lastIndexOf(ELEMENT_PATH_DELIMITER);\n if (index === -1) {\n return [defaultPath ?? '', path];\n }\n return [\n path.substring(0, index),\n path.substring(index + ELEMENT_PATH_DELIMITER.length, path.length),\n ];\n};\nexport const buildPath = (packagePath, name) => `${guaranteeNonNullable(packagePath, 'Package path is required')}${ELEMENT_PATH_DELIMITER}${guaranteeNonNullable(name, 'Name is required')}`;\nexport const createPath = (packagePath, name) => `${packagePath ? `${packagePath}${ELEMENT_PATH_DELIMITER}` : ''}${name}`;\n// TODO: we might need to support quoted identifier in the future\nexport const isValidPathIdentifier = (val) => Boolean(val.match(/^\\w[\\w$_-]*$/));\nexport const isValidFullPath = (fullPath) => Boolean(fullPath.match(/^(?:\\w[\\w$_-]*)(?:::\\w[\\w$_-]*)+$/));\nexport const isValidPath = (path) => Boolean(path.match(/^(?:\\w[\\w$_-]*)(?:::\\w[\\w$_-]*)*$/));\nexport const fromElementPathToMappingElementId = (className) => className.split(ELEMENT_PATH_DELIMITER).join('_');\n/**\n * Prune source information from object such as raw lambda, raw value specification, etc.\n *\n * NOTE: currently, there is no exhaustive way to do this. Majority of the cases, the source information field\n * is suffixed with `sourceInformation` (e.g. `profileSourceInformation`, `propertyTypeSourceInformation`),\n * however, we have sometimes deviated from this pattern in our protocol model, so we have fields like `classSourceInformation`,\n * etc. So this is really an optimistic, non-exhaustive prune.\n *\n * To do this exhaustively, we need to tweak this method to also check for the structure of the (sub)object to make sure\n * it is structually equivalent to the shape of source information to prune it. However, this is computationally expensive.\n *\n * NOTE: That aside, We should cleanup these in the backend and use pointer instead so source information is coupled\n * with the value instead of having custom-name source information fields like these, polluting the protocol models.\n */\nexport const pruneSourceInformation = (object) => recursiveOmit(object, (obj, propKey) => isString(propKey) &&\n propKey\n .toLowerCase()\n .endsWith(SOURCE_INFORMATION_PROPERTY_KEY_SUFFIX.toLowerCase()));\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 { IllegalStateError, guaranteeNonNullable, hashObject, pruneObject, uuid, } from '@finos/legend-shared';\nexport class DataCubeQuerySnapshot {\n uuid = uuid();\n timestamp = Date.now();\n data;\n _finalized = false;\n _hashCode;\n constructor(name, runtime, sourceQuery, configuration) {\n this.data = {\n name,\n runtime,\n sourceQuery,\n configuration,\n sourceColumns: [],\n leafExtendedColumns: [],\n selectColumns: [],\n filter: undefined,\n groupBy: undefined,\n pivot: undefined,\n groupExtendedColumns: [],\n sortColumns: [],\n limit: undefined,\n };\n }\n static create(name, runtime, sourceQuery, configuration) {\n return new DataCubeQuerySnapshot(name, runtime, sourceQuery, configuration);\n }\n clone() {\n const clone = new DataCubeQuerySnapshot('', '', {}, {});\n clone.data = JSON.parse(JSON.stringify(this.data));\n return clone;\n }\n /**\n * Get available columns at a certain stage of the query\n */\n stageCols(stage) {\n switch (stage) {\n case 'filter':\n case 'leaf-extend':\n return [...this.data.sourceColumns];\n case 'select':\n return [...this.data.sourceColumns, ...this.data.leafExtendedColumns];\n case 'aggregation':\n return [...this.data.selectColumns];\n case 'group-extend':\n // TODO: @akphi - add pivot columns\n return [...this.data.selectColumns];\n case 'sort':\n return [...this.data.selectColumns, ...this.data.groupExtendedColumns];\n default:\n throw new IllegalStateError(`Unknown stage '${stage}'`);\n }\n }\n isFinalized() {\n return this._finalized;\n }\n finalize() {\n if (this._finalized) {\n return this;\n }\n this._hashCode = this.computeHashCode();\n this._finalized = true;\n return this;\n }\n get hashCode() {\n if (!this._finalized || !this._hashCode) {\n throw new IllegalStateError('Snapshot is not finalized');\n }\n return this._hashCode;\n }\n /**\n * NOTE: if this becomes a performance bottleneck, we can consider\n * more granular hashing strategy\n *\n * Here, we are just hashing the raw object, but we must ensure\n * to properly prune the snapshot data object before hashing\n * else there would be mismatch\n */\n computeHashCode() {\n return hashObject(pruneObject(this.data));\n }\n}\nexport function _findCol(cols, name) {\n return cols?.find((c) => c.name === name);\n}\nexport function _getCol(cols, name) {\n return guaranteeNonNullable(cols?.find((c) => c.name === name), `Can't find column '${name}'`);\n}\n//# sourceMappingURL=DataCubeQuerySnapshot.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS 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 TailwindCSSPalette = {\n transparent: '#00000000',\n black: '#000000',\n white: '#ffffff',\n slate: {\n 50: '#f8fafc',\n 100: '#f1f5f9',\n 200: '#e2e8f0',\n 300: '#cbd5e1',\n 400: '#94a3b8',\n 500: '#64748b',\n 600: '#475569',\n 700: '#334155',\n 800: '#1e293b',\n 900: '#0f172a',\n 950: '#020617',\n },\n gray: {\n 50: '#f9fafb',\n 100: '#f3f4f6',\n 200: '#e5e7eb',\n 300: '#d1d5db',\n 400: '#9ca3af',\n 500: '#6b7280',\n 600: '#4b5563',\n 700: '#374151',\n 800: '#1f2937',\n 900: '#111827',\n 950: '#030712',\n },\n zinc: {\n 50: '#fafafa',\n 100: '#f4f4f5',\n 200: '#e4e4e7',\n 300: '#d4d4d8',\n 400: '#a1a1aa',\n 500: '#71717a',\n 600: '#52525b',\n 700: '#3f3f46',\n 800: '#27272a',\n 900: '#18181b',\n 950: '#09090b',\n },\n neutral: {\n 50: '#fafafa',\n 100: '#f5f5f5',\n 200: '#e5e5e5',\n 300: '#d4d4d4',\n 400: '#a3a3a3',\n 500: '#737373',\n 600: '#525252',\n 700: '#404040',\n 800: '#262626',\n 900: '#171717',\n 950: '#0a0a0a',\n },\n stone: {\n 50: '#fafaf9',\n 100: '#f5f5f4',\n 200: '#e7e5e4',\n 300: '#d6d3d1',\n 400: '#a8a29e',\n 500: '#78716c',\n 600: '#57534e',\n 700: '#44403c',\n 800: '#292524',\n 900: '#1c1917',\n 950: '#0c0a09',\n },\n red: {\n 50: '#fef2f2',\n 100: '#fee2e2',\n 200: '#fecaca',\n 300: '#fca5a5',\n 400: '#f87171',\n 500: '#ef4444',\n 600: '#dc2626',\n 700: '#b91c1c',\n 800: '#991b1b',\n 900: '#7f1d1d',\n 950: '#450a0a',\n },\n orange: {\n 50: '#fff7ed',\n 100: '#ffedd5',\n 200: '#fed7aa',\n 300: '#fdba74',\n 400: '#fb923c',\n 500: '#f97316',\n 600: '#ea580c',\n 700: '#c2410c',\n 800: '#9a3412',\n 900: '#7c2d12',\n 950: '#431407',\n },\n amber: {\n 50: '#fffbeb',\n 100: '#fef3c7',\n 200: '#fde68a',\n 300: '#fcd34d',\n 400: '#fbbf24',\n 500: '#f59e0b',\n 600: '#d97706',\n 700: '#b45309',\n 800: '#92400e',\n 900: '#78350f',\n 950: '#451a03',\n },\n yellow: {\n 50: '#fefce8',\n 100: '#fef9c3',\n 200: '#fef08a',\n 300: '#fde047',\n 400: '#facc15',\n 500: '#eab308',\n 600: '#ca8a04',\n 700: '#a16207',\n 800: '#854d0e',\n 900: '#713f12',\n 950: '#422006',\n },\n lime: {\n 50: '#f7fee7',\n 100: '#ecfccb',\n 200: '#d9f99d',\n 300: '#bef264',\n 400: '#a3e635',\n 500: '#84cc16',\n 600: '#65a30d',\n 700: '#4d7c0f',\n 800: '#3f6212',\n 900: '#365314',\n 950: '#1a2e05',\n },\n green: {\n 50: '#f0fdf4',\n 100: '#dcfce7',\n 200: '#bbf7d0',\n 300: '#86efac',\n 400: '#4ade80',\n 500: '#22c55e',\n 600: '#16a34a',\n 700: '#15803d',\n 800: '#166534',\n 900: '#14532d',\n 950: '#052e16',\n },\n emerald: {\n 50: '#ecfdf5',\n 100: '#d1fae5',\n 200: '#a7f3d0',\n 300: '#6ee7b7',\n 400: '#34d399',\n 500: '#10b981',\n 600: '#059669',\n 700: '#047857',\n 800: '#065f46',\n 900: '#064e3b',\n 950: '#022c22',\n },\n teal: {\n 50: '#f0fdfa',\n 100: '#ccfbf1',\n 200: '#99f6e4',\n 300: '#5eead4',\n 400: '#2dd4bf',\n 500: '#14b8a6',\n 600: '#0d9488',\n 700: '#0f766e',\n 800: '#115e59',\n 900: '#134e4a',\n 950: '#042f2e',\n },\n cyan: {\n 50: '#ecfeff',\n 100: '#cffafe',\n 200: '#a5f3fc',\n 300: '#67e8f9',\n 400: '#22d3ee',\n 500: '#06b6d4',\n 600: '#0891b2',\n 700: '#0e7490',\n 800: '#155e75',\n 900: '#164e63',\n 950: '#083344',\n },\n sky: {\n 50: '#f0f9ff',\n 100: '#e0f2fe',\n 200: '#bae6fd',\n 300: '#7dd3fc',\n 400: '#38bdf8',\n 500: '#0ea5e9',\n 600: '#0284c7',\n 700: '#0369a1',\n 800: '#075985',\n 900: '#0c4a6e',\n 950: '#082f49',\n },\n blue: {\n 50: '#eff6ff',\n 100: '#dbeafe',\n 200: '#bfdbfe',\n 300: '#93c5fd',\n 400: '#60a5fa',\n 500: '#3b82f6',\n 600: '#2563eb',\n 700: '#1d4ed8',\n 800: '#1e40af',\n 900: '#1e3a8a',\n 950: '#172554',\n },\n indigo: {\n 50: '#eef2ff',\n 100: '#e0e7ff',\n 200: '#c7d2fe',\n 300: '#a5b4fc',\n 400: '#818cf8',\n 500: '#6366f1',\n 600: '#4f46e5',\n 700: '#4338ca',\n 800: '#3730a3',\n 900: '#312e81',\n 950: '#1e1b4b',\n },\n violet: {\n 50: '#f5f3ff',\n 100: '#ede9fe',\n 200: '#ddd6fe',\n 300: '#c4b5fd',\n 400: '#a78bfa',\n 500: '#8b5cf6',\n 600: '#7c3aed',\n 700: '#6d28d9',\n 800: '#5b21b6',\n 900: '#4c1d95',\n 950: '#2e1065',\n },\n purple: {\n 50: '#faf5ff',\n 100: '#f3e8ff',\n 200: '#e9d5ff',\n 300: '#d8b4fe',\n 400: '#c084fc',\n 500: '#a855f7',\n 600: '#9333ea',\n 700: '#7e22ce',\n 800: '#6b21a8',\n 900: '#581c87',\n 950: '#3b0764',\n },\n fuchsia: {\n 50: '#fdf4ff',\n 100: '#fae8ff',\n 200: '#f5d0fe',\n 300: '#f0abfc',\n 400: '#e879f9',\n 500: '#d946ef',\n 600: '#c026d3',\n 700: '#a21caf',\n 800: '#86198f',\n 900: '#701a75',\n 950: '#4a044e',\n },\n pink: {\n 50: '#fdf2f8',\n 100: '#fce7f3',\n 200: '#fbcfe8',\n 300: '#f9a8d4',\n 400: '#f472b6',\n 500: '#ec4899',\n 600: '#db2777',\n 700: '#be185d',\n 800: '#9d174d',\n 900: '#831843',\n 950: '#500724',\n },\n rose: {\n 50: '#fff1f2',\n 100: '#ffe4e6',\n 200: '#fecdd3',\n 300: '#fda4af',\n 400: '#fb7185',\n 500: '#f43f5e',\n 600: '#e11d48',\n 700: '#be123c',\n 800: '#9f1239',\n 900: '#881337',\n 950: '#4c0519',\n },\n};\n//# sourceMappingURL=TailwindCSSPalette.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { TailwindCSSPalette } from '@finos/legend-art';\nimport { PRIMITIVE_TYPE } from '@finos/legend-graph';\nexport var DataCubeFunction;\n(function (DataCubeFunction) {\n // relation\n DataCubeFunction[\"EXTEND\"] = \"meta::pure::functions::relation::extend\";\n DataCubeFunction[\"FILTER\"] = \"meta::pure::functions::relation::filter\";\n DataCubeFunction[\"GROUP_BY\"] = \"meta::pure::functions::relation::groupBy\";\n DataCubeFunction[\"LIMIT\"] = \"meta::pure::functions::relation::limit\";\n DataCubeFunction[\"PIVOT\"] = \"meta::pure::functions::relation::pivot\";\n // RENAME = 'meta::pure::functions::relation::rename',\n DataCubeFunction[\"SELECT\"] = \"meta::pure::functions::relation::select\";\n DataCubeFunction[\"SLICE\"] = \"meta::pure::functions::relation::slice\";\n DataCubeFunction[\"SORT\"] = \"meta::pure::functions::relation::sort\";\n // generic\n DataCubeFunction[\"CAST\"] = \"meta::pure::functions::lang::cast\";\n DataCubeFunction[\"FROM\"] = \"meta::pure::mapping::from\";\n // sort\n DataCubeFunction[\"ASC\"] = \"meta::pure::functions::relation::ascending\";\n DataCubeFunction[\"DESC\"] = \"meta::pure::functions::relation::descending\";\n // filter\n DataCubeFunction[\"AND\"] = \"meta::pure::functions::boolean::and\";\n DataCubeFunction[\"NOT\"] = \"meta::pure::functions::boolean::not\";\n DataCubeFunction[\"OR\"] = \"meta::pure::functions::boolean::or\";\n DataCubeFunction[\"CONTAINS\"] = \"meta::pure::functions::string::contains\";\n DataCubeFunction[\"ENDS_WITH\"] = \"meta::pure::functions::string::endsWith\";\n DataCubeFunction[\"EQUAL\"] = \"meta::pure::functions::boolean::equal\";\n DataCubeFunction[\"GREATER_THAN\"] = \"meta::pure::functions::boolean::greaterThan\";\n DataCubeFunction[\"GREATER_THAN_EQUAL\"] = \"meta::pure::functions::boolean::greaterThanEqual\";\n DataCubeFunction[\"IN\"] = \"meta::pure::functions::collection::in\";\n DataCubeFunction[\"IS_EMPTY\"] = \"meta::pure::functions::collection::isEmpty\";\n DataCubeFunction[\"LESS_THAN\"] = \"meta::pure::functions::boolean::lessThan\";\n DataCubeFunction[\"LESS_THAN_EQUAL\"] = \"meta::pure::functions::boolean::lessThanEqual\";\n DataCubeFunction[\"STARTS_WITH\"] = \"meta::pure::functions::string::startsWith\";\n // aggregate\n DataCubeFunction[\"AVERAGE\"] = \"meta::pure::functions::math::average\";\n DataCubeFunction[\"COUNT\"] = \"meta::pure::functions::collection::count\";\n DataCubeFunction[\"DISTINCT\"] = \"meta::pure::functions::collection::distinct\";\n DataCubeFunction[\"FIRST\"] = \"meta::pure::functions::collection::first\";\n DataCubeFunction[\"JOIN_STRINGS\"] = \"meta::pure::functions::string::joinStrings\";\n DataCubeFunction[\"LAST\"] = \"meta::pure::functions::collection::last\";\n DataCubeFunction[\"MAX\"] = \"meta::pure::functions::collection::max\";\n DataCubeFunction[\"MIN\"] = \"meta::pure::functions::collection::min\";\n DataCubeFunction[\"SUM\"] = \"meta::pure::functions::math::sum\";\n DataCubeFunction[\"STDDEV_POP\"] = \"meta::pure::functions::math::stdDevPopulation\";\n DataCubeFunction[\"STDDEV_SAMP\"] = \"meta::pure::functions::math::stdDevSample\";\n DataCubeFunction[\"VAR_POP\"] = \"meta::pure::functions::math::variancePopulation\";\n DataCubeFunction[\"VAR_SAMP\"] = \"meta::pure::functions::math::varianceSample\";\n // UNIQUE_VALUE_ONLY = 'meta::pure::functions::collection::uniqueValueOnly',\n // PERCENTILE = 'meta::pure::functions::math::percentile',\n})(DataCubeFunction || (DataCubeFunction = {}));\nexport const DEFAULT_REPORT_NAME = 'New Report';\nexport const DEFAULT_LAMBDA_VARIABLE_NAME = 'x';\nexport const PIVOT_COLUMN_NAME_VALUE_SEPARATOR = '__|__';\n// NOTE: this is the column name used for the dummy count() aggregate\n// when no aggregate is specified in groupBy() or pivot()\nexport const INTERNAL__FILLER_COUNT_AGG_COLUMN_NAME = 'INTERNAL__filler_count_agg_column';\nexport const DEFAULT_ROW_BUFFER = 20;\nexport var DataCubeNumberScale;\n(function (DataCubeNumberScale) {\n DataCubeNumberScale[\"BASIS_POINT\"] = \"Basis Points (bp)\";\n DataCubeNumberScale[\"PERCENT\"] = \"Percent (%)\";\n DataCubeNumberScale[\"THOUSANDS\"] = \"Thousands (k)\";\n DataCubeNumberScale[\"MILLIONS\"] = \"Millions (m)\";\n DataCubeNumberScale[\"BILLIONS\"] = \"Billions (b)\";\n DataCubeNumberScale[\"TRILLIONS\"] = \"Trillions (t)\";\n DataCubeNumberScale[\"AUTO\"] = \"Auto (k/m/b/t)\";\n})(DataCubeNumberScale || (DataCubeNumberScale = {}));\nexport var DataCubeSelectionStat;\n(function (DataCubeSelectionStat) {\n DataCubeSelectionStat[\"COUNT\"] = \"Count\";\n DataCubeSelectionStat[\"SUM\"] = \"Sum\";\n DataCubeSelectionStat[\"MIN\"] = \"Min\";\n DataCubeSelectionStat[\"MAX\"] = \"Max\";\n DataCubeSelectionStat[\"AVERAGE\"] = \"Average\";\n})(DataCubeSelectionStat || (DataCubeSelectionStat = {}));\nexport var DataCubeFont;\n(function (DataCubeFont) {\n // sans-serif\n DataCubeFont[\"ARIAL\"] = \"Arial\";\n DataCubeFont[\"ROBOTO\"] = \"Roboto\";\n DataCubeFont[\"ROBOTO_CONDENSED\"] = \"Roboto Condensed\";\n // serif\n DataCubeFont[\"TIMES_NEW_ROMAN\"] = \"Times New Roman\";\n DataCubeFont[\"GEORGIA\"] = \"Georgia\";\n DataCubeFont[\"ROBOTO_SERIF\"] = \"Roboto Serif\";\n // monospace\n DataCubeFont[\"JERBRAINS_MONO\"] = \"Jetbrains Mono\";\n DataCubeFont[\"ROBOTO_MONO\"] = \"Roboto Mono\";\n DataCubeFont[\"UBUNTU_MONO\"] = \"Ubuntu Mono\";\n})(DataCubeFont || (DataCubeFont = {}));\nexport var DataCubeFontTextAlignment;\n(function (DataCubeFontTextAlignment) {\n DataCubeFontTextAlignment[\"CENTER\"] = \"center\";\n DataCubeFontTextAlignment[\"LEFT\"] = \"left\";\n DataCubeFontTextAlignment[\"RIGHT\"] = \"right\";\n})(DataCubeFontTextAlignment || (DataCubeFontTextAlignment = {}));\nexport var DataCubeFontCase;\n(function (DataCubeFontCase) {\n DataCubeFontCase[\"LOWERCASE\"] = \"lowercase\";\n DataCubeFontCase[\"UPPERCASE\"] = \"uppercase\";\n DataCubeFontCase[\"CAPITALIZE\"] = \"capitalize\";\n})(DataCubeFontCase || (DataCubeFontCase = {}));\nexport var DataCubeFontFormatUnderlineVariant;\n(function (DataCubeFontFormatUnderlineVariant) {\n DataCubeFontFormatUnderlineVariant[\"SOLID\"] = \"solid\";\n DataCubeFontFormatUnderlineVariant[\"DASHED\"] = \"dashed\";\n DataCubeFontFormatUnderlineVariant[\"DOTTED\"] = \"dotted\";\n DataCubeFontFormatUnderlineVariant[\"DOUBLE\"] = \"double\";\n DataCubeFontFormatUnderlineVariant[\"WAVY\"] = \"wavy\";\n})(DataCubeFontFormatUnderlineVariant || (DataCubeFontFormatUnderlineVariant = {}));\nexport var DataCubeColumnKind;\n(function (DataCubeColumnKind) {\n DataCubeColumnKind[\"MEASURE\"] = \"Measure\";\n DataCubeColumnKind[\"DIMENSION\"] = \"Dimension\";\n})(DataCubeColumnKind || (DataCubeColumnKind = {}));\n// TODO: we could potentially support complex type like parameter/column in the future\nexport var DataCubeOperationValueType;\n(function (DataCubeOperationValueType) {\n})(DataCubeOperationValueType || (DataCubeOperationValueType = {}));\nexport var DataCubeAggregateOperation;\n(function (DataCubeAggregateOperation) {\n DataCubeAggregateOperation[\"SUM\"] = \"sum\";\n DataCubeAggregateOperation[\"AVERAGE\"] = \"avg\";\n DataCubeAggregateOperation[\"COUNT\"] = \"count\";\n DataCubeAggregateOperation[\"MIN\"] = \"min\";\n DataCubeAggregateOperation[\"MAX\"] = \"max\";\n // UNIQUE = 'uniq',\n DataCubeAggregateOperation[\"FIRST\"] = \"first\";\n DataCubeAggregateOperation[\"LAST\"] = \"last\";\n // MEDIAN = 'median',\n DataCubeAggregateOperation[\"VAR_POP\"] = \"var_samp\";\n DataCubeAggregateOperation[\"VAR_SAMP\"] = \"var_pop\";\n DataCubeAggregateOperation[\"STDDEV_POP\"] = \"stddev_pop\";\n DataCubeAggregateOperation[\"STDDEV_SAMP\"] = \"stddev_samp\";\n // STANDARD_ERROR = 'stderr',\n // NULL = 'null',\n // ssq\n // countvalid\n // countnull\n // uniqunstrict\n // minmagnitude\n // maxmagnitude\n // commonprefix\n // commonprefixunstrict\n // strjoin\n // strjoinuniq\n // splitjoin\n // daterange\n // wavg\n // wstderr\n // wsum\n // custom\n})(DataCubeAggregateOperation || (DataCubeAggregateOperation = {}));\nexport var DataCubeQueryFilterOperation;\n(function (DataCubeQueryFilterOperation) {\n DataCubeQueryFilterOperation[\"EQUAL\"] = \"equal\";\n DataCubeQueryFilterOperation[\"NOT_EQUAL\"] = \"notEqual\";\n DataCubeQueryFilterOperation[\"GREATER_THAN\"] = \"greaterThan\";\n DataCubeQueryFilterOperation[\"GREATER_THAN_OR_EQUAL\"] = \"greaterThanOrEqual\";\n DataCubeQueryFilterOperation[\"LESS_THAN\"] = \"lessThan\";\n DataCubeQueryFilterOperation[\"LESS_THAN_OR_EQUAL\"] = \"lessThanOrEqual\";\n DataCubeQueryFilterOperation[\"BLANK\"] = \"isEmpty\";\n DataCubeQueryFilterOperation[\"NOT_BLANK\"] = \"isNotEmpty\";\n DataCubeQueryFilterOperation[\"CONTAINS\"] = \"contains\";\n DataCubeQueryFilterOperation[\"NOT_CONTAINS\"] = \"notContains\";\n DataCubeQueryFilterOperation[\"STARTS_WITH\"] = \"startsWith\";\n DataCubeQueryFilterOperation[\"ENDS_WITH\"] = \"endsWith\";\n})(DataCubeQueryFilterOperation || (DataCubeQueryFilterOperation = {}));\nexport var DataCubeQueryFilterGroupOperation;\n(function (DataCubeQueryFilterGroupOperation) {\n DataCubeQueryFilterGroupOperation[\"AND\"] = \"and\";\n DataCubeQueryFilterGroupOperation[\"OR\"] = \"or\";\n})(DataCubeQueryFilterGroupOperation || (DataCubeQueryFilterGroupOperation = {}));\nexport var DataCubeQuerySortOperation;\n(function (DataCubeQuerySortOperation) {\n DataCubeQuerySortOperation[\"ASCENDING\"] = \"ascending\";\n DataCubeQuerySortOperation[\"DESCENDING\"] = \"descending\";\n})(DataCubeQuerySortOperation || (DataCubeQuerySortOperation = {}));\nexport var DataCubeColumnPinPlacement;\n(function (DataCubeColumnPinPlacement) {\n DataCubeColumnPinPlacement[\"LEFT\"] = \"Left\";\n DataCubeColumnPinPlacement[\"RIGHT\"] = \"Right\";\n})(DataCubeColumnPinPlacement || (DataCubeColumnPinPlacement = {}));\nexport var DataCubeColumnDataType;\n(function (DataCubeColumnDataType) {\n DataCubeColumnDataType[\"NUMBER\"] = \"number\";\n DataCubeColumnDataType[\"DATE\"] = \"date\";\n DataCubeColumnDataType[\"TEXT\"] = \"text\";\n})(DataCubeColumnDataType || (DataCubeColumnDataType = {}));\nexport function getDataType(type) {\n switch (type) {\n case PRIMITIVE_TYPE.NUMBER:\n case PRIMITIVE_TYPE.INTEGER:\n case PRIMITIVE_TYPE.DECIMAL:\n case PRIMITIVE_TYPE.FLOAT:\n return DataCubeColumnDataType.NUMBER;\n case PRIMITIVE_TYPE.DATE:\n case PRIMITIVE_TYPE.DATETIME:\n case PRIMITIVE_TYPE.STRICTDATE:\n return DataCubeColumnDataType.DATE;\n case PRIMITIVE_TYPE.STRING:\n default:\n return DataCubeColumnDataType.TEXT;\n }\n}\nexport const DEFAULT_URL_LABEL_QUERY_PARAM = 'dataCube.linkLabel';\nexport const DEFAULT_MISSING_VALUE_DISPLAY_TEXT = '';\nexport const DEFAULT_GRID_LINE_COLOR = TailwindCSSPalette.neutral[200];\nexport const DEFAULT_ROW_HIGHLIGHT_BACKGROUND_COLOR = '#d7e0eb';\nexport const DEFAULT_COLUMN_WIDTH = 300;\nexport const DEFAULT_COLUMN_MIN_WIDTH = 50;\nexport const DEFAULT_COLUMN_MAX_WIDTH = undefined;\nexport const DEFAULT_FONT_FAMILY = DataCubeFont.ROBOTO;\nexport const DEFAULT_FONT_SIZE = 11;\nexport const DEFAULT_FONT_BOLD = false;\nexport const DEFAULT_FONT_ITALIC = false;\nexport const DEFAULT_FONT_CASE = undefined;\nexport const DEFAULT_FONT_UNDERLINED = undefined;\nexport const DEFAULT_FONT_STRIKETHROUGH = false;\nexport const DEFAULT_TEXT_ALIGN = DataCubeFontTextAlignment.LEFT;\nexport const DEFAULT_FOREGROUND_COLOR = TailwindCSSPalette.black;\nexport const DEFAULT_BACKGROUND_COLOR = TailwindCSSPalette.transparent;\nexport const DEFAULT_ROW_BACKGROUND_COLOR = TailwindCSSPalette.white;\nexport const DEFAULT_NEGATIVE_FOREGROUND_COLOR = TailwindCSSPalette.red[500];\nexport const DEFAULT_ZERO_FOREGROUND_COLOR = TailwindCSSPalette.neutral[400];\nexport const DEFAULT_ERROR_FOREGROUND_COLOR = TailwindCSSPalette.blue[600];\n//# sourceMappingURL=DataCubeQueryEngine.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { DEFAULT_BACKGROUND_COLOR, DEFAULT_ERROR_FOREGROUND_COLOR, DEFAULT_FOREGROUND_COLOR, DEFAULT_NEGATIVE_FOREGROUND_COLOR, DEFAULT_ROW_HIGHLIGHT_BACKGROUND_COLOR, DEFAULT_ZERO_FOREGROUND_COLOR, DEFAULT_GRID_LINE_COLOR, DEFAULT_FONT_FAMILY, DEFAULT_FONT_SIZE, DEFAULT_FONT_BOLD, DEFAULT_FONT_ITALIC, DEFAULT_FONT_STRIKETHROUGH, DEFAULT_TEXT_ALIGN, DEFAULT_FONT_UNDERLINED, DEFAULT_FONT_CASE, DataCubeColumnKind, } from './DataCubeQueryEngine.js';\nimport { SerializationFactory, usingModelSchema } from '@finos/legend-shared';\nimport { createModelSchema, list, optional, primitive } from 'serializr';\nexport class DataCubeColumnConfiguration {\n name;\n type;\n kind = DataCubeColumnKind.DIMENSION;\n displayName;\n decimals;\n displayCommas = false;\n negativeNumberInParens = false;\n numberScale;\n missingValueDisplayText;\n hPivotSortFunction;\n fontFamily;\n fontSize;\n fontBold;\n fontItalic;\n fontUnderline;\n fontStrikethrough;\n fontCase;\n textAlign;\n normalForegroundColor;\n negativeForegroundColor;\n zeroForegroundColor;\n errorForegroundColor;\n normalBackgroundColor;\n negativeBackgroundColor;\n zeroBackgroundColor;\n errorBackgroundColor;\n blur = false;\n hideFromView = false;\n fixedWidth;\n minWidth;\n maxWidth;\n pinned;\n displayAsLink = false;\n linkLabelParameter;\n constructor(name, type) {\n this.name = name;\n this.type = type;\n }\n static serialization = new SerializationFactory(createModelSchema(DataCubeColumnConfiguration, {\n blur: primitive(),\n decimals: optional(primitive()),\n displayAsLink: primitive(),\n displayCommas: primitive(),\n displayName: optional(primitive()),\n errorBackgroundColor: optional(primitive()),\n errorForegroundColor: optional(primitive()),\n fixedWidth: optional(primitive()),\n fontBold: optional(primitive()),\n fontCase: optional(primitive()),\n fontFamily: optional(primitive()),\n fontItalic: optional(primitive()),\n fontSize: optional(primitive()),\n fontStrikethrough: optional(primitive()),\n fontUnderline: optional(primitive()),\n hideFromView: primitive(),\n hPivotSortFunction: optional(primitive()),\n kind: primitive(),\n linkLabelParameter: optional(primitive()),\n maxWidth: optional(primitive()),\n minWidth: optional(primitive()),\n missingValueDisplayText: optional(primitive()),\n name: primitive(),\n negativeBackgroundColor: optional(primitive()),\n negativeForegroundColor: optional(primitive()),\n normalBackgroundColor: optional(primitive()),\n normalForegroundColor: optional(primitive()),\n negativeNumberInParens: primitive(),\n numberScale: optional(primitive()),\n pinned: optional(primitive()),\n textAlign: optional(primitive()),\n type: primitive(),\n zeroBackgroundColor: optional(primitive()),\n zeroForegroundColor: optional(primitive()),\n }));\n}\nexport class DataCubeConfiguration {\n description;\n columns = [];\n showTreeLines = false;\n showHorizontalGridLines = false;\n showVerticalGridLines = true;\n gridLineColor = DEFAULT_GRID_LINE_COLOR;\n fontFamily = DEFAULT_FONT_FAMILY;\n fontSize = DEFAULT_FONT_SIZE;\n fontBold = DEFAULT_FONT_BOLD;\n fontItalic = DEFAULT_FONT_ITALIC;\n fontUnderline = DEFAULT_FONT_UNDERLINED;\n fontStrikethrough = DEFAULT_FONT_STRIKETHROUGH;\n fontCase = DEFAULT_FONT_CASE;\n textAlign = DEFAULT_TEXT_ALIGN;\n normalForegroundColor = DEFAULT_FOREGROUND_COLOR;\n negativeForegroundColor = DEFAULT_NEGATIVE_FOREGROUND_COLOR;\n zeroForegroundColor = DEFAULT_ZERO_FOREGROUND_COLOR;\n errorForegroundColor = DEFAULT_ERROR_FOREGROUND_COLOR;\n normalBackgroundColor = DEFAULT_BACKGROUND_COLOR;\n negativeBackgroundColor = DEFAULT_BACKGROUND_COLOR;\n zeroBackgroundColor = DEFAULT_BACKGROUND_COLOR;\n errorBackgroundColor = DEFAULT_BACKGROUND_COLOR;\n alternateRows = false;\n alternateRowsStandardMode = true;\n alternateRowsColor = DEFAULT_ROW_HIGHLIGHT_BACKGROUND_COLOR;\n alternateRowsCount = 1;\n // aggregation\n initialExpandLevel;\n showRootAggregation = false;\n showLeafCount = false;\n addPivotTotalColumn = true;\n addPivotTotalColumnOnLeft = true;\n treeGroupSortFunction;\n // misc\n selectionStats = [];\n showWarningForTruncatedResult = true;\n static serialization = new SerializationFactory(createModelSchema(DataCubeConfiguration, {\n addPivotTotalColumn: primitive(),\n addPivotTotalColumnOnLeft: primitive(),\n alternateRows: primitive(),\n alternateRowsColor: primitive(),\n alternateRowsCount: primitive(),\n alternateRowsStandardMode: primitive(),\n columns: list(usingModelSchema(DataCubeColumnConfiguration.serialization.schema)),\n errorBackgroundColor: primitive(),\n errorForegroundColor: primitive(),\n description: optional(primitive()),\n fontBold: primitive(),\n fontCase: optional(primitive()),\n fontFamily: primitive(),\n fontItalic: primitive(),\n fontSize: primitive(),\n fontStrikethrough: primitive(),\n fontUnderline: optional(primitive()),\n gridLineColor: primitive(),\n initialExpandLevel: optional(primitive()),\n negativeBackgroundColor: primitive(),\n negativeForegroundColor: primitive(),\n normalBackgroundColor: primitive(),\n normalForegroundColor: primitive(),\n selectionStats: list(primitive()),\n showHorizontalGridLines: primitive(),\n showLeafCount: primitive(),\n showRootAggregation: primitive(),\n showTreeLines: primitive(),\n showVerticalGridLines: primitive(),\n showWarningForTruncatedResult: primitive(),\n textAlign: primitive(),\n treeGroupSortFunction: optional(primitive()),\n zeroBackgroundColor: primitive(),\n zeroForegroundColor: primitive(),\n }));\n}\n//# sourceMappingURL=DataCubeConfiguration.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS 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 * [CORE]\n *\n * These are utilities used to build the executable query from the query snapshot.\n * The executable query is then used to fetch data.\n ***************************************************************************************/\nimport { PRIMITIVE_TYPE, V1_AppliedFunction, V1_AppliedProperty, V1_CBoolean, V1_CDateTime, V1_CDecimal, V1_CFloat, V1_CInteger, V1_CStrictDate, V1_CStrictTime, V1_CString, V1_ClassInstance, V1_ClassInstanceType, V1_ColSpec, V1_ColSpecArray, V1_Collection, V1_Lambda, V1_Multiplicity, V1_PackageableElementPtr, V1_Variable, V1_deserializeValueSpecification, extractElementNameFromPath as _name, } from '@finos/legend-graph';\nimport { _findCol, } from './DataCubeQuerySnapshot.js';\nimport { guaranteeNonNullable, guaranteeIsString, guaranteeIsBoolean, guaranteeIsNumber, UnsupportedOperationError, guaranteeType, } from '@finos/legend-shared';\nimport { DataCubeFunction, DEFAULT_LAMBDA_VARIABLE_NAME, INTERNAL__FILLER_COUNT_AGG_COLUMN_NAME, DataCubeQuerySortOperation, DataCubeQueryFilterOperation, DataCubeQueryFilterGroupOperation, DataCubeAggregateOperation, } from './DataCubeQueryEngine.js';\nimport { DataCubeConfiguration } from './DataCubeConfiguration.js';\n// --------------------------------- UTILITIES ---------------------------------\nfunction _deserializeToLambda(json) {\n return guaranteeType(V1_deserializeValueSpecification(json, []), V1_Lambda);\n}\nexport function _var(name) {\n const variable = new V1_Variable();\n variable.name = name ?? DEFAULT_LAMBDA_VARIABLE_NAME;\n return variable;\n}\nexport function _property(name, variable) {\n const property = new V1_AppliedProperty();\n property.property = name;\n property.parameters.push(variable ?? _var());\n return property;\n}\nexport function _lambda(parameters, body) {\n const lambda = new V1_Lambda();\n lambda.parameters = parameters;\n lambda.body = body;\n return lambda;\n}\nexport function _function(functionName, parameters) {\n const func = new V1_AppliedFunction();\n func.function = functionName;\n func.parameters = parameters;\n return func;\n}\nfunction _collection(values) {\n const collection = new V1_Collection();\n collection.multiplicity = new V1_Multiplicity(values.length, values.length);\n collection.values = values;\n return collection;\n}\nfunction _primitiveValue(type, value) {\n const _val = (primitiveValue, val) => {\n primitiveValue.value = val;\n return primitiveValue;\n };\n switch (type) {\n case PRIMITIVE_TYPE.STRING:\n return _val(new V1_CString(), guaranteeIsString(value));\n case PRIMITIVE_TYPE.BOOLEAN:\n return _val(new V1_CBoolean(), guaranteeIsBoolean(value));\n case PRIMITIVE_TYPE.NUMBER:\n case PRIMITIVE_TYPE.DECIMAL:\n return _val(new V1_CDecimal(), guaranteeIsNumber(value));\n case PRIMITIVE_TYPE.INTEGER:\n return _val(new V1_CInteger(), guaranteeIsNumber(value));\n case PRIMITIVE_TYPE.FLOAT:\n return _val(new V1_CFloat(), guaranteeIsNumber(value));\n case PRIMITIVE_TYPE.DATE:\n case PRIMITIVE_TYPE.DATETIME:\n return _val(new V1_CDateTime(), guaranteeIsString(value));\n case PRIMITIVE_TYPE.STRICTDATE:\n return _val(new V1_CStrictDate(), guaranteeIsString(value));\n case PRIMITIVE_TYPE.STRICTTIME:\n return _val(new V1_CStrictTime(), guaranteeIsString(value));\n default:\n throw new UnsupportedOperationError(`Unsupported value type '${type}'`);\n }\n}\nfunction _elementPtr(fullPath) {\n const ptr = new V1_PackageableElementPtr();\n ptr.fullPath = fullPath;\n return ptr;\n}\nfunction _classInstance(type, value) {\n const instance = new V1_ClassInstance();\n instance.type = type;\n instance.value = value;\n return instance;\n}\nexport function _colSpec(name, function1, function2) {\n const colSpec = new V1_ColSpec();\n colSpec.name = name;\n colSpec.function1 = function1;\n colSpec.function2 = function2;\n return colSpec;\n}\nfunction _parameterValue(value) {\n switch (value.type) {\n case PRIMITIVE_TYPE.STRING:\n case PRIMITIVE_TYPE.BOOLEAN:\n case PRIMITIVE_TYPE.NUMBER:\n case PRIMITIVE_TYPE.DECIMAL:\n case PRIMITIVE_TYPE.INTEGER:\n case PRIMITIVE_TYPE.FLOAT:\n case PRIMITIVE_TYPE.DATE:\n case PRIMITIVE_TYPE.DATETIME:\n case PRIMITIVE_TYPE.STRICTDATE:\n case PRIMITIVE_TYPE.STRICTTIME: {\n if (Array.isArray(value.value)) {\n return _collection(value.value.map((val) => _primitiveValue(value.type, val)));\n }\n return _primitiveValue(value.type, value.value);\n }\n default:\n throw new UnsupportedOperationError(`Unsupported value type '${value.type}'`);\n }\n}\nfunction _aggFunctionName(operation) {\n switch (operation) {\n case DataCubeAggregateOperation.SUM:\n return DataCubeFunction.SUM;\n case DataCubeAggregateOperation.AVERAGE:\n return DataCubeFunction.AVERAGE;\n case DataCubeAggregateOperation.COUNT:\n return DataCubeFunction.COUNT;\n case DataCubeAggregateOperation.MIN:\n return DataCubeFunction.MIN;\n case DataCubeAggregateOperation.MAX:\n return DataCubeFunction.MAX;\n case DataCubeAggregateOperation.FIRST:\n return DataCubeFunction.FIRST;\n case DataCubeAggregateOperation.LAST:\n return DataCubeFunction.LAST;\n case DataCubeAggregateOperation.VAR_POP:\n return DataCubeFunction.VAR_POP;\n case DataCubeAggregateOperation.VAR_SAMP:\n return DataCubeFunction.VAR_SAMP;\n case DataCubeAggregateOperation.STDDEV_POP:\n return DataCubeFunction.STDDEV_POP;\n case DataCubeAggregateOperation.STDDEV_SAMP:\n return DataCubeFunction.STDDEV_SAMP;\n default:\n throw new UnsupportedOperationError(`Unsupported aggregate operation '${operation}'`);\n }\n}\nfunction _agg(agg, variable) {\n const parameters = agg.parameters.map((param) => _parameterValue(param));\n return _function(_aggFunctionName(agg.operation), [\n variable ?? _var(),\n ...parameters,\n ]);\n}\n// --------------------------------- BUILDING BLOCKS ---------------------------------\nexport function _col(name, function1, function2) {\n return _classInstance(V1_ClassInstanceType.COL_SPEC, _colSpec(name, function1, function2));\n}\nexport function _cols(colSpecs) {\n const colSpecArray = new V1_ColSpecArray();\n colSpecArray.colSpecs = colSpecs;\n return _classInstance(V1_ClassInstanceType.COL_SPEC_ARRAY, colSpecArray);\n}\nexport function _groupByAggCols(columns) {\n const variable = _var();\n return columns.length\n ? columns.map((agg) => _colSpec(agg.name, _lambda([variable], [_property(agg.name, variable)]), _lambda([variable], [_agg(agg)])))\n : // if no aggregates are specified, add a dummy count() aggregate to satisfy compiler\n [\n _colSpec(INTERNAL__FILLER_COUNT_AGG_COLUMN_NAME, _lambda([variable], [variable]), _lambda([variable], [_function(DataCubeFunction.COUNT, [variable])])),\n ];\n}\nexport function _filter(filter) {\n if ('groupOperation' in filter) {\n const group = filter;\n const groupOperation = group.groupOperation === DataCubeQueryFilterGroupOperation.AND\n ? DataCubeFunction.AND\n : DataCubeFunction.OR;\n let conditions = [];\n group.conditions.forEach((condition) => {\n conditions.push(_filter(condition));\n // NOTE: a group operation (and/or) function can only have 2 parameters, so we\n // have to breakdown the group operation into nested group functions\n if (conditions.length === 2) {\n conditions = [_function(groupOperation, conditions)];\n }\n });\n return guaranteeNonNullable(conditions[0]);\n }\n else {\n const condition = filter;\n const property = _property(condition.name);\n const _cond = (fn, ...p) => _function(_name(fn), [property, ...p]);\n const _val = () => _parameterValue(guaranteeNonNullable(condition.value));\n const _not = (fn) => _function(_name(DataCubeFunction.NOT), [fn]);\n switch (condition.operation) {\n case DataCubeQueryFilterOperation.EQUAL:\n return _cond(DataCubeFunction.EQUAL, _val());\n case DataCubeQueryFilterOperation.GREATER_THAN:\n return _cond(DataCubeFunction.GREATER_THAN, _val());\n case DataCubeQueryFilterOperation.GREATER_THAN_OR_EQUAL:\n return _cond(DataCubeFunction.GREATER_THAN_EQUAL, _val());\n case DataCubeQueryFilterOperation.LESS_THAN:\n return _cond(DataCubeFunction.LESS_THAN, _val());\n case DataCubeQueryFilterOperation.LESS_THAN_OR_EQUAL:\n return _cond(DataCubeFunction.LESS_THAN_EQUAL, _val());\n case DataCubeQueryFilterOperation.CONTAINS:\n return _cond(DataCubeFunction.CONTAINS, _val());\n case DataCubeQueryFilterOperation.ENDS_WITH:\n return _cond(DataCubeFunction.ENDS_WITH, _val());\n case DataCubeQueryFilterOperation.STARTS_WITH:\n return _cond(DataCubeFunction.STARTS_WITH, _val());\n case DataCubeQueryFilterOperation.BLANK:\n return _cond(DataCubeFunction.IS_EMPTY);\n case DataCubeQueryFilterOperation.NOT_EQUAL:\n return _not(_cond(DataCubeFunction.EQUAL, _val()));\n case DataCubeQueryFilterOperation.NOT_BLANK:\n return _not(_cond(DataCubeFunction.IS_EMPTY));\n case DataCubeQueryFilterOperation.NOT_CONTAINS:\n return _not(_cond(DataCubeFunction.CONTAINS, _val()));\n default:\n throw new UnsupportedOperationError(`Unsupported filter operation '${condition.operation}'`);\n }\n }\n}\nexport function _groupByExtend(columns, columnsUsedInGroupBy) {\n const missingCols = columns.filter((col) => !_findCol(columnsUsedInGroupBy, col.name));\n return missingCols.length\n ? _function(_name(DataCubeFunction.EXTEND), [\n _cols(missingCols.map((col) => _colSpec(col.name, _lambda([_var()], [_primitiveValue(PRIMITIVE_TYPE.STRING, '')])))),\n ])\n : undefined;\n}\n// --------------------------------- MAIN ---------------------------------\nexport function buildExecutableQuery(snapshot, options) {\n const data = snapshot.data;\n const sourceQuery = V1_deserializeValueSpecification(data.sourceQuery, []);\n const configuration = DataCubeConfiguration.serialization.fromJson(data.configuration);\n const sequence = [];\n const funcMap = {};\n const _process = (funcMapKey, func) => {\n sequence.push(func);\n funcMap[funcMapKey] = func;\n };\n // --------------------------------- FILTER ---------------------------------\n if (data.filter) {\n _process('filter', _function(_name(DataCubeFunction.FILTER), [\n _lambda([_var()], [_filter(data.filter)]),\n ]));\n }\n // --------------------------------- LEAF EXTEND ---------------------------------\n if (data.leafExtendedColumns.length) {\n _process('leafExtend', _function(_name(DataCubeFunction.EXTEND), [\n _cols(data.leafExtendedColumns.map((col) => _colSpec(col.name, _deserializeToLambda(col.lambda)))),\n ]));\n }\n // --------------------------------- SELECT ---------------------------------\n if (data.selectColumns.length) {\n _process('select', _function(_name(DataCubeFunction.SELECT), [\n _cols(data.selectColumns.map((col) => _colSpec(col.name))),\n ]));\n }\n // --------------------------------- GROUP BY ---------------------------------\n if (data.groupBy) {\n const groupBy = data.groupBy;\n _process('groupBy', _function(_name(DataCubeFunction.GROUP_BY), [\n _cols(groupBy.columns.map((col) => _colSpec(col.name))),\n _cols(_groupByAggCols(groupBy.aggColumns)),\n ]));\n // extend columns to maintain the same set of columns prior to groupBy()\n const groupByExtend = _groupByExtend(snapshot.stageCols('aggregation'), [\n ...groupBy.columns,\n ...groupBy.aggColumns,\n ]);\n if (groupByExtend) {\n _process('groupByExtend', groupByExtend);\n }\n }\n // --------------------------------- PIVOT ---------------------------------\n // TODO: @akphi - implement this and CAST\n // --------------------------------- GROUP EXTEND ---------------------------------\n if (data.groupExtendedColumns.length) {\n _process('groupExtend', _function(_name(DataCubeFunction.EXTEND), [\n _cols(data.groupExtendedColumns.map((col) => _colSpec(col.name, _deserializeToLambda(col.lambda)))),\n ]));\n }\n // --------------------------------- SORT ---------------------------------\n if (data.sortColumns.length) {\n _process('sort', _function(_name(DataCubeFunction.SORT), [\n _collection(data.sortColumns.map((col) => _function(_name(col.operation === DataCubeQuerySortOperation.ASCENDING\n ? DataCubeFunction.ASC\n : DataCubeFunction.DESC), [_col(col.name)]))),\n ]));\n }\n // --------------------------------- LIMIT ---------------------------------\n if (data.limit) {\n _process('limit', _function(_name(DataCubeFunction.LIMIT), [\n _primitiveValue(PRIMITIVE_TYPE.INTEGER, data.limit),\n ]));\n }\n // --------------------------------- SLICE ---------------------------------\n if (options?.pagination) {\n sequence.push(_function(_name(DataCubeFunction.SLICE), [\n _primitiveValue(PRIMITIVE_TYPE.INTEGER, options.pagination.start),\n _primitiveValue(PRIMITIVE_TYPE.INTEGER, options.pagination.end),\n ]));\n }\n // --------------------------------- FROM ---------------------------------\n sequence.push(_function(_name(DataCubeFunction.FROM), [_elementPtr(data.runtime)]));\n // --------------------------------- FINALIZE ---------------------------------\n options?.postProcessor?.(snapshot, sequence, funcMap, configuration);\n if (!sequence.length) {\n return sourceQuery;\n }\n for (let i = 0; i < sequence.length; i++) {\n guaranteeNonNullable(sequence[i]).parameters.unshift(i === 0 ? sourceQuery : guaranteeNonNullable(sequence[i - 1]));\n }\n return guaranteeNonNullable(sequence[sequence.length - 1]);\n}\n//# sourceMappingURL=DataCubeQueryBuilder.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF 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 } from '@finos/legend-graph';\nimport { DataCubeColumnConfiguration, DataCubeConfiguration, } from './DataCubeConfiguration.js';\nimport { DataCubeColumnKind, DataCubeFontTextAlignment, } from './DataCubeQueryEngine.js';\nexport function buildDefaultColumnConfiguration(column) {\n const { name, type } = column;\n const config = new DataCubeColumnConfiguration(name, type);\n switch (type) {\n case PRIMITIVE_TYPE.NUMBER:\n case PRIMITIVE_TYPE.INTEGER:\n case PRIMITIVE_TYPE.DECIMAL:\n case PRIMITIVE_TYPE.FLOAT: {\n config.kind = DataCubeColumnKind.MEASURE;\n config.decimals = type === PRIMITIVE_TYPE.INTEGER ? 0 : 2;\n config.displayCommas = true;\n config.negativeNumberInParens = true;\n config.textAlign = DataCubeFontTextAlignment.RIGHT; // always align number to the right\n break;\n }\n default: {\n break;\n }\n }\n return config;\n}\nexport function buildDefaultConfiguration(columns) {\n const configuration = new DataCubeConfiguration();\n configuration.columns = columns.map((column) => buildDefaultColumnConfiguration(column));\n return configuration;\n}\n//# sourceMappingURL=DataCubeConfigurationBuilder.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS 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 * [CORE]\n *\n * These are utilities used to build the query snapshot from the executable query.\n * This is needed when we initialize the application by loading a persisted query.\n ***************************************************************************************/\nimport { PRIMITIVE_TYPE, V1_AppliedFunction, V1_CInteger, V1_ClassInstance, V1_ColSpec, V1_ColSpecArray, V1_Collection, V1_Lambda, V1_serializeValueSpecification, extractElementNameFromPath as _name, matchFunctionName, } from '@finos/legend-graph';\nimport { DataCubeQuerySnapshot, } from './DataCubeQuerySnapshot.js';\nimport { assertTrue, assertType, guaranteeNonNullable, guaranteeType, UnsupportedOperationError, } from '@finos/legend-shared';\nimport { DataCubeQuerySortOperation, DataCubeFunction, DataCubeAggregateOperation, } from './DataCubeQueryEngine.js';\nimport { DataCubeConfiguration } from './DataCubeConfiguration.js';\nimport { buildDefaultConfiguration } from './DataCubeConfigurationBuilder.js';\n// --------------------------------- UTILITIES ---------------------------------\nfunction _param(func, paramIdx, clazz) {\n assertTrue(func.parameters.length >= paramIdx + 1, `Can't process ${_name(func.function)}: Expected at least ${paramIdx + 1} parameter(s)`);\n return guaranteeType(func.parameters[paramIdx], clazz, `Can't process ${_name(func.function)}: Found unexpected type for parameter at index ${paramIdx}`);\n}\nfunction _colSpecParam(func, paramIdx) {\n return guaranteeType(_param(func, paramIdx, V1_ClassInstance).value, V1_ColSpec, `Can't process ${_name(func.function)}: Expected parameter at index ${paramIdx} to be a column specification`);\n}\nfunction _colSpecArrayParam(func, paramIdx) {\n return guaranteeType(_param(func, paramIdx, V1_ClassInstance).value, V1_ColSpecArray, `Can't process ${_name(func.function)}: Expected parameter at index ${paramIdx} to be a column specification list`);\n}\nfunction _funcMatch(value, functionNames) {\n assertType(value, V1_AppliedFunction, `Can't process function: Found unexpected value specification type`);\n assertTrue(matchFunctionName(value.function, Array.isArray(functionNames) ? functionNames : [functionNames]), `Can't process function: Expected function name to be one of [${Array.isArray(functionNames) ? functionNames.join(', ') : functionNames}]`);\n return value;\n}\nfunction _aggFuncMatch(value, functionNames) {\n assertType(value, V1_Lambda, `Can't process aggregation: Found unexpected value specification type`);\n return _funcMatch(value.body[0], functionNames);\n}\nexport function _defaultAggCol(name, type) {\n switch (type) {\n case PRIMITIVE_TYPE.NUMBER:\n case PRIMITIVE_TYPE.INTEGER:\n case PRIMITIVE_TYPE.DECIMAL:\n case PRIMITIVE_TYPE.FLOAT: {\n return {\n name,\n type,\n operation: DataCubeAggregateOperation.SUM,\n parameters: [],\n };\n }\n default:\n return undefined;\n }\n}\nfunction _aggCol(colSpec, column) {\n const func = _aggFuncMatch(colSpec.function2, Object.values(DataCubeFunction));\n if (matchFunctionName(func.function, DataCubeFunction.COUNT)) {\n return {\n ...column,\n operation: DataCubeAggregateOperation.COUNT,\n parameters: [],\n };\n }\n else if (matchFunctionName(func.function, DataCubeFunction.SUM)) {\n return {\n ...column,\n operation: DataCubeAggregateOperation.SUM,\n parameters: [],\n };\n }\n else if (matchFunctionName(func.function, DataCubeFunction.AVERAGE)) {\n return {\n ...column,\n operation: DataCubeAggregateOperation.AVERAGE,\n parameters: [],\n };\n }\n else if (matchFunctionName(func.function, DataCubeFunction.MIN)) {\n return {\n ...column,\n operation: DataCubeAggregateOperation.MIN,\n parameters: [],\n };\n }\n else if (matchFunctionName(func.function, DataCubeFunction.MAX)) {\n return {\n ...column,\n operation: DataCubeAggregateOperation.MAX,\n parameters: [],\n };\n }\n else if (matchFunctionName(func.function, DataCubeFunction.FIRST)) {\n return {\n ...column,\n operation: DataCubeAggregateOperation.FIRST,\n parameters: [],\n };\n }\n else if (matchFunctionName(func.function, DataCubeFunction.LAST)) {\n return {\n ...column,\n operation: DataCubeAggregateOperation.LAST,\n parameters: [],\n };\n }\n else if (matchFunctionName(func.function, DataCubeFunction.VAR_POP)) {\n return {\n ...column,\n operation: DataCubeAggregateOperation.VAR_POP,\n parameters: [],\n };\n }\n else if (matchFunctionName(func.function, DataCubeFunction.VAR_SAMP)) {\n return {\n ...column,\n operation: DataCubeAggregateOperation.VAR_SAMP,\n parameters: [],\n };\n }\n else if (matchFunctionName(func.function, DataCubeFunction.STDDEV_POP)) {\n return {\n ...column,\n operation: DataCubeAggregateOperation.STDDEV_POP,\n parameters: [],\n };\n }\n else if (matchFunctionName(func.function, DataCubeFunction.STDDEV_SAMP)) {\n return {\n ...column,\n operation: DataCubeAggregateOperation.STDDEV_SAMP,\n parameters: [],\n };\n }\n else {\n throw new UnsupportedOperationError(`Unsupported aggregate function '${func.function}'`);\n }\n}\n// --------------------------------- BUILDING BLOCKS ---------------------------------\nconst _SUPPORTED_TOP_LEVEL_FUNCTIONS = [\n { func: DataCubeFunction.FILTER, parameters: 1 },\n { func: DataCubeFunction.EXTEND, parameters: 1 },\n { func: DataCubeFunction.SELECT, parameters: 1 },\n { func: DataCubeFunction.GROUP_BY, parameters: 3 },\n { func: DataCubeFunction.LIMIT, parameters: 1 },\n { func: DataCubeFunction.PIVOT, parameters: 3 },\n { func: DataCubeFunction.SORT, parameters: 1 },\n { func: DataCubeFunction.CAST, parameters: 1 },\n];\n// NOTE: this corresponds to the sequence:\n// filter()->extend()->groupBy()->select()->pivot()->cast()->extend()->sort()->limit()\n// which represents the ONLY query shape that we currently support\nconst _FUNCTION_SEQUENCE_COMPOSITION_PATTERN = [\n { func: DataCubeFunction.FILTER },\n { func: DataCubeFunction.EXTEND },\n { func: DataCubeFunction.SELECT },\n { func: DataCubeFunction.GROUP_BY },\n { func: DataCubeFunction.PIVOT },\n { func: DataCubeFunction.CAST },\n { func: DataCubeFunction.EXTEND },\n { func: DataCubeFunction.SORT },\n { func: DataCubeFunction.LIMIT },\n];\nconst _FUNCTION_SEQUENCE_COMPOSITION_PATTERN_REGEXP = new RegExp(`^${_FUNCTION_SEQUENCE_COMPOSITION_PATTERN\n .map((entry) => `(?:<${_name(entry.func)}>)${entry.repeat ? '*' : !entry.required ? '?' : ''}`)\n .join('')}$`);\n/**\n * Since the query created by DataCube will be a chain call of various functions,\n * this utility function will extract that sequence of function calls as well as\n * do various basic checks for the validity, composition, and order of those functions.\n */\nfunction extractQueryFunctionSequence(query) {\n // Make sure this is a sequence of function calls\n if (!(query instanceof V1_AppliedFunction)) {\n throw new Error(`Query must be a sequence of function calls (e.g. x()->y()->z())`);\n }\n const sequence = [];\n let currentQuery = query;\n while (currentQuery instanceof V1_AppliedFunction) {\n const supportedFunc = _SUPPORTED_TOP_LEVEL_FUNCTIONS.find((spec) => matchFunctionName(currentQuery.function, spec.func));\n // Check that all functions in sequence are supported\n if (!supportedFunc) {\n throw new Error(`Found unsupported function ${currentQuery.function}()`);\n }\n if (currentQuery.parameters.length > supportedFunc.parameters) {\n const vs = currentQuery.parameters[0];\n if (!(vs instanceof V1_AppliedFunction)) {\n throw new Error(`Query must be a sequence of function calls (e.g. x()->y()->z())`);\n }\n currentQuery.parameters = currentQuery.parameters.slice(1);\n sequence.unshift(currentQuery);\n currentQuery = vs;\n }\n else {\n sequence.unshift(currentQuery);\n break;\n }\n }\n // Check that sequence follows the supported pattern\n const sequenceFormText = sequence\n .map((func) => `<${_name(func.function)}>`)\n .join('');\n if (!sequenceFormText.match(_FUNCTION_SEQUENCE_COMPOSITION_PATTERN_REGEXP)) {\n throw new Error(`Unsupported function composition ${sequence.map((fn) => `${_name(fn.function)}()`).join('->')} (supported composition: ${_FUNCTION_SEQUENCE_COMPOSITION_PATTERN.map((entry) => `${_name(entry.func)}()`).join('->')})`);\n }\n // Special checks\n // Check that the first and second extend() must be separated by either groupBy() or pivot() (i.e. aggregation)\n const firstExtendIndex = sequence.findIndex((func) => matchFunctionName(func.function, DataCubeFunction.EXTEND));\n const secondExtendIndex = sequence.findLastIndex((func) => matchFunctionName(func.function, DataCubeFunction.EXTEND));\n if (firstExtendIndex !== -1 && firstExtendIndex !== secondExtendIndex) {\n const seq = sequence.slice(firstExtendIndex + 1, secondExtendIndex);\n if (!seq.some((func) => matchFunctionName(func.function, DataCubeFunction.GROUP_BY) ||\n matchFunctionName(func.function, DataCubeFunction.PIVOT))) {\n throw new Error(`Found invalid usage of group-level extend() for query without aggregation such as pivot() and groupBy()`);\n }\n }\n // Check that pivot() and cast() must co-present and stand consecutively in the sequence\n const pivotFunc = sequence.find((func) => matchFunctionName(func.function, DataCubeFunction.PIVOT));\n const castFunc = sequence.find((func) => matchFunctionName(func.function, DataCubeFunction.CAST));\n if (Boolean(pivotFunc) !== Boolean(castFunc)) {\n throw new Error(`Found usage of dynamic function pivot() without casting`);\n }\n return sequence;\n}\n/**\n * Turn the function sequence into a map of available functions\n * for easier construction of the snapshot\n */\nfunction extractFunctionMap(sequence) {\n let leafExtend = undefined;\n let groupExtend = undefined;\n const aggregationFuncIndex = sequence.findLastIndex((func) => matchFunctionName(func.function, [\n DataCubeFunction.PIVOT,\n DataCubeFunction.GROUP_BY,\n ]));\n const firstExtendIndex = sequence.findIndex((func) => matchFunctionName(func.function, DataCubeFunction.EXTEND));\n const secondExtendIndex = sequence.findLastIndex((func) => matchFunctionName(func.function, DataCubeFunction.EXTEND));\n if (aggregationFuncIndex !== -1) {\n if (firstExtendIndex !== secondExtendIndex) {\n leafExtend = sequence[firstExtendIndex];\n groupExtend = sequence[secondExtendIndex];\n }\n }\n else {\n if (firstExtendIndex !== -1) {\n leafExtend = sequence[firstExtendIndex];\n }\n }\n const select = sequence.find((func) => matchFunctionName(func.function, DataCubeFunction.SELECT));\n const filter = sequence.find((func) => matchFunctionName(func.function, DataCubeFunction.FILTER));\n const groupBy = sequence.find((func) => matchFunctionName(func.function, DataCubeFunction.GROUP_BY));\n const pivot = sequence.find((func) => matchFunctionName(func.function, DataCubeFunction.PIVOT));\n const pivotCast = sequence.find((func) => matchFunctionName(func.function, DataCubeFunction.CAST));\n const sort = sequence.find((func) => matchFunctionName(func.function, DataCubeFunction.SORT));\n const limit = sequence.find((func) => matchFunctionName(func.function, DataCubeFunction.LIMIT));\n return {\n leafExtend,\n select,\n filter,\n groupBy,\n pivot,\n pivotCast,\n groupExtend,\n sort,\n limit,\n };\n}\n// --------------------------------- MAIN ---------------------------------\n/**\n * Analyze the partial query to build a query snapshot.\n *\n * Implementation-wise, this extracts the function call sequence, then walk the\n * sequence in order to fill in the information for the snapshot.\n */\nexport function validateAndBuildQuerySnapshot(partialQuery, sourceQuery, baseQuery) {\n // --------------------------------- BASE ---------------------------------\n // Build the function call sequence and the function map to make the\n // analysis more ergonomic\n const sequence = extractQueryFunctionSequence(partialQuery);\n const funcMap = extractFunctionMap(sequence);\n const snapshot = DataCubeQuerySnapshot.create(baseQuery.name, baseQuery.source.runtime, V1_serializeValueSpecification(sourceQuery, []), {});\n const data = snapshot.data;\n const colsMap = new Map();\n const _col = (colSpec) => {\n const column = guaranteeNonNullable(colsMap.get(colSpec.name), `Can't find column '${colSpec.name}'`);\n return {\n name: column.name,\n type: column.type,\n };\n };\n // --------------------------------- SOURCE ---------------------------------\n data.sourceColumns = baseQuery.source.columns.map((col) => ({\n name: col.name,\n type: col.type,\n }));\n data.sourceColumns.map((col) => colsMap.set(col.name, col));\n // --------------------------------- FILTER ---------------------------------\n if (funcMap.filter) {\n // data.selectColumns = _colSpecArrayParam(funcMap.select, 0).colSpecs.map(\n // (colSpec) => ({\n // _col(colSpec),\n // }),\n // );\n }\n // --------------------------------- LEAF EXTEND ---------------------------------\n // TODO: @akphi - implement this\n // --------------------------------- SELECT ---------------------------------\n if (funcMap.select) {\n data.selectColumns = _colSpecArrayParam(funcMap.select, 0).colSpecs.map((colSpec) => _col(colSpec));\n }\n // --------------------------------- GROUP BY ---------------------------------\n if (funcMap.groupBy) {\n data.groupBy = {\n columns: _colSpecArrayParam(funcMap.groupBy, 0).colSpecs.map((colSpec) => _col(colSpec)),\n aggColumns: _colSpecArrayParam(funcMap.groupBy, 1).colSpecs.map((colSpec) => _aggCol(colSpec, _col(colSpec))),\n // TODO: verify agg columns agree with pivot agg columns\n // TODO: verify groupByExtend expression that all columns are accounted for\n };\n }\n // --------------------------------- PIVOT ---------------------------------\n // TODO: @akphi - implement this\n // --------------------------------- CAST ---------------------------------\n // TODO: @akphi - implement this\n // --------------------------------- GROUP EXTEND ---------------------------------\n // TODO: @akphi - implement this\n // --------------------------------- SORT ---------------------------------\n if (funcMap.sort) {\n data.sortColumns = _param(funcMap.sort, 0, V1_Collection).values.map((value) => {\n const sortColFunc = _funcMatch(value, [\n DataCubeFunction.ASC,\n DataCubeFunction.DESC,\n ]);\n return {\n ..._col(_colSpecParam(sortColFunc, 0)),\n operation: _name(sortColFunc.function) === DataCubeFunction.ASC\n ? DataCubeQuerySortOperation.ASCENDING\n : DataCubeQuerySortOperation.DESCENDING,\n };\n });\n }\n // --------------------------------- LIMIT ---------------------------------\n if (funcMap.limit) {\n const value = funcMap.limit.parameters[0];\n assertType(value, V1_CInteger);\n data.limit = value.value;\n }\n // --------------------------------- CONFIGURATION ---------------------------------\n // The data query takes precedence over the configuration, we do this for 2 reasons\n // 1. The purpose of the configuration is to provide the layout and styling\n // customization on top of the data query result grid. If conflicts happen between\n // the configuration and the query, we will reconciliate by modifying the configuration\n // 2. The configuration when missing, can be generated from default presets. This helps\n // helps with use cases where the query might comes from a different source, such as\n // Studio or Query, or another part of Engine.\n const configuration = baseQuery.configuration\n ? DataCubeConfiguration.serialization.fromJson(baseQuery.configuration)\n : buildDefaultConfiguration(baseQuery.source.columns);\n data.configuration =\n DataCubeConfiguration.serialization.toJson(configuration);\n // TODO: @akphi - implement the logic to reconcile the configuration with the query\n // - columns (missing/extra columns - remove or generate default column configuration)\n // - column kind\n // - column type\n // - base off the type, check the settings\n // - aggregation\n return snapshot.finalize();\n}\n//# sourceMappingURL=DataCubeQuerySnapshotBuilder.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { _getCol, } from '../core/DataCubeQuerySnapshot.js';\nimport { GridClientSortDirection } from './DataCubeGridClientEngine.js';\nimport { DataCubeColumnKind, DataCubeQuerySortOperation, } from '../core/DataCubeQueryEngine.js';\nimport { DataCubeConfiguration } from '../core/DataCubeConfiguration.js';\nimport { _defaultAggCol } from '../core/DataCubeQuerySnapshotBuilder.js';\nimport { isNonNullable } from '@finos/legend-shared';\nexport function _groupByAggCols(groupBy, configuration) {\n return configuration.columns\n .filter((column) => column.kind === DataCubeColumnKind.MEASURE &&\n !groupBy?.columns.find((col) => col.name === column.name))\n .map((column) => groupBy?.aggColumns.find((col) => col.name === column.name) ??\n _defaultAggCol(column.name, column.type))\n .filter(isNonNullable);\n}\n// --------------------------------- MAIN ---------------------------------\nexport function buildQuerySnapshot(request, baseSnapshot) {\n const configuration = DataCubeConfiguration.serialization.fromJson(baseSnapshot.data.configuration);\n const snapshot = baseSnapshot.clone();\n // --------------------------------- GROUP BY ---------------------------------\n if (request.rowGroupCols.length) {\n const availableCols = baseSnapshot.stageCols('aggregation');\n snapshot.data.groupBy = {\n columns: request.rowGroupCols.map((col) => ({\n name: col.id,\n type: _getCol(availableCols, col.id).type,\n })),\n aggColumns: _groupByAggCols(baseSnapshot.data.groupBy, configuration),\n };\n }\n else {\n snapshot.data.groupBy = undefined;\n }\n // --------------------------------- SORT ---------------------------------\n snapshot.data.sortColumns = request.sortModel.map((item) => ({\n ..._getCol(baseSnapshot.stageCols('sort'), item.colId),\n operation: item.sort === GridClientSortDirection.ASCENDING\n ? DataCubeQuerySortOperation.ASCENDING\n : DataCubeQuerySortOperation.DESCENDING,\n }));\n // --------------------------------- FINALIZE ---------------------------------\n return snapshot.finalize();\n}\n//# sourceMappingURL=DataCubeGridQuerySnapshotBuilder.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF 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, extractElementNameFromPath as _name, } from '@finos/legend-graph';\nimport {} from '../core/DataCubeQuerySnapshot.js';\nimport { DataCubeQueryFilterGroupOperation, DataCubeQueryFilterOperation, DataCubeFunction, } from '../core/DataCubeQueryEngine.js';\nimport { guaranteeNonNullable, isNullable } from '@finos/legend-shared';\nimport { _groupByAggCols, _colSpec, _cols, _filter, _function, _groupByExtend, _lambda, _var, } from '../core/DataCubeQueryBuilder.js';\nimport { INTERNAL__GRID_CLIENT_MISSING_VALUE, INTERNAL__GRID_CLIENT_ROW_GROUPING_COUNT_AGG_COLUMN_ID, } from './DataCubeGridClientEngine.js';\n/*****************************************************************************\n * [GRID]\n *\n * These are utilities used to build adhoc executable queries for fetching\n * data for the grid. The grid comes with features that requires building\n * slight modifications of the persistent query that would be generated from\n * the snapshot, such as in the case of pagination, drilldown (group by).\n *****************************************************************************/\n// --------------------------------- BUILDING BLOCKS ---------------------------------\nfunction _rowGroupingCountCol() {\n const variable = _var();\n return _colSpec(INTERNAL__GRID_CLIENT_ROW_GROUPING_COUNT_AGG_COLUMN_ID, _lambda([variable], [variable]), _lambda([variable], [_function(DataCubeFunction.COUNT, [variable])]));\n}\n// --------------------------------- MAIN ---------------------------------\nexport function generateRowGroupingDrilldownExecutableQueryPostProcessor(drilldownValues) {\n return (snapshot, sequence, funcMap, configuration) => {\n const _unprocess = (funcMapKey) => {\n const func = funcMap[funcMapKey];\n if (func) {\n sequence.splice(sequence.indexOf(func), 1);\n funcMap[funcMapKey] = undefined;\n }\n };\n const data = snapshot.data;\n if (funcMap.groupBy) {\n // --------------------------------- GROUP BY ---------------------------------\n const groupBy = guaranteeNonNullable(data.groupBy);\n // if any level of drilldown has been done\n // add a pre-filter to groupBy()\n if (drilldownValues.length) {\n sequence.splice(sequence.indexOf(funcMap.groupBy), 0, _function(_name(DataCubeFunction.FILTER), [\n _lambda([_var()], [\n _filter({\n conditions: drilldownValues.map((value, i) => {\n const groupByColumn = guaranteeNonNullable(groupBy.columns[i]);\n if (isNullable(value) ||\n value === INTERNAL__GRID_CLIENT_MISSING_VALUE) {\n return {\n ...groupByColumn,\n operation: DataCubeQueryFilterOperation.BLANK,\n value: undefined,\n };\n }\n const condition = {\n ...groupByColumn,\n operation: DataCubeQueryFilterOperation.EQUAL,\n value: undefined,\n };\n switch (groupByColumn.type) {\n case PRIMITIVE_TYPE.BOOLEAN:\n return {\n ...condition,\n value: {\n type: PRIMITIVE_TYPE.BOOLEAN,\n value: value === 'true',\n },\n };\n case PRIMITIVE_TYPE.INTEGER:\n return {\n ...condition,\n value: {\n type: groupByColumn.type,\n value: parseInt(value, 10),\n },\n };\n case PRIMITIVE_TYPE.NUMBER:\n case PRIMITIVE_TYPE.DECIMAL:\n case PRIMITIVE_TYPE.FLOAT:\n return {\n ...condition,\n value: {\n type: groupByColumn.type,\n value: parseFloat(value),\n },\n };\n case PRIMITIVE_TYPE.STRING:\n case PRIMITIVE_TYPE.DATE:\n case PRIMITIVE_TYPE.DATETIME:\n case PRIMITIVE_TYPE.STRICTDATE:\n case PRIMITIVE_TYPE.STRICTTIME:\n default:\n return {\n ...condition,\n value: { type: groupByColumn.type, value },\n };\n }\n }),\n groupOperation: DataCubeQueryFilterGroupOperation.AND,\n }),\n ]),\n ]));\n }\n // modify groupBy() based off the current drilldown level\n if (drilldownValues.length < groupBy.columns.length) {\n const groupByIdx = sequence.indexOf(funcMap.groupBy);\n const groupByColumns = groupBy.columns.slice(0, drilldownValues.length + 1);\n const groupByFunc = _function(_name(DataCubeFunction.GROUP_BY), [\n _cols(groupByColumns.map((col) => _colSpec(col.name))),\n _cols([\n ..._groupByAggCols(groupBy.aggColumns),\n _rowGroupingCountCol(),\n ]),\n ]);\n sequence[groupByIdx] = groupByFunc;\n funcMap.groupBy = groupByFunc;\n // extend columns to maintain the same set of columns prior to groupBy()\n const groupByExtend = _groupByExtend(snapshot.stageCols('aggregation'), [...groupByColumns, ...groupBy.aggColumns]);\n _unprocess('groupByExtend');\n funcMap.groupByExtend = groupByExtend;\n if (groupByExtend) {\n sequence.splice(groupByIdx + 1, 0, groupByExtend);\n }\n }\n else {\n // when maximum level of drilldown is reached, we simply just need to\n // filter the data to match drilldown values, no groupBy() is needed.\n _unprocess('groupBy');\n _unprocess('groupByExtend');\n }\n // --------------------------------- PIVOT ---------------------------------\n // TODO: @akphi - implement this and CAST\n }\n };\n}\n//# sourceMappingURL=DataCubeGridQueryBuilder.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF 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';\nimport { clsx } from 'clsx';\nimport { twMerge } from 'tailwind-merge';\nexport { clsx };\nexport { Portal } from '@mui/material';\nexport function cn(...inputs) {\n return twMerge(clsx(inputs));\n}\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 { Global, css } from '@emotion/react';\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 */\n// NOTE: the icons in this file is pertained to only Data Cube, before\n// merging them in the main icon registry, we should review them\nimport { GoBrowser, GoPin, GoX } from 'react-icons/go';\nimport { GrCheckbox, GrCheckboxSelected } from 'react-icons/gr';\nimport { MdOutlineFormatBold, MdOutlineFormatItalic, MdOutlineStrikethroughS, MdOutlineFormatUnderlined, MdOutlineInsertPageBreak, } from 'react-icons/md';\nimport { PiMouseScroll, PiTextAlignCenter, PiTextAlignLeft, PiTextAlignRight, } from 'react-icons/pi';\nimport { RxLetterCaseCapitalize } from 'react-icons/rx';\nimport { TbBook, TbCube, TbNote, TbTable, TbTableColumn, TbTableRow, TbTableDown, TbTableOptions, TbColumnInsertRight, TbTablePlus, TbColumnRemove, TbColumns3, TbFreezeRow, TbFreezeColumn, TbFreezeRowColumn, TbCode, TbFilter, TbFilterPlus, TbFilterCode, TbSettingsFilled, TbChevronLeft, TbChevronRight, TbSearch, TbAlertTriangle, TbExclamationCircle, TbCaretDownFilled, TbLoader2, TbSettingsBolt, TbSettings, TbChevronDown, TbCaretRightFilled, TbMenu2, TbBug, } from 'react-icons/tb';\nimport { VscError, VscInfo, VscQuestion, VscWarning } from 'react-icons/vsc';\nexport const DataCubeIcon = {\n AdvancedSettings: TbSettingsBolt,\n AlertError: VscError,\n AlertInfo: VscInfo,\n AlertWarning: VscWarning,\n CaretDown: TbCaretDownFilled,\n CaretRight: TbCaretRightFilled,\n Checkbox: GrCheckbox,\n CheckboxSelected: GrCheckboxSelected,\n ChevronLeft: TbChevronLeft,\n ChevronRight: TbChevronRight,\n ChevronDown: TbChevronDown,\n Code: TbCode,\n Cube: TbCube,\n Debug: TbBug,\n Documentation: TbBook,\n DocumentationHint: VscQuestion,\n FontBold: MdOutlineFormatBold,\n FontCase: RxLetterCaseCapitalize,\n FontItalic: MdOutlineFormatItalic,\n FontUnderline: MdOutlineFormatUnderlined,\n FontStrikethrough: MdOutlineStrikethroughS,\n Loader: TbLoader2,\n Menu: TbMenu2,\n Note: TbNote,\n Pin: GoPin,\n Search: TbSearch,\n Settings: TbSettings,\n Table: TbTable,\n TableColumn: TbFreezeColumn,\n TableColumnOptions__Settings: TbSettingsFilled,\n TableColumns: TbColumns3,\n TableExtendedColumn: TbColumnInsertRight,\n TableFilter: TbFilter,\n TableFilterPlus: TbFilterPlus,\n TableFilterCode: TbFilterCode,\n TableGroupBy: TbTableColumn,\n TableOptions: TbTableOptions,\n TablePagination: MdOutlineInsertPageBreak,\n TablePivot: TbTableRow,\n TablePlus: TbTablePlus,\n TableRemoveColumn: TbColumnRemove,\n TableRow: TbFreezeRow,\n TableRowColumn: TbFreezeRowColumn,\n TableScroll: PiMouseScroll,\n TableSort: TbTableDown,\n TextAlignLeft: PiTextAlignLeft,\n TextAlignCenter: PiTextAlignCenter,\n TextAlignRight: PiTextAlignRight,\n Window: GoBrowser,\n X: GoX,\n Warning: TbAlertTriangle,\n WarningCircle: TbExclamationCircle,\n};\n//# sourceMappingURL=DataCubeIcon.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 { ActionAlertType, useApplicationStore, } from '@finos/legend-application';\nimport { cn, DataCubeIcon, Dialog } from '@finos/legend-art';\nimport { isString, noop } from '@finos/legend-shared';\nimport { observer } from 'mobx-react-lite';\nimport { useRef } from 'react';\nexport var AlertType;\n(function (AlertType) {\n AlertType[\"INFO\"] = \"INFO\";\n AlertType[\"WARNING\"] = \"WARNING\";\n AlertType[\"ERROR\"] = \"ERROR\";\n})(AlertType || (AlertType = {}));\nexport function Alert(props) {\n const { message, type, text, actions = [], onClose } = props;\n return (_jsxs(\"div\", { className: \"h-full w-full\", children: [_jsxs(\"div\", { className: cn('flex w-full overflow-auto p-6', {\n 'h-[calc(100%_-_40px)]': actions.length !== 0,\n 'h-full': !actions.length,\n }), children: [_jsxs(\"div\", { className: \"mr-3\", children: [type === AlertType.INFO && (_jsx(DataCubeIcon.AlertInfo, { className: \"flex-shrink-0 stroke-[0.5px] text-[40px] text-sky-500\" })), type === AlertType.WARNING && (_jsx(DataCubeIcon.AlertWarning, { className: \"flex-shrink-0 stroke-[0.3px] text-[40px] text-amber-500\" })), type === AlertType.ERROR && (_jsx(DataCubeIcon.AlertError, { className: \"flex-shrink-0 stroke-[0.5px] text-[40px] text-red-500\" }))] }), _jsxs(\"div\", { children: [_jsx(\"div\", { className: \"whitespace-break-spaces text-lg\", children: message }), _jsx(\"div\", { className: \"mt-1 whitespace-break-spaces text-neutral-500\", children: text })] })] }), actions.length !== 0 && (_jsx(\"div\", { className: \"flex h-10 items-center justify-center border border-t-neutral-300 px-2\", children: actions.map((action, idx) => (_jsx(\"button\", { className: \"ml-2 h-6 border border-neutral-400 bg-neutral-300 px-2 first-of-type:ml-0 hover:brightness-95\", onClick: () => {\n action.handler();\n onClose?.();\n }, autoFocus: idx === 0, children: action.label }, idx))) }))] }));\n}\nconst BlockingActionAlertContent = observer((props) => {\n const { info } = props;\n const { title, message, prompt, type, onClose, actions } = info;\n const ref = useRef(null);\n const application = useApplicationStore();\n const handleClose = () => {\n onClose?.();\n application.alertService.setActionAlertInfo(undefined);\n };\n // set the width and height of the dialog to make sure content overflow works properly\n const handleEnter = () => {\n if (ref.current?.parentElement) {\n const { width, height } = ref.current.parentElement.getBoundingClientRect();\n ref.current.style.width = `${width}px`;\n ref.current.style.height = `${height}px`;\n }\n };\n return (_jsx(Dialog, { open: Boolean(application.alertService.actionAlertInfo), onClose: noop, TransitionProps: {\n onEnter: handleEnter,\n }, PaperProps: {\n elevation: 0,\n }, slotProps: {\n backdrop: {\n classes: {\n root: 'bg-black !opacity-25',\n },\n },\n }, classes: {\n root: 'h-full w-full flex items-center justify-center',\n paper: 'min-h-10 min-w-40 rounded-none shadow-md',\n }, children: _jsxs(\"div\", { className: \"border border-neutral-400 bg-neutral-200 shadow-xl\", ref: ref, children: [_jsx(\"div\", { className: \"flex h-6 w-full select-none items-center justify-between border-b border-b-neutral-300 bg-white\", children: _jsx(\"div\", { className: \"px-2\", children: title ?? '' }) }), _jsx(\"div\", { className: \"h-[calc(100%_-_24px)] w-full\", children: _jsx(Alert, { type: type === ActionAlertType.STANDARD\n ? AlertType.INFO\n : type === ActionAlertType.CAUTION\n ? AlertType.WARNING\n : AlertType.ERROR, message: message, text: prompt, actions: actions\n .filter((action) => isString(action.label))\n .sort((a, b) => (a.default ? -1 : 1))\n .map((action) => ({\n label: action.label,\n handler: () => {\n action.handler?.();\n handleClose();\n },\n })) }) })] }) }));\n});\nexport const BlockingActionAlert = observer(() => {\n const application = useApplicationStore();\n const info = application.alertService.actionAlertInfo;\n if (!info) {\n return null;\n }\n return _jsx(BlockingActionAlertContent, { info: info });\n});\n//# sourceMappingURL=Alert.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF 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 { action, computed, makeObservable, observable, runInAction, } from 'mobx';\nexport class LayoutConfiguration {\n title;\n contentRenderer;\n window = {};\n constructor(title, contentRenderer) {\n this.contentRenderer = contentRenderer;\n this.title = title;\n }\n}\nexport class WindowState {\n uuid = uuid();\n configuration;\n onClose;\n constructor(configuration, onClose) {\n this.configuration = configuration;\n this.onClose = onClose;\n }\n}\nexport class LayoutManagerState {\n application;\n windows = [];\n constructor(application) {\n makeObservable(this, {\n windows: observable,\n newWindow: action,\n bringWindowFront: action,\n closeWindow: action,\n });\n this.application = application;\n }\n newWindow(window) {\n this.windows.push(window);\n }\n bringWindowFront(window) {\n const matchingWindow = this.windows.find((w) => w.uuid === window.uuid);\n if (matchingWindow) {\n this.windows = this.windows.filter((w) => w.uuid !== window.uuid);\n this.windows.push(window);\n }\n }\n closeWindow(window) {\n const matchingWindow = this.windows.find((w) => w.uuid === window.uuid);\n if (matchingWindow) {\n this.windows = this.windows.filter((w) => w.uuid !== window.uuid);\n window.onClose?.();\n }\n }\n}\nexport const WINDOW_DEFAULT_OFFSET = 50;\nexport const WINDOW_DEFAULT_WIDTH = 800;\nexport const WINDOW_DEFAULT_HEIGHT = 600;\nexport const WINDOW_DEFAULT_MIN_WIDTH = 300;\nexport const WINDOW_DEFAULT_MIN_HEIGHT = 300;\nexport const DEFAULT_TOOL_PANEL_WINDOW_CONFIG = {\n width: WINDOW_DEFAULT_WIDTH,\n height: WINDOW_DEFAULT_HEIGHT,\n minWidth: WINDOW_DEFAULT_MIN_WIDTH,\n minHeight: WINDOW_DEFAULT_MIN_HEIGHT,\n center: true,\n};\nexport const DEFAULT_SMALL_ALERT_WINDOW_CONFIG = {\n width: 500,\n height: 80,\n minWidth: 200,\n minHeight: 80,\n center: true,\n};\nexport const DEFAULT_LARGE_ALERT_WINDOW_CONFIG = {\n width: 600,\n height: 200,\n minWidth: 300,\n minHeight: 150,\n center: true,\n};\nexport class SingletonModeDisplayState {\n layoutManagerState;\n configuration;\n window;\n constructor(layoutManagerState, title, contentRenderer) {\n makeObservable(this, {\n window: observable,\n isOpen: computed,\n open: action,\n close: action,\n });\n this.layoutManagerState = layoutManagerState;\n this.configuration = new LayoutConfiguration(title, contentRenderer);\n this.configuration.window = DEFAULT_TOOL_PANEL_WINDOW_CONFIG;\n }\n get isOpen() {\n return Boolean(this.window);\n }\n open() {\n if (this.window) {\n this.layoutManagerState.bringWindowFront(this.window);\n }\n else {\n this.window = new WindowState(this.configuration, () => runInAction(() => {\n this.window = undefined;\n }));\n this.layoutManagerState.newWindow(this.window);\n }\n }\n close() {\n if (this.window) {\n this.layoutManagerState.closeWindow(this.window);\n this.window = undefined;\n }\n }\n}\n//# sourceMappingURL=LayoutManagerState.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF 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, assertErrorThrown, guaranteeNonNullable, isBoolean, isNonNullable, } from '@finos/legend-shared';\nimport { buildExecutableQuery } from '../core/DataCubeQueryBuilder.js';\nimport { V1_Lambda } from '@finos/legend-graph';\nimport { APPLICATION_EVENT } from '@finos/legend-application';\nimport { buildQuerySnapshot } from './DataCubeGridQuerySnapshotBuilder.js';\nimport { generateRowGroupingDrilldownExecutableQueryPostProcessor } from './DataCubeGridQueryBuilder.js';\nimport { makeObservable, observable, runInAction } from 'mobx';\nimport { AlertType } from '../../../components/repl/Alert.js';\nimport { DEFAULT_LARGE_ALERT_WINDOW_CONFIG } from '../../LayoutManagerState.js';\nexport var DataCubeGridClientExportFormat;\n(function (DataCubeGridClientExportFormat) {\n DataCubeGridClientExportFormat[\"CSV\"] = \"CSV\";\n DataCubeGridClientExportFormat[\"EXCEL\"] = \"EXCEL\";\n DataCubeGridClientExportFormat[\"PLAIN_TEXT\"] = \"PLAIN_TEXT\";\n DataCubeGridClientExportFormat[\"HTML\"] = \"HTML\";\n DataCubeGridClientExportFormat[\"PDF\"] = \"PDF\";\n})(DataCubeGridClientExportFormat || (DataCubeGridClientExportFormat = {}));\nexport var INTERNAL__GridClientUtilityCssClassName;\n(function (INTERNAL__GridClientUtilityCssClassName) {\n INTERNAL__GridClientUtilityCssClassName[\"ROOT\"] = \"data-cube-grid.ag-theme-balham\";\n INTERNAL__GridClientUtilityCssClassName[\"HIGHLIGHT_ROW\"] = \"data-cube-grid__utility--highlight-row\";\n INTERNAL__GridClientUtilityCssClassName[\"SHOW_VERTICAL_GRID_LINES\"] = \"data-cube-grid__utility--show-vertical-grid-lines\";\n INTERNAL__GridClientUtilityCssClassName[\"SHOW_HORIZONTAL_GRID_LINES\"] = \"data-cube-grid__utility--show-horizontal-grid-lines\";\n INTERNAL__GridClientUtilityCssClassName[\"BLUR\"] = \"data-cube-grid__utility--blur\";\n INTERNAL__GridClientUtilityCssClassName[\"FONT_FAMILY_PREFIX\"] = \"data-cube-grid__utility--font-family-\";\n INTERNAL__GridClientUtilityCssClassName[\"FONT_SIZE_PREFIX\"] = \"data-cube-grid__utility--font-size-\";\n INTERNAL__GridClientUtilityCssClassName[\"FONT_BOLD\"] = \"data-cube-grid__utility--font-style-bold\";\n INTERNAL__GridClientUtilityCssClassName[\"FONT_ITALIC\"] = \"data-cube-grid__utility--font-style-italic\";\n INTERNAL__GridClientUtilityCssClassName[\"FONT_UNDERLINE_PREFIX\"] = \"data-cube-grid__utility--font-style-underline-\";\n INTERNAL__GridClientUtilityCssClassName[\"FONT_STRIKETHROUGH\"] = \"data-cube-grid__utility--font-style-strikethrough\";\n INTERNAL__GridClientUtilityCssClassName[\"FONT_CASE_PREFIX\"] = \"data-cube-grid__utility--font-style-case-\";\n INTERNAL__GridClientUtilityCssClassName[\"TEXT_ALIGN_PREFIX\"] = \"data-cube-grid__utility--text-align-\";\n INTERNAL__GridClientUtilityCssClassName[\"TEXT_COLOR_PREFIX\"] = \"data-cube-grid__utility--text-color-\";\n INTERNAL__GridClientUtilityCssClassName[\"BACKGROUND_COLOR_PREFIX\"] = \"data-cube-grid__utility--background-color-\";\n})(INTERNAL__GridClientUtilityCssClassName || (INTERNAL__GridClientUtilityCssClassName = {}));\nexport const generateFontFamilyUtilityClassName = (fontFamily) => `${INTERNAL__GridClientUtilityCssClassName.FONT_FAMILY_PREFIX}${fontFamily.replaceAll(' ', '-')}`;\nexport const generateFontSizeUtilityClassName = (fontSize) => `${INTERNAL__GridClientUtilityCssClassName.FONT_SIZE_PREFIX}${fontSize}`;\nexport const generateFontUnderlineUtilityClassName = (variant) => `${INTERNAL__GridClientUtilityCssClassName.FONT_UNDERLINE_PREFIX}${variant ?? 'none'}`;\nexport const generateFontCaseUtilityClassName = (fontCase) => `${INTERNAL__GridClientUtilityCssClassName.FONT_CASE_PREFIX}${fontCase ?? 'none'}`;\nexport const generateTextAlignUtilityClassName = (alignment) => `${INTERNAL__GridClientUtilityCssClassName.TEXT_ALIGN_PREFIX}${alignment}`;\nexport const generateTextColorUtilityClassName = (color, key) => `${INTERNAL__GridClientUtilityCssClassName.TEXT_COLOR_PREFIX}${key}-${color.substring(1)}`;\nexport const generateBackgroundColorUtilityClassName = (color, key) => `${INTERNAL__GridClientUtilityCssClassName.BACKGROUND_COLOR_PREFIX}${key}-${color.substring(1)}`;\n// Indicates how many rows for each block in the cache, i.e. how many rows returned from the server at a time.\n// ag-grid will dedicte space in advanced to store these rows. In server-side row model, this is used as the page size.\n// See https://www.ag-grid.com/react-data-grid/server-side-model-configuration/#server-side-cache\nexport const INTERNAL__GRID_CLIENT_DEFAULT_CACHE_BLOCK_SIZE = 100;\n// NOTE: The cache block size is used by ag-grid to pre-allocate memory for the grid\n// so the value set must be reasonable, or else it can crash the application!\nexport const INTERNAL__GRID_CLIENT_MAX_CACHE_BLOCK_SIZE = 1e5;\nexport const INTERNAL__GRID_CLIENT_SIDE_BAR_WIDTH = 200;\nexport const INTERNAL__GRID_CLIENT_COLUMN_MIN_WIDTH = 50;\nexport const INTERNAL__GRID_CLIENT_HEADER_HEIGHT = 24;\nexport const INTERNAL__GRID_CLIENT_ROW_HEIGHT = 20;\nexport const INTERNAL__GRID_CLIENT_TOOLTIP_SHOW_DELAY = 1000;\nexport const INTERNAL__GRID_CLIENT_AUTO_RESIZE_PADDING = 10;\nexport const INTERNAL__GRID_CLIENT_MISSING_VALUE = '__MISSING';\nexport const INTERNAL__GRID_CLIENT_TREE_COLUMN_ID = 'INTERNAL__tree';\nexport const INTERNAL__GRID_CLIENT_ROW_GROUPING_COUNT_AGG_COLUMN_ID = 'INTERNAL__count';\nexport var GridClientPinnedAlignement;\n(function (GridClientPinnedAlignement) {\n GridClientPinnedAlignement[\"LEFT\"] = \"left\";\n GridClientPinnedAlignement[\"RIGHT\"] = \"right\";\n})(GridClientPinnedAlignement || (GridClientPinnedAlignement = {}));\nexport var GridClientSortDirection;\n(function (GridClientSortDirection) {\n GridClientSortDirection[\"ASCENDING\"] = \"asc\";\n GridClientSortDirection[\"DESCENDING\"] = \"desc\";\n})(GridClientSortDirection || (GridClientSortDirection = {}));\nexport var GridClientAggregateOperation;\n(function (GridClientAggregateOperation) {\n GridClientAggregateOperation[\"COUNT\"] = \"count\";\n GridClientAggregateOperation[\"SUM\"] = \"sum\";\n GridClientAggregateOperation[\"MAX\"] = \"max\";\n GridClientAggregateOperation[\"MIN\"] = \"min\";\n GridClientAggregateOperation[\"AVERAGE\"] = \"avg\";\n})(GridClientAggregateOperation || (GridClientAggregateOperation = {}));\nexport function getDataForAllNodes(client) {\n const rows = [];\n client.forEachNode((node) => {\n if (node.data) {\n rows.push(node.data);\n }\n });\n return rows;\n}\n/**\n * NOTE: this method does not work for server-side row model.\n * It only works when client-side filter is being applied\n */\nexport function getDataForAllFilteredNodes(client) {\n const rows = [];\n client.forEachNodeAfterFilter((node) => {\n if (node.data) {\n rows.push(node.data);\n }\n });\n return rows;\n}\nfunction TDStoRowData(tds) {\n return tds.rows.map((_row, rowIdx) => {\n const row = {};\n const cols = tds.columns;\n _row.values.forEach((value, colIdx) => {\n // `ag-grid` shows `false` value as empty string so we have\n // call `.toString()` to avoid this behavior.\n row[cols[colIdx]] = isBoolean(value)\n ? String(value)\n : isNonNullable(value)\n ? value\n : INTERNAL__GRID_CLIENT_MISSING_VALUE;\n });\n return row;\n });\n}\nexport class DataCubeGridClientServerSideDataSource {\n grid;\n rowCount = undefined;\n constructor(grid) {\n makeObservable(this, {\n rowCount: observable,\n });\n this.grid = grid;\n }\n async fetchRows(params) {\n const task = this.grid.dataCube.newTask('Fetching data');\n // ------------------------------ GRID OPTIONS ------------------------------\n // Here, we make adjustments to the grid display in response to the new\n // request, in case the grid action has not impacted the layout in an\n // adequate way.\n // Toggle the visibility of the tree column based on the presence of row-group columns\n if (params.request.rowGroupCols.length) {\n params.api.setColumnsVisible([INTERNAL__GRID_CLIENT_TREE_COLUMN_ID], true);\n }\n else {\n params.api.setColumnsVisible([INTERNAL__GRID_CLIENT_TREE_COLUMN_ID], false);\n }\n // ------------------------------ SNAPSHOT ------------------------------\n const currentSnapshot = guaranteeNonNullable(this.grid.getLatestSnapshot());\n // TODO: when we support pivoting, we should make a quick call to check for columns\n // created by pivots and specify them as cast columns when pivot is activated\n const syncedSnapshot = buildQuerySnapshot(params.request, currentSnapshot);\n if (syncedSnapshot.hashCode !== currentSnapshot.hashCode) {\n this.grid.publishSnapshot(syncedSnapshot);\n }\n // ------------------------------ DATA ------------------------------\n try {\n const executableQuery = buildExecutableQuery(syncedSnapshot, {\n postProcessor: generateRowGroupingDrilldownExecutableQueryPostProcessor(params.request.groupKeys),\n pagination: this.grid.isPaginationEnabled &&\n params.request.startRow !== undefined &&\n params.request.endRow !== undefined\n ? {\n start: params.request.startRow,\n end: params.request.endRow,\n }\n : undefined,\n });\n const lambda = new V1_Lambda();\n lambda.body.push(executableQuery);\n const result = await this.grid.dataCube.engine.executeQuery(lambda);\n const rowData = TDStoRowData(result.result.result);\n if (this.grid.dataCube.engine.enableDebugMode) {\n this.grid.dataCube.application.debugProcess(`Execution`, `\\nQuery: ${result.executedQuery}`, `\\nConfig: pagination=${this.grid.isPaginationEnabled}`, `\\nStats: ${rowData.length} rows, ${result.result.result.columns.length} columns`, `\\nSQL: ${result.executedSQL}`);\n }\n if (this.grid.isPaginationEnabled) {\n params.success({ rowData });\n // only update row count when loading the top-level drilldown data\n if (params.request.groupKeys.length === 0) {\n runInAction(() => {\n this.rowCount = (params.request.startRow ?? 0) + rowData.length;\n });\n }\n }\n else {\n // NOTE: When pagination is disabled and the user currently scrolls to somewhere in the grid, as data is fetched\n // and the operation does not force a scroll top (for example, grouping will always force scrolling to the\n // top, while sorting will leave scroll position as is), the grid ends up showing the wrong data because\n // the data being displayed does not take into account the scroll position, but by the start and end row\n // which stay constant as pagination is disabled.\n //\n // In order to handle this, when pagination is disabled, we tune the start and end row by setting the cache block size\n // to a high-enough value (100k-1m). However, ag-grid use cache block size to pre-allocate memory for the rows,\n // which means we must cap/tune this value reasonably to prevent the app from crashing.\n //\n // When there are just too many rows (exceeding the maximum cache block size), we will fallback to a slightly less ideal\n // behavior by forcing a scroll top for every data fetch and also reset the cache block size to the default value to save memory\n if (rowData.length > INTERNAL__GRID_CLIENT_MAX_CACHE_BLOCK_SIZE) {\n if (!this.grid.dataCube.repl.dataCubeEngine.disableLargeDatasetWarning) {\n this.grid.dataCube.repl.alert({\n message: `Large dataset (>${INTERNAL__GRID_CLIENT_MAX_CACHE_BLOCK_SIZE} rows) detected!`,\n text: `Overall app performance can be impacted by large dataset due to longer query execution time and increased memory usage. At its limit, the application can crash!\\nTo boost performance, consider enabling pagination while working with large dataset.`,\n type: AlertType.WARNING,\n actions: [\n {\n label: 'Enable Pagination',\n handler: () => {\n this.grid.setPaginationEnabled(true);\n },\n },\n {\n label: 'Dismiss Warning',\n handler: () => {\n // this.grid.setPaginationEnabled(true);\n this.grid.dataCube.repl.dataCubeEngine.setDisableLargeDatasetWarning(true);\n },\n },\n ],\n windowConfig: DEFAULT_LARGE_ALERT_WINDOW_CONFIG,\n });\n }\n // NOTE: when drilldown occurs, we will scroll top until the drilldown row is reached\n params.api.ensureIndexVisible(params.parentNode.rowIndex ?? 0, 'top');\n }\n params.success({\n rowData,\n // Setting row count to disable infinite-scrolling when pagination is disabled\n // See https://www.ag-grid.com/react-data-grid/infinite-scrolling/#setting-last-row-index\n rowCount: rowData.length,\n });\n // only update row count when loading the top-level drilldown data\n if (params.request.groupKeys.length === 0) {\n runInAction(() => {\n this.rowCount = rowData.length;\n });\n }\n }\n }\n catch (error) {\n assertErrorThrown(error);\n this.grid.dataCube.repl.alertError(error, {\n message: `Data fetch failure: ${error.message}`,\n text: error.stack,\n });\n params.fail();\n }\n finally {\n this.grid.dataCube.endTask(task);\n }\n }\n getRows(params) {\n this.fetchRows(params).catch((error) => {\n assertErrorThrown(error);\n this.grid.dataCube.application.logService.error(LogEvent.create(APPLICATION_EVENT.ILLEGAL_APPLICATION_STATE_OCCURRED), `Error ocurred while fetching data for grid should have been handled gracefully`, error);\n });\n }\n}\n//# sourceMappingURL=DataCubeGridClientEngine.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { deepDiff } from '@finos/legend-shared';\nexport class DataCubeQuerySnapshotSubscriber {\n dataCube;\n application;\n latestSnapshot;\n constructor(dataCube) {\n this.dataCube = dataCube;\n this.application = dataCube.application;\n }\n async receiveSnapshot(snapshot) {\n const previousSnapshot = this.latestSnapshot;\n this.latestSnapshot = snapshot;\n await this.applySnapshot(snapshot, previousSnapshot);\n }\n publishSnapshot(snapshot) {\n if (this.dataCube.engine.enableDebugMode) {\n this.application.debugProcess(`New Snapshot`, '\\nSnapshot', snapshot, '\\nDiff', deepDiff(snapshot, this.latestSnapshot ?? {}));\n }\n this.latestSnapshot = snapshot;\n this.dataCube.snapshotManager.broadcastSnapshot(snapshot);\n }\n getLatestSnapshot() {\n return this.latestSnapshot;\n }\n}\n//# sourceMappingURL=DataCubeQuerySnapshotSubscriber.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 */\n/***************************************************************************************\n * [GRID]\n *\n * These are utilities used to build the configuration for the grid client,\n * AG Grid, from the query snapshot.\n ***************************************************************************************/\nimport { _findCol, } from '../core/DataCubeQuerySnapshot.js';\nimport { INTERNAL__GRID_CLIENT_TREE_COLUMN_ID, GridClientAggregateOperation, GridClientSortDirection, INTERNAL__GRID_CLIENT_COLUMN_MIN_WIDTH, INTERNAL__GridClientUtilityCssClassName, generateFontFamilyUtilityClassName, generateFontSizeUtilityClassName, generateFontUnderlineUtilityClassName, generateTextAlignUtilityClassName, generateTextColorUtilityClassName, generateBackgroundColorUtilityClassName, generateFontCaseUtilityClassName, GridClientPinnedAlignement, INTERNAL__GRID_CLIENT_ROW_HEIGHT, INTERNAL__GRID_CLIENT_AUTO_RESIZE_PADDING, INTERNAL__GRID_CLIENT_HEADER_HEIGHT, INTERNAL__GRID_CLIENT_TOOLTIP_SHOW_DELAY, INTERNAL__GRID_CLIENT_SIDE_BAR_WIDTH, INTERNAL__GRID_CLIENT_ROW_GROUPING_COUNT_AGG_COLUMN_ID, INTERNAL__GRID_CLIENT_MISSING_VALUE, } from './DataCubeGridClientEngine.js';\nimport { PRIMITIVE_TYPE } from '@finos/legend-graph';\nimport { getQueryParameters, getQueryParameterValue, isNonNullable, isNullable, isNumber, isValidUrl, } from '@finos/legend-shared';\nimport { DataCubeColumnDataType, DataCubeColumnPinPlacement, DataCubeNumberScale, DEFAULT_ROW_BUFFER, DEFAULT_URL_LABEL_QUERY_PARAM, getDataType, DataCubeQuerySortOperation, DataCubeColumnKind, DEFAULT_MISSING_VALUE_DISPLAY_TEXT, } from '../core/DataCubeQueryEngine.js';\nimport { DataCubeIcon } from '@finos/legend-art';\n// --------------------------------- UTILITIES ---------------------------------\n// See https://www.ag-grid.com/react-data-grid/cell-data-types/\nfunction _cellDataType(column) {\n switch (column.type) {\n case PRIMITIVE_TYPE.NUMBER:\n case PRIMITIVE_TYPE.DECIMAL:\n case PRIMITIVE_TYPE.INTEGER:\n case PRIMITIVE_TYPE.FLOAT:\n return 'number';\n case PRIMITIVE_TYPE.DATE:\n case PRIMITIVE_TYPE.DATETIME:\n case PRIMITIVE_TYPE.STRICTDATE:\n return 'dateString';\n case PRIMITIVE_TYPE.STRING:\n default:\n return 'text';\n }\n}\nfunction _allowedAggFuncs(column) {\n switch (column.type) {\n case PRIMITIVE_TYPE.STRING:\n case PRIMITIVE_TYPE.DATE:\n case PRIMITIVE_TYPE.DATETIME:\n case PRIMITIVE_TYPE.STRICTDATE:\n return [];\n case PRIMITIVE_TYPE.NUMBER:\n case PRIMITIVE_TYPE.DECIMAL:\n case PRIMITIVE_TYPE.INTEGER:\n case PRIMITIVE_TYPE.FLOAT:\n return [\n GridClientAggregateOperation.AVERAGE,\n GridClientAggregateOperation.COUNT,\n GridClientAggregateOperation.SUM,\n GridClientAggregateOperation.MAX,\n GridClientAggregateOperation.MIN,\n ];\n default:\n return [];\n }\n}\nfunction scaleNumber(value, type) {\n switch (type) {\n case DataCubeNumberScale.PERCENT:\n return { value: value * 1e2, unit: '%' };\n case DataCubeNumberScale.BASIS_POINT:\n return { value: value * 1e4, unit: 'bp' };\n case DataCubeNumberScale.THOUSANDS:\n return { value: value / 1e3, unit: 'k' };\n case DataCubeNumberScale.MILLIONS:\n return { value: value / 1e6, unit: 'm' };\n case DataCubeNumberScale.BILLIONS:\n return { value: value / 1e9, unit: 'b' };\n case DataCubeNumberScale.TRILLIONS:\n return { value: value / 1e12, unit: 't' };\n case DataCubeNumberScale.AUTO:\n return scaleNumber(value, value >= 1e12\n ? DataCubeNumberScale.TRILLIONS\n : value >= 1e9\n ? DataCubeNumberScale.BILLIONS\n : value >= 1e6\n ? DataCubeNumberScale.MILLIONS\n : value >= 1e3\n ? DataCubeNumberScale.THOUSANDS\n : undefined);\n default:\n return { value, unit: undefined };\n }\n}\nfunction DataCubeGridLoadingCellRenderer(props) {\n if (props.node.failedLoad) {\n return _jsx(\"span\", { className: \"inline-flex items-center\", children: \"#ERR\" });\n }\n return (_jsxs(\"span\", { className: \"inline-flex items-center\", children: [_jsx(DataCubeIcon.Loader, { className: \"mr-1 animate-spin stroke-2\" }), \"Loading\"] }));\n}\nfunction getCellRenderer(columnData) {\n const { column } = columnData;\n const dataType = getDataType(column.type);\n if (dataType === DataCubeColumnDataType.TEXT && column.displayAsLink) {\n return function LinkRenderer(params) {\n const isUrl = isValidUrl(params.value);\n if (!isUrl) {\n return params.value;\n }\n const url = params.value;\n const label = getQueryParameterValue(column.linkLabelParameter ?? DEFAULT_URL_LABEL_QUERY_PARAM, getQueryParameters(url, true));\n return (_jsx(\"a\", { href: url, target: \"_blank\", rel: \"noreferrer\", className: \"text-blue-600 underline\", children: label ?? url }));\n };\n }\n return null;\n}\nfunction _displaySpec(columnData) {\n const { column, configuration } = columnData;\n const dataType = getDataType(column.type);\n const fontFamily = column.fontFamily ?? configuration.fontFamily;\n const fontSize = column.fontSize ?? configuration.fontSize;\n const fontBold = column.fontBold ?? configuration.fontBold;\n const fontItalic = column.fontItalic ?? configuration.fontItalic;\n const fontStrikethrough = column.fontStrikethrough ?? configuration.fontStrikethrough;\n const fontUnderline = column.fontUnderline ?? configuration.fontUnderline;\n const fontCase = column.fontCase ?? configuration.fontCase;\n const textAlign = column.textAlign ?? configuration.textAlign;\n const normalForegroundColor = column.normalForegroundColor ?? configuration.normalForegroundColor;\n const normalBackgroundColor = column.normalBackgroundColor ?? configuration.normalBackgroundColor;\n const negativeForegroundColor = column.negativeForegroundColor ?? configuration.negativeForegroundColor;\n const negativeBackgroundColor = column.negativeBackgroundColor ?? configuration.negativeBackgroundColor;\n const zeroForegroundColor = column.zeroForegroundColor ?? configuration.zeroForegroundColor;\n const zeroBackgroundColor = column.zeroBackgroundColor ?? configuration.zeroBackgroundColor;\n const errorForegroundColor = column.errorForegroundColor ?? configuration.errorForegroundColor;\n const errorBackgroundColor = column.errorBackgroundColor ?? configuration.errorBackgroundColor;\n const cellRenderer = getCellRenderer(columnData);\n return {\n // setting the cell data type might helps guide the grid to render the cell properly\n // and optimize the grid performance slightly by avoiding unnecessary type inference\n cellDataType: _cellDataType(column),\n hide: column.hideFromView,\n valueFormatter: dataType === DataCubeColumnDataType.NUMBER\n ? (params) => {\n const value = params.value;\n if (isNullable(value) ||\n value ===\n INTERNAL__GRID_CLIENT_MISSING_VALUE) {\n return (column.missingValueDisplayText ??\n DEFAULT_MISSING_VALUE_DISPLAY_TEXT);\n }\n const showNegativeNumberInParens = column.negativeNumberInParens && value < 0;\n // 1. apply the number scale\n const scaledNumber = scaleNumber(value, column.numberScale);\n // 2. apply the number formatter\n const formattedValue = (showNegativeNumberInParens\n ? Math.abs(scaledNumber.value)\n : scaledNumber.value).toLocaleString(undefined, {\n useGrouping: column.displayCommas,\n ...(column.decimals !== undefined\n ? {\n minimumFractionDigits: column.decimals,\n maximumFractionDigits: column.decimals,\n }\n : {}),\n });\n // 3. add the parentheses (and then the unit)\n return ((showNegativeNumberInParens\n ? `(${formattedValue})`\n : formattedValue) +\n (scaledNumber.unit ? ` ${scaledNumber.unit}` : ''));\n }\n : (params) => params.value === INTERNAL__GRID_CLIENT_MISSING_VALUE\n ? (column.missingValueDisplayText ??\n DEFAULT_MISSING_VALUE_DISPLAY_TEXT)\n : params.value,\n loadingCellRenderer: DataCubeGridLoadingCellRenderer,\n cellClassRules: {\n [generateFontFamilyUtilityClassName(fontFamily)]: () => true,\n [generateFontSizeUtilityClassName(fontSize)]: () => true,\n [INTERNAL__GridClientUtilityCssClassName.FONT_BOLD]: () => fontBold,\n [INTERNAL__GridClientUtilityCssClassName.FONT_ITALIC]: () => fontItalic,\n [INTERNAL__GridClientUtilityCssClassName.FONT_STRIKETHROUGH]: () => fontStrikethrough,\n [generateFontUnderlineUtilityClassName(fontUnderline)]: () => Boolean(fontUnderline),\n [generateFontCaseUtilityClassName(fontCase)]: (params) => dataType === DataCubeColumnDataType.TEXT && Boolean(fontCase),\n [generateTextAlignUtilityClassName(textAlign)]: () => true,\n [generateTextColorUtilityClassName(normalForegroundColor, 'normal')]: () => true,\n [generateBackgroundColorUtilityClassName(normalBackgroundColor, 'normal')]: () => true,\n [generateTextColorUtilityClassName(zeroForegroundColor, 'zero')]: (params) => dataType === DataCubeColumnDataType.NUMBER &&\n isNumber(params.value) &&\n params.value === 0,\n [generateBackgroundColorUtilityClassName(zeroBackgroundColor, 'zero')]: (params) => dataType === DataCubeColumnDataType.NUMBER &&\n isNumber(params.value) &&\n params.value === 0,\n [generateTextColorUtilityClassName(negativeForegroundColor, 'negative')]: (params) => dataType === DataCubeColumnDataType.NUMBER &&\n isNumber(params.value) &&\n params.value < 0,\n [generateBackgroundColorUtilityClassName(negativeBackgroundColor, 'negative')]: (params) => dataType === DataCubeColumnDataType.NUMBER &&\n isNumber(params.value) &&\n params.value < 0,\n [generateTextColorUtilityClassName(errorForegroundColor, 'error')]: (params) => params.node.failedLoad,\n [generateBackgroundColorUtilityClassName(errorBackgroundColor, 'error')]: (params) => params.node.failedLoad,\n [INTERNAL__GridClientUtilityCssClassName.BLUR]: () => column.blur,\n },\n cellRenderer: cellRenderer,\n pinned: column.pinned !== undefined\n ? column.pinned === DataCubeColumnPinPlacement.RIGHT\n ? GridClientPinnedAlignement.RIGHT\n : GridClientPinnedAlignement.LEFT\n : null,\n tooltipValueGetter: (params) => isNonNullable(params.value) &&\n params.value !== INTERNAL__GRID_CLIENT_MISSING_VALUE\n ? `Value = ${params.value === '' ? \"''\" : params.value === true ? 'TRUE' : params.value === false ? 'FALSE' : params.value}`\n : `Missing Value`,\n };\n}\nfunction _sizeSpec(columnData) {\n const { column } = columnData;\n return {\n // NOTE: there is a problem with ag-grid when scrolling horizontally, the header row\n // lags behind the data, it seems to be caused by synchronizing scroll not working properly\n // There is currently, no way around this\n // See https://github.com/ag-grid/ag-grid/issues/5233\n // See https://github.com/ag-grid/ag-grid/issues/7620\n // See https://github.com/ag-grid/ag-grid/issues/6292\n // See https://issues.chromium.org/issues/40890343#comment11\n //\n // TODO: if we support column resize to fit content, should we disable this behavior?\n resizable: column.fixedWidth === undefined,\n // suppressAutoSize: columnConfiguration.fixedWidth !== undefined,\n width: column.fixedWidth,\n minWidth: Math.max(column.minWidth ?? INTERNAL__GRID_CLIENT_COLUMN_MIN_WIDTH, INTERNAL__GRID_CLIENT_COLUMN_MIN_WIDTH),\n maxWidth: column.maxWidth,\n };\n}\nfunction _sortSpec(columnData) {\n const { snapshot, column } = columnData;\n const sortColumns = snapshot.data.sortColumns;\n const sortCol = _findCol(sortColumns, column.name);\n return {\n sortable: true, // if this is pivot column, no sorting is allowed\n sort: sortCol\n ? sortCol.operation === DataCubeQuerySortOperation.ASCENDING\n ? GridClientSortDirection.ASCENDING\n : GridClientSortDirection.DESCENDING\n : null,\n sortIndex: sortCol ? sortColumns.indexOf(sortCol) : null,\n };\n}\nfunction _rowGroupSpec(columnData) {\n const { snapshot, column } = columnData;\n const data = snapshot.data;\n const columns = snapshot.stageCols('aggregation');\n const rowGroupColumn = _findCol(columns, column.name);\n const groupByCol = _findCol(data.groupBy?.columns, column.name);\n const aggCol = _findCol(data.groupBy?.aggColumns, column.name);\n return {\n enableRowGroup: column.kind === DataCubeColumnKind.DIMENSION,\n enableValue: column.kind === DataCubeColumnKind.MEASURE,\n rowGroup: Boolean(groupByCol),\n rowGroupIndex: groupByCol\n ? (data.groupBy?.columns.indexOf(groupByCol) ?? null)\n : null,\n // NOTE: we don't quite care about populating these accurately\n // since ag-grid aggregation does not support parameters, so\n // its set of supported aggregators will never match that specified\n // in the editor, so we just assign dummy values here\n aggFunc: aggCol\n ? aggCol.operation\n : rowGroupColumn\n ? [\n PRIMITIVE_TYPE.NUMBER,\n PRIMITIVE_TYPE.DECIMAL,\n PRIMITIVE_TYPE.FLOAT,\n PRIMITIVE_TYPE.INTEGER,\n ].includes(rowGroupColumn.type)\n ? GridClientAggregateOperation.SUM\n : null\n : null,\n allowedAggFuncs: rowGroupColumn ? _allowedAggFuncs(rowGroupColumn) : [],\n };\n}\n// --------------------------------- MAIN ---------------------------------\nexport function generateBaseGridOptions(dataCube) {\n const grid = dataCube.grid;\n return {\n // -------------------------------------- README --------------------------------------\n // NOTE: we observe performance degradataion when configuring the grid via React component\n // props when the options is non-static, i.e. changed when the query configuration changes.\n // As such, we must ONLY ADD STATIC CONFIGURATION HERE, and dynamic configuration should be\n // programatically updated when the query is modified.\n //\n //\n // -------------------------------------- ROW GROUPING --------------------------------------\n rowGroupPanelShow: 'always',\n groupDisplayType: 'custom', // keeps the column set stable even when row grouping is used\n suppressRowGroupHidesColumns: true, // keeps the column set stable even when row grouping is used\n suppressAggFuncInHeader: true, // keeps the columns stable when aggregation is used\n // purgeClosedRowNodes: true, // remove closed row nodes from the cache to allow reloading failed rows? - or should we have declarative action to retry?\n getChildCount: (data) => data[INTERNAL__GRID_CLIENT_ROW_GROUPING_COUNT_AGG_COLUMN_ID],\n // -------------------------------------- PIVOT --------------------------------------\n // pivotPanelShow: \"always\"\n // pivotMode:true, // TODO: need to make sure we don't hide away any columns when this is enabled\n // -------------------------------------- SORT --------------------------------------\n // Force multi-sorting since this is what the query supports anyway\n alwaysMultiSort: true,\n // -------------------------------------- DISPLAY --------------------------------------\n rowHeight: INTERNAL__GRID_CLIENT_ROW_HEIGHT,\n headerHeight: INTERNAL__GRID_CLIENT_HEADER_HEIGHT,\n suppressBrowserResizeObserver: true,\n noRowsOverlayComponent: () => (_jsxs(\"div\", { className: \"flex items-center border-[1.5px] border-neutral-300 p-2 font-medium text-neutral-400\", children: [_jsx(\"div\", { children: _jsx(DataCubeIcon.WarningCircle, { className: \"mr-1 stroke-2 text-lg\" }) }), \"0 rows\"] })),\n loadingOverlayComponent: () => (_jsxs(\"div\", { className: \"flex items-center border-[1.5px] border-neutral-300 p-2 font-medium text-neutral-400\", children: [_jsx(\"div\", { children: _jsx(DataCubeIcon.Loader, { className: \"mr-1 animate-spin stroke-2 text-lg\" }) }), \"Loading...\"] })),\n // Show cursor position when scrolling\n onBodyScroll: (event) => {\n const rowCount = event.api.getDisplayedRowCount();\n const range = event.api.getVerticalPixelRange();\n const start = Math.max(1, Math.ceil(range.top / INTERNAL__GRID_CLIENT_ROW_HEIGHT) + 1);\n const end = Math.min(rowCount, Math.floor(range.bottom / INTERNAL__GRID_CLIENT_ROW_HEIGHT));\n grid.setScrollHintText(`${start}-${end}/${rowCount}`);\n event.api.hidePopupMenu(); // hide context-menu while scrolling\n },\n onBodyScrollEnd: () => grid.setScrollHintText(undefined),\n // -------------------------------------- CONTEXT MENU --------------------------------------\n preventDefaultOnContextMenu: true, // prevent showing the browser's context menu\n columnMenu: 'new', // ensure context menu works on header\n // NOTE: dynamically generate the content of the context menu to make sure the items are not stale\n getContextMenuItems: (params) => grid.controller.menuBuilder?.(params) ?? [],\n getMainMenuItems: (params) => grid.controller.menuBuilder?.(params) ?? [],\n // -------------------------------------- COLUMN SIZING --------------------------------------\n autoSizePadding: INTERNAL__GRID_CLIENT_AUTO_RESIZE_PADDING,\n autoSizeStrategy: {\n // resize to fit content initially\n type: 'fitCellContents',\n },\n // -------------------------------------- TOOLTIP --------------------------------------\n tooltipShowDelay: INTERNAL__GRID_CLIENT_TOOLTIP_SHOW_DELAY,\n tooltipInteraction: true,\n // -------------------------------------- COLUMN MOVING --------------------------------------\n suppressDragLeaveHidesColumns: true, // disable this since it's quite easy to accidentally hide columns while moving\n // -------------------------------------- SERVER SIDE ROW MODEL --------------------------------------\n suppressScrollOnNewData: true,\n suppressServerSideFullWidthLoadingRow: true, // make sure each column has its own loading indicator instead of the whole row\n // -------------------------------------- SELECTION --------------------------------------\n enableRangeSelection: true,\n // -------------------------------------- SIDEBAR --------------------------------------\n sideBar: {\n toolPanels: [\n {\n id: 'columns',\n labelDefault: 'Columns',\n labelKey: 'columns',\n iconKey: 'columns',\n toolPanel: 'agColumnsToolPanel',\n minWidth: INTERNAL__GRID_CLIENT_SIDE_BAR_WIDTH,\n width: INTERNAL__GRID_CLIENT_SIDE_BAR_WIDTH,\n toolPanelParams: {\n suppressValues: true,\n // TODO: enable when we support pivot\n suppressPivotMode: true,\n suppressPivots: true,\n },\n },\n ],\n position: 'right',\n },\n allowDragFromColumnsToolPanel: true,\n // -------------------------------------- PERFORMANCE --------------------------------------\n animateRows: false, // improve performance\n suppressColumnMoveAnimation: true, // improve performance\n };\n}\nexport function generateGridOptionsFromSnapshot(snapshot, configuration, dataCube) {\n const gridOptions = {\n /**\n * NOTE: there is a strange issue where if we put dynamic configuration directly\n * such as rowClassRules which depends on some changing state (e.g. alternateRows)\n * as the grid component's props, the grid performance will be heavily compromised\n * while if we programatically set it like this, it does not seem so taxing to the\n * performance; perhaps something to do with React component rendering on props change\n * so in general for grid options which are not static, we must configure them here\n */\n rowClassRules: configuration.alternateRows\n ? {\n [INTERNAL__GridClientUtilityCssClassName.HIGHLIGHT_ROW]: (params) => params.rowIndex % (configuration.alternateRowsCount * 2) >=\n configuration.alternateRowsCount,\n }\n : null,\n rowBuffer: DEFAULT_ROW_BUFFER,\n // -------------------------------------- EVENT HANDLERS --------------------------------------\n onColumnPinned: (event) => {\n if (event.column) {\n const column = event.column;\n const pinned = column.getPinned();\n dataCube.grid.controller.pinColumn(column.getColId(), pinned === null\n ? undefined\n : pinned === GridClientPinnedAlignement.LEFT\n ? DataCubeColumnPinPlacement.LEFT\n : DataCubeColumnPinPlacement.RIGHT);\n }\n },\n onColumnMoved: (event) => {\n // make sure the move event is finished before syncing the changes\n if (event.column && event.finished) {\n dataCube.grid.controller.rearrangeColumns((event.api.getColumnDefs() ?? [])\n .filter((col) => !('children' in col))\n .map((col) => col.colId ?? ''));\n }\n },\n onColumnVisible: (event) => {\n if (event.column) {\n const column = event.column;\n const isVisible = column.isVisible();\n dataCube.grid.controller.showColumn(column.getColId(), isVisible);\n }\n },\n // -------------------------------------- COLUMNS --------------------------------------\n columnDefs: [\n {\n headerName: '',\n colId: INTERNAL__GRID_CLIENT_TREE_COLUMN_ID,\n cellRenderer: 'agGroupCellRenderer',\n // cellRendererParams: {\n // innerRenderer: (params: ICellRendererParams) => (\n // <>\n // <span>{params.value}</span>\n // {Boolean(\n // params.data[\n // INTERNAL__GRID_CLIENT_ROW_GROUPING_COUNT_AGG_COLUMN_ID\n // ],\n // ) && (\n // <span>{`(${params.data[INTERNAL__GRID_CLIENT_ROW_GROUPING_COUNT_AGG_COLUMN_ID]})`}</span>\n // )}\n // </>\n // ),\n // suppressCount: true,\n // } satisfies IGroupCellRendererParams,\n showRowGroup: true,\n hide: !snapshot.data.groupBy,\n lockPinned: true,\n lockPosition: true,\n pinned: GridClientPinnedAlignement.LEFT,\n cellStyle: {\n flex: 1,\n justifyContent: 'space-between',\n display: 'flex',\n },\n // TODO: display: coloring, text, etc.\n // TODO: pinning (should we pin this left by default?)\n // TODO: tooltip\n loadingCellRenderer: DataCubeGridLoadingCellRenderer,\n sortable: false, // TODO: @akphi - we can support this in the configuration\n },\n // TODO: handle pivot and column grouping\n ...configuration.columns.map((column) => {\n const columnData = {\n snapshot,\n column,\n configuration,\n };\n return {\n headerName: column.name,\n field: column.name,\n menuTabs: [],\n ..._displaySpec(columnData),\n ..._sizeSpec(columnData),\n ..._sortSpec(columnData),\n ..._rowGroupSpec(columnData),\n };\n }),\n ],\n };\n return gridOptions;\n}\n//# sourceMappingURL=DataCubeGridConfigurationBuilder.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { returnUndefOnError } from '../error/ErrorUtils.js';\nconst VALID_STRING = /^[\\w_][\\w_$]*$/u;\nexport const isValidString = (val) => Boolean(val.match(VALID_STRING));\nexport const isValidJSONString = (value) => {\n try {\n JSON.parse(value);\n return true;\n }\n catch {\n return false;\n }\n};\nexport const isValidUrl = (val) => Boolean(returnUndefOnError(() => new URL(val)));\n//# sourceMappingURL=ValidatorUtils.js.map","import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { useEffect, useRef, useState } from 'react';\nimport { BaseMenu, BaseMenuItem, Menu } from './BaseMenu.js';\nexport const ControlledDropdownMenu = (props) => {\n const { open, className, children, menuProps, content, title, disabled, onClose, onOpen, useCapture, } = props;\n const triggerRef = useRef(null);\n const [anchorEl, setAnchorEl] = useState(null);\n const onTriggerClick = (event) => {\n event.stopPropagation();\n event.preventDefault();\n if (disabled) {\n return;\n }\n if (triggerRef.current) {\n onOpen?.();\n setAnchorEl(triggerRef.current);\n }\n };\n // if the menu is forced to open or close, set the anchor accordinly\n // NOTE: unlike normal clicking on the trigger, this way of forcing the menu to open will require\n // to call `onClose` explicitly\n useEffect(() => {\n if (open !== undefined) {\n if (open && !anchorEl && triggerRef.current) {\n setAnchorEl(triggerRef.current);\n }\n else if (!open && anchorEl) {\n setAnchorEl(null);\n }\n }\n }, [anchorEl, open]);\n return (_jsxs(_Fragment, { children: [_jsx(\"button\", { ref: triggerRef, className: className, disabled: disabled, ...(useCapture\n ? {\n onClickCapture: onTriggerClick,\n onClick: (event) => {\n event.stopPropagation();\n },\n }\n : { onClick: onTriggerClick }), title: title, children: children }), _jsx(Menu, { anchorOrigin: { vertical: 'bottom', horizontal: 'right' }, transformOrigin: { vertical: 'top', horizontal: 'right' }, anchorEl: anchorEl, open: (open === undefined || Boolean(open)) && Boolean(anchorEl), slotProps: {\n root: {\n slotProps: {\n backdrop: {\n invisible: true,\n },\n },\n },\n }, elevation: 0, marginThreshold: 0, disableRestoreFocus: true, hideBackdrop: true, transitionDuration: 0, onClick: () => {\n onClose?.();\n setAnchorEl(null);\n }, ...menuProps, children: content })] }));\n};\nexport function useDropdownMenu() {\n const [anchorEl, setAnchorEl] = useState(null);\n return [\n (event) => setAnchorEl(event.currentTarget),\n () => setAnchorEl(null),\n {\n anchorEl,\n onClose: () => setAnchorEl(null),\n },\n ];\n}\nexport function DropdownMenu(props) {\n const { menuProps, children, onClose, anchorEl } = props;\n if (!anchorEl) {\n return null;\n }\n return (_jsx(BaseMenu, { anchorOrigin: { vertical: 'bottom', horizontal: 'right' }, transformOrigin: { vertical: 'top', horizontal: 'right' }, anchorEl: anchorEl, open: Boolean(anchorEl), slotProps: {\n root: {\n slotProps: {\n backdrop: {\n invisible: true,\n },\n },\n },\n }, elevation: 1, marginThreshold: 0, transitionDuration: 0, onClose: onClose, ...menuProps, children: children }));\n}\nexport function DropdownMenuItem(props) {\n return (_jsx(BaseMenuItem, { ...props, style: {\n cursor: 'default',\n } }));\n}\n//# sourceMappingURL=DropdownMenu.js.map","import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { shouldDisplayVirtualAssistantDocumentationEntry, useApplicationStore, } from '@finos/legend-application';\nimport { BasePopover, Checkbox, cn, DataCubeIcon, DropdownMenu, DropdownMenuItem, HexAlphaColorPicker, HexColorInput, parseColor, TailwindCSSPalette, } from '@finos/legend-art';\nimport { toNumber } from '@finos/legend-shared';\nimport React, { forwardRef, useEffect, useState } from 'react';\nimport { useREPLStore } from '../REPLStoreProvider.js';\nexport function FormBadge_WIP() {\n return (_jsx(\"div\", { className: \"text-2xs ml-1 select-none rounded-md bg-sky-500 px-1 py-0.5 font-semibold text-white\", title: \"Work In Progress\", children: \"WIP\" }));\n}\nexport function FormBadge_Advanced() {\n return (_jsx(\"div\", { className: \"text-2xs ml-1 select-none rounded-md bg-amber-500 px-1 py-0.5 font-semibold text-white\", title: \"Advanced: Becareful when using this feature!\", children: \"ADV\" }));\n}\nexport const FormNumberInput = forwardRef(function DataCubeEditorBaseNumberInput(props, ref) {\n const { min, max, step, value, setValue, isValid, isDecimal, defaultValue, disabled, className, } = props;\n const [inputValue, setInputValue] = useState(value ?? '');\n useEffect(() => {\n setInputValue(value ?? '');\n }, [value]);\n return (_jsx(\"input\", { className: cn('h-5 flex-shrink-0 border border-neutral-400 px-1.5 text-sm disabled:border-neutral-300 disabled:bg-neutral-50 disabled:text-neutral-300', className), ref: ref, inputMode: \"numeric\", type: \"number\", min: min, max: max, step: step, value: inputValue, disabled: Boolean(disabled), onChange: (event) => {\n const newInputValue = event.target.value;\n setInputValue(newInputValue);\n const numericValue = isDecimal\n ? toNumber(newInputValue)\n : parseInt(newInputValue, 10);\n if (isNaN(numericValue) ||\n // NOTE: `toNumber` parses empty string as `0`, which is not what we want, so we want to do the explicit check here\n !newInputValue ||\n (isValid !== undefined\n ? !isValid(numericValue)\n : (min !== undefined && numericValue < min) ||\n (max !== undefined && numericValue > max))) {\n return;\n }\n setValue(numericValue);\n }, onBlur: () => {\n const numericValue = isDecimal\n ? toNumber(inputValue)\n : parseInt(inputValue.toString(), 10);\n if (isNaN(numericValue) ||\n // NOTE: `toNumber` parses empty string as `0`, which is not what we want, so we want to do the explicit check here\n !inputValue ||\n (isValid !== undefined\n ? !isValid(numericValue)\n : (min !== undefined && numericValue < min) ||\n (max !== undefined && numericValue > max))) {\n setValue(defaultValue);\n setInputValue(defaultValue ?? '');\n }\n else {\n setInputValue(value ?? '');\n }\n } }));\n});\nexport function FormTextInput(props) {\n const { className, ...otherProps } = props;\n return (_jsx(\"input\", { className: cn('h-5 flex-shrink-0 border border-neutral-400 px-1.5 text-sm disabled:border-neutral-300 disabled:bg-neutral-50 disabled:text-neutral-300', className), ...otherProps }));\n}\nexport function FormCheckbox(props) {\n const { label, className, onChange, disabled, ...otherProps } = props;\n return (_jsxs(_Fragment, { children: [_jsx(Checkbox, { icon: _jsx(DataCubeIcon.Checkbox, {}), checkedIcon: _jsx(DataCubeIcon.CheckboxSelected, {}), disableRipple: true, classes: {\n root: cn(\n // Make sure the icons used have consistent stroke width with other components' borders\n // and that the left side is offseted to align well with other components\n 'p-0 text-neutral-600 [&_*]:stroke-[1.5px] -ml-[1px]', className),\n checked: 'data-cube-editor-checkbox--checked',\n disabled: 'data-cube-editor-checkbox--disabled',\n }, onChange: onChange, disabled: disabled, ...otherProps }), Boolean(label) && (_jsx(\"button\", { className: \"flex-shrink-0 pl-1 text-sm disabled:text-neutral-300\", onClick: onChange, disabled: disabled, tabIndex: -1, children: label }))] }));\n}\nexport function FormDropdownMenuTrigger(props) {\n const { children, className, ...otherProps } = props;\n return (_jsxs(\"button\", { className: cn('group flex h-5 flex-shrink-0 items-center justify-between border border-neutral-400 pl-1.5 text-sm disabled:select-none disabled:border-neutral-300 disabled:bg-neutral-50 disabled:text-neutral-300', className), ...otherProps, children: [_jsx(\"div\", { className: \"w-[calc(100%_-_12px)] overflow-hidden overflow-ellipsis whitespace-nowrap text-left\", children: props.children }), _jsx(\"div\", { className: \"flex h-full w-3 items-center justify-center text-neutral-500 group-disabled:text-neutral-400\", children: _jsx(DataCubeIcon.CaretDown, {}) })] }));\n}\nexport function FormDropdownMenu(props) {\n const { className, ...otherProps } = props;\n return (_jsx(DropdownMenu, { ...otherProps, menuProps: {\n classes: {\n paper: 'rounded-none mt-[1px]',\n list: cn('p-0 rounded-none border border-neutral-400 bg-white max-h-40 overflow-y-auto', className),\n },\n } }));\n}\nexport function FormDropdownMenuItem(props) {\n const { className, ...otherProps } = props;\n return (_jsx(DropdownMenuItem, { className: cn('flex h-5 w-full items-center px-1.5 text-sm hover:bg-neutral-100 focus-visible:bg-neutral-100', className), ...otherProps }));\n}\nexport function FormDropdownMenuItemSeparator() {\n return _jsx(\"div\", { className: \"my-0.5 h-[1px] w-full bg-neutral-200\" });\n}\nfunction FormColorPicker(props) {\n const { onChange, onClose, defaultColor } = props;\n const [color, setColor] = useState(props.color);\n const submit = () => {\n onChange(\n // if color is completely transparent, set it to #00000000\n parseColor(color).alpha === 0 ? TailwindCSSPalette.transparent : color);\n onClose();\n };\n return (_jsxs(\"div\", { className: \"data-cube-color-picker rounded-none border border-neutral-400 bg-white\", children: [_jsx(\"div\", { className: \"p-2\", children: _jsx(HexAlphaColorPicker, { color: color, onChange: setColor }) }), _jsx(\"div\", { className: \"flex justify-center px-2\", children: [\n 'slate',\n 'neutral',\n 'red',\n 'orange',\n 'amber',\n 'yellow',\n 'lime',\n 'green',\n 'emerald',\n 'teal',\n 'sky',\n 'blue',\n 'indigo',\n 'violet',\n 'purple',\n 'fuchsia',\n 'pink',\n 'rose',\n ].map((scale) => (_jsx(\"div\", { className: \"mr-0.5 flex flex-col border-[0.5px] border-neutral-300 last:mr-0\", children: [\n 50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950,\n ].map((level) => (_jsx(\"button\", { className: \"h-3 w-3 flex-shrink-0\", style: {\n background: TailwindCSSPalette[scale][level],\n }, onClick: () => {\n setColor(TailwindCSSPalette[scale][level]);\n }, onDoubleClick: () => {\n setColor(TailwindCSSPalette[scale][level]);\n submit();\n } }, `${scale}-${level}`))) }, scale))) }), _jsx(\"div\", { className: \"flex justify-center px-2 pb-1 pt-0.5\", children: _jsx(\"div\", { className: \"flex\", children: [\n // Colors from Better Colors - https://clrs.cc/\n TailwindCSSPalette.transparent,\n '#000000',\n '#aaaaaa',\n '#dddddd',\n '#ffffff',\n '#ff4136',\n '#ff851b',\n '#ffdc00',\n '#01ff70',\n '#2ecc40',\n '#3d9970',\n '#39cccc',\n '#7fdbff',\n '#0074d9',\n '#001f3f',\n '#b10dc9',\n '#f012be',\n '#85144b',\n ].map((_color) => (_jsx(\"div\", { className: cn('mr-0.5 border-[0.5px] border-neutral-300 last:mr-0', {\n 'data-cube-color-picker--transparent border-neutral-400': _color === TailwindCSSPalette.transparent,\n }), children: _jsx(\"button\", { className: \"flex h-3 w-3 flex-shrink-0\", style: {\n background: _color,\n }, onClick: () => {\n setColor(_color);\n }, onDoubleClick: () => {\n setColor(_color);\n submit();\n } }) }, _color))) }) }), _jsx(\"div\", { className: \"h-[1px] w-full bg-neutral-200\" }), _jsxs(\"div\", { className: \"flex h-6 items-center justify-between p-1\", children: [_jsxs(\"div\", { className: \"flex\", children: [_jsx(\"div\", { className: \"h-4 w-4 flex-shrink-0 rounded-sm border-[0.5px] border-neutral-300\", style: { background: color } }), _jsx(HexColorInput, { className: \"ml-0.5 h-4 w-14 border border-neutral-400 px-1 text-sm\", color: color, autoFocus: true, tabIndex: 0, onChange: setColor, prefix: \"#\", alpha: true })] }), _jsxs(\"div\", { className: \"flex\", children: [defaultColor !== undefined && (_jsx(\"button\", { className: \"ml-1 h-4 w-9 border border-neutral-400 bg-neutral-300 px-1 text-xs hover:brightness-95\", onClick: () => {\n setColor(defaultColor);\n }, children: \"Reset\" })), _jsx(\"button\", { className: \"ml-1 h-4 w-9 border border-neutral-400 bg-neutral-300 px-1 text-xs hover:brightness-95\", onClick: () => {\n onClose();\n }, children: \"Cancel\" }), _jsx(\"button\", { className: \"ml-1 h-4 w-9 border border-neutral-400 bg-neutral-300 px-1 text-xs hover:brightness-95\", onClick: () => {\n submit();\n }, children: \"OK\" })] })] })] }));\n}\nexport function FormColorPickerButton(props) {\n const { color, onChange, className, disabled, defaultColor } = props;\n const [anchorEl, setAnchorEl] = useState(null);\n return (_jsxs(_Fragment, { children: [_jsx(\"button\", { className: cn('group h-5 w-10 border border-neutral-300 p-[1px] disabled:border-neutral-200', {\n 'data-cube-color-picker--disabled': Boolean(disabled),\n 'data-cube-color-picker--transparent': !disabled && color === TailwindCSSPalette.transparent,\n }, className), onClick: (event) => {\n setAnchorEl(event.currentTarget);\n }, disabled: disabled, children: _jsx(\"div\", { className: \"h-full w-full group-disabled:hidden\", style: {\n background: color,\n } }) }), Boolean(anchorEl) && (_jsx(BasePopover, { open: Boolean(anchorEl), anchorEl: anchorEl, anchorOrigin: { vertical: 'center', horizontal: 'right' }, transformOrigin: { vertical: 'center', horizontal: 'left' }, onClose: () => setAnchorEl(null), children: _jsx(FormColorPicker, { color: color, onChange: onChange, onClose: () => setAnchorEl(null), defaultColor: defaultColor }) }))] }));\n}\nexport const FormDocumentation = ({ documentationKey, title, className }) => {\n const application = useApplicationStore();\n const repl = useREPLStore();\n const documentationEntry = application.documentationService.getDocEntry(documentationKey);\n const openDocLink = (event) => {\n event.preventDefault();\n event.stopPropagation();\n const entry = application.documentationService.getDocEntry(documentationKey);\n if (entry) {\n if (shouldDisplayVirtualAssistantDocumentationEntry(entry)) {\n application.assistantService.openDocumentationEntry(documentationKey);\n repl.documentationDisplay.open();\n }\n else if (entry.url) {\n application.navigationService.navigator.visitAddress(entry.url);\n }\n }\n };\n if (!documentationEntry ||\n (!documentationEntry.url &&\n !shouldDisplayVirtualAssistantDocumentationEntry(documentationEntry))) {\n return null;\n }\n return (_jsx(\"div\", { onClick: openDocLink, title: title ?? documentationEntry.text ?? 'Click to see documentation', className: cn('cursor-pointer text-xl text-sky-500', className), children: _jsx(DataCubeIcon.DocumentationHint, {}) }));\n};\n//# sourceMappingURL=Form.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 { useGridMenuItem, } from '@ag-grid-community/react';\nimport { FormBadge_WIP } from '../../repl/Form.js';\nexport function WIP_GridMenuItem({ name, subMenu, checked, }) {\n useGridMenuItem({\n configureDefaults: () => true,\n });\n return (_jsxs(\"div\", { children: [_jsx(\"span\", { className: \"ag-menu-option-part ag-menu-option-icon\" }), _jsxs(\"span\", { className: \"ag-menu-option-part ag-menu-option-text !inline-flex items-center\", children: [_jsx(\"span\", { className: \"opacity-50\", children: name }), _jsx(FormBadge_WIP, {})] }), _jsx(\"span\", { className: \"ag-menu-option-part ag-menu-option-shortcut\" }), _jsx(\"span\", { className: \"ag-menu-option-part ag-menu-option-popup-pointer select-none\", children: subMenu && _jsx(\"span\", { className: \"ag-icon ag-icon-small-right\" }) })] }));\n}\n//# sourceMappingURL=DataCubeGridShared.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF 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, isNonNullable } from '@finos/legend-shared';\nimport { DataCubeConfiguration } from '../core/DataCubeConfiguration.js';\nimport { DataCubeQuerySnapshotSubscriber } from '../core/DataCubeQuerySnapshotSubscriber.js';\nimport { DataCubeColumnKind, } from '../core/DataCubeQueryEngine.js';\nimport { generateMenuBuilder } from './DataCubeGridMenuBuilder.js';\nimport { _groupByAggCols } from './DataCubeGridQuerySnapshotBuilder.js';\n/**\n * This state is responsible for capturing edition to the data cube query\n * caused by interaction with the grid which is not captured by the server-side row model\n * datasource, e.g. column pinning, column visibility changes, etc.\n *\n * NOTE: since typically, each grid action causes a new snapshot to be created,\n * we MUST NEVER use the editor here, as it could potentially create illegal state\n * while the editor is still in the middle of a modification that has not been applied.\n */\nexport class DataCubeGridControllerState extends DataCubeQuerySnapshotSubscriber {\n configuration = new DataCubeConfiguration();\n selectableColumns = [];\n selectColumns = [];\n verticalPivotableColumns = [];\n verticalPivotedColumns = [];\n sortableColumns = [];\n sortColumns = [];\n menuBuilder;\n getColumnConfiguration(colName) {\n return this.configuration.columns.find((col) => col.name === colName);\n }\n pinColumn(colName, placement) {\n const columnConfiguration = this.getColumnConfiguration(colName);\n if (columnConfiguration) {\n columnConfiguration.pinned = placement;\n this.applyChanges();\n }\n }\n rearrangeColumns(columnByNames) {\n this.configuration.columns = columnByNames\n .map((colName) => this.getColumnConfiguration(colName))\n .filter(isNonNullable);\n this.selectColumns = this.configuration.columns\n .map((column) => this.selectColumns.find((col) => col.name === column.name))\n .filter(isNonNullable);\n this.applyChanges();\n }\n removeAllPins() {\n this.configuration.columns.forEach((col) => (col.pinned = undefined));\n this.applyChanges();\n }\n showColumn(colName, isVisible) {\n const columnConfiguration = this.getColumnConfiguration(colName);\n if (columnConfiguration) {\n columnConfiguration.hideFromView = !isVisible;\n this.applyChanges();\n }\n }\n setVerticalPivotOnColumn(colName) {\n const column = this.verticalPivotableColumns.find((col) => col.name === colName);\n if (column) {\n this.verticalPivotedColumns = [column];\n this.applyChanges();\n }\n }\n addVerticalPivotOnColumn(colName) {\n const column = this.verticalPivotableColumns.find((col) => col.name === colName);\n if (column) {\n this.verticalPivotedColumns = [...this.verticalPivotedColumns, column];\n this.applyChanges();\n }\n }\n removeVerticalPivotOnColumn(colName) {\n this.verticalPivotedColumns = this.verticalPivotedColumns.filter((col) => col.name === colName);\n this.applyChanges();\n }\n clearAllVerticalPivots() {\n this.verticalPivotedColumns = [];\n this.applyChanges();\n }\n getActionableSortColumn(colName, operation) {\n const column = this.sortableColumns.find((col) => col.name === colName);\n if (!column) {\n return undefined;\n }\n const sortColumn = this.sortColumns.find((col) => col.name === colName);\n if (sortColumn && sortColumn.operation !== operation) {\n return sortColumn;\n }\n if (!sortColumn) {\n return { ...column, operation };\n }\n return undefined;\n }\n setSortByColumn(colName, operation) {\n const column = this.getActionableSortColumn(colName, operation);\n if (!column) {\n return;\n }\n column.operation = operation;\n this.sortColumns = [column];\n this.applyChanges();\n }\n addSortByColumn(colName, operation) {\n const column = this.getActionableSortColumn(colName, operation);\n if (!column) {\n return;\n }\n column.operation = operation;\n this.sortColumns = [...this.sortColumns, column];\n this.applyChanges();\n }\n clearSortByColumn(colName) {\n this.sortColumns = this.sortColumns.filter((col) => col.name !== colName);\n this.applyChanges();\n }\n clearAllSorts() {\n this.sortColumns = [];\n this.applyChanges();\n }\n applyChanges() {\n const baseSnapshot = guaranteeNonNullable(this.getLatestSnapshot());\n const snapshot = baseSnapshot.clone();\n snapshot.data.selectColumns = this.selectColumns;\n snapshot.data.sortColumns = this.sortColumns;\n snapshot.data.configuration = DataCubeConfiguration.serialization.toJson(this.configuration);\n snapshot.data.groupBy = this.verticalPivotedColumns.length\n ? {\n columns: this.verticalPivotedColumns,\n aggColumns: _groupByAggCols(baseSnapshot.data.groupBy, this.configuration),\n }\n : undefined;\n snapshot.finalize();\n if (snapshot.hashCode !== baseSnapshot.hashCode) {\n this.publishSnapshot(snapshot);\n }\n }\n async applySnapshot(snapshot, previousSnapshot) {\n const newSnapshot = snapshot.clone();\n this.configuration = DataCubeConfiguration.serialization.fromJson(snapshot.data.configuration);\n this.selectableColumns = newSnapshot.stageCols('select');\n this.selectColumns = newSnapshot.data.selectColumns;\n this.sortableColumns = newSnapshot.stageCols('sort');\n this.sortColumns = newSnapshot.data.sortColumns;\n this.verticalPivotableColumns = newSnapshot\n .stageCols('aggregation')\n .filter((column) => this.getColumnConfiguration(column.name)?.kind ===\n DataCubeColumnKind.DIMENSION);\n this.verticalPivotedColumns = newSnapshot.data.groupBy?.columns ?? [];\n this.menuBuilder = generateMenuBuilder(this);\n }\n async initialize() {\n // do nothing\n }\n}\n//# sourceMappingURL=DataCubeGridControllerState.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { WIP_GridMenuItem } from '../../../components/dataCube/grid/DataCubeGridShared.js';\nimport { DataCubeQuerySortOperation, DataCubeColumnPinPlacement, DEFAULT_COLUMN_MIN_WIDTH, DataCubeColumnKind, } from '../core/DataCubeQueryEngine.js';\nimport { isNonNullable } from '@finos/legend-shared';\nimport { DataCubeGridClientExportFormat } from './DataCubeGridClientEngine.js';\nexport function generateMenuBuilder(controller) {\n const dataCube = controller.dataCube;\n const editor = dataCube.editor;\n return (params) => {\n const column = params.column ?? undefined;\n const columnName = column?.getColId();\n const columnConfiguration = controller.getColumnConfiguration(columnName);\n const value = 'value' in params ? params.value : undefined;\n const sortMenu = [\n {\n name: 'Sort',\n subMenu: [\n ...(column && columnName\n ? [\n {\n name: 'Ascending',\n action: () => controller.setSortByColumn(columnName, DataCubeQuerySortOperation.ASCENDING),\n },\n {\n name: 'Ascending Absolute',\n menuItem: WIP_GridMenuItem,\n cssClasses: ['!opacity-100'],\n disabled: true,\n },\n {\n name: 'Descending',\n action: () => controller.setSortByColumn(columnName, DataCubeQuerySortOperation.DESCENDING),\n },\n {\n name: 'Descending Absolute',\n menuItem: WIP_GridMenuItem,\n cssClasses: ['!opacity-100'],\n disabled: true,\n },\n {\n name: 'Clear Sort',\n disabled: !controller.sortColumns.find((col) => col.name === columnName),\n action: () => controller.clearSortByColumn(columnName),\n },\n 'separator',\n {\n name: 'Add Ascending',\n disabled: Boolean(controller.sortColumns.find((col) => col.name === columnName &&\n col.operation === DataCubeQuerySortOperation.ASCENDING)),\n action: () => controller.addSortByColumn(columnName, DataCubeQuerySortOperation.ASCENDING),\n },\n {\n name: 'Add Ascending Absolute',\n menuItem: WIP_GridMenuItem,\n cssClasses: ['!opacity-100'],\n disabled: true,\n },\n {\n name: 'Add Descending',\n disabled: Boolean(controller.sortColumns.find((col) => col.name === columnName &&\n col.operation === DataCubeQuerySortOperation.DESCENDING)),\n action: () => controller.addSortByColumn(columnName, DataCubeQuerySortOperation.DESCENDING),\n },\n {\n name: 'Add Descending Absolute',\n menuItem: WIP_GridMenuItem,\n cssClasses: ['!opacity-100'],\n disabled: true,\n },\n 'separator',\n ]\n : []),\n {\n name: 'Clear All Sorts',\n disabled: controller.sortColumns.length === 0,\n action: () => controller.clearAllSorts(),\n },\n ],\n },\n ];\n return [\n {\n name: 'Export',\n subMenu: [\n {\n name: 'HTML',\n menuItem: WIP_GridMenuItem,\n cssClasses: ['!opacity-100'],\n disabled: true,\n },\n {\n name: 'Plain Text',\n menuItem: WIP_GridMenuItem,\n cssClasses: ['!opacity-100'],\n disabled: true,\n },\n {\n name: 'PDF',\n menuItem: WIP_GridMenuItem,\n cssClasses: ['!opacity-100'],\n disabled: true,\n },\n {\n name: 'Excel',\n action: () => dataCube.grid.exportEngine.exportFile(DataCubeGridClientExportFormat.EXCEL),\n },\n {\n name: 'CSV',\n action: () => dataCube.grid.exportEngine.exportFile(DataCubeGridClientExportFormat.CSV),\n },\n 'separator',\n {\n name: 'DataCube Specification',\n menuItem: WIP_GridMenuItem,\n cssClasses: ['!opacity-100'],\n disabled: true,\n },\n ],\n },\n {\n name: 'Email',\n subMenu: [\n {\n name: 'HTML',\n menuItem: WIP_GridMenuItem,\n cssClasses: ['!opacity-100'],\n disabled: true,\n },\n {\n name: 'Plain Text',\n menuItem: WIP_GridMenuItem,\n cssClasses: ['!opacity-100'],\n disabled: true,\n },\n 'separator',\n {\n name: 'HTML Attachment',\n menuItem: WIP_GridMenuItem,\n cssClasses: ['!opacity-100'],\n disabled: true,\n },\n {\n name: 'Plain Text Attachment',\n menuItem: WIP_GridMenuItem,\n cssClasses: ['!opacity-100'],\n disabled: true,\n },\n {\n name: 'PDF Attachment',\n menuItem: WIP_GridMenuItem,\n cssClasses: ['!opacity-100'],\n disabled: true,\n },\n {\n name: 'Excel Attachment',\n action: () => {\n dataCube.grid.exportEngine\n .exportEmail(DataCubeGridClientExportFormat.EXCEL)\n .catch(dataCube.application.logUnhandledError);\n },\n },\n {\n name: 'CSV Attachment',\n action: () => {\n dataCube.grid.exportEngine\n .exportEmail(DataCubeGridClientExportFormat.CSV)\n .catch(dataCube.application.logUnhandledError);\n },\n },\n {\n name: 'DataCube Specification Attachment',\n menuItem: WIP_GridMenuItem,\n cssClasses: ['!opacity-100'],\n disabled: true,\n },\n ],\n },\n {\n name: 'Copy',\n menuItem: WIP_GridMenuItem,\n cssClasses: ['!opacity-100'],\n subMenu: [\n {\n name: 'Plain Text',\n menuItem: WIP_GridMenuItem,\n cssClasses: ['!opacity-100'],\n disabled: true,\n },\n {\n name: 'Selected Row(s) as Plain Text',\n menuItem: WIP_GridMenuItem,\n cssClasses: ['!opacity-100'],\n disabled: true,\n },\n {\n name: 'Selected Column as Plain Text',\n menuItem: WIP_GridMenuItem,\n cssClasses: ['!opacity-100'],\n disabled: true,\n },\n ],\n },\n 'separator',\n ...sortMenu,\n {\n name: 'Filter',\n menuItem: WIP_GridMenuItem,\n disabled: true,\n cssClasses: ['!opacity-100'],\n subMenu: [\n ...(column && value\n ? [\n {\n name: `Add Filter: ${column.getColId()} = {value}`,\n menuItem: WIP_GridMenuItem,\n cssClasses: ['!opacity-100'],\n disabled: true,\n },\n {\n name: `More Filters on ${column.getColId()}...`,\n menuItem: WIP_GridMenuItem,\n cssClasses: ['!opacity-100'],\n disabled: true,\n subMenu: [], // TODO\n },\n 'separator',\n ]\n : []),\n {\n name: 'Filters...',\n },\n {\n name: 'Clear All Filters',\n },\n ],\n },\n {\n name: 'Pivot',\n subMenu: [\n ...(column &&\n columnName &&\n columnConfiguration?.kind === DataCubeColumnKind.DIMENSION\n ? [\n {\n name: `Vertical Pivot on ${column.getColId()}`,\n action: () => controller.setVerticalPivotOnColumn(columnName),\n },\n {\n name: `Add Vertical Pivot on ${column.getColId()}`,\n disabled: Boolean(controller.verticalPivotedColumns.find((col) => col.name === columnName)),\n action: () => controller.addVerticalPivotOnColumn(columnName),\n },\n {\n name: `Remove Vertical Pivot on ${column.getColId()}`,\n disabled: !controller.verticalPivotedColumns.find((col) => col.name === columnName),\n action: () => controller.removeVerticalPivotOnColumn(columnName),\n },\n 'separator',\n ]\n : []),\n {\n name: `Clear All Vertical Pivots`,\n disabled: controller.verticalPivotedColumns.length === 0,\n action: () => controller.clearAllVerticalPivots(),\n },\n ],\n },\n {\n name: 'Heatmap',\n menuItem: WIP_GridMenuItem,\n cssClasses: ['!opacity-100'],\n disabled: !column,\n subMenu: column\n ? [\n {\n name: `Add to ${column.getColId()}`,\n menuItem: WIP_GridMenuItem,\n cssClasses: ['!opacity-100'],\n disabled: true,\n },\n {\n name: `Remove from ${column.getColId()}`,\n menuItem: WIP_GridMenuItem,\n cssClasses: ['!opacity-100'],\n disabled: true,\n },\n ]\n : [],\n },\n {\n name: 'Extended Columns',\n menuItem: WIP_GridMenuItem,\n cssClasses: ['!opacity-100'],\n disabled: true,\n subMenu: [\n {\n name: `Add New Column...`,\n menuItem: WIP_GridMenuItem,\n cssClasses: ['!opacity-100'],\n disabled: true,\n },\n {\n name: `Edit {column}`,\n menuItem: WIP_GridMenuItem,\n cssClasses: ['!opacity-100'],\n disabled: true,\n },\n {\n name: `Remove {column}`,\n menuItem: WIP_GridMenuItem,\n cssClasses: ['!opacity-100'],\n disabled: true,\n },\n ],\n },\n {\n name: 'Custom Groupings',\n menuItem: WIP_GridMenuItem,\n cssClasses: ['!opacity-100'],\n disabled: true,\n subMenu: [\n {\n name: `Add New Grouping...`,\n menuItem: WIP_GridMenuItem,\n cssClasses: ['!opacity-100'],\n disabled: true,\n },\n {\n name: `Edit {column}`,\n menuItem: WIP_GridMenuItem,\n cssClasses: ['!opacity-100'],\n disabled: true,\n },\n {\n name: `Remove {column}`,\n menuItem: WIP_GridMenuItem,\n cssClasses: ['!opacity-100'],\n disabled: true,\n },\n ],\n },\n 'separator',\n {\n name: 'Resize',\n subMenu: [\n {\n name: `Auto-size to Fit Content`,\n action: () => params.api.autoSizeColumns([column?.getColId()].filter(isNonNullable)),\n disabled: !column,\n },\n {\n name: `Minimize Column`,\n action: () => {\n if (column) {\n params.api.setColumnWidths([\n {\n key: column.getColId(),\n newWidth: controller.getColumnConfiguration(columnName)?.minWidth ??\n DEFAULT_COLUMN_MIN_WIDTH,\n },\n ]);\n }\n },\n disabled: !column,\n },\n 'separator',\n {\n name: `Auto-size All Columns`,\n action: () => params.api.autoSizeAllColumns(),\n },\n {\n name: `Minimize All Columns`,\n action: () => {\n params.api.setColumnWidths(\n // TODO: take care of pivot columns\n controller.configuration.columns.map((col) => ({\n key: col.name,\n newWidth: controller.getColumnConfiguration(columnName)?.minWidth ??\n DEFAULT_COLUMN_MIN_WIDTH,\n })));\n },\n },\n {\n name: `Size Grid to Fit Screen`,\n action: () => params.api.sizeColumnsToFit(),\n },\n ],\n },\n {\n name: 'Pin',\n subMenu: [\n {\n name: `Pin Left`,\n disabled: !column || column.isPinnedLeft(),\n checked: Boolean(column?.isPinnedLeft()),\n action: () => controller.pinColumn(columnName, DataCubeColumnPinPlacement.LEFT),\n },\n {\n name: `Pin Right`,\n disabled: !column || column.isPinnedRight(),\n checked: Boolean(column?.isPinnedRight()),\n action: () => controller.pinColumn(columnName, DataCubeColumnPinPlacement.RIGHT),\n },\n {\n name: `Unpin`,\n disabled: !column?.isPinned(),\n action: () => controller.pinColumn(columnName, undefined),\n },\n 'separator',\n {\n name: `Remove All Pinnings`,\n disabled: controller.configuration.columns.every((col) => col.pinned === undefined),\n action: () => controller.removeAllPins(),\n },\n ],\n },\n {\n name: 'Hide',\n disabled: !column,\n action: () => controller.showColumn(columnName, false),\n },\n 'separator',\n {\n name: 'Show Plot...',\n menuItem: WIP_GridMenuItem,\n cssClasses: ['!opacity-100'],\n disabled: true,\n },\n {\n name: 'Show TreeMap...',\n menuItem: WIP_GridMenuItem,\n cssClasses: ['!opacity-100'],\n disabled: true,\n },\n 'separator',\n {\n name: 'Properties...',\n disabled: editor.display.isOpen,\n action: () => editor.display.open(),\n },\n ];\n };\n}\n//# sourceMappingURL=DataCubeGridMenuBuilder.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { ContentType, downloadFileUsingDataURI, formatDate, IllegalStateError, isString, UnsupportedOperationError, } from '@finos/legend-shared';\nimport { DataCubeGridClientExportFormat } from './DataCubeGridClientEngine.js';\nfunction blobToBase64(blob) {\n return new Promise((resolve, reject) => {\n const reader = new FileReader();\n reader.onloadend = () => {\n const result = reader.result;\n if (isString(result)) {\n const base64Data = result.split(',')[1];\n if (base64Data) {\n resolve(base64Data);\n return;\n }\n }\n reject(new Error(`Can't base64 encode blob data`));\n };\n reader.onerror = (error) => reject(error);\n reader.readAsDataURL(blob);\n });\n}\nconst EMAIL_TEXT_CONTENT = '';\nconst EMAIL_HTML_CONTENT = `<html><body><p>${EMAIL_TEXT_CONTENT}</p><body></html>`;\n// See https://stackoverflow.com/questions/3902455/mail-multipart-alternative-vs-multipart-mixed\nconst EMAIL_MIXED_BOUNDARY = 'mixed_boundary';\nconst EMAIL_ALTERNATIVE_BOUNDARY = 'alternative_boundary';\nconst EMAIL_CONTENT = `\nFrom:\nTo:\nSubject:\nX-Unsent: 1\nContent-Type: multipart/mixed; boundary=\"${EMAIL_MIXED_BOUNDARY}\"\n\n--${EMAIL_MIXED_BOUNDARY}\nContent-Type: multipart/alternative; boundary=\"${EMAIL_ALTERNATIVE_BOUNDARY}\"\n\n--${EMAIL_ALTERNATIVE_BOUNDARY}\nContent-Type: text/plain; charset=\"UTF-8\"\nContent-Transfer-Encoding: 7bit\n\n${EMAIL_TEXT_CONTENT}\n\n--${EMAIL_ALTERNATIVE_BOUNDARY}\nContent-Type: text/html; charset=\"UTF-8\"\nContent-Transfer-Encoding: 7bit\n\n${EMAIL_HTML_CONTENT}\n\n--${EMAIL_ALTERNATIVE_BOUNDARY}--\n\n`;\n/**\n * NOTE: this is a client-side export engine, this will and should eventually be replaced by a\n * server-side export engine which is more standardized and scalable.\n */\nexport class DataCubeGridClientExportEngine {\n dataCube;\n grid;\n constructor(grid) {\n this.dataCube = grid.dataCube;\n this.grid = grid;\n }\n generateFileName() {\n return `${this.dataCube.core.name} - ${formatDate(new Date(), 'EEE MMM dd yyyy HH_mm_ss')}`;\n }\n exportFile(format) {\n const fileName = this.generateFileName();\n switch (format) {\n case DataCubeGridClientExportFormat.CSV: {\n this.grid.client.exportDataAsCsv({\n fileName: `${fileName}.csv`,\n });\n return;\n }\n case DataCubeGridClientExportFormat.EXCEL: {\n // TODO?: configure settings for Excel export so we can export styling as well\n // See https://www.ag-grid.com/angular-data-grid/excel-export-styles/\n this.grid.client.exportDataAsExcel({\n fileName: `${fileName}.xlsx`,\n });\n return;\n }\n default:\n // do nothing\n }\n }\n async exportEmail(format) {\n const fileName = this.generateFileName();\n let fileNameWithExtension = fileName;\n let attachment;\n let contentType;\n switch (format) {\n case DataCubeGridClientExportFormat.CSV: {\n fileNameWithExtension = `${fileName}.csv`;\n contentType = ContentType.TEXT_CSV;\n attachment = await blobToBase64(new Blob([this.grid.client.getDataAsCsv() ?? ''], {\n type: ContentType.TEXT_CSV,\n }));\n break;\n }\n case DataCubeGridClientExportFormat.EXCEL: {\n fileNameWithExtension += `${fileName}.xlsx`;\n contentType = ContentType.APPLICATION_XLSX;\n // TODO?: configure settings for Excel export so we can export styling as well\n // See https://www.ag-grid.com/angular-data-grid/excel-export-styles/\n const xlsxContent = this.grid.client.getDataAsExcel();\n let xlsxBlob;\n if (xlsxContent instanceof Blob) {\n xlsxBlob = xlsxContent;\n }\n else if (typeof xlsxContent === 'string') {\n xlsxBlob = new Blob([xlsxContent], {\n type: ContentType.APPLICATION_XLSX,\n });\n }\n else {\n throw new IllegalStateError(`Can't export Excel content`);\n }\n attachment = await blobToBase64(xlsxBlob);\n break;\n }\n default:\n throw new UnsupportedOperationError(`Can't export email in format '${format}'`);\n }\n downloadFileUsingDataURI(`${fileName}.eml`, \n // NOTE: empty lines before email content can cause some mail client to not\n // recognize the email content, e.g. Outlook\n `${EMAIL_CONTENT.trimStart()}--${EMAIL_MIXED_BOUNDARY}\\n` +\n `Content-Type: ${contentType}; name=\"${fileNameWithExtension}\"\\n` +\n `Content-Transfer-Encoding: base64\\n` +\n `Content-Disposition: attachment; filename=\"${fileNameWithExtension}\"\\n\\n` +\n `${attachment}\\n\\n` +\n `--${EMAIL_MIXED_BOUNDARY}--`, \n // This MIME type here might not matter\n ContentType.MESSAGE_RFC822);\n }\n}\n//# sourceMappingURL=DataCubeGridClientExportEngine.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF 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, hashArray } from '@finos/legend-shared';\nimport { action, makeObservable, observable, runInAction } from 'mobx';\nimport { DataCubeGridClientServerSideDataSource, INTERNAL__GRID_CLIENT_DEFAULT_CACHE_BLOCK_SIZE, INTERNAL__GRID_CLIENT_MAX_CACHE_BLOCK_SIZE, } from './DataCubeGridClientEngine.js';\nimport { DataCubeQuerySnapshotSubscriber } from '../core/DataCubeQuerySnapshotSubscriber.js';\nimport { generateGridOptionsFromSnapshot } from './DataCubeGridConfigurationBuilder.js';\nimport { DataCubeConfiguration } from '../core/DataCubeConfiguration.js';\nimport { DataCubeGridControllerState } from './DataCubeGridControllerState.js';\nimport { DataCubeGridClientExportEngine } from './DataCubeGridClientExportEngine.js';\nclass DataCubeGridDatasourceConfiguration {\n limit;\n constructor(input) {\n const { snapshot } = input;\n this.limit = snapshot?.data.limit;\n }\n get hashCode() {\n return hashArray([`limit: ${this.limit ?? ''}`]);\n }\n}\nexport class DataCubeGridState extends DataCubeQuerySnapshotSubscriber {\n controller;\n exportEngine;\n _client;\n clientDataSource;\n isPaginationEnabled = false;\n scrollHintText;\n datasourceConfiguration;\n queryConfiguration;\n constructor(dataCube) {\n super(dataCube);\n makeObservable(this, {\n clientDataSource: observable,\n datasourceConfiguration: observable,\n queryConfiguration: observable,\n isPaginationEnabled: observable,\n setPaginationEnabled: action,\n scrollHintText: observable,\n setScrollHintText: action,\n });\n this.controller = new DataCubeGridControllerState(this.dataCube);\n this.exportEngine = new DataCubeGridClientExportEngine(this);\n this.datasourceConfiguration = new DataCubeGridDatasourceConfiguration({});\n this.queryConfiguration = new DataCubeConfiguration();\n this.clientDataSource = new DataCubeGridClientServerSideDataSource(this);\n }\n setPaginationEnabled(val) {\n this.isPaginationEnabled = val;\n // hard reset the grid, this will force the grid to fetch data again\n // NOTE: if we don't fully reset the datasource, and say we just turned on pagination,\n // for how many page that we loaded when pagination is off, the datasource\n // will fire that many data fetch operations which is expensive.\n this.clientDataSource = new DataCubeGridClientServerSideDataSource(this);\n // NOTE: ag-grid uses the cache block size as page size, so it's important to set this\n // in corresponding to the pagination setting, else it would cause unexpected scrolling behavior\n this.client.updateGridOptions({\n cacheBlockSize: val\n ? INTERNAL__GRID_CLIENT_DEFAULT_CACHE_BLOCK_SIZE\n : INTERNAL__GRID_CLIENT_MAX_CACHE_BLOCK_SIZE,\n });\n }\n setScrollHintText(val) {\n this.scrollHintText = val;\n }\n get client() {\n return guaranteeNonNullable(this._client, 'Grid client is not configured');\n }\n configureClient(val) {\n this._client = val;\n }\n async applySnapshot(snapshot, previousSnapshot) {\n const existingExtraConfiguration = this.datasourceConfiguration;\n const queryConfiguration = DataCubeConfiguration.serialization.fromJson(snapshot.data.configuration);\n // NOTE: if one of the change affects the structure of the data cube but cannot be captured\n // in the grid client options, we will need to manually reset the grid by resetting the\n // datasource to ensure we don't fetch the result twice while forcing the data to be refreshed\n runInAction(() => {\n this.datasourceConfiguration = new DataCubeGridDatasourceConfiguration({\n snapshot,\n queryConfiguration,\n });\n this.queryConfiguration = queryConfiguration;\n });\n if (existingExtraConfiguration.hashCode !==\n this.datasourceConfiguration.hashCode) {\n // reset the entire grid\n this.clientDataSource = new DataCubeGridClientServerSideDataSource(this);\n }\n const gridOptions = generateGridOptionsFromSnapshot(snapshot, queryConfiguration, this.dataCube);\n this.client.updateGridOptions({\n ...gridOptions,\n // NOTE: ag-grid uses the cache block size as page size, so it's important to set this\n // in corresponding to the pagination setting, else it would cause unexpected scrolling behavior\n cacheBlockSize: this.isPaginationEnabled\n ? INTERNAL__GRID_CLIENT_DEFAULT_CACHE_BLOCK_SIZE\n : INTERNAL__GRID_CLIENT_MAX_CACHE_BLOCK_SIZE,\n });\n }\n async initialize() {\n // do nothing\n }\n}\n//# sourceMappingURL=DataCubeGridState.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { makeObservable, observable, action, computed } from 'mobx';\nimport { guaranteeNonNullable } from '@finos/legend-shared';\nexport class DataCubeEditorColumnsSelectorColumnState {\n name;\n type;\n constructor(name, type) {\n this.name = name;\n this.type = type;\n }\n}\nexport var DataCubeEditorColumnsSelectorColumnsVisibility;\n(function (DataCubeEditorColumnsSelectorColumnsVisibility) {\n DataCubeEditorColumnsSelectorColumnsVisibility[\"VISIBLE\"] = \"visible\";\n DataCubeEditorColumnsSelectorColumnsVisibility[\"VISIBLE_WITH_WARNING\"] = \"visible-with-warning\";\n DataCubeEditorColumnsSelectorColumnsVisibility[\"HIDDEN\"] = \"hidden\";\n})(DataCubeEditorColumnsSelectorColumnsVisibility || (DataCubeEditorColumnsSelectorColumnsVisibility = {}));\nexport class DataCubeEditorColumnsSelectorState {\n dataCube;\n editor;\n selectedColumns = [];\n availableColumnsSearchText = '';\n selectedColumnsSearchText = '';\n onChange;\n columnsVisibility;\n constructor(editor, options) {\n makeObservable(this, {\n availableColumns: computed,\n availableColumnsForDisplay: computed,\n selectedColumnsForDisplay: computed,\n selectedColumns: observable,\n setSelectedColumns: action,\n availableColumnsSearchText: observable,\n setAvailableColumnsSearchText: action,\n selectedColumnsSearchText: observable,\n setSelectedColumnsSearchText: action,\n columnsVisibility: observable,\n setColumnsVisibility: action,\n });\n this.editor = editor;\n this.dataCube = editor.dataCube;\n this.onChange = options?.onChange;\n this.columnsVisibility =\n options?.initialColumnsVisibility ??\n DataCubeEditorColumnsSelectorColumnsVisibility.VISIBLE;\n }\n setColumnsVisibility(visibility) {\n this.columnsVisibility = visibility;\n }\n get availableColumnsForDisplay() {\n return this.availableColumns\n .filter((column) => !this.selectedColumns.find((col) => column.name === col.name))\n .sort((a, b) => a.name.localeCompare(b.name))\n .filter((column) => this.columnsVisibility !==\n DataCubeEditorColumnsSelectorColumnsVisibility.HIDDEN ||\n !this.editor.columnProperties.columns.find((col) => col.name === column.name)?.hideFromView);\n }\n get selectedColumnsForDisplay() {\n return this.selectedColumns.filter((column) => this.columnsVisibility !==\n DataCubeEditorColumnsSelectorColumnsVisibility.HIDDEN ||\n !this.editor.columnProperties.columns.find((col) => col.name === column.name)?.hideFromView);\n }\n setSelectedColumns(val) {\n this.selectedColumns = val.map((col) => this.cloneColumn(col));\n this.onChange?.(this);\n }\n setAvailableColumnsSearchText(val) {\n this.availableColumnsSearchText = val;\n }\n setSelectedColumnsSearchText(val) {\n this.selectedColumnsSearchText = val;\n }\n getColumn(colName) {\n return guaranteeNonNullable(this.availableColumns.find((col) => col.name === colName), `Can't find column '${colName}'`);\n }\n}\n//# sourceMappingURL=DataCubeEditorColumnsSelectorState.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF 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, optional, primitive } from 'serializr';\nimport { SerializationFactory, usingModelSchema } from '@finos/legend-shared';\nimport { V1_sourceInformationSerialization } from '../transformation/pureProtocol/serializationHelpers/V1_CoreSerializationHelper.js';\nexport var V1_EngineErrorType;\n(function (V1_EngineErrorType) {\n V1_EngineErrorType[\"COMPILATION\"] = \"COMPILATION\";\n V1_EngineErrorType[\"PARSER\"] = \"PARSER\";\n})(V1_EngineErrorType || (V1_EngineErrorType = {}));\nexport class V1_EngineError {\n message = '';\n errorType;\n sourceInformation;\n static serialization = new SerializationFactory(createModelSchema(V1_EngineError, {\n errorType: optional(primitive()),\n message: primitive(),\n sourceInformation: usingModelSchema(V1_sourceInformationSerialization.schema),\n }));\n}\n//# sourceMappingURL=V1_EngineError.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF 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 {} from '../core/DataCubeQuerySnapshot.js';\nimport { DataCubeQuerySortOperation } from '../core/DataCubeQueryEngine.js';\nimport { DataCubeEditorColumnsSelectorColumnState, DataCubeEditorColumnsSelectorState, } from './DataCubeEditorColumnsSelectorState.js';\nexport class DataCubeEditorSortColumnState extends DataCubeEditorColumnsSelectorColumnState {\n operation;\n constructor(name, type, direction) {\n super(name, type);\n makeObservable(this, {\n operation: observable,\n setOperation: action,\n });\n this.operation = direction;\n }\n setOperation(val) {\n this.operation = val;\n }\n}\nexport class DataCubeEditorSortColumnsSelectorState extends DataCubeEditorColumnsSelectorState {\n cloneColumn(column) {\n return new DataCubeEditorSortColumnState(column.name, column.type, column.operation);\n }\n get availableColumns() {\n return this.editor.columns.selector.selectedColumns.map((col) => new DataCubeEditorSortColumnState(col.name, col.type, DataCubeQuerySortOperation.ASCENDING));\n }\n}\nexport class DataCubeEditorSortsPanelState {\n dataCube;\n editor;\n selector;\n constructor(editor) {\n this.editor = editor;\n this.dataCube = editor.dataCube;\n this.selector = new DataCubeEditorSortColumnsSelectorState(editor);\n }\n applySnaphot(snapshot, configuration) {\n this.selector.setSelectedColumns(snapshot.data.sortColumns.map((col) => {\n const column = this.selector.getColumn(col.name);\n return new DataCubeEditorSortColumnState(column.name, column.type, col.operation);\n }));\n }\n buildSnapshot(newSnapshot, baseSnapshot) {\n newSnapshot.data.sortColumns = this.selector.selectedColumns.map((col) => ({\n name: col.name,\n type: col.type,\n operation: col.operation,\n }));\n }\n}\n//# sourceMappingURL=DataCubeEditorSortsPanelState.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS 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 SourceInformation {\n sourceId;\n startLine;\n startColumn;\n endLine;\n endColumn;\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}\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 { createModelSchema, optional, primitive } from 'serializr';\nimport { SerializationFactory, usingModelSchema } from '@finos/legend-shared';\nimport { V1_EngineError } from '../../engine/V1_EngineError.js';\nimport { V1_sourceInformationSerialization } from '../../transformation/pureProtocol/serializationHelpers/V1_CoreSerializationHelper.js';\nexport class V1_ParserError extends V1_EngineError {\n static serialization = new SerializationFactory(createModelSchema(V1_ParserError, {\n errorType: optional(primitive()),\n message: primitive(),\n sourceInformation: usingModelSchema(V1_sourceInformationSerialization.schema),\n }));\n}\n//# sourceMappingURL=V1_ParserError.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF 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';\nimport { makeObservable, observable } from 'mobx';\nexport class EngineError extends ApplicationError {\n sourceInformation;\n}\nexport class ParserError extends EngineError {\n}\nexport class CompilationError extends EngineError {\n constructor(message) {\n super(message);\n makeObservable(this, {\n sourceInformation: observable,\n });\n }\n}\nexport class ExternalFormatError extends CompilationError {\n}\n//# sourceMappingURL=EngineError.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF 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 { HttpStatus, NetworkClientError, assertErrorThrown, uuid, } from '@finos/legend-shared';\nimport { ParserError, SourceInformation, V1_ParserError, } from '@finos/legend-graph';\nclass DataCubeQueryEditorState {\n uuid = uuid();\n query;\n parserError;\n constructor(query) {\n makeObservable(this, {\n query: observable,\n parserError: observable,\n setQuery: action,\n setParserError: action,\n });\n this.query = query;\n }\n setQuery(val) {\n this.query = val;\n }\n setParserError(parserError) {\n // account for the lambda prefix offset in source information\n if (parserError?.sourceInformation) {\n parserError.sourceInformation = this.processSourceInformation(parserError.sourceInformation);\n }\n this.parserError = parserError;\n }\n processSourceInformation(sourceInformation) {\n const { sourceId, startLine, startColumn, endLine, endColumn } = sourceInformation;\n const lineOffset = 0;\n const columnOffset = 0;\n return new SourceInformation(sourceId, startLine + lineOffset, startColumn - (startLine === 1 ? columnOffset : 0), endLine + lineOffset, endColumn - (endLine === 1 ? columnOffset : 0));\n }\n}\nexport class DataCubeEditorCodePanelState {\n dataCube;\n editor;\n queryEditorState;\n currentSubQuery;\n constructor(editor) {\n makeObservable(this, {\n currentSubQuery: observable,\n queryEditorState: observable,\n setCurrentSubQuery: action,\n parseQuery: flow,\n });\n this.editor = editor;\n this.dataCube = editor.dataCube;\n this.queryEditorState = new DataCubeQueryEditorState('');\n }\n setCurrentSubQuery(val) {\n this.currentSubQuery = val;\n }\n *parseQuery() {\n try {\n this.queryEditorState.setParserError(undefined);\n yield flowResult(this.dataCube.repl.client.parseQuery({\n code: `|${this.queryEditorState.query}`,\n }));\n }\n catch (error) {\n assertErrorThrown(error);\n if (error instanceof NetworkClientError &&\n error.response.status === HttpStatus.BAD_REQUEST) {\n const protocol = V1_ParserError.serialization.fromJson(error.payload);\n const parserError = new ParserError(protocol.message);\n if (protocol.sourceInformation) {\n parserError.sourceInformation = new SourceInformation(protocol.sourceInformation.sourceId, protocol.sourceInformation.startLine, protocol.sourceInformation.startColumn, protocol.sourceInformation.endLine, protocol.sourceInformation.endColumn);\n }\n this.queryEditorState.setParserError(parserError);\n }\n }\n }\n}\n//# sourceMappingURL=DataCubeEditorCodePanelState.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { getDataType, DEFAULT_FONT_FAMILY, DEFAULT_FONT_SIZE, DEFAULT_FONT_BOLD, DEFAULT_FONT_ITALIC, DEFAULT_FONT_UNDERLINED, DEFAULT_FONT_STRIKETHROUGH, DEFAULT_TEXT_ALIGN, DEFAULT_FOREGROUND_COLOR, DEFAULT_NEGATIVE_FOREGROUND_COLOR, DEFAULT_ZERO_FOREGROUND_COLOR, DEFAULT_ERROR_FOREGROUND_COLOR, DEFAULT_BACKGROUND_COLOR, } from '../core/DataCubeQueryEngine.js';\nimport {} from '@finos/legend-shared';\nimport { makeObservable, observable, action, computed } from 'mobx';\nimport { DataCubeColumnConfiguration, DataCubeConfiguration, } from '../core/DataCubeConfiguration.js';\nimport { buildDefaultColumnConfiguration } from '../core/DataCubeConfigurationBuilder.js';\nexport class DataCubeMutableColumnConfiguration extends DataCubeColumnConfiguration {\n dataType;\n // NOTE: these configurations are synthesized from the data query, and materialized here\n // to make editing more convenient. They should not be part of the persistent configuration\n // to avoid duplication of information with the data query.\n aggregateFunction;\n aggregateFunctionParameters = [];\n excludedFromHorizontalPivot = false;\n static create(json) {\n const configuration = Object.assign(new DataCubeMutableColumnConfiguration('', ''), DataCubeColumnConfiguration.serialization.fromJson(json));\n configuration.dataType =\n getDataType(configuration.type);\n makeObservable(configuration, {\n kind: observable,\n setKind: action,\n displayName: observable,\n setDisplayName: action,\n decimals: observable,\n setDecimals: action,\n displayCommas: observable,\n setDisplayCommas: action,\n negativeNumberInParens: observable,\n setNegativeNumberInParens: action,\n numberScale: observable,\n setNumberScale: action,\n missingValueDisplayText: observable,\n setMissingValueDisplayText: action,\n hPivotSortFunction: observable,\n setHPivotSortFunction: action,\n fontFamily: observable,\n setFontFamily: action,\n fontSize: observable,\n setFontSize: action,\n fontBold: observable,\n setFontBold: action,\n fontItalic: observable,\n setFontItalic: action,\n fontUnderline: observable,\n setFontUnderline: action,\n fontStrikethrough: observable,\n setFontStrikethrough: action,\n fontCase: observable,\n setFontCase: action,\n textAlign: observable,\n setTextAlign: action,\n normalForegroundColor: observable,\n setNormalForegroundColor: action,\n negativeForegroundColor: observable,\n setNegativeForegroundColor: action,\n zeroForegroundColor: observable,\n setZeroForegroundColor: action,\n errorForegroundColor: observable,\n setErrorForegroundColor: action,\n normalBackgroundColor: observable,\n setNormalBackgroundColor: action,\n negativeBackgroundColor: observable,\n setNegativeBackgroundColor: action,\n zeroBackgroundColor: observable,\n setZeroBackgroundColor: action,\n errorBackgroundColor: observable,\n setErrorBackgroundColor: action,\n blur: observable,\n setBlur: action,\n hideFromView: observable,\n setHideFromView: action,\n fixedWidth: observable,\n setFixedWidth: action,\n minWidth: observable,\n setMinWidth: action,\n maxWidth: observable,\n setMaxWidth: action,\n pinned: observable,\n setPinned: action,\n displayAsLink: observable,\n setDisplayAsLink: action,\n linkLabelParameter: observable,\n setLinkLabelParameter: action,\n isUsingDefaultStyling: computed,\n useDefaultStyling: action,\n aggregateFunction: observable,\n setAggregateFunction: action,\n aggregateFunctionParameters: observable,\n setAggregateFunctionParameters: action,\n excludedFromHorizontalPivot: observable,\n setExcludedFromHorizontalPivot: action,\n });\n return configuration;\n }\n static createDefault(column) {\n return DataCubeMutableColumnConfiguration.create(DataCubeColumnConfiguration.serialization.toJson(buildDefaultColumnConfiguration(column)));\n }\n serialize() {\n return DataCubeColumnConfiguration.serialization.toJson(this);\n }\n get isUsingDefaultStyling() {\n return (this.fontFamily === undefined &&\n this.fontSize === undefined &&\n this.fontBold === undefined &&\n this.fontItalic === undefined &&\n this.fontUnderline === undefined &&\n this.fontStrikethrough === undefined &&\n this.textAlign === undefined &&\n this.normalForegroundColor === undefined &&\n this.negativeForegroundColor === undefined &&\n this.zeroForegroundColor === undefined &&\n this.errorForegroundColor === undefined &&\n this.normalBackgroundColor === undefined &&\n this.negativeBackgroundColor === undefined &&\n this.zeroBackgroundColor === undefined &&\n this.errorBackgroundColor === undefined);\n }\n useDefaultStyling() {\n this.fontFamily = undefined;\n this.fontSize = undefined;\n this.fontBold = undefined;\n this.fontItalic = undefined;\n this.fontUnderline = undefined;\n this.fontStrikethrough = undefined;\n this.textAlign = undefined;\n this.normalForegroundColor = undefined;\n this.negativeForegroundColor = undefined;\n this.zeroForegroundColor = undefined;\n this.errorForegroundColor = undefined;\n this.normalBackgroundColor = undefined;\n this.negativeBackgroundColor = undefined;\n this.zeroBackgroundColor = undefined;\n this.errorBackgroundColor = undefined;\n }\n setKind(value) {\n this.kind = value;\n }\n setDisplayName(value) {\n this.displayName = value;\n }\n setDecimals(value) {\n this.decimals = value;\n }\n setDisplayCommas(value) {\n this.displayCommas = value;\n }\n setNegativeNumberInParens(value) {\n this.negativeNumberInParens = value;\n }\n setNumberScale(value) {\n this.numberScale = value;\n }\n setMissingValueDisplayText(value) {\n this.missingValueDisplayText = value;\n }\n setHPivotSortFunction(value) {\n this.hPivotSortFunction = value;\n }\n setFontFamily(value) {\n this.fontFamily = value;\n }\n setFontSize(value) {\n this.fontSize = value;\n }\n setFontBold(value) {\n this.fontBold = value;\n }\n setFontItalic(value) {\n this.fontItalic = value;\n }\n setFontUnderline(value) {\n this.fontUnderline = value;\n }\n setFontStrikethrough(value) {\n this.fontStrikethrough = value;\n }\n setFontCase(value) {\n this.fontCase = value;\n }\n setTextAlign(value) {\n this.textAlign = value;\n }\n setNormalForegroundColor(value) {\n this.normalForegroundColor = value;\n }\n setNegativeForegroundColor(value) {\n this.negativeForegroundColor = value;\n }\n setZeroForegroundColor(value) {\n this.zeroForegroundColor = value;\n }\n setErrorForegroundColor(value) {\n this.errorForegroundColor = value;\n }\n setNormalBackgroundColor(value) {\n this.normalBackgroundColor = value;\n }\n setNegativeBackgroundColor(value) {\n this.negativeBackgroundColor = value;\n }\n setZeroBackgroundColor(value) {\n this.zeroBackgroundColor = value;\n }\n setErrorBackgroundColor(value) {\n this.errorBackgroundColor = value;\n }\n setBlur(value) {\n this.blur = value;\n }\n setHideFromView(value) {\n this.hideFromView = value;\n }\n setFixedWidth(value) {\n this.fixedWidth = value;\n }\n setMinWidth(value) {\n this.minWidth = value;\n }\n setMaxWidth(value) {\n this.maxWidth = value;\n }\n setPinned(value) {\n this.pinned = value;\n }\n setDisplayAsLink(value) {\n this.displayAsLink = value;\n }\n setLinkLabelParameter(value) {\n this.linkLabelParameter = value;\n }\n setAggregateFunction(value) {\n this.aggregateFunction = value;\n }\n setExcludedFromHorizontalPivot(value) {\n this.excludedFromHorizontalPivot = value;\n }\n setAggregateFunctionParameters(value) {\n this.aggregateFunctionParameters = value;\n }\n}\nexport class DataCubeMutableConfiguration extends DataCubeConfiguration {\n static create(json) {\n const configuration = Object.assign(new DataCubeMutableConfiguration(), DataCubeConfiguration.serialization.fromJson(json));\n configuration.columns = [];\n makeObservable(configuration, {\n description: observable,\n setDescription: action,\n showTreeLines: observable,\n setShowTreeLines: action,\n showHorizontalGridLines: observable,\n setShowHorizontalGridLines: action,\n showVerticalGridLines: observable,\n setShowVerticalGridLines: action,\n gridLineColor: observable,\n setGridLineColor: action,\n fontFamily: observable,\n setFontFamily: action,\n fontSize: observable,\n setFontSize: action,\n fontBold: observable,\n setFontBold: action,\n fontItalic: observable,\n setFontItalic: action,\n fontUnderline: observable,\n setFontUnderline: action,\n fontStrikethrough: observable,\n setFontStrikethrough: action,\n fontCase: observable,\n setFontCase: action,\n textAlign: observable,\n setTextAlign: action,\n normalForegroundColor: observable,\n setNormalForegroundColor: action,\n negativeForegroundColor: observable,\n setNegativeForegroundColor: action,\n zeroForegroundColor: observable,\n setZeroForegroundColor: action,\n errorForegroundColor: observable,\n setErrorForegroundColor: action,\n normalBackgroundColor: observable,\n setNormalBackgroundColor: action,\n negativeBackgroundColor: observable,\n setNegativeBackgroundColor: action,\n zeroBackgroundColor: observable,\n setZeroBackgroundColor: action,\n errorBackgroundColor: observable,\n setErrorBackgroundColor: action,\n alternateRows: observable,\n setAlternateRows: action,\n alternateRowsColor: observable,\n setAlternateRowsColor: action,\n alternateRowsCount: observable,\n setAlternateRowsCount: action,\n alternateRowsStandardMode: observable,\n setAlternateRowsStandardMode: action,\n selectionStats: observable,\n setSelectionStats: action,\n showWarningForTruncatedResult: observable,\n setShowWarningForTruncatedResult: action,\n initialExpandLevel: observable,\n setInitialExpandLevel: action,\n showRootAggregation: observable,\n setShowRootAggregation: action,\n showLeafCount: observable,\n setShowLeafCount: action,\n addPivotTotalColumn: observable,\n setAddPivotTotalColumn: action,\n addPivotTotalColumnOnLeft: observable,\n setAddPivotTotalColumnOnLeft: action,\n treeGroupSortFunction: observable,\n setTreeGroupSortFunction: action,\n isUsingDefaultStyling: computed,\n useDefaultStyling: action,\n });\n return configuration;\n }\n get isUsingDefaultStyling() {\n return (this.fontFamily === DEFAULT_FONT_FAMILY &&\n this.fontSize === DEFAULT_FONT_SIZE &&\n this.fontBold === DEFAULT_FONT_BOLD &&\n this.fontItalic === DEFAULT_FONT_ITALIC &&\n this.fontUnderline === DEFAULT_FONT_UNDERLINED &&\n this.fontStrikethrough === DEFAULT_FONT_STRIKETHROUGH &&\n this.textAlign === DEFAULT_TEXT_ALIGN &&\n this.normalForegroundColor === DEFAULT_FOREGROUND_COLOR &&\n this.negativeForegroundColor === DEFAULT_NEGATIVE_FOREGROUND_COLOR &&\n this.zeroForegroundColor === DEFAULT_ZERO_FOREGROUND_COLOR &&\n this.errorForegroundColor === DEFAULT_ERROR_FOREGROUND_COLOR &&\n this.normalBackgroundColor === DEFAULT_BACKGROUND_COLOR &&\n this.negativeBackgroundColor === DEFAULT_BACKGROUND_COLOR &&\n this.zeroBackgroundColor === DEFAULT_BACKGROUND_COLOR &&\n this.errorBackgroundColor === DEFAULT_BACKGROUND_COLOR);\n }\n useDefaultStyling() {\n this.fontFamily = DEFAULT_FONT_FAMILY;\n this.fontSize = DEFAULT_FONT_SIZE;\n this.fontBold = DEFAULT_FONT_BOLD;\n this.fontItalic = DEFAULT_FONT_ITALIC;\n this.fontUnderline = DEFAULT_FONT_UNDERLINED;\n this.fontStrikethrough = DEFAULT_FONT_STRIKETHROUGH;\n this.textAlign = DEFAULT_TEXT_ALIGN;\n this.normalForegroundColor = DEFAULT_FOREGROUND_COLOR;\n this.negativeForegroundColor = DEFAULT_NEGATIVE_FOREGROUND_COLOR;\n this.zeroForegroundColor = DEFAULT_ZERO_FOREGROUND_COLOR;\n this.errorForegroundColor = DEFAULT_ERROR_FOREGROUND_COLOR;\n this.normalBackgroundColor = DEFAULT_BACKGROUND_COLOR;\n this.negativeBackgroundColor = DEFAULT_BACKGROUND_COLOR;\n this.zeroBackgroundColor = DEFAULT_BACKGROUND_COLOR;\n this.errorBackgroundColor = DEFAULT_BACKGROUND_COLOR;\n }\n serialize() {\n return DataCubeConfiguration.serialization.toJson(this);\n }\n setDescription(value) {\n this.description = value;\n }\n setShowTreeLines(value) {\n this.showTreeLines = value;\n }\n setShowHorizontalGridLines(value) {\n this.showHorizontalGridLines = value;\n }\n setShowVerticalGridLines(value) {\n this.showVerticalGridLines = value;\n }\n setGridLineColor(value) {\n this.gridLineColor = value;\n }\n setFontFamily(value) {\n this.fontFamily = value;\n }\n setFontSize(value) {\n this.fontSize = value;\n }\n setFontBold(value) {\n this.fontBold = value;\n }\n setFontItalic(value) {\n this.fontItalic = value;\n }\n setFontUnderline(value) {\n this.fontUnderline = value;\n }\n setFontStrikethrough(value) {\n this.fontStrikethrough = value;\n }\n setFontCase(value) {\n this.fontCase = value;\n }\n setTextAlign(value) {\n this.textAlign = value;\n }\n setNormalForegroundColor(value) {\n this.normalForegroundColor = value;\n }\n setNegativeForegroundColor(value) {\n this.negativeForegroundColor = value;\n }\n setZeroForegroundColor(value) {\n this.zeroForegroundColor = value;\n }\n setErrorForegroundColor(value) {\n this.errorForegroundColor = value;\n }\n setNormalBackgroundColor(value) {\n this.normalBackgroundColor = value;\n }\n setNegativeBackgroundColor(value) {\n this.negativeBackgroundColor = value;\n }\n setZeroBackgroundColor(value) {\n this.zeroBackgroundColor = value;\n }\n setErrorBackgroundColor(value) {\n this.errorBackgroundColor = value;\n }\n setAlternateRows(value) {\n this.alternateRows = value;\n }\n setAlternateRowsColor(value) {\n this.alternateRowsColor = value;\n }\n setAlternateRowsCount(value) {\n this.alternateRowsCount = value;\n }\n setAlternateRowsStandardMode(value) {\n this.alternateRowsStandardMode = value;\n }\n setSelectionStats(value) {\n this.selectionStats = value;\n }\n setShowWarningForTruncatedResult(value) {\n this.showWarningForTruncatedResult = value;\n }\n setInitialExpandLevel(value) {\n this.initialExpandLevel = value;\n }\n setShowRootAggregation(value) {\n this.showRootAggregation = value;\n }\n setShowLeafCount(value) {\n this.showLeafCount = value;\n }\n setAddPivotTotalColumn(value) {\n this.addPivotTotalColumn = value;\n }\n setAddPivotTotalColumnOnLeft(value) {\n this.addPivotTotalColumnOnLeft = value;\n }\n setTreeGroupSortFunction(value) {\n this.treeGroupSortFunction = value;\n }\n}\n//# sourceMappingURL=DataCubeMutableConfiguration.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF 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 { DataCubeMutableConfiguration } from './DataCubeMutableConfiguration.js';\nexport class DataCubeEditorGeneralPropertiesPanelState {\n dataCube;\n editor;\n name = '';\n limit = -1;\n configuration = new DataCubeMutableConfiguration();\n constructor(editor) {\n makeObservable(this, {\n name: observable,\n setName: action,\n limit: observable,\n setLimit: action,\n configuration: observable,\n setConfiguration: action,\n });\n this.editor = editor;\n this.dataCube = editor.dataCube;\n }\n setName(val) {\n this.name = val;\n }\n setLimit(val) {\n this.limit = val;\n }\n setConfiguration(val) {\n this.configuration = val;\n }\n applySnaphot(snapshot, configuration) {\n this.setName(snapshot.data.name);\n this.setLimit(snapshot.data.limit !== undefined && snapshot.data.limit > 0\n ? snapshot.data.limit\n : -1);\n this.setConfiguration(DataCubeMutableConfiguration.create(snapshot.data.configuration));\n }\n buildSnapshot(newSnapshot, baseSnapshot) {\n const data = newSnapshot.data;\n data.name = this.name;\n data.limit = this.limit <= 0 ? undefined : this.limit;\n data.configuration = this.configuration.serialize();\n }\n}\n//# sourceMappingURL=DataCubeEditorGeneralPropertiesPanelState.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { action, computed, makeObservable, observable } from 'mobx';\nimport { _findCol, } from '../core/DataCubeQuerySnapshot.js';\nimport { DataCubeMutableColumnConfiguration } from './DataCubeMutableConfiguration.js';\nimport { getNonNullableEntry, isNonNullable, } from '@finos/legend-shared';\nimport { DataCubeAggregateOperation, DataCubeColumnKind, } from '../core/DataCubeQueryEngine.js';\nimport { PRIMITIVE_TYPE } from '@finos/legend-graph';\nexport class DataCubeEditorColumnPropertiesPanelState {\n dataCube;\n editor;\n columns = [];\n selectedColumnName;\n showAdvancedSettings = false;\n constructor(editor) {\n makeObservable(this, {\n columns: observable,\n setColumns: action,\n selectedColumnName: observable,\n setSelectedColumnName: action,\n selectedColumn: computed,\n showAdvancedSettings: observable,\n setShowAdvancedSettings: action,\n hiddenColumns: computed,\n configurableColumns: computed,\n });\n this.editor = editor;\n this.dataCube = editor.dataCube;\n }\n get hiddenColumns() {\n return this.columns.filter((column) => column.hideFromView);\n }\n get configurableColumns() {\n return this.columns\n .filter((column) => this.editor.columns.selector.selectedColumns.find((col) => col.name === column.name))\n .sort((a, b) => a.name.localeCompare(b.name));\n }\n getColumnConfiguration(colName) {\n return this.columns.find((col) => col.name === colName);\n }\n setColumns(val) {\n this.columns = val;\n }\n setSelectedColumnName(val) {\n this.selectedColumnName = val;\n }\n get selectedColumn() {\n return this.configurableColumns.find((column) => column.name === this.selectedColumnName);\n }\n setShowAdvancedSettings(val) {\n this.showAdvancedSettings = val;\n }\n applySnaphot(snapshot, configuration) {\n this.setColumns(snapshot.data.configuration.columns.map((column) => DataCubeMutableColumnConfiguration.create(column)));\n // derive the aggregation operation\n this.columns.forEach((column) => {\n if (column.kind === DataCubeColumnKind.MEASURE) {\n const aggCol = _findCol(snapshot.data.groupBy?.aggColumns, column.name);\n if (aggCol) {\n column.setAggregateFunction(aggCol.operation);\n column.setAggregateFunctionParameters(aggCol.parameters);\n }\n else {\n switch (column.type) {\n case PRIMITIVE_TYPE.NUMBER:\n case PRIMITIVE_TYPE.INTEGER:\n case PRIMITIVE_TYPE.DECIMAL:\n case PRIMITIVE_TYPE.FLOAT: {\n column.setAggregateFunction(DataCubeAggregateOperation.SUM);\n column.setAggregateFunctionParameters([]);\n break;\n }\n default: {\n break;\n }\n }\n }\n }\n });\n if (!this.selectedColumn && this.columns.length) {\n this.setSelectedColumnName(getNonNullableEntry(this.configurableColumns, 0).name);\n }\n }\n buildSnapshot(newSnapshot, baseSnapshot) {\n newSnapshot.data.configuration = {\n ...newSnapshot.data.configuration,\n // NOTE: make sure the order of column configurations is consistent with the order of selected columns\n // as this would later be used to determine of order of displayed columns in the grid\n columns: this.editor.columns.selector.selectedColumns\n .map((col) => this.columns.find((column) => column.name === col.name))\n .filter(isNonNullable)\n .map((column) => column.serialize()),\n };\n }\n}\n//# sourceMappingURL=DataCubeEditorColumnPropertiesPanelState.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF 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 {} from '../core/DataCubeQuerySnapshot.js';\nimport { DataCubeEditorColumnsSelectorColumnState, DataCubeEditorColumnsSelectorColumnsVisibility, DataCubeEditorColumnsSelectorState, } from './DataCubeEditorColumnsSelectorState.js';\nimport {} from '../core/DataCubeConfiguration.js';\nimport { DataCubeMutableColumnConfiguration } from './DataCubeMutableConfiguration.js';\nexport class DataCubeEditorBasicColumnsSelectorState extends DataCubeEditorColumnsSelectorState {\n cloneColumn(column) {\n return new DataCubeEditorColumnsSelectorColumnState(column.name, column.type);\n }\n get availableColumns() {\n return [\n ...this.editor.columns.sourceColumns,\n // TODO: add extended columns\n ].map((col) => new DataCubeEditorColumnsSelectorColumnState(col.name, col.type));\n }\n}\nexport class DataCubeEditorColumnsPanelState {\n dataCube;\n editor;\n selector;\n sourceColumns = [];\n constructor(editor) {\n makeObservable(this, {\n sourceColumns: observable,\n setSourceColumns: action,\n });\n this.editor = editor;\n this.dataCube = editor.dataCube;\n this.selector = new DataCubeEditorBasicColumnsSelectorState(editor, {\n initialColumnsVisibility: DataCubeEditorColumnsSelectorColumnsVisibility.HIDDEN,\n onChange: (selector) => {\n // populate a default configuration for the newly selected columns\n selector.selectedColumns\n .filter((col) => !this.editor.columnProperties.columns.find((column) => column.name === col.name))\n .forEach((col) => {\n this.editor.columnProperties.setColumns([\n ...this.editor.columnProperties.columns,\n DataCubeMutableColumnConfiguration.createDefault({\n name: col.name,\n type: col.type,\n }),\n ]);\n });\n },\n });\n }\n /**\n * Propagate column selection changes to other states: column properties, sorts, pivots, etc.\n *\n * NOTE: Ideally, this should be called on every changes made to the column selection, but to\n * give user some room for error, i.e. when user accidentally select/deselect columns, we would\n * not propagate this change until user either leaves this panel or explicitly applies changes\n * (i.e. publishes a new snapshot)\n */\n propagateColumnSelectionChanges() {\n // prune column properties\n this.editor.columnProperties.setColumns(this.editor.columnProperties.columns.filter((column) => this.selector.selectedColumns.find((col) => col.name === column.name)));\n // prune sorts\n this.editor.sorts.selector.setSelectedColumns(this.editor.sorts.selector.selectedColumns.filter((column) => this.selector.selectedColumns.find((col) => col.name === column.name)));\n // prune vertical pivots columns\n this.editor.verticalPivots.selector.setSelectedColumns(this.editor.verticalPivots.selector.selectedColumns.filter((column) => this.selector.selectedColumns.find((col) => col.name === column.name)));\n // TODO: prune horizontal pivots columns\n }\n setSourceColumns(columns) {\n this.sourceColumns = columns;\n }\n applySnaphot(snapshot, configuration) {\n this.setSourceColumns(snapshot.data.sourceColumns);\n this.selector.setSelectedColumns(\n // extract selected columns from the configuration since the configuration specifies the order\n // taking into account the group extended columns\n configuration.columns.map((col) => {\n const column = this.selector.getColumn(col.name);\n return new DataCubeEditorColumnsSelectorColumnState(column.name, column.type);\n }));\n }\n buildSnapshot(newSnapshot, baseSnapshot) {\n this.propagateColumnSelectionChanges();\n newSnapshot.data.selectColumns = this.selector.selectedColumns\n // TODO: filter by group extended columns\n .map((col) => ({\n name: col.name,\n type: col.type,\n }));\n }\n}\n//# sourceMappingURL=DataCubeEditorColumnsPanelState.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF 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 { DataCubeColumnKind } from '../core/DataCubeQueryEngine.js';\nimport {} from '../core/DataCubeQuerySnapshot.js';\nimport { DataCubeEditorColumnsSelectorColumnState, DataCubeEditorColumnsSelectorState, } from './DataCubeEditorColumnsSelectorState.js';\nexport class DataCubeEditorVerticalPivotColumnsSelectorState extends DataCubeEditorColumnsSelectorState {\n cloneColumn(column) {\n return new DataCubeEditorColumnsSelectorColumnState(column.name, column.type);\n }\n get availableColumns() {\n return this.editor.columns.selector.selectedColumns\n .map(\n // TODO: filter group extended columns\n (col) => new DataCubeEditorColumnsSelectorColumnState(col.name, col.type))\n .filter((column) => this.editor.columnProperties.columns.find((col) => col.name === column.name)?.kind === DataCubeColumnKind.DIMENSION);\n }\n}\nexport class DataCubeEditorVerticalPivotsPanelState {\n dataCube;\n editor;\n selector;\n constructor(editor) {\n this.editor = editor;\n this.dataCube = editor.dataCube;\n this.selector = new DataCubeEditorVerticalPivotColumnsSelectorState(editor);\n }\n applySnaphot(snapshot, configuration) {\n this.selector.setSelectedColumns((snapshot.data.groupBy?.columns ?? []).map((col) => new DataCubeEditorColumnsSelectorColumnState(col.name, col.type)));\n }\n buildSnapshot(newSnapshot, baseSnapshot) {\n newSnapshot.data.groupBy = this.selector.selectedColumns.length\n ? {\n columns: this.selector.selectedColumns.map((column) => ({\n name: column.name,\n type: column.type,\n })),\n aggColumns: this.editor.columnProperties.columns\n .filter((column) => column.kind === DataCubeColumnKind.MEASURE &&\n column.aggregateFunction !== undefined &&\n this.selector.selectedColumns.find((col) => col.name !== column.name))\n .map((column) => ({\n name: column.name,\n type: column.type,\n operation: guaranteeNonNullable(column.aggregateFunction),\n parameters: column.aggregateFunctionParameters,\n })),\n }\n : undefined;\n }\n}\n//# sourceMappingURL=DataCubeEditorVerticalPivotsPanelState.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 { cn, DataCubeIcon } from '@finos/legend-art';\nimport React, { useCallback, useEffect, useRef, useState } from 'react';\nimport { AgGridReact, } from '@ag-grid-community/react';\nimport { ClientSideRowModelModule } from '@ag-grid-community/client-side-row-model';\nimport { DataCubeEditorColumnsSelectorColumnsVisibility, } from '../../../stores/dataCube/editor/DataCubeEditorColumnsSelectorState.js';\nimport { isNonNullable } from '@finos/legend-shared';\nimport { getDataForAllFilteredNodes, getDataForAllNodes, } from '../../../stores/dataCube/grid/DataCubeGridClientEngine.js';\nfunction getBaseGridProps() {\n return {\n modules: [ClientSideRowModelModule],\n className: 'ag-theme-balham',\n animateRows: false,\n getRowId: (params) => params.data.name,\n editType: 'fullRow',\n rowSelection: 'multiple',\n rowDragMultiRow: true,\n rowDragEntireRow: true,\n suppressRowClickSelection: false,\n suppressMoveWhenRowDragging: true,\n rowHeight: 20,\n headerHeight: 20,\n suppressRowHoverHighlight: false,\n noRowsOverlayComponent: (params) => {\n if (params.api.getQuickFilter()) {\n return (_jsxs(\"div\", { className: \"flex items-center border-[1.5px] border-neutral-300 p-2 font-semibold text-neutral-400\", children: [_jsx(\"div\", { children: _jsx(DataCubeIcon.WarningCircle, { className: \"mr-1 text-lg\" }) }), \"No match found\"] }));\n }\n if (params.noColumnsSelectedRenderer) {\n return params.noColumnsSelectedRenderer();\n }\n return _jsx(\"div\", {});\n },\n // Show no rows overlay when there are no search results\n // See https://stackoverflow.com/a/72637410\n onModelUpdated: (event) => {\n event.api.getDisplayedRowCount() === 0\n ? event.api.showNoRowsOverlay()\n : event.api.hideOverlay();\n },\n };\n}\nfunction getBaseColumnDef() {\n return {\n field: 'name',\n flex: 1,\n minWidth: 100,\n filter: true,\n sortable: false,\n resizable: false,\n suppressHeaderMenuButton: true,\n colId: 'checkbox',\n checkboxSelection: true,\n headerCheckboxSelection: true,\n rowDrag: true,\n rowDragText: (params, dragItemCount) => {\n if (dragItemCount > 1) {\n return `${dragItemCount} columns`;\n }\n return (params.rowNode?.data).name;\n },\n getQuickFilterText: (params) => params.value,\n };\n}\n/**\n * Move this display to a separate component to avoid re-rendering the header too frequently\n */\nconst ColumnsSearchResultCountBadge = observer(function ColumnsSearchResultCountBadge(props) {\n const { selector, gridApi, scope } = props;\n return (_jsxs(\"div\", { className: \"flex items-center justify-center rounded-lg bg-neutral-500 px-1 py-0.5 font-mono text-xs font-bold text-white\", children: [`${getDataForAllFilteredNodes(gridApi).length}/${scope === 'available' ? selector.availableColumnsForDisplay.length : selector.selectedColumnsForDisplay.length}`, _jsx(\"span\", { className: \"hidden\", children: scope === 'available'\n ? // subscribing to the search text to trigger re-render as it changes\n selector.availableColumnsSearchText\n : selector.selectedColumnsSearchText })] }));\n});\nexport const DataCubeEditorColumnsSelector = observer(function DataCubeEditorColumnsSelector(props) {\n const { selector, extraColumnComponent, noColumnsSelectedRenderer } = props;\n const [selectedAvailableColumns, setSelectedAvailableColumns] = useState([]);\n const [selectedSelectedColumns, setSelectedSelectedColumns] = useState([]);\n const [availableColumnsGridApi, setAvailableColumnsGridApi] = useState(null);\n const [selectedColumnsGridApi, setSelectedColumnsGridApi] = useState(null);\n const searchAvailableColumnsInputRef = useRef(null);\n const searchSelectedColumnsInputRef = useRef(null);\n /**\n * Since we use managed row dragging for selected columns,\n * we just need to sync the row data with the state.\n * Dragging (multiple) row(s) to specific position have been\n * handled by ag-grid.\n */\n const onSelectedColumnsDragStop = useCallback((params) => {\n selector.setSelectedColumns(getDataForAllNodes(params.api));\n }, [selector]);\n const onAvailableColumnsDragStop = useCallback((params) => {\n const nodes = params.nodes;\n const columnsToMove = nodes\n .map((node) => node.data)\n .filter(isNonNullable);\n selector.setSelectedColumns(selector.selectedColumns.filter((column) => !columnsToMove.includes(column)));\n }, [selector]);\n /**\n * Since we use managed row dragging for selected columns,\n * we just need to sync the row data with the state\n * Dragging (multiple) row(s) to specific position have been\n * handled by ag-grid.\n */\n const onSelectedColumnsDragEnd = useCallback((event) => {\n if (event.overIndex === -1) {\n return;\n }\n selector.setSelectedColumns(getDataForAllNodes(event.api));\n }, [selector]);\n /**\n * Setup row drop zones for each grid to be the other\n * See https://www.ag-grid.com/react-data-grid/row-dragging-to-grid/\n */\n useEffect(() => {\n if (!availableColumnsGridApi || !selectedColumnsGridApi) {\n return;\n }\n const selectedColumnsDropZoneParams = selectedColumnsGridApi.getRowDropZoneParams({\n onDragStop: (event) => {\n onSelectedColumnsDragStop(event);\n availableColumnsGridApi.clearFocusedCell();\n },\n });\n availableColumnsGridApi.removeRowDropZone(selectedColumnsDropZoneParams);\n availableColumnsGridApi.addRowDropZone(selectedColumnsDropZoneParams);\n const availableColumnsDropZoneParams = availableColumnsGridApi.getRowDropZoneParams({\n onDragStop: (event) => {\n onAvailableColumnsDragStop(event);\n selectedColumnsGridApi.clearFocusedCell();\n },\n });\n selectedColumnsGridApi.removeRowDropZone(availableColumnsDropZoneParams);\n selectedColumnsGridApi.addRowDropZone(availableColumnsDropZoneParams);\n }, [\n availableColumnsGridApi,\n selectedColumnsGridApi,\n onSelectedColumnsDragStop,\n onAvailableColumnsDragStop,\n ]);\n return (_jsxs(\"div\", { className: \"data-cube-column-selector flex h-full w-full\", children: [_jsxs(\"div\", { className: \"h-full w-[calc(50%_-_20px)]\", children: [_jsx(\"div\", { className: \"flex h-5 items-center text-sm\", children: \"Available columns:\" }), _jsxs(\"div\", { className: \"h-[calc(100%_-_20px)] rounded-sm border border-neutral-200\", children: [_jsxs(\"div\", { className: \"relative h-6 border-b border-neutral-200\", children: [_jsx(\"input\", { className: \"h-full w-full pl-10 pr-6 placeholder-neutral-400\", ref: searchAvailableColumnsInputRef, placeholder: \"Click here to search...\", value: selector.availableColumnsSearchText, onChange: (event) => selector.setAvailableColumnsSearchText(event.target.value), onKeyDown: (event) => {\n if (event.code === 'Escape') {\n event.stopPropagation();\n searchAvailableColumnsInputRef.current?.select();\n selector.setAvailableColumnsSearchText('');\n }\n } }), _jsx(\"div\", { className: \"absolute left-0 top-0 flex h-6 w-10 items-center justify-center\", children: _jsx(DataCubeIcon.Search, { className: \"stroke-[3px] text-lg text-neutral-500\" }) }), _jsx(\"button\", { className: \"absolute right-0 top-0 flex h-6 w-6 items-center justify-center text-neutral-500 disabled:text-neutral-300\", disabled: !selector.availableColumnsSearchText, title: \"Clear search [Esc]\", onClick: () => {\n selector.setAvailableColumnsSearchText('');\n searchAvailableColumnsInputRef.current?.focus();\n }, children: _jsx(DataCubeIcon.X, { className: \"text-lg\" }) })] }), _jsx(\"div\", { className: \"h-[calc(100%_-_24px)]\", children: _jsx(AgGridReact, { ...getBaseGridProps(), \n // Disable managed row-dragging to disallow changing the order of columns\n // and to make sure the row data and the available columns state are in sync\n rowDragManaged: false, onGridReady: (params) => setAvailableColumnsGridApi(params.api), onSelectionChanged: (event) => {\n setSelectedAvailableColumns(event.api\n .getSelectedNodes()\n .map((node) => node.data)\n .filter(isNonNullable));\n }, \n // Using ag-grid quick filter is a cheap way to implement search\n quickFilterText: selector.availableColumnsSearchText, rowData: selector.availableColumnsForDisplay, columnDefs: [\n {\n ...getBaseColumnDef(),\n /**\n * Support double-click to add all (filtered by search) columns\n */\n headerComponent: (params) => (_jsxs(\"button\", { title: \"Double-click to add all columns\", className: \"flex h-full w-full items-center justify-between pl-0.5\", onDoubleClick: () => {\n // The columns being moved are scoped by the current search\n const filteredData = getDataForAllFilteredNodes(params.api);\n selector.setSelectedColumns([\n ...selector.selectedColumns,\n ...filteredData,\n ]);\n params.api.clearFocusedCell();\n }, children: [_jsx(\"div\", { children: `[All Columns]` }), _jsx(ColumnsSearchResultCountBadge, { selector: selector, gridApi: params.api, scope: \"available\" })] })),\n cellRenderer: (params) => {\n const data = params.data;\n if (!data) {\n return null;\n }\n const showHiddenIndicator = selector.columnsVisibility ===\n DataCubeEditorColumnsSelectorColumnsVisibility.VISIBLE_WITH_WARNING &&\n selector.editor.columnProperties.columns.find((col) => col.name === data.name)?.hideFromView;\n return (_jsxs(\"div\", { className: cn('flex h-full w-full cursor-pointer', {\n 'text-neutral-400': showHiddenIndicator,\n }), title: `[${data.name}]${showHiddenIndicator ? ' - Hidden' : ''}\\nDouble-click to add column`, onDoubleClick: () => {\n selector.setSelectedColumns([\n ...selector.selectedColumns,\n data,\n ]);\n params.api.clearFocusedCell();\n }, children: [_jsx(\"div\", { className: \"h-full flex-1 items-center overflow-hidden overflow-ellipsis whitespace-nowrap pl-2\", children: data.name }), _jsx(\"div\", { className: \"flex h-full\", children: extraColumnComponent?.({\n selector,\n column: data,\n }) ?? null })] }));\n },\n },\n ] }) })] })] }), _jsx(\"div\", { className: \"flex h-full w-10 items-center justify-center\", children: _jsxs(\"div\", { className: \"flex flex-col\", children: [_jsx(\"button\", { className: \"flex items-center justify-center rounded-sm border border-neutral-300 bg-neutral-100 text-neutral-500 hover:bg-neutral-200 disabled:bg-neutral-200 disabled:text-neutral-400\", title: \"Add selected columns\", \n /**\n * Support add selected (filtered by search) columns\n * We reset the selection after this operation\n */\n onClick: () => {\n if (!availableColumnsGridApi) {\n return;\n }\n // The columns being moved are scoped by the current search\n const filteredData = getDataForAllFilteredNodes(availableColumnsGridApi);\n const columnsToMove = selectedAvailableColumns.filter((column) => filteredData.includes(column));\n selector.setSelectedColumns([\n ...selector.selectedColumns,\n ...columnsToMove,\n ]);\n availableColumnsGridApi.clearFocusedCell();\n }, disabled: selectedAvailableColumns.length === 0, children: _jsx(DataCubeIcon.ChevronRight, { className: \"text-2xl\" }) }), _jsx(\"button\", { className: \"mt-2 flex items-center justify-center rounded-sm border border-neutral-300 bg-neutral-100 text-neutral-500 hover:bg-neutral-200 disabled:bg-neutral-200 disabled:text-neutral-400\", title: \"Remove selected columns\", \n /**\n * Support remove selected (filtered by search) columns\n * We reset the selection after this operation\n */\n onClick: () => {\n if (!selectedColumnsGridApi) {\n return;\n }\n // The columns being moved are scoped by the current search\n const filteredData = getDataForAllFilteredNodes(selectedColumnsGridApi);\n const columnsToMove = selectedSelectedColumns.filter((column) => filteredData.includes(column));\n selector.setSelectedColumns(selector.selectedColumns.filter((column) => !columnsToMove.includes(column)));\n selectedColumnsGridApi.clearFocusedCell();\n }, disabled: selectedSelectedColumns.length === 0, children: _jsx(DataCubeIcon.ChevronLeft, { className: \"text-2xl\" }) })] }) }), _jsxs(\"div\", { className: \"h-full w-[calc(50%_-_20px)]\", children: [_jsx(\"div\", { className: \"flex h-5 items-center text-sm\", children: \"Selected columns:\" }), _jsxs(\"div\", { className: \"h-[calc(100%_-_20px)] rounded-sm border border-neutral-200\", children: [_jsxs(\"div\", { className: \"relative h-6 border-b border-neutral-200\", children: [_jsx(\"input\", { className: \"h-full w-full pl-10 placeholder-neutral-400\", ref: searchSelectedColumnsInputRef, placeholder: \"Click here to search...\", value: selector.selectedColumnsSearchText, onChange: (event) => selector.setSelectedColumnsSearchText(event.target.value), onKeyDown: (event) => {\n if (event.code === 'Escape') {\n event.stopPropagation();\n selector.setSelectedColumnsSearchText('');\n }\n } }), _jsx(\"div\", { className: \"absolute left-0 top-0 flex h-6 w-10 items-center justify-center\", children: _jsx(DataCubeIcon.Search, { className: \"stroke-[3px] text-lg text-neutral-500\" }) }), _jsx(\"button\", { className: \"absolute right-0 top-0 flex h-6 w-6 items-center justify-center text-neutral-500 disabled:text-neutral-300\", disabled: !selector.selectedColumnsSearchText, title: \"Clear search [Esc]\", onClick: () => {\n selector.setSelectedColumnsSearchText('');\n searchSelectedColumnsInputRef.current?.focus();\n }, children: _jsx(DataCubeIcon.X, { className: \"text-lg\" }) })] }), _jsx(\"div\", { className: \"h-[calc(100%_-_24px)]\", children: _jsx(AgGridReact, { ...getBaseGridProps(), \n // NOTE: technically, we don't want to enable managed row-dragging here\n // but enabling this gives us free row moving management and interaction\n // comes out of the box from ag-grid, we will just sync the state with\n // grid row data afterwards to ensure consistency\n rowDragManaged: true, onRowDragEnd: onSelectedColumnsDragEnd, onGridReady: (params) => setSelectedColumnsGridApi(params.api), onSelectionChanged: (event) => {\n setSelectedSelectedColumns(event.api\n .getSelectedNodes()\n .map((node) => node.data)\n .filter(isNonNullable));\n }, \n // Using ag-grid quick filter is a cheap way to implement search\n quickFilterText: selector.selectedColumnsSearchText, noRowsOverlayComponentParams: {\n noColumnsSelectedRenderer,\n }, rowData: selector.selectedColumnsForDisplay, columnDefs: [\n {\n ...getBaseColumnDef(),\n /**\n * Support double-click to remove all (filtered by search) columns\n */\n headerComponent: (params) => (_jsxs(\"button\", { title: \"Double-click to remove all columns\", className: \"flex h-full w-full items-center justify-between pl-0.5\", onDoubleClick: () => {\n // The columns being moved are scoped by the current search\n const filteredData = getDataForAllFilteredNodes(params.api);\n selector.setSelectedColumns(selector.selectedColumns.filter((column) => !filteredData.includes(column)));\n params.api.clearFocusedCell();\n }, children: [_jsx(\"div\", { children: `[All Columns]` }), _jsx(ColumnsSearchResultCountBadge, { selector: selector, gridApi: params.api, scope: \"selected\" })] })),\n cellRenderer: (params) => {\n const data = params.data;\n if (!data) {\n return null;\n }\n const showHiddenIndicator = selector.columnsVisibility ===\n DataCubeEditorColumnsSelectorColumnsVisibility.VISIBLE_WITH_WARNING &&\n selector.editor.columnProperties.columns.find((col) => col.name === data.name)?.hideFromView;\n return (_jsxs(\"div\", { className: cn('flex h-full w-full cursor-pointer', {\n 'text-neutral-400': showHiddenIndicator,\n }), title: `[${data.name}]${showHiddenIndicator ? ' - Hidden' : ''}\\nDouble-click to remove column`, onDoubleClick: () => {\n selector.setSelectedColumns(selector.selectedColumns.filter((column) => column !== data));\n params.api.clearFocusedCell();\n }, children: [_jsx(\"div\", { className: \"h-full flex-1 items-center overflow-hidden overflow-ellipsis whitespace-nowrap pl-2\", children: data.name }), _jsx(\"div\", { className: \"flex h-full\", children: extraColumnComponent?.({\n selector,\n column: data,\n }) ?? null })] }));\n },\n },\n ] }) })] })] })] }));\n});\n//# sourceMappingURL=DataCubeEditorColumnsSelector.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 { DataCubeIcon, useDropdownMenu, DropdownMenuItem, DropdownMenu, } from '@finos/legend-art';\nimport { useREPLStore } from '../../REPLStoreProvider.js';\nimport { DataCubeEditorColumnsSelector } from './DataCubeEditorColumnsSelector.js';\nimport { DataCubeQuerySortOperation } from '../../../stores/dataCube/core/DataCubeQueryEngine.js';\nimport { IllegalStateError } from '@finos/legend-shared';\nimport { FormBadge_WIP } from '../../repl/Form.js';\nfunction getSortDirectionLabel(operation) {\n switch (operation) {\n case DataCubeQuerySortOperation.ASCENDING:\n return 'Ascending';\n case DataCubeQuerySortOperation.DESCENDING:\n return 'Descending';\n default:\n throw new IllegalStateError(`Unsupported sort operation '${operation}'`);\n }\n}\nconst SortDirectionDropdown = observer((props) => {\n const { column } = props;\n const [openMenu, closeMenu, menuProps] = useDropdownMenu();\n return (_jsxs(\"div\", { className: \"group relative flex h-full items-center\", children: [_jsx(\"div\", { className: \"flex h-[18px] w-32 items-center border border-transparent px-2 text-sm text-neutral-500 group-hover:invisible\", children: getSortDirectionLabel(column.operation) }), _jsxs(\"button\", { className: \"invisible absolute right-0 z-10 flex h-[18px] w-32 items-center justify-between border border-neutral-500 pl-2 pr-0.5 text-sm text-neutral-700 group-hover:visible\", \n /**\n * ag-grid row select event listener is at a deeper layer than this dropdown trigger\n * so in order to prevent selecting the row while opening the dropdown, we need to stop\n * the propagation as event capturing is happening, not when it's bubbling.\n */\n onClickCapture: (event) => {\n event.stopPropagation();\n openMenu(event);\n }, onClick: (event) => event.stopPropagation(), children: [_jsx(\"div\", { children: getSortDirectionLabel(column.operation) }), _jsx(\"div\", { children: _jsx(DataCubeIcon.CaretDown, {}) })] }), _jsxs(DropdownMenu, { className: \"w-32 select-none border border-neutral-300 bg-white\", ...menuProps, children: [_jsx(DropdownMenuItem, { className: \"flex h-5 items-center px-2 text-sm hover:bg-neutral-100\", onClick: () => {\n column.setOperation(DataCubeQuerySortOperation.ASCENDING);\n closeMenu();\n }, children: \"Ascending\" }), _jsxs(DropdownMenuItem, { className: \"flex h-5 items-center px-2 text-sm text-neutral-400\", disabled: true, children: [`Ascending (abs)`, _jsx(FormBadge_WIP, {})] }), _jsx(DropdownMenuItem, { className: \"flex h-5 items-center px-2 text-sm hover:bg-neutral-100\", onClick: () => {\n column.setOperation(DataCubeQuerySortOperation.DESCENDING);\n closeMenu();\n }, children: \"Descending\" }), _jsxs(DropdownMenuItem, { className: \"flex h-5 items-center px-2 text-sm text-neutral-400\", disabled: true, children: [`Descending (abs)`, _jsx(FormBadge_WIP, {})] })] })] }));\n});\nexport const DataCubeEditorSortsPanel = observer(() => {\n const repl = useREPLStore();\n const panel = repl.dataCube.editor.sorts;\n return (_jsxs(\"div\", { className: \"h-full w-full select-none p-2\", children: [_jsxs(\"div\", { className: \"flex h-6\", children: [_jsx(\"div\", { className: \"flex h-6 items-center text-xl font-medium\", children: _jsx(DataCubeIcon.TableSort, {}) }), _jsx(\"div\", { className: \"ml-1 flex h-6 items-center text-xl font-medium\", children: \"Sorts\" })] }), _jsx(\"div\", { className: \"flex h-[calc(100%_-_24px)] w-full\", children: _jsx(DataCubeEditorColumnsSelector, { selector: panel.selector, extraColumnComponent: (props) => _jsx(SortDirectionDropdown, { ...props }) }) })] }));\n});\n//# sourceMappingURL=DataCubeEditorSortsPanel.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 { useREPLStore } from '../../REPLStoreProvider.js';\nimport { cn, DataCubeIcon, useDropdownMenu } from '@finos/legend-art';\nimport { DataCubeFont, DataCubeFontCase, DataCubeFontFormatUnderlineVariant, DataCubeFontTextAlignment, DataCubeSelectionStat, DEFAULT_BACKGROUND_COLOR, DEFAULT_ERROR_FOREGROUND_COLOR, DEFAULT_FOREGROUND_COLOR, DEFAULT_GRID_LINE_COLOR, DEFAULT_NEGATIVE_FOREGROUND_COLOR, DEFAULT_ROW_HIGHLIGHT_BACKGROUND_COLOR, DEFAULT_ZERO_FOREGROUND_COLOR, } from '../../../stores/dataCube/core/DataCubeQueryEngine.js';\nimport { FormCheckbox, FormColorPickerButton, FormDropdownMenu, FormDropdownMenuItem, FormDropdownMenuItemSeparator, FormDropdownMenuTrigger, FormTextInput, FormNumberInput, FormBadge_WIP, } from '../../repl/Form.js';\nexport const DataCubeEditorGeneralPropertiesPanel = observer(() => {\n const repl = useREPLStore();\n const panel = repl.dataCube.editor.generalProperties;\n const configuration = panel.configuration;\n const [openInitialExpandLevelDropdown, closeInitialExpandLevelDropdown, initialExpandLevelDropdownProps,] = useDropdownMenu();\n const [openSelectionStatDropdown, closeSelectionStatDropdown, selectionStatDropdownProps,] = useDropdownMenu();\n const [openFontFamilyDropdown, closeFontFamilyDropdown, fontFamilyDropdownProps,] = useDropdownMenu();\n const [openFontSizeDropdown, closeFontSizeDropdown, openFontSizeDropdownProps,] = useDropdownMenu();\n const [openFontFormatUnderlineVariantDropdown, closeFontFormatUnderlineVariantDropdown, fontFormatUnderlineVariantDropdownProps,] = useDropdownMenu();\n const [openFontCaseDropdown, closeFontCaseDropdown, fontCaseDropdownProps] = useDropdownMenu();\n return (_jsxs(\"div\", { className: \"h-full w-full select-none p-2\", children: [_jsxs(\"div\", { className: \"flex h-6\", children: [_jsx(\"div\", { className: \"flex h-6 items-center text-xl font-medium\", children: _jsx(DataCubeIcon.TableOptions, {}) }), _jsx(\"div\", { className: \"ml-1 flex h-6 items-center text-xl font-medium\", children: \"General Properties\" })] }), _jsx(\"div\", { className: \"flex h-[calc(100%_-_24px)] w-full\", children: _jsxs(\"div\", { className: \"h-full w-full py-2\", children: [_jsxs(\"div\", { className: \"flex h-6 w-full items-center\", children: [_jsx(\"div\", { className: \"flex h-full w-32 flex-shrink-0 items-center text-sm\", children: \"Report Title:\" }), _jsx(FormTextInput, { className: \"h-6 w-96 text-lg font-semibold\", value: panel.name, onChange: (event) => {\n panel.setName(event.target.value);\n } })] }), _jsxs(\"div\", { className: \"mt-2 flex h-5 w-full items-center\", children: [_jsx(\"div\", { className: \"flex h-full w-32 flex-shrink-0 items-center text-sm\", children: \"Initially Expand to Level:\" }), _jsx(FormDropdownMenuTrigger, { className: \"w-16\", onClick: openInitialExpandLevelDropdown, disabled: true, children: configuration.initialExpandLevel ?? '(None)' }), _jsx(FormDropdownMenu, { className: \"w-16\", ...initialExpandLevelDropdownProps, children: [undefined, 1, 2, 3, 4, 5, 6, 7, 8].map((level) => (_jsx(FormDropdownMenuItem, { onClick: () => {\n configuration.setInitialExpandLevel(level);\n closeInitialExpandLevelDropdown();\n }, children: level ?? '(None)' }, level ?? ''))) }), _jsx(FormBadge_WIP, {})] }), _jsxs(\"div\", { className: \"mt-2 flex h-5 w-full items-center\", children: [_jsx(\"div\", { className: \"flex h-full w-32 flex-shrink-0 items-center text-sm\", children: \"Show Root Aggregation?\" }), _jsx(FormCheckbox, { checked: configuration.showRootAggregation, onChange: () => configuration.setShowRootAggregation(!configuration.showRootAggregation), disabled: true }), _jsx(FormBadge_WIP, {})] }), _jsxs(\"div\", { className: \"mt-2 flex h-5 w-full items-center\", children: [_jsx(\"div\", { className: \"flex h-full w-32 flex-shrink-0 items-center text-sm\", children: \"Show Leaf Count?\" }), _jsx(FormCheckbox, { checked: configuration.showLeafCount, onChange: () => configuration.setShowLeafCount(!configuration.showLeafCount), disabled: true }), _jsx(FormBadge_WIP, {})] }), _jsxs(\"div\", { className: \"mt-2 flex h-5 w-full items-center\", children: [_jsx(\"div\", { className: \"flex h-full w-32 flex-shrink-0 items-center text-sm\", children: \"Show Lines?\" }), _jsx(FormCheckbox, { label: \"Tree\", checked: configuration.showTreeLines, onChange: () => configuration.setShowTreeLines(!configuration.showTreeLines), disabled: true }), _jsx(FormBadge_WIP, {}), _jsx(FormCheckbox, { className: \"ml-2\", label: \"Horizontal\", checked: configuration.showHorizontalGridLines, onChange: () => configuration.setShowHorizontalGridLines(!configuration.showHorizontalGridLines) }), _jsx(FormCheckbox, { className: \"ml-2\", label: \"Vertical\", checked: configuration.showVerticalGridLines, onChange: () => configuration.setShowVerticalGridLines(!configuration.showVerticalGridLines) }), _jsx(\"div\", { className: \"ml-2 h-[1px] w-2 flex-shrink-0 bg-neutral-400\" }), _jsx(FormColorPickerButton, { className: \"ml-2\", color: configuration.gridLineColor, defaultColor: DEFAULT_GRID_LINE_COLOR, onChange: (value) => configuration.setGridLineColor(value) })] }), _jsxs(\"div\", { className: \"mt-2 flex h-5 w-full items-center\", children: [_jsx(\"div\", { className: \"flex h-full w-32 flex-shrink-0 items-center text-sm\", children: \"Show Selection Stats:\" }), _jsx(FormDropdownMenuTrigger, { className: \"w-16\", onClick: openSelectionStatDropdown, disabled: true, children: '(None)' }), _jsx(FormDropdownMenu, { className: \"w-16\", ...selectionStatDropdownProps, children: [\n DataCubeSelectionStat.SUM,\n DataCubeSelectionStat.AVERAGE,\n DataCubeSelectionStat.COUNT,\n DataCubeSelectionStat.MIN,\n DataCubeSelectionStat.MAX,\n ].map((operation) => (_jsx(FormDropdownMenuItem, { onClick: () => {\n // TODO\n closeSelectionStatDropdown();\n }, children: operation }, operation))) }), _jsx(FormBadge_WIP, {})] }), _jsxs(\"div\", { className: \"mt-2 flex h-5 w-full items-center\", children: [_jsx(\"div\", { className: \"flex h-full w-32 flex-shrink-0 items-center text-sm\", children: \"Row Limit:\" }), _jsx(FormNumberInput, { className: \"w-16 text-sm\", value: panel.limit, min: -1, step: 1, defaultValue: -1, isValid: (value) => value !== undefined && (value === -1 || value > 0), setValue: (value) => panel.setLimit(value ?? -1) }), _jsx(\"div\", { className: \"flex-shrink-0 pl-1 text-sm italic text-neutral-500\", children: \"Truncate result to this many rows at every level. Use -1 for unlimited.\" })] }), _jsxs(\"div\", { className: \"mt-2 flex h-5 w-full items-center\", children: [_jsx(\"div\", { className: \"flex h-full w-32 flex-shrink-0 items-center text-sm\" }), _jsx(FormCheckbox, { label: \"Display warning when truncated\", checked: configuration.showWarningForTruncatedResult, onChange: () => configuration.setShowWarningForTruncatedResult(!configuration.showWarningForTruncatedResult) })] }), _jsxs(\"div\", { className: \"mt-2 flex h-5 w-full items-center\", children: [_jsx(\"div\", { className: \"flex h-full w-32 flex-shrink-0 items-center text-sm\", children: \"Hightlight Rows:\" }), _jsx(FormCheckbox, { label: \"Standard mode\", checked: configuration.alternateRowsStandardMode, onChange: () => {\n if (configuration.alternateRowsStandardMode) {\n configuration.setAlternateRowsStandardMode(false);\n }\n else {\n configuration.setAlternateRowsStandardMode(true);\n configuration.setAlternateRows(false);\n }\n } }), _jsx(FormCheckbox, { className: \"ml-3\", label: \"Custom: Alternate color every\", checked: configuration.alternateRows, onChange: () => {\n if (configuration.alternateRows) {\n configuration.setAlternateRows(false);\n }\n else {\n configuration.setAlternateRows(true);\n configuration.setAlternateRowsStandardMode(false);\n }\n } }), _jsx(FormNumberInput, { className: \"ml-1.5 w-16 text-sm\", disabled: !configuration.alternateRows, min: 1, step: 1, defaultValue: 1, isValid: (value) => value !== undefined && value > 0, value: configuration.alternateRowsCount, setValue: (value) => configuration.setAlternateRowsCount(value ?? 1) }), _jsx(\"div\", { className: \"ml-1.5 flex-shrink-0 text-sm\", children: `row(s)` }), _jsx(FormColorPickerButton, { className: \"ml-[5px]\", disabled: !configuration.alternateRows, color: configuration.alternateRowsColor, defaultColor: DEFAULT_ROW_HIGHLIGHT_BACKGROUND_COLOR, onChange: (value) => configuration.setAlternateRowsColor(value) })] }), _jsx(\"div\", { className: \"my-2 h-[1px] w-full bg-neutral-200\" }), _jsxs(\"div\", { className: \"mt-2 flex h-5 w-full items-center\", children: [_jsx(\"div\", { className: \"flex h-full w-32 flex-shrink-0 items-center text-sm\", children: \"Default Font:\" }), _jsx(FormDropdownMenuTrigger, { className: \"w-28\", onClick: openFontFamilyDropdown, children: configuration.fontFamily }), _jsxs(FormDropdownMenu, { className: \"w-28\", ...fontFamilyDropdownProps, children: [[\n DataCubeFont.ARIAL,\n DataCubeFont.ROBOTO,\n DataCubeFont.ROBOTO_CONDENSED,\n ].map((font) => (_jsx(FormDropdownMenuItem, { onClick: () => {\n configuration.setFontFamily(font);\n closeFontFamilyDropdown();\n }, children: font }, font))), _jsx(FormDropdownMenuItemSeparator, {}), [\n DataCubeFont.GEORGIA,\n DataCubeFont.ROBOTO_SERIF,\n DataCubeFont.TIMES_NEW_ROMAN,\n ].map((font) => (_jsx(FormDropdownMenuItem, { onClick: () => {\n configuration.setFontFamily(font);\n closeFontFamilyDropdown();\n }, children: font }, font))), _jsx(FormDropdownMenuItemSeparator, {}), [\n DataCubeFont.JERBRAINS_MONO,\n DataCubeFont.ROBOTO_MONO,\n DataCubeFont.UBUNTU_MONO,\n ].map((font) => (_jsx(FormDropdownMenuItem, { onClick: () => {\n configuration.setFontFamily(font);\n closeFontFamilyDropdown();\n }, children: font }, font)))] }), _jsx(FormDropdownMenuTrigger, { className: \"ml-1 w-10\", onClick: openFontSizeDropdown, children: configuration.fontSize }), _jsx(FormDropdownMenu, { className: \"w-10\", ...openFontSizeDropdownProps, children: [\n 4, 5, 6, 7, 8, 9, 10, 11, 12, 14, 16, 18, 20, 22, 24, 26, 28,\n 32, 36, 48, 72,\n ].map((size) => (_jsx(FormDropdownMenuItem, { onClick: () => {\n configuration.setFontSize(size);\n closeFontSizeDropdown();\n }, children: size }, size))) }), _jsxs(\"div\", { className: \"relative ml-2 flex h-5\", children: [_jsx(\"button\", { title: \"Bold\", className: cn('relative flex h-5 w-5 items-center justify-center rounded-bl-sm rounded-tl-sm border border-neutral-400 bg-neutral-50 p-0 text-neutral-700 focus-visible:z-[1]', {\n 'bg-neutral-200': configuration.fontBold,\n }), onClick: () => configuration.setFontBold(!configuration.fontBold), children: _jsx(DataCubeIcon.FontBold, {}) }), _jsx(\"button\", { title: \"Italic\", className: cn('relative -ml-[1px] flex h-5 w-5 items-center justify-center border border-neutral-400 bg-neutral-50 p-0 text-neutral-700 focus-visible:z-[1]', {\n 'bg-neutral-200': configuration.fontItalic,\n }), onClick: () => configuration.setFontItalic(!configuration.fontItalic), children: _jsx(DataCubeIcon.FontItalic, {}) }), _jsx(\"button\", { title: `Underline${configuration.fontUnderline ? ` (${configuration.fontUnderline})` : ''}`, className: cn('relative -ml-[1px] flex h-5 w-5 items-center justify-center border border-r-0 border-neutral-400 bg-neutral-50 p-0 text-neutral-700 focus-visible:z-[1]', {\n 'bg-neutral-200': configuration.fontUnderline !== undefined,\n }), onClick: () => {\n if (configuration.fontUnderline === undefined) {\n configuration.setFontUnderline(DataCubeFontFormatUnderlineVariant.SOLID);\n configuration.setFontStrikethrough(false);\n }\n else {\n configuration.setFontUnderline(undefined);\n }\n }, children: _jsx(DataCubeIcon.FontUnderline, {}) }), _jsxs(\"button\", { className: \"text-2xs relative -ml-[1px] flex h-5 w-2.5 items-center justify-center border border-l-0 border-neutral-400 bg-neutral-50 p-0 text-neutral-600 focus-visible:z-[1]\", onClick: openFontFormatUnderlineVariantDropdown, children: [_jsx(\"div\", { className: cn('h-4 w-[0.5px] bg-neutral-200', {\n 'opacity-0': configuration.fontUnderline !== undefined,\n }) }), _jsx(DataCubeIcon.CaretDown, {})] }), _jsx(FormDropdownMenu, { className: \"w-14\", ...fontFormatUnderlineVariantDropdownProps, children: [\n DataCubeFontFormatUnderlineVariant.SOLID,\n DataCubeFontFormatUnderlineVariant.DASHED,\n DataCubeFontFormatUnderlineVariant.DOTTED,\n DataCubeFontFormatUnderlineVariant.DOUBLE,\n DataCubeFontFormatUnderlineVariant.WAVY,\n ].map((variant) => (_jsx(FormDropdownMenuItem, { className: \"relative\", onClick: () => {\n configuration.setFontUnderline(variant);\n configuration.setFontStrikethrough(false);\n closeFontFormatUnderlineVariantDropdown();\n }, children: _jsx(\"div\", { className: cn('!hover:underline absolute top-0 !underline', {\n '!hover:decoration-solid !decoration-solid': variant ===\n DataCubeFontFormatUnderlineVariant.SOLID,\n '!hover:decoration-dashed !decoration-dashed': variant ===\n DataCubeFontFormatUnderlineVariant.DASHED,\n '!hover:decoration-dotted !decoration-dotted': variant ===\n DataCubeFontFormatUnderlineVariant.DOTTED,\n '!hover:decoration-double !decoration-double': variant ===\n DataCubeFontFormatUnderlineVariant.DOUBLE,\n '!hover:decoration-wavy !decoration-wavy': variant === DataCubeFontFormatUnderlineVariant.WAVY,\n 'text-sky-600': variant === configuration.fontUnderline,\n }), children: \"\\u00A0\\u00A0\\u00A0\\u00A0\\u00A0\\u00A0\\u00A0\\u00A0\\u00A0\\u00A0\\u00A0\\u00A0\\u00A0\\u00A0\\u00A0\\u00A0\" }) }, variant))) }), _jsx(\"button\", { title: \"Strikethrough\", className: cn('relative -ml-[1px] flex h-5 w-5 items-center justify-center border border-neutral-400 bg-neutral-50 p-0 text-neutral-700 focus-visible:z-[1]', {\n 'bg-neutral-200': configuration.fontStrikethrough,\n }), onClick: () => {\n if (configuration.fontStrikethrough) {\n configuration.setFontStrikethrough(false);\n }\n else {\n configuration.setFontStrikethrough(true);\n configuration.setFontUnderline(undefined);\n }\n }, children: _jsx(DataCubeIcon.FontStrikethrough, {}) }), _jsx(\"button\", { title: `Case${configuration.fontCase ? ` (${configuration.fontCase})` : ''}`, className: cn('relative -ml-[1px] flex h-5 w-5 items-center justify-center border border-r-0 border-neutral-400 bg-neutral-50 p-0 text-neutral-700 focus-visible:z-[1]', {\n 'bg-neutral-200': configuration.fontCase !== undefined,\n }), onClick: () => {\n configuration.setFontCase(configuration.fontCase === undefined\n ? DataCubeFontCase.UPPERCASE\n : undefined);\n }, children: _jsx(DataCubeIcon.FontCase, { className: \"stroke-[0.5px]\" }) }), _jsxs(\"button\", { className: \"text-2xs relative -ml-[1px] flex h-5 w-2.5 items-center justify-center rounded-br-sm rounded-tr-sm border border-l-0 border-neutral-400 bg-neutral-50 p-0 text-neutral-600 focus-visible:z-[1]\", onClick: openFontCaseDropdown, children: [_jsx(\"div\", { className: cn('h-4 w-[0.5px] bg-neutral-200', {\n 'opacity-0': configuration.fontCase !== undefined,\n }) }), _jsx(DataCubeIcon.CaretDown, {})] }), _jsx(FormDropdownMenu, { className: \"w-20\", ...fontCaseDropdownProps, children: [\n DataCubeFontCase.LOWERCASE,\n DataCubeFontCase.UPPERCASE,\n DataCubeFontCase.CAPITALIZE,\n ].map((fontCase) => (_jsx(FormDropdownMenuItem, { className: \"relative\", onClick: () => {\n configuration.setFontCase(fontCase);\n closeFontCaseDropdown();\n }, children: _jsx(\"div\", { className: cn({\n lowercase: fontCase === DataCubeFontCase.LOWERCASE,\n uppercase: fontCase === DataCubeFontCase.UPPERCASE,\n capitalize: fontCase === DataCubeFontCase.CAPITALIZE,\n 'text-sky-600': fontCase === configuration.fontCase,\n }), children: fontCase }) }, fontCase))) })] }), _jsxs(\"div\", { className: \"relative ml-2 flex h-5\", children: [_jsx(\"button\", { title: \"Align Left\", className: cn('relative flex h-5 w-5 items-center justify-center rounded-bl-sm rounded-tl-sm border border-neutral-400 bg-neutral-50 p-0 text-neutral-700 focus-visible:z-[1]', {\n 'bg-neutral-200': configuration.textAlign ===\n DataCubeFontTextAlignment.LEFT,\n }), onClick: () => configuration.setTextAlign(DataCubeFontTextAlignment.LEFT), children: _jsx(DataCubeIcon.TextAlignLeft, {}) }), _jsx(\"button\", { title: \"Align Center\", className: cn('relative -ml-[1px] flex h-5 w-5 items-center justify-center border border-neutral-400 bg-neutral-50 p-0 text-neutral-700 focus-visible:z-[1]', {\n 'bg-neutral-200': configuration.textAlign ===\n DataCubeFontTextAlignment.CENTER,\n }), onClick: () => configuration.setTextAlign(DataCubeFontTextAlignment.CENTER), children: _jsx(DataCubeIcon.TextAlignCenter, {}) }), _jsx(\"button\", { title: \"Align Right\", className: cn('relative -ml-[1px] flex h-5 w-5 items-center justify-center rounded-br-sm rounded-tr-sm border border-neutral-400 bg-neutral-50 p-0 text-neutral-700 focus-visible:z-[1]', {\n 'bg-neutral-200': configuration.textAlign ===\n DataCubeFontTextAlignment.RIGHT,\n }), onClick: () => configuration.setTextAlign(DataCubeFontTextAlignment.RIGHT), children: _jsx(DataCubeIcon.TextAlignRight, {}) })] })] }), _jsxs(\"div\", { className: \"mt-2 flex w-full\", children: [_jsx(\"div\", { className: \"flex h-6 w-32 flex-shrink-0 items-center text-sm\", children: \"Default Colors:\" }), _jsxs(\"div\", { className: \"h-18\", children: [_jsxs(\"div\", { className: \"flex h-6\", children: [_jsx(\"div\", { className: \"w-16 flex-shrink-0\" }), _jsx(\"div\", { className: \"flex h-full w-12 flex-shrink-0 items-center justify-center text-sm\", children: \"Normal\" }), _jsx(\"div\", { className: \"flex h-full w-12 flex-shrink-0 items-center justify-center text-sm\", children: \"Negative\" }), _jsx(\"div\", { className: \"flex h-full w-12 flex-shrink-0 items-center justify-center text-sm\", children: \"Zero\" }), _jsx(\"div\", { className: \"flex h-full w-12 flex-shrink-0 items-center justify-center text-sm\", children: \"Error\" })] }), _jsxs(\"div\", { className: \"flex h-6\", children: [_jsx(\"div\", { className: \"flex h-full w-16 flex-shrink-0 items-center text-sm\", children: \"Foreground:\" }), _jsx(\"div\", { className: \"flex h-full w-12 flex-shrink-0 items-center justify-center\", children: _jsx(FormColorPickerButton, { color: configuration.normalForegroundColor, defaultColor: DEFAULT_FOREGROUND_COLOR, onChange: (value) => configuration.setNormalForegroundColor(value) }) }), _jsx(\"div\", { className: \"flex h-full w-12 flex-shrink-0 items-center justify-center\", children: _jsx(FormColorPickerButton, { color: configuration.negativeForegroundColor, defaultColor: DEFAULT_NEGATIVE_FOREGROUND_COLOR, onChange: (value) => configuration.setNegativeForegroundColor(value) }) }), _jsx(\"div\", { className: \"flex h-full w-12 flex-shrink-0 items-center justify-center\", children: _jsx(FormColorPickerButton, { color: configuration.zeroForegroundColor, defaultColor: DEFAULT_ZERO_FOREGROUND_COLOR, onChange: (value) => configuration.setZeroForegroundColor(value) }) }), _jsx(\"div\", { className: \"flex h-full w-12 flex-shrink-0 items-center justify-center\", children: _jsx(FormColorPickerButton, { color: configuration.errorForegroundColor, defaultColor: DEFAULT_ERROR_FOREGROUND_COLOR, onChange: (value) => configuration.setErrorForegroundColor(value) }) })] }), _jsxs(\"div\", { className: \"flex h-6\", children: [_jsx(\"div\", { className: \"flex h-full w-16 flex-shrink-0 items-center text-sm\", children: \"Background:\" }), _jsx(\"div\", { className: \"flex h-full w-12 flex-shrink-0 items-center justify-center\", children: _jsx(FormColorPickerButton, { color: configuration.normalBackgroundColor, defaultColor: DEFAULT_BACKGROUND_COLOR, onChange: (value) => configuration.setNormalBackgroundColor(value) }) }), _jsx(\"div\", { className: \"flex h-full w-12 flex-shrink-0 items-center justify-center\", children: _jsx(FormColorPickerButton, { color: configuration.negativeBackgroundColor, defaultColor: DEFAULT_BACKGROUND_COLOR, onChange: (value) => configuration.setNegativeBackgroundColor(value) }) }), _jsx(\"div\", { className: \"flex h-full w-12 flex-shrink-0 items-center justify-center\", children: _jsx(FormColorPickerButton, { color: configuration.zeroBackgroundColor, defaultColor: DEFAULT_BACKGROUND_COLOR, onChange: (value) => configuration.setZeroBackgroundColor(value) }) }), _jsx(\"div\", { className: \"flex h-full w-12 flex-shrink-0 items-center justify-center\", children: _jsx(FormColorPickerButton, { color: configuration.errorBackgroundColor, defaultColor: DEFAULT_BACKGROUND_COLOR, onChange: (value) => configuration.setErrorBackgroundColor(value) }) })] })] })] }), _jsxs(\"div\", { className: \"mt-2 flex w-full\", children: [_jsx(\"div\", { className: \"flex h-6 w-32 flex-shrink-0 items-center text-sm\" }), _jsxs(\"div\", { className: \"w-80\", children: [_jsx(\"div\", { className: \"mb-2 h-[1px] w-full bg-neutral-200\" }), _jsx(\"button\", { className: \"flex h-5 items-center justify-center rounded-sm border border-neutral-400 bg-neutral-200 p-0 px-1 text-sm text-neutral-700 disabled:text-neutral-400\", disabled: configuration.isUsingDefaultStyling, onClick: () => configuration.useDefaultStyling(), children: \"Use Default Styling\" })] })] })] }) })] }));\n});\n//# sourceMappingURL=DataCubeEditorGeneralPropertiesPanel.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 { DataCubeIcon } from '@finos/legend-art';\nimport { observer } from 'mobx-react-lite';\nimport { useREPLStore } from '../../REPLStoreProvider.js';\nimport { DataCubeEditorColumnsSelector } from './DataCubeEditorColumnsSelector.js';\nimport { FormCheckbox } from '../../repl/Form.js';\nimport { DataCubeEditorColumnsSelectorColumnsVisibility } from '../../../stores/dataCube/editor/DataCubeEditorColumnsSelectorState.js';\nimport { useEffect } from 'react';\nexport const DataCubeEditorColumnsPanel = observer(() => {\n const repl = useREPLStore();\n const panel = repl.dataCube.editor.columns;\n useEffect(() => () => panel.propagateColumnSelectionChanges(), [panel]);\n return (_jsxs(\"div\", { className: \"h-full w-full select-none p-2\", children: [_jsxs(\"div\", { className: \"flex h-6 justify-between\", children: [_jsxs(\"div\", { className: \"flex h-full\", children: [_jsx(\"div\", { className: \"flex h-6 items-center text-xl font-medium\", children: _jsx(DataCubeIcon.TableColumns, {}) }), _jsx(\"div\", { className: \"ml-1 flex h-6 items-center text-xl font-medium\", children: \"Columns\" })] }), _jsx(\"div\", { className: \"flex h-full items-center pr-2\", children: _jsx(FormCheckbox, { label: \"Show hidden columns?\", checked: panel.selector.columnsVisibility !==\n DataCubeEditorColumnsSelectorColumnsVisibility.HIDDEN, onChange: () => panel.selector.setColumnsVisibility(panel.selector.columnsVisibility !==\n DataCubeEditorColumnsSelectorColumnsVisibility.HIDDEN\n ? DataCubeEditorColumnsSelectorColumnsVisibility.HIDDEN\n : DataCubeEditorColumnsSelectorColumnsVisibility.VISIBLE_WITH_WARNING) }) })] }), _jsx(\"div\", { className: \"flex h-[calc(100%_-_24px)] w-full\", children: _jsx(DataCubeEditorColumnsSelector, { selector: panel.selector, noColumnsSelectedRenderer: () => (_jsxs(\"div\", { className: \"flex items-center border-[1.5px] border-red-400 p-2 font-semibold text-red-500\", children: [_jsx(\"div\", { children: _jsx(DataCubeIcon.Warning, { className: \"mr-1 text-lg\" }) }), \"No columns selected\"] })) }) })] }));\n});\n//# sourceMappingURL=DataCubeEditorColumnsPanel.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 { DataCubeIcon } from '@finos/legend-art';\nimport { observer } from 'mobx-react-lite';\nimport { useREPLStore } from '../../REPLStoreProvider.js';\nimport { DataCubeEditorColumnsSelector } from './DataCubeEditorColumnsSelector.js';\nexport const DataCubeEditorVerticalPivotsPanel = observer(() => {\n const repl = useREPLStore();\n const panel = repl.dataCube.editor.verticalPivots;\n return (_jsxs(\"div\", { className: \"h-full w-full select-none p-2\", children: [_jsxs(\"div\", { className: \"flex h-6\", children: [_jsx(\"div\", { className: \"flex h-6 items-center text-xl font-medium\", children: _jsx(DataCubeIcon.TableGroupBy, {}) }), _jsx(\"div\", { className: \"ml-1 flex h-6 items-center text-xl font-medium\", children: \"Vertical Pivots\" })] }), _jsx(\"div\", { className: \"flex h-[calc(100%_-_24px)] w-full\", children: _jsx(DataCubeEditorColumnsSelector, { selector: panel.selector }) })] }));\n});\n//# sourceMappingURL=DataCubeEditorVerticalPivotsPanel.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 { DataCubeIcon } from '@finos/legend-art';\nimport { observer } from 'mobx-react-lite';\nimport { useREPLStore } from '../../REPLStoreProvider.js';\nimport { useEffect } from 'react';\nimport { FormBadge_WIP } from '../../repl/Form.js';\nexport const DataCubeEditorHorizontalPivotsPanel = observer(() => {\n const repl = useREPLStore();\n const panel = repl.dataCube.editor.sorts;\n useEffect(() => { }, [panel]); // TODO: @akphi - remove this dummy useEffect\n return (_jsxs(\"div\", { className: \"h-full w-full select-none p-2\", children: [_jsxs(\"div\", { className: \"flex h-6\", children: [_jsx(\"div\", { className: \"flex h-6 items-center text-xl font-medium\", children: _jsx(DataCubeIcon.TablePivot, {}) }), _jsxs(\"div\", { className: \"ml-1 flex h-6 items-center text-xl font-medium\", children: [\"Horizontal Pivots\", _jsx(FormBadge_WIP, {})] })] }), _jsx(\"div\", { className: \"flex h-[calc(100%_-_24px)] w-full\" })] }));\n});\n//# sourceMappingURL=DataCubeEditorHorizontalPivotsPanel.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 { DataCubeIcon } from '@finos/legend-art';\nimport { observer } from 'mobx-react-lite';\nimport { useREPLStore } from '../../REPLStoreProvider.js';\nimport { useEffect } from 'react';\nimport { FormBadge_WIP } from '../../repl/Form.js';\nexport const DataCubeEditorFilterPanel = observer(() => {\n const repl = useREPLStore();\n const panel = repl.dataCube.editor.sorts;\n useEffect(() => { }, [panel]); // TODO: @akphi - remove this dummy useEffect\n return (_jsxs(\"div\", { className: \"h-full w-full select-none p-2\", children: [_jsxs(\"div\", { className: \"flex h-6\", children: [_jsx(\"div\", { className: \"flex h-6 items-center text-xl font-medium\", children: _jsx(DataCubeIcon.TableFilter, {}) }), _jsxs(\"div\", { className: \"ml-1 flex h-6 items-center text-xl font-medium\", children: [\"Filter\", _jsx(FormBadge_WIP, {})] })] }), _jsx(\"div\", { className: \"flex h-[calc(100%_-_24px)] w-full\" })] }));\n});\n//# sourceMappingURL=DataCubeEditorFilterPanel.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 { DataCubeIcon } from '@finos/legend-art';\nimport { observer } from 'mobx-react-lite';\nimport { useREPLStore } from '../../REPLStoreProvider.js';\nimport { useEffect } from 'react';\nimport { FormBadge_WIP } from '../../repl/Form.js';\nexport const DataCubeEditorExtendedColumnsPanel = observer(() => {\n const repl = useREPLStore();\n const panel = repl.dataCube.editor.sorts;\n useEffect(() => { }, [panel]); // TODO: @akphi - remove this dummy useEffect\n return (_jsxs(\"div\", { className: \"h-full w-full select-none p-2\", children: [_jsxs(\"div\", { className: \"flex h-6\", children: [_jsx(\"div\", { className: \"flex h-6 items-center text-xl font-medium\", children: _jsx(DataCubeIcon.TablePlus, {}) }), _jsxs(\"div\", { className: \"ml-1 flex h-6 items-center text-xl font-medium\", children: [\"Extended Columns\", _jsx(FormBadge_WIP, {})] })] }), _jsx(\"div\", { className: \"flex h-[calc(100%_-_24px)] w-full\" })] }));\n});\n//# sourceMappingURL=DataCubeEditorExtendedColumnsPanel.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 { DataCubeIcon } from '@finos/legend-art';\nimport { useEffect } from 'react';\nimport { useREPLStore } from '../../REPLStoreProvider.js';\nimport { FormBadge_WIP } from '../../repl/Form.js';\n// const DataCubeCodeEditor = observer(() => {\n// const repl = userepl();\n// const application = repl.application;\n// const dataCubeState = repl.dataCubeState;\n// const queryEditorState = dataCubeState.editor.codePanel.queryEditorState;\n// const onDidChangeModelContentEventDisposer = useRef<IDisposable | undefined>(\n// undefined,\n// );\n// const value = normalizeLineEnding(queryEditorState.query);\n// const parserError = queryEditorState.parserError;\n// const [editor, setEditor] = useState<\n// monacoEditorAPI.IStandaloneCodeEditor | undefined\n// >();\n// const textInputRef = useRef<HTMLDivElement>(null);\n// const autoCompleteSuggestionProviderDisposer = useRef<\n// IDisposable | undefined\n// >(undefined);\n// const debouncedParseQuery = useMemo(\n// () =>\n// debounce(()=> {\n// flowResult(dataCubeState.editor.codePanel.parseQuery()).catch(\n// repl.application.logUnhandledError,\n// );\n// }, 1000),\n// [dataCubeState, repl.application.logUnhandledError],\n// );\n// if (editor) {\n// onDidChangeModelContentEventDisposer.current?.dispose();\n// onDidChangeModelContentEventDisposer.current =\n// editor.onDidChangeModelContent(() => {\n// const currentVal = getCodeEditorValue(editor);\n// if (currentVal !== value) {\n// queryEditorState.setQuery(currentVal);\n// debouncedParseQuery.cancel();\n// debouncedParseQuery();\n// }\n// });\n// // Set the text value\n// const currentValue = getCodeEditorValue(editor);\n// const editorModel = editor.getModel();\n// if (currentValue !== value) {\n// editor.setValue(value);\n// }\n// // auto complete suggestions\n// autoCompleteSuggestionProviderDisposer.current?.dispose();\n// autoCompleteSuggestionProviderDisposer.current =\n// monacoLanguagesAPI.registerCompletionItemProvider(\n// CODE_EDITOR_LANGUAGE.PURE,\n// {\n// triggerCharacters: ['>', '.', '$', '~'],\n// provideCompletionItems: async (model, position, context) => {\n// // TODO: @akphi - do this later when we support typeahead for extended columns, etc.\n// // const suggestions: monacoLanguagesAPI.CompletionItem[] =\n// // await dataCubeState.getTypeaheadResults(position, model);\n// const suggestions: monacoLanguagesAPI.CompletionItem[] = [];\n// return { suggestions };\n// },\n// },\n// );\n// // Set the errors\n// if (editorModel) {\n// editorModel.updateOptions({ tabSize: DEFAULT_TAB_SIZE });\n// const error = parserError;\n// if (error?.sourceInformation) {\n// setErrorMarkers(editorModel, [\n// {\n// message: error.message,\n// startLineNumber: error.sourceInformation.startLine,\n// startColumn: error.sourceInformation.startColumn,\n// endLineNumber: error.sourceInformation.endLine,\n// endColumn: error.sourceInformation.endColumn,\n// },\n// ]);\n// } else {\n// clearMarkers();\n// }\n// }\n// }\n// useEffect(() => {\n// if (!editor && textInputRef.current) {\n// const element = textInputRef.current;\n// const _editor = monacoEditorAPI.create(element, {\n// ...getBaseCodeEditorOptions(),\n// language: CODE_EDITOR_LANGUAGE.PURE,\n// theme: application.layoutService\n// .TEMPORARY__isLightColorThemeEnabled\n// ? CODE_EDITOR_THEME.BUILT_IN__VSCODE_LIGHT\n// : CODE_EDITOR_THEME.DEFAULT_DARK,\n// });\n// setEditor(_editor);\n// }\n// }, [\n// application.layoutService.TEMPORARY__isLightColorThemeEnabled,\n// editor,\n// ]);\n// // dispose editor\n// useEffect(\n// () => ()=> {\n// if (editor) {\n// disposeCodeEditor(editor);\n// onDidChangeModelContentEventDisposer.current?.dispose();\n// }\n// },\n// [editor],\n// );\n// return (\n// <div className={clsx('repl__query__content__editor__content')}>\n// <div className=\"code-editor__body\" ref={textInputRef} />\n// </div>\n// );\n// });\nexport const DataCubeEditorCodePanel = observer(() => {\n const repl = useREPLStore();\n const panel = repl.dataCube.editor.sorts;\n // const executeLambda = ()=> {\n // // TODO: @akphi\n // // flowResult(dataCubeState.executeLambda()).catch(\n // // editorStore.application.logUnhandledError,\n // // );\n // };\n useEffect(() => { }, [panel]); // TODO: @akphi - remove this dummy useEffect\n return (_jsxs(\"div\", { className: \"h-full w-full select-none p-2\", children: [_jsxs(\"div\", { className: \"flex h-6\", children: [_jsx(\"div\", { className: \"flex h-6 items-center text-xl font-medium\", children: _jsx(DataCubeIcon.Code, {}) }), _jsxs(\"div\", { className: \"ml-1 flex h-6 items-center text-xl font-medium\", children: [\"Code\", _jsx(FormBadge_WIP, {})] })] }), _jsx(\"div\", { className: \"flex h-[calc(100%_-_24px)] w-full\" })] })\n // <div className=\"repl__content__query\">\n // <div className=\"repl__query\">\n // <div className=\"repl__query__editor\">\n // <div className=\"repl__query__header\">\n // <div className=\"repl__query__label\">Curent Query</div>\n // <div className=\"repl__query__execute-btn btn__dropdown-combo btn__dropdown-combo--primary\">\n // <button\n // className=\"btn__dropdown-combo__label\"\n // onClick={executeLambda}\n // tabIndex={-1}\n // >\n // <PlayIcon className=\"btn__dropdown-combo__label__icon\" />\n // <div className=\"btn__dropdown-combo__label__title\">\n // Run Query\n // </div>\n // </button>\n // </div>\n // </div>\n // <div className=\"repl__query__content\">\n // <DataCubeCodeEditor />\n // </div>\n // </div>\n // </div>\n // {/* {dataCubeState.editor.codeEditorState.currentSubQuery !== undefined && (\n // <div className=\"repl__query\">\n // <div className=\"repl__query__editor\">\n // <div className=\"repl__query__header\">\n // <div className=\"repl__query__label__sub__query\">\n // Current Row Group Sub Query\n // </div>\n // <div className=\"repl__query__label__sub__query__read--only\">\n // Read Only\n // </div>\n // </div>\n // <div className=\"repl__query__content\">\n // <CodeEditor\n // lightTheme={\n // isLightTheme\n // ? CODE_EDITOR_THEME.BUILT_IN__VSCODE_HC_LIGHT\n // : CODE_EDITOR_THEME.BUILT_IN__VSCODE_HC_BLACK\n // }\n // language={CODE_EDITOR_LANGUAGE.PURE}\n // isReadOnly={true}\n // inputValue={\n // dataCubeState.editor.codeEditorState.currentSubQuery\n // }\n // hideActionBar={true}\n // hidePadding={true}\n // />\n // </div>\n // </div>\n // </div>\n // )} */}\n // </div>\n );\n});\n//# sourceMappingURL=DataCubeEditorCodePanel.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS 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 DocumentationKey;\n(function (DocumentationKey) {\n DocumentationKey[\"DATA_CUBE_EXTENDED_COLUMN_LEVELS\"] = \"data-cube.extended-column.levels\";\n DocumentationKey[\"DATA_CUBE_COLUMN_KINDS\"] = \"data-cube.column.kinds\";\n DocumentationKey[\"DATA_CUBE_COLUMN_DISPLAY_AS_LINK\"] = \"data-cube.column.display-as-link\";\n DocumentationKey[\"DATA_CUBE_COLUMN_MISSING_VALUE_FORMAT\"] = \"data-cube.column.missing-value-format\";\n})(DocumentationKey || (DocumentationKey = {}));\n//# sourceMappingURL=LegendREPLDocumentation.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 { cn, DataCubeIcon, useDropdownMenu } from '@finos/legend-art';\nimport { observer } from 'mobx-react-lite';\nimport { useREPLStore } from '../../REPLStoreProvider.js';\nimport { FormBadge_Advanced, FormCheckbox, FormColorPickerButton, FormDropdownMenu, FormDropdownMenuItem, FormDropdownMenuItemSeparator, FormDropdownMenuTrigger, FormNumberInput, FormTextInput, FormBadge_WIP, FormDocumentation, } from '../../repl/Form.js';\nimport { DataCubeAggregateOperation, DataCubeColumnDataType, DataCubeColumnKind, DataCubeColumnPinPlacement, DataCubeFont, DataCubeFontCase, DataCubeFontFormatUnderlineVariant, DataCubeFontTextAlignment, DataCubeNumberScale, DEFAULT_COLUMN_MAX_WIDTH, DEFAULT_COLUMN_MIN_WIDTH, DEFAULT_COLUMN_WIDTH, DEFAULT_URL_LABEL_QUERY_PARAM, } from '../../../stores/dataCube/core/DataCubeQueryEngine.js';\nimport { DocumentationKey } from '../../../application/LegendREPLDocumentation.js';\nexport const DataCubeEditorColumnPropertiesPanel = observer(() => {\n const repl = useREPLStore();\n const dataCube = repl.dataCube;\n const panel = dataCube.editor.columnProperties;\n const gridConfiguration = dataCube.editor.generalProperties.configuration;\n const selectedColumn = panel.selectedColumn;\n const [openColumnsDropdown, closeColumnsDropdown, columnsDropdownProps] = useDropdownMenu();\n const [openKindDropdown, closeKindDropdown, kindDropdownProps] = useDropdownMenu();\n const [openAggregationTypeDropdown, closeAggregationTypeDropdown, aggregationTypeDropdownProps,] = useDropdownMenu();\n const [openNumberScaleDropdown, closeNumberScaleDropdown, numberScaleDropdownProps,] = useDropdownMenu();\n const [openFontFamilyDropdown, closeFontFamilyDropdown, fontFamilyDropdownProps,] = useDropdownMenu();\n const [openFontSizeDropdown, closeFontSizeDropdown, openFontSizeDropdownProps,] = useDropdownMenu();\n const [openFontFormatUnderlineVariantDropdown, closeFontFormatUnderlineVariantDropdown, fontFormatUnderlineVariantDropdownProps,] = useDropdownMenu();\n const [openColumnPinDropdown, closeColumnPinDropdown, columnPinDropdownProps,] = useDropdownMenu();\n const [openFontCaseDropdown, closeFontCaseDropdown, fontCaseDropdownProps] = useDropdownMenu();\n return (_jsxs(\"div\", { className: \"h-full w-full select-none p-2\", children: [_jsxs(\"div\", { className: \"flex h-6 justify-between\", children: [_jsxs(\"div\", { className: \"flex h-full\", children: [_jsxs(\"div\", { className: \"relative flex h-6 items-center text-xl font-medium\", children: [_jsx(DataCubeIcon.TableColumn, {}), _jsx(DataCubeIcon.TableColumnOptions__Settings, { className: \"absolute bottom-1 right-0 bg-white text-xs\" })] }), _jsx(\"div\", { className: \"ml-1 flex h-6 items-center text-xl font-medium\", children: \"Column Properties\" })] }), _jsxs(\"div\", { className: \"flex h-full items-center pr-2\", children: [_jsx(FormCheckbox, { label: \"Show advanced settings?\", checked: panel.showAdvancedSettings, onChange: () => panel.setShowAdvancedSettings(!panel.showAdvancedSettings) }), _jsx(FormBadge_Advanced, {})] })] }), _jsx(\"div\", { className: \"flex h-[calc(100%_-_24px)] w-full\", children: _jsxs(\"div\", { className: \"h-full w-full py-2\", children: [_jsxs(\"div\", { className: \"flex h-6 w-full items-center\", children: [_jsx(\"div\", { className: \"flex h-full w-32 flex-shrink-0 items-center text-sm\", children: \"Choose Column:\" }), _jsx(FormDropdownMenuTrigger, { className: \"w-80\", onClick: openColumnsDropdown, children: _jsxs(\"div\", { className: \"flex h-full w-full items-center\", children: [_jsx(\"div\", { className: \"overflow-hidden overflow-ellipsis whitespace-nowrap\", children: selectedColumn?.name ?? '(None)' }), selectedColumn && (_jsx(\"div\", { className: \"ml-1.5 mr-0.5 flex h-3.5 w-12 flex-shrink-0 items-center justify-center rounded-sm border border-neutral-300 bg-neutral-100 text-xs font-medium uppercase text-neutral-600\", children: selectedColumn.dataType }))] }) }), _jsx(FormDropdownMenu, { className: \"w-80\", ...columnsDropdownProps, children: panel.configurableColumns.map((column) => (_jsxs(FormDropdownMenuItem, { onClick: () => {\n panel.setSelectedColumnName(column.name);\n closeColumnsDropdown();\n }, children: [_jsx(\"div\", { className: \"overflow-hidden overflow-ellipsis whitespace-nowrap\", children: column.name }), _jsx(\"div\", { className: \"ml-1.5 mr-0.5 flex h-3.5 w-12 flex-shrink-0 items-center justify-center rounded-sm border border-neutral-300 bg-neutral-100 text-xs font-medium uppercase text-neutral-600\", children: column.dataType })] }, column.name))) }), panel.showAdvancedSettings && selectedColumn && (_jsxs(_Fragment, { children: [_jsx(\"div\", { className: \"mx-2 h-[1px] w-4 flex-shrink-0 bg-neutral-400\" }), _jsxs(\"div\", { className: \"flex h-6 items-center\", children: [_jsx(\"div\", { className: \"flex h-full flex-shrink-0 items-center text-sm\", children: \"Kind:\" }), _jsx(FormDropdownMenuTrigger, { className: \"ml-1 w-20\", onClick: openKindDropdown, disabled: true, children: selectedColumn.kind }), _jsx(FormDropdownMenu, { className: \"w-20\", ...kindDropdownProps, children: [\n DataCubeColumnKind.DIMENSION,\n DataCubeColumnKind.MEASURE,\n ].map((kind) => (_jsx(FormDropdownMenuItem, { onClick: () => {\n selectedColumn.setKind(kind);\n closeKindDropdown();\n }, children: kind }, kind))) }), _jsx(FormBadge_Advanced, {}), _jsx(FormBadge_WIP, {}), _jsx(FormDocumentation, { className: \"ml-1\", documentationKey: DocumentationKey.DATA_CUBE_COLUMN_KINDS })] })] }))] }), _jsx(\"div\", { className: \"-ml-2 mb-2 mt-3 h-[1px] w-[calc(100%_+_16px)] bg-neutral-200\" }), selectedColumn && (_jsxs(_Fragment, { children: [_jsxs(\"div\", { className: \"mt-2 flex h-5 w-full items-center\", children: [_jsx(\"div\", { className: \"flex h-full w-32 flex-shrink-0 items-center text-sm\", children: \"Display Name:\" }), _jsx(FormTextInput, { className: \"w-80\", value: selectedColumn.displayName ?? '', onChange: (event) => {\n const value = event.target.value.trim();\n selectedColumn.setDisplayName(value !== '' ? value : undefined);\n } })] }), selectedColumn.dataType === DataCubeColumnDataType.NUMBER && (_jsxs(_Fragment, { children: [_jsxs(\"div\", { className: \"mt-2 flex h-5 w-full items-center\", children: [_jsx(\"div\", { className: \"flex h-full w-32 flex-shrink-0 items-center text-sm\", children: \"Number Format:\" }), _jsx(FormNumberInput, { className: \"w-16 text-sm\", min: 0, step: 1, value: selectedColumn.decimals ?? 0, setValue: (value) => {\n selectedColumn.setDecimals(value);\n } }), _jsx(\"div\", { className: \"ml-1 flex-shrink-0 text-sm\", children: \"Decimal places\" }), _jsx(FormCheckbox, { className: \"ml-3\", label: \"Display commas\", checked: selectedColumn.displayCommas, onChange: () => selectedColumn.setDisplayCommas(!selectedColumn.displayCommas) }), _jsx(FormCheckbox, { className: \"ml-3\", label: \"Negative number in parens\", checked: selectedColumn.negativeNumberInParens, onChange: () => selectedColumn.setNegativeNumberInParens(!selectedColumn.negativeNumberInParens) })] }), _jsxs(\"div\", { className: \"mt-2 flex h-5 w-full items-center\", children: [_jsx(\"div\", { className: \"flex h-full w-32 flex-shrink-0 items-center text-sm\", children: \"Number Scale:\" }), _jsx(FormDropdownMenuTrigger, { className: \"w-32\", onClick: openNumberScaleDropdown, children: selectedColumn.numberScale ?? '(None)' }), _jsx(FormDropdownMenu, { className: \"w-32\", ...numberScaleDropdownProps, children: [\n undefined,\n DataCubeNumberScale.PERCENT,\n DataCubeNumberScale.BASIS_POINT,\n DataCubeNumberScale.THOUSANDS,\n DataCubeNumberScale.MILLIONS,\n DataCubeNumberScale.BILLIONS,\n DataCubeNumberScale.TRILLIONS,\n DataCubeNumberScale.AUTO,\n ].map((scale) => (_jsx(FormDropdownMenuItem, { onClick: () => {\n selectedColumn.setNumberScale(scale);\n closeNumberScaleDropdown();\n }, children: scale ?? '(None)' }, scale ?? ''))) })] }), _jsxs(\"div\", { className: \"mt-2 flex h-5 w-full items-center\", children: [_jsx(\"div\", { className: \"flex h-full w-32 flex-shrink-0 items-center text-sm\", children: \"Aggregation Type:\" }), _jsx(FormDropdownMenuTrigger, { className: \"w-32\", onClick: openAggregationTypeDropdown, disabled: true, children: selectedColumn.aggregateFunction ?? '(None)' }), _jsx(FormDropdownMenu, { className: \"w-32\", ...aggregationTypeDropdownProps, children: [\n DataCubeAggregateOperation.SUM,\n DataCubeAggregateOperation.AVERAGE,\n DataCubeAggregateOperation.COUNT,\n DataCubeAggregateOperation.MIN,\n DataCubeAggregateOperation.MAX,\n ].map((fn) => (_jsx(FormDropdownMenuItem, { onClick: () => {\n selectedColumn.setAggregateFunction(fn);\n closeAggregationTypeDropdown();\n }, children: fn }, fn))) }), _jsx(FormBadge_WIP, {})] }), _jsxs(\"div\", { className: \"mt-2 flex h-5 w-full items-center\", children: [_jsx(\"div\", { className: \"flex h-full w-32 flex-shrink-0 items-center text-sm\", children: \"Exclude from HPivot?\" }), _jsx(FormCheckbox, { checked: selectedColumn.excludedFromHorizontalPivot, onChange: () => selectedColumn.setExcludedFromHorizontalPivot(!selectedColumn.excludedFromHorizontalPivot), disabled: true }), _jsx(FormBadge_WIP, {})] })] })), selectedColumn.dataType === DataCubeColumnDataType.TEXT && (_jsx(_Fragment, { children: _jsxs(\"div\", { className: \"mt-2 flex h-5 w-full items-center\", children: [_jsxs(\"div\", { className: \"flex h-full w-32 flex-shrink-0 items-center text-sm\", children: [\"Dislay as Link?\", _jsx(FormDocumentation, { className: \"ml-1\", documentationKey: DocumentationKey.DATA_CUBE_COLUMN_DISPLAY_AS_LINK })] }), _jsx(FormCheckbox, { checked: selectedColumn.displayAsLink, onChange: () => selectedColumn.setDisplayAsLink(!selectedColumn.displayAsLink) }), _jsx(\"div\", { className: \"ml-1 h-[1px] w-2 flex-shrink-0 bg-neutral-400\" }), _jsx(\"div\", { className: \"ml-2 mr-1.5 flex h-full flex-shrink-0 items-center text-sm\", children: \"Use Parameter in Link as Label:\" }), _jsx(FormTextInput, { className: \"w-48\", placeholder: DEFAULT_URL_LABEL_QUERY_PARAM, value: selectedColumn.linkLabelParameter ?? '', onChange: (event) => {\n const value = event.target.value.trim();\n selectedColumn.setLinkLabelParameter(value !== '' ? value : undefined);\n } })] }) })), _jsxs(\"div\", { className: \"mt-2 flex h-5 w-full items-center\", children: [_jsxs(\"div\", { className: \"flex h-full w-32 flex-shrink-0 items-center text-sm\", children: [`Missing Value Format:`, _jsx(FormDocumentation, { className: \"ml-1\", documentationKey: DocumentationKey.DATA_CUBE_COLUMN_MISSING_VALUE_FORMAT })] }), _jsx(FormTextInput, { className: \"w-16\", value: selectedColumn.missingValueDisplayText ?? '', onChange: (event) => {\n const value = event.target.value.trim();\n selectedColumn.setMissingValueDisplayText(value !== '' ? value : undefined);\n }, placeholder: \"(empty)\" })] }), _jsxs(\"div\", { className: \"mt-2 flex h-5 w-full items-center\", children: [_jsx(\"div\", { className: \"flex h-full w-32 flex-shrink-0 items-center text-sm\", children: \"Visibility:\" }), _jsx(FormCheckbox, { label: \"Blur content\", checked: selectedColumn.blur, onChange: () => selectedColumn.setBlur(!selectedColumn.blur), disabled: selectedColumn.hideFromView }), _jsx(FormCheckbox, { className: \"ml-3\", label: \"Hide from view\", checked: selectedColumn.hideFromView, onChange: () => selectedColumn.setHideFromView(!selectedColumn.hideFromView) })] }), _jsxs(\"div\", { className: \"mt-2 flex h-5 w-full items-center\", children: [_jsx(\"div\", { className: \"flex h-full w-32 flex-shrink-0 items-center text-sm\", children: \"Pin:\" }), _jsx(FormDropdownMenuTrigger, { className: \"w-16\", onClick: openColumnPinDropdown, children: selectedColumn.pinned ?? '(None)' }), _jsx(FormDropdownMenu, { className: \"w-16\", ...columnPinDropdownProps, children: [\n undefined,\n DataCubeColumnPinPlacement.LEFT,\n DataCubeColumnPinPlacement.RIGHT,\n ].map((placement) => (_jsx(FormDropdownMenuItem, { onClick: () => {\n selectedColumn.setPinned(placement);\n closeColumnPinDropdown();\n }, children: placement ?? '(None)' }, placement ?? ''))) })] }), _jsxs(\"div\", { className: \"mt-1.5 flex h-6 w-full items-center\", children: [_jsx(\"div\", { className: \"flex h-full w-32 flex-shrink-0 items-center text-sm\", children: \"Width:\" }), _jsx(FormCheckbox, { label: \"(Any)\", checked: selectedColumn.fixedWidth === undefined &&\n selectedColumn.minWidth === undefined &&\n selectedColumn.maxWidth === undefined, onChange: () => {\n if (selectedColumn.fixedWidth === undefined &&\n selectedColumn.minWidth === undefined &&\n selectedColumn.maxWidth === undefined) {\n selectedColumn.setFixedWidth(DEFAULT_COLUMN_WIDTH);\n selectedColumn.setMinWidth(undefined);\n selectedColumn.setMaxWidth(undefined);\n }\n else {\n selectedColumn.setFixedWidth(undefined);\n selectedColumn.setMinWidth(undefined);\n selectedColumn.setMaxWidth(undefined);\n }\n } }), _jsx(FormCheckbox, { className: \"ml-3\", label: \"Fixed\", checked: selectedColumn.fixedWidth !== undefined, onChange: () => {\n selectedColumn.setFixedWidth(selectedColumn.fixedWidth !== undefined\n ? undefined\n : DEFAULT_COLUMN_WIDTH);\n selectedColumn.setMinWidth(undefined);\n selectedColumn.setMaxWidth(undefined);\n } }), _jsx(\"div\", { className: \"ml-1 h-[1px] w-2 flex-shrink-0 bg-neutral-400\" }), _jsx(FormNumberInput, { className: \"ml-1 w-16 text-sm\", min: 0, step: 50, defaultValue: undefined, isValid: (value) => value !== undefined && value > 0, value: selectedColumn.fixedWidth, setValue: (value) => {\n selectedColumn.setFixedWidth(value);\n }, disabled: selectedColumn.minWidth !== undefined ||\n selectedColumn.maxWidth !== undefined }), _jsx(FormCheckbox, { className: \"ml-3\", label: \"In range\", checked: selectedColumn.minWidth !== undefined ||\n selectedColumn.maxWidth !== undefined, onChange: () => {\n if (selectedColumn.minWidth === undefined &&\n selectedColumn.maxWidth === undefined) {\n selectedColumn.setMinWidth(DEFAULT_COLUMN_MIN_WIDTH);\n selectedColumn.setMaxWidth(DEFAULT_COLUMN_MAX_WIDTH);\n selectedColumn.setFixedWidth(undefined);\n }\n else {\n selectedColumn.setMinWidth(undefined);\n selectedColumn.setMaxWidth(undefined);\n selectedColumn.setFixedWidth(undefined);\n }\n } }), _jsx(\"div\", { className: \"ml-1 h-[1px] w-2 flex-shrink-0 bg-neutral-400\" }), _jsx(FormNumberInput, { className: \"ml-1 w-16 text-sm\", min: 0, step: 50, defaultValue: undefined, isValid: (value) => value !== undefined && value > 0, value: selectedColumn.minWidth, setValue: (value) => {\n selectedColumn.setMinWidth(value);\n }, disabled: selectedColumn.fixedWidth !== undefined }), _jsx(\"div\", { className: \"ml-1 h-[1px] w-1 flex-shrink-0 bg-neutral-400\" }), _jsx(FormNumberInput, { className: \"ml-1 w-16 text-sm\", min: selectedColumn.minWidth ?? 0, step: 50, defaultValue: undefined, isValid: (value) => value !== undefined &&\n value >= (selectedColumn.minWidth ?? 0), value: selectedColumn.maxWidth, setValue: (value) => {\n selectedColumn.setMaxWidth(value);\n }, disabled: selectedColumn.fixedWidth !== undefined })] }), _jsx(\"div\", { className: \"my-2 h-[1px] w-full bg-neutral-200\" }), _jsxs(\"div\", { className: \"mt-2 flex h-5 w-full items-center\", children: [_jsx(\"div\", { className: \"flex h-full w-32 flex-shrink-0 items-center text-sm\", children: \"Font:\" }), _jsx(FormDropdownMenuTrigger, { className: \"w-28\", onClick: openFontFamilyDropdown, children: selectedColumn.fontFamily ?? gridConfiguration.fontFamily }), _jsxs(FormDropdownMenu, { className: \"w-28\", ...fontFamilyDropdownProps, children: [[\n DataCubeFont.ARIAL,\n DataCubeFont.ROBOTO,\n DataCubeFont.ROBOTO_CONDENSED,\n ].map((font) => (_jsx(FormDropdownMenuItem, { onClick: () => {\n selectedColumn.setFontFamily(font);\n closeFontFamilyDropdown();\n }, children: font }, font))), _jsx(FormDropdownMenuItemSeparator, {}), [\n DataCubeFont.GEORGIA,\n DataCubeFont.ROBOTO_SERIF,\n DataCubeFont.TIMES_NEW_ROMAN,\n ].map((font) => (_jsx(FormDropdownMenuItem, { onClick: () => {\n selectedColumn.setFontFamily(font);\n closeFontFamilyDropdown();\n }, children: font }, font))), _jsx(FormDropdownMenuItemSeparator, {}), [\n DataCubeFont.JERBRAINS_MONO,\n DataCubeFont.ROBOTO_MONO,\n DataCubeFont.UBUNTU_MONO,\n ].map((font) => (_jsx(FormDropdownMenuItem, { onClick: () => {\n selectedColumn.setFontFamily(font);\n closeFontFamilyDropdown();\n }, children: font }, font)))] }), _jsx(FormDropdownMenuTrigger, { className: \"ml-1 w-10\", onClick: openFontSizeDropdown, children: selectedColumn.fontSize ?? gridConfiguration.fontSize }), _jsx(FormDropdownMenu, { className: \"w-10\", ...openFontSizeDropdownProps, children: [\n 4, 5, 6, 7, 8, 9, 10, 11, 12, 14, 16, 18, 20, 22, 24, 26,\n 28, 32, 36, 48, 72,\n ].map((size) => (_jsx(FormDropdownMenuItem, { onClick: () => {\n selectedColumn.setFontSize(size);\n closeFontSizeDropdown();\n }, children: size }, size))) }), _jsxs(\"div\", { className: \"relative ml-2 flex h-5\", children: [_jsx(\"button\", { title: \"Bold\", className: cn('relative flex h-5 w-5 items-center justify-center rounded-bl-sm rounded-tl-sm border border-neutral-400 bg-neutral-50 p-0 text-neutral-700 focus-visible:z-[1]', {\n 'bg-neutral-200': selectedColumn.fontBold ?? gridConfiguration.fontBold,\n }), onClick: () => selectedColumn.setFontBold(!(selectedColumn.fontBold ?? gridConfiguration.fontBold)), children: _jsx(DataCubeIcon.FontBold, {}) }), _jsx(\"button\", { title: \"Italic\", className: cn('relative -ml-[1px] flex h-5 w-5 items-center justify-center border border-neutral-400 bg-neutral-50 p-0 text-neutral-700 focus-visible:z-[1]', {\n 'bg-neutral-200': selectedColumn.fontItalic ??\n gridConfiguration.fontItalic,\n }), onClick: () => selectedColumn.setFontItalic(!(selectedColumn.fontItalic ??\n gridConfiguration.fontItalic)), children: _jsx(DataCubeIcon.FontItalic, {}) }), _jsx(\"button\", { title: `Underline${(selectedColumn.fontUnderline ?? gridConfiguration.fontUnderline) ? ` (${selectedColumn.fontUnderline ?? gridConfiguration.fontUnderline})` : ''}`, className: cn('relative -ml-[1px] flex h-5 w-5 items-center justify-center border border-r-0 border-neutral-400 bg-neutral-50 p-0 text-neutral-700 focus-visible:z-[1]', {\n 'bg-neutral-200': (selectedColumn.fontUnderline ??\n gridConfiguration.fontUnderline) !== undefined,\n }), onClick: () => {\n if ((selectedColumn.fontUnderline ??\n gridConfiguration.fontUnderline) === undefined) {\n selectedColumn.setFontUnderline(DataCubeFontFormatUnderlineVariant.SOLID);\n selectedColumn.setFontStrikethrough(false);\n }\n else {\n selectedColumn.setFontUnderline(undefined);\n }\n }, children: _jsx(DataCubeIcon.FontUnderline, {}) }), _jsxs(\"button\", { className: \"text-2xs relative -ml-[1px] flex h-5 w-2.5 items-center justify-center border border-l-0 border-neutral-400 bg-neutral-50 p-0 text-neutral-600 focus-visible:z-[1]\", onClick: openFontFormatUnderlineVariantDropdown, children: [_jsx(\"div\", { className: cn('h-4 w-[0.5px] bg-neutral-200', {\n 'opacity-0': (selectedColumn.fontUnderline ??\n gridConfiguration.fontUnderline) !== undefined,\n }) }), _jsx(DataCubeIcon.CaretDown, {})] }), _jsx(FormDropdownMenu, { className: \"w-14\", ...fontFormatUnderlineVariantDropdownProps, children: [\n DataCubeFontFormatUnderlineVariant.SOLID,\n DataCubeFontFormatUnderlineVariant.DASHED,\n DataCubeFontFormatUnderlineVariant.DOTTED,\n DataCubeFontFormatUnderlineVariant.DOUBLE,\n DataCubeFontFormatUnderlineVariant.WAVY,\n ].map((variant) => (_jsx(FormDropdownMenuItem, { className: \"relative\", onClick: () => {\n selectedColumn.setFontUnderline(variant);\n selectedColumn.setFontStrikethrough(false);\n closeFontFormatUnderlineVariantDropdown();\n }, children: _jsx(\"div\", { className: cn('!hover:underline absolute top-0 !underline', {\n '!hover:decoration-solid !decoration-solid': variant ===\n DataCubeFontFormatUnderlineVariant.SOLID,\n '!hover:decoration-dashed !decoration-dashed': variant ===\n DataCubeFontFormatUnderlineVariant.DASHED,\n '!hover:decoration-dotted !decoration-dotted': variant ===\n DataCubeFontFormatUnderlineVariant.DOTTED,\n '!hover:decoration-double !decoration-double': variant ===\n DataCubeFontFormatUnderlineVariant.DOUBLE,\n '!hover:decoration-wavy !decoration-wavy': variant ===\n DataCubeFontFormatUnderlineVariant.WAVY,\n 'text-sky-600': variant ===\n (selectedColumn.fontUnderline ??\n gridConfiguration.fontUnderline),\n }), children: \"\\u00A0\\u00A0\\u00A0\\u00A0\\u00A0\\u00A0\\u00A0\\u00A0\\u00A0\\u00A0\\u00A0\\u00A0\\u00A0\\u00A0\\u00A0\\u00A0\" }) }, variant))) }), _jsx(\"button\", { title: \"Strikethrough\", className: cn('relative -ml-[1px] flex h-5 w-5 items-center justify-center border border-neutral-400 bg-neutral-50 p-0 text-neutral-700 focus-visible:z-[1]', {\n 'bg-neutral-200': selectedColumn.fontStrikethrough ??\n gridConfiguration.fontStrikethrough,\n }), onClick: () => {\n if (selectedColumn.fontStrikethrough ??\n gridConfiguration.fontStrikethrough) {\n selectedColumn.setFontStrikethrough(false);\n }\n else {\n selectedColumn.setFontStrikethrough(true);\n selectedColumn.setFontUnderline(undefined);\n }\n }, children: _jsx(DataCubeIcon.FontStrikethrough, {}) }), _jsx(\"button\", { title: `Case${(selectedColumn.fontCase ?? gridConfiguration.fontCase) ? ` (${selectedColumn.fontCase ?? gridConfiguration.fontCase})` : ''}`, className: cn('relative -ml-[1px] flex h-5 w-5 items-center justify-center border border-r-0 border-neutral-400 bg-neutral-50 p-0 text-neutral-700 focus-visible:z-[1]', {\n 'bg-neutral-200': (selectedColumn.fontCase ??\n gridConfiguration.fontCase) !== undefined,\n }), onClick: () => {\n if ((selectedColumn.fontCase ??\n gridConfiguration.fontCase) === undefined) {\n selectedColumn.setFontCase(DataCubeFontCase.UPPERCASE);\n }\n else {\n selectedColumn.setFontCase(undefined);\n }\n }, children: _jsx(DataCubeIcon.FontCase, { className: \"stroke-[0.5px]\" }) }), _jsxs(\"button\", { className: \"text-2xs relative -ml-[1px] flex h-5 w-2.5 items-center justify-center rounded-br-sm rounded-tr-sm border border-l-0 border-neutral-400 bg-neutral-50 p-0 text-neutral-600 focus-visible:z-[1]\", onClick: openFontCaseDropdown, children: [_jsx(\"div\", { className: cn('h-4 w-[0.5px] bg-neutral-200', {\n 'opacity-0': (selectedColumn.fontCase ??\n gridConfiguration.fontCase) !== undefined,\n }) }), _jsx(DataCubeIcon.CaretDown, {})] }), _jsx(FormDropdownMenu, { className: \"w-20\", ...fontCaseDropdownProps, children: [\n DataCubeFontCase.LOWERCASE,\n DataCubeFontCase.UPPERCASE,\n DataCubeFontCase.CAPITALIZE,\n ].map((fontCase) => (_jsx(FormDropdownMenuItem, { className: \"relative\", onClick: () => {\n selectedColumn.setFontCase(fontCase);\n closeFontCaseDropdown();\n }, children: _jsx(\"div\", { className: cn({\n lowercase: fontCase === DataCubeFontCase.LOWERCASE,\n uppercase: fontCase === DataCubeFontCase.UPPERCASE,\n capitalize: fontCase === DataCubeFontCase.CAPITALIZE,\n 'text-sky-600': fontCase ===\n (selectedColumn.fontCase ??\n gridConfiguration.fontCase),\n }), children: fontCase }) }, fontCase))) })] }), _jsxs(\"div\", { className: \"relative ml-2 flex h-5\", children: [_jsx(\"button\", { title: \"Align Left\", className: cn('relative flex h-5 w-5 items-center justify-center rounded-bl-sm rounded-tl-sm border border-neutral-400 bg-neutral-50 p-0 text-neutral-700 focus-visible:z-[1]', {\n 'bg-neutral-200': (selectedColumn.textAlign ??\n gridConfiguration.textAlign) ===\n DataCubeFontTextAlignment.LEFT,\n }), onClick: () => selectedColumn.setTextAlign(DataCubeFontTextAlignment.LEFT), children: _jsx(DataCubeIcon.TextAlignLeft, {}) }), _jsx(\"button\", { title: \"Align Center\", className: cn('relative -ml-[1px] flex h-5 w-5 items-center justify-center border border-neutral-400 bg-neutral-50 p-0 text-neutral-700 focus-visible:z-[1]', {\n 'bg-neutral-200': (selectedColumn.textAlign ??\n gridConfiguration.textAlign) ===\n DataCubeFontTextAlignment.CENTER,\n }), onClick: () => selectedColumn.setTextAlign(DataCubeFontTextAlignment.CENTER), children: _jsx(DataCubeIcon.TextAlignCenter, {}) }), _jsx(\"button\", { title: \"Align Right\", className: cn('relative -ml-[1px] flex h-5 w-5 items-center justify-center rounded-br-sm rounded-tr-sm border border-neutral-400 bg-neutral-50 p-0 text-neutral-700 focus-visible:z-[1]', {\n 'bg-neutral-200': (selectedColumn.textAlign ??\n gridConfiguration.textAlign) ===\n DataCubeFontTextAlignment.RIGHT,\n }), onClick: () => selectedColumn.setTextAlign(DataCubeFontTextAlignment.RIGHT), children: _jsx(DataCubeIcon.TextAlignRight, {}) })] })] }), _jsxs(\"div\", { className: \"mt-2 flex w-full\", children: [_jsx(\"div\", { className: \"flex h-6 w-32 flex-shrink-0 items-center text-sm\", children: \"Colors:\" }), _jsxs(\"div\", { className: \"h-18\", children: [_jsxs(\"div\", { className: \"flex h-6\", children: [_jsx(\"div\", { className: \"w-16 flex-shrink-0\" }), _jsx(\"div\", { className: \"flex h-full w-12 flex-shrink-0 items-center justify-center text-sm\", children: \"Normal\" }), _jsx(\"div\", { className: \"flex h-full w-12 flex-shrink-0 items-center justify-center text-sm\", children: \"Negative\" }), _jsx(\"div\", { className: \"flex h-full w-12 flex-shrink-0 items-center justify-center text-sm\", children: \"Zero\" }), _jsx(\"div\", { className: \"flex h-full w-12 flex-shrink-0 items-center justify-center text-sm\", children: \"Error\" })] }), _jsxs(\"div\", { className: \"flex h-6\", children: [_jsx(\"div\", { className: \"flex h-full w-16 flex-shrink-0 items-center text-sm\", children: \"Foreground:\" }), _jsx(\"div\", { className: \"flex h-full w-12 flex-shrink-0 items-center justify-center\", children: _jsx(FormColorPickerButton, { color: selectedColumn.normalForegroundColor ??\n gridConfiguration.normalForegroundColor, defaultColor: gridConfiguration.normalForegroundColor, onChange: (value) => selectedColumn.setNormalForegroundColor(value) }) }), _jsx(\"div\", { className: \"flex h-full w-12 flex-shrink-0 items-center justify-center\", children: _jsx(FormColorPickerButton, { color: selectedColumn.negativeForegroundColor ??\n gridConfiguration.negativeForegroundColor, defaultColor: gridConfiguration.negativeForegroundColor, onChange: (value) => selectedColumn.setNegativeForegroundColor(value) }) }), _jsx(\"div\", { className: \"flex h-full w-12 flex-shrink-0 items-center justify-center\", children: _jsx(FormColorPickerButton, { color: selectedColumn.zeroForegroundColor ??\n gridConfiguration.zeroForegroundColor, defaultColor: gridConfiguration.zeroForegroundColor, onChange: (value) => selectedColumn.setZeroForegroundColor(value) }) }), _jsx(\"div\", { className: \"flex h-full w-12 flex-shrink-0 items-center justify-center\", children: _jsx(FormColorPickerButton, { color: selectedColumn.errorForegroundColor ??\n gridConfiguration.errorForegroundColor, defaultColor: gridConfiguration.errorForegroundColor, onChange: (value) => selectedColumn.setErrorForegroundColor(value) }) })] }), _jsxs(\"div\", { className: \"flex h-6\", children: [_jsx(\"div\", { className: \"flex h-full w-16 flex-shrink-0 items-center text-sm\", children: \"Background:\" }), _jsx(\"div\", { className: \"flex h-full w-12 flex-shrink-0 items-center justify-center\", children: _jsx(FormColorPickerButton, { color: selectedColumn.normalBackgroundColor ??\n gridConfiguration.normalBackgroundColor, defaultColor: gridConfiguration.normalBackgroundColor, onChange: (value) => selectedColumn.setNormalBackgroundColor(value) }) }), _jsx(\"div\", { className: \"flex h-full w-12 flex-shrink-0 items-center justify-center\", children: _jsx(FormColorPickerButton, { color: selectedColumn.negativeBackgroundColor ??\n gridConfiguration.negativeBackgroundColor, defaultColor: gridConfiguration.negativeBackgroundColor, onChange: (value) => selectedColumn.setNegativeBackgroundColor(value) }) }), _jsx(\"div\", { className: \"flex h-full w-12 flex-shrink-0 items-center justify-center\", children: _jsx(FormColorPickerButton, { color: selectedColumn.zeroBackgroundColor ??\n gridConfiguration.zeroBackgroundColor, defaultColor: gridConfiguration.zeroBackgroundColor, onChange: (value) => selectedColumn.setZeroBackgroundColor(value) }) }), _jsx(\"div\", { className: \"flex h-full w-12 flex-shrink-0 items-center justify-center\", children: _jsx(FormColorPickerButton, { color: selectedColumn.errorBackgroundColor ??\n gridConfiguration.errorBackgroundColor, defaultColor: gridConfiguration.errorBackgroundColor, onChange: (value) => selectedColumn.setErrorBackgroundColor(value) }) })] })] })] }), _jsxs(\"div\", { className: \"mt-2 flex w-full\", children: [_jsx(\"div\", { className: \"flex h-6 w-32 flex-shrink-0 items-center text-sm\" }), _jsxs(\"div\", { className: \"w-80\", children: [_jsx(\"div\", { className: \"mb-2 h-[1px] w-full bg-neutral-200\" }), _jsx(\"button\", { className: \"flex h-5 items-center justify-center rounded-sm border border-neutral-400 bg-neutral-200 p-0 px-1 text-sm text-neutral-700 disabled:text-neutral-400\", disabled: selectedColumn.isUsingDefaultStyling, onClick: () => selectedColumn.useDefaultStyling(), children: \"Use Default Styling\" })] })] })] }))] }) })] }));\n});\n//# sourceMappingURL=DataCubeEditorColumnPropertiesPanel.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 { DataCubeEditorTab } from '../../../stores/dataCube/editor/DataCubeEditorState.js';\nimport { useREPLStore } from '../../REPLStoreProvider.js';\nimport { DataCubeEditorSortsPanel } from './DataCubeEditorSortsPanel.js';\nimport { DataCubeEditorGeneralPropertiesPanel } from './DataCubeEditorGeneralPropertiesPanel.js';\nimport { DataCubeEditorColumnsPanel } from './DataCubeEditorColumnsPanel.js';\nimport { DataCubeEditorVerticalPivotsPanel } from './DataCubeEditorVerticalPivotsPanel.js';\nimport { DataCubeEditorHorizontalPivotsPanel } from './DataCubeEditorHorizontalPivotsPanel.js';\nimport { DataCubeEditorFilterPanel } from './DataCubeEditorFilterPanel.js';\nimport { DataCubeEditorExtendedColumnsPanel } from './DataCubeEditorExtendedColumnsPanel.js';\nimport { DataCubeEditorCodePanel } from './DataCubeEditorCodePanel.js';\nimport { DataCubeEditorColumnPropertiesPanel } from './DataCubeEditorColumnPropertiesPanel.js';\nimport { cn } from '@finos/legend-art';\nexport const DataCubeEditor = observer(() => {\n const repl = useREPLStore();\n const editor = repl.dataCube.editor;\n const selectedTab = editor.currentTab;\n const tabs = [\n DataCubeEditorTab.GENERAL_PROPERTIES,\n DataCubeEditorTab.COLUMN_PROPERTIES,\n DataCubeEditorTab.FILTER,\n DataCubeEditorTab.EXTENDED_COLUMNS,\n DataCubeEditorTab.COLUMNS,\n DataCubeEditorTab.VERTICAL_PIVOTS,\n DataCubeEditorTab.HORIZONTAL_PIVOTS,\n DataCubeEditorTab.SORTS,\n DataCubeEditorTab.CODE,\n ];\n return (_jsxs(_Fragment, { children: [_jsxs(\"div\", { className: \"relative h-[calc(100%_-_40px)] w-full px-2 pt-8\", children: [_jsx(\"div\", { className: \"absolute top-0 flex h-9 w-[calc(100%_-_16px)] min-w-[400px] overflow-auto pt-2\", children: tabs.map((tab) => (_jsx(\"button\", { onClick: () => editor.setCurrentTab(tab), className: cn('relative flex h-6 items-center justify-center whitespace-nowrap border border-b-0 border-l-0 border-neutral-300 px-2 first:border-l focus:z-10', {\n '-top-0.5 h-[27px] border-b-0 bg-white': tab === selectedTab,\n }), children: tab }, tab))) }), _jsxs(\"div\", { className: \"h-full w-full overflow-auto border border-neutral-300 bg-white\", children: [selectedTab === DataCubeEditorTab.GENERAL_PROPERTIES && (_jsx(DataCubeEditorGeneralPropertiesPanel, {})), selectedTab === DataCubeEditorTab.COLUMN_PROPERTIES && (_jsx(DataCubeEditorColumnPropertiesPanel, {})), selectedTab === DataCubeEditorTab.FILTER && (_jsx(DataCubeEditorFilterPanel, {})), selectedTab === DataCubeEditorTab.EXTENDED_COLUMNS && (_jsx(DataCubeEditorExtendedColumnsPanel, {})), selectedTab === DataCubeEditorTab.COLUMNS && (_jsx(DataCubeEditorColumnsPanel, {})), selectedTab === DataCubeEditorTab.SORTS && (_jsx(DataCubeEditorSortsPanel, {})), selectedTab === DataCubeEditorTab.VERTICAL_PIVOTS && (_jsx(DataCubeEditorVerticalPivotsPanel, {})), selectedTab === DataCubeEditorTab.HORIZONTAL_PIVOTS && (_jsx(DataCubeEditorHorizontalPivotsPanel, {})), selectedTab === DataCubeEditorTab.CODE && (_jsx(DataCubeEditorCodePanel, {}))] })] }), _jsxs(\"div\", { className: \"flex h-10 items-center justify-end px-2\", children: [_jsx(\"button\", { className: \"h-6 w-20 border border-neutral-400 bg-neutral-300 px-2 hover:brightness-95\", onClick: () => {\n editor.applyChanges();\n editor.display.close();\n }, children: \"OK\" }), _jsx(\"button\", { className: \"ml-2 h-6 w-20 border border-neutral-400 bg-neutral-300 px-2 hover:brightness-95\", onClick: () => editor.display.close(), children: \"Cancel\" }), _jsx(\"button\", { className: \"ml-2 h-6 w-20 border border-neutral-400 bg-neutral-300 px-2 hover:brightness-95\", onClick: () => editor.applyChanges(), children: \"Apply\" })] })] }));\n});\n//# sourceMappingURL=DataCubeEditor.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 { action, makeObservable, observable } from 'mobx';\nimport { DataCubeEditorSortsPanelState } from './DataCubeEditorSortsPanelState.js';\nimport { DataCubeEditorCodePanelState } from './DataCubeEditorCodePanelState.js';\nimport { DataCubeQuerySnapshotSubscriber } from '../core/DataCubeQuerySnapshotSubscriber.js';\nimport {} from '../core/DataCubeQuerySnapshot.js';\nimport { guaranteeNonNullable } from '@finos/legend-shared';\nimport { DataCubeEditorGeneralPropertiesPanelState } from './DataCubeEditorGeneralPropertiesPanelState.js';\nimport { DataCubeEditorColumnPropertiesPanelState } from './DataCubeEditorColumnPropertiesPanelState.js';\nimport { DataCubeEditorColumnsPanelState } from './DataCubeEditorColumnsPanelState.js';\nimport { DataCubeConfiguration } from '../core/DataCubeConfiguration.js';\nimport { DataCubeEditorVerticalPivotsPanelState } from './DataCubeEditorVerticalPivotsPanelState.js';\nimport { SingletonModeDisplayState } from '../../LayoutManagerState.js';\nimport { DataCubeEditor } from '../../../components/dataCube/editor/DataCubeEditor.js';\nexport var DataCubeEditorTab;\n(function (DataCubeEditorTab) {\n DataCubeEditorTab[\"GENERAL_PROPERTIES\"] = \"General Properties\";\n DataCubeEditorTab[\"COLUMN_PROPERTIES\"] = \"Column Properties\";\n DataCubeEditorTab[\"FILTER\"] = \"Filter\";\n DataCubeEditorTab[\"EXTENDED_COLUMNS\"] = \"Extended Columns\";\n DataCubeEditorTab[\"COLUMNS\"] = \"Columns\";\n DataCubeEditorTab[\"VERTICAL_PIVOTS\"] = \"Vertical Pivots\";\n DataCubeEditorTab[\"HORIZONTAL_PIVOTS\"] = \"Horizontal Pivots\";\n DataCubeEditorTab[\"SORTS\"] = \"Sorts\";\n DataCubeEditorTab[\"CODE\"] = \"Code\";\n})(DataCubeEditorTab || (DataCubeEditorTab = {}));\nexport class DataCubeEditorState extends DataCubeQuerySnapshotSubscriber {\n display;\n generalProperties;\n columnProperties;\n columns;\n verticalPivots;\n sorts;\n code;\n currentTab = DataCubeEditorTab.GENERAL_PROPERTIES;\n constructor(dataCube) {\n super(dataCube);\n makeObservable(this, {\n applyChanges: action,\n currentTab: observable,\n setCurrentTab: action,\n });\n this.display = new SingletonModeDisplayState(this.dataCube.repl.layout, 'Properties', () => _jsx(DataCubeEditor, {}));\n this.generalProperties = new DataCubeEditorGeneralPropertiesPanelState(this);\n this.columnProperties = new DataCubeEditorColumnPropertiesPanelState(this);\n this.columns = new DataCubeEditorColumnsPanelState(this);\n this.verticalPivots = new DataCubeEditorVerticalPivotsPanelState(this);\n this.sorts = new DataCubeEditorSortsPanelState(this);\n this.code = new DataCubeEditorCodePanelState(this);\n }\n setCurrentTab(val) {\n this.currentTab = val;\n }\n applyChanges() {\n const baseSnapshot = guaranteeNonNullable(this.getLatestSnapshot());\n const snapshot = baseSnapshot.clone();\n // NOTE: column selection must be processed first so necassary\n // prunings can be done to make sure other panel stats are in sync\n // with the current column selection\n this.columns.buildSnapshot(snapshot, baseSnapshot);\n this.verticalPivots.buildSnapshot(snapshot, baseSnapshot);\n this.sorts.buildSnapshot(snapshot, baseSnapshot);\n // grid configuration must be processed before processing columns' configuration\n // to properly generate the container configuration\n this.generalProperties.buildSnapshot(snapshot, baseSnapshot);\n this.columnProperties.buildSnapshot(snapshot, baseSnapshot);\n snapshot.finalize();\n if (snapshot.hashCode !== baseSnapshot.hashCode) {\n this.publishSnapshot(snapshot);\n }\n }\n async applySnapshot(snapshot, previousSnapshot) {\n const configuration = DataCubeConfiguration.serialization.fromJson(snapshot.data.configuration);\n this.columns.applySnaphot(snapshot, configuration);\n this.verticalPivots.applySnaphot(snapshot, configuration);\n this.sorts.applySnaphot(snapshot, configuration);\n this.generalProperties.applySnaphot(snapshot, configuration);\n this.columnProperties.applySnaphot(snapshot, configuration);\n }\n async initialize() {\n // do nothing\n }\n}\n//# sourceMappingURL=DataCubeEditorState.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF 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, isString, uuid } from '@finos/legend-shared';\n// Core\nexport var BuilderType;\n(function (BuilderType) {\n BuilderType[\"CLASS_BUILDER\"] = \"classBuilder\";\n BuilderType[\"TDS_BUILDER\"] = \"tdsBuilder\";\n BuilderType[\"JSON_BUILDER\"] = \"json\";\n})(BuilderType || (BuilderType = {}));\nexport var ExecutionActivityType;\n(function (ExecutionActivityType) {\n ExecutionActivityType[\"RELATIONAL\"] = \"relational\";\n ExecutionActivityType[\"RELATIONAL_EXECUTION_ACTIVITY\"] = \"RelationalExecutionActivity\";\n ExecutionActivityType[\"AGGREGATION_AWARE_ACTIVITY\"] = \"aggregationAware\";\n})(ExecutionActivityType || (ExecutionActivityType = {}));\n// TODO: Refactor to use external format (https://github.com/finos/legend-studio/issues/732)\nexport var EXECUTION_SERIALIZATION_FORMAT;\n(function (EXECUTION_SERIALIZATION_FORMAT) {\n EXECUTION_SERIALIZATION_FORMAT[\"CSV\"] = \"CSV\";\n})(EXECUTION_SERIALIZATION_FORMAT || (EXECUTION_SERIALIZATION_FORMAT = {}));\nexport class ResultBuilder {\n _type;\n constructor(type) {\n this._type = type;\n }\n}\n// ------------------------------------------ Execution Activities -----------------------------------------------\nexport class ExecutionActivities {\n}\nexport class RelationalExecutionActivities extends ExecutionActivities {\n sql;\n comment;\n constructor(sql) {\n super();\n this.sql = sql;\n }\n}\nexport class AggregationAwareActivities extends ExecutionActivities {\n rewrittenQuery;\n}\nexport class UnknownExecutionActivities extends ExecutionActivities {\n values;\n constructor(content) {\n super();\n this.values = content;\n }\n}\nexport class ExecutionResult {\n builder;\n activities;\n}\n// ------------------------------------------ Model -----------------------------------------------\nexport class JsonBuilder {\n _type = BuilderType.JSON_BUILDER;\n}\nexport class JsonExecutionResult extends ExecutionResult {\n values;\n}\nexport class RawExecutionResult extends ExecutionResult {\n value;\n constructor(content) {\n super();\n this.value = content;\n }\n}\n// ------------------------------------------ TDS -----------------------------------------------\n/**\n * TODO?: maybe we converge to use TDSColumn\n *\n * Since here, we're building out the result builder config, we don't need\n * to fully resolve all the references, hence we have this simplified version of TDSColumn\n */\nexport class INTERNAL__TDSColumn {\n name;\n type;\n relationalType;\n doc;\n}\nexport class TDSBuilder extends ResultBuilder {\n columns = [];\n constructor() {\n super(BuilderType.TDS_BUILDER);\n }\n}\nexport class TDSRow {\n values = [];\n}\nexport class TabularDataSet {\n columns = [];\n rows = [];\n}\nexport class TDSExecutionResult extends ExecutionResult {\n _UUID = uuid();\n builder = new TDSBuilder();\n result = new TabularDataSet();\n}\nexport class ClassBuilder extends ResultBuilder {\n _type = BuilderType.CLASS_BUILDER;\n}\nexport class ClassExecutionResult extends ExecutionResult {\n builder = new ClassBuilder(BuilderType.CLASS_BUILDER);\n objects;\n}\nexport const getTDSRowRankByColumnInAsc = (a, b, colIndex) => {\n const a1 = a.values[colIndex];\n const b1 = b.values[colIndex];\n if (a1 === null || a1 === undefined) {\n return -1;\n }\n if (b1 === null || b1 === undefined) {\n return 1;\n }\n if (isString(a1) && isString(b1)) {\n return a1.localeCompare(b1);\n }\n else {\n return Number(guaranteeNonNullable(a1)) - Number(guaranteeNonNullable(b1));\n }\n};\n//# sourceMappingURL=ExecutionResult.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF 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 '@finos/legend-application';\nimport { IllegalStateError, LogEvent, assertErrorThrown, guaranteeNonNullable, } from '@finos/legend-shared';\n// TODO: set a stack depth when we implement undo/redo\n// const DATA_CUBE_MAX_SNAPSHOT_COUNT = 100;\nexport class DataCubeQuerySnapshotManager {\n dataCube;\n subscribers = [];\n snapshots = [];\n _initialSnapshot;\n _initialQuery;\n constructor(dataCube) {\n this.dataCube = dataCube;\n }\n get currentSnapshot() {\n return guaranteeNonNullable(this.snapshots[this.snapshots.length - 1]);\n }\n registerSubscriber(subscriber) {\n this.subscribers.push(subscriber);\n }\n initialize(initialSnapshot, initialQuery) {\n if (this._initialSnapshot || this._initialQuery) {\n throw new IllegalStateError(`Snapshot manager has already been initialized`);\n }\n this._initialSnapshot = initialSnapshot;\n this._initialQuery = initialQuery;\n }\n get initialSnapshot() {\n return guaranteeNonNullable(this._initialSnapshot, `Snapshot manager has not been initialized`);\n }\n get initialQuery() {\n return guaranteeNonNullable(this._initialQuery, `Snapshot manager has not been initialized`);\n }\n broadcastSnapshot(snapshot) {\n if (!snapshot.isFinalized()) {\n this.dataCube.application.logService.error(LogEvent.create(APPLICATION_EVENT.ILLEGAL_APPLICATION_STATE_OCCURRED), `Snapshot must be finalized before broadcasting`);\n return;\n }\n this.snapshots.push(snapshot);\n this.subscribers.forEach((subscriber) => {\n const currentSnapshot = subscriber.getLatestSnapshot();\n if (currentSnapshot?.uuid !== snapshot.uuid) {\n subscriber.receiveSnapshot(snapshot).catch((error) => {\n assertErrorThrown(error);\n this.dataCube.application.logService.error(LogEvent.create(APPLICATION_EVENT.ILLEGAL_APPLICATION_STATE_OCCURRED), `Error occured while subscribers receiving and applying new snapshot should be handled gracefully`, error);\n });\n }\n });\n }\n}\n//# sourceMappingURL=DataCubeQuerySnapshotManager.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF 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 { DataCubeQuerySnapshotSubscriber } from './DataCubeQuerySnapshotSubscriber.js';\nimport { formatDate } from '@finos/legend-shared';\nimport { DEFAULT_REPORT_NAME } from './DataCubeQueryEngine.js';\nexport class DataCubeCoreState extends DataCubeQuerySnapshotSubscriber {\n baseQuery;\n name = DEFAULT_REPORT_NAME;\n startTime;\n constructor(dataCube) {\n super(dataCube);\n makeObservable(this, {\n name: observable,\n setName: action,\n });\n }\n setName(val) {\n this.name = val;\n }\n async applySnapshot(snapshot, previousSnapshot) {\n const data = snapshot.data;\n this.setName(data.name);\n if (!this.startTime) {\n this.startTime = snapshot.timestamp;\n }\n this.application.layoutService.setWindowTitle(`\\u229E ${data.name}${this.startTime ? ` - ${formatDate(new Date(this.startTime), 'HH:mm:ss EEE MMM dd yyyy')}` : ''}`);\n }\n async initialize() {\n // do nothing\n }\n}\n//# sourceMappingURL=DataCubeCoreState.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { DataCubeGridState } from './grid/DataCubeGridState.js';\nimport { DataCubeEditorState } from './editor/DataCubeEditorState.js';\nimport { assertErrorThrown, uuid } from '@finos/legend-shared';\nimport { DataCubeQuerySnapshotManager } from './core/DataCubeQuerySnapshotManager.js';\nimport { DataCubeCoreState } from './core/DataCubeCoreState.js';\nimport { validateAndBuildQuerySnapshot } from './core/DataCubeQuerySnapshotBuilder.js';\nimport { action, makeObservable, observable } from 'mobx';\nimport { ActionAlertType } from '@finos/legend-application';\nexport class DataCubeTask {\n uuid = uuid();\n name;\n startTime = Date.now();\n endTime;\n constructor(name) {\n this.name = name;\n }\n end() {\n this.endTime = Date.now();\n }\n}\nexport class DataCubeState {\n repl;\n application;\n engine;\n snapshotManager;\n core;\n grid;\n editor;\n runningTasks = new Map();\n constructor(repl) {\n makeObservable(this, {\n runningTasks: observable,\n newTask: action,\n endTask: action,\n });\n this.repl = repl;\n this.application = repl.application;\n this.engine = repl.dataCubeEngine;\n // NOTE: snapshot manager must be instantiated before subscribers\n this.snapshotManager = new DataCubeQuerySnapshotManager(this);\n this.core = new DataCubeCoreState(this);\n this.editor = new DataCubeEditorState(this);\n this.grid = new DataCubeGridState(this);\n }\n newTask(name) {\n const task = new DataCubeTask(name);\n this.runningTasks.set(task.uuid, task);\n return task;\n }\n endTask(task) {\n task.end();\n this.runningTasks.delete(task.uuid);\n return task;\n }\n async initialize() {\n const task = this.newTask('Initializing');\n try {\n await Promise.all([this.core, this.editor, this.grid, this.grid.controller].map(async (state) => {\n this.snapshotManager.registerSubscriber(state);\n await state.initialize();\n }));\n const result = await this.engine.getBaseQuery();\n const initialSnapshot = validateAndBuildQuerySnapshot(result.partialQuery, result.sourceQuery, result.query);\n initialSnapshot.timestamp = result.timestamp;\n this.snapshotManager.broadcastSnapshot(initialSnapshot);\n }\n catch (error) {\n assertErrorThrown(error);\n this.repl.application.alertService.setActionAlertInfo({\n message: `Initialization failure: ${error.message}`,\n prompt: `Resolve the issue and reload the application.`,\n type: ActionAlertType.ERROR,\n actions: [],\n });\n }\n finally {\n this.endTask(task);\n }\n }\n}\n//# sourceMappingURL=DataCubeState.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { createModelSchema, custom, list, optional, primitive, raw, SKIP, } from 'serializr';\nimport { SerializationFactory, usingModelSchema, } from '@finos/legend-shared';\nimport { ExecutionActivityType } from '../../../../../../graph-manager/action/execution/ExecutionResult.js';\nexport const V1_EXECUTION_RESULT = 'executionResult';\nexport const V1_ZIPKIN_TRACE_HEADER = 'x-b3-traceid';\nexport class V1_ResultBuilder {\n static builderSerialization = new SerializationFactory(createModelSchema(V1_ResultBuilder, {\n _type: primitive(),\n }));\n}\nexport class V1_ExecutionActivities {\n}\nexport class V1_RelationalExecutionActivities extends V1_ExecutionActivities {\n sql;\n comment;\n static serialization = new SerializationFactory(createModelSchema(V1_RelationalExecutionActivities, {\n sql: primitive(),\n comment: optional(primitive()),\n }));\n}\nexport class V1_AggregationAwareActivities extends V1_ExecutionActivities {\n rewrittenQuery;\n static serialization = new SerializationFactory(createModelSchema(V1_AggregationAwareActivities, {\n rewrittenQuery: primitive(),\n }));\n}\nexport class V1_ExecutionResult {\n builder;\n activities;\n}\nexport class V1_UnknownExecutionActivity extends V1_ExecutionActivities {\n content;\n constructor(content) {\n super();\n this.content = content;\n }\n}\nexport class V1_JsonExecutionResult extends V1_ExecutionResult {\n values;\n static serialization = new SerializationFactory(createModelSchema(V1_JsonExecutionResult, {\n _type: primitive(),\n builder: usingModelSchema(V1_ResultBuilder.builderSerialization.schema),\n values: raw(),\n }));\n}\n/**\n * TODO?: maybe we converge to use V1_TDSColumn\n *\n * Since here, we're building out the result builder config, we don't need\n * to fully resolve all the references, hence we have this simplified version of V1_TDSColumn\n */\nexport class V1_INTERNAL__TDSColumn {\n name;\n doc;\n type;\n relationalType;\n static serialization = new SerializationFactory(createModelSchema(V1_INTERNAL__TDSColumn, {\n name: primitive(),\n doc: optional(primitive()),\n type: optional(primitive()),\n relationalType: optional(primitive()),\n }));\n}\nexport class V1_TDSBuilder extends V1_ResultBuilder {\n columns = [];\n static serialization = new SerializationFactory(createModelSchema(V1_TDSBuilder, {\n _type: primitive(),\n columns: list(usingModelSchema(V1_INTERNAL__TDSColumn.serialization.schema)),\n }));\n}\nfunction V1_serializeExecutionActivities(value) {\n switch (value._type) {\n case ExecutionActivityType.RELATIONAL:\n return V1_RelationalExecutionActivities.serialization.fromJson(value);\n case ExecutionActivityType.RELATIONAL_EXECUTION_ACTIVITY:\n return V1_RelationalExecutionActivities.serialization.fromJson(value);\n case ExecutionActivityType.AGGREGATION_AWARE_ACTIVITY:\n return V1_AggregationAwareActivities.serialization.fromJson(value);\n default:\n return new V1_UnknownExecutionActivity(value);\n }\n}\nexport class V1_TDSExecutionResult extends V1_ExecutionResult {\n result;\n static serialization = new SerializationFactory(createModelSchema(V1_TDSExecutionResult, {\n builder: usingModelSchema(V1_TDSBuilder.serialization.schema),\n activities: list(custom(() => SKIP, V1_serializeExecutionActivities)),\n result: raw(),\n }));\n}\nexport class V1_ClassExecutionResult extends V1_ExecutionResult {\n objects;\n static serialization = new SerializationFactory(createModelSchema(V1_ClassExecutionResult, {\n builder: usingModelSchema(V1_ResultBuilder.builderSerialization.schema),\n activities: list(custom(() => SKIP, V1_serializeExecutionActivities)),\n objects: raw(),\n }));\n}\nexport class V1_RawExecutionResult extends V1_ExecutionResult {\n value;\n constructor(value) {\n super();\n this.value = value;\n }\n}\n//# sourceMappingURL=V1_ExecutionResult.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF 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_ExecutionResult } from './V1_ExecutionResult.js';\nexport class V1_INTERNAL__UnknownExecutionResult extends V1_ExecutionResult {\n content;\n}\n//# sourceMappingURL=V1_INTERNAL__UnknownExecutionResult.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { ExecutionResult } from './ExecutionResult.js';\nexport class INTERNAL__UnknownExecutionResult extends ExecutionResult {\n content;\n}\n//# sourceMappingURL=INTERNAL__UnknownExecutionResult.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF 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, UnsupportedOperationError, isString, isNumber, isBoolean, } from '@finos/legend-shared';\nimport { TDSRow, ClassExecutionResult, JsonExecutionResult, TDSExecutionResult, TDSBuilder, INTERNAL__TDSColumn, RawExecutionResult, RelationalExecutionActivities, UnknownExecutionActivities, AggregationAwareActivities, BuilderType, } from '../../../../../../graph-manager/action/execution/ExecutionResult.js';\nimport { V1_ClassExecutionResult, V1_JsonExecutionResult, V1_TDSExecutionResult, V1_RawExecutionResult, V1_RelationalExecutionActivities, V1_UnknownExecutionActivity, V1_AggregationAwareActivities, } from './V1_ExecutionResult.js';\nimport { V1_INTERNAL__UnknownExecutionResult } from './V1_INTERNAL__UnknownExecutionResult.js';\nimport { INTERNAL__UnknownExecutionResult } from '../../../../../action/execution/INTERNAL__UnknownExecutionResult.js';\nconst buildExecutionActivities = (protocol) => {\n if (protocol instanceof V1_RelationalExecutionActivities) {\n const metamodel = new RelationalExecutionActivities(protocol.sql);\n metamodel.comment = protocol.comment;\n return metamodel;\n }\n else if (protocol instanceof V1_AggregationAwareActivities) {\n const metamodel = new AggregationAwareActivities();\n metamodel.rewrittenQuery = guaranteeNonNullable(protocol.rewrittenQuery, `Aggregation aware execution activities 'rewritenQuery' field is missing`);\n return metamodel;\n }\n else if (protocol instanceof V1_UnknownExecutionActivity) {\n const metamodel = new UnknownExecutionActivities(protocol);\n return metamodel;\n }\n throw new UnsupportedOperationError(`Can't build execution activities`, protocol);\n};\nconst buildJSONExecutionResult = (protocol) => {\n const metamodel = new JsonExecutionResult();\n metamodel.values = guaranteeNonNullable(protocol.values, `JSON execution result 'values' field is missing`);\n return metamodel;\n};\nconst INTERNAL__buildTDSColumn = (protocol) => {\n const metamodel = new INTERNAL__TDSColumn();\n metamodel.name = guaranteeNonNullable(protocol.name, `TDS column 'name' field is missing`);\n metamodel.type = protocol.type;\n metamodel.doc = protocol.doc;\n metamodel.relationalType = protocol.relationalType;\n return metamodel;\n};\nconst buildTDSBuilder = (protocol) => {\n const builder = new TDSBuilder();\n builder.columns = protocol.columns.map(INTERNAL__buildTDSColumn);\n return builder;\n};\nconst buildTDSExecutionResult = (protocol) => {\n const metamodel = new TDSExecutionResult();\n metamodel.builder = buildTDSBuilder(guaranteeNonNullable(protocol.builder, `TDS execution result 'builder' field is missing`));\n metamodel.activities = protocol.activities?.map(buildExecutionActivities);\n metamodel.result.columns = protocol.result.columns;\n metamodel.result.rows = protocol.result.rows.map((_row) => {\n const row = new TDSRow();\n row.values = _row.values;\n return row;\n });\n return metamodel;\n};\nconst buildClassExecutionResult = (protocol) => {\n const metamodel = new ClassExecutionResult();\n metamodel.objects = guaranteeNonNullable(protocol.objects, `Class execution result 'objects' field is missing`);\n metamodel.activities = protocol.activities?.map(buildExecutionActivities);\n return metamodel;\n};\nexport const V1_buildExecutionResult = (protocol) => {\n if (protocol instanceof V1_INTERNAL__UnknownExecutionResult) {\n const metamodel = new INTERNAL__UnknownExecutionResult();\n metamodel.content = protocol.content;\n return metamodel;\n }\n else if (protocol instanceof V1_ClassExecutionResult) {\n return buildClassExecutionResult(protocol);\n }\n else if (protocol instanceof V1_TDSExecutionResult) {\n return buildTDSExecutionResult(protocol);\n }\n else if (protocol instanceof V1_JsonExecutionResult) {\n return buildJSONExecutionResult(protocol);\n }\n else if (protocol instanceof V1_RawExecutionResult) {\n return new RawExecutionResult(protocol.value);\n }\n throw new UnsupportedOperationError(`Can't build execution result`, protocol);\n};\nexport const V1_serializeExecutionResult = (json) => {\n if (json === null || isString(json) || isNumber(json) || isBoolean(json)) {\n return new V1_RawExecutionResult(json);\n }\n switch (json.builder?._type) {\n case BuilderType.CLASS_BUILDER:\n return V1_ClassExecutionResult.serialization.fromJson(json);\n case BuilderType.TDS_BUILDER:\n return V1_TDSExecutionResult.serialization.fromJson(json);\n case BuilderType.JSON_BUILDER:\n return V1_JsonExecutionResult.serialization.fromJson(json);\n default: {\n // Fall back to create unknown stub if not supported\n const protocol = new V1_INTERNAL__UnknownExecutionResult();\n protocol.content = json;\n return protocol;\n }\n }\n};\n//# sourceMappingURL=V1_ExecutionHelper.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF 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, UnsupportedOperationError, usingConstantValueSchema, usingModelSchema, } from '@finos/legend-shared';\nimport { createModelSchema, custom, deserialize, list, primitive, raw, serialize, } from 'serializr';\nexport class DataCubeQuerySource {\n columns = [];\n query;\n runtime;\n}\nexport class DataCubeQueryColumn {\n name;\n type;\n static serialization = new SerializationFactory(createModelSchema(DataCubeQueryColumn, {\n name: primitive(),\n type: primitive(),\n }));\n}\nvar DataCubeQuerySourceType;\n(function (DataCubeQuerySourceType) {\n DataCubeQuerySourceType[\"REPL_EXECUTED_QUERY\"] = \"REPLExecutedQuery\";\n})(DataCubeQuerySourceType || (DataCubeQuerySourceType = {}));\nexport class DataCubeQuerySourceREPLExecutedQuery extends DataCubeQuerySource {\n static serialization = new SerializationFactory(createModelSchema(DataCubeQuerySourceREPLExecutedQuery, {\n _type: usingConstantValueSchema(DataCubeQuerySourceType.REPL_EXECUTED_QUERY),\n columns: list(usingModelSchema(DataCubeQueryColumn.serialization.schema)),\n query: primitive(),\n runtime: primitive(),\n }));\n}\nfunction deserializeQuerySource(json) {\n switch (json._type) {\n case DataCubeQuerySourceType.REPL_EXECUTED_QUERY:\n return deserialize(DataCubeQuerySourceREPLExecutedQuery.serialization.schema, json);\n default:\n throw new UnsupportedOperationError(`Can't deserialize data cube query source of type '${json._type}'`);\n }\n}\nfunction serializeQuerySource(object) {\n if (object instanceof DataCubeQuerySourceREPLExecutedQuery) {\n return serialize(DataCubeQuerySourceREPLExecutedQuery.serialization.schema, object);\n }\n throw new UnsupportedOperationError(`Can't serialize data cube query source`, object);\n}\nexport class DataCubeQuery {\n name;\n query;\n partialQuery;\n source;\n configuration;\n constructor(name, query, configuration) {\n this.name = name;\n this.query = query;\n this.configuration = configuration;\n }\n static serialization = new SerializationFactory(createModelSchema(DataCubeQuery, {\n configuration: raw(), // TODO: @akphi - populate this once we know the shape better\n name: primitive(),\n partialQuery: primitive(),\n query: primitive(),\n source: custom(serializeQuerySource, deserializeQuerySource),\n }));\n}\n//# sourceMappingURL=DataCubeQuery.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF 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, optional, primitive } from 'serializr';\nimport { SerializationFactory, usingModelSchema } from '@finos/legend-shared';\nimport { V1_deserializeValueSpecification, V1_serializeValueSpecification, V1_lambdaModelSchema, } from '@finos/legend-graph';\nimport { DataCubeQuery } from './DataCubeQuery.js';\nexport class DataCubeInfrastructureInfo {\n gridClientLicense;\n static serialization = new SerializationFactory(createModelSchema(DataCubeInfrastructureInfo, {\n gridClientLicense: optional(primitive()),\n }));\n}\nexport class DataCubeGetQueryCodeInput {\n query; // TODO: @akphi - consider if we should update this to use Lambda instead\n pretty;\n static serialization = new SerializationFactory(createModelSchema(DataCubeGetQueryCodeInput, {\n pretty: optional(primitive()),\n query: custom((val) => V1_serializeValueSpecification(val, []), (val) => V1_deserializeValueSpecification(val, [])),\n }));\n}\nexport class DataCubeGetQueryRelationReturnTypeInput {\n query;\n static serialization = new SerializationFactory(createModelSchema(DataCubeGetQueryRelationReturnTypeInput, {\n query: usingModelSchema(V1_lambdaModelSchema([])),\n }));\n}\nexport class DataCubeExecutionInput {\n query;\n debug;\n static serialization = new SerializationFactory(createModelSchema(DataCubeExecutionInput, {\n debug: optional(primitive()),\n query: usingModelSchema(V1_lambdaModelSchema([])),\n }));\n}\nexport class DataCubeGetBaseQueryResult {\n query;\n timestamp;\n partialQuery;\n sourceQuery;\n static serialization = new SerializationFactory(createModelSchema(DataCubeGetBaseQueryResult, {\n partialQuery: custom((val) => V1_serializeValueSpecification(val, []), (val) => V1_deserializeValueSpecification(val, [])),\n query: usingModelSchema(DataCubeQuery.serialization.schema),\n sourceQuery: custom((val) => V1_serializeValueSpecification(val, []), (val) => V1_deserializeValueSpecification(val, [])),\n timestamp: primitive(),\n }));\n}\n//# sourceMappingURL=REPLEngine.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF 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_deserializeValueSpecification, V1_serializeValueSpecification, TDSExecutionResult, V1_serializeExecutionResult, V1_buildExecutionResult, } from '@finos/legend-graph';\nimport { DataCubeGetBaseQueryResult, } from '../../server/REPLEngine.js';\nimport { guaranteeType } from '@finos/legend-shared';\nimport { action, makeObservable, observable } from 'mobx';\nexport const DEFAULT_ENABLE_DEBUG_MODE = false;\nexport const DEFAULT_GRID_CLIENT_ROW_BUFFER = 50;\nexport const DEFAULT_GRID_CLIENT_PURGE_CLOSED_ROW_NODES = false;\nexport const DEFAULT_DISABLE_LARGE_DATASET_WARNING = false;\nexport class DataCubeEngine {\n repl;\n application;\n client;\n enableDebugMode = DEFAULT_ENABLE_DEBUG_MODE;\n gridClientRowBuffer = DEFAULT_GRID_CLIENT_ROW_BUFFER;\n gridClientPurgeClosedRowNodes = DEFAULT_GRID_CLIENT_PURGE_CLOSED_ROW_NODES;\n disableLargeDatasetWarning = DEFAULT_DISABLE_LARGE_DATASET_WARNING;\n constructor(repl) {\n makeObservable(this, {\n enableDebugMode: observable,\n setEnableDebugMode: action,\n gridClientRowBuffer: observable,\n setGridClientRowBuffer: action,\n gridClientPurgeClosedRowNodes: observable,\n setGridClientPurgeClosedRowNodes: action,\n disableLargeDatasetWarning: observable,\n setDisableLargeDatasetWarning: action,\n });\n this.repl = repl;\n this.application = repl.application;\n this.client = repl.client;\n }\n setEnableDebugMode(enableDebugMode) {\n this.enableDebugMode = enableDebugMode;\n }\n setGridClientRowBuffer(rowBuffer) {\n this.gridClientRowBuffer = rowBuffer;\n this.propagateGridOptionUpdates();\n }\n setGridClientPurgeClosedRowNodes(purgeClosedRowNodes) {\n this.gridClientPurgeClosedRowNodes = purgeClosedRowNodes;\n this.propagateGridOptionUpdates();\n }\n setDisableLargeDatasetWarning(disableLargeDatasetWarning) {\n this.disableLargeDatasetWarning = disableLargeDatasetWarning;\n }\n refreshFailedDataFetches() {\n // TODO: When we support multi-view (i.e. multiple instances of DataCubes) we would need\n // to traverse through and update the configurations of all of their grid clients\n this.repl.dataCube.grid.client.retryServerSideLoads();\n }\n propagateGridOptionUpdates() {\n // TODO: When we support multi-view (i.e. multiple instances of DataCubes) we would need\n // to traverse through and update the configurations of all of their grid clients\n this.repl.dataCube.grid.client.updateGridOptions({\n rowBuffer: this.gridClientRowBuffer,\n purgeClosedRowNodes: this.gridClientPurgeClosedRowNodes,\n });\n }\n async getInfrastructureInfo() {\n return this.client.getInfrastructureInfo();\n }\n async getQueryTypeahead(code, isPartial) {\n return (await this.client.getQueryTypeahead({\n code,\n isPartial,\n }));\n }\n async parseQuery(code, returnSourceInformation) {\n return V1_deserializeValueSpecification(await this.client.parseQuery({ code, returnSourceInformation }), []);\n }\n async getBaseQuery() {\n return DataCubeGetBaseQueryResult.serialization.fromJson(await this.client.getBaseQuery());\n }\n async executeQuery(query) {\n const result = await this.client.executeQuery({\n query: V1_serializeValueSpecification(query, []),\n debug: this.enableDebugMode,\n });\n return {\n result: guaranteeType(V1_buildExecutionResult(V1_serializeExecutionResult(JSON.parse(result.result))), TDSExecutionResult),\n executedQuery: result.executedQuery,\n executedSQL: result.executedSQL,\n };\n }\n}\n//# sourceMappingURL=DataCubeEngine.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { useApplicationStore } from '@finos/legend-application';\nimport { MarkdownTextViewer } from '@finos/legend-art';\nimport { isString } from '@finos/legend-shared';\nimport { observer } from 'mobx-react-lite';\nexport const DocumentationPanel = observer(() => {\n const application = useApplicationStore();\n const entry = application.assistantService.currentDocumentationEntry;\n if (!entry) {\n return null;\n }\n return (_jsxs(\"div\", { className: \"h-full w-full overflow-auto bg-white p-4\", children: [_jsx(\"div\", { className: \"mb-3 text-2xl font-bold\", children: entry.title }), entry.content &&\n (isString(entry.content) ? (_jsx(\"div\", { className: \"\", children: entry.content })) : (_jsx(MarkdownTextViewer, { value: entry.content })))] }));\n});\n//# sourceMappingURL=DocumentationPanel.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 { DataCubeIcon } from '@finos/legend-art';\nimport { useREPLStore } from '../REPLStoreProvider.js';\nimport { FormCheckbox, FormNumberInput } from './Form.js';\nimport { DEFAULT_DISABLE_LARGE_DATASET_WARNING, DEFAULT_ENABLE_DEBUG_MODE, DEFAULT_GRID_CLIENT_PURGE_CLOSED_ROW_NODES, DEFAULT_GRID_CLIENT_ROW_BUFFER, } from '../../stores/dataCube/DataCubeEngine.js';\nimport { useState } from 'react';\nexport const SettingsPanel = observer(() => {\n const repl = useREPLStore();\n const dataCubeEngine = repl.dataCubeEngine;\n // NOTE: this makes sure the changes are not applied until saved, but it generates\n // a lot of boilerplate code, consider using a more ergonomic approach when we need\n // to scale this to more settings.\n const [gridClientRowBuffer, setGridClientRowBuffer] = useState(dataCubeEngine.gridClientRowBuffer);\n const [gridClientPurgeClosedRowNodes, setGridClientPurgeClosedRowNodes] = useState(dataCubeEngine.gridClientPurgeClosedRowNodes);\n const [enableDebugMode, setEnableDebugMode] = useState(dataCubeEngine.enableDebugMode);\n const [disableLargeDatasetWarning, setDisableLargeDatasetWarning] = useState(dataCubeEngine.disableLargeDatasetWarning);\n const save = () => {\n dataCubeEngine.setGridClientRowBuffer(gridClientRowBuffer);\n dataCubeEngine.setGridClientPurgeClosedRowNodes(gridClientPurgeClosedRowNodes);\n dataCubeEngine.setEnableDebugMode(enableDebugMode);\n dataCubeEngine.setDisableLargeDatasetWarning(disableLargeDatasetWarning);\n };\n const restoreDefaults = () => {\n setGridClientRowBuffer(DEFAULT_GRID_CLIENT_ROW_BUFFER);\n setGridClientPurgeClosedRowNodes(DEFAULT_GRID_CLIENT_PURGE_CLOSED_ROW_NODES);\n setEnableDebugMode(DEFAULT_ENABLE_DEBUG_MODE);\n setDisableLargeDatasetWarning(DEFAULT_DISABLE_LARGE_DATASET_WARNING);\n save();\n };\n return (_jsxs(_Fragment, { children: [_jsx(\"div\", { className: \"h-[calc(100%_-_40px)] w-full p-2 pb-0\", children: _jsxs(\"div\", { className: \"h-full w-full select-none overflow-auto border border-neutral-300 bg-white p-2\", children: [_jsx(\"div\", { className: \"flex h-6\", children: _jsxs(\"div\", { className: \"flex h-full\", children: [_jsx(\"div\", { className: \"flex h-6 items-center text-xl font-medium\", children: _jsx(DataCubeIcon.Table, {}) }), _jsx(\"div\", { className: \"ml-1 flex h-6 items-center text-xl font-medium\", children: \"Grid\" })] }) }), _jsxs(\"div\", { className: \"mt-1.5\", children: [_jsx(\"div\", { className: \"font-medium\", children: \"Large Dataset Warning: Disabled\" }), _jsx(\"div\", { className: \"flex pr-2\", children: _jsx(FormCheckbox, { label: \"Suggests user to enable pagination when handling large datasets to improve performance.\", checked: disableLargeDatasetWarning, onChange: () => setDisableLargeDatasetWarning(!disableLargeDatasetWarning) }) })] }), _jsxs(\"div\", { className: \"my-2\", children: [_jsx(\"div\", { className: \"font-medium\", children: \"Refresh Failed Data Fetch: Action\" }), _jsx(\"div\", { className: \"mb-1.5 text-sm text-neutral-700\", children: `Manually re-run all failed data fetches in the grid.` }), _jsx(\"div\", { className: \"flex pr-2\", children: _jsx(\"button\", { className: \"ml-2 h-5 min-w-16 border border-neutral-400 bg-neutral-300 px-2 text-sm first-of-type:ml-0 hover:brightness-95\", onClick: () => dataCubeEngine.refreshFailedDataFetches(), children: \"Run Action\" }) })] }), _jsxs(\"div\", { className: \"my-2\", children: [_jsx(\"div\", { className: \"font-medium\", children: \"Refresh Group Node Data: Enabled\" }), _jsx(\"div\", { className: \"flex pr-2\", children: _jsx(FormCheckbox, { label: \"Force refresh data when group node is opened.\", checked: gridClientPurgeClosedRowNodes, onChange: () => setGridClientPurgeClosedRowNodes(!gridClientPurgeClosedRowNodes) }) })] }), _jsxs(\"div\", { className: \"my-2\", children: [_jsx(\"div\", { className: \"font-medium\", children: \"Row Buffer\" }), _jsx(\"div\", { className: \"mb-1.5 text-sm text-neutral-700\", children: `Sets the number of rows the grid renders outside of the viewable area. e.g. if the buffer is 10 and your grid is showing 50 rows (as that's all that fits on your screen without scrolling), then the grid will actually render 70 in total (10 extra above and 10 extra below). Then when you scroll, the grid will already have 10 rows ready and waiting to show, no redraw is needed. A low small buffer will make initial draws of the grid faster; whereas a big one will reduce the redraw visible vertically scrolling.` }), _jsx(\"div\", { className: \"flex pr-2\", children: _jsx(FormNumberInput, { className: \"w-16 text-sm\", min: 10, step: 10, defaultValue: DEFAULT_GRID_CLIENT_ROW_BUFFER, value: gridClientRowBuffer, setValue: (value) => {\n setGridClientRowBuffer(value ?? DEFAULT_GRID_CLIENT_ROW_BUFFER);\n } }) })] }), _jsx(\"div\", { className: \"my-2 h-[1px] w-full bg-neutral-200\" }), _jsx(\"div\", { className: \"flex h-6\", children: _jsxs(\"div\", { className: \"flex h-full\", children: [_jsx(\"div\", { className: \"flex h-6 items-center text-xl font-medium\", children: _jsx(DataCubeIcon.Debug, {}) }), _jsx(\"div\", { className: \"ml-1 flex h-6 items-center text-xl font-medium\", children: \"Debug\" })] }) }), _jsxs(\"div\", { className: \"mt-1.5\", children: [_jsx(\"div\", { className: \"font-medium\", children: \"Debug Mode: Enabled\" }), _jsx(\"div\", { className: \"flex pr-2\", children: _jsx(FormCheckbox, { label: \"Enable debug logging when running data queries, updating snapshots, etc.\", checked: enableDebugMode, onChange: () => setEnableDebugMode(!enableDebugMode) }) })] })] }) }), _jsxs(\"div\", { className: \"flex h-10 items-center justify-end px-2\", children: [_jsx(\"button\", { className: \"ml-2 h-6 w-48 border border-neutral-400 bg-neutral-300 px-2 hover:brightness-95\", onClick: restoreDefaults, children: \"Restore Default Settings\" }), _jsx(\"button\", { className: \"ml-2 h-6 w-36 border border-neutral-400 bg-neutral-300 px-2 hover:brightness-95\", onClick: save, children: \"Save Settings\" })] })] }));\n});\n//# sourceMappingURL=SettingsPanel.js.map","import { jsx as _jsx } from \"react/jsx-runtime\";\nimport { REPLServerClient } from '../server/REPLServerClient.js';\nimport { ActionState, assertErrorThrown, LogEvent, NetworkClient, } from '@finos/legend-shared';\nimport { makeObservable, observable } from 'mobx';\nimport { DataCubeState } from './dataCube/DataCubeState.js';\nimport { DataCubeEngine } from './dataCube/DataCubeEngine.js';\nimport { LicenseManager } from '@ag-grid-enterprise/core';\nimport { ActionAlertType, APPLICATION_EVENT } from '@finos/legend-application';\nimport { DEFAULT_SMALL_ALERT_WINDOW_CONFIG, LayoutConfiguration, LayoutManagerState, SingletonModeDisplayState, WindowState, } from './LayoutManagerState.js';\nimport { Alert, AlertType, } from '../components/repl/Alert.js';\nimport { DocumentationPanel } from '../components/repl/DocumentationPanel.js';\nimport { SettingsPanel } from '../components/repl/SettingsPanel.js';\nexport class REPLStore {\n application;\n client;\n layout;\n initState = ActionState.create();\n settingsDisplay;\n documentationDisplay;\n dataCubeEngine;\n // TODO: when we support multi-view, we would need to support multiple states\n dataCube;\n constructor(application) {\n makeObservable(this, {\n dataCube: observable,\n });\n this.application = application;\n this.client = new REPLServerClient(new NetworkClient({\n baseUrl: this.application.config.useDynamicREPLServer\n ? window.location.origin +\n this.application.config.baseAddress.replace('/repl/', '')\n : this.application.config.replUrl,\n }));\n this.layout = new LayoutManagerState(this.application);\n this.dataCubeEngine = new DataCubeEngine(this);\n this.dataCube = new DataCubeState(this);\n this.settingsDisplay = new SingletonModeDisplayState(this.layout, 'Settings', () => _jsx(SettingsPanel, {}));\n this.settingsDisplay.configuration.window = {\n x: -50,\n y: 50,\n width: 600,\n height: 400,\n minWidth: 300,\n minHeight: 200,\n center: false,\n };\n this.documentationDisplay = new SingletonModeDisplayState(this.layout, 'Documentation', () => _jsx(DocumentationPanel, {}));\n this.documentationDisplay.configuration.window = {\n x: -50,\n y: -50,\n width: 400,\n height: 400,\n minWidth: 300,\n minHeight: 200,\n center: false,\n };\n }\n alertError(error, options) {\n const { message, text, actions, windowTitle, windowConfig } = options;\n this.application.notificationService.notifyError(error);\n const window = new WindowState(new LayoutConfiguration(windowTitle ?? 'Error', () => (_jsx(Alert, { type: AlertType.ERROR, message: message, text: text, actions: actions }))));\n window.configuration.window =\n windowConfig ?? DEFAULT_SMALL_ALERT_WINDOW_CONFIG;\n this.layout.newWindow(window);\n }\n alert(options) {\n const { message, type, text, actions, windowTitle, windowConfig } = options;\n const window = new WindowState(new LayoutConfiguration(windowTitle ?? '', () => (_jsx(Alert, { type: type, message: message, text: text, actions: actions, onClose: () => this.layout.closeWindow(window) }))));\n window.configuration.window =\n windowConfig ?? DEFAULT_SMALL_ALERT_WINDOW_CONFIG;\n this.layout.newWindow(window);\n }\n async initialize() {\n if (!this.initState.isInInitialState) {\n // eslint-disable-next-line no-process-env\n if (process.env.NODE_ENV === 'production') {\n this.application.notificationService.notifyIllegalState('REPL store is re-initialized');\n }\n else {\n this.application.logService.debug(LogEvent.create(APPLICATION_EVENT.DEBUG), 'REPL store is re-initialized');\n }\n return;\n }\n this.initState.inProgress();\n try {\n const info = await this.dataCubeEngine.getInfrastructureInfo();\n if (info.gridClientLicense) {\n LicenseManager.setLicenseKey(info.gridClientLicense);\n }\n this.initState.pass();\n }\n catch (error) {\n assertErrorThrown(error);\n this.application.alertService.setActionAlertInfo({\n message: `Initialization failure: ${error.message}`,\n prompt: `Resolve the issue and reload the application.`,\n type: ActionAlertType.ERROR,\n actions: [],\n });\n this.initState.fail();\n }\n }\n}\n//# sourceMappingURL=REPLStore.js.map","import { Fragment as _Fragment, jsx as _jsx } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { createContext, useContext, useEffect } from 'react';\nimport { observer, useLocalObservable } from 'mobx-react-lite';\nimport { REPLStore } from '../stores/REPLStore.js';\nimport { guaranteeNonNullable } from '@finos/legend-shared';\nimport { useApplicationStore } from '@finos/legend-application';\nconst REPLStoreContext = createContext(undefined);\nexport const REPLStoreProvider = observer(({ children }) => {\n const application = useApplicationStore();\n const store = useLocalObservable(() => new REPLStore(application));\n useEffect(() => {\n store.initialize().catch(application.logUnhandledError);\n }, [store, application]);\n if (!store.initState.hasSucceeded) {\n return _jsx(_Fragment, {});\n }\n return (_jsx(REPLStoreContext.Provider, { value: store, children: children }));\n});\nexport const useREPLStore = () => guaranteeNonNullable(useContext(REPLStoreContext), `Can't find REPL store in context`);\nexport const withREPLStore = (WrappedComponent) => function WithREPLStore() {\n return (_jsx(REPLStoreProvider, { children: _jsx(WrappedComponent, {}) }));\n};\n//# sourceMappingURL=REPLStoreProvider.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 { ClientSideRowModelModule } from '@ag-grid-community/client-side-row-model';\nimport { ServerSideRowModelModule } from '@ag-grid-enterprise/server-side-row-model';\nimport { RowGroupingModule } from '@ag-grid-enterprise/row-grouping';\nimport { ClipboardModule } from '@ag-grid-enterprise/clipboard';\nimport { MenuModule } from '@ag-grid-enterprise/menu';\nimport { SideBarModule } from '@ag-grid-enterprise/side-bar';\nimport { ColumnsToolPanelModule } from '@ag-grid-enterprise/column-tool-panel';\nimport { AgGridReact } from '@ag-grid-community/react';\nimport { CsvExportModule } from '@ag-grid-community/csv-export';\nimport { ExcelExportModule } from '@ag-grid-enterprise/excel-export';\nimport { useREPLStore } from '../../REPLStoreProvider.js';\nimport { DataCubeIcon, Switch, cn, Global, css } from '@finos/legend-art';\nimport { generateBackgroundColorUtilityClassName, generateFontCaseUtilityClassName, generateFontFamilyUtilityClassName, generateFontSizeUtilityClassName, generateFontUnderlineUtilityClassName, generateTextAlignUtilityClassName, generateTextColorUtilityClassName, INTERNAL__GridClientUtilityCssClassName, } from '../../../stores/dataCube/grid/DataCubeGridClientEngine.js';\nimport { RangeSelectionModule } from '@ag-grid-enterprise/range-selection';\nimport { DataCubeFont, DataCubeFontCase, DataCubeFontFormatUnderlineVariant, DataCubeFontTextAlignment, DEFAULT_ROW_BACKGROUND_COLOR, DEFAULT_ROW_HIGHLIGHT_BACKGROUND_COLOR, } from '../../../stores/dataCube/core/DataCubeQueryEngine.js';\nimport { isNonNullable } from '@finos/legend-shared';\nimport { generateBaseGridOptions } from '../../../stores/dataCube/grid/DataCubeGridConfigurationBuilder.js';\n// NOTE: This is a workaround to prevent ag-grid license key check from flooding the console screen\n// with its stack trace in Chrome.\n// We MUST NEVER completely surpress this warning in production, else it's a violation of the ag-grid license!\n// See https://www.ag-grid.com/react-data-grid/licensing/\nconst __INTERNAL__original_console_error = console.error; // eslint-disable-line no-console\n// eslint-disable-next-line no-console\nconsole.error = (message, ...agrs) => {\n console.debug(`%c ${message}`, 'color: silver'); // eslint-disable-line no-console\n};\nfunction textColorStyle(key, configuration) {\n return `${Array.from(new Set([\n configuration[`${key}ForegroundColor`],\n ...configuration.columns\n .map((column) => column[`${key}ForegroundColor`])\n .filter(isNonNullable),\n ]).values())\n .map((color) => `.${INTERNAL__GridClientUtilityCssClassName.ROOT} .${generateTextColorUtilityClassName(color, key)}{color:${color};}`)\n .join('\\n')}`;\n}\nfunction backgroundColorStyle(key, configuration) {\n return `${Array.from(new Set([\n configuration[`${key}BackgroundColor`],\n ...configuration.columns\n .map((column) => column[`${key}BackgroundColor`])\n .filter(isNonNullable),\n ]).values())\n .map((color) => `.${INTERNAL__GridClientUtilityCssClassName.ROOT} .${generateBackgroundColorUtilityClassName(color, key)}{background-color:${color};}`)\n .join('\\n')};`;\n}\nexport const DataCubeGridStyleController = observer(() => {\n const repl = useREPLStore();\n const dataCube = repl.dataCube;\n const grid = dataCube.grid;\n const configuration = grid.queryConfiguration;\n return (_jsx(Global, { styles: css `\n .${INTERNAL__GridClientUtilityCssClassName.ROOT} {\n --ag-odd-row-background-color: ${grid.queryConfiguration\n .alternateRowsStandardMode && !grid.queryConfiguration.alternateRows\n ? DEFAULT_ROW_HIGHLIGHT_BACKGROUND_COLOR\n : DEFAULT_ROW_BACKGROUND_COLOR};\n --ag-cell-horizontal-border: ${grid.queryConfiguration\n .showVerticalGridLines\n ? `1px solid\n ${grid.queryConfiguration.gridLineColor}`\n : 'none'};\n --ag-row-border-color: ${grid.queryConfiguration\n .showHorizontalGridLines\n ? grid.queryConfiguration.gridLineColor\n : 'transparent'};\n }\n .${INTERNAL__GridClientUtilityCssClassName.ROOT}\n .${INTERNAL__GridClientUtilityCssClassName.HIGHLIGHT_ROW} {\n background-color: ${grid.queryConfiguration.alternateRows\n ? grid.queryConfiguration.alternateRowsColor\n : DEFAULT_ROW_BACKGROUND_COLOR};\n }\n ${[\n DataCubeFont.ARIAL,\n DataCubeFont.ROBOTO,\n DataCubeFont.ROBOTO_CONDENSED,\n ]\n .map((fontFamily) => `.${INTERNAL__GridClientUtilityCssClassName.ROOT} .${generateFontFamilyUtilityClassName(fontFamily)}{font-family:${fontFamily},sans-serif;}`)\n .join('\\n')}\n ${[\n DataCubeFont.GEORGIA,\n DataCubeFont.ROBOTO_SERIF,\n DataCubeFont.TIMES_NEW_ROMAN,\n ]\n .map((fontFamily) => `.${INTERNAL__GridClientUtilityCssClassName.ROOT} .${generateFontFamilyUtilityClassName(fontFamily)}{font-family:${fontFamily},serif;}`)\n .join('\\n')}\n ${[\n DataCubeFont.JERBRAINS_MONO,\n DataCubeFont.ROBOTO_MONO,\n DataCubeFont.UBUNTU_MONO,\n ]\n .map((fontFamily) => `.${INTERNAL__GridClientUtilityCssClassName.ROOT} .${generateFontFamilyUtilityClassName(fontFamily)}{font-family:${fontFamily},monospace;}`)\n .join('\\n')}\n .${INTERNAL__GridClientUtilityCssClassName.FONT_BOLD} {\n font-weight: 700;\n }\n ${[\n 4, 5, 6, 7, 8, 9, 10, 11, 12, 14, 16, 18, 20, 22, 24, 26, 28, 32, 36,\n 48, 72,\n ]\n .map((fontSize) => `.${INTERNAL__GridClientUtilityCssClassName.ROOT} .${generateFontSizeUtilityClassName(fontSize)}{font-size:${fontSize}px;}`)\n .join('\\n')}\n .${INTERNAL__GridClientUtilityCssClassName.ROOT}\n .${INTERNAL__GridClientUtilityCssClassName.FONT_ITALIC} {\n font-style: italic;\n }\n ${[\n DataCubeFontFormatUnderlineVariant.SOLID,\n DataCubeFontFormatUnderlineVariant.DASHED,\n DataCubeFontFormatUnderlineVariant.DOTTED,\n DataCubeFontFormatUnderlineVariant.DOUBLE,\n DataCubeFontFormatUnderlineVariant.WAVY,\n ]\n .map((variant) => `.${INTERNAL__GridClientUtilityCssClassName.ROOT} .${generateFontUnderlineUtilityClassName(variant)}{text-decoration:underline ${variant};}`)\n .join('\\n')}\n .${INTERNAL__GridClientUtilityCssClassName.ROOT} .${INTERNAL__GridClientUtilityCssClassName.FONT_STRIKETHROUGH} {\n text-decoration: line-through;\n }\n ${[\n DataCubeFontCase.LOWERCASE,\n DataCubeFontCase.UPPERCASE,\n DataCubeFontCase.CAPITALIZE,\n ]\n .map((fontCase) => `.${INTERNAL__GridClientUtilityCssClassName.ROOT} .${generateFontCaseUtilityClassName(fontCase)}{text-transform:${fontCase};}`)\n .join('\\n')}\n ${[\n DataCubeFontTextAlignment.LEFT,\n DataCubeFontTextAlignment.CENTER,\n DataCubeFontTextAlignment.RIGHT,\n ]\n .map((alignment) => `.${INTERNAL__GridClientUtilityCssClassName.ROOT} .${generateTextAlignUtilityClassName(alignment)}{text-align:${alignment};}`)\n .join('\\n')};\n ${backgroundColorStyle('normal', configuration)}\n ${backgroundColorStyle('zero', configuration)}\n ${backgroundColorStyle('negative', configuration)}\n ${backgroundColorStyle('error', configuration)}\n ${textColorStyle('normal', configuration)}\n ${textColorStyle('zero', configuration)}\n ${textColorStyle('negative', configuration)}\n ${textColorStyle('error', configuration)}\n .${INTERNAL__GridClientUtilityCssClassName.ROOT}\n .${INTERNAL__GridClientUtilityCssClassName.BLUR} {\n filter: blur(3px);\n }\n .${INTERNAL__GridClientUtilityCssClassName.ROOT}\n .${INTERNAL__GridClientUtilityCssClassName.BLUR}:hover {\n filter: none;\n }\n ` }));\n});\nconst DataCubeGridScroller = observer(() => {\n const repl = useREPLStore();\n const dataCube = repl.dataCube;\n const grid = dataCube.grid;\n const scrollHintText = grid.scrollHintText;\n const gridClientSideBarElement = document.querySelector('.data-cube-grid .ag-side-bar');\n const gridVerticalScrollbar = document.querySelector('.data-cube-grid .ag-body-vertical-scroll');\n return (_jsxs(\"div\", { className: \"absolute -top-9 flex items-center rounded-sm border border-neutral-300 bg-neutral-100 p-1 pr-2 text-neutral-500 shadow-sm\", style: {\n right: (gridClientSideBarElement !== null\n ? gridClientSideBarElement.getBoundingClientRect().width + 12\n : 16) +\n (gridVerticalScrollbar !== null\n ? gridVerticalScrollbar.getBoundingClientRect().width\n : 0),\n }, children: [_jsx(DataCubeIcon.TableScroll, { className: \"text-lg\" }), _jsx(\"div\", { className: \"ml-1 font-mono text-sm\", children: scrollHintText ?? '' })] }));\n});\nconst DataCubeGridStatusBar = observer(() => {\n const repl = useREPLStore();\n const dataCube = repl.dataCube;\n const grid = dataCube.grid;\n return (_jsxs(\"div\", { className: \"relative flex h-5 w-full select-none justify-between border-b border-neutral-200 bg-neutral-100\", children: [Boolean(grid.scrollHintText) && _jsx(DataCubeGridScroller, {}), _jsx(\"div\", {}), _jsxs(\"div\", { className: \"flex h-full items-center\", children: [_jsx(\"div\", { className: \"flex h-full items-center px-2 font-mono text-sm text-neutral-500\", children: grid.clientDataSource.rowCount\n ? `Rows: ${grid.clientDataSource.rowCount}`\n : '' }), grid.datasourceConfiguration.limit !== undefined &&\n grid.queryConfiguration.showWarningForTruncatedResult && (\n // TODO: if we want to properly warn if the data has been truncated due to row limit,\n // this would require us to fetch n+1 rows when limit=n\n // This is feature is not difficult to implement, but it would be implemented most cleanly\n // when we change the query execution engine to return the total number of rows,\n // so for now, we simply just warn about truncation whenever a limit != -1 is specified\n _jsxs(_Fragment, { children: [_jsx(\"div\", { className: \"h-3 w-[1px] bg-neutral-200\" }), _jsxs(\"div\", { className: \"flex h-full items-center px-2 text-orange-500\", children: [_jsx(DataCubeIcon.Warning, { className: \"stroke-[3px]\" }), _jsx(\"div\", { className: \"ml-1 text-sm font-semibold\", children: `Results truncated to fit within row limit (${grid.datasourceConfiguration.limit})` })] })] })), _jsx(\"div\", { className: \"h-3 w-[1px] bg-neutral-200\" }), _jsxs(\"button\", { className: \"flex h-full items-center p-2\", onClick: () => grid.setPaginationEnabled(!grid.isPaginationEnabled), children: [_jsx(Switch, { checked: grid.isPaginationEnabled, classes: {\n root: 'p-0 w-6 h-5 flex items-center',\n input: 'w-2',\n checked: '!translate-x-2 ease-in-out duration-100 transition',\n thumb: cn('w-2 h-2', {\n 'bg-sky-600': grid.isPaginationEnabled,\n 'bg-neutral-500': !grid.isPaginationEnabled,\n }),\n switchBase: 'p-0.5 mt-1 translate-x-0 ease-in-out duration-100 transition',\n track: cn('h-3 w-5 border', {\n '!bg-sky-100 border-sky-600': grid.isPaginationEnabled,\n '!bg-neutral-100 border-neutral-500': !grid.isPaginationEnabled,\n }),\n }, disableRipple: true, disableFocusRipple: true }), _jsx(\"div\", { className: cn('text-sm', {\n 'text-sky-600': grid.isPaginationEnabled,\n 'text-neutral-500': !grid.isPaginationEnabled,\n }), children: \"Pagination\" })] })] })] }));\n});\nconst DataCubeGridClient = observer(() => {\n const repl = useREPLStore();\n const dataCube = repl.dataCube;\n const grid = dataCube.grid;\n return (_jsx(\"div\", { className: \"relative h-[calc(100%_-_20px)] w-full\", children: _jsx(AgGridReact, { className: \"data-cube-grid ag-theme-balham\", rowModelType: \"serverSide\", serverSideDatasource: grid.clientDataSource, context: {\n dataCube,\n }, onGridReady: (params) => {\n grid.configureClient(params.api);\n // restore original error logging\n console.error = __INTERNAL__original_console_error; // eslint-disable-line no-console\n }, modules: [\n // community\n ClientSideRowModelModule,\n CsvExportModule,\n // enterprise\n ServerSideRowModelModule,\n RowGroupingModule,\n MenuModule,\n ClipboardModule,\n RangeSelectionModule,\n SideBarModule,\n ColumnsToolPanelModule,\n ExcelExportModule,\n ], ...generateBaseGridOptions(dataCube) }) }));\n});\nexport const DataCubeGrid = observer(() => (_jsxs(\"div\", { className: \"h-full w-full\", children: [_jsx(DataCubeGridStyleController, {}), _jsx(DataCubeGridClient, {}), _jsx(DataCubeGridStatusBar, {})] })));\n//# sourceMappingURL=DataCubeGrid.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 { useState } from 'react';\nimport { DataCubeIcon, ResizableAndDraggableBox, cn } from '@finos/legend-art';\nimport { WINDOW_DEFAULT_HEIGHT, WINDOW_DEFAULT_MIN_HEIGHT, WINDOW_DEFAULT_MIN_WIDTH, WINDOW_DEFAULT_OFFSET, WINDOW_DEFAULT_WIDTH, } from '../../stores/LayoutManagerState.js';\nimport { observer } from 'mobx-react-lite';\nexport const Window = (props) => {\n const { parent, layoutManagerState, windowState } = props;\n const configuration = windowState.configuration.window;\n const [windowSpec, setWindowSpec] = useState(() => {\n const x = configuration.x ?? WINDOW_DEFAULT_OFFSET;\n const y = configuration.y ?? WINDOW_DEFAULT_OFFSET;\n const width = configuration.width ?? WINDOW_DEFAULT_WIDTH;\n const height = configuration.height ?? WINDOW_DEFAULT_HEIGHT;\n const parentElement = parent?.current ?? document.body;\n const { width: containerWidth, height: containerHeight } = parentElement.getBoundingClientRect();\n if (configuration.center) {\n const finalWidth = width + WINDOW_DEFAULT_OFFSET * 2 > containerWidth\n ? containerWidth - WINDOW_DEFAULT_OFFSET * 2\n : width;\n const finalHeight = height + WINDOW_DEFAULT_OFFSET * 2 > containerHeight\n ? containerHeight - WINDOW_DEFAULT_OFFSET * 2\n : height;\n return {\n x: (containerWidth - finalWidth) / 2,\n y: (containerHeight - finalHeight) / 2,\n width: finalWidth,\n height: finalHeight,\n };\n }\n const finalWidth = width + Math.abs(x) + WINDOW_DEFAULT_OFFSET > containerWidth\n ? containerWidth - Math.abs(x) - WINDOW_DEFAULT_OFFSET\n : width;\n const finalHeight = height + Math.abs(y) + WINDOW_DEFAULT_OFFSET > containerHeight\n ? containerHeight - Math.abs(y) - WINDOW_DEFAULT_OFFSET\n : height;\n return {\n x: x < 0 ? containerWidth - Math.abs(x) - finalWidth : x,\n y: y < 0 ? containerHeight - Math.abs(y) - finalHeight : y,\n width: finalWidth,\n height: finalHeight,\n };\n });\n return (_jsx(ResizableAndDraggableBox, { className: \"absolute z-10\", handle: `.data-cube__window-${windowState.uuid}`, position: { x: windowSpec.x, y: windowSpec.y }, size: { width: windowSpec.width, height: windowSpec.height }, minWidth: configuration.minWidth ?? WINDOW_DEFAULT_MIN_WIDTH, minHeight: configuration.minHeight ?? WINDOW_DEFAULT_MIN_HEIGHT, onDragStop: (event, data) => {\n setWindowSpec({ ...windowSpec, x: data.x, y: data.y });\n }, dragHandleClassName: `data-cube__window-${windowState.uuid}`, onResize: (event, direction, ref, delta, position) => {\n setWindowSpec({\n ...position,\n width: ref.offsetWidth,\n height: ref.offsetHeight,\n });\n }, enableResizing: {\n top: true,\n right: true,\n bottom: true,\n left: true,\n topRight: true,\n bottomRight: true,\n bottomLeft: true,\n topLeft: true,\n }, resizeHandleStyles: {\n top: { cursor: 'ns-resize' },\n right: { cursor: 'ew-resize' },\n bottom: { cursor: 'ns-resize' },\n left: { cursor: 'ew-resize' },\n topRight: {\n cursor: 'nesw-resize',\n width: 14,\n height: 14,\n top: -7,\n right: -7,\n },\n bottomRight: {\n cursor: 'nwse-resize',\n width: 14,\n height: 14,\n bottom: -7,\n right: -7,\n },\n bottomLeft: {\n cursor: 'nesw-resize',\n width: 14,\n height: 14,\n bottom: -7,\n left: -7,\n },\n topLeft: {\n cursor: 'nwse-resize',\n width: 14,\n height: 14,\n top: -7,\n left: -7,\n },\n }, children: _jsxs(\"div\", { className: \"h-full w-full border border-neutral-400 bg-neutral-200 shadow-xl\", onMouseDown: () => {\n layoutManagerState.bringWindowFront(windowState);\n }, children: [_jsxs(\"div\", { className: cn(`data-cube__window-${windowState.uuid}`, 'flex h-6 w-full select-none items-center justify-between border-b border-b-neutral-300 bg-white active:cursor-move'), children: [_jsx(\"div\", { className: \"px-2\", children: windowState.configuration.title }), _jsx(\"button\", { className: \"flex h-[23px] w-6 items-center justify-center hover:bg-red-500 hover:text-white\", onClick: () => layoutManagerState.closeWindow(windowState), children: _jsx(DataCubeIcon.X, {}) })] }), _jsx(\"div\", { className: \"h-[calc(100%_-_24px)] w-full\", children: windowState.configuration.contentRenderer(windowState.configuration) })] }) }));\n};\nexport const LayoutManager = observer((props) => {\n const { layoutManagerState } = props;\n return (_jsx(_Fragment, { children: layoutManagerState.windows.map((windowState) => (_jsx(Window, { layoutManagerState: layoutManagerState, windowState: windowState }, windowState.uuid))) }));\n});\n//# sourceMappingURL=LayoutManager.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 { useREPLStore } from '../REPLStoreProvider.js';\nimport { useEffect } from 'react';\nimport { DataCubeGrid } from './grid/DataCubeGrid.js';\nimport { useApplicationStore } from '@finos/legend-application';\nimport { DataCubeIcon, DropdownMenu, DropdownMenuItem, ProgressBar, useDropdownMenu, } from '@finos/legend-art';\nimport { LayoutManager } from '../repl/LayoutManager.js';\nconst DataCubeStatusBar = observer(() => {\n const repl = useREPLStore();\n const dataCube = repl.dataCube;\n return (_jsxs(\"div\", { className: \"flex h-5 w-full justify-between bg-neutral-100\", children: [_jsxs(\"div\", { className: \"flex\", children: [_jsxs(\"button\", { className: \"flex items-center px-2 text-sky-600 hover:text-sky-700\", onClick: () => dataCube.editor.display.open(), children: [_jsx(DataCubeIcon.Settings, { className: \"text-xl\" }), _jsx(\"div\", { className: \"pl-0.5 underline\", children: \"Properties\" })] }), _jsx(\"div\", { className: \"flex\", children: _jsxs(\"button\", { className: \"flex items-center text-sky-600 hover:text-sky-700\", children: [_jsx(DataCubeIcon.TableFilter, { className: \"text-lg\" }), _jsx(\"div\", { className: \"pl-0.5 underline\", children: \"Filter\" })] }) })] }), _jsx(\"div\", { className: \"flex items-center px-2\", children: _jsx(\"div\", { className: \"flex h-3.5 w-48 border-[0.5px] border-neutral-300\", children: dataCube.runningTasks.size > 0 && (_jsx(ProgressBar, { classes: {\n root: 'h-3.5 w-full bg-transparent',\n bar1Indeterminate: 'bg-green-500',\n bar2Indeterminate: 'bg-green-500',\n }, variant: \"indeterminate\" })) }) })] }));\n});\nconst DataCubeTitleBar = observer(() => {\n const application = useApplicationStore();\n const repl = useREPLStore();\n const dataCube = repl.dataCube;\n const [openMenuDropdown, closeMenuDropdown, menuDropdownProps] = useDropdownMenu();\n return (_jsxs(\"div\", { className: \"flex h-6 justify-between bg-neutral-100\", children: [_jsxs(\"div\", { className: \"flex select-none items-center pl-1 pr-2 text-lg font-medium\", children: [_jsx(DataCubeIcon.Cube, { className: \"mr-1 h-4 w-4\" }), _jsx(\"div\", { children: dataCube.core.name })] }), _jsxs(\"div\", { children: [_jsx(\"button\", { className: \"flex h-6 w-6 flex-shrink-0 items-center justify-center text-lg\", onClick: openMenuDropdown, children: _jsx(DataCubeIcon.Menu, {}) }), _jsxs(DropdownMenu, { ...menuDropdownProps, menuProps: {\n anchorOrigin: { vertical: 'top', horizontal: 'left' },\n transformOrigin: { vertical: 'top', horizontal: 'right' },\n classes: {\n paper: 'rounded-none mt-[1px]',\n list: 'w-36 p-0 rounded-none border border-neutral-400 bg-white max-h-40 overflow-y-auto py-0.5',\n },\n }, children: [_jsx(DropdownMenuItem, { className: \"flex h-[22px] w-full items-center px-2.5 text-base hover:bg-neutral-100 focus-visible:bg-neutral-100\", onClick: () => {\n if (application.documentationService.url) {\n application.navigationService.navigator.visitAddress(application.documentationService.url);\n }\n closeMenuDropdown();\n }, \n // disabled={!application.documentationService.url}\n disabled: true, children: \"See Documentation\" }), _jsx(\"div\", { className: \"my-0.5 h-[1px] w-full bg-neutral-200\" }), _jsx(DropdownMenuItem, { className: \"flex h-[22px] w-full items-center px-2.5 text-base hover:bg-neutral-100 focus-visible:bg-neutral-100\", onClick: () => {\n repl.settingsDisplay.open();\n closeMenuDropdown();\n }, children: \"Settings...\" })] })] })] }));\n});\nexport const DataCube = observer(() => {\n const repl = useREPLStore();\n const application = useApplicationStore();\n const dataCube = repl.dataCube;\n useEffect(() => {\n dataCube.initialize().catch(application.logUnhandledError);\n }, [dataCube, application]);\n return (_jsxs(\"div\", { className: \"data-cube relative flex h-full w-full flex-col bg-white\", children: [_jsx(DataCubeTitleBar, {}), _jsx(DataCubeGrid, {}), _jsx(DataCubeStatusBar, {}), _jsx(LayoutManager, { layoutManagerState: repl.layout })] }));\n});\n//# sourceMappingURL=DataCube.js.map","import { Fragment as _Fragment, jsx as _jsx } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { useEffect } from 'react';\nimport { observer } from 'mobx-react-lite';\nimport { ApplicationComponentFrameworkProvider, SimpleApplicationComponentFrameworkProvider, } from './ApplicationComponentFrameworkProvider.js';\nimport { useApplicationStore } from './ApplicationStoreProvider.js';\nimport { useApplicationPlatform } from './ApplicationPlatformProvider.js';\nexport const ApplicationFrameworkProvider = observer((props) => {\n const { children, simple } = props;\n const platform = useApplicationPlatform();\n const applicationStore = useApplicationStore();\n useEffect(() => {\n applicationStore\n .initialize(platform)\n .catch(applicationStore.alertUnhandledError);\n }, [applicationStore, platform]);\n if (!applicationStore.initState.hasSucceeded) {\n return _jsx(_Fragment, {});\n }\n // TODO: would be great if we can have <React.StrictMode> here but since Mobx React is not ready for\n // concurrency yet, we would have to wait\n // See https://github.com/mobxjs/mobx/issues/2526\n if (simple) {\n return (_jsx(SimpleApplicationComponentFrameworkProvider, { children: children }));\n }\n return (_jsx(ApplicationComponentFrameworkProvider, { children: children }));\n});\n//# sourceMappingURL=ApplicationFrameworkProvider.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport class LegendREPLBaseStore {\n application;\n pluginManager;\n constructor(application) {\n this.application = application;\n this.pluginManager = application.pluginManager;\n }\n}\n//# sourceMappingURL=LegendREPLBaseStore.js.map","import { jsx as _jsx } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { createContext } from 'react';\nimport { useLocalObservable } from 'mobx-react-lite';\nimport { ApplicationFrameworkProvider, useApplicationStore, } from '@finos/legend-application';\nimport { LegendREPLBaseStore } from '../stores/LegendREPLBaseStore.js';\nexport const useLegendREPLApplicationStore = () => useApplicationStore();\nconst LegendREPLBaseStoreContext = createContext(undefined);\nconst LegendREPLBaseStoreProvider = ({ children }) => {\n const application = useLegendREPLApplicationStore();\n const store = useLocalObservable(() => new LegendREPLBaseStore(application));\n return (_jsx(LegendREPLBaseStoreContext.Provider, { value: store, children: children }));\n};\nexport const LegendREPLFrameworkProvider = ({ children }) => (_jsx(ApplicationFrameworkProvider, { simple: true, children: _jsx(LegendREPLBaseStoreProvider, { children: children }) }));\n//# sourceMappingURL=LegendREPLFrameworkProvider.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 { BrowserEnvironmentProvider, Route, Switch, } from '@finos/legend-application/browser';\nimport { DataCube } from './dataCube/DataCube.js';\nimport { LegendREPLFrameworkProvider } from './LegendREPLFrameworkProvider.js';\nimport { observer } from 'mobx-react-lite';\nimport { withREPLStore } from './REPLStoreProvider.js';\nimport { BlockingActionAlert } from './repl/Alert.js';\nexport const LEGEND_REPL_GRID_CLIENT_ROUTE_PATTERN = Object.freeze({\n DATA_CUBE: `/dataCube`,\n});\nexport const LegendREPLRouter = withREPLStore(observer(() => (_jsx(\"div\", { className: \"app\", children: _jsx(Switch, { children: _jsx(Route, { exact: true, path: [LEGEND_REPL_GRID_CLIENT_ROUTE_PATTERN.DATA_CUBE], component: \n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n DataCube }) }) }))));\nexport const LegendREPLWebApplication = (props) => {\n const { baseUrl } = props;\n return (_jsx(BrowserEnvironmentProvider, { baseUrl: baseUrl, children: _jsxs(LegendREPLFrameworkProvider, { children: [_jsx(LegendREPLRouter, {}), _jsx(BlockingActionAlert, {})] }) }));\n};\n//# sourceMappingURL=LegendREPLApplication.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF 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';\nimport { DocumentationKey } from '../application/LegendREPLDocumentation.js';\nexport class LegendREPLApplicationPlugin 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 getExtraRequiredDocumentationKeys() {\n return [\n DocumentationKey.DATA_CUBE_EXTENDED_COLUMN_LEVELS,\n DocumentationKey.DATA_CUBE_COLUMN_KINDS,\n DocumentationKey.DATA_CUBE_COLUMN_DISPLAY_AS_LINK,\n ];\n }\n}\n//# sourceMappingURL=LegendREPLApplicationPlugin.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport var PURE_GRAMMAR_TOKEN;\n(function (PURE_GRAMMAR_TOKEN) {\n PURE_GRAMMAR_TOKEN[\"WHITESPACE\"] = \"\";\n PURE_GRAMMAR_TOKEN[\"KEYWORD\"] = \"keyword\";\n PURE_GRAMMAR_TOKEN[\"IDENTIFIER\"] = \"identifier\";\n PURE_GRAMMAR_TOKEN[\"OPERATOR\"] = \"operator\";\n PURE_GRAMMAR_TOKEN[\"DELIMITER\"] = \"delimiter\";\n PURE_GRAMMAR_TOKEN[\"PARSER\"] = \"parser\";\n PURE_GRAMMAR_TOKEN[\"NUMBER\"] = \"number\";\n PURE_GRAMMAR_TOKEN[\"DATE\"] = \"date\";\n PURE_GRAMMAR_TOKEN[\"COLOR\"] = \"color\";\n PURE_GRAMMAR_TOKEN[\"PACKAGE\"] = \"package\";\n PURE_GRAMMAR_TOKEN[\"STRING\"] = \"string\";\n PURE_GRAMMAR_TOKEN[\"COMMENT\"] = \"comment\";\n PURE_GRAMMAR_TOKEN[\"LANGUAGE_STRUCT\"] = \"language-struct\";\n PURE_GRAMMAR_TOKEN[\"MULTIPLICITY\"] = \"multiplicity\";\n PURE_GRAMMAR_TOKEN[\"GENERICS\"] = \"generics\";\n PURE_GRAMMAR_TOKEN[\"PROPERTY\"] = \"property\";\n PURE_GRAMMAR_TOKEN[\"PARAMETER\"] = \"parameter\";\n PURE_GRAMMAR_TOKEN[\"VARIABLE\"] = \"variable\";\n PURE_GRAMMAR_TOKEN[\"TYPE\"] = \"type\";\n PURE_GRAMMAR_TOKEN[\"INVALID\"] = \"invalid\";\n})(PURE_GRAMMAR_TOKEN || (PURE_GRAMMAR_TOKEN = {}));\n//# sourceMappingURL=PureLanguage.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { getNonNullableEntry, isNonNullable, isString, } from '@finos/legend-shared';\nconst parseVSCodeTheme = (rawData) => {\n const rules = [];\n rawData.tokenColors.forEach((tokenColor) => {\n if (!tokenColor.settings) {\n return;\n }\n let scopes = [];\n if (isString(tokenColor.scope)) {\n scopes = tokenColor.scope\n .replace(/^[,]+/, '')\n .replace(/[,]+$/, '')\n .split(',')\n .map((scope) => scope.trim());\n }\n else if (Array.isArray(tokenColor.scope)) {\n scopes = tokenColor.scope;\n }\n else {\n scopes = [''];\n }\n const baseRule = {};\n if (tokenColor.settings.foreground &&\n isString(tokenColor.settings.foreground)) {\n baseRule.foreground = tokenColor.settings.foreground;\n }\n if (tokenColor.settings.background &&\n isString(tokenColor.settings.background)) {\n baseRule.background = tokenColor.settings.background;\n }\n if (tokenColor.settings.fontStyle &&\n isString(tokenColor.settings.fontStyle)) {\n baseRule.fontStyle = tokenColor.settings.fontStyle;\n }\n scopes.forEach((scope) => {\n if (isNonNullable(scope) || !Object.keys(baseRule).length) {\n return;\n }\n const rule = {\n ...baseRule,\n token: scope,\n };\n rules.push(rule);\n });\n });\n const colors = {};\n Object.entries(rawData.colors).forEach(([key, value]) => {\n if (Array.isArray(value)) {\n if (value.length) {\n colors[key] = getNonNullableEntry(value, 0);\n }\n }\n else {\n colors[key] = value;\n }\n });\n return {\n base: 'vs-dark',\n inherit: true,\n rules: rules,\n colors,\n };\n};\nexport const buildCodeEditorTheme = (vscodeThemeData, baseTheme, colorsOverride, rulesOverride) => {\n const baseThemeData = parseVSCodeTheme(vscodeThemeData);\n return {\n ...baseThemeData,\n base: baseTheme,\n colors: { ...baseThemeData.colors, ...colorsOverride },\n rules: [...baseThemeData.rules, ...rulesOverride],\n };\n};\n//# sourceMappingURL=MonacoEditorThemeUtils.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { PURE_GRAMMAR_TOKEN } from './PureLanguage.js';\nimport { buildCodeEditorTheme } from './themes/MonacoEditorThemeUtils.js';\nimport SOLARIZED_DARK_THEME_DATA from './themes/solarized-dark-color-theme.json' assert { type: 'json' };\nimport GITHUB_DARK_THEME_DATA from './themes/Github-Theme-dark.json' assert { type: 'json' };\nimport GITHUB_DARK_DIMMED_THEME_DATA from './themes/Github-Theme-dark-dimmed.json' assert { type: 'json' };\nimport MATERIAL_DEFAULT_THEME_DATA from './themes/Material-Theme-Default.json' assert { type: 'json' };\nimport MATERIAL_DARKER_THEME_DATA from './themes/Material-Theme-Darker.json' assert { type: 'json' };\nimport ONE_DARK_PRO_THEME_DATA from './themes/OneDark-Pro.json' assert { type: 'json' };\nimport ONE_DARK_PRO_DARKER_THEME_DATA from './themes/OneDark-Pro-darker.json' assert { type: 'json' };\nconst BASE_PURE_LANGUAGE_COLOR_TOKENS = [\n // NOTE: `monaco-editor` only accepts HEX values, not CSS variables\n { token: PURE_GRAMMAR_TOKEN.IDENTIFIER, foreground: 'dcdcaa' },\n { token: PURE_GRAMMAR_TOKEN.NUMBER, foreground: 'b5cea8' },\n { token: PURE_GRAMMAR_TOKEN.DATE, foreground: 'b5cea8' },\n { token: PURE_GRAMMAR_TOKEN.COLOR, foreground: 'b5cea8' },\n { token: PURE_GRAMMAR_TOKEN.PACKAGE, foreground: '808080' },\n { token: PURE_GRAMMAR_TOKEN.PARSER, foreground: 'c586c0' },\n { token: PURE_GRAMMAR_TOKEN.LANGUAGE_STRUCT, foreground: 'c586c0' },\n { token: PURE_GRAMMAR_TOKEN.MULTIPLICITY, foreground: '2d796b' },\n { token: PURE_GRAMMAR_TOKEN.GENERICS, foreground: '2d796b' },\n { token: PURE_GRAMMAR_TOKEN.PROPERTY, foreground: '9cdcfe' },\n { token: PURE_GRAMMAR_TOKEN.PARAMETER, foreground: '9cdcfe' },\n { token: PURE_GRAMMAR_TOKEN.VARIABLE, foreground: '4fc1ff' },\n { token: PURE_GRAMMAR_TOKEN.TYPE, foreground: '3dc9b0' },\n { token: `${PURE_GRAMMAR_TOKEN.STRING}.escape`, foreground: 'd7ba7d' },\n];\nexport var CODE_EDITOR_THEME;\n(function (CODE_EDITOR_THEME) {\n CODE_EDITOR_THEME[\"DEFAULT_DARK\"] = \"default-dark\";\n CODE_EDITOR_THEME[\"GITHUB_DARK\"] = \"github-dark\";\n CODE_EDITOR_THEME[\"GITHUB_DARK_DIMMED\"] = \"github-dark-dimmed\";\n CODE_EDITOR_THEME[\"SOLARIZED_DARK\"] = \"solarized-dark\";\n CODE_EDITOR_THEME[\"ONE_DARK_PRO\"] = \"one-dark-pro\";\n CODE_EDITOR_THEME[\"ONE_DARK_PRO_DARKER\"] = \"one-dark-pro-darker\";\n CODE_EDITOR_THEME[\"MATERIAL_DEFAULT\"] = \"material-default\";\n CODE_EDITOR_THEME[\"MATERIAL_DARKER\"] = \"material-darker\";\n // default themes in Monaco editor\n // See https://github.com/microsoft/vscode/blob/main/src/vs/editor/standalone/common/themes.ts\n CODE_EDITOR_THEME[\"BUILT_IN__VSCODE_LIGHT\"] = \"vs\";\n CODE_EDITOR_THEME[\"BUILT_IN__VSCODE_DARK\"] = \"vs-dark\";\n CODE_EDITOR_THEME[\"BUILT_IN__VSCODE_HC_BLACK\"] = \"hc-black\";\n CODE_EDITOR_THEME[\"BUILT_IN__VSCODE_HC_LIGHT\"] = \"hc-light\";\n})(CODE_EDITOR_THEME || (CODE_EDITOR_THEME = {}));\nexport const DEFAULT_DARK_THEME = {\n base: 'vs-dark',\n inherit: true,\n colors: {},\n rules: [\n ...BASE_PURE_LANGUAGE_COLOR_TOKENS,\n // NOTE: correct a problem with syntax highlighting of string in SQL\n { token: 'string.sql', foreground: 'ce9178' },\n { token: 'white.sql', foreground: 'd4d4d4' },\n { token: 'identifier.sql', foreground: 'd4d4d4' },\n { token: 'operator.sql', foreground: 'd4d4d4' },\n ],\n};\nexport const SOLARIZED_DARK_THEME = buildCodeEditorTheme(SOLARIZED_DARK_THEME_DATA, CODE_EDITOR_THEME.BUILT_IN__VSCODE_DARK, {}, []);\nexport const GITHUB_DARK_THEME = buildCodeEditorTheme(GITHUB_DARK_THEME_DATA, CODE_EDITOR_THEME.BUILT_IN__VSCODE_DARK, {}, []);\nexport const GITHUB_DARK_DIMMED_THEME = buildCodeEditorTheme(GITHUB_DARK_DIMMED_THEME_DATA, CODE_EDITOR_THEME.BUILT_IN__VSCODE_DARK, {}, []);\nexport const MATERIAL_DEFAULT_THEME = buildCodeEditorTheme(MATERIAL_DEFAULT_THEME_DATA, CODE_EDITOR_THEME.BUILT_IN__VSCODE_DARK, {}, []);\nexport const MATERIAL_DARKER_THEME = buildCodeEditorTheme(MATERIAL_DARKER_THEME_DATA, CODE_EDITOR_THEME.BUILT_IN__VSCODE_DARK, {}, []);\nexport const ONE_DARK_PRO_THEME = buildCodeEditorTheme(ONE_DARK_PRO_THEME_DATA, CODE_EDITOR_THEME.BUILT_IN__VSCODE_DARK, {}, []);\nexport const ONE_DARK_PRO_DARKER_THEME = buildCodeEditorTheme(ONE_DARK_PRO_DARKER_THEME_DATA, CODE_EDITOR_THEME.BUILT_IN__VSCODE_DARK, {}, []);\n//# sourceMappingURL=CodeEditorTheme.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { APPLICATION_EVENT, DEFAULT_MONOSPACED_FONT_FAMILY, } from '@finos/legend-application';\nimport { LogEvent } from '@finos/legend-shared';\nimport { editor as monacoEditorAPI, KeyCode, KeyMod, MarkerSeverity, } from 'monaco-editor';\nimport { CODE_EDITOR_THEME, DEFAULT_DARK_THEME, GITHUB_DARK_DIMMED_THEME, GITHUB_DARK_THEME, MATERIAL_DARKER_THEME, MATERIAL_DEFAULT_THEME, ONE_DARK_PRO_DARKER_THEME, ONE_DARK_PRO_THEME, SOLARIZED_DARK_THEME, } from './CodeEditorTheme.js';\n/**\n * Normally `monaco-editor` worker disposes after 5 minutes staying idle, but we fasten\n * this pace just in case the usage of the editor causes memory-leak somehow\n */\nexport const disposeCodeEditor = (editor) => {\n editor.dispose();\n // NOTE: just to be sure, we dispose the model after disposing the editor\n editor.getModel()?.dispose();\n};\nexport const disposeDiffCodeEditor = (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 getCodeEditorValue = (editor) => editor.getModel()?.getValue(monacoEditorAPI.EndOfLinePreference.LF) ?? '';\nexport const getBaseCodeEditorOptions = () => ({\n contextmenu: false,\n copyWithSyntaxHighlighting: false,\n // NOTE: These following font options are needed (and CSS font-size option `.monaco-editor * { font-size: ... }` as well)\n // in order to make the editor appear properly on multiple platform, the ligatures option is needed for Mac to display properly\n // otherwise the cursor position relatively to text would be off\n // Another potential cause for this misaligment is that the fonts are being lazy-loaded and made available after `monaco-editor`\n // calculated the font-width, for this, we can use `remeasureFonts`, but our case here, `fontLigatures: true` seems\n // to do the trick\n // See https://github.com/microsoft/monaco-editor/issues/392\n fontSize: 14,\n // Enforce a fixed font-family to make cross platform display consistent (i.e. Mac defaults to use `Menlo` which is bigger than\n // `Consolas` on Windows, etc.)\n fontFamily: 'Roboto Mono',\n // Enable font ligature: glyphs which combine the shapes of certain sequences of characters into a new form that makes for\n // a more harmonious reading experience.\n fontLigatures: true,\n // Make sure hover or widget shown near boundary are not truncated by setting their position to `fixed`\n fixedOverflowWidgets: true,\n detectIndentation: false, // i.e. so we can force tab-size\n tabSize: 2,\n // The typing is currently not correct for `bracketPairColorization`, until this is fixed, we will remove the cast\n // See https://github.com/microsoft/monaco-editor/issues/3013\n 'bracketPairColorization.enabled': false,\n automaticLayout: true,\n});\nexport const getBaseConsoleOptions = () => ({\n ...getBaseCodeEditorOptions(),\n fontSize: 12,\n extraEditorClassName: 'monaco-editor--small-font',\n readOnly: true,\n glyphMargin: false,\n folding: false,\n lineNumbers: 'off',\n lineDecorationsWidth: 10,\n lineNumbersMinChars: 0,\n minimap: {\n enabled: false,\n },\n guides: {\n bracketPairs: false,\n bracketPairsHorizontal: false,\n highlightActiveBracketPair: false,\n indentation: false,\n highlightActiveIndentation: false,\n },\n renderLineHighlight: 'none',\n});\nexport const moveCursorToPosition = (editor, position) => {\n if (!editor.hasTextFocus()) {\n editor.focus();\n } // focus the editor first so that it can shows the cursor\n editor.revealPositionInCenter(position, 0);\n editor.setPosition(position);\n};\nconst INTERNAL__DUMMY_PROBLEM_MARKER_OWNER = 'dummy_problem_marker_owner';\nexport const setErrorMarkers = (editorModel, errors, ownerId) => {\n monacoEditorAPI.setModelMarkers(editorModel, ownerId ?? INTERNAL__DUMMY_PROBLEM_MARKER_OWNER, errors.map((error) => ({\n startLineNumber: error.startLineNumber,\n startColumn: error.startColumn,\n endLineNumber: error.endLineNumber,\n endColumn: error.endColumn + 1, // add a 1 to endColumn as monaco editor range is not inclusive\n // NOTE: when the message is empty, no error tooltip is shown, we want to avoid this\n message: error.message === '' ? '(no error message)' : error.message,\n severity: MarkerSeverity.Error,\n })));\n};\nexport const setWarningMarkers = (editorModel, warnings, ownerId) => {\n monacoEditorAPI.setModelMarkers(editorModel, ownerId ?? INTERNAL__DUMMY_PROBLEM_MARKER_OWNER, warnings.map((warning) => ({\n startLineNumber: warning.startLineNumber,\n startColumn: warning.startColumn,\n endColumn: warning.endColumn,\n endLineNumber: warning.endLineNumber,\n message: warning.message === '' ? '(no warning message)' : warning.message,\n severity: MarkerSeverity.Warning,\n })));\n};\nexport const clearMarkers = (ownerId) => {\n monacoEditorAPI.removeAllMarkers(ownerId ?? INTERNAL__DUMMY_PROBLEM_MARKER_OWNER);\n};\n/**\n * This method eliminates CR '\\r' character(s) in the provided text value.\n */\nexport const normalizeLineEnding = (val) => val.replace(/\\r/g, '');\n// We need to dynamically adjust the width of the line number gutter, otherwise as the document gets\n// larger, the left margin will start to shrink\n// See https://github.com/microsoft/monaco-editor/issues/2206\nexport const resetLineNumberGutterWidth = (editor) => {\n const currentValue = editor.getValue();\n editor.updateOptions({\n lineNumbersMinChars: Math.max(Math.floor(Math.log10(currentValue.split(/\\r\\n|\\r|\\n/g).length)) + 3, 5),\n });\n};\nexport const configureCodeEditorComponent = async (applicationStore) => {\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 '${DEFAULT_MONOSPACED_FONT_FAMILY}' has not been loaded properly, code editor might not display properly`;\n await Promise.all([400, 700].map((weight) => document.fonts.load(`${weight} 1em ${DEFAULT_MONOSPACED_FONT_FAMILY}`)))\n .then(() => {\n if (document.fonts.check(`1em ${DEFAULT_MONOSPACED_FONT_FAMILY}`)) {\n monacoEditorAPI.remeasureFonts();\n }\n else {\n applicationStore.logService.error(LogEvent.create(APPLICATION_EVENT.APPLICATION_SETUP__FAILURE), fontLoadFailureErrorMessage);\n }\n })\n .catch(() => applicationStore.logService.error(LogEvent.create(APPLICATION_EVENT.APPLICATION_SETUP__FAILURE), fontLoadFailureErrorMessage));\n // override native hotkeys supported by monaco-editor\n // here we map these keys to a dummy command that would just dispatch the key combination\n // to the application keyboard shortcut service, effectively bypassing the command associated\n // with the native keybinding\n const OVERRIDE_DEFAULT_KEYBINDING_COMMAND = 'legend.code-editor.override-default-keybinding';\n monacoEditorAPI.registerCommand(OVERRIDE_DEFAULT_KEYBINDING_COMMAND, (accessor, ...args) => {\n applicationStore.keyboardShortcutsService.dispatch(args[0]);\n });\n const hotkeyMapping = [\n [KeyCode.F1, 'F1'], // show command center\n [KeyCode.F8, 'F8'], // show error\n [KeyCode.F9, 'F9'], // toggle debugger breakpoint\n [KeyMod.WinCtrl | KeyCode.KeyG, 'Control+KeyG'], // go-to line command\n [KeyMod.WinCtrl | KeyCode.KeyB, 'Control+KeyB'], // cursor move (core command)\n [KeyMod.WinCtrl | KeyCode.KeyO, 'Control+KeyO'], // cursor move (core command)\n [KeyMod.WinCtrl | KeyCode.KeyD, 'Control+KeyD'], // cursor move (core command)\n [KeyMod.WinCtrl | KeyCode.KeyP, 'Control+KeyP'], // cursor move (core command)\n [KeyMod.Shift | KeyCode.F10, 'Shift+F10'], // show editor context menu\n [KeyMod.WinCtrl | KeyCode.F2, 'Control+F2'], // change all instances\n [KeyMod.WinCtrl | KeyCode.F12, 'Control+F12'], // go-to definition\n ];\n monacoEditorAPI.addKeybindingRules(hotkeyMapping.map(([nativeCodeEditorKeyBinding, keyCombination]) => ({\n keybinding: nativeCodeEditorKeyBinding,\n command: OVERRIDE_DEFAULT_KEYBINDING_COMMAND,\n commandArgs: keyCombination,\n })));\n // themes\n monacoEditorAPI.defineTheme(CODE_EDITOR_THEME.DEFAULT_DARK, DEFAULT_DARK_THEME);\n monacoEditorAPI.defineTheme(CODE_EDITOR_THEME.SOLARIZED_DARK, SOLARIZED_DARK_THEME);\n monacoEditorAPI.defineTheme(CODE_EDITOR_THEME.GITHUB_DARK, GITHUB_DARK_THEME);\n monacoEditorAPI.defineTheme(CODE_EDITOR_THEME.GITHUB_DARK_DIMMED, GITHUB_DARK_DIMMED_THEME);\n monacoEditorAPI.defineTheme(CODE_EDITOR_THEME.MATERIAL_DEFAULT, MATERIAL_DEFAULT_THEME);\n monacoEditorAPI.defineTheme(CODE_EDITOR_THEME.MATERIAL_DARKER, MATERIAL_DARKER_THEME);\n monacoEditorAPI.defineTheme(CODE_EDITOR_THEME.ONE_DARK_PRO, ONE_DARK_PRO_THEME);\n monacoEditorAPI.defineTheme(CODE_EDITOR_THEME.ONE_DARK_PRO_DARKER, ONE_DARK_PRO_DARKER_THEME);\n};\nexport var CODE_EDITOR_LANGUAGE;\n(function (CODE_EDITOR_LANGUAGE) {\n CODE_EDITOR_LANGUAGE[\"TEXT\"] = \"plaintext\";\n CODE_EDITOR_LANGUAGE[\"PURE\"] = \"pure\";\n CODE_EDITOR_LANGUAGE[\"JSON\"] = \"json\";\n CODE_EDITOR_LANGUAGE[\"JAVA\"] = \"java\";\n CODE_EDITOR_LANGUAGE[\"MARKDOWN\"] = \"markdown\";\n CODE_EDITOR_LANGUAGE[\"SQL\"] = \"sql\";\n CODE_EDITOR_LANGUAGE[\"XML\"] = \"xml\";\n CODE_EDITOR_LANGUAGE[\"YAML\"] = \"yaml\";\n CODE_EDITOR_LANGUAGE[\"GRAPHQL\"] = \"graphql\";\n})(CODE_EDITOR_LANGUAGE || (CODE_EDITOR_LANGUAGE = {}));\n//# sourceMappingURL=CodeEditorUtils.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { DATE_FORMAT, ELEMENT_PATH_DELIMITER, MULTIPLICITY_INFINITE, MULTIPLICITY_RANGE_OPERATOR, PRIMITIVE_TYPE, } from '../MetaModelConst.js';\nimport { PrimitiveType } from '../metamodel/pure/packageableElements/domain/PrimitiveType.js';\nimport { Enumeration } from '../metamodel/pure/packageableElements/domain/Enumeration.js';\nimport { formatDate } from '@finos/legend-shared';\nexport var PURE_ELEMENT_NAME;\n(function (PURE_ELEMENT_NAME) {\n PURE_ELEMENT_NAME[\"PROFILE\"] = \"Profile\";\n PURE_ELEMENT_NAME[\"CLASS\"] = \"Class\";\n PURE_ELEMENT_NAME[\"ENUMERATION\"] = \"Enum\";\n PURE_ELEMENT_NAME[\"MEASURE\"] = \"Measure\";\n PURE_ELEMENT_NAME[\"ASSOCIATION\"] = \"Association\";\n PURE_ELEMENT_NAME[\"FUNCTION\"] = \"function\";\n PURE_ELEMENT_NAME[\"MAPPING\"] = \"Mapping\";\n PURE_ELEMENT_NAME[\"FLAT_DATA\"] = \"FlatData\";\n PURE_ELEMENT_NAME[\"DATABASE\"] = \"Database\";\n PURE_ELEMENT_NAME[\"SERVICE\"] = \"Service\";\n PURE_ELEMENT_NAME[\"RUNTIME\"] = \"Runtime\";\n PURE_ELEMENT_NAME[\"CONNECTION\"] = \"Connection\";\n PURE_ELEMENT_NAME[\"FILE_GENERATION\"] = \"FileGeneration\";\n PURE_ELEMENT_NAME[\"GENERATION_SPECIFICATION\"] = \"GenerationSpecification\";\n PURE_ELEMENT_NAME[\"DATA_ELEMENT\"] = \"Data\";\n PURE_ELEMENT_NAME[\"EXECUTION_ENVIRONMENT\"] = \"ExecutionEnvironment\";\n})(PURE_ELEMENT_NAME || (PURE_ELEMENT_NAME = {}));\nexport var PURE_CONNECTION_NAME;\n(function (PURE_CONNECTION_NAME) {\n PURE_CONNECTION_NAME[\"JSON_MODEL_CONNECTION\"] = \"JsonModelConnection\";\n PURE_CONNECTION_NAME[\"XML_MODEL_CONNECTION\"] = \"XmlModelConnection\";\n PURE_CONNECTION_NAME[\"MODEL_CHAIN_CONNECTION\"] = \"ModelChainConnection\";\n PURE_CONNECTION_NAME[\"RELATIONAL_DATABASE_CONNECTION\"] = \"RelationalDatabaseConnection\";\n PURE_CONNECTION_NAME[\"FLAT_DATA_CONNECTION\"] = \"FlatDataConnection\";\n})(PURE_CONNECTION_NAME || (PURE_CONNECTION_NAME = {}));\nexport var PURE_PARSER;\n(function (PURE_PARSER) {\n PURE_PARSER[\"PURE\"] = \"Pure\";\n PURE_PARSER[\"CONNECTION\"] = \"Connection\";\n PURE_PARSER[\"RUNTIME\"] = \"Runtime\";\n PURE_PARSER[\"MAPPING\"] = \"Mapping\";\n PURE_PARSER[\"SERVICE\"] = \"Service\";\n PURE_PARSER[\"FLATDATA\"] = \"FlatData\";\n PURE_PARSER[\"RELATIONAL\"] = \"Relational\";\n PURE_PARSER[\"GENERATION_SPECIFICATION\"] = \"GenerationSpecification\";\n PURE_PARSER[\"FILE_GENERATION_SPECIFICATION\"] = \"FileGeneration\";\n PURE_PARSER[\"DATA\"] = \"Data\";\n})(PURE_PARSER || (PURE_PARSER = {}));\nexport const generateMultiplicityString = (lowerBound, upperBound) => {\n if (lowerBound === upperBound) {\n return lowerBound.toString();\n }\n else if (lowerBound === 0 && upperBound === undefined) {\n return MULTIPLICITY_INFINITE;\n }\n return `${lowerBound}${MULTIPLICITY_RANGE_OPERATOR}${upperBound ?? MULTIPLICITY_INFINITE}`;\n};\nexport const generateDefaultParameterValueForType = (type, index) => {\n if (!type) {\n return `param${index}`;\n }\n if (type instanceof Enumeration) {\n return type.values.length !== 0\n ? `${type.path}.${type.values[0]?.name}`\n : `param${index}`;\n }\n else if (type instanceof PrimitiveType) {\n switch (type.name) {\n case PRIMITIVE_TYPE.BOOLEAN:\n return true;\n case PRIMITIVE_TYPE.FLOAT:\n case PRIMITIVE_TYPE.DECIMAL:\n return 0.0;\n case PRIMITIVE_TYPE.NUMBER:\n case PRIMITIVE_TYPE.INTEGER:\n return 0;\n case PRIMITIVE_TYPE.DATE:\n case PRIMITIVE_TYPE.STRICTDATE:\n return `%${formatDate(new Date(), DATE_FORMAT)}`;\n case PRIMITIVE_TYPE.DATETIME:\n return `%${formatDate(new Date(), DATE_FORMAT)}T00:00:00`;\n case PRIMITIVE_TYPE.STRICTTIME:\n return `%00:00:00`;\n case PRIMITIVE_TYPE.STRING:\n return \"''\";\n default:\n return `param${index}`;\n }\n }\n // Other non-primitive types, e.g. Class\n return `param${index}`;\n};\nexport const generateFunctionCallString = (element) => {\n let lambdaString = '';\n if (element.parameters.length > 0) {\n for (let i = 0; i < element.parameters.length; i++) {\n const paramType = element.parameters[i]?.type.value;\n const separator = i !== element.parameters.length - 1 ? ', ' : '';\n lambdaString =\n lambdaString +\n generateDefaultParameterValueForType(paramType, i) +\n separator;\n }\n }\n return `${element.package?.path}${ELEMENT_PATH_DELIMITER}${element.functionName}(${lambdaString})`;\n};\nexport const generateFunctionPrettyName = (element, options) => `${options?.fullPath ? `${element.package?.path}${ELEMENT_PATH_DELIMITER}` : ''}${element.functionName}(${element.parameters\n .map((p) => !options?.notIncludeParamName\n ? `${p.name}: ${p.type.value.name}[${generateMultiplicityString(p.multiplicity.lowerBound, p.multiplicity.upperBound)}]`\n : `${p.type.value.name}[${generateMultiplicityString(p.multiplicity.lowerBound, p.multiplicity.upperBound)}]`)\n .join(', ')}): ${element.returnType.value.name}[${generateMultiplicityString(element.returnMultiplicity.lowerBound, element.returnMultiplicity.upperBound)}]`.replaceAll(/\\s*/gu, (val) => {\n if (options?.spacing) {\n return val;\n }\n return '';\n});\n//# sourceMappingURL=PureLanguageHelper.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/* eslint-disable prefer-named-capture-group */\nimport { PURE_ELEMENT_NAME, PURE_CONNECTION_NAME } from '@finos/legend-graph';\nimport { languages as monacoLanguagesAPI } from 'monaco-editor';\nimport { PURE_GRAMMAR_TOKEN } from './PureLanguage.js';\nimport { CODE_EDITOR_LANGUAGE } from './CodeEditorUtils.js';\n/**\n * The postfix to be added to all token types, i.e. identifier.pure, number.pure, etc.\n */\nconst PURE_GRAMMAR_TOKEN_POSTFIX = '.pure';\n// Taken from `monaco-languages` configuration for Java in order to do propert brace matching\n// See https://github.com/microsoft/monaco-languages/blob/master/src/java/java.ts\nconst configuration = {\n // NOTE: Pure identifier includes $ but not in the first position (as that is parsed as a variable)\n wordPattern: /(-?\\d*\\.\\d\\w*)|([^`~!@#%^$&*()\\-=+[{\\]}\\\\|;:'\",.<>/?\\s][^`~!@#%^&*()\\-=+[{\\]}\\\\|;:'\",.<>/?\\s]*)/,\n comments: {\n lineComment: '//',\n blockComment: ['/*', '*/'],\n },\n brackets: [\n ['{', '}'],\n ['[', ']'],\n ['(', ')'],\n ],\n autoClosingPairs: [\n { open: '{', close: '}' },\n { open: '[', close: ']' },\n { open: '(', close: ')' },\n { open: '\"', close: '\"' },\n { open: \"'\", close: \"'\" },\n ],\n surroundingPairs: [\n { open: '{', close: '}' },\n { open: '[', close: ']' },\n { open: '(', close: ')' },\n { open: '\"', close: '\"' },\n { open: \"'\", close: \"'\" },\n { open: '<', close: '>' },\n { open: '<<', close: '>>' },\n ],\n folding: {\n markers: {\n start: new RegExp('^\\\\s*//\\\\s*(?:(?:#?region\\\\b)|(?:<editor-fold\\\\b))'),\n end: new RegExp('^\\\\s*//\\\\s*(?:(?:#?endregion\\\\b)|(?:</editor-fold>))'),\n },\n },\n};\n/**\n * Create new monarch definition to support syntax-highlighting\n * See https://microsoft.github.io/monaco-editor/monarch.html\n *\n * The way SQL monarch definition is organized is good and worth learning from\n * See https://github.com/microsoft/monaco-languages/blob/master/src/sql/sql.ts\n *\n * NOTE: using `monarch` only allows fairly very basic syntax-highlighting\n * to actually do full AST analysis, we might need something more serious like\n * using TextMate grammar which is used by VSCode itself\n * See https://github.com/microsoft/monaco-editor#faq\n * See https://code.visualstudio.com/api/language-extensions/syntax-highlight-guide\n */\nconst generateLanguageMonarch = (extraKeywords) => \n// TODO: complete syntax-highlighter for core features like constraint, derived properties, etc.\n// TODO: add syntax highlighting for modules/plugins (come up with a plugin mechanism to do this).\n({\n defaultToken: 'invalid',\n tokenPostfix: PURE_GRAMMAR_TOKEN_POSTFIX,\n keywords: [\n ...extraKeywords,\n // relational\n 'Schema',\n 'Table',\n 'Join',\n 'View',\n 'primaryKey',\n 'groupBy',\n 'mainTable',\n // native\n 'let',\n 'extends',\n 'true',\n 'false',\n 'projects',\n // elements\n PURE_ELEMENT_NAME.CLASS,\n PURE_ELEMENT_NAME.ASSOCIATION,\n PURE_ELEMENT_NAME.ENUMERATION,\n PURE_ELEMENT_NAME.MEASURE,\n PURE_ELEMENT_NAME.PROFILE,\n PURE_ELEMENT_NAME.FUNCTION,\n PURE_ELEMENT_NAME.MAPPING,\n PURE_ELEMENT_NAME.RUNTIME,\n PURE_ELEMENT_NAME.CONNECTION,\n PURE_ELEMENT_NAME.FILE_GENERATION,\n PURE_ELEMENT_NAME.GENERATION_SPECIFICATION,\n PURE_ELEMENT_NAME.DATA_ELEMENT,\n // connections\n PURE_CONNECTION_NAME.JSON_MODEL_CONNECTION,\n PURE_CONNECTION_NAME.MODEL_CHAIN_CONNECTION,\n PURE_CONNECTION_NAME.XML_MODEL_CONNECTION,\n // mapping\n 'include',\n 'EnumerationMapping',\n 'Pure',\n 'AssociationMapping',\n 'XStore',\n 'AggregationAware',\n /**\n * @modularize\n * See https://github.com/finos/legend-studio/issues/65\n */\n PURE_ELEMENT_NAME.SERVICE,\n PURE_ELEMENT_NAME.FLAT_DATA,\n PURE_ELEMENT_NAME.DATABASE,\n PURE_CONNECTION_NAME.FLAT_DATA_CONNECTION,\n PURE_CONNECTION_NAME.RELATIONAL_DATABASE_CONNECTION,\n 'Relational',\n ],\n operators: [\n '=',\n '>',\n '<',\n '!',\n '~',\n '?',\n ':',\n '==',\n '<=',\n '>=',\n '&&',\n '||',\n '++',\n '--',\n '+',\n '-',\n '*',\n '/',\n '&',\n '|',\n '^',\n '%',\n '->',\n '#{',\n '}#',\n '@',\n '<<',\n '>>',\n ],\n languageStructs: ['import', 'native'],\n // common regular expressions to be used in tokenizer\n identifier: /[a-zA-Z_$][\\w$]*/,\n symbols: /[=><!~?:&|+\\-*/^%#@]+/,\n escapes: /\\\\(?:[abfnrtv\\\\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,\n digits: /\\d+(_+\\d+)*/,\n octaldigits: /[0-7]+(_+[0-7]+)*/,\n binarydigits: /[0-1]+(_+[0-1]+)*/,\n hexdigits: /[[0-9a-fA-F]+(_+[0-9a-fA-F]+)*/,\n multiplicity: /\\[(?:[a-zA-Z0-9]+(?:\\.\\.(?:[a-zA-Z0-9]+|\\*|))?|\\*)\\]/,\n package: /(?:[\\w_]+::)+/,\n // NOTE: generics is a little tricky because in order to do it right, we have to\n // do some sort of bracket matching, but we just can use a simple tokenizer here\n // so to account for cases like `<Nil,Any|*>)->` `Function<{T[1]->Boolean[1]}>[1]`\n // we have to make sure the content does not contain any `:` or `.` characters\n // in order to avoid the accidental greedy match with inputs like\n // `function doSomething<T>(a: Function<T[1]->Boolean[1]>)`\n // nor we want to make sure the last character of the content is not `-` to avoid\n // accidentally matching `->` as the end of the generics\n generics: /(?:(?:<\\w+>)|(?:<[^:.@^()]+[^-]>))/,\n date: /%-?\\d+(?:-\\d+(?:-\\d+(?:T(?:\\d+(?::\\d+(?::\\d+(?:.\\d+)?)?)?)(?:[+-][0-9]{4})?)))/,\n time: /%\\d+(?::\\d+(?::\\d+(?:.\\d+)?)?)?/,\n tokenizer: {\n root: [\n // NOTE: since `monaco-editor` Monarch is only meant for tokenizing\n // and the need to highlight Pure syntax is more than just token-based,\n // but semantic/syntax-based we have to create these complex rules.\n // the things to note here is these are not meant to match multilines\n // and they must be placed before identifier rules since token matching\n // is run in order\n // See https://github.com/microsoft/monaco-editor/issues/316#issuecomment-273555698\n // See https://github.com/microsoft/monaco-editor/issues/571#issuecomment-342555050\n // See https://microsoft.github.io/monaco-editor/monarch.html\n { include: '@pure' },\n { include: '@date' },\n { include: '@color' },\n // parser markers\n [\n // NOTE: any leading whitespace to the section header is considered invalid syntax\n /^\\s*###[\\w]+/,\n PURE_GRAMMAR_TOKEN.PARSER,\n ],\n // identifiers and keywords\n [\n /(@identifier)/,\n {\n cases: {\n '@languageStructs': PURE_GRAMMAR_TOKEN.LANGUAGE_STRUCT,\n '@keywords': `${PURE_GRAMMAR_TOKEN.KEYWORD}.$0`,\n // function descriptor\n '([a-zA-Z_$][\\\\w$]*)_((\\\\w+_(([a-zA-Z0-9]+)|(\\\\$[a-zA-Z0-9]+_[a-zA-Z0-9]+\\\\$)))__)*(\\\\w+_(([a-zA-Z0-9]+)|(\\\\$[a-zA-Z0-9]+_[a-zA-Z0-9]+\\\\$)))_': PURE_GRAMMAR_TOKEN.TYPE,\n '@default': PURE_GRAMMAR_TOKEN.IDENTIFIER,\n },\n },\n ],\n // whitespace\n { include: '@whitespace' },\n // delimiters and operators\n [/[{}()[\\]]/, '@brackets'],\n [/[<>](?!@symbols)/, '@brackets'],\n [\n /@symbols/,\n {\n cases: {\n '@operators': PURE_GRAMMAR_TOKEN.OPERATOR,\n '@default': PURE_GRAMMAR_TOKEN.IDENTIFIER,\n },\n },\n ],\n { include: '@number' },\n // delimiter: after number because of .\\d floats\n [/[;,.]/, PURE_GRAMMAR_TOKEN.DELIMITER],\n // strings\n // NOTE: including non-teminated string so as people type ', we can start showing them that they're working on a string\n [/'([^'\\\\]|\\\\.)*$/, `${PURE_GRAMMAR_TOKEN.STRING}.invalid`],\n [/'/, PURE_GRAMMAR_TOKEN.STRING, '@string'],\n { include: '@characters' },\n ],\n pure: [\n // type\n [/(@package\\*)/, [PURE_GRAMMAR_TOKEN.PACKAGE]], // import path\n [\n /(@package?)(@identifier)(@generics?)(\\s*)(@multiplicity)/,\n [\n PURE_GRAMMAR_TOKEN.PACKAGE,\n PURE_GRAMMAR_TOKEN.TYPE,\n PURE_GRAMMAR_TOKEN.GENERICS,\n PURE_GRAMMAR_TOKEN.WHITESPACE,\n PURE_GRAMMAR_TOKEN.MULTIPLICITY,\n ],\n ],\n [\n /(@package)(@identifier)(@generics?)/,\n [\n PURE_GRAMMAR_TOKEN.PACKAGE,\n PURE_GRAMMAR_TOKEN.TYPE,\n PURE_GRAMMAR_TOKEN.GENERICS,\n ],\n ],\n // special operators that uses type (e.g. constructor, cast)\n [\n /([@^])(\\s*)(@package?)(@identifier)(@generics?)(@multiplicity?)/,\n [\n `${PURE_GRAMMAR_TOKEN.TYPE}.operator`,\n PURE_GRAMMAR_TOKEN.WHITESPACE,\n PURE_GRAMMAR_TOKEN.PACKAGE,\n PURE_GRAMMAR_TOKEN.TYPE,\n PURE_GRAMMAR_TOKEN.GENERICS,\n PURE_GRAMMAR_TOKEN.MULTIPLICITY,\n ],\n ],\n // property / parameter\n [\n /(\\.\\s*)(@identifier)/,\n [PURE_GRAMMAR_TOKEN.DELIMITER, PURE_GRAMMAR_TOKEN.PROPERTY],\n ],\n [\n /(@identifier)(\\s*=)/,\n [PURE_GRAMMAR_TOKEN.PROPERTY, PURE_GRAMMAR_TOKEN.OPERATOR],\n ],\n [\n /(@identifier)(\\.)(@identifier)/,\n [\n PURE_GRAMMAR_TOKEN.TYPE,\n PURE_GRAMMAR_TOKEN.OPERATOR,\n PURE_GRAMMAR_TOKEN.PROPERTY,\n ],\n ], // could be: property chain, profile tag, and stereotype\n [\n /(@identifier)(\\s*:)/,\n [PURE_GRAMMAR_TOKEN.PARAMETER, PURE_GRAMMAR_TOKEN.OPERATOR],\n ],\n // variables\n [\n /(let)(\\s+)(@identifier)(\\s*=)/,\n [\n PURE_GRAMMAR_TOKEN.KEYWORD,\n PURE_GRAMMAR_TOKEN.WHITESPACE,\n PURE_GRAMMAR_TOKEN.VARIABLE,\n PURE_GRAMMAR_TOKEN.OPERATOR,\n ],\n ],\n [/(\\$@identifier)/, [`${PURE_GRAMMAR_TOKEN.VARIABLE}.reference`]],\n ],\n date: [\n [/(%latest)/, [`${PURE_GRAMMAR_TOKEN.DATE}.latest`]],\n [/(@date)/, [PURE_GRAMMAR_TOKEN.DATE]],\n [/(@time)/, [`${PURE_GRAMMAR_TOKEN.DATE}.time`]],\n ],\n color: [[/(#[0-9a-fA-F]{6})/, [PURE_GRAMMAR_TOKEN.COLOR]]],\n number: [\n [\n /(@digits)[eE]([-+]?(@digits))?[fFdD]?/,\n `${PURE_GRAMMAR_TOKEN.NUMBER}.float`,\n ],\n [\n /(@digits)\\.(@digits)([eE][-+]?(@digits))?[fFdD]?/,\n `${PURE_GRAMMAR_TOKEN.NUMBER}.float`,\n ],\n [/0[xX](@hexdigits)[Ll]?/, `${PURE_GRAMMAR_TOKEN.NUMBER}.hex`],\n [/0(@octaldigits)[Ll]?/, `${PURE_GRAMMAR_TOKEN.NUMBER}.octal`],\n [/0[bB](@binarydigits)[Ll]?/, `${PURE_GRAMMAR_TOKEN.NUMBER}.binary`],\n [/(@digits)[fFdD]/, `${PURE_GRAMMAR_TOKEN.NUMBER}.float`],\n [/(@digits)[lL]?/, PURE_GRAMMAR_TOKEN.NUMBER],\n ],\n whitespace: [\n [/[ \\t\\r\\n]+/, PURE_GRAMMAR_TOKEN.WHITESPACE],\n [/\\/\\*\\*(?!\\/)/, `${PURE_GRAMMAR_TOKEN.COMMENT}.doc`, '@doc'],\n [/\\/\\*/, PURE_GRAMMAR_TOKEN.COMMENT, '@comment'],\n [/\\/\\/.*$/, PURE_GRAMMAR_TOKEN.COMMENT],\n ],\n comment: [\n [/[^/*]+/, PURE_GRAMMAR_TOKEN.COMMENT],\n // [/\\/\\*/, PURE_GRAMMAR_TOKEN.COMMENT, '@push' ], // nested comment not allowed :-(\n // [/\\/\\*/, ${PURE_GRAMMAR_TOKEN.COMMENT}.invalid` ], // this breaks block comments in the shape of /* //*/\n [/\\*\\//, PURE_GRAMMAR_TOKEN.COMMENT, '@pop'],\n [/[/*]/, PURE_GRAMMAR_TOKEN.COMMENT],\n ],\n // Identical copy of comment above, except for the addition of .doc\n doc: [\n [/[^/*]+/, `${PURE_GRAMMAR_TOKEN.COMMENT}.doc`],\n // [/\\/\\*/, `${PURE_GRAMMAR_TOKEN.COMMENT}.doc`, '@push' ], // nested comment not allowed :-(\n [/\\/\\*/, `${PURE_GRAMMAR_TOKEN.COMMENT}.doc.invalid`],\n [/\\*\\//, `${PURE_GRAMMAR_TOKEN.COMMENT}.doc`, '@pop'],\n [/[/*]/, `${PURE_GRAMMAR_TOKEN.COMMENT}.doc`],\n ],\n string: [\n [/[^\\\\']+/, PURE_GRAMMAR_TOKEN.STRING],\n [/@escapes/, `${PURE_GRAMMAR_TOKEN.STRING}.escape`],\n [/\\\\./, `${PURE_GRAMMAR_TOKEN.STRING}.escape.invalid`],\n [/'/, PURE_GRAMMAR_TOKEN.STRING, '@pop'],\n ],\n characters: [\n [/'[^\\\\']'/, PURE_GRAMMAR_TOKEN.STRING],\n [\n /(')(@escapes)(')/,\n [\n PURE_GRAMMAR_TOKEN.STRING,\n `${PURE_GRAMMAR_TOKEN.STRING}.escape`,\n PURE_GRAMMAR_TOKEN.STRING,\n ],\n ],\n [/'/, `${PURE_GRAMMAR_TOKEN.STRING}.invalid`],\n ],\n },\n});\nexport function setupPureLanguageService(options) {\n monacoLanguagesAPI.register({ id: CODE_EDITOR_LANGUAGE.PURE });\n monacoLanguagesAPI.setLanguageConfiguration(CODE_EDITOR_LANGUAGE.PURE, configuration);\n monacoLanguagesAPI.setMonarchTokensProvider(CODE_EDITOR_LANGUAGE.PURE, generateLanguageMonarch(options?.extraKeywords ?? []));\n}\n//# sourceMappingURL=PureLanguageService.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport packageJson from '../../package.json' assert { type: 'json' };\nimport { LegendREPLApplicationPlugin } from '../stores/LegendREPLApplicationPlugin.js';\nimport { configureCodeEditorComponent, setupPureLanguageService, } from '@finos/legend-lego/code-editor';\nexport class Core_LegendREPLApplicationPlugin extends LegendREPLApplicationPlugin {\n static NAME = packageJson.extensions.applicationREPLPlugin;\n constructor() {\n super(Core_LegendREPLApplicationPlugin.NAME, packageJson.version);\n }\n getExtraApplicationSetups() {\n return [\n async (application) => {\n await configureCodeEditorComponent(application);\n setupPureLanguageService();\n },\n ];\n }\n}\n//# sourceMappingURL=Core_LegendREPLApplicationPlugin.js.map","import { jsx as _jsx } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { createRoot } from 'react-dom/client';\nimport { LegendApplication, ApplicationStoreProvider, Core_LegendApplicationPlugin, getApplicationRootElement, } from '@finos/legend-application';\nimport { LegendREPLApplicationConfig, } from './LegendREPLApplicationConfig.js';\nimport { LegendREPLPluginManager } from './LegendREPLPluginManager.js';\nimport { LegendREPLWebApplication } from '../components/LegendREPLApplication.js';\nimport { Core_LegendREPLApplicationPlugin } from '../components/Core_LegendREPLApplicationPlugin.js';\nexport class LegendREPL extends LegendApplication {\n static create() {\n const application = new LegendREPL(LegendREPLPluginManager.create());\n application.withBasePlugins([\n new Core_LegendApplicationPlugin(),\n new Core_LegendREPLApplicationPlugin(),\n ]);\n application.withBasePresets([]);\n return application;\n }\n async configureApplication(input) {\n return new LegendREPLApplicationConfig(input);\n }\n async loadApplication(application) {\n createRoot(getApplicationRootElement()).render(_jsx(ApplicationStoreProvider, { store: application, children: _jsx(LegendREPLWebApplication, { baseUrl: this.baseAddress }) }));\n }\n}\n//# sourceMappingURL=LegendREPL.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF 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 { LegendREPL } from './application/LegendREPL.js';\nimport { Core_LegendREPLApplicationPlugin } from './components/Core_LegendREPLApplicationPlugin.js';\nexport class LegendREPLWebApplication {\n static getPresetCollection() {\n return [];\n }\n static getPluginCollection() {\n return [new Core_LegendREPLApplicationPlugin(), new WebConsole()];\n }\n static run(baseUrl) {\n LegendREPL.create()\n .setup({ baseAddress: baseUrl })\n .withPresets(LegendREPLWebApplication.getPresetCollection())\n .withPlugins(LegendREPLWebApplication.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 { LegendREPLWebApplication } from '@finos/legend-application-repl';\nimport '../lib/tailwind.css'; // eslint-disable-line @finos/legend-studio/no-cross-workspace-non-export-usage\nimport './index.css';\n\n// Resolve baseUrl relatively for application to work in vscode code-server\nconst relativeBaseUrl = new URL('./', window.location.href).pathname;\nLegendREPLWebApplication.run(relativeBaseUrl);\n","// 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};","// The chunk loading function for additional chunks\n// Since all referenced chunks are already included\n// in this file, this function is empty here.\n__webpack_require__.e = () => (Promise.resolve());","__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 = \"./\";","// no baseURI\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t57: 0\n};\n\n// no chunk on demand loading\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_repl_deployment\"] = globalThis[\"webpackChunk_finos_legend_application_repl_deployment\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","__webpack_require__.nc = undefined;","// startup\n// Load entry module and return exports\n// This entry module depends on other loaded chunks and execution need to be delayed\nvar __webpack_exports__ = __webpack_require__.O(undefined, [121], () => (__webpack_require__(9501)))\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n"],"names":["deferred","leafPrototypes","getProto","LOG_LEVEL","PluginInfo","name","version","signature","uuid","constructor","this","getName","getVersion","getSignature","getUUID","getInfo","info","configure","configData","AbstractPluginManager","plugins","presets","usePlugins","usePresets","Object","keys","forEach","key","configObj","preset","plugin","install","filter","getHiddenPluginNames","includes","map","sort","a","b","localeCompare","getHiddenPresetNames","LogEvent","channel","timestamp","Date","now","create","event","LoggerPlugin","level","DEBUG","setLevel","pluginManager","registerLoggerPlugin","debug","data","_debug","INFO","_info","warn","WARN","_warn","error","ERROR","_error","LogService","loggers","registerPlugins","loggerPlugins","logger","console","WebConsole","super","length","noop","pruneObject","obj","pickBy","val","undefined","getNonNullableEntry","array","idx","message","ApplicationError","Error","detail","EnrichedError","overideMessage","messageLines","match","stack","split","slice","join","captureStackTrace","IllegalStateError","unsupportedObject","value","opts","printFunctionName","maxDepth","replace","printObject","assertErrorThrown","returnUndefOnError","fn","AssertionError","isNullable","isNonNullable","assertType","clazz","guaranteeType","guaranteeNonEmptyString","str","assertNonEmptyString","assertionValue","isNaN","isPlainObject","guaranteeIsString","assertIsString","guaranteeIsNumber","assertIsNumber","guaranteeIsBoolean","assertIsBoolean","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","Promise","reject","skipProcessing","resolve","NO_CONTENT","accept","headers","Accept","APPLICATION_JSON","json","TEXT_PLAIN","createRequestHeaders","method","baseRequestHeaders","GET","CONTENT_TYPE","NetworkClient","options","baseUrl","config","get","parameters","requestProcessConfig","request","put","PUT","post","POST","DELETE","requestUrl","URL","fullUrl","Array","isArray","subVal","searchParams","append","toString","makeUrl","body","enableCompression","Blob","compressData","APPLICATION_ZLIB","requestInit","fetch","then","UNAUTHORIZED","autoReAuthenticateUrl","id","previous","document","getElementById","remove","element","createElement","src","style","display","addEventListener","appendChild","autoReAuthenticate","resp","catch","TypeError","couldBeCORS","fileName","content","contentType","blob","type","createObjectURL","link","download","href","click","removeChild","location","getQueryParameters","isFullUrl","parseUrl","query","getQueryParameterValue","paramValue","decodeURIComponent","APPLICATION_EVENT","SerializationFactory","schema","deserializeNullAsUndefined","Boolean","toJson","fromJson","optionalCustomUsingModelSchema","DocumentationEntry","markdownText","title","related","static","documentationKey","entry","serialization","collectKeyedDocumentationEntriesFromConfig","rawEntries","DocumentationService","links","docRegistry","Map","contextualDocIndex","applicationStore","documentationUrl","documentationLinkEntries","getApplicationPlugins","flatMap","getExtraKeyedDocumentationEntries","hasDocEntry","logService","DOCUMENTATION_LOAD__SKIP","set","keyedDocumentationEntries","contextualDocEntries","getExtraContextualDocumentationEntries","missingDocumentationEntries","uniq","getExtraRequiredDocumentationKeys","concat","has","push","DOCUMENTATION_REQUIREMENT_CHECK__FAILURE","hasContextualDocEntry","context","CONTEXTUAL_DOCUMENTATION_LOAD__SKIP","existingDocEntry","getDocEntry","getContextualDocEntry","getAllDocEntries","from","values","publishDocRegistry","result","publishContextualDocIndex","ACTION_STATE","CORE_TRACER_TAG","ActionState","state","_message","_messageFormatter","INITIAL","setMessage","setMessageFormatter","reset","inProgress","IN_PROGRESS","fail","FAILED","pass","SUCCEEDED","complete","hasSucceeded","sync","exportData","isInInitialState","isInProgress","hasFailed","hasCompleted","Trace","traceEntries","setup","bootstrap","clientSpan","reportSuccess","concludeClientSpan","reportError","close","concludeServerSpan","serverSpan","TracerService","createTrace","traceData","trace","createClientSpan","createServerSpan","FuzzySearchEngine","ADVANCED_FUZZY_SEARCH_MODE","VIRTUAL_ASSISTANT_TAB","FuzzySearchAdvancedConfigState","currentMode","STANDARD","onSearchModeChange","isAdvancedSearchActive","setCurrentMode","generateSearchText","INCLUDE","EXACT","INVERSE","VirtualAssistantDocumentationEntry","isOpen","docEntry","setIsOpen","VirtualAssistantContextualDocumentationEntry","isValidVirtualAssistantDocumentationEntry","shouldDisplayVirtualAssistantDocumentationEntry","AssistantService","panelRenderingKey","isHidden","isPanelMaximized","selectedTab","SEARCH","currentDocumentationEntry","searchEngine","searchConfigurationState","searchState","searchText","searchResults","showSearchConfigurationMenu","isOverSearchLimit","currentContextualDocumentationEntry","setIsHidden","setIsPanelMaximized","setSelectedTab","setSearchText","resetSearch","search","openDocumentationEntry","refreshPanelRendering","setShowSearchConfigurationMenu","documentationService","includeScore","shouldSort","ignoreLocation","threshold","weight","useExtendedSearch","navigationContextService","currentContext","openDocumentationEntryLink","navigationService","navigator","visitAddress","hideAssistant","toggleAssistant","limit","DOCUMENTATION_SEARCH_RESULTS_LIMIT","item","EventService","notifierPlugins","registerEventNotifierPlugins","notify","LegendApplicationTelemetryHelper","logEvent_ApplicationInitializationSucceeded","service","logEvent","APPLICATION_LOAD__SUCCESS","application","appName","appVersion","env","browser","userAgent","screen","height","window","width","logEvent_ApplicationContextAccessed","APPLICATION_CONTEXT__ACCESS","logEvent_VirtualAssistantDocumentationEntryAccessed","VIRTUAL_ASSISTANT_DOCUMENTATION_ENTRY__ACCESS","logEvent_ApplicationUsageInterrupted","APPLICATION_USAGE__INTERRUPT","ApplicationNavigationContextService","contextStack","pop","newContextStack","ctx","isTransient","find","getExtraAccessEventLoggingApplicationContextKeys","telemetryService","existingCtx","indexOf","CommandService","commandRegistry","registerCommand","deregisterCommand","command","commandKey","COMMAND_CENTER_REGISTRATION__FAILURE","delete","runCommand","args","trigger","action","KeyboardShortcutsService","keyMap","commandKeyMap","isHotkeysBlocked","addHotkey","blockGlobalHotkeys","unblockGlobalHotkeys","getExtraKeyedCommandConfigEntries","shortcuts","defaultKeyboardShortcut","additionalKeyboardShortcuts","shortcut","keyCombination","dispatch","mappedCommandKeys","commandService","DEFAULT_MONOSPACED_FONT_FAMILY","DEFAULT_DATE_TIME_FORMAT","DISPLAY_ANSI_ESCAPE","ANSI_moveCursor","line","column","ConsoleSearchConfiguration","searchInput","useRegex","matchWholeWord","matchCaseSensitive","resultCount","currentResultIndex","setSearchInput","el","focus","Console","searchConfig","setSearchRegex","setSearchWholeWord","setSearchCaseSensitive","setSearchResultCount","setSearchCurrentResultIndex","Terminal","preserveLog","setPreserveLog","showHelp","showCommonANSIEscapeSequences","capitalize","toUpperCase","TITLE_CASE_EXCEPTION_WORDS","toTitleCase","trim","toLowerCase","KEYBOARD_NAMED_KEY","parseKeybinding","press","modifiers","isMatchingKeyPressData","keyPressData","code","every","modifier","getModifierState","SHIFT","META","ALT","CONTROL","isMatchingKeyCombination","createKeybindingsHandler","possibleMatches","timer","KeyboardEvent","uniqBy","combinations","combination","handler","parsedKeyCombination","remainingExpectedKeyPresses","currentExpectedKeyPress","clearTimeout","setTimeout","clear","bind","LegendCustomMUITheme","createTheme","transitions","LegendStyleProvider","props","children","StyledEngineProvider","injectFirst","ThemeProvider","theme","generateSimpleDIVComponent","componentName","divClassName","component","className","displayName","Modal","darkMode","ModalTitle","icon","ModalHeader","ModalBody","ModalFooter","ActionAlertType","ActionAlertActionType","AlertService","blockingAlertInfo","actionAlertInfo","setBlockingAlert","setActionAlertInfo","alertInfo","keyboardShortcutsService","notificationService","notifyIllegalState","ApplicationStoreContext","createContext","useApplicationStore","useContext","ApplicationStoreProvider","store","Provider","getActionButtonClassName","PROCEED_WITH_CAUTION","PROCEED","ActionAlertContent","prompt","onClose","onEnter","actions","handleClose","alertService","Dialog","open","TransitionProps","onSubmit","preventDefault","default","onClick","e","autoFocus","label","ActionAlert","PanelLoadingIndicator","isLoading","ref","useRef","useEffect","current","parentElement","classList","add","BlockingAlert","classes","root","container","layoutService","TEMPORARY__isLightColorThemeEnabled","showLoading","CloseIcon","ThinVerticalDragHandleIcon","TimesIcon","TimesCircleIcon","CogIcon","QuestionCircleIcon","InfoCircleIcon","SearchIcon","MinusCircleIcon","CheckCircleIcon","ExclamationTriangleIcon","BugIcon","EmptyWindowRestoreIcon","WindowMaximizeIcon","MapMarkerIcon","WizardHatIcon","FaceLaughWinkIcon","FaceSadTearIcon","BeardIcon","SunglassesIcon","ChevronDownIcon","ChevronUpIcon","ChevronRightIcon","DEFAULT_NOTIFICATION_HIDE_TIME","NOTIFCATION_SEVERITY","Notification","severity","autoHideDuration","NotificationService","notification","setNotification","notifySuccess","notifyWarning","notifyError","SUCCESS","WARNING","getErrorMessage","ILEGAL_STATE","notifyUnsupportedFeature","featureName","notifyAndReturnAlternativeOnError","alternative","NotificationManager","isExpanded","setIsExpanded","useState","notificationIcon","handleCopy","guardUnhandledError","clipboardService","copyTextToClipboard","anchorOriginBottomRight","anchorOrigin","vertical","horizontal","reason","tabIndex","otherProps","paper","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","target","eventTarget","elementsFromPoint","some","anchorPosition","anchorReference","BackdropProps","invisible","disableRestoreFocus","MenuContent","forwardRef","MenuContentItem","MarkdownTextViewer","initialize","startOnLoad","contentLoaded","remarkPlugins","components","_props","node","rest","exec","groups","language","BlankPanelContent","contentRef","contentWidth","contentHeight","u","refreshMode","refreshRate","refreshOptions","trailing","showContent","setShowContent","containerRef","containerWidth","containerHeight","DEFAULT_CONTENT_PADDING","BaseRadioGroup","size","targetOptionsValuesInMatrix","arr","stepSize","matrix","i","transformToMatrix","row","op","FormControlLabel","control","Radio","checked","BasePopover","LEGEND_APPLICATION_DOCUMENTATION_KEY","VirtualAssistantDocumentationEntryViewer","toggleExpand","copyDocumentationKey","elevation","rel","VirtualAssistantContextualSupportPanel","contextualEntry","assistantService","copyContextIDToClipboard","copyCurrentContextIDToClipboard","copyContextStackToClipboard","VirtualAssistantSearchPanel","searchInputRef","debouncedSearch","useMemo","debounce","querySelectorAll","activeElement","spellCheck","onChange","placeholder","QUESTION_HOW_TO_USE_ADVANCED_SEARCH_SYNTAX","searchMode","format","VirtualAssistantPanel","triggerElement","extraViewConfigurations","getExtraVirtualAssistantViewConfigurations","currentExtensionView","hideBackdrop","PaperProps","disableEnforceFocus","transformOrigin","onKeyDown","CONTEXTUAL_SUPPORT","autoExpandOnOpen","renderer","VirtualAssistant","isDragging","setIsDragging","_key","_setKey","assistantRef","toggleAssistantPanel","bounds","onStart","onStop","nodeRef","handle","APPLICATION_COMPONENT_ELEMENT_ID","PLATFORM_NATIVE_KEYBOARD_SHORTCUTS","buildHotkeysConfiguration","keyCombinations","BackdropContainer","elementId","ApplicationComponentFrameworkProvider","keyBindingMap","onKeyEvent","removeEventListener","onVisibilityChange","hidden","timeService","recordUsageInterruption","showBackdrop","Portal","getElementByID","backdropContainerElementID","BACKDROP_CONTAINER","Backdrop","DndProvider","backend","TOP_LEVEL_CONTAINER","SimpleApplicationComponentFrameworkProvider","LEGEND_XTERM_THEME","foreground","background","cursor","selectionBackground","black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite","LEGEND_XTERM_SEARCH_THEME","matchOverviewRuler","activeMatchColorOverviewRuler","matchBackground","activeMatchBackground","DEFAULT_COMMAND_HEADER","BOLD","BRIGHT_BLUE","RESET","MAGENTA","COMMAND_START","XTerm","instance","resizer","searcher","webLinkProvider","_TEMPORARY__onKeyListener","_TEMPORARY__onDataListener","commandHistory","currentCommandSearchString","commandHistoryNavigationIdx","isRunningCommand","setupState","allowProposedApi","fontSize","letterSpacing","fontWeight","fontWeightBold","fontFamily","tabStopWidth","overviewRulerWidth","scrollback","convertEol","scrollOnUserInput","configuration","onContextLoss","dispose","loadAddon","unicode","activeVersion","attachCustomKeyEventHandler","hasSelection","urlRegex","regex","commands","commandConfig","aliases","TERMINAL_COMMAND_CONFIGURATION_CHECK__FAILURE","onDidChangeResults","resultIndex","onKey","domEvent","replaceAll","addCommandToHistory","matchingCommand","arg","finally","isFlushed","abort","deleteFromCommand","altKey","ctrlKey","computeCursorJumpMovement","movement","computeCursorMovement","scrollLines","scroll","write","seq","writeToCommand","dispatchEvent","setCommandFromHistory","onData","startsWith","trimEnd","getCommandRange","buffer","active","cols","commandText","commandFirstLine","repeat","startY","cursorIdx","baseY","cursorY","getLine","translateToString","cursorX","startX","endY","endX","back","range","distance","foundWord","charAt","rows","maxDistance","Math","min","abs","newCursorX","newCursorY","abs_cursorY","ceil","max","floor","viewportY","right","setCommand","cursorMovement","isSetup","isFocused","textarea","mount","autoResize","fit","at","unshift","padEnd","newCommand","newSystemCommand","DIM","flushScreen","isLastLineEmpty","lineText","scrollToTop","resetANSIStyling","scrollToBottom","BRIGHT_BLACK","BRIGHT_GREEN","description","usage","chunk","systemCommand","RED","output","findNext","decorations","wholeWord","caseSensitive","incremental","clearSearch","clearDecorations","clearSelection","findPrevious","getContent","lines","copy","getSelection","alertUnhandledError","copyAll","TerminalService","terminal","UNKNOWN_USER_ID","IdentityService","currentUser","setCurrentUser","isAnonymous","LEGEND_APPLICATION_COLOR_THEME","LocalStorage","localStorage","setItem","getItem","removeItem","hasItem","StorageStore","storeIndex","storageService","getIndex","getValue","getNumericValue","getStringValue","getBooleanValue","getObjectValue","assertIsObject","guaranteeIsObject","hasValue","persistValue","updateIndex","StorageService","storage","applicationStorageKey","index","isEmpty","TelemetryService","userId","identityService","appEnv","appSessionId","appStartTime","eventType","TimeService","interruptions","finalizeTimingsRecord","stopWatch","timings","totalTime","elapsed","startTime","endTime","record","fromEntries","records","total","numberOfInteruptions","interruption","__numberOfInteruptions","DEFAULT_DARK_COLOR_THEME","DEFAULT_DARK","TEMPORARY__globalCSSClassName","colors","LEGACY_LIGHT_COLOR_THEME","LEGACY_LIGHT","HIGH_CONTRAST_LIGHT_COLOR_THEME","HIGH_CONTRAST_LIGHT","LEGEND_APPLICATION_SETTING_KEY","LEGEND_APPLICATION_SETTING_CONFIG","COLOR_THEME","defaultValue","LayoutService","colorThemeRegistry","currentColorTheme","setBackdropContainerElementID","setShowBackdrop","setColorTheme","getExtraColorThemes","colorTheme","COLOR_THEME_CONFIGURATION_CHECK__FAILURE","themeKey","settingService","TEMPORARY__syncGlobalCSSClassName","querySelector","setWindowTitle","previousTheme","newColorTheme","previousColorTheme","persist","getColor","ClipboardService","clipboard","writeText","notifySuccessMessage","NavigationService","SettingService","registry","getExtraSettingConfigurationEntries","SETTING_CONFIGURATION_CHECK__FAILURE","SETTING_RETRIVE_FAILURE","DefaultNavigator","goToLocation","reload","goToAddress","address","generateAddress","updateCurrentLocation","updateCurrentZone","zone","resetZone","getCurrentBaseAddress","getCurrentAddress","getCurrentLocation","getCurrentLocationParameters","getCurrentLocationParameterValue","getCurrentZone","blockNavigation","blockCheckers","onBlock","onNativePlatformNavigationBlock","unblockNavigation","isNavigationBlocked","INTERNAL__internalizeTransientParameter","UserDataService","USER_DATA_RETRIEVE_FAILURE","isSemVer","test","RELEASE_UPDATE_TYPE","APPLICATION_LAST_OPENED_VERSION","ReleaseNotesService","releaseNotes","showCurrentReleaseModal","showReleaseLog","isConfigured","setShowCurrentRelease","setReleaseLog","release","notes","note","collectReleaseNotes","getViewedVersion","userDataService","updateViewedVersion","showVersion","versionNotes","lastOpenedVersion","val2","numeric","showableVersions","ApplicationStore","extensionStates","initState","platform","terminalService","releaseNotesService","eventService","tracerService","getLoggerPlugins","getEventNotifierPlugins","getTelemetryServicePlugins","getTracerServicePlugins","getExtraApplicationExtensionStateBuilders","creator","getNavigator","APPLICATION_LOAD__FAILURE","logUnhandledError","ILLEGAL_APPLICATION_STATE_OCCURRED","debugProcess","processName","actionFn","DOWNLOAD_EVENTS","LegendApplicationLogger","LegendApplicationWebConsole","LegendApplication","basePresets","basePlugins","baseAddress","pluginRegister","_isConfigured","downloadHelperServiceWorkerPath","downloadHelper","withBasePresets","withPresets","withBasePlugins","withPlugins","withDownloadHelper","path","withReleaseNotes","setupApplicationStore","fetchApplicationConfiguration","client","versionData","origin","APPLICATION_CONFIGURATION__FAILURE","configureApplication","extensions","loadDocumentationRegistryData","all","documentationRegistryEntries","getExtraDocumentationRegistryEntries","simple","docData","patterns","RegExp","pattern","DOCUMENTATION_FETCH__FAILURE","start","extensionConfigData","getExtraApplicationSetups","loadApplication","workerPath","serviceWorker","register","reg","registerDownloadHelperServiceWorker","LEGEND_APPLICATION_ROOT_ELEMENT_TAG","LegendApplicationPlugin","Core_LegendApplicationPlugin","NAME","registerApplicationPlugin","enforceActions","LegendApplicationConfig","appVersionBuildTime","appVersionCommitId","input","storageKey","getDefaultApplicationStorageKey","documentation","contextualEntries","buildTime","commitSHA","resolveAbsoluteUrl","LegendREPLApplicationConfig","replUrl","useDynamicREPLServer","repl","dynamic","LegendApplicationPluginManager","telemetryServicePlugins","tracerServicePlugins","eventNotifierPlugins","applicationPlugins","registerTelemetryServicePlugin","registerTracerServicePlugin","registerEventNotifierPlugin","LegendREPLPluginManager","pureProtocolProcessorPlugins","pureGraphManagerPlugins","pureGraphPlugins","registerPureProtocolProcessorPlugin","registerPureGraphManagerPlugin","registerPureGraphPlugin","getPureGraphManagerPlugins","getPureProtocolProcessorPlugins","getPureGraphPlugins","LEGEND_APPLICATION_PARAM_TOKEN","BrowserNavigator","historyAPI","_isNavigationBlocked","_forceBypassNavigationBlocking","_blockCheckers","_beforeUnloadListener","checker","returnValue","historyApiClient","ignoreBlocking","onProceed","createHref","pathname","hash","withAppRoot","history","pushState","onpopstate","forward","currentZone","params","stringifyQueryParams","ApplicationPlatform","BrowserPlatform","initialColorTheme","INITIAL_COLOR_THEME","ApplicationPlatformContext","BrowserPlatformProvider","BrowserEnvironmentProvider","basename","REPLServerClient","networkClient","dataCube","getInfrastructureInfo","getQueryTypeahead","parseQuery","getQueryCode","getBaseQuery","getRelationReturnType","executeQuery","sha1","update","digest","hashCode","V1_ValueSpecification","V1_Variable","multiplicity","class","accept_ValueSpecificationVisitor","visitor","visit_Variable","V1_GraphFetchTree","subTrees","subTypeTrees","CORE_HASH_STRUCTURE","ROOT_PACKAGE_NAME","ATOMIC_TEST_TYPE","PRIMITIVE_TYPE","CORE_PURE_PATH","MILESTONING_STEREOTYPE","MILESTONING_VERSION_PROPERTY_SUFFIX","PackageableElementPointerType","SUPPORTED_FUNCTIONS","V1_RootGraphFetchTree","accept_GraphFetchTreeVisitor","visit_RootGraphFetchTree","ROOT_GRAPH_FETCH_TREE","V1_Multiplicity","lowerBound","upperBound","MULTIPLICITY","V1_CoreClassInstance","ONE","V1_Lambda","visit_Lambda","V1_DataTypeValueSpecification","V1_Path","startType","V1_AbstractAppliedFunction","V1_AppliedFunction","function","fControl","visit_AppliedFunction","V1_Collection","ONE_MANY","visit_Collection","V1_PrimitiveValueSpecification","V1_CDecimal","visit_CDecimal","V1_CInteger","visit_CInteger","V1_CString","visit_CString","V1_CFloat","visit_CFloat","V1_CDate","V1_CDateTime","visit_CDateTime","V1_CStrictDate","visit_CStrictDate","V1_CStrictTime","visit_CStrictTime","V1_CBoolean","visit_CBoolean","V1_AggregateValue","mapFn","aggregateFn","V1_Pair","first","second","V1_RuntimeInstance","runtime","V1_ExecutionContextInstance","executionContext","V1_PropertyGraphFetchTree","property","alias","subType","visit_PropertyGraphFetchTree","PROPERTY_GRAPH_FETCH_TREE","V1_SubTypeGraphFetchTree","subTypeClass","visit_SubTypeGraphFetchTree","SUBTYPE_GRAPH_FETCH_TREE","V1_SerializationConfig","includeType","typeKeyName","includeEnumType","removePropertiesWithNullValues","removePropertiesWithEmptySets","fullyQualifiedTypePath","includeObjectReference","V1_KeyExpression","expression","visit_KeyExpression","V1_PureList","V1_TDSAggregateValue","pmapFn","V1_TDSColumnInformation","columnFn","V1_TDSSortInformation","direction","V1_TDSOlapRank","V1_TDSOlapAggregation","columnName","V1_ColSpecArray","colSpecs","V1_ColSpec","function1","function2","V1_RelationStoreAccessor","V1_PackageableElement","package","PACKAGEABLE_ELEMENT","V1_sourceInformationSerialization","sourceId","startLine","startColumn","endLine","endColumn","V1_INTERNAL__PackageableElementWithSourceInformation","sourceInformation","PACKAGEABLE_ELEMENT_POINTER","V1_multiplicityModelSchema","V1_PathElement","V1_PropertyPathElement","V1_AppliedProperty","visit_AppliedProperty","V1_Runtime","mappings","connectionStores","connections","ENGINE_RUNTIME","SINGLE_ENGINE_RUNTIME","V1_RuntimePointer","RUNTIME_POINTER","V1_RuntimeType","V1_runtimePointerModelSchema","_type","runtimeValue","PACKAGEABLE_RUNTIME","accept_PackageableElementVisitor","visit_PackageableRuntime","V1_serializeRuntimeValue","protocol","V1_deserializeRuntimeValue","V1_ExecutionContext","queryTimeOutInSeconds","enableConstraints","V1_AnalyticsExecutionContext","useAnalytics","toFlowSetFunction","V1_BaseExecutionContext","V1_PackageableElementPtr","fullPath","visit_PackageableElementPtr","V1_GenericTypeInstance","visit_GenericTypeInstance","V1_ClassInstance","visit_ClassInstance","V1_ExecutionContextType","V1_PathElementType","V1_GraphFetchTreeType","V1_ClassInstanceType","V1_ValueSpecificationType","V1_variableModelSchema","VARIABLE","V1_lambdaModelSchema","LAMBDA","V1_serializeValueSpecification","V1_deserializeValueSpecification","keyExpressionModelSchema","KEY_EXPRESSION","appliedFunctionModelSchema","APPLIED_FUNCTION","appliedPropertyModelSchema","APPLIED_PROPERTY","packageableElementPtrSchema","PACKAGEABLE_ELEMENT_PTR","genericTypeInstanceSchema","GENERIC_TYPE_INSTANCE","deserializeHackedUnit","unitType","deserializeHackedClass","collectionModelSchema","COLLECTION","enumValueModelSchema","visit_EnumValue","ENUM_VALUE","CDecimalModelSchema","CDECIMAL","CIntegerModelSchema","CINTEGER","CStringModelSchema","CSTRING","CFloatModelSchema","CFLOAT","CDateTimeModelSchema","CDATETIME","CStrictTimeModelSchema","CSTRICTTIME","CStrictDateModelSchema","CSTRICTDATE","CLatestDateModelSchema","visit_CLatestDate","CLATESTDATE","CBooleanModelSchema","CBOOLEAN","CByteArrayModelSchema","visit_CByteArray","CBYTEARRAY","deserializePrimitiveValueSpecification","deserializer","collection","ZERO","classInstanceModelSchema","CLASS_INSTANCE","pathModelSchema","rootGraphFetchTreeModelSchema","executionContextInstanceModelSchema","aggregationValueModelSchema","pairModelSchema","pureListModelSchema","runtimeInstanceModelSchema","serializationConfigModelSchema","tdsAggregrateValueModelSchema","tdsColumnInformationModelSchema","tdsOlapAggregationModelSchema","tdsOlapRankModelSchema","tdsSortInformationModelSchema","colSpecModelSchema","colSpecArrayModelSchema","relationStoreAccessorModelSchema","serializers","V1_getExtraClassInstanceValueProtocolSerializers","serializer","V1_serializeClassInstanceValue","PATH","AGGREGATE_VALUE","EXECUTION_CONTEXT_INSTANCE","PAIR","PURE_LIST","RUNTIME_INSTANCE","SERIALIZATION_CONFIG","TDS_AGGREGATE_VALUE","TDS_COLUMN_INFORMATION","TDS_OLAP_AGGREGATION","TDS_OLAP_RANK","TDS_SORT_INFORMATION","COL_SPEC","COL_SPEC_ARRAY","RELATION_STORE_ACCESSOR","deserializers","V1_getExtraClassInstanceValueProtocolDeserializers","V1_deserializeClassInstanceValue","propertyPathElementModelSchema","PROPERTY_PATH_ELEMENT","V1_serializePathElement","V1_deserializePathElement","V1_serializeGraphFetchTree","V1_deserializeGraphFetchTree","propertyGraphFetchTreeModelSchema","subTypeGraphFetchTreeModelSchema","analyticsExecutionContextModelSchema","ANALYTICS_EXECUTION_CONTEXT","baseExecutionContextModelSchema","BASE_EXECUTION_CONTEXT","V1_serializeExecutionContext","V1_deserializeExecutionContext","V1_serializeRuntime","includeEnumTypee","removePropertiesWithNullValuese","removePropertiesWithEmptySetse","fullyQualifiedTypePathe","includeObjectReferencee","V1_ValueSpecificationSerializer","visit_INTERNAL__UnknownValueSpecfication","valueSpecification","HACKED_CLASS","UNIT_TYPE","HACKED_UNIT","ENUM","CLASS","MAPPING_INSTANCE","extractElementNameFromPath","findLast","matchFunctionName","functionName","functionFullPaths","functionFullPath","DataCubeQuerySnapshot","_finalized","_hashCode","sourceQuery","sourceColumns","leafExtendedColumns","selectColumns","groupBy","pivot","groupExtendedColumns","sortColumns","clone","stageCols","stage","isFinalized","finalize","computeHashCode","_findCol","c","_getCol","TailwindCSSPalette","transparent","slate","gray","zinc","neutral","stone","orange","amber","lime","emerald","teal","sky","indigo","violet","purple","fuchsia","pink","rose","DataCubeFunction","DEFAULT_LAMBDA_VARIABLE_NAME","DataCubeNumberScale","DataCubeSelectionStat","DataCubeFont","DataCubeFontTextAlignment","DataCubeFontCase","DataCubeFontFormatUnderlineVariant","DataCubeColumnKind","DataCubeOperationValueType","DataCubeAggregateOperation","DataCubeQueryFilterOperation","DataCubeQueryFilterGroupOperation","DataCubeQuerySortOperation","DataCubeColumnPinPlacement","DataCubeColumnDataType","getDataType","NUMBER","INTEGER","DECIMAL","FLOAT","DATE","DATETIME","STRICTDATE","STRING","TEXT","DEFAULT_URL_LABEL_QUERY_PARAM","DEFAULT_GRID_LINE_COLOR","DEFAULT_ROW_HIGHLIGHT_BACKGROUND_COLOR","DEFAULT_FONT_FAMILY","ROBOTO","DEFAULT_FONT_BOLD","DEFAULT_FONT_ITALIC","DEFAULT_FONT_UNDERLINED","DEFAULT_FONT_STRIKETHROUGH","DEFAULT_TEXT_ALIGN","LEFT","DEFAULT_FOREGROUND_COLOR","DEFAULT_BACKGROUND_COLOR","DEFAULT_ROW_BACKGROUND_COLOR","DEFAULT_NEGATIVE_FOREGROUND_COLOR","DEFAULT_ZERO_FOREGROUND_COLOR","DEFAULT_ERROR_FOREGROUND_COLOR","DataCubeColumnConfiguration","kind","DIMENSION","decimals","displayCommas","negativeNumberInParens","numberScale","missingValueDisplayText","hPivotSortFunction","fontBold","fontItalic","fontUnderline","fontStrikethrough","fontCase","textAlign","normalForegroundColor","negativeForegroundColor","zeroForegroundColor","errorForegroundColor","normalBackgroundColor","negativeBackgroundColor","zeroBackgroundColor","errorBackgroundColor","blur","hideFromView","fixedWidth","minWidth","maxWidth","pinned","displayAsLink","linkLabelParameter","DataCubeConfiguration","columns","showTreeLines","showHorizontalGridLines","showVerticalGridLines","gridLineColor","alternateRows","alternateRowsStandardMode","alternateRowsColor","alternateRowsCount","initialExpandLevel","showRootAggregation","showLeafCount","addPivotTotalColumn","addPivotTotalColumnOnLeft","treeGroupSortFunction","selectionStats","showWarningForTruncatedResult","_deserializeToLambda","_var","variable","_property","_lambda","lambda","_function","func","_collection","_primitiveValue","_val","primitiveValue","BOOLEAN","STRICTTIME","_elementPtr","ptr","_classInstance","_colSpec","colSpec","_parameterValue","_agg","agg","param","operation","SUM","AVERAGE","COUNT","MIN","MAX","FIRST","LAST","VAR_POP","VAR_SAMP","STDDEV_POP","STDDEV_SAMP","_aggFunctionName","_cols","colSpecArray","_groupByAggCols","_filter","group","groupOperation","AND","OR","conditions","condition","_cond","p","_not","NOT","EQUAL","GREATER_THAN","GREATER_THAN_OR_EQUAL","GREATER_THAN_EQUAL","LESS_THAN","LESS_THAN_OR_EQUAL","LESS_THAN_EQUAL","CONTAINS","ENDS_WITH","STARTS_WITH","BLANK","IS_EMPTY","NOT_EQUAL","NOT_BLANK","NOT_CONTAINS","_groupByExtend","columnsUsedInGroupBy","missingCols","col","EXTEND","buildDefaultColumnConfiguration","MEASURE","RIGHT","_param","paramIdx","_colSpecArrayParam","_funcMatch","functionNames","_SUPPORTED_TOP_LEVEL_FUNCTIONS","FILTER","SELECT","GROUP_BY","LIMIT","PIVOT","SORT","CAST","_FUNCTION_SEQUENCE_COMPOSITION_PATTERN","_FUNCTION_SEQUENCE_COMPOSITION_PATTERN_REGEXP","required","validateAndBuildQuerySnapshot","partialQuery","baseQuery","funcMap","sequence","leafExtend","groupExtend","aggregationFuncIndex","findLastIndex","firstExtendIndex","findIndex","secondExtendIndex","select","pivotCast","extractFunctionMap","currentQuery","supportedFunc","spec","vs","pivotFunc","castFunc","extractQueryFunctionSequence","snapshot","source","colsMap","_col","aggColumns","_aggCol","sortColFunc","ASC","DESC","ASCENDING","DESCENDING","buildDefaultConfiguration","_defaultAggCol","_rowGroupingCountCol","INTERNAL__GRID_CLIENT_ROW_GROUPING_COUNT_AGG_COLUMN_ID","cn","inputs","DataCubeIcon","AdvancedSettings","AlertError","AlertInfo","AlertWarning","CaretDown","CaretRight","Checkbox","CheckboxSelected","ChevronLeft","ChevronRight","ChevronDown","Code","Cube","Debug","Documentation","DocumentationHint","FontBold","FontCase","FontItalic","FontUnderline","FontStrikethrough","Loader","Menu","Note","Pin","Search","Settings","Table","TableColumn","TableColumnOptions__Settings","TableColumns","TableExtendedColumn","TableFilter","TableFilterPlus","TableFilterCode","TableGroupBy","TableOptions","TablePagination","TablePivot","TablePlus","TableRemoveColumn","TableRow","TableRowColumn","TableScroll","TableSort","TextAlignLeft","TextAlignCenter","TextAlignRight","Window","X","Warning","WarningCircle","AlertType","Alert","BlockingActionAlertContent","slotProps","backdrop","CAUTION","BlockingActionAlert","LayoutConfiguration","contentRenderer","WindowState","LayoutManagerState","windows","newWindow","bringWindowFront","closeWindow","w","WINDOW_DEFAULT_OFFSET","DEFAULT_TOOL_PANEL_WINDOW_CONFIG","minHeight","center","DEFAULT_SMALL_ALERT_WINDOW_CONFIG","DEFAULT_LARGE_ALERT_WINDOW_CONFIG","SingletonModeDisplayState","layoutManagerState","DataCubeGridClientExportFormat","INTERNAL__GridClientUtilityCssClassName","generateFontFamilyUtilityClassName","FONT_FAMILY_PREFIX","generateFontSizeUtilityClassName","FONT_SIZE_PREFIX","generateFontUnderlineUtilityClassName","variant","FONT_UNDERLINE_PREFIX","generateFontCaseUtilityClassName","FONT_CASE_PREFIX","generateTextAlignUtilityClassName","alignment","TEXT_ALIGN_PREFIX","generateTextColorUtilityClassName","color","TEXT_COLOR_PREFIX","generateBackgroundColorUtilityClassName","BACKGROUND_COLOR_PREFIX","INTERNAL__GRID_CLIENT_MAX_CACHE_BLOCK_SIZE","INTERNAL__GRID_CLIENT_MISSING_VALUE","INTERNAL__GRID_CLIENT_TREE_COLUMN_ID","GridClientPinnedAlignement","GridClientSortDirection","GridClientAggregateOperation","getDataForAllNodes","forEachNode","getDataForAllFilteredNodes","forEachNodeAfterFilter","DataCubeGridClientServerSideDataSource","grid","rowCount","fetchRows","task","newTask","rowGroupCols","api","setColumnsVisible","currentSnapshot","getLatestSnapshot","syncedSnapshot","baseSnapshot","availableCols","sortModel","colId","buildQuerySnapshot","publishSnapshot","executableQuery","_process","funcMapKey","groupByExtend","pagination","SLICE","end","FROM","postProcessor","buildExecutableQuery","drilldownValues","groupKeys","_unprocess","splice","groupByColumn","parseInt","parseFloat","groupByIdx","groupByColumns","groupByFunc","isPaginationEnabled","startRow","endRow","engine","rowData","tds","_row","rowIdx","colIdx","String","enableDebugMode","executedQuery","executedSQL","success","dataCubeEngine","disableLargeDatasetWarning","alert","setPaginationEnabled","setDisableLargeDatasetWarning","windowConfig","ensureIndexVisible","parentNode","rowIndex","alertError","endTask","getRows","DataCubeQuerySnapshotSubscriber","latestSnapshot","receiveSnapshot","previousSnapshot","applySnapshot","snapshotManager","broadcastSnapshot","_cellDataType","_allowedAggFuncs","scaleNumber","PERCENT","unit","BASIS_POINT","THOUSANDS","MILLIONS","BILLIONS","TRILLIONS","AUTO","DataCubeGridLoadingCellRenderer","failedLoad","_displaySpec","columnData","dataType","cellRenderer","getCellRenderer","cellDataType","hide","valueFormatter","showNegativeNumberInParens","scaledNumber","formattedValue","toLocaleString","useGrouping","minimumFractionDigits","maximumFractionDigits","loadingCellRenderer","cellClassRules","FONT_BOLD","FONT_ITALIC","FONT_STRIKETHROUGH","BLUR","tooltipValueGetter","_sizeSpec","resizable","_sortSpec","sortCol","sortable","sortIndex","_rowGroupSpec","rowGroupColumn","groupByCol","aggCol","enableRowGroup","enableValue","rowGroup","rowGroupIndex","aggFunc","allowedAggFuncs","generateBaseGridOptions","rowGroupPanelShow","groupDisplayType","suppressRowGroupHidesColumns","suppressAggFuncInHeader","getChildCount","alwaysMultiSort","rowHeight","headerHeight","suppressBrowserResizeObserver","noRowsOverlayComponent","loadingOverlayComponent","onBodyScroll","getDisplayedRowCount","getVerticalPixelRange","bottom","setScrollHintText","hidePopupMenu","onBodyScrollEnd","preventDefaultOnContextMenu","columnMenu","getContextMenuItems","controller","menuBuilder","getMainMenuItems","autoSizePadding","autoSizeStrategy","tooltipShowDelay","tooltipInteraction","suppressDragLeaveHidesColumns","suppressScrollOnNewData","suppressServerSideFullWidthLoadingRow","enableRangeSelection","sideBar","toolPanels","labelDefault","labelKey","iconKey","toolPanel","toolPanelParams","suppressValues","suppressPivotMode","suppressPivots","position","allowDragFromColumnsToolPanel","animateRows","suppressColumnMoveAnimation","useDropdownMenu","currentTarget","DropdownMenu","marginThreshold","DropdownMenuItem","FormBadge_WIP","FormBadge_Advanced","FormNumberInput","step","setValue","isValid","isDecimal","inputValue","setInputValue","inputMode","newInputValue","numericValue","onBlur","FormTextInput","FormCheckbox","checkedIcon","disableRipple","FormDropdownMenuTrigger","FormDropdownMenu","FormDropdownMenuItem","FormDropdownMenuItemSeparator","FormColorPicker","defaultColor","setColor","submit","alpha","scale","onDoubleClick","_color","prefix","FormColorPickerButton","FormDocumentation","useREPLStore","documentationEntry","documentationDisplay","WIP_GridMenuItem","subMenu","configureDefaults","DataCubeGridControllerState","selectableColumns","verticalPivotableColumns","verticalPivotedColumns","sortableColumns","getColumnConfiguration","colName","pinColumn","placement","columnConfiguration","applyChanges","rearrangeColumns","columnByNames","removeAllPins","showColumn","isVisible","setVerticalPivotOnColumn","addVerticalPivotOnColumn","removeVerticalPivotOnColumn","clearAllVerticalPivots","getActionableSortColumn","sortColumn","setSortByColumn","addSortByColumn","clearSortByColumn","clearAllSorts","newSnapshot","editor","getColId","menuItem","cssClasses","exportEngine","exportFile","EXCEL","CSV","exportEmail","autoSizeColumns","setColumnWidths","newWidth","autoSizeAllColumns","sizeColumnsToFit","isPinnedLeft","isPinnedRight","isPinned","generateMenuBuilder","blobToBase64","reader","FileReader","onloadend","base64Data","onerror","readAsDataURL","EMAIL_MIXED_BOUNDARY","EMAIL_ALTERNATIVE_BOUNDARY","EMAIL_CONTENT","DataCubeGridClientExportEngine","generateFileName","core","exportDataAsCsv","exportDataAsExcel","attachment","fileNameWithExtension","TEXT_CSV","getDataAsCsv","APPLICATION_XLSX","xlsxContent","getDataAsExcel","xlsxBlob","trimStart","MESSAGE_RFC822","DataCubeGridDatasourceConfiguration","DataCubeGridState","_client","clientDataSource","scrollHintText","datasourceConfiguration","queryConfiguration","updateGridOptions","cacheBlockSize","configureClient","existingExtraConfiguration","gridOptions","rowClassRules","HIGHLIGHT_ROW","rowBuffer","onColumnPinned","getPinned","onColumnMoved","finished","getColumnDefs","onColumnVisible","columnDefs","headerName","showRowGroup","lockPinned","lockPosition","cellStyle","flex","justifyContent","field","menuTabs","generateGridOptionsFromSnapshot","DataCubeEditorColumnsSelectorColumnState","DataCubeEditorColumnsSelectorColumnsVisibility","V1_EngineErrorType","DataCubeEditorColumnsSelectorState","selectedColumns","availableColumnsSearchText","selectedColumnsSearchText","columnsVisibility","availableColumns","availableColumnsForDisplay","selectedColumnsForDisplay","setSelectedColumns","setAvailableColumnsSearchText","setSelectedColumnsSearchText","setColumnsVisibility","initialColumnsVisibility","VISIBLE","visibility","HIDDEN","columnProperties","cloneColumn","getColumn","DataCubeEditorSortColumnState","setOperation","DataCubeEditorSortColumnsSelectorState","selector","DataCubeEditorSortsPanelState","applySnaphot","buildSnapshot","SourceInformation","V1_EngineError","errorType","V1_ParserError","EngineError","ParserError","DataCubeQueryEditorState","parserError","setQuery","setParserError","processSourceInformation","DataCubeEditorCodePanelState","queryEditorState","currentSubQuery","setCurrentSubQuery","BAD_REQUEST","DataCubeMutableColumnConfiguration","aggregateFunction","aggregateFunctionParameters","excludedFromHorizontalPivot","assign","setKind","setDisplayName","setDecimals","setDisplayCommas","setNegativeNumberInParens","setNumberScale","setMissingValueDisplayText","setHPivotSortFunction","setFontFamily","setFontSize","setFontBold","setFontItalic","setFontUnderline","setFontStrikethrough","setFontCase","setTextAlign","setNormalForegroundColor","setNegativeForegroundColor","setZeroForegroundColor","setErrorForegroundColor","setNormalBackgroundColor","setNegativeBackgroundColor","setZeroBackgroundColor","setErrorBackgroundColor","setBlur","setHideFromView","setFixedWidth","setMinWidth","setMaxWidth","setPinned","setDisplayAsLink","setLinkLabelParameter","isUsingDefaultStyling","useDefaultStyling","setAggregateFunction","setAggregateFunctionParameters","setExcludedFromHorizontalPivot","createDefault","serialize","DataCubeMutableConfiguration","setDescription","setShowTreeLines","setShowHorizontalGridLines","setShowVerticalGridLines","setGridLineColor","setAlternateRows","setAlternateRowsColor","setAlternateRowsCount","setAlternateRowsStandardMode","setSelectionStats","setShowWarningForTruncatedResult","setInitialExpandLevel","setShowRootAggregation","setShowLeafCount","setAddPivotTotalColumn","setAddPivotTotalColumnOnLeft","setTreeGroupSortFunction","DataCubeEditorGeneralPropertiesPanelState","setName","setLimit","setConfiguration","DataCubeEditorColumnPropertiesPanelState","selectedColumnName","showAdvancedSettings","setColumns","setSelectedColumnName","selectedColumn","setShowAdvancedSettings","hiddenColumns","configurableColumns","DataCubeEditorBasicColumnsSelectorState","DataCubeEditorColumnsPanelState","setSourceColumns","propagateColumnSelectionChanges","sorts","verticalPivots","DataCubeEditorVerticalPivotColumnsSelectorState","DataCubeEditorVerticalPivotsPanelState","getBaseGridProps","modules","getRowId","editType","rowSelection","rowDragMultiRow","rowDragEntireRow","suppressRowClickSelection","suppressMoveWhenRowDragging","suppressRowHoverHighlight","getQuickFilter","noColumnsSelectedRenderer","onModelUpdated","showNoRowsOverlay","hideOverlay","ColumnsSearchResultCountBadge","gridApi","scope","DataCubeEditorColumnsSelector","extraColumnComponent","selectedAvailableColumns","setSelectedAvailableColumns","selectedSelectedColumns","setSelectedSelectedColumns","availableColumnsGridApi","setAvailableColumnsGridApi","selectedColumnsGridApi","setSelectedColumnsGridApi","searchAvailableColumnsInputRef","searchSelectedColumnsInputRef","onSelectedColumnsDragStop","useCallback","onAvailableColumnsDragStop","columnsToMove","nodes","onSelectedColumnsDragEnd","overIndex","selectedColumnsDropZoneParams","getRowDropZoneParams","onDragStop","clearFocusedCell","removeRowDropZone","addRowDropZone","availableColumnsDropZoneParams","rowDragManaged","onGridReady","onSelectionChanged","getSelectedNodes","quickFilterText","suppressHeaderMenuButton","checkboxSelection","headerCheckboxSelection","rowDrag","rowDragText","dragItemCount","rowNode","getQuickFilterText","headerComponent","filteredData","showHiddenIndicator","VISIBLE_WITH_WARNING","onRowDragEnd","noRowsOverlayComponentParams","getSortDirectionLabel","SortDirectionDropdown","openMenu","closeMenu","onClickCapture","DataCubeEditorSortsPanel","panel","DataCubeEditorGeneralPropertiesPanel","generalProperties","openInitialExpandLevelDropdown","closeInitialExpandLevelDropdown","initialExpandLevelDropdownProps","openSelectionStatDropdown","closeSelectionStatDropdown","selectionStatDropdownProps","openFontFamilyDropdown","closeFontFamilyDropdown","fontFamilyDropdownProps","openFontSizeDropdown","closeFontSizeDropdown","openFontSizeDropdownProps","openFontFormatUnderlineVariantDropdown","closeFontFormatUnderlineVariantDropdown","fontFormatUnderlineVariantDropdownProps","openFontCaseDropdown","closeFontCaseDropdown","fontCaseDropdownProps","ARIAL","ROBOTO_CONDENSED","font","GEORGIA","ROBOTO_SERIF","TIMES_NEW_ROMAN","JERBRAINS_MONO","ROBOTO_MONO","UBUNTU_MONO","SOLID","DASHED","DOTTED","DOUBLE","WAVY","UPPERCASE","LOWERCASE","CAPITALIZE","lowercase","uppercase","CENTER","DataCubeEditorColumnsPanel","DataCubeEditorVerticalPivotsPanel","DataCubeEditorHorizontalPivotsPanel","DataCubeEditorFilterPanel","DataCubeEditorExtendedColumnsPanel","DataCubeEditorCodePanel","DocumentationKey","DataCubeEditorColumnPropertiesPanel","gridConfiguration","openColumnsDropdown","closeColumnsDropdown","columnsDropdownProps","openKindDropdown","closeKindDropdown","kindDropdownProps","openAggregationTypeDropdown","closeAggregationTypeDropdown","aggregationTypeDropdownProps","openNumberScaleDropdown","closeNumberScaleDropdown","numberScaleDropdownProps","openColumnPinDropdown","closeColumnPinDropdown","columnPinDropdownProps","DATA_CUBE_COLUMN_KINDS","DATA_CUBE_COLUMN_DISPLAY_AS_LINK","DATA_CUBE_COLUMN_MISSING_VALUE_FORMAT","DataCubeEditor","currentTab","tabs","DataCubeEditorTab","GENERAL_PROPERTIES","COLUMN_PROPERTIES","EXTENDED_COLUMNS","COLUMNS","VERTICAL_PIVOTS","HORIZONTAL_PIVOTS","SORTS","CODE","tab","setCurrentTab","BuilderType","ExecutionActivityType","EXECUTION_SERIALIZATION_FORMAT","DataCubeEditorState","layout","DataCubeQuerySnapshotManager","subscribers","snapshots","_initialSnapshot","_initialQuery","registerSubscriber","subscriber","initialSnapshot","initialQuery","DataCubeCoreState","DataCubeTask","DataCubeState","runningTasks","ResultBuilder","ExecutionActivities","RelationalExecutionActivities","sql","comment","AggregationAwareActivities","rewrittenQuery","UnknownExecutionActivities","ExecutionResult","builder","activities","JsonExecutionResult","RawExecutionResult","INTERNAL__TDSColumn","relationalType","doc","TDSBuilder","TDS_BUILDER","TDSRow","TabularDataSet","TDSExecutionResult","_UUID","ClassBuilder","CLASS_BUILDER","ClassExecutionResult","objects","V1_ResultBuilder","V1_ExecutionActivities","V1_RelationalExecutionActivities","V1_AggregationAwareActivities","V1_ExecutionResult","V1_UnknownExecutionActivity","V1_JsonExecutionResult","builderSerialization","V1_INTERNAL__TDSColumn","V1_TDSBuilder","V1_serializeExecutionActivities","RELATIONAL","RELATIONAL_EXECUTION_ACTIVITY","AGGREGATION_AWARE_ACTIVITY","V1_TDSExecutionResult","V1_ClassExecutionResult","V1_RawExecutionResult","V1_INTERNAL__UnknownExecutionResult","INTERNAL__UnknownExecutionResult","buildExecutionActivities","metamodel","INTERNAL__buildTDSColumn","V1_buildExecutionResult","buildClassExecutionResult","buildTDSBuilder","buildTDSExecutionResult","buildJSONExecutionResult","V1_serializeExecutionResult","JSON_BUILDER","DataCubeQuerySource","DataCubeQueryColumn","DataCubeQuerySourceType","DataCubeQuerySourceREPLExecutedQuery","REPL_EXECUTED_QUERY","deserializeQuerySource","serializeQuerySource","object","DataCubeQuery","DataCubeInfrastructureInfo","gridClientLicense","DataCubeGetQueryCodeInput","pretty","DataCubeGetQueryRelationReturnTypeInput","DataCubeExecutionInput","DataCubeGetBaseQueryResult","DEFAULT_ENABLE_DEBUG_MODE","DEFAULT_GRID_CLIENT_PURGE_CLOSED_ROW_NODES","DEFAULT_DISABLE_LARGE_DATASET_WARNING","DataCubeEngine","gridClientRowBuffer","gridClientPurgeClosedRowNodes","setEnableDebugMode","setGridClientRowBuffer","setGridClientPurgeClosedRowNodes","propagateGridOptionUpdates","purgeClosedRowNodes","refreshFailedDataFetches","retryServerSideLoads","isPartial","returnSourceInformation","DocumentationPanel","SettingsPanel","save","REPLStore","settingsDisplay","x","y","windowTitle","setLicenseKey","REPLStoreContext","REPLStoreProvider","__INTERNAL__original_console_error","textColorStyle","Set","ROOT","backgroundColorStyle","agrs","DataCubeGridStyleController","styles","DataCubeGridScroller","gridClientSideBarElement","gridVerticalScrollbar","DataCubeGridStatusBar","Switch","thumb","switchBase","track","disableFocusRipple","DataCubeGridClient","rowModelType","serverSideDatasource","M","DataCubeGrid","parent","windowState","windowSpec","setWindowSpec","finalWidth","finalHeight","dragHandleClassName","onResize","delta","offsetWidth","offsetHeight","enableResizing","topRight","bottomRight","bottomLeft","topLeft","resizeHandleStyles","onMouseDown","LayoutManager","DataCubeStatusBar","bar1Indeterminate","bar2Indeterminate","DataCubeTitleBar","openMenuDropdown","closeMenuDropdown","menuDropdownProps","DataCube","ApplicationFrameworkProvider","LegendREPLBaseStore","LegendREPLBaseStoreContext","LegendREPLBaseStoreProvider","LegendREPLFrameworkProvider","LEGEND_REPL_GRID_CLIENT_ROUTE_PATTERN","freeze","DATA_CUBE","LegendREPLRouter","WrappedComponent","exact","LegendREPLWebApplication","LegendREPLApplicationPlugin","_$nominalTypeBrand","DATA_CUBE_EXTENDED_COLUMN_LEVELS","PURE_GRAMMAR_TOKEN","buildCodeEditorTheme","vscodeThemeData","baseTheme","colorsOverride","rulesOverride","baseThemeData","rawData","rules","tokenColors","tokenColor","settings","scopes","baseRule","fontStyle","rule","token","base","inherit","parseVSCodeTheme","BASE_PURE_LANGUAGE_COLOR_TOKENS","IDENTIFIER","COLOR","PACKAGE","PARSER","LANGUAGE_STRUCT","GENERICS","PROPERTY","PARAMETER","TYPE","CODE_EDITOR_THEME","DEFAULT_DARK_THEME","SOLARIZED_DARK_THEME","BUILT_IN__VSCODE_DARK","GITHUB_DARK_THEME","GITHUB_DARK_DIMMED_THEME","MATERIAL_DEFAULT_THEME","MATERIAL_DARKER_THEME","ONE_DARK_PRO_THEME","ONE_DARK_PRO_DARKER_THEME","CODE_EDITOR_LANGUAGE","PURE_ELEMENT_NAME","PURE_CONNECTION_NAME","PURE_PARSER","wordPattern","comments","lineComment","blockComment","brackets","autoClosingPairs","surroundingPairs","folding","markers","Core_LegendREPLApplicationPlugin","extraKeywords","fontLoadFailureErrorMessage","fonts","load","check","remeasureFonts","APPLICATION_SETUP__FAILURE","OVERRIDE_DEFAULT_KEYBINDING_COMMAND","accessor","hotkeyMapping","KeyCode","F1","F8","F9","KeyMod","WinCtrl","KeyG","KeyB","KeyO","KeyD","KeyP","Shift","F10","F2","F12","addKeybindingRules","nativeCodeEditorKeyBinding","keybinding","commandArgs","defineTheme","SOLARIZED_DARK","GITHUB_DARK","GITHUB_DARK_DIMMED","MATERIAL_DEFAULT","MATERIAL_DARKER","ONE_DARK_PRO","ONE_DARK_PRO_DARKER","configureCodeEditorComponent","PURE","setLanguageConfiguration","setMonarchTokensProvider","defaultToken","tokenPostfix","keywords","ASSOCIATION","ENUMERATION","PROFILE","FUNCTION","MAPPING","RUNTIME","CONNECTION","FILE_GENERATION","GENERATION_SPECIFICATION","DATA_ELEMENT","JSON_MODEL_CONNECTION","MODEL_CHAIN_CONNECTION","XML_MODEL_CONNECTION","SERVICE","FLAT_DATA","DATABASE","FLAT_DATA_CONNECTION","RELATIONAL_DATABASE_CONNECTION","operators","languageStructs","identifier","symbols","escapes","digits","octaldigits","binarydigits","hexdigits","generics","date","time","tokenizer","include","cases","KEYWORD","OPERATOR","DELIMITER","pure","WHITESPACE","number","whitespace","COMMENT","string","characters","LegendREPL","rootEl","getElementsByTagName","setAttribute","getApplicationRootElement","render","getPresetCollection","getPluginCollection","run","relativeBaseUrl","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","exports","module","loaded","__webpack_modules__","call","m","amdO","O","chunkIds","priority","notFulfilled","Infinity","fulfilled","j","r","n","getter","__esModule","d","getPrototypeOf","t","ns","def","getOwnPropertyNames","definition","o","defineProperty","enumerable","g","globalThis","Function","prop","prototype","hasOwnProperty","Symbol","toStringTag","nmd","paths","installedChunks","chunkId","webpackJsonpCallback","parentChunkLoadingFunction","moreModules","chunkLoadingGlobal","nc","__webpack_exports__"],"sourceRoot":""}
|