@devexpress/analytics-core 22.2.2-beta → 22.2.4-build-22354-0229
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/accessibility/_accordionKeyboardHelper.d.ts +2 -2
- package/accessibility/_accordionKeyboardHelper.js +2 -2
- package/accessibility/_controlElementBase.d.ts +2 -2
- package/accessibility/_controlElementBase.js +2 -2
- package/accessibility/_controlElementWithParentHighlight.d.ts +2 -2
- package/accessibility/_controlElementWithParentHighlight.js +2 -2
- package/accessibility/_internal.d.ts +2 -2
- package/accessibility/_internal.js +2 -2
- package/accessibility/_keyboardHelperBase.d.ts +2 -2
- package/accessibility/_keyboardHelperBase.js +2 -2
- package/accessibility/_keyboardHelperWithArrowButtonBase.d.ts +2 -2
- package/accessibility/_keyboardHelperWithArrowButtonBase.js +2 -2
- package/accessibility/_listKeyboardHelper.d.ts +2 -2
- package/accessibility/_listKeyboardHelper.js +2 -2
- package/accessibility/_rightPanelKeyboardHelper.d.ts +2 -2
- package/accessibility/_rightPanelKeyboardHelper.js +2 -2
- package/accessibility/_toolbarKeyboardHelper.d.ts +2 -2
- package/accessibility/_toolbarKeyboardHelper.js +2 -2
- package/accessibility/_treeListKeyboardHelper.d.ts +2 -2
- package/accessibility/_treeListKeyboardHelper.js +2 -2
- package/analytics-criteria-utils.d.ts +2 -2
- package/analytics-criteria-utils.js +2 -2
- package/analytics-criteria.d.ts +2 -2
- package/analytics-criteria.js +2 -2
- package/analytics-data-internal.d.ts +2 -2
- package/analytics-data-internal.js +2 -2
- package/analytics-data-metadata.d.ts +2 -2
- package/analytics-data-metadata.js +2 -2
- package/analytics-data-utils.d.ts +2 -2
- package/analytics-data-utils.js +2 -2
- package/analytics-data.d.ts +2 -2
- package/analytics-data.js +2 -2
- package/analytics-diagram.d.ts +2 -2
- package/analytics-diagram.js +2 -2
- package/analytics-elements-metadata.d.ts +2 -2
- package/analytics-elements-metadata.js +2 -2
- package/analytics-elements.d.ts +2 -2
- package/analytics-elements.js +2 -2
- package/analytics-internal.d.ts +6 -4
- package/analytics-internal.js +6 -4
- package/analytics-localization.d.ts +2 -2
- package/analytics-localization.js +2 -2
- package/analytics-tools.d.ts +2 -2
- package/analytics-tools.js +2 -2
- package/analytics-utils.d.ts +2 -2
- package/analytics-utils.js +2 -2
- package/analytics-version.d.ts +2 -2
- package/analytics-version.js +3 -3
- package/analytics-widgets-ace.d.ts +2 -2
- package/analytics-widgets-ace.js +2 -2
- package/analytics-widgets-filtering.d.ts +2 -2
- package/analytics-widgets-filtering.js +2 -2
- package/analytics-widgets-internal.d.ts +2 -2
- package/analytics-widgets-internal.js +2 -2
- package/analytics-widgets-metadata.d.ts +2 -2
- package/analytics-widgets-metadata.js +2 -2
- package/analytics-widgets-treeList.d.ts +2 -2
- package/analytics-widgets-treeList.js +2 -2
- package/analytics-widgets.d.ts +2 -2
- package/analytics-widgets.js +2 -2
- package/analytics-wizard-internal.d.ts +2 -2
- package/analytics-wizard-internal.js +2 -2
- package/analytics-wizard.d.ts +2 -2
- package/analytics-wizard.js +2 -2
- package/bundle/_add-analytics-to-bundle.d.ts +2 -2
- package/bundle/_add-analytics-to-bundle.js +2 -2
- package/bundle/_add-devextreme-to-bundle.d.ts +2 -2
- package/bundle/_add-devextreme-to-bundle.js +2 -2
- package/bundle/_add-querybuilder-to-bundle.d.ts +2 -2
- package/bundle/_add-querybuilder-to-bundle.js +2 -2
- package/bundle/_add-to-context.d.ts +2 -2
- package/bundle/_add-to-context.js +2 -2
- package/bundle/_validator.d.ts +2 -2
- package/bundle/_validator.js +2 -5
- package/bundle/analytic-core-bundle.d.ts +2 -2
- package/bundle/analytic-core-bundle.js +2 -2
- package/bundle/query-builder-bundle.d.ts +2 -2
- package/bundle/query-builder-bundle.js +2 -2
- package/core/_actionProvider.d.ts +2 -2
- package/core/_actionProvider.js +2 -2
- package/core/_bindings.d.ts +3 -4
- package/core/_bindings.js +45 -23
- package/core/_legacy.d.ts +2 -2
- package/core/_legacy.js +2 -2
- package/core/_metadata.d.ts +2 -2
- package/core/_metadata.js +2 -2
- package/core/binding/_jsDesignerBindingCommon.d.ts +2 -2
- package/core/binding/_jsDesignerBindingCommon.js +2 -2
- package/core/binding/_jsDesignerBindingCommonOptions.d.ts +2 -2
- package/core/binding/_jsDesignerBindingCommonOptions.js +2 -2
- package/core/binding/_requestHelper.d.ts +2 -2
- package/core/binding/_requestHelper.js +2 -2
- package/core/dragDrop/_dragDropHandler.d.ts +9 -10
- package/core/dragDrop/_dragDropHandler.js +19 -15
- package/core/dragDrop/_dragHelperContent.d.ts +2 -2
- package/core/dragDrop/_dragHelperContent.js +2 -2
- package/core/dragDrop/_selectionDragDropHandler.d.ts +4 -8
- package/core/dragDrop/_selectionDragDropHandler.js +10 -20
- package/core/dragDrop/_toolboxDragDropHandler.d.ts +3 -3
- package/core/dragDrop/_toolboxDragDropHandler.js +5 -5
- package/core/dragDrop/_wizardDragDropHandler.d.ts +4 -5
- package/core/dragDrop/_wizardDragDropHandler.js +5 -5
- package/core/elements/baseSurface.d.ts +2 -2
- package/core/elements/baseSurface.js +2 -2
- package/core/elements/elementViewModel.d.ts +2 -2
- package/core/elements/elementViewModel.js +2 -2
- package/core/elements/margins.d.ts +2 -2
- package/core/elements/margins.js +2 -2
- package/core/elements/paddingModel.d.ts +2 -2
- package/core/elements/paddingModel.js +2 -2
- package/core/elements/paddingModelMetaData.d.ts +2 -2
- package/core/elements/paddingModelMetaData.js +2 -2
- package/core/elements/point.d.ts +2 -2
- package/core/elements/point.js +2 -2
- package/core/elements/rectangle.d.ts +2 -2
- package/core/elements/rectangle.js +2 -2
- package/core/elements/serializableModel.d.ts +2 -2
- package/core/elements/serializableModel.js +2 -2
- package/core/elements/size.d.ts +2 -2
- package/core/elements/size.js +2 -2
- package/core/internal/_ajaxSetup.d.ts +2 -2
- package/core/internal/_ajaxSetup.js +2 -2
- package/core/internal/_controlsHelper.d.ts +2 -2
- package/core/internal/_controlsHelper.js +2 -2
- package/core/internal/_cssCalculator.d.ts +2 -2
- package/core/internal/_cssCalculator.js +5 -5
- package/core/internal/_draggable.d.ts +41 -0
- package/core/internal/_draggable.js +110 -0
- package/core/internal/_editorTypeMapper.d.ts +2 -2
- package/core/internal/_editorTypeMapper.js +2 -2
- package/core/internal/_getNameHelpers.d.ts +2 -2
- package/core/internal/_getNameHelpers.js +2 -2
- package/core/internal/_globalize.d.ts +2 -2
- package/core/internal/_globalize.js +2 -2
- package/core/internal/_hoverInfo.d.ts +2 -2
- package/core/internal/_hoverInfo.js +2 -2
- package/core/internal/_inlineTextEdit.d.ts +2 -2
- package/core/internal/_inlineTextEdit.js +2 -2
- package/core/internal/_objectStructureControllers.d.ts +2 -2
- package/core/internal/_objectStructureControllers.js +2 -2
- package/core/internal/_objectStructureProviders.d.ts +2 -2
- package/core/internal/_objectStructureProviders.js +2 -2
- package/core/internal/_papperKindMapper.d.ts +2 -2
- package/core/internal/_papperKindMapper.js +2 -2
- package/core/internal/_processError.d.ts +2 -2
- package/core/internal/_processError.js +2 -2
- package/core/internal/_resizable.d.ts +2 -2
- package/core/internal/_resizable.js +2 -2
- package/core/internal/_resizableBinding.d.ts +2 -3
- package/core/internal/_resizableBinding.js +3 -4
- package/core/internal/_scrollProcessor.d.ts +2 -2
- package/core/internal/_scrollProcessor.js +2 -2
- package/core/internal/_stores.d.ts +2 -2
- package/core/internal/_stores.js +2 -2
- package/core/internal/_surfaceHelpers.d.ts +2 -2
- package/core/internal/_surfaceHelpers.js +2 -2
- package/core/internal/_utils.d.ts +2 -2
- package/core/internal/_utils.js +2 -2
- package/core/internal/_validation.d.ts +2 -2
- package/core/internal/_validation.js +2 -2
- package/core/internal/ajaxSetup.d.ts +2 -2
- package/core/internal/ajaxSetup.js +2 -2
- package/core/internal/dx-versions.d.ts +2 -2
- package/core/internal/dx-versions.js +2 -2
- package/core/internal/selectable.d.ts +5 -4
- package/core/internal/selectable.js +17 -11
- package/core/selection/_combinedObj.d.ts +2 -2
- package/core/selection/_combinedObj.js +2 -2
- package/core/selection/_selection.d.ts +2 -2
- package/core/selection/_selection.js +2 -2
- package/core/selection/_selectionHelpers.d.ts +3 -3
- package/core/selection/_selectionHelpers.js +14 -12
- package/core/snapLines/_snapLineSurface.d.ts +2 -2
- package/core/snapLines/_snapLineSurface.js +2 -2
- package/core/snapLines/_snapLinesCollector.d.ts +2 -2
- package/core/snapLines/_snapLinesCollector.js +2 -2
- package/core/snapLines/_snapLinesHelper.d.ts +2 -2
- package/core/snapLines/_snapLinesHelper.js +2 -2
- package/core/tools/_actionList.d.ts +2 -2
- package/core/tools/_actionList.js +2 -2
- package/core/tools/_copyPaste.d.ts +2 -2
- package/core/tools/_copyPaste.js +2 -2
- package/core/tools/_keyboardHelper.d.ts +2 -2
- package/core/tools/_keyboardHelper.js +2 -2
- package/core/tools/_tabInfoWithPropertyGrid.d.ts +2 -2
- package/core/tools/_tabInfoWithPropertyGrid.js +2 -2
- package/core/tools/actionId.d.ts +2 -2
- package/core/tools/actionId.js +2 -2
- package/core/tools/tabPanel.d.ts +2 -2
- package/core/tools/tabPanel.js +2 -2
- package/core/tools/toolbox.d.ts +2 -2
- package/core/tools/toolbox.js +2 -2
- package/core/utils/_arrayutils.d.ts +2 -2
- package/core/utils/_arrayutils.js +2 -2
- package/core/utils/_debug.d.ts +2 -2
- package/core/utils/_debug.js +2 -2
- package/core/utils/_designerCreator.d.ts +2 -2
- package/core/utils/_designerCreator.js +3 -3
- package/core/utils/_designerInitializer.d.ts +2 -2
- package/core/utils/_designerInitializer.js +2 -2
- package/core/utils/_fieldListProvider.d.ts +2 -2
- package/core/utils/_fieldListProvider.js +2 -2
- package/core/utils/_infoMessageHelpers.d.ts +2 -2
- package/core/utils/_infoMessageHelpers.js +2 -2
- package/core/utils/_units.d.ts +2 -2
- package/core/utils/_units.js +2 -2
- package/core/utils/_utils.d.ts +2 -2
- package/core/utils/_utils.js +2 -2
- package/core/utils/_visitors.d.ts +2 -2
- package/core/utils/_visitors.js +2 -2
- package/core/utils/controlsFactory.d.ts +2 -2
- package/core/utils/controlsFactory.js +2 -2
- package/core/utils/parsers.d.ts +2 -2
- package/core/utils/parsers.js +2 -2
- package/core/widgets/_buttonInlineEditor.d.ts +2 -2
- package/core/widgets/_buttonInlineEditor.js +2 -2
- package/core/widgets/_dataMemberEditor.d.ts +2 -2
- package/core/widgets/_dataMemberEditor.js +2 -2
- package/core/widgets/_fieldlistpicker.d.ts +2 -2
- package/core/widgets/_fieldlistpicker.js +2 -2
- package/core/widgets/_popupEditorBase.d.ts +2 -2
- package/core/widgets/_popupEditorBase.js +2 -2
- package/core/widgets/_requiredNullableEditor.d.ts +2 -2
- package/core/widgets/_requiredNullableEditor.js +2 -2
- package/core/widgets/bordereditor/_binding.d.ts +2 -2
- package/core/widgets/bordereditor/_binding.js +2 -2
- package/core/widgets/bordereditor/_bordereditor.d.ts +2 -2
- package/core/widgets/bordereditor/_bordereditor.js +2 -2
- package/core/widgets/colorPickerEditor.d.ts +2 -2
- package/core/widgets/colorPickerEditor.js +2 -2
- package/core/widgets/dataMemberEditor.d.ts +2 -2
- package/core/widgets/dataMemberEditor.js +2 -2
- package/core/widgets/fieldListEditor.d.ts +2 -2
- package/core/widgets/fieldListEditor.js +2 -2
- package/core/widgets/propertygrid/_controlProperties.d.ts +2 -2
- package/core/widgets/propertygrid/_controlProperties.js +2 -2
- package/core/widgets/propertygrid/_group.d.ts +2 -2
- package/core/widgets/propertygrid/_group.js +2 -2
- package/core/widgets/registerDesignerEditors.d.ts +2 -2
- package/core/widgets/registerDesignerEditors.js +2 -2
- package/core/widgets/textAlignmentEditor/_binding.d.ts +2 -2
- package/core/widgets/textAlignmentEditor/_binding.js +2 -2
- package/core/widgets/textAlignmentEditor/_textAlignmentEditor.d.ts +2 -2
- package/core/widgets/textAlignmentEditor/_textAlignmentEditor.js +2 -2
- package/diagram/_legacy.d.ts +2 -2
- package/diagram/_legacy.js +2 -2
- package/diagram/bindings.d.ts +3 -4
- package/diagram/bindings.js +17 -11
- package/diagram/controlRegistrator.d.ts +2 -2
- package/diagram/controlRegistrator.js +2 -2
- package/diagram/controlsFactory.d.ts +2 -2
- package/diagram/controlsFactory.js +2 -2
- package/diagram/dragDrop/connectingPointDragHandler.d.ts +3 -4
- package/diagram/dragDrop/connectingPointDragHandler.js +7 -6
- package/diagram/dragDrop/connectionPointDragHandler.d.ts +3 -4
- package/diagram/dragDrop/connectionPointDragHandler.js +7 -6
- package/diagram/elements/connectingPointModel.d.ts +2 -2
- package/diagram/elements/connectingPointModel.js +2 -2
- package/diagram/elements/connectingPointSurface.d.ts +2 -2
- package/diagram/elements/connectingPointSurface.js +2 -2
- package/diagram/elements/connectors/connectionPointModel.d.ts +2 -2
- package/diagram/elements/connectors/connectionPointModel.js +2 -2
- package/diagram/elements/connectors/connectionPointSurface.d.ts +2 -2
- package/diagram/elements/connectors/connectionPointSurface.js +2 -2
- package/diagram/elements/connectors/connectorModel.d.ts +2 -2
- package/diagram/elements/connectors/connectorModel.js +2 -2
- package/diagram/elements/connectors/connectorSurface.d.ts +2 -2
- package/diagram/elements/connectors/connectorSurface.js +2 -2
- package/diagram/elements/connectors/routedConnectorModel.d.ts +2 -2
- package/diagram/elements/connectors/routedConnectorModel.js +2 -2
- package/diagram/elements/connectors/routedConnectorSurface.d.ts +2 -2
- package/diagram/elements/connectors/routedConnectorSurface.js +2 -2
- package/diagram/elements/diagramElementBaseSurface.d.ts +2 -2
- package/diagram/elements/diagramElementBaseSurface.js +2 -2
- package/diagram/elements/diagramElementBaseViewModel.d.ts +2 -2
- package/diagram/elements/diagramElementBaseViewModel.js +2 -2
- package/diagram/elements/diagramElementSurface.d.ts +2 -2
- package/diagram/elements/diagramElementSurface.js +2 -2
- package/diagram/elements/diagramElementViewModel.d.ts +2 -2
- package/diagram/elements/diagramElementViewModel.js +2 -2
- package/diagram/elements/diagramModel.d.ts +2 -2
- package/diagram/elements/diagramModel.js +2 -2
- package/diagram/elements/diagramSurface.d.ts +2 -2
- package/diagram/elements/diagramSurface.js +2 -2
- package/diagram/initializer.d.ts +2 -2
- package/diagram/initializer.js +2 -2
- package/diagram/metadata.d.ts +2 -2
- package/diagram/metadata.js +2 -2
- package/diagram/utils.d.ts +2 -2
- package/diagram/utils.js +2 -2
- package/dist/css/dx-analytics.carmine.compact.css +2 -2
- package/dist/css/dx-analytics.carmine.css +2 -2
- package/dist/css/dx-analytics.common.css +91 -18
- package/dist/css/dx-analytics.contrast.compact.css +2 -2
- package/dist/css/dx-analytics.contrast.css +2 -2
- package/dist/css/dx-analytics.dark.compact.css +2 -2
- package/dist/css/dx-analytics.dark.css +2 -2
- package/dist/css/dx-analytics.darkmoon.compact.css +2 -2
- package/dist/css/dx-analytics.darkmoon.css +2 -2
- package/dist/css/dx-analytics.darkviolet.compact.css +2 -2
- package/dist/css/dx-analytics.darkviolet.css +2 -2
- package/dist/css/dx-analytics.greenmist.compact.css +2 -2
- package/dist/css/dx-analytics.greenmist.css +2 -2
- package/dist/css/dx-analytics.light.compact.css +2 -2
- package/dist/css/dx-analytics.light.css +2 -2
- package/dist/css/dx-analytics.material.blue.dark.compact.css +18 -3
- package/dist/css/dx-analytics.material.blue.dark.css +18 -3
- package/dist/css/dx-analytics.material.blue.light.compact.css +18 -3
- package/dist/css/dx-analytics.material.blue.light.css +18 -3
- package/dist/css/dx-analytics.material.lime.dark.compact.css +18 -3
- package/dist/css/dx-analytics.material.lime.dark.css +18 -3
- package/dist/css/dx-analytics.material.lime.light.compact.css +18 -3
- package/dist/css/dx-analytics.material.lime.light.css +18 -3
- package/dist/css/dx-analytics.material.orange.dark.compact.css +18 -3
- package/dist/css/dx-analytics.material.orange.dark.css +18 -3
- package/dist/css/dx-analytics.material.orange.light.compact.css +18 -3
- package/dist/css/dx-analytics.material.orange.light.css +18 -3
- package/dist/css/dx-analytics.material.purple.dark.compact.css +18 -3
- package/dist/css/dx-analytics.material.purple.dark.css +18 -3
- package/dist/css/dx-analytics.material.purple.light.compact.css +18 -3
- package/dist/css/dx-analytics.material.purple.light.css +18 -3
- package/dist/css/dx-analytics.material.teal.dark.compact.css +18 -3
- package/dist/css/dx-analytics.material.teal.dark.css +18 -3
- package/dist/css/dx-analytics.material.teal.light.compact.css +18 -3
- package/dist/css/dx-analytics.material.teal.light.css +18 -3
- package/dist/css/dx-analytics.softblue.compact.css +2 -2
- package/dist/css/dx-analytics.softblue.css +2 -2
- package/dist/css/dx-querybuilder.css +2 -2
- package/dist/js/dx-analytics-core.d.ts +70 -28
- package/dist/js/dx-analytics-core.js +628 -480
- package/dist/js/dx-analytics-core.min.js +3 -3
- package/dist/js/dx-querybuilder.js +59 -60
- package/dist/js/dx-querybuilder.min.js +3 -3
- package/dx-analytics-core-bindings.d.ts +2 -2
- package/dx-analytics-core-bindings.js +12 -9
- package/dx-analytics-core-imports.d.ts +2 -5
- package/dx-analytics-core-imports.js +2 -5
- package/dx-analytics-core-svg-bindings.d.ts +2 -2
- package/dx-analytics-core-svg-bindings.js +2 -2
- package/dx-analytics-core-svg-templates.d.ts +2 -2
- package/dx-analytics-core-svg-templates.js +2 -2
- package/dx-analytics-core-templates.d.ts +2 -2
- package/dx-analytics-core-templates.js +7 -7
- package/dx-analytics-core.d.ts +2 -2
- package/dx-analytics-core.js +2 -2
- package/dx-query-builder-bindings.d.ts +2 -2
- package/dx-query-builder-bindings.js +9 -9
- package/dx-query-builder-templates.d.ts +2 -2
- package/dx-query-builder-templates.js +9 -9
- package/dx-querybuilder-imports.d.ts +2 -2
- package/dx-querybuilder-imports.js +2 -2
- package/dx-querybuilder.d.ts +2 -2
- package/dx-querybuilder.js +2 -2
- package/index.d.ts +2 -2
- package/index.js +2 -2
- package/less/dx-material.fix-style.less +32 -8
- package/package.json +2 -3
- package/property-grid/_legacy.d.ts +2 -2
- package/property-grid/_legacy.js +2 -2
- package/property-grid/_propertiesAccessibilityProvider.d.ts +2 -2
- package/property-grid/_propertiesAccessibilityProvider.js +2 -2
- package/property-grid/bindings.d.ts +2 -2
- package/property-grid/bindings.js +3 -2
- package/property-grid/internal/_addon.d.ts +3 -3
- package/property-grid/internal/_addon.js +5 -4
- package/property-grid/internal/_codeResolver.d.ts +2 -2
- package/property-grid/internal/_codeResolver.js +2 -2
- package/property-grid/internal/_popupService.d.ts +2 -2
- package/property-grid/internal/_popupService.js +2 -2
- package/property-grid/localization/_localization.d.ts +2 -2
- package/property-grid/localization/_localization.js +2 -2
- package/property-grid/localization/_localizationStringIds.d.ts +2 -2
- package/property-grid/localization/_localizationStringIds.js +2 -2
- package/property-grid/localization/localization.d.ts +2 -2
- package/property-grid/localization/localization.js +2 -2
- package/property-grid/localization/localization_utils.d.ts +2 -2
- package/property-grid/localization/localization_utils.js +2 -2
- package/property-grid/propertygrid.d.ts +2 -2
- package/property-grid/propertygrid.js +3 -3
- package/property-grid/widgets/bindingsCacheUtils.d.ts +2 -2
- package/property-grid/widgets/bindingsCacheUtils.js +2 -2
- package/property-grid/widgets/collectioneditor/_bindings.d.ts +2 -2
- package/property-grid/widgets/collectioneditor/_bindings.js +2 -2
- package/property-grid/widgets/collectioneditor/_editor.d.ts +2 -2
- package/property-grid/widgets/collectioneditor/_editor.js +2 -2
- package/property-grid/widgets/editor.d.ts +2 -2
- package/property-grid/widgets/editor.js +2 -2
- package/property-grid/widgets/editorValidator.d.ts +2 -2
- package/property-grid/widgets/editorValidator.js +2 -2
- package/property-grid/widgets/editorsInfo.d.ts +2 -2
- package/property-grid/widgets/editorsInfo.js +2 -2
- package/property-grid/widgets/ellipsiseditor/_editor.d.ts +2 -2
- package/property-grid/widgets/ellipsiseditor/_editor.js +2 -2
- package/property-grid/widgets/fileimageeditor/_editor.d.ts +2 -2
- package/property-grid/widgets/fileimageeditor/_editor.js +2 -2
- package/property-grid/widgets/fonteditor/_fonts.d.ts +2 -2
- package/property-grid/widgets/fonteditor/_fonts.js +2 -2
- package/property-grid/widgets/fonteditor/_model.d.ts +8 -2
- package/property-grid/widgets/fonteditor/_model.js +21 -5
- package/property-grid/widgets/fonteditor/editor.d.ts +2 -2
- package/property-grid/widgets/fonteditor/editor.js +2 -2
- package/property-grid/widgets/fonteditor/metadata.d.ts +3 -2
- package/property-grid/widgets/fonteditor/metadata.js +8 -2
- package/property-grid/widgets/guideditor.d.ts +2 -2
- package/property-grid/widgets/guideditor.js +2 -2
- package/property-grid/widgets/internal/_bindingsCache.d.ts +2 -2
- package/property-grid/widgets/internal/_bindingsCache.js +2 -2
- package/property-grid/widgets/internal/_extendedSvgTemplates.d.ts +2 -2
- package/property-grid/widgets/internal/_extendedSvgTemplates.js +2 -2
- package/property-grid/widgets/internal/_internal.d.ts +2 -2
- package/property-grid/widgets/internal/_internal.js +3 -3
- package/property-grid/widgets/internal/_svgTemplateEngine.d.ts +2 -2
- package/property-grid/widgets/internal/_svgTemplateEngine.js +2 -2
- package/property-grid/widgets/internal/_utils.d.ts +4 -3
- package/property-grid/widgets/internal/_utils.js +2 -2
- package/property-grid/widgets/registerBaseEdtior.d.ts +2 -2
- package/property-grid/widgets/registerBaseEdtior.js +2 -2
- package/property-grid/widgets/templateUtils.d.ts +2 -2
- package/property-grid/widgets/templateUtils.js +2 -2
- package/query-builder/_accordionTabInfo.d.ts +2 -2
- package/query-builder/_accordionTabInfo.js +2 -2
- package/query-builder/_bindings.d.ts +3 -4
- package/query-builder/_bindings.js +2 -4
- package/query-builder/_initializer.d.ts +2 -2
- package/query-builder/_initializer.js +2 -2
- package/query-builder/_legacy.d.ts +2 -2
- package/query-builder/_legacy.js +2 -2
- package/query-builder/_queryBuilderModel.d.ts +2 -2
- package/query-builder/_queryBuilderModel.js +2 -2
- package/query-builder/binding/eventGenerator.d.ts +2 -2
- package/query-builder/binding/eventGenerator.js +2 -2
- package/query-builder/binding/jsQueryBuilder.d.ts +2 -2
- package/query-builder/binding/jsQueryBuilder.js +2 -2
- package/query-builder/binding/jsQueryBuilderBinding.d.ts +2 -2
- package/query-builder/binding/jsQueryBuilderBinding.js +2 -2
- package/query-builder/binding/jsQueryBuilderBindingOptions.d.ts +2 -2
- package/query-builder/binding/jsQueryBuilderBindingOptions.js +2 -2
- package/query-builder/dataSource/_dbSchema.d.ts +2 -2
- package/query-builder/dataSource/_dbSchema.js +2 -2
- package/query-builder/dataSource/_dbSchemaProvider.d.ts +2 -2
- package/query-builder/dataSource/_dbSchemaProvider.js +2 -2
- package/query-builder/dataSource/_utils.d.ts +2 -2
- package/query-builder/dataSource/_utils.js +2 -2
- package/query-builder/dataSource/dataSourceParameter.d.ts +2 -2
- package/query-builder/dataSource/dataSourceParameter.js +2 -2
- package/query-builder/dataSource/dataSourceParameterMeta.d.ts +2 -2
- package/query-builder/dataSource/dataSourceParameterMeta.js +2 -2
- package/query-builder/dataSource/dbColumn.d.ts +2 -2
- package/query-builder/dataSource/dbColumn.js +2 -2
- package/query-builder/dataSource/dbForeignKey.d.ts +2 -2
- package/query-builder/dataSource/dbForeignKey.js +2 -2
- package/query-builder/dataSource/dbSchema.d.ts +2 -2
- package/query-builder/dataSource/dbSchema.js +2 -2
- package/query-builder/dataSource/dbSchemaProvider.d.ts +2 -2
- package/query-builder/dataSource/dbSchemaProvider.js +2 -2
- package/query-builder/dataSource/dbStoredProcedure.d.ts +2 -2
- package/query-builder/dataSource/dbStoredProcedure.js +2 -2
- package/query-builder/dataSource/dbTable.d.ts +2 -2
- package/query-builder/dataSource/dbTable.js +2 -2
- package/query-builder/dataSource/federation/_dbSchemaFederationDataSourceProvider.d.ts +2 -2
- package/query-builder/dataSource/federation/_dbSchemaFederationDataSourceProvider.js +2 -2
- package/query-builder/dataSource/federation/federatedQueries/selectQuery.d.ts +2 -2
- package/query-builder/dataSource/federation/federatedQueries/selectQuery.js +2 -2
- package/query-builder/dataSource/federation/federatedQueries/sourceQuery.d.ts +2 -2
- package/query-builder/dataSource/federation/federatedQueries/sourceQuery.js +2 -2
- package/query-builder/dataSource/federation/federatedQueries/subNode.d.ts +2 -2
- package/query-builder/dataSource/federation/federatedQueries/subNode.js +2 -2
- package/query-builder/dataSource/federation/federatedQueries/transformQuery.d.ts +2 -2
- package/query-builder/dataSource/federation/federatedQueries/transformQuery.js +2 -2
- package/query-builder/dataSource/federation/federatedQueries/unionQuery.d.ts +2 -2
- package/query-builder/dataSource/federation/federatedQueries/unionQuery.js +2 -2
- package/query-builder/dataSource/federation/federatedQueriesContainer.d.ts +2 -2
- package/query-builder/dataSource/federation/federatedQueriesContainer.js +2 -2
- package/query-builder/dataSource/federation/federatedQueryExpression.d.ts +2 -2
- package/query-builder/dataSource/federation/federatedQueryExpression.js +2 -2
- package/query-builder/dataSource/federation/federationDataSource.d.ts +2 -2
- package/query-builder/dataSource/federation/federationDataSource.js +2 -2
- package/query-builder/dataSource/federation/federationDataSourceMeta.d.ts +2 -2
- package/query-builder/dataSource/federation/federationDataSourceMeta.js +2 -2
- package/query-builder/dataSource/federation/federationMasterDetailRelation.d.ts +2 -2
- package/query-builder/dataSource/federation/federationMasterDetailRelation.js +2 -2
- package/query-builder/dataSource/federation/federationSerializableModel.d.ts +2 -2
- package/query-builder/dataSource/federation/federationSerializableModel.js +2 -2
- package/query-builder/dataSource/federation/federationSource.d.ts +2 -2
- package/query-builder/dataSource/federation/federationSource.js +2 -2
- package/query-builder/dataSource/json/_jsonSchemaProvider.d.ts +2 -2
- package/query-builder/dataSource/json/_jsonSchemaProvider.js +2 -2
- package/query-builder/dataSource/json/jsonAuthenticationInfo.d.ts +2 -2
- package/query-builder/dataSource/json/jsonAuthenticationInfo.js +2 -2
- package/query-builder/dataSource/json/jsonDataSource.d.ts +2 -2
- package/query-builder/dataSource/json/jsonDataSource.js +2 -2
- package/query-builder/dataSource/json/jsonParameter.d.ts +2 -2
- package/query-builder/dataSource/json/jsonParameter.js +2 -2
- package/query-builder/dataSource/json/jsonSchemaNode.d.ts +2 -2
- package/query-builder/dataSource/json/jsonSchemaNode.js +2 -2
- package/query-builder/dataSource/json/jsonSchemaProvider.d.ts +2 -2
- package/query-builder/dataSource/json/jsonSchemaProvider.js +2 -2
- package/query-builder/dataSource/json/jsonSource.d.ts +2 -2
- package/query-builder/dataSource/json/jsonSource.js +2 -2
- package/query-builder/dataSource/object/objectDataSource.d.ts +2 -2
- package/query-builder/dataSource/object/objectDataSource.js +2 -2
- package/query-builder/dataSource/object/objectSchema.d.ts +2 -2
- package/query-builder/dataSource/object/objectSchema.js +2 -2
- package/query-builder/dataSource/resultSet.d.ts +2 -2
- package/query-builder/dataSource/resultSet.js +2 -2
- package/query-builder/dataSource/resultTable.d.ts +2 -2
- package/query-builder/dataSource/resultTable.js +2 -2
- package/query-builder/dataSource/sql/connectionOptions.d.ts +2 -2
- package/query-builder/dataSource/sql/connectionOptions.js +2 -2
- package/query-builder/dataSource/sql/customSqlQuery.d.ts +2 -2
- package/query-builder/dataSource/sql/customSqlQuery.js +2 -2
- package/query-builder/dataSource/sql/customSqlQueryMeta.d.ts +2 -2
- package/query-builder/dataSource/sql/customSqlQueryMeta.js +2 -2
- package/query-builder/dataSource/sql/masterDetailRelation.d.ts +2 -2
- package/query-builder/dataSource/sql/masterDetailRelation.js +2 -2
- package/query-builder/dataSource/sql/masterDetailRelationMeta.d.ts +2 -2
- package/query-builder/dataSource/sql/masterDetailRelationMeta.js +2 -2
- package/query-builder/dataSource/sql/sqlDataConnection.d.ts +2 -2
- package/query-builder/dataSource/sql/sqlDataConnection.js +2 -2
- package/query-builder/dataSource/sql/sqlDataSource.d.ts +2 -2
- package/query-builder/dataSource/sql/sqlDataSource.js +2 -2
- package/query-builder/dataSource/sql/storedProcQuery.d.ts +2 -2
- package/query-builder/dataSource/sql/storedProcQuery.js +2 -2
- package/query-builder/dataSource/sql/storedProcQueryMeta.d.ts +2 -2
- package/query-builder/dataSource/sql/storedProcQueryMeta.js +2 -2
- package/query-builder/dataSource/sql/tableQuery.d.ts +2 -2
- package/query-builder/dataSource/sql/tableQuery.js +2 -2
- package/query-builder/dataSource/sql/tableQueryMeta.d.ts +2 -2
- package/query-builder/dataSource/sql/tableQueryMeta.js +2 -2
- package/query-builder/dataSource/utils.d.ts +2 -2
- package/query-builder/dataSource/utils.js +2 -2
- package/query-builder/dragDrop/_columnDragHandler.d.ts +3 -4
- package/query-builder/dragDrop/_columnDragHandler.js +9 -8
- package/query-builder/dragDrop/_dbObjectDragDropHandler.d.ts +3 -3
- package/query-builder/dragDrop/_dbObjectDragDropHandler.js +6 -5
- package/query-builder/elements/_federationColumnModel.d.ts +2 -2
- package/query-builder/elements/_federationColumnModel.js +2 -2
- package/query-builder/elements/_federationQueryModel.d.ts +2 -2
- package/query-builder/elements/_federationQueryModel.js +2 -2
- package/query-builder/elements/allColumnsModel.d.ts +2 -2
- package/query-builder/elements/allColumnsModel.js +2 -2
- package/query-builder/elements/allColumnsModelMeta.d.ts +2 -2
- package/query-builder/elements/allColumnsModelMeta.js +2 -2
- package/query-builder/elements/allColumnsSurface.d.ts +2 -2
- package/query-builder/elements/allColumnsSurface.js +2 -2
- package/query-builder/elements/columnExpression.d.ts +2 -2
- package/query-builder/elements/columnExpression.js +2 -2
- package/query-builder/elements/columnExpressionMeta.d.ts +2 -2
- package/query-builder/elements/columnExpressionMeta.js +2 -2
- package/query-builder/elements/columnModel.d.ts +2 -2
- package/query-builder/elements/columnModel.js +2 -2
- package/query-builder/elements/columnModelMeta.d.ts +2 -2
- package/query-builder/elements/columnModelMeta.js +2 -2
- package/query-builder/elements/columnSurface.d.ts +2 -2
- package/query-builder/elements/columnSurface.js +2 -2
- package/query-builder/elements/joinConditionModel.d.ts +2 -2
- package/query-builder/elements/joinConditionModel.js +2 -2
- package/query-builder/elements/joinConditionModelMeta.d.ts +2 -2
- package/query-builder/elements/joinConditionModelMeta.js +2 -2
- package/query-builder/elements/joinConditionSurface.d.ts +2 -2
- package/query-builder/elements/joinConditionSurface.js +2 -2
- package/query-builder/elements/parameterModel.d.ts +2 -2
- package/query-builder/elements/parameterModel.js +2 -2
- package/query-builder/elements/parameterModelMeta.d.ts +2 -2
- package/query-builder/elements/parameterModelMeta.js +2 -2
- package/query-builder/elements/queryElementModel.d.ts +2 -2
- package/query-builder/elements/queryElementModel.js +2 -2
- package/query-builder/elements/queryElementSurface.d.ts +2 -2
- package/query-builder/elements/queryElementSurface.js +2 -2
- package/query-builder/elements/queryModel.d.ts +2 -2
- package/query-builder/elements/queryModel.js +2 -2
- package/query-builder/elements/queryModelMeta.d.ts +2 -2
- package/query-builder/elements/queryModelMeta.js +2 -2
- package/query-builder/elements/querySurface.d.ts +2 -2
- package/query-builder/elements/querySurface.js +2 -2
- package/query-builder/elements/relationModel.d.ts +2 -2
- package/query-builder/elements/relationModel.js +2 -2
- package/query-builder/elements/relationModelMeta.d.ts +2 -2
- package/query-builder/elements/relationModelMeta.js +2 -2
- package/query-builder/elements/relationSurface.d.ts +2 -2
- package/query-builder/elements/relationSurface.js +2 -2
- package/query-builder/elements/tableModel.d.ts +2 -2
- package/query-builder/elements/tableModel.js +2 -2
- package/query-builder/elements/tableModelMeta.d.ts +2 -2
- package/query-builder/elements/tableModelMeta.js +2 -2
- package/query-builder/elements/tableSurface.d.ts +2 -2
- package/query-builder/elements/tableSurface.js +2 -2
- package/query-builder/initializer.d.ts +2 -2
- package/query-builder/initializer.js +2 -2
- package/query-builder/metadata.d.ts +2 -2
- package/query-builder/metadata.js +2 -2
- package/query-builder/utils/_callbacks.d.ts +2 -2
- package/query-builder/utils/_callbacks.js +2 -2
- package/query-builder/utils/_columnExpressionCollectionHelper.d.ts +2 -2
- package/query-builder/utils/_columnExpressionCollectionHelper.js +2 -2
- package/query-builder/utils/_controlsFactory.d.ts +2 -2
- package/query-builder/utils/_controlsFactory.js +2 -2
- package/query-builder/utils/_dataConnection.d.ts +2 -2
- package/query-builder/utils/_dataConnection.js +2 -2
- package/query-builder/utils/_federationUnionQueryBuilderTreeListController.d.ts +2 -2
- package/query-builder/utils/_federationUnionQueryBuilderTreeListController.js +2 -2
- package/query-builder/utils/_queryBuilderTreeListController.d.ts +2 -2
- package/query-builder/utils/_queryBuilderTreeListController.js +2 -2
- package/query-builder/utils/_requestwrapper.d.ts +2 -2
- package/query-builder/utils/_requestwrapper.js +2 -2
- package/query-builder/utils/controlsFactory.d.ts +2 -2
- package/query-builder/utils/controlsFactory.js +2 -2
- package/query-builder/utils/requestwrapper.d.ts +2 -2
- package/query-builder/utils/requestwrapper.js +2 -2
- package/query-builder/widgets/_federatedQueriesHelper.d.ts +2 -2
- package/query-builder/widgets/_federatedQueriesHelper.js +2 -2
- package/query-builder/widgets/_manageFederatedQueriesEditor.d.ts +2 -2
- package/query-builder/widgets/_manageFederatedQueriesEditor.js +2 -2
- package/query-builder/widgets/_rightPanelSwitcher.d.ts +2 -2
- package/query-builder/widgets/_rightPanelSwitcher.js +2 -2
- package/query-builder/widgets/_undoEditor.d.ts +2 -2
- package/query-builder/widgets/_undoEditor.js +2 -2
- package/query-builder/widgets/ace/_ace-mode-sql.d.ts +2 -2
- package/query-builder/widgets/ace/_ace-mode-sql.js +2 -2
- package/query-builder/widgets/ace/_options.d.ts +2 -2
- package/query-builder/widgets/ace/_options.js +2 -2
- package/query-builder/widgets/editorTemplates.d.ts +2 -2
- package/query-builder/widgets/editorTemplates.js +2 -2
- package/query-builder/widgets/expressionFunctions.d.ts +2 -2
- package/query-builder/widgets/expressionFunctions.js +2 -2
- package/query-builder/widgets/filterEditor/_groupFilterEditorSerializer.d.ts +2 -2
- package/query-builder/widgets/filterEditor/_groupFilterEditorSerializer.js +2 -2
- package/query-builder/widgets/filterEditor/_operandParameterQBSurface.d.ts +2 -2
- package/query-builder/widgets/filterEditor/_operandParameterQBSurface.js +2 -2
- package/query-builder/widgets/filterEditor/_operandPropertyQBSurface.d.ts +2 -2
- package/query-builder/widgets/filterEditor/_operandPropertyQBSurface.js +2 -2
- package/query-builder/widgets/filterEditor/_qbFilterEditorHelper.d.ts +2 -2
- package/query-builder/widgets/filterEditor/_qbFilterEditorHelper.js +2 -2
- package/query-builder/widgets/filterEditor/_qbFilterStringOptions.d.ts +2 -2
- package/query-builder/widgets/filterEditor/_qbFilterStringOptions.js +2 -2
- package/query-builder/widgets/filterEditor/_queryBuilderObjectsProvider.d.ts +2 -2
- package/query-builder/widgets/filterEditor/_queryBuilderObjectsProvider.js +2 -2
- package/query-builder/widgets/masterdetaileditor/_keyColumnSurface.d.ts +2 -2
- package/query-builder/widgets/masterdetaileditor/_keyColumnSurface.js +2 -2
- package/query-builder/widgets/masterdetaileditor/_masterDetailEditor.d.ts +2 -2
- package/query-builder/widgets/masterdetaileditor/_masterDetailEditor.js +2 -2
- package/query-builder/widgets/masterdetaileditor/_masterDetailEditorPopupManager.d.ts +2 -2
- package/query-builder/widgets/masterdetaileditor/_masterDetailEditorPopupManager.js +2 -2
- package/query-builder/widgets/masterdetaileditor/_masterDetailRelationSurface.d.ts +2 -2
- package/query-builder/widgets/masterdetaileditor/_masterDetailRelationSurface.js +2 -2
- package/query-builder/widgets/masterdetaileditor/_masterQuerySurface.d.ts +2 -2
- package/query-builder/widgets/masterdetaileditor/_masterQuerySurface.js +2 -2
- package/query-builder/widgets/registerEditorTemplates.d.ts +2 -2
- package/query-builder/widgets/registerEditorTemplates.js +2 -2
- package/query-builder/wizard/chooseAvailableDataSourcePage.d.ts +2 -2
- package/query-builder/wizard/chooseAvailableDataSourcePage.js +2 -2
- package/query-builder/wizard/chooseAvailablePage.d.ts +2 -2
- package/query-builder/wizard/chooseAvailablePage.js +2 -2
- package/query-builder/wizard/dataSourceWizard.d.ts +2 -2
- package/query-builder/wizard/dataSourceWizard.js +2 -2
- package/query-builder/wizard/dataSourceWizardState.d.ts +2 -2
- package/query-builder/wizard/dataSourceWizardState.js +2 -2
- package/query-builder/wizard/fullscreen/fullscreenMultiQueryDataSourceWizard.d.ts +2 -2
- package/query-builder/wizard/fullscreen/fullscreenMultiQueryDataSourceWizard.js +2 -2
- package/query-builder/wizard/fullscreen/fullscreenWizard.d.ts +2 -2
- package/query-builder/wizard/fullscreen/fullscreenWizard.js +2 -2
- package/query-builder/wizard/fullscreen/fullscreenWizardNavigation.d.ts +2 -2
- package/query-builder/wizard/fullscreen/fullscreenWizardNavigation.js +2 -2
- package/query-builder/wizard/fullscreen/fullscreenWizardPageFactory.d.ts +2 -2
- package/query-builder/wizard/fullscreen/fullscreenWizardPageFactory.js +2 -2
- package/query-builder/wizard/fullscreen/pages/fullscreenWizardPage.d.ts +2 -2
- package/query-builder/wizard/fullscreen/pages/fullscreenWizardPage.js +2 -2
- package/query-builder/wizard/fullscreen/pages/selectDataSourcePage.d.ts +2 -2
- package/query-builder/wizard/fullscreen/pages/selectDataSourcePage.js +2 -2
- package/query-builder/wizard/fullscreen/pages/specifyFederationDataSourceSettingsPage.d.ts +2 -2
- package/query-builder/wizard/fullscreen/pages/specifyFederationDataSourceSettingsPage.js +2 -2
- package/query-builder/wizard/fullscreen/pages/specifyJsonDataSourceSettingsPage.d.ts +2 -2
- package/query-builder/wizard/fullscreen/pages/specifyJsonDataSourceSettingsPage.js +2 -2
- package/query-builder/wizard/fullscreen/pages/specifyObjectDataSourceSettingsPage.d.ts +2 -2
- package/query-builder/wizard/fullscreen/pages/specifyObjectDataSourceSettingsPage.js +2 -2
- package/query-builder/wizard/fullscreen/pages/specifySqlDataSourceSettingsPage.d.ts +2 -2
- package/query-builder/wizard/fullscreen/pages/specifySqlDataSourceSettingsPage.js +2 -2
- package/query-builder/wizard/internal/_configureParametersUtils.d.ts +2 -2
- package/query-builder/wizard/internal/_configureParametersUtils.js +2 -2
- package/query-builder/wizard/internal/_constants.d.ts +2 -2
- package/query-builder/wizard/internal/_constants.js +2 -2
- package/query-builder/wizard/internal/_dbSchemaItemsProvider.d.ts +2 -2
- package/query-builder/wizard/internal/_dbSchemaItemsProvider.js +2 -2
- package/query-builder/wizard/internal/_dbSchemaTreeListController.d.ts +2 -2
- package/query-builder/wizard/internal/_dbSchemaTreeListController.js +2 -2
- package/query-builder/wizard/internal/_jsonDataSourceWidgets.d.ts +2 -2
- package/query-builder/wizard/internal/_jsonDataSourceWidgets.js +2 -2
- package/query-builder/wizard/internal/_jsonSourceSettings.d.ts +2 -2
- package/query-builder/wizard/internal/_jsonSourceSettings.js +2 -2
- package/query-builder/wizard/internal/_jsonTreeNodeItemsProvider.d.ts +2 -2
- package/query-builder/wizard/internal/_jsonTreeNodeItemsProvider.js +2 -2
- package/query-builder/wizard/internal/_queryBuilderPopup.d.ts +2 -2
- package/query-builder/wizard/internal/_queryBuilderPopup.js +2 -2
- package/query-builder/wizard/internal/_selectQuerySqlTextProvider.d.ts +2 -2
- package/query-builder/wizard/internal/_selectQuerySqlTextProvider.js +2 -2
- package/query-builder/wizard/internal/_selectStatementQueryControl.d.ts +2 -2
- package/query-builder/wizard/internal/_selectStatementQueryControl.js +2 -2
- package/query-builder/wizard/internal/_storedProceduresQueryControl.d.ts +2 -2
- package/query-builder/wizard/internal/_storedProceduresQueryControl.js +2 -2
- package/query-builder/wizard/internal/_treeListNode.d.ts +2 -2
- package/query-builder/wizard/internal/_treeListNode.js +2 -2
- package/query-builder/wizard/internal/_treeNodeItemsProvider.d.ts +2 -2
- package/query-builder/wizard/internal/_treeNodeItemsProvider.js +2 -2
- package/query-builder/wizard/internal/_utils.d.ts +2 -2
- package/query-builder/wizard/internal/_utils.js +2 -2
- package/query-builder/wizard/internal/_wizardAction.d.ts +2 -2
- package/query-builder/wizard/internal/_wizardAction.js +2 -2
- package/query-builder/wizard/internal/_wizardPageProcessor.d.ts +2 -2
- package/query-builder/wizard/internal/_wizardPageProcessor.js +2 -2
- package/query-builder/wizard/internal/_wizardPageSectionFactory.d.ts +2 -2
- package/query-builder/wizard/internal/_wizardPageSectionFactory.js +2 -2
- package/query-builder/wizard/internal/_wizardPageSectionIterator.d.ts +2 -2
- package/query-builder/wizard/internal/_wizardPageSectionIterator.js +2 -2
- package/query-builder/wizard/internal/_wrappedWizardPageSection.d.ts +2 -2
- package/query-builder/wizard/internal/_wrappedWizardPageSection.js +2 -2
- package/query-builder/wizard/internal/federationDataSource/_federatedQueriesTreeNode.d.ts +2 -2
- package/query-builder/wizard/internal/federationDataSource/_federatedQueriesTreeNode.js +2 -2
- package/query-builder/wizard/internal/federationDataSource/_federationDataSourceItemsExtender.d.ts +2 -2
- package/query-builder/wizard/internal/federationDataSource/_federationDataSourceItemsExtender.js +2 -2
- package/query-builder/wizard/internal/federationDataSource/_federationQueryBuilderPopupBase.d.ts +2 -2
- package/query-builder/wizard/internal/federationDataSource/_federationQueryBuilderPopupBase.js +2 -2
- package/query-builder/wizard/internal/federationDataSource/_federationSelectQueryBuilderPopup.d.ts +2 -2
- package/query-builder/wizard/internal/federationDataSource/_federationSelectQueryBuilderPopup.js +2 -2
- package/query-builder/wizard/internal/federationDataSource/_federationTablesExpressionFieldListProvider.d.ts +2 -2
- package/query-builder/wizard/internal/federationDataSource/_federationTablesExpressionFieldListProvider.js +2 -2
- package/query-builder/wizard/internal/federationDataSource/_federationTransformQueryBuilderPopup.d.ts +2 -2
- package/query-builder/wizard/internal/federationDataSource/_federationTransformQueryBuilderPopup.js +2 -2
- package/query-builder/wizard/internal/federationDataSource/_federationTransformResultSchemaProvider.d.ts +2 -2
- package/query-builder/wizard/internal/federationDataSource/_federationTransformResultSchemaProvider.js +2 -2
- package/query-builder/wizard/internal/federationDataSource/_federationTreeNodeProvider.d.ts +2 -2
- package/query-builder/wizard/internal/federationDataSource/_federationTreeNodeProvider.js +2 -2
- package/query-builder/wizard/internal/federationDataSource/_federationUnionQueryBuilderPopup.d.ts +2 -2
- package/query-builder/wizard/internal/federationDataSource/_federationUnionQueryBuilderPopup.js +2 -2
- package/query-builder/wizard/internal/initializer.d.ts +2 -2
- package/query-builder/wizard/internal/initializer.js +2 -2
- package/query-builder/wizard/internal/jsonSourceSettings.d.ts +2 -2
- package/query-builder/wizard/internal/jsonSourceSettings.js +2 -2
- package/query-builder/wizard/internal/objectDataSource/_chooseObjectDataMembers.d.ts +2 -2
- package/query-builder/wizard/internal/objectDataSource/_chooseObjectDataMembers.js +2 -2
- package/query-builder/wizard/internal/objectDataSource/_chooseObjectParameters.d.ts +2 -2
- package/query-builder/wizard/internal/objectDataSource/_chooseObjectParameters.js +2 -2
- package/query-builder/wizard/internal/objectDataSource/_chooseObjectTypes.d.ts +2 -2
- package/query-builder/wizard/internal/objectDataSource/_chooseObjectTypes.js +2 -2
- package/query-builder/wizard/internal/objectDataSource/_objectSchemaProvider.d.ts +2 -2
- package/query-builder/wizard/internal/objectDataSource/_objectSchemaProvider.js +2 -2
- package/query-builder/wizard/internal/wizardPageSectionMetadata.d.ts +2 -2
- package/query-builder/wizard/internal/wizardPageSectionMetadata.js +2 -2
- package/query-builder/wizard/multiQueryDataSourceWizard.d.ts +2 -2
- package/query-builder/wizard/multiQueryDataSourceWizard.js +2 -2
- package/query-builder/wizard/pageFactory.d.ts +2 -2
- package/query-builder/wizard/pageFactory.js +2 -2
- package/query-builder/wizard/pageId.d.ts +2 -2
- package/query-builder/wizard/pageId.js +2 -2
- package/query-builder/wizard/pageIterator.d.ts +2 -2
- package/query-builder/wizard/pageIterator.js +2 -2
- package/query-builder/wizard/pages/IWizardPage.d.ts +2 -2
- package/query-builder/wizard/pages/IWizardPage.js +2 -2
- package/query-builder/wizard/pages/__wrappedWizardPage.d.ts +2 -2
- package/query-builder/wizard/pages/__wrappedWizardPage.js +2 -2
- package/query-builder/wizard/pages/chooseDataSourceTypePage.d.ts +2 -2
- package/query-builder/wizard/pages/chooseDataSourceTypePage.js +2 -2
- package/query-builder/wizard/pages/chooseSqlConnectionPage.d.ts +2 -2
- package/query-builder/wizard/pages/chooseSqlConnectionPage.js +2 -2
- package/query-builder/wizard/pages/federationDataSourceWizard/federatedMasterDetailRelationshipsPage.d.ts +2 -2
- package/query-builder/wizard/pages/federationDataSourceWizard/federatedMasterDetailRelationshipsPage.js +2 -2
- package/query-builder/wizard/pages/federationDataSourceWizard/federatedQueryConfigurePage.d.ts +2 -2
- package/query-builder/wizard/pages/federationDataSourceWizard/federatedQueryConfigurePage.js +2 -2
- package/query-builder/wizard/pages/jsonDataSourceWizard/chooseJsonConnectionPage.d.ts +2 -2
- package/query-builder/wizard/pages/jsonDataSourceWizard/chooseJsonConnectionPage.js +2 -2
- package/query-builder/wizard/pages/jsonDataSourceWizard/chooseJsonSchemaPage.d.ts +2 -2
- package/query-builder/wizard/pages/jsonDataSourceWizard/chooseJsonSchemaPage.js +2 -2
- package/query-builder/wizard/pages/jsonDataSourceWizard/chooseJsonSourcePage.d.ts +2 -2
- package/query-builder/wizard/pages/jsonDataSourceWizard/chooseJsonSourcePage.js +2 -2
- package/query-builder/wizard/pages/jsonDataSourceWizard/specifyJsonConnectionPage.d.ts +2 -2
- package/query-builder/wizard/pages/jsonDataSourceWizard/specifyJsonConnectionPage.js +2 -2
- package/query-builder/wizard/pages/multiQueryWizard/configureMasterDetailRelationshipsPage.d.ts +2 -2
- package/query-builder/wizard/pages/multiQueryWizard/configureMasterDetailRelationshipsPage.js +2 -2
- package/query-builder/wizard/pages/multiQueryWizard/masterDetailRelationshipsPageBase.d.ts +2 -2
- package/query-builder/wizard/pages/multiQueryWizard/masterDetailRelationshipsPageBase.js +2 -2
- package/query-builder/wizard/pages/multiQueryWizard/multiQueryConfigurePage.d.ts +2 -2
- package/query-builder/wizard/pages/multiQueryWizard/multiQueryConfigurePage.js +2 -2
- package/query-builder/wizard/pages/multiQueryWizard/multiQueryConfigureParametersPage.d.ts +2 -2
- package/query-builder/wizard/pages/multiQueryWizard/multiQueryConfigureParametersPage.js +2 -2
- package/query-builder/wizard/pages/objectDataSourceWizard/chooseObjectDataSourceDataMembersPage.d.ts +2 -2
- package/query-builder/wizard/pages/objectDataSourceWizard/chooseObjectDataSourceDataMembersPage.js +2 -2
- package/query-builder/wizard/pages/objectDataSourceWizard/chooseObjectDataSourceTypesPage.d.ts +2 -2
- package/query-builder/wizard/pages/objectDataSourceWizard/chooseObjectDataSourceTypesPage.js +2 -2
- package/query-builder/wizard/pages/objectDataSourceWizard/configureObjectDataSourceParametersPage.d.ts +2 -2
- package/query-builder/wizard/pages/objectDataSourceWizard/configureObjectDataSourceParametersPage.js +2 -2
- package/query-builder/wizard/pages/sqlDataSourceWizard/_sqlDataSourceWrapper.d.ts +2 -2
- package/query-builder/wizard/pages/sqlDataSourceWizard/_sqlDataSourceWrapper.js +2 -2
- package/query-builder/wizard/pages/sqlDataSourceWizard/configureParametersPage.d.ts +2 -2
- package/query-builder/wizard/pages/sqlDataSourceWizard/configureParametersPage.js +2 -2
- package/query-builder/wizard/pages/sqlDataSourceWizard/configureQueryPage.d.ts +2 -2
- package/query-builder/wizard/pages/sqlDataSourceWizard/configureQueryPage.js +2 -2
- package/query-builder/wizard/pages/wizardPageBase.d.ts +2 -2
- package/query-builder/wizard/pages/wizardPageBase.js +2 -2
- package/query-builder/wizard/pages/wizardPageMetadata.d.ts +2 -2
- package/query-builder/wizard/pages/wizardPageMetadata.js +2 -2
- package/query-builder/wizard/popupWizard.d.ts +2 -2
- package/query-builder/wizard/popupWizard.js +2 -2
- package/query-builder/wizard/stateManager.d.ts +2 -2
- package/query-builder/wizard/stateManager.js +2 -2
- package/query-builder/wizard/wizard.d.ts +2 -2
- package/query-builder/wizard/wizard.js +2 -2
- package/query-builder/wizard/wizardEventManager.d.ts +2 -2
- package/query-builder/wizard/wizardEventManager.js +2 -2
- package/queryBuilder-elements-metadata.d.ts +2 -2
- package/queryBuilder-elements-metadata.js +2 -2
- package/queryBuilder-elements.d.ts +2 -2
- package/queryBuilder-elements.js +2 -2
- package/queryBuilder-internal.d.ts +2 -2
- package/queryBuilder-internal.js +2 -2
- package/queryBuilder-metadata.d.ts +2 -2
- package/queryBuilder-metadata.js +2 -2
- package/queryBuilder-utils.d.ts +2 -2
- package/queryBuilder-utils.js +2 -2
- package/queryBuilder-widgets-internal.d.ts +2 -2
- package/queryBuilder-widgets-internal.js +2 -2
- package/queryBuilder-widgets.d.ts +2 -2
- package/queryBuilder-widgets.js +2 -2
- package/querybuilder.d.ts +2 -2
- package/querybuilder.js +2 -2
- package/serializer/_internal.d.ts +2 -2
- package/serializer/_internal.js +2 -2
- package/serializer/_legacy.d.ts +2 -2
- package/serializer/_legacy.js +2 -2
- package/serializer/_utils.d.ts +2 -2
- package/serializer/_utils.js +2 -2
- package/serializer/eventManager.d.ts +2 -2
- package/serializer/eventManager.js +2 -2
- package/serializer/serializationInfo.d.ts +2 -2
- package/serializer/serializationInfo.js +2 -2
- package/serializer/serializer.d.ts +2 -2
- package/serializer/serializer.js +2 -2
- package/serializer/utils.d.ts +2 -2
- package/serializer/utils.js +2 -2
- package/undo-engine/_legacy.d.ts +2 -2
- package/undo-engine/_legacy.js +2 -2
- package/undo-engine/_utils.d.ts +2 -2
- package/undo-engine/_utils.js +2 -2
- package/undo-engine/undoengine.d.ts +2 -2
- package/undo-engine/undoengine.js +2 -2
- package/widgets/_legacy.d.ts +2 -2
- package/widgets/_legacy.js +2 -2
- package/widgets/_searchHighlighting.d.ts +2 -2
- package/widgets/_searchHighlighting.js +2 -2
- package/widgets/_utils.d.ts +2 -2
- package/widgets/_utils.js +2 -2
- package/widgets/ace/_ace-available.d.ts +2 -2
- package/widgets/ace/_ace-available.js +2 -2
- package/widgets/ace/_ace-mode-criteria.d.ts +2 -2
- package/widgets/ace/_ace-mode-criteria.js +2 -2
- package/widgets/ace/_ace-mode-doc-comment.d.ts +2 -2
- package/widgets/ace/_ace-mode-doc-comment.js +2 -2
- package/widgets/ace/_binding.d.ts +2 -2
- package/widgets/ace/_binding.js +2 -2
- package/widgets/bindings.d.ts +2 -2
- package/widgets/bindings.js +2 -2
- package/widgets/common/_codeCompletor.d.ts +2 -2
- package/widgets/common/_codeCompletor.js +2 -2
- package/widgets/common/_displayNameProvider.d.ts +2 -2
- package/widgets/common/_displayNameProvider.js +2 -2
- package/widgets/common/displayNameProvider.d.ts +2 -2
- package/widgets/common/displayNameProvider.js +2 -2
- package/widgets/common/pathRequest.d.ts +2 -2
- package/widgets/common/pathRequest.js +2 -2
- package/widgets/criteria/operators/aggregate.d.ts +2 -2
- package/widgets/criteria/operators/aggregate.js +2 -2
- package/widgets/criteria/operators/between.d.ts +2 -2
- package/widgets/criteria/operators/between.js +2 -2
- package/widgets/criteria/operators/binary.d.ts +2 -2
- package/widgets/criteria/operators/binary.js +2 -2
- package/widgets/criteria/operators/constant.d.ts +2 -2
- package/widgets/criteria/operators/constant.js +2 -2
- package/widgets/criteria/operators/criteriaOperator.d.ts +2 -2
- package/widgets/criteria/operators/criteriaOperator.js +2 -2
- package/widgets/criteria/operators/function.d.ts +2 -2
- package/widgets/criteria/operators/function.js +2 -2
- package/widgets/criteria/operators/group.d.ts +2 -2
- package/widgets/criteria/operators/group.js +2 -2
- package/widgets/criteria/operators/in.d.ts +2 -2
- package/widgets/criteria/operators/in.js +2 -2
- package/widgets/criteria/operators/join.d.ts +2 -2
- package/widgets/criteria/operators/join.js +2 -2
- package/widgets/criteria/operators/options/aggregate.d.ts +2 -2
- package/widgets/criteria/operators/options/aggregate.js +2 -2
- package/widgets/criteria/operators/options/between.d.ts +2 -2
- package/widgets/criteria/operators/options/between.js +2 -2
- package/widgets/criteria/operators/options/binary.d.ts +2 -2
- package/widgets/criteria/operators/options/binary.js +2 -2
- package/widgets/criteria/operators/options/function.d.ts +2 -2
- package/widgets/criteria/operators/options/function.js +2 -2
- package/widgets/criteria/operators/options/group.d.ts +2 -2
- package/widgets/criteria/operators/options/group.js +2 -2
- package/widgets/criteria/operators/options/in.d.ts +2 -2
- package/widgets/criteria/operators/options/in.js +2 -2
- package/widgets/criteria/operators/options/join.d.ts +2 -2
- package/widgets/criteria/operators/options/join.js +2 -2
- package/widgets/criteria/operators/options/parameter.d.ts +2 -2
- package/widgets/criteria/operators/options/parameter.js +2 -2
- package/widgets/criteria/operators/options/property.d.ts +2 -2
- package/widgets/criteria/operators/options/property.js +2 -2
- package/widgets/criteria/operators/options/unary.d.ts +2 -2
- package/widgets/criteria/operators/options/unary.js +2 -2
- package/widgets/criteria/operators/options/value.d.ts +2 -2
- package/widgets/criteria/operators/options/value.js +2 -2
- package/widgets/criteria/operators/parameter.d.ts +2 -2
- package/widgets/criteria/operators/parameter.js +2 -2
- package/widgets/criteria/operators/property.d.ts +2 -2
- package/widgets/criteria/operators/property.js +2 -2
- package/widgets/criteria/operators/unary.d.ts +2 -2
- package/widgets/criteria/operators/unary.js +2 -2
- package/widgets/criteria/operators/value.d.ts +2 -2
- package/widgets/criteria/operators/value.js +2 -2
- package/widgets/criteria/parser/criteriaparser.d.ts +2 -2
- package/widgets/criteria/parser/criteriaparser.js +2 -2
- package/widgets/criteria/utils/criteriaChangeOperator.d.ts +2 -2
- package/widgets/criteria/utils/criteriaChangeOperator.js +2 -2
- package/widgets/criteria/utils/criteriaEnumeration.d.ts +2 -2
- package/widgets/criteria/utils/criteriaEnumeration.js +2 -2
- package/widgets/criteria/utils/criteriaOperatorPreprocessor.d.ts +2 -2
- package/widgets/criteria/utils/criteriaOperatorPreprocessor.js +2 -2
- package/widgets/criteria/utils/criteriaOperatorStateMachine.d.ts +2 -2
- package/widgets/criteria/utils/criteriaOperatorStateMachine.js +2 -2
- package/widgets/criteria/utils/criteriaOperatorVisitor.d.ts +2 -2
- package/widgets/criteria/utils/criteriaOperatorVisitor.js +2 -2
- package/widgets/criteria/utils/criteriaProcessType.d.ts +2 -2
- package/widgets/criteria/utils/criteriaProcessType.js +2 -2
- package/widgets/criteria/utils/operatorTokens.d.ts +2 -2
- package/widgets/criteria/utils/operatorTokens.js +2 -2
- package/widgets/criteria/utils/propertyLocation.d.ts +2 -2
- package/widgets/criteria/utils/propertyLocation.js +2 -2
- package/widgets/expressioneditor/_expressioneditor.d.ts +2 -2
- package/widgets/expressioneditor/_expressioneditor.js +2 -2
- package/widgets/expressioneditor/bindings.d.ts +2 -2
- package/widgets/expressioneditor/bindings.js +2 -2
- package/widgets/expressioneditor/expressioneditor.d.ts +2 -2
- package/widgets/expressioneditor/expressioneditor.js +2 -2
- package/widgets/expressioneditor/tools/_functions.d.ts +2 -2
- package/widgets/expressioneditor/tools/_functions.js +2 -2
- package/widgets/expressioneditor/tools/_operatorNames.d.ts +2 -2
- package/widgets/expressioneditor/tools/_operatorNames.js +2 -2
- package/widgets/expressioneditor/tools/_tools.d.ts +2 -2
- package/widgets/expressioneditor/tools/_tools.js +2 -2
- package/widgets/expressioneditor/tools/_treeListControllers.d.ts +2 -2
- package/widgets/expressioneditor/tools/_treeListControllers.js +2 -2
- package/widgets/filtereditor/filtereditor.d.ts +2 -2
- package/widgets/filtereditor/filtereditor.js +2 -2
- package/widgets/filtereditor/filtereditoroptions.d.ts +2 -2
- package/widgets/filtereditor/filtereditoroptions.js +2 -2
- package/widgets/filtereditor/helpers/_addon.d.ts +2 -2
- package/widgets/filtereditor/helpers/_addon.js +2 -2
- package/widgets/filtereditor/helpers/_codeCompletor.d.ts +2 -2
- package/widgets/filtereditor/helpers/_codeCompletor.js +2 -2
- package/widgets/filtereditor/helpers/_helper.d.ts +2 -2
- package/widgets/filtereditor/helpers/_helper.js +2 -2
- package/widgets/filtereditor/helpers/_serializer.d.ts +2 -2
- package/widgets/filtereditor/helpers/_serializer.js +3 -3
- package/widgets/filtereditor/helpers/_treelistController.d.ts +2 -2
- package/widgets/filtereditor/helpers/_treelistController.js +2 -2
- package/widgets/filtereditor/helpers/_validator.d.ts +2 -2
- package/widgets/filtereditor/helpers/_validator.js +2 -2
- package/widgets/filtereditor/helpers/helper.d.ts +2 -2
- package/widgets/filtereditor/helpers/helper.js +2 -2
- package/widgets/filtereditor/operators/aggregateOperandSurface.d.ts +2 -2
- package/widgets/filtereditor/operators/aggregateOperandSurface.js +2 -2
- package/widgets/filtereditor/operators/betweenOperandSurface.d.ts +2 -2
- package/widgets/filtereditor/operators/betweenOperandSurface.js +2 -2
- package/widgets/filtereditor/operators/binaryOperandSurface.d.ts +2 -2
- package/widgets/filtereditor/operators/binaryOperandSurface.js +2 -2
- package/widgets/filtereditor/operators/criteriaOperatorSurface.d.ts +2 -2
- package/widgets/filtereditor/operators/criteriaOperatorSurface.js +2 -2
- package/widgets/filtereditor/operators/functionOperandSurface.d.ts +2 -2
- package/widgets/filtereditor/operators/functionOperandSurface.js +2 -2
- package/widgets/filtereditor/operators/groupOperandSurface.d.ts +2 -2
- package/widgets/filtereditor/operators/groupOperandSurface.js +2 -2
- package/widgets/filtereditor/operators/inOperandSurface.d.ts +2 -2
- package/widgets/filtereditor/operators/inOperandSurface.js +2 -2
- package/widgets/filtereditor/operators/operandParameterSurface.d.ts +2 -2
- package/widgets/filtereditor/operators/operandParameterSurface.js +2 -2
- package/widgets/filtereditor/operators/operandPropertySurface.d.ts +2 -2
- package/widgets/filtereditor/operators/operandPropertySurface.js +2 -2
- package/widgets/filtereditor/operators/operandSurfaceBase.d.ts +2 -2
- package/widgets/filtereditor/operators/operandSurfaceBase.js +2 -2
- package/widgets/filtereditor/operators/operandValueSurface.d.ts +2 -2
- package/widgets/filtereditor/operators/operandValueSurface.js +2 -2
- package/widgets/filtereditor/operators/unaryOperandSurface.d.ts +2 -2
- package/widgets/filtereditor/operators/unaryOperandSurface.js +2 -2
- package/widgets/formatstring/_patterns.d.ts +2 -2
- package/widgets/formatstring/_patterns.js +2 -2
- package/widgets/formatstring/binding.d.ts +2 -2
- package/widgets/formatstring/binding.js +2 -2
- package/widgets/formatstring/formatstringeditor.d.ts +2 -2
- package/widgets/formatstring/formatstringeditor.js +2 -2
- package/widgets/internal/_popupComponentBase.d.ts +2 -2
- package/widgets/internal/_popupComponentBase.js +2 -2
- package/widgets/internal/_popupwithautoheight.d.ts +2 -2
- package/widgets/internal/_popupwithautoheight.js +2 -2
- package/widgets/internal/_resizeHelper.d.ts +2 -2
- package/widgets/internal/_resizeHelper.js +2 -2
- package/widgets/internal/_valueEditorHelper.d.ts +2 -2
- package/widgets/internal/_valueEditorHelper.js +2 -2
- package/widgets/treelist/_binding.d.ts +2 -2
- package/widgets/treelist/_binding.js +2 -2
- package/widgets/treelist/_reorderTreeListDragDropHelper.d.ts +2 -2
- package/widgets/treelist/_reorderTreeListDragDropHelper.js +2 -2
- package/widgets/treelist/_treeListSearchViewModel.d.ts +2 -2
- package/widgets/treelist/_treeListSearchViewModel.js +2 -2
- package/widgets/treelist/_treelistController.d.ts +2 -2
- package/widgets/treelist/_treelistController.js +2 -2
- package/widgets/treelist/_treelistItem.d.ts +2 -2
- package/widgets/treelist/_treelistItem.js +2 -2
- package/widgets/treelist/options.d.ts +2 -2
- package/widgets/treelist/options.js +2 -2
- package/widgets/utils.d.ts +2 -2
- package/widgets/utils.js +2 -2
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* DevExpress Analytics (dist\js\dx-querybuilder.min.js)
|
|
3
|
-
* Version: 22.2.
|
|
4
|
-
* Build date:
|
|
3
|
+
* Version: 22.2.4-build-22354-0229
|
|
4
|
+
* Build date: Dec 20, 2022
|
|
5
5
|
* Copyright (c) 2012 - 2022 Developer Express Inc. ALL RIGHTS RESERVED
|
|
6
6
|
* License: https://www.devexpress.com/Support/EULAs/universal.xml
|
|
7
7
|
*/
|
|
8
|
-
!function(a){var i={};function r(e){var t;return(i[e]||(t=i[e]={i:e,l:!1,exports:{}},a[e].call(t.exports,t,t.exports,r),t.l=!0,t)).exports}r.m=a,r.c=i,r.d=function(e,t,a){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:a})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var a=Object.create(null);if(r.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)r.d(a,i,function(e){return t[e]}.bind(null,i));return a},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=15)}([function(e,t){e.exports=ko},function(e,t){e.exports=DevExpress.Analytics.Internal},function(e,t){e.exports=DevExpress.Analytics.Utils},function(e,t){e.exports=DevExpress.Analytics.Widgets.Internal},function(e,t){e.exports=jQuery},function(e,t){e.exports=DevExpress.Analytics.Elements},function(e,t){e.exports=DevExpress.Analytics.Widgets},function(e,t){e.exports=DevExpress.Analytics.Criteria},function(e,t){e.exports=DevExpress.Analytics.Criteria.Utils},function(e,t){e.exports=window.ace},function(e,t){e.exports=""},function(e,t){e.exports=DevExpress.Analytics.Widgets.Filtering},function(e,t){e.exports=DevExpress.config},function(e,t){e.exports=DevExpress.localization},function(e,t){e.exports=DevExpress.Analytics.Localization},function(j,B,e){"use strict";e.r(B);var p,t={},a=(e.r(t),e.d(t,"name",function(){return U}),e.d(t,"text",function(){return H}),e.d(t,"size",function(){return J}),e.d(t,"location",function(){return G}),e.d(t,"sizeLocation",function(){return X}),e.d(t,"unknownSerializationsInfo",function(){return Y}),e.d(t,"ConnectingPointDragHandler",function(){return de}),e.d(t,"ConnectionPointDragHandler",function(){return ce}),e.d(t,"DiagramElementBaseViewModel",function(){return ie}),e.d(t,"diagramElementSerializationInfo",function(){return re}),e.d(t,"DiagramElementViewModel",function(){return ne}),e.d(t,"DiagramElementBaseSurface",function(){return K}),e.d(t,"DiagramElementSurface",function(){return ue}),e.d(t,"DiagramViewModel",function(){return pe}),e.d(t,"margins",function(){return he}),e.d(t,"pageWidth",function(){return me}),e.d(t,"pageHeight",function(){return ge}),e.d(t,"diagramSerializationsInfo",function(){return be}),e.d(t,"DiagramSurface",function(){return fe}),e.d(t,"ConnectionPointViewModel",function(){return ye}),e.d(t,"connectionPointSerializationInfo",function(){return Se}),e.d(t,"ConnectionPointSurface",function(){return le}),e.d(t,"ConnectorViewModel",function(){return ve}),e.d(t,"ConnectorSurface",function(){return xe}),e.d(t,"RoutedConnectorViewModel",function(){return _e}),e.d(t,"RoutedConnectorSurface",function(){return Ce}),e.d(t,"ConnectingPointViewModel",function(){return oe}),e.d(t,"connectingPointSerializationInfo",function(){return se}),e.d(t,"ConnectingPointSurface",function(){return Z}),e.d(t,"diagramControlsFactory",function(){return ae}),e.d(t,"registerControls",function(){return Te}),e.d(t,"groups",function(){return Pe}),e.d(t,"createDiagramDesigner",function(){return Ne}),e.d(t,"PointSide",function(){return p}),e.d(t,"GRID_SIZE",function(){return ee}),e.d(t,"determineConnectingPoints",function(){return te}),{}),R=(e.r(a),e.d(a,"DBSchemaProvider",function(){return Le}),e.d(a,"DBStoredProcedure",function(){return ke}),e.d(a,"DBStoredProcedureArgumentDirection",function(){return Oe}),e.d(a,"DBStoredProcedureArgument",function(){return Ae}),e.d(a,"DBTable",function(){return Ee}),e.d(a,"ResultSet",function(){return Ue}),e.d(a,"ResultTable",function(){return Ve}),e.d(a,"JsonNodeType",function(){return We}),e.d(a,"JsonNode",function(){return He}),e.d(a,"JsonSchemaNode",function(){return Je}),e.d(a,"JsonSchemaRootNode",function(){return Ge}),e.d(a,"JsonAuthenticationInfo",function(){return Ke}),e.d(a,"JsonParameterType",function(){return l}),e.d(a,"JsonParameter",function(){return Ze}),e.d(a,"JsonSource",function(){return tt}),e.d(a,"JsonDataSource",function(){return dt}),e.d(a,"JsonSchemaProvider",function(){return nt}),e.d(a,"ConnectionOptions",function(){return ut}),e.d(a,"CustomSqlQuery",function(){return wt}),e.d(a,"MasterDetailRelation",function(){return It}),e.d(a,"SqlDataConnection",function(){return Et}),e.d(a,"SqlDataSource",function(){return Rt}),e.d(a,"StoredProcQuery",function(){return jt}),e.d(a,"TableQuery",function(){return $t}),e.d(a,"DataSourceParameter",function(){return g}),e.d(a,"DBColumnType",function(){return d}),e.d(a,"DBColumn",function(){return we}),e.d(a,"DBForeignKey",function(){return De}),e.d(a,"DBSchema",function(){return $e}),e.d(a,"ObjectDataSource",function(){return Mt}),e.d(a,"ObjectDataMemberBase",function(){return qt}),e.d(a,"ObjectParameter",function(){return Lt}),e.d(a,"ObjectDataSourceMethodBase",function(){return Qt}),e.d(a,"ObjectDataMember",function(){return Vt}),e.d(a,"ObjectCtor",function(){return Wt}),e.d(a,"ObjectType",function(){return Ft}),e.d(a,"sourceQuerySerializationsInfo",function(){return ea}),e.d(a,"SourceQuery",function(){return ta}),e.d(a,"selectQuerySerializationsInfo",function(){return ba}),e.d(a,"SelectQuery",function(){return fa}),e.d(a,"subNodeSerializationInfo",function(){return ma}),e.d(a,"SubNode",function(){return ga}),e.d(a,"transformQuerySerializationsInfo",function(){return ya}),e.d(a,"transformationRuleSerializationsInfo",function(){return Sa}),e.d(a,"TransformQuery",function(){return va}),e.d(a,"FederationTransformationRule",function(){return xa}),e.d(a,"FederationDataSource",function(){return Ea}),e.d(a,"FederationSource",function(){return sa}),e.d(a,"FederationMasterDetailRelation",function(){return wa}),e.d(a,"SerializableDataFederationDataSource",function(){return Da}),e.d(a,"FederatedQueriesContainer",function(){return _a}),e.d(a,"expressionSerializationInfo",function(){return aa}),e.d(a,"FederatedQueryExpressionType",function(){return f}),e.d(a,"FederatedQueryExpression",function(){return ia}),e.d(a,"unionQuerySerializationsInfo",function(){return Ta}),e.d(a,"UnionTypes",function(){return Ca}),e.d(a,"UnionQuery",function(){return Pa}),{}),M=(e.r(R),e.d(R,"getDBSchemaCallback",function(){return ze}),e.d(R,"getDBStoredProceduresCallback",function(){return je}),e.d(R,"DBSchemaFederationDataSourceProvider",function(){return Ia}),e.d(R,"generateQueryUniqueName",function(){return ka}),e.d(R,"getJsonSchemaCallback",function(){return rt}),e.d(R,"_setGetJsonSchemaCallback",function(){return ot}),e.d(R,"_resetGetJsonSchemaCallback",function(){return st}),e.d(R,"deserializeToCollection",function(){return Ie}),{}),q=(e.r(M),e.d(M,"SqlQueryType",function(){return u}),e.d(M,"JsonSourceType",function(){return pt}),e.d(M,"FederationQueryType",function(){return c}),{}),i=(e.r(q),e.d(q,"customQuerySerializationsInfo",function(){return Ot}),e.d(q,"masterDetailRelationSerializationsInfo",function(){return Dt}),e.d(q,"storedProcQuerySerializationsInfo",function(){return zt}),e.d(q,"tableQuerySerializationsInfo",function(){return At}),e.d(q,"federationDataSourceSerializationInfo",function(){return ra}),e.d(q,"sourceSerializationInfo",function(){return oa}),e.d(q,"validateName",function(){return ht}),e.d(q,"dsParameterNameValidationRules",function(){return mt}),e.d(q,"parameterValueSerializationsInfo",function(){return gt}),e.d(q,"dsParameterSerializationInfo",function(){return vt}),e.d(q,"storedProcParameterSerializationsInfo",function(){return _t}),{}),r=(e.r(i),e.d(i,"DataSourceWizardPageId",function(){return S}),e.d(i,"SqlDataSourceWizardPageId",function(){return N}),e.d(i,"FederationDataSourceWizardPageId",function(){return Aa}),e.d(i,"JsonDataSourceWizardPageId",function(){return O}),e.d(i,"ObjectDataSourceWizardPageId",function(){return $a}),e.d(i,"FullscreenDataSourceWizardPageId",function(){return w}),e.d(i,"FullscreenDataSourceWizardSectionId",function(){return D}),e.d(i,"_restoreSqlDataSourceFromState",function(){return Qa}),e.d(i,"_setRestoreSqlDataSourceFromState",function(){return Va}),e.d(i,"_resetRestoreSqlDataSourceFromState",function(){return Wa}),e.d(i,"_restoreFederationDataSourceFromState",function(){return Fa}),e.d(i,"_restoreJsonDataSourceFromState",function(){return Ha}),e.d(i,"_setRestoreJsonDataSourceFromState",function(){return Ja}),e.d(i,"_resetRestoreJsonDataSourceFromState",function(){return Ga}),e.d(i,"_restoreObjectDataSourceFromState",function(){return Xa}),e.d(i,"_createDefaultDataSourceWizardState",function(){return Ya}),e.d(i,"WizardPageBase",function(){return I}),e.d(i,"_WrappedWizardPage",function(){return Ka}),e.d(i,"DataSourceType",function(){return y}),e.d(i,"TypeItem",function(){return Ba}),e.d(i,"ChooseDataSourceTypePage",function(){return Ra}),e.d(i,"_registerChooseDataSourceTypePage",function(){return Ma}),e.d(i,"ChooseSqlConnectionPage",function(){return Za}),e.d(i,"_registerChooseSqlConnectionPage",function(){return ei}),e.d(i,"ConfigureObjectDataSourceParametersPage",function(){return ni}),e.d(i,"_registerConfigureObjectDataSourceParametersPage",function(){return di}),e.d(i,"ChooseObjectDataSourceTypesPage",function(){return mi}),e.d(i,"_registerChooseObjectDataSourceTypesPage",function(){return gi}),e.d(i,"ChooseObjectDataSourceDataMembersPage",function(){return fi}),e.d(i,"_registerChooseObjectDataSourceDataMembersPage",function(){return yi}),e.d(i,"ChooseAvailableItemPage",function(){return wi}),e.d(i,"ChooseAvailableDataSourcePage",function(){return Di}),e.d(i,"_registerChooseAvailableDataSourcePage",function(){return Ii}),e.d(i,"ChooseJsonConnectionPage",function(){return Ei}),e.d(i,"_registerChooseJsonConnectionPage",function(){return ki}),e.d(i,"SpecifyJsonConnectionPage",function(){return Li}),e.d(i,"_registerSpecifyJsonConnectionPage",function(){return Qi}),e.d(i,"ChooseJsonSourcePage",function(){return Mi}),e.d(i,"_registerChooseJsonSourcePage",function(){return qi}),e.d(i,"ChooseJsonSchemaPage",function(){return tr}),e.d(i,"_registerChooseJsonSchemaPage",function(){return ar}),e.d(i,"_SqlDataSourceWrapper",function(){return qa}),e.d(i,"ConfigureQueryPage",function(){return gr}),e.d(i,"_registerConfigureQueryPage",function(){return br}),e.d(i,"ConfigureQueryParametersPage",function(){return fr}),e.d(i,"_registerConfigureParametersPage",function(){return yr}),e.d(i,"MultiQueryConfigurePage",function(){return Pr}),e.d(i,"_registerMultiQueryConfigurePage",function(){return Nr}),e.d(i,"_canEditQueryParameters",function(){return kr}),e.d(i,"MultiQueryConfigureParametersPage",function(){return Ar}),e.d(i,"_registerMultiQueryConfigureParametersPage",function(){return $r}),e.d(i,"MasterDetailRelationshipsPageBase",function(){return qr}),e.d(i,"ConfigureMasterDetailRelationshipsPage",function(){return Lr}),e.d(i,"_registerConfigureMasterDetailRelationshipsPage",function(){return Qr}),e.d(i,"FederatedQueryConfigurePage",function(){return Bo}),e.d(i,"_registerFederatedQueryConfigurePage",function(){return Ro}),e.d(i,"FederatedMasterDetailRelationshipsPage",function(){return Mo}),e.d(i,"_registerFederatedMasterDetailRelationshipsPage",function(){return qo}),e.d(i,"PageFactory",function(){return Lo}),e.d(i,"StateManager",function(){return vr}),e.d(i,"PageIterator",function(){return xr}),e.d(i,"__loadingStateFunctionName",function(){return za}),e.d(i,"__nextActionFunctionName",function(){return ja}),e.d(i,"BaseWizard",function(){return _r}),e.d(i,"PopupWizard",function(){return Cr}),e.d(i,"_DataSourceWizardOptionsBase",function(){return Qo}),e.d(i,"_DataSourceWizardOptions",function(){return Vo}),e.d(i,"DataSourceWizardSettings",function(){return Wo}),e.d(i,"DataSourceWizardPageIterator",function(){return Fo}),e.d(i,"DataSourceWizard",function(){return Uo}),e.d(i,"_registerDataSourceWizardPages",function(){return Ho}),e.d(i,"_createDataSourceWizard",function(){return Jo}),e.d(i,"_MultiQueryDataSourceWizardOptions",function(){return Yo}),e.d(i,"MultiQueryDataSourceWizard",function(){return Ko}),e.d(i,"MultiQueryDataSourceWizardPageIterator",function(){return Zo}),e.d(i,"_registerMultiQueryDataSourcePages",function(){return es}),e.d(i,"_createMultiQueryDataSourceWizard",function(){return ts}),e.d(i,"FullscreenWizardPageFactory",function(){return as}),e.d(i,"FullscreenWizardPage",function(){return ds}),e.d(i,"SelectDataSourcePage",function(){return ls}),e.d(i,"_registerSelectDataSourcePage",function(){return cs}),e.d(i,"SpecifyJsonDataSourceSettingsPage",function(){return us}),e.d(i,"_registerSpecifyJsonDataSourceSettingsPage",function(){return ps}),e.d(i,"SpecifySqlDataSourceSettingsPage",function(){return hs}),e.d(i,"_registerSpecifySqlDataSourceSettingsPage",function(){return ms}),e.d(i,"SpecifyFederationDataSourceSettingsPage",function(){return gs}),e.d(i,"_registerSpecifyFederationDataSourceSettingsPage",function(){return bs}),e.d(i,"FullscreenWizard",function(){return ys}),e.d(i,"WizardNavigationPanel",function(){return fs}),e.d(i,"FullscreenDataSourceWizard",function(){return Ss}),e.d(i,"FullscreenDataSourceWizardPageIterator",function(){return vs}),e.d(i,"_createDataSourceFullscreenWizard",function(){return xs}),e.d(i,"parameterTypeToPropertyMap",function(){return Ai}),e.d(i,"SpecifyObjectDataSourceSettingsPage",function(){return Go}),e.d(i,"_registerSpecifyObjectDataSourceSettingsPage",function(){return Xo}),{}),L=(e.r(r),e.d(r,"WrappedWizardPageSection",function(){return rs}),e.d(r,"WizardPageSection",function(){return os}),e.d(r,"WizardPageSectionIterator",function(){return ss}),e.d(r,"WizardPageSectionFactory",function(){return is}),e.d(r,"WizardPageProcessor",function(){return ns}),e.d(r,"getLocalizedValidationErrorMessage",function(){return $i}),e.d(r,"JsonStringEditor",function(){return zi}),e.d(r,"JsonDataSourceJsonSourcePageSettingsBase",function(){return ji}),e.d(r,"JsonDataSourceJsonSourcePageStringSettings",function(){return Bi}),e.d(r,"JsonDataSourceJsonSourcePageUriSettings",function(){return Ri}),e.d(r,"WizardSectionPosition",function(){return E}),e.d(r,"CustomQueryTreeListItem",function(){return Si}),e.d(r,"MultiQueryTreeListItemFactory",function(){return vi}),e.d(r,"getSectionStyle",function(){return xi}),e.d(r,"subscribeArray",function(){return _i}),e.d(r,"subscribeProperties",function(){return Ci}),e.d(r,"subscribeObject",function(){return Ti}),e.d(r,"_createBeforeInitializePageEventArgs",function(){return Pi}),e.d(r,"_createPageEventArgs",function(){return Ni}),e.d(r,"_isMoreThanOneDataSourceTypeAvailable",function(){return Oi}),e.d(r,"ParametersTreeListItemBase",function(){return Or}),e.d(r,"ParametersTreeListItem",function(){return wr}),e.d(r,"ParametersTreeListRootItemBase",function(){return Dr}),e.d(r,"ParametersTreeListRootItem",function(){return Ir}),e.d(r,"ParametersTreeListController",function(){return Er}),e.d(r,"DBSchemaItemsProvider",function(){return Sr}),e.d(r,"DBSchemaTreeListController",function(){return Tr}),e.d(r,"FederationTreeNodeProvider",function(){return zo}),e.d(r,"FederatedQueriesTreeNode",function(){return $o}),e.d(r,"FederationDataSourceItemsExtender",function(){return Ao}),e.d(r,"FederationTablesExpressionFieldListProvider",function(){return Oo}),e.d(r,"FederationSelectQueryBuilderPopup",function(){return wo}),e.d(r,"FederationUnionQueryBuilderPopup",function(){return Eo}),e.d(r,"FederationQueryBuilderPopupBase",function(){return No}),e.d(r,"FederationTransformQueryBuilderPopup",function(){return Io}),e.d(r,"TransformResultSchemaProvider",function(){return Do}),e.d(r,"QueryBuilderPopupBase",function(){return sr}),e.d(r,"QueryBuilderPopup",function(){return nr}),e.d(r,"SelectQuerySqlTextProvider",function(){return dr}),e.d(r,"SelectStatementQueryControl",function(){return hr}),e.d(r,"StoredProceduresQueryControl",function(){return mr}),e.d(r,"defaultObjectDataSourceItemSpecifics",function(){return Vi}),e.d(r,"TreeNodeBase",function(){return Wi}),e.d(r,"TreeLeafNode",function(){return Fi}),e.d(r,"TreeNode",function(){return Ui}),e.d(r,"ParameterTreeNode",function(){return Hi}),e.d(r,"QueriesTreeNode",function(){return Ji}),e.d(r,"TreeQueryNode",function(){return Gi}),e.d(r,"FieldTreeNode",function(){return Xi}),e.d(r,"DataMemberTreeNode",function(){return Yi}),e.d(r,"SingleCheckedDataMemberTreeNode",function(){return Ki}),e.d(r,"TreeNodeItemsProvider",function(){return Zi}),e.d(r,"JsonTreeNodeItemsProvider",function(){return er}),e.d(r,"WizardAction",function(){return _s}),e.d(r,"ObjectTypeDescriptions",function(){return li}),e.d(r,"getObjectTypeDescriptionsCallback",function(){return ci}),e.d(r,"ObjectSchemaProvider",function(){return ui}),e.d(r,"ChooseObjectTypesTreelistController",function(){return pi}),e.d(r,"ChooseObjectTypes",function(){return hi}),e.d(r,"ObjectDataSourceParameterProperty",function(){return ti}),e.d(r,"ObjectDataSourceParametersModel",function(){return ri}),e.d(r,"ChooseObjectMemberParameters",function(){return oi}),e.d(r,"ChooseObjectParameters",function(){return si}),e.d(r,"ChooseObjectDataMembers",function(){return bi}),{}),o=(e.r(L),e.d(L,"expressionFunctions",function(){return Ct}),{}),Q=(e.r(o),e.d(o,"editorTemplates",function(){return b}),e.d(o,"createDefaultSQLAceOptions",function(){return cr}),e.d(o,"createDefaultSQLAdditionalOptions",function(){return ur}),e.d(o,"createDefaultSQLLanguageHelper",function(){return pr}),e.d(o,"UndoEditor",function(){return Cs}),e.d(o,"ManageFederatedQueriesEditor",function(){return Ts}),e.d(o,"FederatedQueriesHelper",function(){return ko}),e.d(o,"RightPanelSwitcher",function(){return Ps}),e.d(o,"GroupFilterEditorSerializer",function(){return Kr}),e.d(o,"OperandParameterQBSurface",function(){return eo}),e.d(o,"OperandPropertyQBSurface",function(){return to}),e.d(o,"isAggregatedExpression",function(){return Xr}),e.d(o,"QueryBuilderObjectsProvider",function(){return Yr}),e.d(o,"QBFilterEditorHelper",function(){return ao}),e.d(o,"QBFilterEditorHelperDefault",function(){return io}),e.d(o,"_setQBFilterEditorHelperDefault",function(){return ro}),e.d(o,"QBFilterStringOptions",function(){return oo}),e.d(o,"KeyColumnSurface",function(){return jr}),e.d(o,"MasterDetailEditor",function(){return Mr}),e.d(o,"MasterDetailEditorPopupManager",function(){return zr}),e.d(o,"MasterDetailRelationSurface",function(){return Br}),e.d(o,"MasterQuerySurface",function(){return Rr}),{}),V=(e.r(Q),e.d(Q,"name",function(){return Ut}),e.d(Q,"alias",function(){return Ht}),e.d(Q,"text",function(){return Jt}),e.d(Q,"selected",function(){return Gt}),e.d(Q,"size",function(){return Xt}),e.d(Q,"location",function(){return Yt}),e.d(Q,"sizeLocation",function(){return Kt}),e.d(Q,"unknownSerializationsInfo",function(){return Zt}),{}),s=(e.r(V),e.d(V,"ActionId",function(){return Be}),e.d(V,"HandlerUri",function(){return Re}),e.d(V,"controlsFactory",function(){return la}),e.d(V,"RequestWrapper",function(){return qe}),e.d(V,"SqlQueryType",function(){return u}),e.d(V,"JsonSourceType",function(){return pt}),e.d(V,"FederationQueryType",function(){return c}),{}),n=(e.r(s),e.d(s,"ColumnDragHandler",function(){return Ns}),e.d(s,"DbObjectDragDropHandler",function(){return Os}),e.d(s,"FederationColumnViewModel",function(){return fo}),e.d(s,"FederationAllColumnsViewModel",function(){return yo}),e.d(s,"federationQuerySerializationsInfo",function(){return So}),e.d(s,"FederationQueryViewModel",function(){return vo}),e.d(s,"FederationQuerySurface",function(){return xo}),e.d(s,"FederationTableViewModel",function(){return _o}),e.d(s,"FederationTableSurface",function(){return Co}),e.d(s,"ColumnExpressionCollectionHelper",function(){return $}),e.d(s,"registerControls",function(){return ks}),e.d(s,"serializeDataConnection",function(){return Me}),e.d(s,"FederatedUnionQueryBuilderTreeListController",function(){return To}),e.d(s,"FederatedTransformQueryBuilderTreeListController",function(){return Po}),e.d(s,"QueryBuilderTreeListController",function(){return As}),e.d(s,"wrapGetSelectStatement",function(){return ir}),e.d(s,"wrapRebuildResultSchema",function(){return rr}),e.d(s,"wrapGetFederationdResultSchema",function(){return or}),e.d(s,"AccordionTabInfo",function(){return Rs}),e.d(s,"SelectedTabInfo",function(){return Ms}),e.d(s,"updateQueryBuilderSurfaceContentSize",function(){return Qs}),e.d(s,"createIsLoadingFlag",function(){return Vs}),e.d(s,"createQueryBuilder",function(){return Hs}),e.d(s,"createQueryBuilderSurface",function(){return Js}),{}),W=(e.r(n),e.d(n,"QueryElementBaseViewModel",function(){return ca}),e.d(n,"AllColumnsViewModel",function(){return Jr}),e.d(n,"AllColumnsSurface",function(){return go}),e.d(n,"ColumnViewModel",function(){return no}),e.d(n,"ColumnExpression",function(){return Hr}),e.d(n,"ColumnSurface",function(){return mo}),e.d(n,"JoinConditionViewModel",function(){return ua}),e.d(n,"JoinConditionSurface",function(){return Es}),e.d(n,"ParameterViewModel",function(){return Zr}),e.d(n,"QueryElementBaseSurface",function(){return ho}),e.d(n,"QueryViewModelBase",function(){return co}),e.d(n,"QueryViewModel",function(){return uo}),e.d(n,"QuerySurface",function(){return po}),e.d(n,"RelationViewModel",function(){return ha}),e.d(n,"RelationSurface",function(){return ws}),e.d(n,"TableViewModel",function(){return z}),e.d(n,"TableSurface",function(){return bo}),{}),F=(e.r(W),e.d(W,"allColumnsSerializationInfo",function(){return Ur}),e.d(W,"AggregationType",function(){return Vr}),e.d(W,"columnSerializationInfo",function(){return Wr}),e.d(W,"ColumnType",function(){return A}),e.d(W,"columnExpressionSerializationsInfo",function(){return Fr}),e.d(W,"ConditionType",function(){return Ds}),e.d(W,"joinConditionSerializationInfo",function(){return Is}),e.d(W,"ParametersMode",function(){return Gr}),e.d(W,"querySerializationsInfo",function(){return so}),e.d(W,"relationSerializationInfo",function(){return pa}),e.d(W,"tableSerializationInfo",function(){return lo}),{}),v=(e.r(F),e.d(F,"JSQueryBuilder",function(){return Gs}),e.d(F,"JSQueryBuilderBinding",function(){return Zs}),e.d(F,"DxQueryBuilder",function(){return tn}),e.d(F,"EventGenerator",function(){return Ks}),e(6)),x=e(1),h=e(5),U={propertyName:"name",modelName:"@Name",displayName:"Name",editor:v.editorTemplates.getEditor("text"),validationRules:x.nameValidationRules},H={propertyName:"text",modelName:"@Text",displayName:"Text",editor:v.editorTemplates.getEditor("text")},J={propertyName:"size",modelName:"@Size",defaultVal:"100,50",from:h.Size.fromString,displayName:"Size",editor:v.editorTemplates.getEditor("objecteditor")},G={propertyName:"location",modelName:"@Location",from:h.Point.fromString,displayName:"Location",editor:v.editorTemplates.getEditor("objecteditor")},X=[J,G],Y=[U].concat(X),_=e(0);class K extends h.SurfaceElementBase{constructor(e,t,a){super(e,t,Object(x.extend)({},K._unitProperties,a)),this.template="dx-diagram-element",this.selectiontemplate="dx-diagram-element-selection",this.contenttemplate="dx-diagram-element-content",this.margin=_.observable(0),this._disposables.push(this.positionWidthWithoutMargins=_.pureComputed(()=>this.position.width()-2*this.margin())),this._disposables.push(this.positionLineHeightWithoutMargins=_.pureComputed(()=>this.position.lineHeight()-2*this.margin()))}}K._unitProperties={_height:e=>e.size.height,_width:e=>e.size.width,_x:e=>e.location.x,_y:e=>e.location.y};class Z extends K{constructor(e,t){super(e,t,Z._unitProperties),this.template="dxdd-connecting-point",this.selectiontemplate="dxdd-connection-point-selection",this.contenttemplate=""}}Z._unitProperties={_x:e=>_.pureComputed(()=>e.location.x()-e.parentModel().location.x()),_y:e=>_.pureComputed(()=>e.location.y()-e.parentModel().location.y())},(k=p=p||{})[k.East=0]="East",k[k.South=1]="South",k[k.North=2]="North",k[k.West=3]="West";const ee=10;function te(e,t){var a,i={start:null,end:null};return t.leftConnectionPoint.location.x()>e.rightConnectionPoint.location.x()+2*ee?(i.start=e.rightConnectionPoint,i.end=t.leftConnectionPoint):e.leftConnectionPoint.location.x()>t.rightConnectionPoint.location.x()+2*ee?(i.start=e.leftConnectionPoint,i.end=t.rightConnectionPoint):(a=(e.rightConnectionPoint.location.x()+e.rightConnectionPoint.location.x())/2,(t.rightConnectionPoint.location.x()+t.rightConnectionPoint.location.x())/2<a?(i.start=e.rightConnectionPoint,i.end=t.rightConnectionPoint):(i.start=e.leftConnectionPoint,i.end=t.leftConnectionPoint)),i}var C=e(2),ae=new C.ControlsFactory;class ie extends h.ElementViewModel{constructor(e,t,a){super(e,t,a)}getControlFactory(){return ae}}var re=[J,G,U,H,{propertyName:"type",modelName:"@Type"}];class oe extends ie{constructor(e,t,a){super(Object(x.extend)({"@ControlType":"ConnectingPoint"},e),t,a),this.side=_.pureComputed(()=>this.percentOffsetY()>=this.percentOffsetX()?this.percentOffsetY()>1-this.percentOffsetX()?p.South:p.West:this.percentOffsetY()>1-this.percentOffsetX()?p.East:p.North),this.size=new h.Size(7,7),this.location=new h.Point(0,0),this.location.x=_.pureComputed(()=>{var e=this.parentModel();return e.location.x()+e.size.width()*this.percentOffsetX()}),this.location.y=_.pureComputed(()=>{var e=this.parentModel();return e.location.y()+e.size.height()*this.percentOffsetY()})}}var se=[{propertyName:"percentOffsetX",modelName:"@PercentOffsetX",defaultVal:.5,from:C.floatFromModel},{propertyName:"percentOffsetY",modelName:"@PercentOffsetY",defaultVal:.5,from:C.floatFromModel}];class ne extends ie{constructor(e,t,a){super(Object(x.extend)({"@ControlType":"DiagramElement"},e),t,a),this.connectingPoints=Object(C.deserializeArray)(e&&e.ConnectingPoints||[],e=>new oe(e,this,a)),void 0===this.text()&&this.text(this.name())}}class de extends x.DragDropHandler{constructor(e,t,a,i,r){super(e,t,a,i,r),this.startConnectingPoint=null,this.newConnector=null,this.cursor="arrow",this.containment=".dxrd-ghost-container",this.helper=e=>{r.update(e)}}startDrag(e){if(!(e instanceof Z))throw new Error("ConnectingPointDragHandler can be applied to the ConnectingPoint only.");this.startConnectingPoint=e;e=this.startConnectingPoint.parent.getControlModel();this.newConnector=e.parentModel().createChild({"@ControlType":"RoutedConnector"}),this.newConnector.startPoint().connectingPoint(this.startConnectingPoint.getControlModel())}drag(e,t){t.position.left+=t.scroll.left,t.position.top+=t.scroll.top;t=this._getAbsoluteSurfacePosition(t);this.newConnectorSurface.endPoint().rect({top:t.top,left:t.left})}doStopDrag(){var e;this.dragHelperContent.reset(),this.selection.dropTarget&&((e=this.selection.dropTarget.getControlModel())instanceof oe?this.newConnector.endPoint().connectingPoint(e):e instanceof ne&&(e=e.connectingPoints(),this.newConnector.endPoint().connectingPoint(e[0])),this.selection.initialize(this.newConnectorSurface))}get newConnectorSurface(){return this.newConnector&&Object(x.findSurface)(this.newConnector)}}class le extends h.SurfaceElementBase{constructor(e,t){super(e,t,le._unitProperties),this.template="dx-diagram-connection-point",this.selectiontemplate="dx-diagram-connection-point",this.relativeX=_.pureComputed(()=>this.rect().left-this.parent.rect().left),this.relativeY=_.pureComputed(()=>this.rect().top-this.parent.rect().top)}container(){return this.getRoot()}}le._unitProperties={_x:e=>e.location.x,_y:e=>e.location.y};class ce extends x.DragDropHandler{constructor(e,t,a,i,r){super(e,t,a,i,r),this.currentConnectionPoint=null,this.cursor="arrow",this.containment=".dxrd-ghost-container",this.helper=e=>{r.update(e)}}startDrag(e){if(!(e instanceof le))throw new Error("ConnectionPointDragHandler can be applied to the ConnectionPoint only.");this.currentConnectionPoint=e}drag(e,t){t.position.left+=t.scroll.left,t.position.top+=t.scroll.top;t=this._getAbsoluteSurfacePosition(t);this.currentConnectionPoint.rect({top:t.top,left:t.left})}doStopDrag(){var e,t;this.dragHelperContent.reset(),this.selection.dropTarget&&((t=this.selection.dropTarget.getControlModel())instanceof oe?(e=this.currentConnectionPoint.parent.getControlModel(),(this.currentConnectionPoint.getControlModel()===e.startPoint()?e.startPoint():e.endPoint()).connectingPoint(t)):t instanceof ne&&(e=this.currentConnectionPoint.parent.getControlModel(),t=t.connectingPoints(),(this.currentConnectionPoint.getControlModel()===e.startPoint()?e.startPoint():e.endPoint()).connectingPoint(t[0])))}}class ue extends K{constructor(e,t){super(e,t,null),this.contenttemplate="dxdd-element-content-with-connecting-points"}_getChildrenHolderName(){return"connectingPoints"}}class pe extends ie{constructor(e){super(e,null,new C.ModelSerializer),this.controlType="Diagram",this.controls=_.observableArray(),this.name("Diagram")}getInfo(){return be}}var he={propertyName:"margins",modelName:"@Margins",from:h.Margins.fromString,displayName:"Margins"},me={propertyName:"pageWidth",modelName:"@PageWidth",defaultVal:850,from:C.floatFromModel,displayName:"Page Width",editor:v.editorTemplates.getEditor("numeric")},ge={propertyName:"pageHeight",modelName:"@PageHeight",defaultVal:1250,from:C.floatFromModel,displayName:"Page Height",editor:v.editorTemplates.getEditor("numeric")},be=[U,me,ge,he];class fe extends h.SurfaceElementBase{constructor(e,t=_.observable(1)){super(e,{measureUnit:_.observable("Pixels"),zoom:t,dpi:_.observable(100)},fe._unitProperties),this.measureUnit=_.observable("Pixels"),this.dpi=_.observable(100),this.controls=_.observableArray(),this.allowMultiselect=!1,this.focused=_.observable(!1),this.selected=_.observable(!1),this.underCursor=_.observable(new x.HoverInfo),this.templateName="dx-diagram-surface",this.margins={bottom:this._bottom,left:this._left,right:this._right,top:this._top},this.zoom=t,this._context=this,Object(x.createObservableArrayMapCollection)(e.controls,this.controls,this._createSurface)}checkParent(e){return!1}get parent(){return this._parent}set parent(e){this._parent=e}getChildrenCollection(){return _.observableArray([])}}fe._unitProperties={_width:e=>e.pageWidth,_height:e=>e.pageWidth,pageWidth:e=>e.pageWidth,pageHeight:e=>e.pageHeight,_bottom:e=>e.margins.bottom,_left:e=>e.margins.left,_right:e=>e.margins.right,_top:e=>e.margins.top};class ye extends ie{constructor(e,t,a){super(Object(x.extend)(e,{"@ControlType":"ConnectionPoint"}),t,a);var i=this.location.x,r=this.location.y;this.location.x=_.pureComputed({read:()=>this.connectingPoint()&&this.connectingPoint().location.x()||i(),write:e=>{this.connectingPoint(null),i(e)}}),this.location.y=_.pureComputed({read:()=>this.connectingPoint()&&this.connectingPoint().location.y()||r(),write:e=>{this.connectingPoint(null),r(e)}})}}var Se=[G,{propertyName:"connectingPoint",modelName:"@ConnectingPoint",link:!0}];class ve extends ie{constructor(e,t,a){super(Object(x.extend)({"@ControlType":"Connector"},e),t,a),this.startPoint(this.startPoint()||new ye({"@Location":"0, 0"},this,a)),this.endPoint(this.endPoint()||new ye({"@Location":"150, 75"},this,a)),this.location=new h.Point(0,0),this._disposables.push(this.location.x=_.pureComputed({read:()=>this.getX(),write:e=>{e-=(this.startPoint().location.x()<this.endPoint().location.x()?this.startPoint():this.endPoint()).location.x();this.startPoint().location.x(this.startPoint().location.x()+e),this.endPoint().location.x(this.endPoint().location.x()+e)}})),this._disposables.push(this.location.y=_.pureComputed({read:()=>this.getY(),write:e=>{e-=(this.startPoint().location.y()<this.endPoint().location.y()?this.startPoint():this.endPoint()).location.y();this.startPoint().location.y(this.startPoint().location.y()+e),this.endPoint().location.y(this.endPoint().location.y()+e)}})),this.size=new h.Size(0,0),this._disposables.push(this.size.width=_.pureComputed({read:()=>this.getWidth(),write:e=>{this.startPoint().location.x()<this.endPoint().location.x()?this.endPoint().location.x(this.startPoint().location.x()+e):this.startPoint().location.x(this.endPoint().location.x()+e)}})),this._disposables.push(this.size.height=_.pureComputed({read:()=>this.getHeight(),write:e=>{this.startPoint().location.y()<this.endPoint().location.y()?this.endPoint().location.y(this.startPoint().location.y()+e):this.startPoint().location.y(this.endPoint().location.y()+e)}}))}getX(){return(this.startPoint().location.x()<this.endPoint().location.x()?this.startPoint():this.endPoint()).location.x()}getY(){return(this.startPoint().location.y()<this.endPoint().location.y()?this.startPoint():this.endPoint()).location.y()}getWidth(){return Math.abs(this.startPoint().location.x()-this.endPoint().location.x())||ve.MIN_LINE_THICKNESS}getHeight(){return Math.abs(this.startPoint().location.y()-this.endPoint().location.y())||ve.MIN_LINE_THICKNESS}}ve.MIN_LINE_THICKNESS=3;class xe extends K{constructor(e,t){super(e,t,null),this.template="dxdd-connector",this.selectiontemplate="dxdd-connector-selection",this.startPoint=_.pureComputed(()=>new le(e.startPoint(),t)),this.endPoint=_.pureComputed(()=>new le(e.endPoint(),t))}}class _e extends ve{constructor(e,t,a){super(Object(x.extend)({"@ControlType":"RoutedConnector"},e),t,a),this._isUpdating=!1,this._getPower=function(e){for(var t=0;t<10;t++)if(e>=Math.pow(2,t)&&e<Math.pow(2,t+1))return t+1;return 1},this.seriesNumber=_.observable(1),this.routePoints=_.observable([]),this.freezeRoute=_.observable(!1),this._disposables.push(_.computed(()=>{var e=!(1+this.startPoint().location.x()+this.startPoint().location.y()+this.endPoint().location.x()+this.endPoint().location.y());this._isUpdating||this.freezeRoute(e)})),this._disposables.push(_.computed(()=>{var e,t,a,i,r,o,s,n,d,l,c,u;this.freezeRoute()||(e=[],t=this._getStartPointSide(),a=this._getEndPointSide(),i=new h.Point(this.startPoint().location.x(),this.startPoint().location.y()),r=new h.Point(this.endPoint().location.x(),this.endPoint().location.y()),this.startPoint().connectingPoint()&&(this._fixPoint(i,this.startPoint().connectingPoint().side()),e.push(i)),this.endPoint().connectingPoint()&&this._fixPoint(r,this.endPoint().connectingPoint().side()),o=Math.min(i.x(),r.x()),s=Math.min(i.y(),r.y()),n=Math.abs(i.x()-r.x()),d=Math.abs(i.y()-r.y()),l=this.seriesNumber(),c=this._getRatio(l),u=(l-1)*ee,0<i.y()-r.y()?0<i.x()-r.x()?t===p.North||t===p.East?a===p.North||a===p.East?(1!==l&&e.push(new h.Point(o+(n+=u),s+d)),e.push(new h.Point(o+n,s))):(e.push(new h.Point(o+n,s+d*c)),e.push(new h.Point(o,s+d*c))):a===p.South||a===p.West?e.push(new h.Point(o,s+d)):(e.push(new h.Point(o+n*c,s+d)),e.push(new h.Point(o+n*c,s))):t===p.North||t===p.West?a===p.North||a===p.West?(1!==l&&e.push(new h.Point(o-=u,s+d)),e.push(new h.Point(o,s))):(e.push(new h.Point(o,s+d*c)),e.push(new h.Point(o+n,s+d*c))):a===p.South||a===p.East?e.push(new h.Point(o+n,s+d)):(e.push(new h.Point(o+n*c,s+d)),e.push(new h.Point(o+n*c,s))):0<i.x()-r.x()?t===p.South||t===p.East?a===p.South||a===p.East?(1!==l&&e.push(new h.Point(o+(n+=u),s)),e.push(new h.Point(o+n,s+d))):(e.push(new h.Point(o+n,s+d*c)),e.push(new h.Point(o,s+d*c))):a===p.North||a===p.West?e.push(new h.Point(o,s)):(e.push(new h.Point(o+n*c,s)),e.push(new h.Point(o+n*c,s+d))):t===p.South||t===p.West?a===p.South||a===p.West?(1!==l&&e.push(new h.Point(o-=u,s)),e.push(new h.Point(o,s+d))):(e.push(new h.Point(o,s+d*c)),e.push(new h.Point(o+n,s+d*c))):a===p.North||a===p.East?e.push(new h.Point(o+n,s)):(e.push(new h.Point(o+n*c,s)),e.push(new h.Point(o+n*c,s+d))),this.endPoint().connectingPoint()&&e.push(r),this.routePoints(e))}))}getX(){var t=super.getX();return this.routePoints&&this.routePoints().forEach(e=>{e.x()<t&&(t=e.x())}),t}getY(){var t=super.getY();return this.routePoints&&this.routePoints().forEach(e=>{e.y()<t&&(t=e.y())}),t}getWidth(){var t=super.getWidth(),a=this.getX();return this.routePoints&&[this.startPoint().location,this.endPoint().location].concat(this.routePoints()).forEach(e=>{e.x()-a>t&&(t=e.x()-a)}),t}getHeight(){var t=super.getHeight(),a=this.getY();return this.routePoints&&[this.startPoint().location,this.endPoint().location].concat(this.routePoints()).forEach(e=>{e.y()-a>t&&(t=e.y()-a)}),Math.round(t)}_fixPoint(e,t){switch(t){case p.North:e.y(e.y()-ee);break;case p.East:e.x(e.x()+ee);break;case p.West:e.x(e.x()-ee);break;case p.South:e.y(e.y()+ee)}}_getStartPointSide(){return this.startPoint().connectingPoint()?this.startPoint().connectingPoint().side():this.startPoint().location.y()!==this.endPoint().location.y()?this.startPoint().location.y()>this.endPoint().location.y()?p.North:p.South:this.startPoint().location.x()>this.endPoint().location.x()?p.West:p.East}_getEndPointSide(){return this.endPoint().connectingPoint()?this.endPoint().connectingPoint().side():this.startPoint().location.y()!==this.endPoint().location.y()?this.startPoint().location.y()>this.endPoint().location.y()?p.South:p.North:this.startPoint().location.x()>this.endPoint().location.x()?p.East:p.West}_getRatio(e){for(var t=this._getPower(e),a=Math.pow(2,t),i=Math.pow(2,t-1),r=[],o=1;o<i;o++)o%2!=0&&(r.push(a-o),r.push(o));return r.reverse(),(r[e-i]||1)/a}beginUpdate(){this._isUpdating=!0}endUpdate(){this._isUpdating=!1}}class Ce extends K{constructor(e,t){super(e,t,null),this.template="dxdd-routed-connector",this.selectiontemplate="dxdd-routed-connector-selection",this.showArrow=_.observable(!1),this.showRightArrow=_.observable(!1),this.isVisible=_.observable(!0),this.routePoints=_.observableArray(),this.routePointsSet=_.pureComputed(()=>{var t=[];return this.routePoints().forEach(e=>{t.push(e.x()+" "+e.y())}),t.join(", ")}),this.routeLineWrappers=_.pureComputed(()=>{for(var e=[],t=1;t<this.routePoints().length;t++)e.push(this._createRouteLineWrapper(this.routePoints()[t-1],this.routePoints()[t],1===t||t===this.routePoints().length-1));return e}),this.connectorID=()=>this._connectorID,this._disposables.push(e),this._connectorID=Ce._connectorsCount++,this.startPoint=_.pureComputed(()=>new le(e.startPoint(),t)),this.endPoint=_.pureComputed(()=>new le(e.endPoint(),t)),this._disposables.push(e.routePoints.subscribe(e=>{this._updateRoutePoints()})),this._updateRoutePoints()}_createRoutePoint(e,t){return{x:_.pureComputed(()=>this._context.rtl()?Math.round(this.getControlModel().size.width()-(e.x()-t.x())):Math.round(e.x()-t.x())),y:_.pureComputed(()=>Math.round(e.y()-t.y())),modelPoint:e}}_createRouteLineWrapper(i,r,e=!1){var o=this,s=Math.abs(i.x.peek()-r.x.peek())<1,n=i.modelPoint.y.peek(),d=i.modelPoint.x.peek();return{position:{top:Math.min(i.y.peek(),r.y.peek())-2,left:Math.min(i.x.peek(),r.x.peek())-2,width:Math.abs(i.x.peek()-r.x.peek())+6,height:Math.abs(i.y.peek()-r.y.peek())+6},isVerticalLine:s,resizeHandler:e=>{o._control.freezeRoute(!0);try{var t,a;o._control.beginUpdate(),s?(t=this._context.rtl()?d-e.delta.dx:d+e.delta.dx,i.modelPoint.x(t),r.modelPoint.x(t)):(a=n+e.delta.dy,i.modelPoint.y(a),r.modelPoint.y(a))}finally{o._control.endUpdate()}},resizeStopped:()=>{o._control.routePoints.notifySubscribers(o._control.routePoints())},isLocked:_.observable(e)}}_updateRoutePoints(){var t=[],e=this.getControlModel(),a=e.location;t.push(this._createRoutePoint(e.startPoint().location,a)),e.routePoints().forEach(e=>{t.push(this._createRoutePoint(e,a))}),t.push(this._createRoutePoint(e.endPoint().location,a)),this.routePoints(t)}}function Te(){ae.registerControl("Unknown",{info:Y,type:h.ElementViewModel,nonToolboxItem:!0,surfaceType:h.SurfaceElementBase}),ae.registerControl("Connector",{info:[U,{propertyName:"location",displayName:"Location",editor:v.editorTemplates.getEditor("objecteditor")},{propertyName:"startPoint",modelName:"@StartPoint",link:!0},{propertyName:"endPoint",modelName:"@EndPoint",link:!0}],surfaceType:xe,type:ve,elementActionsTypes:[],nonToolboxItem:!1}),ae.registerControl("RoutedConnector",{info:[U,{propertyName:"location",displayName:"Location",editor:v.editorTemplates.getEditor("objecteditor")},{propertyName:"startPoint",modelName:"@StartPoint",link:!0},{propertyName:"endPoint",modelName:"@EndPoint",link:!0}],surfaceType:Ce,type:_e,elementActionsTypes:[],nonToolboxItem:!1}),ae.registerControl("ConnectionPoint",{info:Se,surfaceType:le,type:ye,elementActionsTypes:[],nonToolboxItem:!0}),ae.registerControl("Diagram",{info:be,surfaceType:fe,popularProperties:["name"],type:pe,elementActionsTypes:[],isContainer:!0,nonToolboxItem:!0}),ae.registerControl("DiagramElement",{info:re,defaultVal:{"@SizeF":"150,50",ConnectingPoints:{Item1:{"@ControlType":"ConnectingPoint","@PercentOffsetX":"1","@PercentOffsetY":"0.5"},Item2:{"@ControlType":"ConnectingPoint","@PercentOffsetX":"0.5","@PercentOffsetY":"1"},Item3:{"@ControlType":"ConnectingPoint","@PercentOffsetX":"0.5","@PercentOffsetY":"0"},Item4:{"@ControlType":"ConnectingPoint","@PercentOffsetX":"0","@PercentOffsetY":"0.5"}}},surfaceType:ue,popularProperties:["text"],type:ne,elementActionsTypes:[],nonToolboxItem:!1}),ae.registerControl("Ellipse",{info:re,defaultVal:{"@SizeF":"150,50","@Type":"Ellipse",ConnectingPoints:{Item1:{"@ControlType":"ConnectingPoint","@PercentOffsetX":"1","@PercentOffsetY":"0.5"},Item2:{"@ControlType":"ConnectingPoint","@PercentOffsetX":"0.5","@PercentOffsetY":"1"},Item3:{"@ControlType":"ConnectingPoint","@PercentOffsetX":"0.5","@PercentOffsetY":"0"},Item4:{"@ControlType":"ConnectingPoint","@PercentOffsetX":"0","@PercentOffsetY":"0.5"}}},surfaceType:ue,popularProperties:["text"],type:ne,elementActionsTypes:[],nonToolboxItem:!1}),ae.registerControl("Condition",{info:re,defaultVal:{"@SizeF":"150,50","@Type":"Condition",ConnectingPoints:{Item1:{"@ControlType":"ConnectingPoint","@PercentOffsetX":"1","@PercentOffsetY":"0.5"},Item2:{"@ControlType":"ConnectingPoint","@PercentOffsetX":"0.5","@PercentOffsetY":"1"},Item3:{"@ControlType":"ConnectingPoint","@PercentOffsetX":"0.5","@PercentOffsetY":"0"},Item4:{"@ControlType":"ConnectingPoint","@PercentOffsetX":"0","@PercentOffsetY":"0.5"}}},surfaceType:ue,popularProperties:["text"],type:ne,elementActionsTypes:[],nonToolboxItem:!1}),ae.registerControl("ConnectingPoint",{info:se,surfaceType:Z,type:oe,elementActionsTypes:[],nonToolboxItem:!0})}Ce._connectorsCount=0;var T=e(4),Pe={Appearance:{info:[]},Behavior:{info:[]},Design:{info:[U]},Layout:{info:[G,J,me,ge]}};function Ne(e,t,a,i){a&&Object(C.addCultureInfo)({messages:a}),Te();var r=_.pureComputed(()=>new pe(t())),a=_.pureComputed(()=>{return new fe(r())}),i=Object(x.createDesigner)(r,a,ae,Pe,void 0,void 0,i),o=(i.connectionPointDragHandler=new ce(a,i.selection,i.undoEngine,i.snapHelper,i.dragHelperContent),i.connectingPointDragHandler=new de(a,i.selection,i.undoEngine,i.snapHelper,i.dragHelperContent),i.isLoading(!1),i.selection.focused(a()),T.fn.constructor(e).children().remove(),_.applyBindings(i,e),Object(x.updateSurfaceContentSize)(i.surfaceSize,e)),s=()=>{o()};return window.addEventListener("resize",s),Object(x.addDisposeCallback)(e,function(){window.removeEventListener("resize",s)}),i.tabPanel.width.subscribe(()=>{o()}),o(),i}var d,Oe;e(10);_.bindingHandlers.routeLineDraggable={init:(e,t)=>{var i=t(),t=Object(x.extend)({snap:".dxrd-drag-snap-line",snapTolerance:x.SnapLinesHelper.snapTolerance},_.unwrap(i),{start:function(e,t){i.starting()},stop:function(e,t){i.stopped()},drag:function(e,t){var a=t.position.left-t.originalPosition.left,t=t.position.top-t.originalPosition.top;i.forceResize({delta:{dx:a,dy:t}})}});T.fn.constructor(e).draggable(t)}},_.bindingHandlers.updateConnectorArrow={init:(e,t,a,i,r)=>{var o,s;o=-1,"Microsoft Internet Explorer"==navigator.appName?null!=new RegExp("MSIE ([0-9]{1,}[.0-9]{0,})").exec(navigator.userAgent)&&(o=parseFloat(RegExp.$1)):"Netscape"==navigator.appName&&null!=new RegExp("Trident/.*rv:([0-9]{1,}[.0-9]{0,})").exec(navigator.userAgent)&&(o=parseFloat(RegExp.$1)),-1<o&&o<=11&&(s=r.$data.routePointsSet.subscribe(()=>{r.$data.showArrow()&&e.parentNode.insertBefore(e,e)}),Object(x.addDisposeCallback)(e.parentNode,()=>s.dispose()))}},(k=d=d||{})[k.Unknown=0]="Unknown",k[k.Boolean=1]="Boolean",k[k.Byte=2]="Byte",k[k.SByte=3]="SByte",k[k.Char=4]="Char",k[k.Decimal=5]="Decimal",k[k.Double=6]="Double",k[k.Single=7]="Single",k[k.Int32=8]="Int32",k[k.UInt32=9]="UInt32",k[k.Int16=10]="Int16",k[k.UInt16=11]="UInt16",k[k.Int64=12]="Int64",k[k.UInt64=13]="UInt64",k[k.String=14]="String",k[k.DateTime=15]="DateTime",k[k.Guid=16]="Guid",k[k.TimeSpan=17]="TimeSpan",k[k.ByteArray=18]="ByteArray";class we{constructor(e){this.name=e.Name,this.type=e.ColumnType,this.size=e.Size}static GetType(e){switch(e){case d.Boolean:return"System.Boolean";case d.Byte:return"System.Byte";case d.SByte:return"System.SByte";case d.Char:return"System.Char";case d.Decimal:return"System.Decimal";case d.Double:return"System.Double";case d.Single:return"System.Single";case d.Int32:return"System.Int32";case d.UInt32:return"System.UInt32";case d.Int16:return"System.Int16";case d.UInt16:return"System.UInt16";case d.Int64:return"System.Int64";case d.UInt64:return"System.UInt64";case d.String:return"System.String";case d.DateTime:return"System.DateTime";case d.Guid:return"System.Guid";case d.TimeSpan:return"System.TimeSpan";case d.ByteArray:return"System.Byte[]";default:return"System.Object"}}static GetSpecific(e){switch(e){case"System.Boolean":return"Bool";case"System.Byte":case"System.SByte":case"System.Int16":case"System.UInt16":case"System.Int32":case"System.UInt32":case"System.Int64":case"System.UInt64":return"Integer";case"System.Char":case"System.Guid":case"System.ByteArray":case"System.String":return"String";case"System.Double":case"System.Single":case"System.Decimal":return"Float";case"System.DateTime":case"System.TimeSpan":return"Date";default:return"String"}}}class De{constructor(e){this.name=e.Name,this.primaryKeyTable=e.PrimaryKeyTable,this.columns=e.Columns,this.primaryKeyColumns=e.PrimaryKeyTableKeyColumns}}function Ie(e,t,a){a=a||[];return e&&e.forEach(e=>{a.push(t(e))}),a}class Ee{constructor(e){this.name=e.Name,this.isView="true"===e.IsView||!0===e.IsView,this.columns=Ie(e.columns,e=>new we(e)),this.foreignKeys=Ie(e.foreignKeys,e=>new De(e))}}class ke{constructor(e){this.name=e.Name,this.arguments=Ie(e.arguments,e=>new Ae(e))}}(k=Oe=Oe||{})[k.In=0]="In",k[k.Out=1]="Out",k[k.InOut=2]="InOut";class Ae{constructor(e){this.name=e.Name,this.type=e.Type,this.direction=e.Direction}}class $e{constructor(e){var t=Ie(e.Tables,e=>new Ee(e)),a=(t.sort((e,t)=>e.name.localeCompare(t.name)),Ie(e.Views,e=>new Ee(e)));a.sort((e,t)=>e.name.localeCompare(t.name)),this.tables=t.concat(a),this.procedures=Ie(e.StoredProcedures,e=>new ke(e))}}function ze(e,t,a){var i=T.Deferred();return e.getDbSchema(t,a).done(e=>{i.resolve(new $e(JSON.parse(e.dbSchemaJSON)))}).fail(e=>{Object(x.ShowMessage)(Object(x.formatUnicorn)(Object(C.getLocalization)("Schema loading failed. {0}","DxDesignerStringId.Error_SchemaLoadingFailed"),Object(x.getErrorMessage)(e))),i.reject()}),i.promise()}function je(e,t){var a=T.Deferred();return e.getDbStoredProcedures(t).done(e=>{a.resolve(new $e(JSON.parse(e.dbSchemaJSON)).procedures)}).fail(e=>{Object(x.ShowMessage)(Object(x.formatUnicorn)(Object(C.getLocalization)("Stored procedures loading failed. {0}","DxDesignerStringId.Error_SchemaLoadingFailed"),Object(x.getErrorMessage)(e))),a.reject()}),a.promise()}var Be={Save:"dxqb-save",DataPreview:"dxqb-data-preview",SelectStatementPreview:"dxqb-select-statement-preview"},Re=Object(x.createGlobalModuleVariableFunc)("DXQB.axd");function Me(e){var t=new C.ModelSerializer,a={DataConnection:t.serialize(e)};return e.options&&Object(x.extend)(a,{ConnectionOptions:t.serialize(e.options)}),JSON.stringify(a)}class qe{sendRequest(e,t){return Object(x.ajax)(Re(),e,t)}_sendRequest(e){return Object(x.ajax)(e)}getDbSchema(e,t){e={connectionJSON:Me(e),tables:null,views:null};return t&&0<t.length&&(e.tables=(t||[]).filter(e=>!e.isView).map(e=>e.name),e.views=(t||[]).filter(e=>e.isView).map(e=>e.name)),this.sendRequest("getDBSchema",encodeURIComponent(JSON.stringify(e)))}getDbStoredProcedures(e){e=JSON.stringify({connectionJSON:Me(e)});return this.sendRequest("getDBStoredProcedures",encodeURIComponent(e))}getSelectStatement(e,t){e=JSON.stringify({connectionJSON:Me(e),sqlQueryJSON:t});return this.sendRequest("getSelectStatement",encodeURIComponent(e))}getDataPreview(e,t){e=JSON.stringify({connectionJSON:Me(e),sqlQueryJSON:t});return this.sendRequest("getDataPreview",encodeURIComponent(e))}rebuildResultSchema(e,t,a=!1){e=JSON.stringify({sqlDataSourceJSON:JSON.stringify({SqlDataSource:(new C.ModelSerializer).serialize(e)}),queryName:t,relationsEditing:a});return this.sendRequest("rebuildResultSchema",encodeURIComponent(e))}getFederationResultSchema(e){var t=e.getSerializableModel().getSerializableFederationDataSourceInfo(),e=JSON.stringify({federationDataSourceJSON:JSON.stringify({FederationDataSource:(new C.ModelSerializer).serialize(e)}),dataSources:t.dataSources});return this.sendRequest("getFederationResultSchema",encodeURIComponent(e))}validateJsonUri(e){e=JSON.stringify(e.source.serialize(!0)),e=JSON.stringify({uriJsonSourceJSON:e}),e={uri:Re(),action:"validateJsonEndPoint",arg:encodeURIComponent(e),ignoreError:()=>!0};return this._sendRequest(e)}saveJsonSource(e,t){var t=t.source,a=JSON.stringify(t.serialize(!0)),e=JSON.stringify({connectionName:e,customJson:t.json(),uriJsonSourceJSON:a});return this.sendRequest("saveJsonSource",encodeURIComponent(e))}getJsonSchema(e,t){var a=e.source,i=JSON.stringify(a.serialize(!0)),e=JSON.stringify({connectionName:e.connectionName(),customJson:a.json(),uriJsonSourceJSON:i,parameters:t});return this.sendRequest("getJsonSchema",encodeURIComponent(e))}getObjectTypeDescriptions(e){return this.sendRequest("getObjectSchema",e)}}class Le extends C.Disposable{constructor(e,t=new qe){super(),this._requestWrapper=t,this._tables={},this._tableRequests=_.observableArray([]).extend({deferred:!0}),this.connection=e,this._disposables.push(this.connection.name.subscribe(()=>{this._tables={},this._dbSchema=null,this._dbStoredProceduresSchema=null})),this._disposables.push(_.computed(()=>{var e,t=this._tableRequests();t.length&&(this._tableRequests([]),e=t.map(e=>e.table),this._getDBSchema(e).done(a=>{t.forEach(t=>{var e=a.tables.filter(e=>e.name===t.table.name)[0];e?(t.table.columns=e.columns,t.deferred.resolve(t.table)):t.deferred.reject()})}).fail(()=>t.forEach(e=>e.deferred.reject())))})),this.getItems=e=>{var t=T.Deferred();return e.fullPath?t.resolve([]):this.getDbSchema().done(e=>{t.resolve(T.map(e.tables,e=>{return{name:e.name,displayName:e.name,isList:!1,specifics:e.isView?"view":"table",dragData:{noDragable:!1}}}))}),t.promise()}}_getDBSchema(e){return this._getDBSchemaCallback(this.connection,e)}_getDBSchemaCallback(e,t){return ze(this._requestWrapper,e,t)}_getDBStoredProcedures(e){return je(this._requestWrapper,e)}getDbSchema(){return this._dbSchema&&"rejected"!==this._dbSchema.state()||(this._dbSchema=this._getDBSchema()),this._dbSchema}getDbStoredProcedures(){return this._dbStoredProceduresSchema&&"rejected"!==this._dbStoredProceduresSchema.state()||(this._dbStoredProceduresSchema=this._getDBStoredProcedures(this.connection)),this._dbStoredProceduresSchema}getDbTable(t){var a;return this._tables[t]||(a=T.Deferred(),this._tables[t]=a.promise(),this.getDbSchema().done(e=>{e=Object(x.findFirstItemMatchesCondition)(e.tables,e=>e.name===t);e?0<e.columns.length?a.resolve(e):this._tableRequests.push({table:e,deferred:a}):(a.reject(),Object(x.isCustomizedWithUpdateLocalizationMethod)("The schema does not contain the specified table: ")?Object(C.getLocalization)("The schema does not contain the specified table: "):Object(x.formatUnicorn)(Object(C.getLocalization)('The schema does not contain the specified table: "{0}".',"DataAccessStringId.TableNotInSchemaValidationException"),t))}).fail(()=>a.reject())),this._tables[t]}}var Qe=[{propertyName:"tableName",modelName:"@Name"},{propertyName:"columns",modelName:"Fields",array:!0,info:[{propertyName:"name",modelName:"@Name"},{propertyName:"propertyType",modelName:"@Type"}]}];class Ve{constructor(e,t){(t=t||new C.ModelSerializer).deserialize(this,e)}getInfo(){return Qe}}var We,Fe=[{propertyName:"name",modelName:"@Name"},{propertyName:"tables",modelName:"Views",array:!0}];class Ue{constructor(e,t){(t=t||new C.ModelSerializer).deserialize(this,e),this.tables=Object(C.deserializeArray)(e&&e.Views||[],e=>new Ve(e,t))}getInfo(){return Fe}static from(e,t){return e&&new Ue(e.DataSet,t)||null}static toJson(e,t,a){return{DataSet:t.serialize(e,Fe,a)}}}(k=We=We||{})[k.Object=0]="Object",k[k.Array=1]="Array",k[k.Property=2]="Property";class He{constructor(e,t){this.nodes=[],e&&((t=t||new C.ModelSerializer).deserialize(this,e),e=(t=e.Node)instanceof Array?Ie(t,e=>new He(e)).sort((e,t)=>e.name().localeCompare(t.name())):t?[new He(t)]:[],this.nodes=e)}static from(e,t){return new He(e,t)}static toJsonNodes(e,t,a){return(e||[]).map(e=>He.toJsonNode(e,t,a))}static toJsonNode(e,t,a,i=!0){var r=t.serialize(e,Xe,a),i=i?He.toJsonNodes(e.nodes,t,a):[];return 0<i.length&&(r.Node=i),r}getInfo(){return Xe}}class Je extends He{constructor(e,t){super(e.Node,t),this.nodeType=We[We.Object],this.valueType="Unknown",this.displayName=Object(C.getLocalization)("root"),this.selected=_.observable(!1)}static from(e,t){return new Je(e||{},t)}static toJson(e,t,a){var i;return e?((i={Node:He.toJsonNode(e,t,a,!1)}).Node.Node=He.toJsonNodes(e.nodes,t,a),i):{}}getInfo(){return Xe}}class Ge extends He{constructor(e,t){super(e),this._rootElementList=null}static from(e,t){return new Ge(e,t)}static toJson(e,t,a){return Je.toJson(e.nodes[0],t,a)}getInfo(){return Ye}getRootElementPartList(e=!0){if(!this._rootElementList){if(0===this.nodes.length)return[];this._rootElementList=[];var t=this.nodes[0],a={fullPath:_.unwrap(t.name),path:"",pathParts:[_.unwrap(t.name)]};this._fillRootElementList(t,a,e),this._rootElementList.sort((e,t)=>e.fullPath.localeCompare(t.fullPath))}return this._rootElementList}_fillRootElementList(e=this.nodes[0],a={fullPath:"root",path:"",pathParts:["root"]},i){if(!e)return this._rootElementList;var t=_.unwrap(e.nodeType);if(t!=We[We.Property]){if(t!==We[We.Array])return i&&t===We[We.Object]&&this._rootElementList.push(a),(e.nodes||[]).forEach(e=>{var t=this._getNextPath(a,e.name());this._fillRootElementList(e,t,i)}),this._rootElementList;this._rootElementList.push(a)}}_getNextPath(e,t){var a=e.fullPath?[e.fullPath,t].join("."):t;return{pathParts:e.pathParts.concat(t),fullPath:a,path:t}}}var l,Xe=[{propertyName:"nodes",modelName:"Node",from:He.from,toJsonObject:He.toJsonNodes},{propertyName:"name",modelName:"@Name"},{propertyName:"selected",modelName:"@Selected",from:C.parseBool},{propertyName:"nodeType",modelName:"@NodeType"},{propertyName:"type",modelName:"@Type"}],Ye=[{propertyName:"nodes",modelName:"Node",from:Ge.from,toJsonObject:Ge.toJsonNodes}];class Ke{constructor(e,t){(t=t||new C.ModelSerializer).deserialize(this,e||{})}static from(e,t){return new Ke(e,t)}static toJson(e,t,a){return t.serialize(e,e.getInfo(),a)}getInfo(){return[{propertyName:"password",modelName:"@password",defaultVal:""},{propertyName:"userName",modelName:"@user",defaultVal:""}]}}(k=l=l||{})[k.PathParameter=0]="PathParameter",k[k.QueryParameter=1]="QueryParameter",k[k.Header=2]="Header";class Ze extends C.Disposable{constructor(e,t){super(),this.expression_Prefix="expression:",this.namePlaceholder=()=>Object(C.getLocalization)("Name","AnalyticsCoreStringId.CollectionEditor_Name_Placeholder"),this.valuePlaceholder=()=>Object(C.getLocalization)("Value","AnalyticsCoreStringId.CollectionEditor_Value_Placeholder"),this._editingValue=_.observable(""),this._expression={value:_.observable("")},this.isExpression=_.observable(!1),this.itemsProvider=null,this._parameterTypes=et,(t=t||new C.ModelSerializer).deserialize(this,e),this._initEditingProperties(),this._disposables.push(this.value=_.computed(()=>{var e=this.expression_Prefix+this._expression.value(),t=this._editingValue();return this.isExpression.peek()?e:t}))}static from(e,t){return new Ze(e||{},t)}static toJson(e,t,a){return t.serialize(e,e.getInfo(),a)}_initEditingProperties(){var e=this.value()||"";0===e.indexOf(this.expression_Prefix)?(this.isExpression(!0),this._expression.value(e.substring(this.expression_Prefix.length))):this._editingValue(e)}switchEditors(){var e=!this.isExpression();this.isExpression(e),e?this._expression.value(this._editingValue()?"'"+this._editingValue()+"'":""):this._editingValue("")}getInfo(){return[{propertyName:"name",modelName:"@Name",displayName:"Name",editor:v.editorTemplates.getEditor("text")},{propertyName:"value",modelName:"@Value",displayName:"Value",editor:v.editorTemplates.getEditor("text")},{propertyName:"itemType",modelName:"@ItemType",defaultVal:l[l.PathParameter],alwaysSerialize:!0}]}}var et=[{value:l[l.PathParameter],displayValue:"Path Parameter",localizationId:"AnalyticsCoreStringId.JsonDSWizard_ChooseJsonSourcePage_PathParameter"},{value:l[l.QueryParameter],displayValue:"Query Parameter",localizationId:"AnalyticsCoreStringId.JsonDSWizard_ChooseJsonSourcePage_QueryParameter"},{value:l[l.Header],displayValue:"Header",localizationId:"AnalyticsCoreStringId.JsonDSWizard_ChooseJsonSourcePage_Header"}];class tt extends C.Disposable{constructor(e={},a){function t(e,t){return e&&Array.isArray(e[l[t]])&&e[l[t]]&&(e=e[l[t]]),Object(C.deserializeArray)(e,e=>(e["@ItemType"]||(e["@ItemType"]=l[t]),new Ze(e,a)))}super(),this.sourceType=_.observable(),this.uri=_.observable(),this.json=_.observable(),(a=a||new C.ModelSerializer).deserialize(this,e),this._disposables.push(this.uri.subscribe(e=>{e&&this.sourceType(tt._URIJSONSOURCE_TYPE)})),this._disposables.push(this.json.subscribe(e=>{e&&this.sourceType(tt._CUSTOMJSONSOURCE_TYPE)})),this.queryParameters=t(e.QueryParameters,l.QueryParameter),this.headers=t(e.Headers,l.Header),this.pathParameters=t(e.PathParameters,l.PathParameter)}static from(e,t){return new tt(e||{},t)}static toJson(e,t,a){return t.serialize(e,at,a)}getInfo(){return at}serialize(e=!1){return e?{Source:this.serialize()}:(new C.ModelSerializer).serialize(this)}resetSource(){this.sourceType(""),this.json(""),this.uri("")}}tt._URIJSONSOURCE_TYPE="DevExpress.DataAccess.Json.UriJsonSource",tt._CUSTOMJSONSOURCE_TYPE="DevExpress.DataAccess.Json.CustomJsonSource";var at=[{propertyName:"sourceType",modelName:"@SourceType",defaultVal:""},{propertyName:"json",modelName:"@Json",defaultVal:""},{propertyName:"uri",modelName:"@Uri",defaultVal:""},{propertyName:"authenticationInfo",modelName:"AuthenticationInfo",from:Ke.from,toJsonObject:Ke.toJson},{propertyName:"headers",modelName:"Headers",array:!0},{propertyName:"queryParameters",modelName:"QueryParameters",array:!0},{propertyName:"pathParameters",modelName:"PathParameters",array:!0}],it=(e,t,a=[])=>{var i=T.Deferred();return e.getJsonSchema(t,a).done(e=>{try{var t=JSON.parse(e.jsonSchemaJSON),a=new Ge(t);i.resolve(a)}finally{"pending"===i.state()&&i.reject()}}).fail(e=>{Object(x.ShowMessage)(Object(x.formatUnicorn)(Object(C.getLocalization)("Schema loading failed. {0}","DxDesignerStringId.Error_SchemaLoadingFailed"),Object(x.getErrorMessage)(e))),i.reject()}),i.promise()},rt=it;function ot(e){rt=e}function st(){rt=it}class nt extends C.Disposable{constructor(e,t=new qe){super(),this._requestWrapper=t,this._jsonDataSource=e,this._disposables.push(this._jsonDataSource.source.sourceType.subscribe(()=>{this._jsonSchemaPromise=null})),this.getItems=t=>{var a=T.Deferred();return(this._jsonSchema?T.Deferred().resolve(this._jsonSchema).promise():this.getJsonSchema()).done(e=>{this._jsonSchema=e;e=this.getSchemaByPath(t,e);a.resolve(e)}).fail(a.reject),a.promise()}}reset(){this._jsonSchemaPromise=null}mapToDataMemberContract(e){return T.map(e||[],e=>{return{name:e.name(),displayName:e.displayName||e.name(),isSelected:e.selected(),isList:e.nodes&&0<e.nodes.length,specifics:"table",dragData:{noDragable:!1}}})}getSchemaByPath(t,e){if(t.fullPath){for(var a=e.nodes,i=0;i<t.pathParts.length;i++){var r=(a||[]).filter(e=>e.name()==t.pathParts[i])[0];if(!r)return[];a=r.nodes}return this.mapToDataMemberContract(a)}return this.mapToDataMemberContract(e.nodes)}getJsonSchema(e=[]){return this._jsonSchemaPromise&&"rejected"!==this._jsonSchemaPromise.state()||(this._jsonSchemaPromise=rt(this._requestWrapper,this._jsonDataSource,e)),this._jsonSchemaPromise}}class dt extends C.Disposable{constructor(e,t,a=new qe){super(),(t=t||new C.ModelSerializer).deserialize(this,e),this.jsonSchemaProvider=new nt(this,a),this.source&&this._disposables.push(this.source),this._disposables.push(this.connectionName.subscribe(()=>{this.source.resetSource()}))}getInfo(){return lt}clone(e){e=(e=e||new C.ModelSerializer).serialize(this);return new dt(e)}static from(e,t){return new dt(e,t)}static toJson(e,t,a){return t.serialize(e,lt,a)}getSchema(e=[]){var t=T.Deferred();return this.jsonSchemaProvider.getJsonSchema(e).done(e=>{this.schema=e,t.resolve(e)}).fail(()=>{this.schema=null,t.reject()}),t.promise()}}var lt=[{propertyName:"name",modelName:"@Name"},{propertyName:"connectionName",modelName:"@ConnectionName"},{propertyName:"rootElement",modelName:"@RootElement",defaultVal:"root"},{propertyName:"schema",modelName:"Schema",from:Ge.from,toJsonObject:Ge.toJson},{propertyName:"source",modelName:"Source",from:tt.from,toJsonObject:tt.toJson}],ct=[{propertyName:"closeConnection",modelName:"@CloseConnection",from:C.parseBool},{propertyName:"commandTimeout",modelName:"@DbCommandTimeout",from:e=>{e=parseInt(e);return isNaN(e)&&(e=null),_.observable(e)},defaultVal:null}];class ut{constructor(e,t){this.closeConnection=_.observable(!0),this.commandTimeout=_.observable(null),(t=t||new C.ModelSerializer).deserialize(this,e)}getInfo(){return ct}}var c,u={customSqlQuery:"CustomSqlQuery",tableQuery:"SelectQuery",storedProcQuery:"StoredProcQuery"},pt={fileJsonSource:"FileJsonSource",customJsonSource:"CustomJsonSource",uriJsonSource:"UriJsonSource"};function ht(e){return e&&!e.match(/[~`!"№;%\^:\?*\(\)&\-\+={}\[\]\|\\\/,\.<>'\s]/)}(k=c=c||{})[k.SelectNode=0]="SelectNode",k[k.UnionNode=1]="UnionNode",k[k.SourceNode=2]="SourceNode",k[k.TransformationNode=3]="TransformationNode";var mt=[{type:"custom",validationCallback:e=>ht(e.value),get message(){return Object(C.getLocalization)("Name is required and should be a valid identifier.","AnalyticsCoreStringId.NameIsRequired_Error")}}],gt={propertyName:"value",displayName:"Value",localizationId:"DevExpress.DataAccess.Parameter.Value",editor:v.editorTemplates.getEditor("text")},bt={propertyName:"name",displayName:"Name",localizationId:"DevExpress.DataAccess.Parameter.Name",validationRules:mt,editor:v.editorTemplates.getEditor("text")},ft={propertyName:"type",displayName:"Type",localizationId:"DevExpress.DataAccess.Parameter.Type",modelName:"@Type",editor:v.editorTemplates.getEditor("combobox"),valuesArray:[{value:"System.String",displayValue:"String",localizationId:"AnalyticsCoreStringId.Parameter_Type_String"},{value:"System.DateTime",displayValue:"Date",localizationId:"AnalyticsCoreStringId.Parameter_Type_DateTime"},{value:"System.Int16",displayValue:"Number (16 bit integer)",localizationId:"AnalyticsCoreStringId.Parameter_Type_Int16"},{value:"System.Int32",displayValue:"Number (32 bit integer)",localizationId:"AnalyticsCoreStringId.Parameter_Type_Int32"},{value:"System.Int64",displayValue:"Number (64 bit integer)",localizationId:"AnalyticsCoreStringId.Parameter_Type_Int64"},{value:"System.Single",displayValue:"Number (floating-point)",localizationId:"AnalyticsCoreStringId.Parameter_Type_Float"},{value:"System.Double",displayValue:"Number (double-precision floating-point)",localizationId:"AnalyticsCoreStringId.Parameter_Type_Double"},{value:"System.Decimal",displayValue:"Number (decimal)",localizationId:"AnalyticsCoreStringId.Parameter_Type_Decimal"},{value:"System.Boolean",displayValue:"Boolean",localizationId:"AnalyticsCoreStringId.Parameter_Type_Boolean"},{value:"System.Guid",displayValue:"Guid",localizationId:"AnalyticsCoreStringId.Parameter_Type_Guid"},{value:x.ExpressionType,displayValue:"Expression",localizationId:"DataAccessUIStringId.ParametersColumn_Expression"}]},yt={propertyName:"resultType",displayName:"Result Type",localizationId:"DataAccessWebStringId.QueryBuilder_ResultType",modelName:"@ResultType",editor:v.editorTemplates.getEditor("combobox"),valuesArray:ft.valuesArray.filter(e=>!Object(x.IsDataAccessExpression)(e.value))},St=[{propertyName:"_name",modelName:"@Name"},{propertyName:"_value",modelName:"#text"},gt,{propertyName:"itemType",modelName:"@ItemType"}],vt=[bt,ft,yt].concat(St),xt=[{value:"System.Byte",displayValue:"Non-negative number (8 bit integer)",localizationId:"DataAccessStringId.Type_Byte"},{value:"System.SByte",displayValue:"Number (8 bit integer)",localizationId:"DataAccessStringId.Type_SByte"},{value:"System.UInt32",displayValue:"Non-negative number (32 bit integer)",localizationId:"DataAccessStringId.Type_UInt"},{value:"System.UInt16",displayValue:"Non-negative number (16 bit integer)",localizationId:"DataAccessStringId.Type_UShort"},{value:"System.UInt64",displayValue:"Non-negative number (64 bit integer)",localizationId:"DataAccessStringId.Type_ULong"},{value:"System.Char",displayValue:"Char",localizationId:"DataAccessStringId.Type_Char"},{value:"System.Object",displayValue:"Object",localizationId:"DataAccessStringId.Type_Object"},{value:"System.Byte[]",displayValue:"Byte array",localizationId:"DataAccessStringId.Type_ByteArray"},{value:"System.TimeSpan",displayValue:"Time interval",localizationId:"DataAccessStringId.Type_TimeSpan"}];function _t(t){var e=Object(x.extend)(!0,{},ft),a=[],i=(a.push(ft.valuesArray.filter(e=>e.value===t)[0]||xt.filter(e=>e.value===t)[0]),a.push(ft.valuesArray.filter(e=>Object(x.IsDataAccessExpression)(e.value))[0]),e.valuesArray=a,Object(x.extend)(!0,{},yt));return i.valuesArray=a.slice(0,0),i.disabled=!0,[Object(x.extend)({disabled:!0},bt),e,i].concat(St)}var P=e(3),Ct=Object(P.insertInFunctionDisplay)({String:{CreateTable:[{paramCount:1,text:"CreateTable(, )",displayName:"CreateTable(Column1, ..., ColumnN)",descriptionStringId:"ExpressionEditorStringId.Function_CreateTable"}],FormatString:[{paramCount:1,text:"FormatString(, )",displayName:"FormatString(Format, Value1, ... , ValueN)",descriptionStringId:"ExpressionEditorStringId.Function_FormatString"}]}});function Tt(e,t,a){return Object(x.integerValueConverter)(e,t,a)}function Pt(e,t,a){return Object(x.floatValueConverter)(e,t,a)}class m{constructor(e,t,a,i){this.name=e,this.defaultValue=t,this.realTypeName=i,a&&(this.valueConverter=e=>a(e,t,this.name))}get specifics(){return we.GetSpecific(this.realTypeName||this.name)}}var Nt=()=>{var e=new Date;return e.setHours(0,0,0,0),e};class g extends C.Disposable{constructor(e,t,a=vt){super(),this._serializationsInfo=a,this._valueInfo=_.observable(gt),this._parametersFunctions=Ct,this.isValid=_.observable(!0),(t=t||new C.ModelSerializer).deserialize(this,Object(x.extend)(e,{"@ItemType":"Parameter"})),this._disposables.push(this.name=_.pureComputed({read:()=>this._name(),write:e=>{ht(e)&&this._name(e)}})),this._expressionValue=_.observable({value:this._value,functions:this._parametersFunctions}),this._disposables.push(this.type.subscribe(e=>{Object(x.IsDataAccessExpression)(e)?this.resultType(this._previousResultType):(this.resultType(null),this._previousResultType=e),this._updateValueInfo(e)})),this._previousResultType=Object(x.IsDataAccessExpression)(this.type.peek())?this.resultType():this.type(),this.value=_.pureComputed({read:()=>Object(x.IsDataAccessExpression)(this.type())?this._expressionValue():this._value(),write:e=>{this._value(e)}}),this._updateValueInfo(this.type.peek())}static _getTypeValue(t,e=null){var a=g._typeValues.filter(e=>e.name===t);return 0<a.length?(e&&Object(x.IsDataAccessExpression)(t)&&(a[0].realTypeName=e),a[0]):{name:t,defaultValue:null,specifics:"String",disableEditor:!0}}_getTypeValue(e){return g._getTypeValue(e,this.resultType())}_tryConvertValue(e,t){return g._isValueValid(e)&&(e=(t.valueConverter||(e=>e))(e),g._isValueValid(e))?e:t.defaultValue}static _isValueValid(e){return null!=e&&!isNaN("string"==typeof e?"":e)}getEditorType(e){return Object(x.getEditorType)(e)}_updateValueInfo(e){var e=this._getTypeValue(e),t=this._tryConvertValue(this._value(),e),a=this._expressionValue.peek();this._expressionValue(null),this._value(null),this._valueInfo(Object(x.extend)({},gt,{editor:this.getEditorType(e.name),disabled:!0===e.disableEditor,editorOptions:{onFocusOut:e=>{this.isValid(e.component.option("isValid"))}}})),this._expressionValue(a),this._value(t)}get specifics(){var t=Object(x.IsDataAccessExpression)(this.type.peek())?this.resultType():this.type(),e=g._typeValues.filter(e=>e.name===t);return 0<e.length?e[0].specifics:"string"}getInfo(){var e;return this.type?((e=Object(x.extend)(!0,[],this._serializationsInfo)).splice(e.indexOf(e.filter(e=>"value"===e.propertyName)[0]),1,this._valueInfo()),e):this._serializationsInfo}isPropertyVisible(e){return"resultType"!==e||Object(x.IsDataAccessExpression)(this.type())}}g._typeValues=[new m("System.DateTime",Nt(),e=>{var t;try{t=Object(x.parseDate)(e)}catch(e){t=Nt()}return t}),new m("System.String",""),new m("System.SByte","0",Tt),new m("System.Int16","0",Tt),new m("System.Int32","0",Tt),new m("System.Int64","0",Tt),new m("System.Byte","0",Tt),new m("System.UInt16","0",Tt),new m("System.UInt32","0",Tt),new m("System.UInt64","0",Tt),new m("System.Decimal","0",Pt),new m("System.Double","0",Pt),new m("System.Single","0",Pt),new m("System.Boolean",!1,e=>void 0!==e?"true"===String(e).toLowerCase():e),new m("System.Guid","00000000-0000-0000-0000-000000000000"),new m(x.ExpressionType,"",function(e){var t;return e instanceof Date?(t=e=>(e<10?"0":"")+e,Object(x.formatUnicorn)("#{0}/{1}/{2} {3}:{4}#",t(e.getMonth()+1),t(e.getDate()),e.getFullYear(),t(e.getHours()),t(e.getMinutes()))):(e||"").toString()}),new m("System.Char","")];var Ot=[{propertyName:"type",modelName:"@Type"},{propertyName:"name",modelName:"@Name"},{propertyName:"sqlString",modelName:"Sql",defaultVal:""},{propertyName:"parameters",modelName:"Parameters",array:!0},{propertyName:"itemType",modelName:"@ItemType"}];class wt{constructor(e,t,a){this.parent=t,(a||new C.ModelSerializer).deserialize(this,Object(x.extend)(e,{"@ItemType":"Query"})),this.type=_.pureComputed(()=>u.customSqlQuery),this.parameters=Object(C.deserializeArray)(e.Parameters,e=>new g(e,a))}getInfo(){return Ot}generateName(){return"CustomSqlQuery"}}var Dt=[{propertyName:"masterQuery",modelName:"@Master"},{propertyName:"detailQuery",modelName:"@Detail"},{propertyName:"_customName",modelName:"@Name"},{propertyName:"keyColumns",modelName:"KeyColumns",array:!0,info:[{propertyName:"masterColumn",modelName:"@Master"},{propertyName:"detailColumn",modelName:"@Detail"},{propertyName:"itemType",modelName:"@ItemType"}]},{propertyName:"itemType",modelName:"@ItemType"}];class It extends C.Disposable{constructor(e,t){super(),this.name=_.pureComputed({read:()=>this._customName()||this.masterQuery()+this.detailQuery(),write:e=>{this._customName(e)},deferEvaluation:!0}),(t||new C.ModelSerializer).deserialize(this,Object(x.extend)(e,{"@ItemType":"Relation"})),this._disposables.push(this.name)}dispose(){super.dispose(),this.disposeObservableArray(this.keyColumns)}createKeyColumn(){var e={masterColumn:_.observable(),detailColumn:_.observable(),itemType:"KeyColumn"};this.keyColumns.push(e)}getInfo(){return Dt}}class Et{constructor(e,t){this.name=_.observable(),this.parameteres=_.observable(),this.fromAppConfig=_.observable(!0),(t=t||new C.ModelSerializer).deserialize(this,e)}static from(e,t){return new Et(e,t)}static toJson(e,t,a){return t.serialize(e,kt,a)}getInfo(){return kt}}var kt=[{propertyName:"name",modelName:"@Name"},{propertyName:"parameteres",modelName:"Parameters"},{propertyName:"fromAppConfig",modelName:"@FromAppConfig",defaultVal:!1,from:C.parseBool}],At=[{propertyName:"type",modelName:"@Type"},{propertyName:"name",modelName:"@Name"},{propertyName:"parameters",modelName:"Parameters",array:!0},{propertyName:"_tablesObject",modelName:"Tables",info:[{propertyName:"tables",modelName:"SelectedTables",array:!0,info:[{propertyName:"name",modelName:"@Name"},{propertyName:"alias",modelName:"@Alias"}]}]},{propertyName:"filterString",modelName:"Filter",defaultVal:""},{propertyName:"itemType",modelName:"@ItemType"}];class $t{constructor(e,t,a){this.parent=t,(a||new C.ModelSerializer).deserialize(this,Object(x.extend)(e,{"@ItemType":"Query"})),this.type=_.pureComputed(()=>u.tableQuery),this.parameters=Object(C.deserializeArray)(e.Parameters,e=>new g(e,a))}tables(){return this._tablesObject.tables()}getInfo(){return At}generateName(){return 0<this.tables().length?this.tables()[0].alias()||this.tables()[0].name():"SelectQuery"}}var zt=[{propertyName:"type",modelName:"@Type"},{propertyName:"name",modelName:"@Name"},{propertyName:"procName",modelName:"ProcName"},{propertyName:"parameters",modelName:"Parameters",array:!0},{propertyName:"itemType",modelName:"@ItemType"}];class jt{constructor(e,t,a){this.parent=t,(a||new C.ModelSerializer).deserialize(this,Object(x.extend)(e,{"@ItemType":"Query"})),this.type=_.pureComputed(()=>u.storedProcQuery),this.parameters=Object(C.deserializeArray)(e.Parameters,e=>{var t=e["@Type"];return Object(x.IsDataAccessExpression)(t)&&(t=e["@ResultType"]||t),new g(e,a,_t(t))})}getInfo(){return zt}generateName(){return this.procName()||"Query"}}var Bt=[{propertyName:"name",modelName:"@Name"},{propertyName:"connection",modelName:"Connection",from:Et.from,toJsonObject:Et.toJson},{propertyName:"queries",modelName:"Queries",array:!0},{propertyName:"relations",modelName:"Relations",array:!0},{propertyName:"resultSet",modelName:"ResultSchema",from:Ue.from,toJsonObject:Ue.toJson},{propertyName:"itemType",modelName:"@ItemType"}];class Rt extends C.Disposable{constructor(e,t,a=new qe){super(),(t=t||new C.ModelSerializer).deserialize(this,Object(x.extend)(e,{"@ItemType":"SqlDataSource"}));var i=this._model.Name;i&&(this.name()||this.name(i),delete this._model.Name),this.queries=Object(C.deserializeArray)(e.Queries,e=>this.createQuery(e,t)),this.relations=Object(C.deserializeArray)(e.Relations,e=>new It(e,t)),this.connection&&e.ConnectionOptions&&(this.connection.options=new ut(e.ConnectionOptions,t)),this.dbSchemaProvider=new Le(this.connection,a),this._disposables.push(this.connection.name.subscribe(()=>{this.queries([]),this.relations([]),this.resultSet=null}))}getInfo(){return Bt}createQuery(e,t){if(e["@Type"]===u.customSqlQuery)return new wt(e,this,t);if(e["@Type"]===u.tableQuery)return new $t(e,this,t);if(e["@Type"]===u.storedProcQuery)return new jt(e,this,t);throw new Error("Unknown sql query type.")}}class Mt extends C.Disposable{constructor(){super(...arguments),this.name=_.observable()}setState(e){this.ctor=e.ctor,this.dataMember=e.dataMember,this.selectedType=e.selectedType,this.id=Object(x.guid)().replace(/-/g,""),this.name(e.dataSourceName)}}class qt{constructor(e){e&&(this.name=e.name,this.displayName=e.displayName,this.dataMember=e.dataMember)}}class Lt extends qt{constructor(e){super(e),e&&(this.value=e.value,this.type=e.type,this.resultType=e.resultType)}}class Qt extends qt{constructor(e){super(e),this.parameters=Ie(e.parameters,e=>new Lt(e))}}class Vt extends Qt{constructor(e){super(e),this.disabled=_.observable(!1),this.memberType=e&&e.memberType,this.isStatic=e.isStatic}static empty(){return new Vt({displayName:Vt.entireObject(),name:Vt.entireObject(),parameters:[]})}isEntireObject(){return this.name==Vt.entireObject()&&this.displayName==Vt.entireObject()}isAvailable(){return!this.disabled()}}Vt.entireObject=()=>Object(C.getLocalization)("Entire Object","AnalyticsCoreStringId.ObjectDSWizard_ConfigureParameters_EntireObject");class Wt extends Qt{}class Ft extends qt{constructor(e){super(e),this.ctors=Ie(e.ctors,e=>new Wt(e)),this.members=Ie(e.members,e=>new Vt(e))}updateMembers(t){this.members.forEach(e=>{t?e.disabled(!1):e.disabled(!!e.isEntireObject()||!e.isStatic)})}}var b=new v.EditorTemplates,Ut={propertyName:"name",modelName:"@Name",displayName:"Name",localizationId:"DevExpress.DataAccess.Sql.SqlQuery.Name",disabled:!0,editor:b.getEditor("text")},Ht={propertyName:"alias",modelName:"@Alias",displayName:"Alias",localizationId:"DataAccessUIStringId.QueryBuilderColumns_Alias",defaultVal:"",editor:b.getEditor("text")},Jt={propertyName:"text",modelName:"@Text",displayName:"Text",editor:b.getEditor("text")},Gt={propertyName:"selected",displayName:"Output",editor:b.getEditor("bool"),localizationId:"DataAccessUIStringId.QueryBuilderColumns_Output"},Xt={propertyName:"size",modelName:"@Size",defaultVal:"100,125",from:h.Size.fromString},Yt={propertyName:"location",modelName:"@Location",from:h.Point.fromString},Kt=[Xt,Yt],Zt=[Ut].concat(Kt),ea=[{propertyName:"queryType",modelName:"@QueryType"},Ut,Ht,{propertyName:"sourceName",modelName:"@SourceName"}];class ta extends C.Disposable{constructor(e,t,a,i){super(),this._sourcePath=i,e["@SourceName"]=e["@SourceName"]||a,(t||new C.ModelSerializer).deserialize(this,e),this._disposables.push(this.queryType=_.pureComputed(()=>c[c.SourceNode]))}getInfo(){return ea}getPath(){return this._sourcePath||(this.name()?this.name()===this.sourceName()?this.name():this.sourceName().slice(0,this.sourceName().indexOf(this.name())-1)+"."+this.name():void 0)}}var f,aa=[{propertyName:"table",modelName:"@NodeAlias"},Ut,Ht,{propertyName:"expressionType",modelName:"@ExpressionType"},{propertyName:"columnExpression",modelName:"@ColumnExpression"}];(k=f=f||{})[k.SelectColumnExpression=0]="SelectColumnExpression",k[k.SelectExpression=1]="SelectExpression",k[k.SelectAllColumnsExpression=2]="SelectAllColumnsExpression",k[k.SelectAllNodeColumnsExpression=3]="SelectAllNodeColumnsExpression",k[k.SelectRowCountExpression=4]="SelectRowCountExpression";class ia{constructor(e,t){(t=t||new C.ModelSerializer).deserialize(this,Object(x.extend)(e,{"@ItemType":"Expression"}))}getInfo(){return aa}}var ra=[{propertyName:"name",modelName:"@Name"},{propertyName:"queries",modelName:"Queries",array:!0},{propertyName:"relations",modelName:"Relations",array:!0},{propertyName:"sources",modelName:"Sources",array:!0},{modelName:"SerializableSourceMap",propertyName:"serializableSourceMap",array:!0,info:[{modelName:"@DataSource",propertyName:"dataSource",link:!0},{modelName:"@Name",propertyName:"name"}]}],oa=[{propertyName:"sourceName",modelName:"@SourceName"},{propertyName:"dataMember",modelName:"@DataMember"}];class sa extends C.Disposable{constructor(e,t,a,i){super(),t=t||new C.ModelSerializer,a&&1<(a=a.split(".")).length&&(e["@DataMember"]=a.slice(1).join("_")),i&&(e["@SourceName"]=i),t.deserialize(this,Object(x.extend)(e,{"@ItemType":"Source"}))}getInfo(){return oa}getDataSourceName(){return this.hasDataMember()?this.sourceName().slice(0,this.sourceName().lastIndexOf(this.dataMember())-1):this.sourceName()}getPath(){return this.getDataSourceName()+(this.hasDataMember()?"."+this.dataMember():"")}hasDataMember(){return this.dataMember()&&0!==this.sourceName().lastIndexOf(this.dataMember())}}var na=e(7),da=e(8),la=new C.ControlsFactory;class ca extends h.ElementViewModel{constructor(e,t,a){super(e,t,a)}getControlFactory(){return la}}class ua extends _e{constructor(e,t,a){super(Object(x.extend)(e,{"@ControlType":"JoinCondition","@ItemType":"KeyColumn"}),t,a),this.parentColumn=_.pureComputed(()=>t.parentTable().getColumn(this.parentColumnName())),this.nestedColumn=_.pureComputed(()=>t.nestedTable().getColumn(this.nestedColumnName())),this.joinType=t.joinType,this.left=_.pureComputed(()=>t.parentTableName()+"."+this.parentColumnName()),this.right=_.pureComputed(()=>t.nestedTableName()+"."+this.nestedColumnName()),this._disposables.push(_.computed(()=>{var e;this.parentColumn()&&this.nestedColumn()&&(e=te(this.parentColumn(),this.nestedColumn()),this.startPoint().connectingPoint(e.start),this.endPoint().connectingPoint(e.end))}))}getControlFactory(){return la}preInitProperties(){this.startPoint=_.observable(),this.endPoint=_.observable()}}var pa=[{propertyName:"joinType",modelName:"@Type"},{propertyName:"parentTableName",modelName:"@Parent"},{propertyName:"nestedTableName",modelName:"@Nested"},{propertyName:"conditions",modelName:"KeyColumns",defaultVal:[],array:!0},{propertyName:"itemType",modelName:"@itemType"}];class ha extends ca{constructor(e,t,a){super(Object(x.extend)(e,{"@ControlType":"Relation","@ItemType":"Relation"}),t,a),this.parentTable=_.observable(t.getTable(this.parentTableName.peek())),this.nestedTable=_.observable(t.getTable(this.nestedTableName.peek())),this.parentTableName=_.pureComputed(()=>this.parentTable().actualName()),this.nestedTableName=_.pureComputed(()=>this.nestedTable().actualName()),this.conditions=Object(C.deserializeArray)(e.KeyColumns,e=>new ua(e,this,a))}_getConditionNumber(){for(var e=this.conditions().length+1,t=this.conditions().map(e=>e.seriesNumber()),a=0;a<this.conditions().length;a++)if(-1===t.indexOf(a+1)){e=a+1;break}return e}getInfo(){return pa}addChild(e){this.conditions&&-1===this.conditions.indexOf(e)&&(e.seriesNumber(this._getConditionNumber()),e.parentModel(this),this.conditions.push(e))}removeChild(e){e=this.conditions().indexOf(e);-1<e&&this.conditions.splice(e,1),0===this.conditions().length&&this.parentModel().removeChild(this)}}var ma=[{propertyName:"condition",modelName:"@Condition",defaultVal:""},{propertyName:"joinType",modelName:"@JoinType",defaultVal:"Inner"},{propertyName:"query",modelName:"Query"}];class ga{constructor(e,t){(t=t||new C.ModelSerializer).deserialize(this,Object(x.extend)(e,{"@ItemType":"JoinElement"})),e.Query&&(this.query=_.observable(new ta(e.Query)))}static deserializeRelationModel(e,t){var i=t.parentTableName(),r=t.nestedTableName(),o=[],t=(t.conditions().forEach(e=>{var t="["+r+"."+e.nestedColumnName()+"]",a="["+i+"."+e.parentColumnName()+"]",e=da.operatorTokens[e.operator()];o.push(t+" "+e+" "+a)}),new ga({"@JoinType":t.joinType(),"@Condition":o.join(" And ")}));return t.query(e),t}_parsePath(e){return"["===e[0]&&"]"===e[e.length-1]?da.CriteriaOperatorStateMachine.parse(e).propertyName:e}_createCondition(e,t,a){return{"@ControlType":"JoinCondition","@ItemType":"KeyColumn","@Operator":a,"@Nested":t,"@Parent":e}}_conditionBinary(e){var t=this._parsePath(e.leftPart.propertyName),a=this._parsePath(e.rightPart.propertyName),e=na.BinaryOperatorType[e.operatorType];return this._createCondition(a.split(".")[1],t.split(".")[1],e)}createRelationModel(e){for(var t=da.CriteriaOperatorStateMachine.parse(this.condition()),a=[],t=(t instanceof na.GroupOperator?t.operands.forEach(e=>{e instanceof na.BinaryOperator&&a.push(e)}):t instanceof na.BinaryOperator&&a.push(t),this._parsePath(a[0].rightPart.propertyName).split(".")[0]),i=this._parsePath(a[0].leftPart.propertyName).split(".")[0],r={},o=0;o<a.length;o++)r["Item"+(o+1)]=this._conditionBinary(a[o]);return new ha({"@Parent":t,"@Nested":i,"@Type":this.joinType(),KeyColumns:r},e,new C.ModelSerializer)}getInfo(){return ma}}var ba=[{propertyName:"queryType",modelName:"@QueryType"},{propertyName:"alias",modelName:"@Alias"},{propertyName:"expressions",modelName:"Expressions",array:!0},{propertyName:"subNodes",modelName:"SubNodes",array:!0},{propertyName:"root",modelName:"Root"},{propertyName:"itemType",modelName:"@ItemType"}];class fa extends C.Disposable{constructor(e,t,a){super(),this._path=a,this.init(e,t,a)}get sources(){return _.observableArray([this.root()].concat(this.subNodes().map(e=>e.query())).map(e=>new sa({},new C.ModelSerializer,e.getPath(),e.sourceName())))}getInfo(){return ba}generateName(){return this.root()?this.root().alias():"SelectQuery"}init(e,t,a){(t||new C.ModelSerializer).deserialize(this,Object(x.extend)(e,{"@ItemType":"Query"})),this._disposables.push(this.queryType=_.pureComputed(()=>c[c.SelectNode])),this.expressions=Object(C.deserializeArray)(e.Expressions,e=>new ia(e,t)),this.subNodes=Object(C.deserializeArray)(e.SubNodes,e=>new ga(e,t)),e.Root&&(this.root=_.observable(new ta(e.Root,t,this.alias(),a)))}}var ya=[{propertyName:"queryType",modelName:"@QueryType"},{propertyName:"alias",modelName:"@Alias"},{propertyName:"transformationRules",modelName:"TransformationRules",array:!0},{propertyName:"root",modelName:"Root"},{propertyName:"itemType",modelName:"@ItemType"}],Sa=[{propertyName:"name",modelName:"@Name"},{propertyName:"alias",modelName:"@Alias"},{propertyName:"unfold",modelName:"@Unfold"},{propertyName:"flatten",modelName:"@Flatten"},{propertyName:"itemType",modelName:"@ItemType"}];class va extends C.Disposable{constructor(e,t){super(),(t||new C.ModelSerializer).deserialize(this,Object(x.extend)(e,{"@ItemType":"Query"})),this._disposables.push(this.queryType=_.pureComputed(()=>c[c.TransformationNode])),this.transformationRules=Object(C.deserializeArray)(e.TransformationRules,e=>new xa(e,t)),e.Root&&(this.root=_.observable(new ta(e.Root,t)))}get sources(){return _.observableArray([new sa({},new C.ModelSerializer,this.root().getPath(),this.root().sourceName())])}getInfo(){return ya}generateName(){return this.root()&&this.root().sourceName().split("_").pop()}}class xa{constructor(e,t){(t||new C.ModelSerializer).deserialize(this,Object(x.extend)(e,{"@ItemType":"TransformationRule"}))}getInfo(){return Sa}}class _a extends C.Disposable{constructor(e,t,a){super(),this.dataSources=t,this._serializer=a,this.sources=_.observableArray(),this._serializer=a||new C.ModelSerializer}_dataSourceName(e){var t;return(null==(t=null==e?void 0:e.data)?void 0:t.name())||(null==e?void 0:e.name)}getQueryNameFromPath(e){var t=e.split("."),e=this.dataSources().filter(e=>e.ref==t[0]||e.id==t[0])[0];return t[0]=this._dataSourceName(e)||t[0],t.join("_")}getPathFromQueryName(e){for(var t of this.sources()){var a,i;if(t.sourceName()===e)return t=t.getPath().split("."),i=t.shift(),a=this.dataSources().filter(e=>this._dataSourceName(e)==i)[0],(i=a&&(a.ref||a.id)||i)+(0<t.length?"."+t.join("."):"")}}createQuery(e,t){return e["@QueryType"]===c[c.SelectNode]?new fa(e,this._serializer,(t||this).getPathFromQueryName(e.Root&&e.Root["@SourceName"])):null}addSource(t,e){t instanceof sa?this.sources().filter(e=>e.sourceName()==t.sourceName())[0]||this.sources.push(t):this.sources().filter(e=>e.sourceName()==t)[0]||this.sources.push(new sa({},this._serializer,e,t))}removeSource(t){var e=Object(x.findFirstItemMatchesCondition)(this.sources(),e=>e.sourceName()===t);this.queries().some(e=>e.expressions().some(e=>e.table()===t))||this.sources.remove(e)}addSelectQuery(e,t){var a=this.getQueryNameFromPath(e),i=this.queries().filter(e=>e.alias()===a)[0];i||(i=new fa({"@Alias":a,Root:{}},this._serializer,e),this.queries.push(i),this.addSource(a,e)),t&&!i.expressions().filter(e=>e.name()==t)[0]&&(e=new ia({"@NodeAlias":a,"@Name":t,"@ExpressionType":f[f.SelectColumnExpression]},this._serializer),i.expressions.push(e))}removeQuery(t){var e=this.queries().filter(e=>e.alias()===t)[0],e=(this.queries.remove(e),this.sources().filter(e=>e.sourceName()==t)[0]);e&&this.sources.remove(e)}removeExpression(t,e){var a=this.getQueryNameFromPath(e),e=this.queries().filter(e=>e.alias()===a)[0],i=e.expressions().filter(e=>e.name()==t)[0];e.expressions.remove(i),0==e.expressions().length&&this.removeQuery(a)}dispose(){super.dispose(),this.disposeObservableArray(this.sources),this.disposeObservableArray(this.queries)}}var Ca,Ta=[{propertyName:"queryType",modelName:"@QueryType"},{propertyName:"unionType",modelName:"@UnionType"},{propertyName:"alias",modelName:"@Alias"},{propertyName:"queries",modelName:"UnionElements",array:!0}];(k=Ca=Ca||{})[k.Union=0]="Union",k[k.UnionAll=1]="UnionAll";class Pa extends _a{constructor(e,t,a){super(e,t,a),(a||new C.ModelSerializer).deserialize(this,Object(x.extend)(e,{"@ItemType":"Query"})),this._disposables.push(this.queryType=_.pureComputed(()=>c[c.UnionNode])),this.queries=Object(C.deserializeArray)(e.UnionElements,e=>this.createQuery(e))}getInfo(){return Ta}generateName(){return this.queries()[0]&&this.queries()[0].alias().split("_").pop()}}var Na=[{propertyName:"masterColumn",modelName:"@Parent"},{propertyName:"detailColumn",modelName:"@Nested"},{propertyName:"itemType",modelName:"@ItemType"}],Oa=[{propertyName:"masterQuery",modelName:"@MasterQueryName"},{propertyName:"detailQuery",modelName:"@DetailQueryName"},{propertyName:"_customName",modelName:"@RelationName"},{propertyName:"keyColumns",modelName:"KeyColumns",array:!0,info:Na},{propertyName:"itemType",modelName:"@ItemType"}];class wa extends It{static create(e){var t=new C.ModelSerializer;return(e=new wa(t.serialize(e),t)).keyColumns().forEach(e=>e.getInfo=()=>Na),e}constructor(e,t){super(e,t),this.getInfo=()=>Oa,e["@MasterQueryName"]&&e["@DetailQueryName"]&&(t||new C.ModelSerializer).deserialize(this,Object(x.extend)(e,{"@ItemType":"Relation"}))}}class Da extends C.Disposable{constructor(e,t){super(),this.dataSources=_.observableArray([]),this.serializer=t||new C.ModelSerializer,e&&(this.dataSource=e,this.dataSources(this._currentDataSources))}get _currentDataSources(){var e=[];return this.dataSource&&this.dataSource.serializableSourceMap().reduce((e,t)=>(-1===e.indexOf(t.dataSource())&&e.push(t.dataSource()),e),e),e}_collectDependentDataSources(t,a){t.serializableSourceMap&&t.serializableSourceMap().forEach(e=>this._collectDependentDataSources(e.dataSource(),a)),a.filter(e=>_.unwrap(e.name)===_.unwrap(t.name))[0]||a.push(t)}dispose(){this.dataSource=null,this.dataSources=null}getInfo(){return[{propertyName:"dataSources",modelName:"dataSources",array:!0},{propertyName:"dataSource",modelName:"dataSource"}]}collectDependentDataSources(){var t=[];return this._currentDataSources.forEach(e=>this._collectDependentDataSources(e,t)),t}serialize(){var e=new Da(null),t=(e.dataSource=this.dataSource,e.dataSources(this.collectDependentDataSources()),this.serializer.serialize(e));return e.dispose(),t}getSerializableFederationDataSourceInfo(){var t=this.serialize();return{dataSource:JSON.stringify(t.dataSource),dataSources:Object.keys(t.dataSources).map(e=>JSON.stringify(t.dataSources[e]))}}}class Ia extends C.Disposable{constructor(e){super(),this._rootItems=[],this.getItems=e.getItems}getDbSchema(){var t=T.Deferred();return this._rootItems.length?t.resolve(this._rootItems):this.getItems(new C.PathRequest("")).done(e=>{t.resolve(e)}),t.promise()}getDbTable(t,e){var a=T.Deferred();return this.getItems(new C.PathRequest(e)).done(e=>{e=e.map(e=>({Name:e.displayName||e.name}));a.resolve(new Ee({Name:t,columns:e}))}),a.promise()}dispose(){super.dispose(),this.getItems=null}}class Ea extends _a{constructor(e,t,a,i){super(e,t,i),this.dataSources=t,this.fielListProvider=a,this.serializableSourceMap=_.observableArray(),this._serializer.deserialize(this,Object(x.extend)(e,{"@ItemType":"FederationDataSource"})),this.sources=Object(C.deserializeArray)(e.Sources,e=>new sa(e,i)),this.queries=Object(C.deserializeArray)(e.Queries,e=>this.createQuery(e)),this.relations=Object(C.deserializeArray)(e.Relations,e=>new wa(e,this._serializer)),a&&this._disposables.push(this.dbSchemaProvider=new Ia(this.fielListProvider)),this.updateSerializableModel()}getInfo(){return ra}getSerializableModel(){return this._serializableModel}createQuery(e){var t=super.createQuery(e);if(!t){if(e["@QueryType"]===c[c.UnionNode])return new Pa(e,this.dataSources,this._serializer);if(e["@QueryType"]===c[c.TransformationNode])return new va(e,this._serializer)}return t}updateSerializableModel(){this.serializableSourceMap=_.observableArray(),this.sources().forEach(e=>{var t=e.getDataSourceName();t&&this.serializableSourceMap().push({name:_.observable(e.sourceName()),dataSource:_.observable(this.dataSources().filter(e=>this._dataSourceName(e)===t)[0].data)})}),this._serializableModel=new Da(this,this._serializer)}dispose(){super.dispose(),this.disposeObservableArray(this.relations),this._serializableModel.dispose()}get dependentDataSources(){return this.getSerializableModel().getSerializableFederationDataSourceInfo().dataSources}}function ka(e,t,a="name"){var i=(t[a]()||t.generateName()).replace(".","_");return Object(x.findFirstItemMatchesCondition)(e,e=>e[a]()===i)?Object(x.getUniqueNameForNamedObjectsArray)(e,i+"_"):i}var y,S={ChoosePredefinedDataSourcePage:"choosePredefinedDataSourcePage",ChooseDataSourceTypePage:"chooseDataSourceTypePage",ConfigureMasterDetailRelationshipsPage:"configureMasterDetailRelationshipsPage"},N={ChooseConnectionPage:"chooseSqlConnectionPage",ConfigureQueryPage:"configureSqlQueryPage",ConfigureParametersPage:"configureSqlParametersPage",MultiQueryConfigurePage:"multiSqlQueryConfigurePage",MultiQueryConfigureParametersPage:"multiSqlQueryConfigureParametersPage",FederatedQueryConfigurePage:"federatedQueryConfigurePage"},Aa={FederatedQueryConfigurePage:"federatedQueryConfigurePage",FederatedMasterDetailRelationshipsPage:"federatedMasterDetailRelationshipsPage"},O={ChooseJsonSourcePage:"chooseJsonSourcePage",ChooseJsonSchemaPage:"chooseJsonSchemaPage",ChooseConnectionPage:"chooseJsonConnectionPage",SpecifyJsonConnectionPage:"specifyJsonConnectionPage"},$a={ChooseTypesPage:"chooseObjectDataSourceTypesPage",ChooseDataMembersPage:"chooseObjectDataSourceDataMembersPage",ConfigureParametersPage:"configureObjectDataSourceParametersPage"},w={ChooseDataSourceTypePage:S.ChooseDataSourceTypePage,SpecifySqlDataSourceSettingsPage:"specifySqlDataSourceSettingsPage",SpecifyJsonDataSourceSettingsPage:"specifyJsonDataSourceSettingsPage",SpecifyObjectDataSourceSettingsPage:"specifyObjectDataSourceSettingsPage",SpecifyFederationDataSourceSettingsPage:"specifyFederationDataSourceSettingsPage",SelectDataSourcePage:"selectDataSourcePage"},D={SpecifyJsonConnectionPage:O.SpecifyJsonConnectionPage,ChooseJsonSchemaPage:O.ChooseJsonSchemaPage,ChooseJsonSourcePage:O.ChooseJsonSourcePage,ChooseSqlConnectionPage:N.ChooseConnectionPage,ConfigureFederatedQueriesPage:Aa.FederatedQueryConfigurePage,ConfigureFederatedMasterDetailRelationshipsPage:Aa.FederatedMasterDetailRelationshipsPage,ConfigureQueryPage:N.MultiQueryConfigurePage,ConfigureQueryParametersPage:N.MultiQueryConfigureParametersPage,ConfigureMasterDetailRelationshipsPage:S.ConfigureMasterDetailRelationshipsPage};const za="__loadingState",ja="__nextAction";class I extends C.Disposable{constructor(){super(...arguments),this.changeAlways=!1,this._onChange=()=>{}}dispose(){super.dispose(),this._onChange=()=>{}}commit(){return T.Deferred().resolve().promise()}onChange(e){this._onChange=e}initialize(e,t){return T.Deferred().resolve().promise()}canNext(){return!0}canFinish(){return!1}}(k=y=y||{})[k.NoData=0]="NoData",k[k.Sql=1]="Sql",k[k.Json=2]="Json",k[k.Object=3]="Object",k[k.Federation=4]="Federation";class Ba{constructor(e,t,a,i,r){this.text=Object(C.getLocalization)(e,t),this.imageClassName=a,this.imageTemplateName=i,this.type=r}}class Ra extends I{constructor(e){super(),this._dataSourceTypeOptions=e,this._itemClick=e=>{this.selectedItem(e)},this._IsSelected=e=>this.selectedItem().type===e.type,this.selectedItem=_.observable(),this.typeItems=this._createTypeItems(),this._disposables.push(this.selectedItem.subscribe(()=>this._onChange())),this._extendCssClass=T.noop}canNext(){return null!=this.selectedItem()}canFinish(){return!1}_goToNextPage(){this[ja]&&this[ja]()}commit(){return T.Deferred().resolve({dataSourceType:this.selectedItem().type}).promise()}_createTypeItems(){var e=[];return this._dataSourceTypeOptions.sqlDataSourceAvailable&&e.push(new Ba("Database","DataAccessUIStringId.DSTypeSql","sqldatasource","dxrd-svg-wizard-SqlDataSource",y.Sql)),this._dataSourceTypeOptions.jsonDataSourceAvailable&&e.push(new Ba("JSON","DataAccessUIStringId.DSTypeJson","jsondatasource","dxrd-svg-wizard-JsonDataSource",y.Json)),this._dataSourceTypeOptions.objectDataSourceAvailable&&e.push(new Ba("Object","DataAccessUIStringId.DSTypeObject","objectdatasource","dxrd-svg-wizard-ObjectDataSource",y.Object)),this._dataSourceTypeOptions.federationDataSourceAvailable&&e.push(new Ba("Data Federation","DataAccessUIStringId.DSTypeFederation","federationdatasource","dxrd-svg-wizard-FederationDataSource",y.Federation)),e}initialize(e){var t;return this.typeItems&&0!==this.typeItems.length?(t=void 0!==e.dataSourceType?e.dataSourceType:this.typeItems[0].type,this.selectedItem(Object(x.findFirstItemMatchesCondition)(this.typeItems,e=>e.type===t))):this.selectedItem(null),T.Deferred().resolve().promise()}}function Ma(e,t){e.registerMetadata(S.ChooseDataSourceTypePage,{setState:(e,t)=>{t.dataSourceType=e.dataSourceType},getState:e=>e,resetState:(e,t)=>{e.dataSourceType=t.dataSourceType},create:()=>new Ra(t),description:Object(C.getLocalization)("Select the data source type.","DataAccessUIStringId.WizardPageChooseDSType"),template:"dxrd-page-choose-datasource-type"})}class qa{constructor(e,a,t){this.sqlDataSourceJSON=e,this.customQueries=[],this.sqlDataSource=new Rt(e?JSON.parse(e):{},void 0,t),a?this.sqlDataSource.queries().some((e,t)=>e.name()===a&&(this._queryIndex=t,!0)):this._queryIndex=this.sqlDataSource.queries().length}get sqlQuery(){return this.sqlDataSource.queries()[this._queryIndex]}set sqlQuery(e){e&&(e.parent=this.sqlDataSource),this.sqlDataSource.queries()[this._queryIndex]=e}saveCustomQueries(){var t=new C.ModelSerializer;return 0<this.customQueries.length&&this.customQueries.map(e=>JSON.stringify(t.serialize(e)))}save(){return JSON.stringify((new C.ModelSerializer).serialize(this.sqlDataSource))}}var E,La=(e,t,a)=>{var i=new qa(e.sqlDataSourceJSON,e.queryName,t),r=(e.name&&i.sqlDataSource.connection.name(e.name),new C.ModelSerializer);return e.customQueries&&0<e.customQueries.length&&(i.customQueries=e.customQueries.map(e=>i.sqlDataSource.createQuery(JSON.parse(e),r)),i.sqlDataSource.queries.push(...i.customQueries)),e.relations&&0<e.relations.length&&i.sqlDataSource.relations.push(...e.relations.map(e=>new It(JSON.parse(e),r))),i.sqlDataSource.id=a||Object(x.guid)().replace(/-/g,""),i},Qa=La,Va=e=>{Qa=e},Wa=()=>{Qa=La},Fa=(e,t,a)=>{t=new Ea(JSON.parse(e.federationDataSourceJSON),t);return a&&(t.id=a),e.relations&&0<e.relations.length&&t.relations.push(...e.relations.map(e=>new wa(JSON.parse(e),new C.ModelSerializer))),t},Ua=(e,t,a)=>{t=new dt({Source:e.jsonSource&&JSON.parse(e.jsonSource)||{},Schema:e.jsonScheme&&JSON.parse(e.jsonScheme)||{},"@RootElement":e.rootElement||""},void 0,t);return e.connectionName&&t.connectionName(e.connectionName),e.dataSourceName&&t.name(e.dataSourceName),t.id=a||Object(x.guid)().replace(/-/g,""),t},Ha=Ua;function Ja(e){Ha=e}function Ga(){Ha=Ua}function Xa(e,t,a){var i=new Mt;return i.setState(e),a&&(i.id=a),i}function Ya(e={},t={jsonSource:""},a={},i={}){return{dataSourceType:y.Sql,jsonDataSourceWizard:t,sqlDataSourceWizard:e,objectDataSourceWizard:a,federationDataSourceWizard:i,dataSourceId:Object(x.guid)().replace(/-/g,"")}}class Ka extends C.Disposable{constructor(e,t,a,i){super(),this.pageId=e,this.page=t,this.template=a,this.description=i,this._isInitialized=!1,this._initDef=null,this.isChanged=!0,t.onChange&&(this.onChange=e=>t.onChange(e))}dispose(){this.onChange=null,this[za]=null,this.page.dispose(),this._initDef&&this._initDef.reject(),this._initDef=null}resetCommitedState(){this._lastCommitedState=null}commit(){return this.page.commit().done(e=>{this.isChanged=JSON.stringify(this._lastCommitedState)!==JSON.stringify(e),this._lastCommitedState=e})}initialize(e,t=!1,a=!1){return this._initDef&&this._initDef.reject(),this._initDef=T.Deferred(),!this._isInitialized||t?(this._isInitialized=!0,this.page.initialize(e,a).fail(()=>{this._isInitialized=!1,this._initDef&&this._initDef.reject()}).done(e=>{this._initDef&&this._initDef.resolve(e)})):this._initDef.resolve(),this._initDef.promise()}}class Za extends I{constructor(e,t){super(),this._getSqlConnectionsCallback=t,this._connectionStrings=_.observableArray([]),this._selectedConnectionString=_.observableArray([]),this._connectionStrings=e,this._disposables.push(this._selectedConnectionString.subscribe(()=>this._onChange()))}initialize(t){var a,e,i=e=>{1===e.length?this._selectedConnectionString([e[0]]):(e=Object(x.getFirstItemByPropertyValue)(e,"name",t.name)||e[0],this._selectedConnectionString(e?[e]:[]))};return(this._getSqlConnectionsCallback?(a=T.Deferred(),this._getSqlConnectionsCallback().done(e=>{this._connectionStrings(e),i(e),a.resolve(e)}).fail(()=>{a.reject()}),a):(e=this._connectionStrings(),i(e),T.Deferred().resolve())).promise()}canNext(){return 0!==this._selectedConnectionString().length}commit(){var e=T.Deferred();return this._selectedConnectionString()[0]?e.resolve({name:this._selectedConnectionString()[0].name}):e.resolve(),e.promise()}}function ei(e,t,a){e.registerMetadata(N.ChooseConnectionPage,{create:()=>new Za(t,a),setState:(e,t)=>{t.name=e.name},getState:e=>e.sqlDataSourceWizard,resetState:(e,t)=>{e.name=t.name},template:"dxrd-page-connectionstring",description:Object(x.localizeWithUpdateLocalizationMethod)("Choose a data connection")||Object(C.getLocalization)("Choose a data connection.","AnalyticsCoreStringId.SqlDSWizard_PageChooseConnection")})}class ti extends C.Disposable{constructor(e,t){super(),this._parameter=e,this._itemsProvider=t,this.type=_.observable(""),this.type(this._parameter.type);e=g._getTypeValue(this._parameter.resultType);this._initGetInfo(e),(new C.ModelSerializer).deserialize(this,{}),this._subscribeProperties(),this._afterInitialize()}switchPropertyType(){this.isExpression()?(this.type(this._parameter.resultType),this._parameter.value=this.value()):(this.type(x.ExpressionType),this._parameter.value=this.expression.value())}isExpression(){return Object(x.IsDataAccessExpression)(this.type())}_generateInfo(e,t="value"){return Object(x.extend)({},{displayName:this._parameter.displayName,propertyName:t,modelName:t,editorOptions:{}},e)}_initGetInfo(t){var e=[this._generateInfo({editor:Object(x.getEditorType)(this._parameter.resultType),from:e=>_.observable((t.valueConverter||(e=>e))(e)),defaultVal:!this.isExpression()&&this._parameter.value||t.defaultValue}),this._generateInfo({editor:{header:"dx-objectdatasource-expression-popup"},from:e=>({value:_.observable(e),itemsProvider:this._itemsProvider}),defaultVal:this.isExpression()&&this._parameter.value||""},"expression")];this._disposables.push({dispose:()=>this.getInfo=void 0}),this.getInfo=()=>e}_isDateTimeParamerterType(){return"System.DateTime"===this._parameter.resultType}_patchOriginalParameterValue(e){e&&this._isDateTimeParamerterType()&&e instanceof Date?this._parameter.value=Object(C.serializeDate)(e):this._parameter.value=e}_afterInitialize(){!this.isExpression()&&this._isDateTimeParamerterType()&&this._patchOriginalParameterValue(this.value())}_subscribeProperties(){this._disposables.push(this.type.subscribe(e=>{this._parameter.type=e}),this.expression.value.subscribe(e=>{this.isExpression()&&this._patchOriginalParameterValue(e)}),this.value.subscribe(e=>{this.isExpression()||this._patchOriginalParameterValue(e)}))}isPropertyVisible(e){return this.isExpression()?"expression"===e:"value"===e}}class ai{constructor(e){this._editor=e,this.imageTemplateName="dx-objectdatasource-expression"}_doWithModel(e){var t=this._editor._model();if(t instanceof ti)return e(t)}switchEditors(){this._doWithModel(e=>e.switchPropertyType())}isExpression(){return this._doWithModel(e=>e.isExpression())}}class ii extends v.ObjectProperties{constructor(e){super(_.observable(e)),this.createEditorAddOn=e=>{return{data:new ai(e),templateName:"dx-wizard-menu-box-editorswitch"}}}}class ri extends C.Disposable{constructor(e,a){super(),this.displayName=e.displayName,this._grids=e.parameters.map(e=>{var e=new ti(e,a),t=new ii(e);return this._disposables.push(e),this._disposables.push(t),t})}}class oi extends C.Disposable{constructor(e){super(),this._itemsProvider=e,this._ctorParametersObject=_.observable(),this._dataMemberParametersObject=_.observable(),this.hasParameters=()=>this._dataMemberParametersObject()||this._ctorParametersObject()}_updateParameters(e,t){this[e]()&&this[e]().dispose(),t&&0<t.parameters.length?this[e](new ri(t,this._itemsProvider)):this[e](null)}updateCtorParameters(e){this._updateParameters("_ctorParametersObject",e)}updateMethodParameters(e){this._updateParameters("_dataMemberParametersObject",e)}}class si extends oi{constructor(e,t,a){super(a),this._disposables.push(e.subscribe(e=>{this.updateCtorParameters(e)})),this._disposables.push(t.subscribe(e=>{this.updateMethodParameters(e[0])}))}}class ni extends I{constructor(e){super(),this._objectDataSource=new Mt,this._disposables.push(this._chooseObjectParameters=new oi(e))}canNext(){return!1}canFinish(){return!0}commit(){return T.Deferred().resolve({selectedType:this._objectDataSource.selectedType,ctor:this._objectDataSource.ctor,dataMember:this._objectDataSource.dataMember,dataSourceName:this._objectDataSource.name()}).promise()}initialize(e){return this._objectDataSource.setState(e),this._chooseObjectParameters.updateCtorParameters(this._objectDataSource.ctor),this._chooseObjectParameters.updateMethodParameters(this._objectDataSource.dataMember),T.Deferred().resolve().promise()}}function di(e,t){e.registerMetadata($a.ConfigureParametersPage,{setState:(e,t)=>{t.ctor=e.ctor,t.dataMember=e.dataMember,t.selectedType=e.selectedType},getState:e=>e.objectDataSourceWizard,resetState:(e,t)=>{e.dataMember=t.dataMember},create:()=>new ni(t&&t()),description:Object(C.getLocalization)("Configure constructor parameters and/or method parameters.","AnalyticsCoreStringId.ObjectDSWizard_ConfigureParameters_Description"),template:"dx-objectdatasource-configureparameters-page"})}class li{constructor(e){e=Ie(e,e=>new Ft(e));this.types=e.sort((e,t)=>e.displayName.localeCompare(t.displayName))}}function ci(e,t){var a=T.Deferred();return e.getObjectTypeDescriptions(t).done(e=>{try{var t=new li(e.objectDataSourceInfoJson);a.resolve(t)}finally{"pending"===a.state()&&a.reject()}}).fail(e=>{Object(x.ShowMessage)(Object(x.formatUnicorn)(Object(C.getLocalization)("Schema loading failed. {0}","DxDesignerStringId.Error_SchemaLoadingFailed"),Object(x.getErrorMessage)(e))),a.reject()}),a.promise()}class ui extends C.Disposable{constructor(e=new qe){super(),this._requestWrapper=e,this.getItems=t=>{var a=T.Deferred();return this.getObjectTypeDescriptions().done(e=>{a.resolve(this.getSchemaByPath(t,e))}).fail(a.reject),a.promise()}}dispose(){this._objectTypeDescriptionsPromise=null}getSchemaByPath(t,e){if(t.fullPath){for(var a=[],i=0;i<t.pathParts.length;i++){var r=(e.types||[]).filter(e=>e.name==t.pathParts[i])[0];if(!r)return[];a=r.ctors}return a.map(e=>Object(x.extend)({},e,{isList:!1,specifics:"default"}))}return e.types.map(e=>Object(x.extend)({},e,{isList:!0,specifics:"List"}))}getObjectTypeDescriptions(e=""){return this._objectTypeDescriptionsPromise&&"rejected"!==this._objectTypeDescriptionsPromise.state()||(this._objectTypeDescriptionsPromise=ci(this._requestWrapper,e)),this._objectTypeDescriptionsPromise}}class pi extends P.TreeListController{canSelect(e){return!0}}class hi extends C.Disposable{constructor(e,t){super(),this.types=e,this.selectedType=_.observable(),this.selectedCtor=_.observable(),this.selectedPath=_.observable(""),this._scrollViewHeight="calc(100% - 36px)",this.availableTypesTreelistModel={expandRootItems:!0,itemsProvider:t,selectedPath:this.selectedPath,treeListController:new pi},this._disposables.push(this.availableTypesTreelistModel.selectedPath.subscribe(a=>{e().forEach(t=>{t.name==a?(this.selectedType(t),null==this.selectedCtor()?this.selectedCtor.valueHasMutated():this.selectedCtor(null)):t.ctors.forEach(e=>{t.name.concat(".").concat(e.name)==a&&(this.selectedType(t),this.selectedCtor(e))})})}))}}class mi extends I{constructor(e=new qe){super(),this._requestWrapper=e,this._objectDataSource=new Mt,this._types=_.observableArray([]),this._disposables.push(this._provider=new ui(this._requestWrapper),this._chooseObjectType=new hi(this._types,this._provider))}canNext(){return!!this._selectedTypeName}canFinish(){return!1}commit(){return T.Deferred().resolve({selectedType:this._selectedTypeName,selectedObjectType:this._chooseObjectType.selectedType(),ctor:this._chooseObjectType.selectedCtor()}).promise()}initialize(e){return this._objectDataSource.setState(e),this._provider.getObjectTypeDescriptions(e.context).done(e=>{e.types.forEach(e=>e.members.splice(0,0,Vt.empty())),this._types(e.types||[]),0<e.types.length&&this._chooseObjectType.selectedPath(e.types[0].name)}),T.Deferred().resolve().promise()}get _selectedTypeName(){return this._chooseObjectType.selectedType()?this._chooseObjectType.selectedType().name:null}}function gi(e,t){e.registerMetadata($a.ChooseTypesPage,{setState:(e,t)=>{t.selectedType=e.selectedType,t.selectedObjectType=e.selectedObjectType,t.ctor=e.ctor},getState:e=>e.objectDataSourceWizard,resetState:(e,t)=>{e.selectedType=t.selectedType,e.selectedObjectType=t.selectedObjectType,e.ctor=t.ctor},create:()=>new mi(t.requestWrapper),description:Object(C.getLocalization)("Choose the type and its constructor.","AnalyticsCoreStringId.ObjectDSWizard_ChooseType_Description"),template:"dxrd-page-objectdatasource-types"})}class bi extends C.Disposable{constructor(t,e){super(),this.dataMembers=_.observableArray([]),this.selectedDataMembers=_.observableArray([]);var a=t()&&t().name;this._disposables.push(e.subscribe(e=>{t().updateMembers(e),a!=t().name&&(this.dataMembers(t().members),this.selectedDataMembers([]),a=t().name),this.coerceSelection()}))}coerceSelection(){var e=this.selectedDataMembers()[0],e=e&&e.isAvailable()?e:this.dataMembers().filter(e=>e.isAvailable())[0];this.selectedDataMembers([e])}}class fi extends I{constructor(e=new qe){super(),this._requestWrapper=e,this._objectDataSource=new Mt,this._type=_.observable(),this._ctor=_.observable(),this._disposables.push(this._chooseObjectDataMember=new bi(this._type,this._ctor))}initialize(e){return this._objectDataSource.setState(e),this._type(e.selectedObjectType),this._ctor(e.ctor),T.Deferred().resolve().promise()}canNext(){return!!this._needParametersPage}canFinish(){return!this._needParametersPage}commit(){return T.Deferred().resolve({selectedType:this._type().name,ctor:this._ctor(),dataMember:!this._selectedDataMember||this._selectedDataMember.isEntireObject()?void 0:this._selectedDataMember}).promise()}get _selectedDataMember(){var e=this._chooseObjectDataMember.selectedDataMembers();return e?e[0]:null}get _needParametersPage(){return!!this._selectedDataMember&&0<this._selectedDataMember.parameters.length||!!this._ctor()&&0<this._ctor().parameters.length}}function yi(e,t){e.registerMetadata($a.ChooseDataMembersPage,{setState:(e,t)=>{t.selectedType=e.selectedType,t.ctor=e.ctor,t.dataMember=e.dataMember},getState:e=>e.objectDataSourceWizard,resetState:(e,t)=>{e.dataMember=t.dataMember},create:()=>new fi(t.requestWrapper),description:Object(C.getLocalization)("Choose the entire object or a data member to bind.","AnalyticsCoreStringId.ObjectDSWizard_ChooseDataMember_Description"),template:"dxrd-page-objectdatasource-datamembers"})}(k=E=E||{})[k.Left=1]="Left",k[k.TopLeft=2]="TopLeft",k[k.BottomLeft=3]="BottomLeft",k[k.Right=4]="Right",k[k.TopRight=5]="TopRight",k[k.BottomRight=6]="BottomRight",k[k.Top=7]="Top",k[k.Bottom=8]="Bottom";class Si extends P.TreeListItemViewModel{constructor(){super(...arguments),this.queryName=_.computed({read:()=>this.data&&this.data.name,write:e=>{var t=this.data;t&&t.name!==e&&(t.name=e,t._afterCheckToggled)&&t._afterCheckToggled(t)}}),this.editingMode=_.observable(!1)}dispose(){super.dispose(),this.queryName.dispose()}_getTemplateName(){return this._getCustomizedTemplateName(!0)}_getCustomizedTemplateName(e){return e?"dxd-custom-query-treelisitem":super._getTemplateName()}}class vi extends P.DefaultTreeListItemFactory{createItem(e,t,a,i,r){return"queries"===t[0]?new Si(e,t,a,i,r):super.createItem(e,t,a,i,r)}}function xi(e,t=30,a=!0){var i="inherit",t="-"+t/2+"px";return e?{top:e===E.Left||e===E.Right||e===E.Top||e===E.TopLeft||e===E.TopRight?t:i,bottom:e===E.Left||e===E.Right||e===E.Bottom||e===E.BottomLeft||e===E.BottomRight?t:i,left:e===E.Top||e===E.Bottom||e===E.Left||e===E.TopLeft||e===E.BottomLeft?t:i,right:e===E.Top||e===E.Bottom||e===E.Right||e===E.TopRight||e===E.BottomRight?t:i,width:e===E.Top||e===E.Bottom?i:"50%",height:e===E.Left||e===E.Right?i:"50%",display:a?"block":"none"}:{top:t,bottom:t,left:t,right:t,width:i,height:i,display:a?"block":"none"}}function _i(e,t,a){return e().forEach(e=>t(e,a)),e.subscribe(e=>{e.forEach(e=>{"added"===e.status?t(e.value,a):"deleted"===e.status&&e.value.dispose&&e.value.dispose()}),a()},null,"arrayChange")}function Ci(e,t){var a=[];return e.forEach(e=>{e&&e.subscribe&&a.push(e.subscribe(e=>t(e)))}),a}function Ti(e,t,a){return t(e(),a),e.subscribe(e=>{t(e,a),a()})}function Pi(e,t){return{page:e.page,pageId:e.pageId,wizard:t,state:t.stateManager.getPageState(e.pageId)}}function Ni(e,t){return{page:e.page,pageId:e.pageId,wizard:t}}function Oi(e){return 1<[e.jsonDataSourceAvailable,e.sqlDataSourceAvailable,e.objectDataSourceAvailable,e.federationDataSourceAvailable].filter(e=>!!e).length}class wi extends I{constructor(e,t=!0,a){super(),this.items=e,this._getJsonConnectionsCallback=a,this.selectedItems=_.observableArray([]),this.operations=[{text:this.existingOperationText,createNew:!1},{text:this.createNewOperationText,createNew:!0}],this.selectedOperation=_.observable(this.operations[0]),this._createNew=_.pureComputed(()=>this.selectedOperation().createNew),this.canCreateNew=_.observable(t),this._disposables.push(...Ci([this.selectedOperation,this.selectedItems],()=>this._onChange()))}canNext(){return 0!==this.selectedItems().length||this.selectedOperation().createNew}initialize(a){var i,e;return(this._getJsonConnectionsCallback?(i=T.Deferred(),this._getJsonConnectionsCallback().done(e=>{this.items(e);var t=this._getSelectedItem(a);this.selectedItems(t?[t]:[]),i.resolve(e)}).fail(()=>{i.reject()}),i):(e=this._getSelectedItem(a),this.selectedItems(e?[e]:[]),T.Deferred().resolve(this))).promise()}_displayExpr(e){return e.description||e.name}_getSelectedItem(e){return this.items()[0]}onDblClick(){this[ja]&&this[ja]()}get createNewOperationText(){return Object(C.getLocalization)("No, I'd like to create a new data source","AnalyticsCoreStringId.Wizard_CreateNewDataSource")}get existingOperationText(){return Object(C.getLocalization)("Yes, let me choose an existing data source from the list","AnalyticsCoreStringId.Wizard_ChooseDataSourceFromList")}}class Di extends wi{commit(){return T.Deferred().resolve({predeifnedDataSourceName:this.selectedOperation().createNew?null:this.selectedItems()[0].name}).promise()}_getSelectedItem(t){var e=this.items()||[];return t.predeifnedDataSourceName?e.filter(e=>e.name===t.predeifnedDataSourceName)[0]:0===e.length?null:e[0]}canNext(){return this.selectedOperation().createNew}canFinish(){return!this.selectedOperation().createNew}}function Ii(e,t){e.registerMetadata(S.ChoosePredefinedDataSourcePage,{setState:(e,t)=>{t.predeifnedDataSourceName=e.predeifnedDataSourceName},getState:e=>e,resetState:(e,t)=>{e.predeifnedDataSourceName=null},create:()=>new Di(t.predefinedDataSources,t.canCreateDataSource),template:"dxrd-page-selectitems",description:Object(x.getLocalization)("Do you want to use an existing data source?","AnalyticsCoreStringId.Wizard_UseExisting_DataSource")+" "+Object(x.getLocalization)("The Wizard assigns the selected or a newly created data source to the report.","AnalyticsCoreStringId.Wizard_DataSourceAssignment_Description")})}class Ei extends wi{commit(){return T.Deferred().resolve({connectionName:this.selectedOperation().createNew?null:this.selectedItems()[0].name}).promise()}_getSelectedItem(e){return Object(x.getFirstItemByPropertyValue)(this.items(),"name",e.connectionName)||super._getSelectedItem()}get createNewOperationText(){return Object(C.getLocalization)("No, I'd like to create a new data connection","AnalyticsCoreStringId.JsonDSWizard_CreateNewConnection")}get existingOperationText(){return Object(C.getLocalization)("Yes, let me choose an existing data connection from the list","AnalyticsCoreStringId.JsonDSWizard_UseExistingConnection")}}function ki(e,t){e.registerMetadata(O.ChooseConnectionPage,{create:()=>new Ei(t.connectionStrings&&t.connectionStrings.json,t.allowCreateNewJsonConnection,t.getJsonConnectionStrings),description:t.allowCreateNewJsonConnection?Object(C.getLocalization)("Do you want to use an existing data connection?","AnalyticsCoreStringId.JsonDSWizard_ChooseConnection_Description"):Object(C.getLocalization)("Choose a data connection.","AnalyticsCoreStringId.SqlDSWizard_PageChooseConnection"),getState:e=>e.jsonDataSourceWizard,setState:(e,t)=>t.connectionName=e.connectionName,resetState:(e,t)=>{e.connectionName=t.connectionName},template:"dxrd-page-selectitems"})}var Ai={PathParameter:"pathParameters",QueryParameter:"queryParameters",Header:"headers"};function $i(e,t,a){e=e||Object(C.getLocalization)("The value cannot be empty","AnalyticsCoreStringId.ParametersPanel_DateTimeValueValidationError");return t?(a=a?Object(x.formatUnicorn)("{0}. {1}",t,a):t,Object(C._stringEndsWith)(a,":")||(a+=":"),Object(x.formatUnicorn)("{0} {1}",a,e)):e}class zi extends v.Editor{constructor(e,t,a,i){super(e,t,a,i),this.aceEditorHasErrors=_.observable(!1),this.aceAvailable=Object(P.aceAvailable)(),this.editorContainer=_.observable(),this.languageHelper={getLanguageMode:()=>"ace/mode/json",createCompleters:()=>[]},this.aceOptions={showLineNumbers:!1,highlightActiveLine:!1,showPrintMargin:!1,enableBasicAutocompletion:!0,enableLiveAutocompletion:!0},this.isValid=_.computed(()=>this._model()&&this._model().isValid()),this.additionalOptions={onChangeAnnotation:e=>{e=e&&e.getAnnotations()||[];this._model()&&this._model().aceEditorHasErrors&&this._model().aceEditorHasErrors(0<e.filter(e=>"error"===e.type||"warning"===e.type).length)},onBlur:()=>{var e=this.editorContainer();e&&this.value(e.getValue())}},this.jsonStringValidationRules=[{type:"custom",reevaluate:!0,validationCallback:e=>this.isValid(),get message(){return $i(Object(C.getLocalization)("The value cannot be empty and should have a valid format.","AnalyticsCoreStringId.ValueIsRequiredOrInvalidFormat_Error"),Object(C.getLocalization)("JSON String:","DataAccessUIStringId.WizardPageChooseJsonSource_Custom"))}}]}uploadFile(e){e&&e.event&&(e.event.stopPropagation(),e.event.preventDefault()),Object(x.uploadFile)({accept:".json,.txt"}).done(e=>{e=atob(e.content);0===e.indexOf("")&&(e=e.substr("".length)),this.value(e)})}getUploadTitle(){return Object(C.getLocalization)("Upload JSON File","AnalyticsCoreStringId.UploadJsonFile_Title")}}class ji extends C.Disposable{constructor(){super(),this._validationGroup=null,this._validationSummary=null,this.validationGroup={onInitialized:e=>this._onValidationGroupInitialized(e),onDisposing:e=>this._onValidationGroupDisposing(e),validate:()=>this._validate()},this.validationSummary={onInitialized:e=>this._onValidationSummaryInitialized(e),onDisposing:e=>this._onValidationSummaryDisposing(e)},this._disposables.push(this.grid=new v.ObjectProperties(_.observable(this)))}dispose(){this._validationSummary&&this._validationSummary.dispose(),this._validationGroup&&this._validationGroup.dispose(),this._validationSummary=null,this._validationGroup=null,super.dispose()}_onValidationGroupInitialized(e){this._validationGroup=e.component}_onValidationGroupDisposing(e){this._validationGroup=null}_onValidationSummaryInitialized(e){this._validationSummary=e.component}_onValidationSummaryDisposing(e){this._validationSummary=null}_repaintSummary(){this._validationSummary&&this._validationSummary.repaint()}_validate(){this._validationSummary&&this._validationGroup&&this._validationGroup.validate()}}class Bi extends ji{constructor(){super(),this._validatorsReady=_.observable(!1),this.isValid=_.pureComputed(()=>{var e=this._isJsonSourceValid(this.stringSource()),t=this.aceEditorHasErrors();return e&&!t}),this.validationGroup=null,this.validationSummary=null,this.stringSource=_.observable(""),this.aceEditorHasErrors=_.observable(!1),this.cssClass={"dxrd-wizard-json-string-source-grid":!0},this._disposables.push(this.grid=new v.ObjectProperties(_.observable(this)))}onChange(e){var t=null,a=()=>{e(),clearTimeout(t),t=setTimeout(()=>this._validate(),1)};this._disposables.push(this.stringSource.subscribe(e=>a()))}_isJsonSourceValid(e){if(!e)return!1;var t=!0;try{JSON.parse(e)}catch(e){t=!1}return t}isEmpty(){return!this.stringSource()}reset(){this.stringSource("")}setValue(e){this.stringSource(e.source.json())}getInfo(){return[{propertyName:"stringSource",defaultVal:"",displayName:"JSON String",editor:{header:"dx-jsonwizard-jsonstring-editor",editorType:zi,custom:"dx-property-json-string-editor"}}]}applySettings(e){e.source.uri(void 0),e.source.json(this.stringSource()),e.source.authenticationInfo=new Ke({}),e.source.headers([]),e.source.queryParameters([]),e.source.pathParameters([])}}class Ri extends ji{constructor(e,t){super(),this._requestWrapper=e,this._itemsProvider=t,this._isUriValid=_.observable(!1),this._lastValidatedJsonSourceJSON="",this._authNameValidatorInstance=null,this._isInitUri=!0,this._collectionItemNamePlaceholder=Object(C.getLocalization)("Name","AnalyticsCoreStringId.CollectionEditor_Name_Placeholder"),this._lastValidateDeferred=null,this._sourceUriValidatorsReady=_.observable(!0),this._basicAuthValidatorsReady=_.observable(!1),this._validationRequested=_.observable(!1).extend({deferred:!0}),this._noEmptyProperties=_.pureComputed(()=>{var e=this._isBasicHttpAuthValid(),t=this._isParametersValid(),a=!!this.sourceUri();return e&&t&&a}),this._lastValidationMessage=_.observable(),this._getSerializedUriSource=(e=new dt({}))=>(this.applySettings(e),JSON.stringify(e.source.serialize(!0))),this._sourceUriValidationCallback=t=>{var a;return this.sourceUri()?(a=!1,this._isInitUri=!1,this._getSerializedUriSource()==this._lastValidatedJsonSourceJSON?!this._lastValidationMessage():(this._lastValidationMessage()||this._lastValidationMessage(Object(C.getLocalization)("Validation...","AnalyticsCoreStringId.Validation")),this._validateUriSource().done(e=>{a=t.rule.isValid=e.isUriValid,e.faultMessage&&(t.rule.message=e.faultMessage),this._lastValidationMessage(a?null:e.faultMessage),t.validator.validate(),setTimeout(()=>this._repaintSummary(),1)}),a)):this._isInitUri?!(this._isInitUri=!1):(t.rule.message=$i(null,Object(C.getLocalization)("Web Service Endpoint (URI):","DataAccessUIStringId.WizardPageChooseJsonSource_URI")),!1)},this.isValid=_.pureComputed(()=>{var e=this._noEmptyProperties(),t=this._isUriValid();return e&&t}),this._validatorsReady=_.pureComputed({read:()=>{var e=this._sourceUriValidatorsReady(),t=!this.basicHttpAuth.password()&&!this.basicHttpAuth.userName(),a=this._basicAuthValidatorsReady();return e&&(a||t)},write:e=>{this._basicAuthValidatorsReady(e)}}),this.sourceUri=_.observable(""),this.basicHttpAuth={password:_.observable(""),userName:_.observable("")},this.parameters=_.observableArray([]),this._disposables.push(this.resultUri=_.pureComputed(()=>this._getResultUri())),this._disposables.push(this.grid=new v.ObjectProperties(_.observable(this))),this._disposables.push(_.computed(()=>{var e=this._validatorsReady(),t=this._validationRequested();e&&t&&this._validate()})),this._disposables.push(this._validatorsReady)}_validateUriSource(){var a=Object(C.getLocalization)("Invalid URI.","AnalyticsCoreStringId.ReportDesigner_Wizard_JsonSource_UriValidationError"),i=Object(C.getLocalization)("Web Service Endpoint (URI):","DataAccessUIStringId.WizardPageChooseJsonSource_URI"),r=(this._isUriValid(!1),this._lastValidateDeferred&&this._lastValidateDeferred.reject(),T.Deferred());this._lastValidateDeferred=r;try{var e=new dt({}),t=this._getSerializedUriSource(e),o=(this._lastValidatedJsonSourceJSON=t,e=>{var t;r.state&&"rejected"===r.state()||(this._isUriValid(e.isUriValid),t=$i((e.isUriValid?"":e&&e.faultMessage)||a,i),r.resolve({isUriValid:e.isUriValid,faultMessage:t}))});this._requestWrapper.validateJsonUri(e).done(o).fail((e={})=>{e.isValid=!1,o(e)})}catch(e){this._isUriValid(!1)}return r.promise()}_isCollectionValid(e){return!this[e]().length||this[e]().every(e=>e.name())}_isParametersValid(){return this._isCollectionValid("parameters")}_isBasicHttpAuthValid(){return!this.basicHttpAuth.password()||!!this.basicHttpAuth.userName()}_getSourceUriInfo(){var e={propertyName:"sourceUri",displayName:"Web Service Endpoint (URI):",localizationId:"DataAccessUIStringId.WizardPageChooseJsonSource_URI",defaultVal:"",editor:v.editorTemplates.getEditor("text"),validatorOptions:null,isRequired:!0,editorOptions:{elementAttr:{title:this.sourceUri}}},t=this;return e.validatorOptions={onInitialized:e=>{this._sourceUriValidatorsReady(!0)},onDisposed:()=>{this._sourceUriValidatorsReady(!1)},validationRules:[{type:"custom",assignValueFirst:!0,isDeferred:_.pureComputed(()=>this._noEmptyProperties()),get message(){return t._lastValidationMessage()},validationCallback:this._sourceUriValidationCallback}]},e}_getBasicHttpAuthInfo(){var e={propertyName:"userName",displayName:"Username:",localizationId:"DataAccessUIStringId.WizardPageConfigureJsonConnection_UsernameText",editor:v.editorTemplates.getEditor("text"),validatorOptions:void 0},t={propertyName:"basicHttpAuth",displayName:"Basic HTTP Authentication",localizationId:"DataAccessUIStringId.WizardPageConfigureJsonConnection_BasicHttpAuthText",info:[e,Object(x.createPasswordSerializationInfo)({propertyName:"password",displayName:"Password:",localizationId:"DataAccessUIStringId.WizardPageConfigureJsonConnection_PasswordText"},!1)],editor:v.editorTemplates.getEditor("objecteditor")};return e.validatorOptions={onInitialized:e=>{e=e&&e.component;this._authNameValidatorInstance&&this._authNameValidatorInstance!=e&&this._authNameValidatorInstance.dispose(),this._authNameValidatorInstance=e,this._basicAuthValidatorsReady(!0)},onDisposed:()=>{this._authNameValidatorInstance=null},validationRules:[{type:"custom",reevaluate:!0,assignValueFirst:!0,get message(){return $i(null,Object(C.getLocalization)(t.displayName,t.localizationId),Object(C.getLocalization)(e.displayName,e.localizationId))},validationCallback:e=>this._isBasicHttpAuthValid()}]},t}_getParametersInfo(){var e={propertyName:"parameters",displayName:"Parameters",localizationId:"AnalyticsCoreStringId.QueryBuilder_Parameters",array:!0,addHandler:()=>{var e=Object(x.getUniqueNameForNamedObjectsArray)(this.parameters(),"parameter");return Ze.from({"@Name":e})},editor:v.editorTemplates.getEditor("commonCollection"),editorOptions:null,template:"#dx-jsonwizard-parametercollection"};return e.editorOptions={itemsProvider:this._itemsProvider,nameValidationRules:[{type:"required",get message(){return $i(null,Object(C.getLocalization)(e.displayName,e.localizationId),this._collectionItemNamePlaceholder)}}]},e}_getResultUriInfo(){return{propertyName:"resultUri",displayName:"Resulting URI:",localizationId:"DataAccessUIStringId.WizardPageChooseJsonSource_ResultingUri",defaultVal:"",editor:v.editorTemplates.getEditor("text"),editorOptions:{readOnly:!0,elementAttr:{title:this.resultUri}}}}_getResultUri(){var e,t,a;return this.sourceUri()&&this._isUriValid()&&this._isParametersValid()?this.sourceUri()&&0===this.parameters().length?this.sourceUri():(a=(e=this.sourceUri().split("?"))[0],t=e[1],a=this._appendPathSegmentsToUri(e[0]),this._appendQuerySegmentsToUri(a,t)):null}_appendPathSegmentsToUri(t){return this.parameters().filter(e=>"PathParameter"===e.itemType()).map(e=>"{"+e.name()+"}").forEach(e=>{t=t.replace(/[\/]+$/g,"")+"/"+e.replace(/^[\/]+/g,"")}),t}_appendQuerySegmentsToUri(e,t){var a=t||"";return this.parameters().filter(e=>"QueryParameter"===e.itemType()).map(e=>e.name()+"={?}").forEach(e=>{a&&(a+="&"),a+=e}),0<a.length&&(e+="?"+a),e}_onValidationSummaryInitialized(e){super._onValidationSummaryInitialized(e),this._isInitUri=!0,setTimeout(()=>{this._validate()},1)}_applyParametersToSource(t){var a=this.parameters().reduce((e,t)=>Object.assign(Object.assign({},e),{[t.itemType()]:[...e[t.itemType()]||[],t]}),{});["PathParameter","QueryParameter","Header"].forEach(e=>{a[e]&&t.source[Ai[e]](a[e])})}applySettings(e){e.source.uri(this.sourceUri()),e.source.json(void 0),e.source.authenticationInfo.password(this.basicHttpAuth.password()),e.source.authenticationInfo.userName(this.basicHttpAuth.userName()),this._applyParametersToSource(e)}getInfo(){return[this._getSourceUriInfo(),this._getBasicHttpAuthInfo(),this._getParametersInfo(),this._getResultUriInfo()]}reset(){this.sourceUri(""),this.basicHttpAuth.password(""),this.basicHttpAuth.userName(""),this.parameters([])}setValue(e){this.sourceUri(e.source.uri()),this.basicHttpAuth.userName(e.source.authenticationInfo.userName()),this.basicHttpAuth.password(e.source.authenticationInfo.password());e=[].concat.apply([],[e.source.pathParameters(),e.source.queryParameters(),e.source.headers()]);this.parameters(e)}dispose(){this._authNameValidatorInstance&&this._authNameValidatorInstance.dispose(),this._lastValidateDeferred&&(this._lastValidateDeferred.reject(),this._lastValidateDeferred=null),super.dispose(),this.disposeObservableArray(this.parameters)}onChange(e){var t=null,a=()=>{e(),clearTimeout(t),t=setTimeout(()=>this._validate(),1)};this._disposables.push(...Ci([this.sourceUri,this.basicHttpAuth.password,this.basicHttpAuth.userName,this.resultUri],a)),this._disposables.push(_i(this.parameters,e=>{e._disposables.push(...Ci([e.name,e.itemType,e.value],a))},a))}isEmpty(){return!this.sourceUri()}_validate(){this._validationSummary&&this._validationGroup&&(this._validatorsReady()?(this._validationGroup.validate(),this._validationRequested(!1)):this._validationRequested(!0))}}class Mi extends I{constructor(e=new qe,t){super(),this._requestWrapper=e,this.__validationGroup=null,this.__validationSummary=null,this._jsonSourceTitle=Object(C.getLocalization)("JSON Source:","DataAccessUIStringId.WizardPageChooseJsonSource_SourceType"),this._jsonConnectionTitle=Object(C.getLocalization)("Connection Name:","AnalyticsCoreStringId.ReportDesigner_Wizard_Json_ConnectionName"),this._connectionNameValidationRules=[{type:"required",get message(){return $i(null,this._jsonConnectionTitle)}}],this._connectionName=_.observable(""),this._validationGroup={onInitialized:e=>this._onValidationGroupInitialized(e),onDisposing:e=>this._onValidationGroupDisposing(e)},this._validationSummary={onInitialized:e=>this._onValidationSummaryInitialized(e),onDisposing:e=>this._onValidationSummaryDisposing(e)},this._sources=[],this._disposables.push(this._jsonStringSettings=new Bi),this._jsonStringSettings.onChange(()=>this._onChange()),this._disposables.push(this._jsonUriSetting=new Ri(this._requestWrapper,t)),this._jsonUriSetting.onChange(()=>this._onChange()),this._sources=[{value:this._jsonUriSetting,displayValue:"Web Service Endpoint (URI)",localizationId:"DataAccessUIStringId.WizardPageChooseJsonSource_SourceType_Uri"},{value:this._jsonStringSettings,displayValue:"JSON String",localizationId:"DataAccessUIStringId.WizardPageChooseJsonSource_SourceType_Custom"}];var a=_.observable();this._selectedSource=_.pureComputed({read:()=>a(),write:e=>{a()!==e&&(a(e),e._validatorsReady&&e._validatorsReady(!1),setTimeout(()=>{e._validate&&e._validate()},1),this._onChange())}}),this._selectedSource(this._sources[0].value),this._disposables.push(this._selectedSource),this._disposables.push(this._connectionName.subscribe(()=>this._onChange()))}_onValidationGroupInitialized(e){this.__validationGroup=e.component}_onValidationGroupDisposing(e){this.__validationGroup=null}_onValidationSummaryInitialized(e){this.__validationSummary=e.component,this.__validationGroup&&this.__validationSummary&&this._connectionName&&this._connectionName()&&setTimeout(()=>{this.__validationGroup&&this.__validationGroup.validate()},1)}_onValidationSummaryDisposing(e){this.__validationSummary=null}canNext(){var e=!!this._connectionName(),t=this._selectedSource().isValid(),a=this._selectedSource().isEmpty();return e&&t&&!a}commit(){var e=new dt({}),e=(this._selectedSource().applySettings(e),(new C.ModelSerializer).serialize(e));return T.Deferred().resolve({jsonSource:JSON.stringify(e.Source),newConnectionName:this._connectionName()}).promise()}initialize(e){this.__validationGroup=null,this.__validationSummary=null;e=Ha(e);return e.source.uri()?this._selectedSource(this._jsonUriSetting):e.source.json()&&this._selectedSource(this._jsonStringSettings),this._selectedSource().setValue(e),T.Deferred().resolve().promise()}}function qi(e,t,a){e.registerMetadata(O.ChooseJsonSourcePage,{setState:(e,t)=>{t.jsonSource=e.jsonSource,t.newConnectionName=e.newConnectionName},getState:e=>e.jsonDataSourceWizard,resetState:(e,t)=>{e.jsonSource=t.jsonSource},create:()=>new Mi(t,a&&a()),description:Object(C.getLocalization)("Create a data connection.","AnalyticsCoreStringId.JsonDSWizard_CreateNewConnectionPage_Description"),template:"dxrd-page-jsonsource"})}class Li extends Ei{constructor(e,t,a,i=new qe,r){super(e,t,r),this._requestWrapper=i,this._disposables.push(this._specifySourceData=new Mi(i,a)),this._specifySourceData.onChange(()=>this._onChange())}commit(){var t=T.Deferred(),e=this._createNew()?this._specifySourceData.commit():super.commit();return e.done(e=>{t.resolve(e)}),t.promise()}canNext(){return this._createNew()?this._specifySourceData.canNext():super.canNext()}initialize(e){var t=T.Deferred();return super.initialize(e).done(()=>{this._specifySourceData.initialize(e).done(()=>{t.resolve(this)})}),t.promise()}}function Qi(e,t,a,i,r){e.registerMetadata(O.SpecifyJsonConnectionPage,{create:()=>new Li(t,a,i&&i(),void 0,r),description:a?Object(C.getLocalization)("Do you want to use an existing data connection?","AnalyticsCoreStringId.JsonDSWizard_ChooseConnection_Description"):Object(C.getLocalization)("Choose a data connection.","AnalyticsCoreStringId.SqlDSWizard_PageChooseConnection"),getState:e=>e.jsonDataSourceWizard,setState:(e,t)=>{t.connectionName=e.connectionName,t.jsonSource=e.jsonSource,t.newConnectionName=e.newConnectionName},resetState:(e,t)=>{e.connectionName=t.connectionName,e.jsonSource=t.jsonSource,e.newConnectionName=t.newConnectionName},template:"dxrd-page-specify-connection"})}var Vi="Default";class Wi extends C.Disposable{constructor(e,t,a,i=!1,r){super(),this.name=e,this.displayName=t,this.specifics=a,this.checked=_.pureComputed(()=>this._checked()),this.isList=!1,this._checked=_.observable(i),this._afterCheckToggled=r||T.noop}unChecked(){return!1===this.checked()}toggleChecked(){this.setChecked(!this.checked.peek()),this._afterCheckToggled(this)}setChecked(e){this._checked(e)}}class Fi extends Wi{constructor(e,t,a,i=!1,r=null,o){super(e,t,a,i,o),this.name=e,this.displayName=t,this.specifics=a,this.hasQuery=!1,this.arguments=r}}class Ui extends Wi{constructor(e,t,a,i,r){super(e,t,a,i,r),this.countChecked=_.pureComputed(()=>{for(var e=0,t=0;t<this.children().length;t++)if(!this.children()[t].unChecked()){if(1<e)break;e++}return e}),this.isList=!0,this.children=_.observableArray([]),this.checked=_.pureComputed({read:()=>{var t,a;return this.initialized()?(a=t=0,this.children().forEach(e=>{!0===e.checked()?t++:!1!==e.checked()&&a++}),(0!==t||0!==a)&&(t===this.children.peek().length||void 0)):this._checked()}})}initialized(){return 0<this.children().length}setChecked(t){this._checked(t),this.children.peek().forEach(e=>{e.setChecked(t)})}initializeChildren(e){this.children(e||[])}}class Hi extends Ui{constructor(e,t,a,i,r){super(e,t,a,i,r),this.countChecked=_.pureComputed(()=>{var e=0;this.hasParamsToEdit(!1);for(var t=0;t<this.children().length;t++){var a=this.children()[t];if(!a.unChecked()){if(1<e)break;e++,a.arguments&&0<a.arguments.length&&this.hasParamsToEdit(!0),"query"===a.specifics&&this.hasParamsToEdit(!0)}}return e}),this.hasParamsToEdit=_.observable(!1)}}class Ji extends Hi{constructor(e,t,a,i,r,o){super(e,t,a,i,o),this.addAction={clickAction:e=>this.disableCustomSql()?this.addQuery():this.showPopover(),imageClassName:"dxrd-image-add",imageTemplateName:"dxrd-svg-operations-add",templateName:"dx-treelist-action-with-popover",text:Object(C.getLocalization)("Add query","AnalyticsCoreStringId.SqlDSWizard_AddQuery")},this.itemClickAction=e=>{this.popoverVisible(!1),e.itemData.addAction()},this.className="dx-addqueries-popover",this.popoverVisible=_.observable(!1),this.path=e,this.addQuery=()=>{r().showQbCallBack()},this.addCustomQuery=()=>{r().showQbCallBack(null,!0)},this.disableCustomSql=()=>r&&r().disableCustomSql,this.target="."+this.addAction.templateName,this.selectionDisabled=_.pureComputed(()=>!this.children().length)}getActions(e){var t=[];return 0===e.path.indexOf("queries")&&t.push(this.addAction),t}popoverListItems(){return[{name:Object(C.getLocalization)("Run Query Builder","DataAccessUIStringId.Button_QueryBuilder"),addAction:()=>this.addQuery()},{name:Object(C.getLocalization)("Write Custom SQL","AnalyticsCoreStringId.SqlDSWizard_WriteCustomSQL"),addAction:()=>this.addCustomQuery()}]}showPopover(){this.popoverVisible(!0)}}class Gi extends Fi{constructor(e,t,a,i,r,o,s,n){super(e,t,a,i,null,s),this.query=n,this.editAction={clickAction:e=>this.editQuery(),imageClassName:"dx-image-edit",imageTemplateName:"dxrd-svg-operations-edit",text:Object(C.getLocalization)("Edit query","AnalyticsCoreStringId.SqlDSWizard_EditQuery")},this.removeAction={clickAction:e=>{this.removeQuery({model:e.data})},imageClassName:"dxrd-image-recycle-bin",imageTemplateName:"dxrd-svg-operations-recycle_bin",text:Object(C.getLocalization)("Remove query","AnalyticsCoreStringId.SqlDSWizard_RemoveQuery")},this.parameters=r,this.removeQuery=e=>{e.model.unChecked()||e.model.toggleChecked(),o().deleteAction(e.model.name)},this.editQuery=e=>{o().showQbCallBack(this.name)},this.hasQuery=!0}setObservableName(e){this._name=e,["name","displayName"].forEach(e=>Object.defineProperty(this,e,{get(){return this._name()},set(e){return this._name(e)},configurable:!0}))}getActions(e){var t=[];return t.push(this.removeAction),t.push(this.editAction),t}}class Xi extends Wi{constructor(e,t,a,i,r,o,s=!1){super(e,t,a,i,o),this.visible=_.observable(!0),this.disabled=_.observable(!1),this.path=r,this.isComplex=a===Vi,s&&(this.dragData={noDragable:!1})}}class Yi extends Ui{constructor(e,t,a,i,r,o){super(e,t,a,i,o),this.visible=_.observable(!0),this.path=r,this.isComplex=this.isList&&a===Vi,this.checked=_.pureComputed({read:()=>{var t,a,e;return this.initialized()?(a=t=0,(e=this.children().filter(e=>e.visible())).forEach(e=>{!0===e.checked()?t++:!1!==e.checked()&&a++}),(0!==t||0!==a)&&(t===e.length||void 0)):this._checked()}})}setChecked(e){super.setChecked(!!this.visible()&&e)}}class Ki extends Yi{constructor(e,t,a,i,r,o){super(e,t,a,i,r,o),this.checked=_.pureComputed({read:()=>this._checked()})}}class Zi extends C.Disposable{constructor(e,t,n,d){super(),this._fullTreeLoaded=!1,this._rootItems=_.observableArray([]),this._checkedRootNodesCount=_.computed(()=>{if(!this._rootItems||0===this._rootItems().length)return 0;for(var e=0,t=0;t<this._rootItems().length&&e<1;t++)e+=this._rootItems()[t].unChecked()?0:1;return e}),this.hasCheckedItems=_.computed(()=>!(0===this._checkedRootNodesCount())),this.getRootItems=()=>this._rootItems(),this.getItems=(o,t=!1)=>{var s=T.Deferred();return o.fullPath||0!==o.pathParts.length?e.getItems(o).done(e=>{var a,i,r=this._getParentNode(o);if(!r||!r.children)return s.reject();0===r.children().length?(a=[],i=[],e.forEach(e=>{var t=this._getDefaultTreeNodeCheckState(e);this.isList(e,r)?o.pathParts.length<=5&&(i.push([].concat(o.fullPath.split("."),[e.name])),a.push(n(e,t,[o.fullPath,e.name].join(".")))):a.push(d(e,t,[o.fullPath,e.name].join(".")))}),r.initializeChildren(a),t?T.when(...i.map(e=>this.getItems(new C.PathRequest(e.join("."),e),t))).always(()=>s.resolve(a)):s.resolve(a)):s.resolve(r.children())}):s.resolve(this._rootItems()),s.promise()},this._disposables.push(t.subscribe(e=>{this._fullTreeLoaded=!1,this._rootItems(e.map(e=>{var t=this._getDefaultTreeNodeCheckState(e);return n(e,t,e.name)}))})),this._disposables.push(this.hasCheckedItems)}_createTree(){return this._fullTreeLoaded?T.Deferred().resolve().promise():T.when(...this._rootItems().map(e=>this.getItems(new C.PathRequest(e.path),!0))).always(()=>this._fullTreeLoaded=!0)}_createTreePart(t,a=T.Deferred(),e){var i,r;return this._fullTreeLoaded?a.resolve().promise():0===t.length?a.resolve():e?(i=[].concat([],e,t[0]),r=new C.PathRequest(i.join("."),i),void(this._getParentNode(r)?this._createTreePart(t.slice(1),a,i):this.getItems(new C.PathRequest(e.join("."),e)).done(e=>{this._createTreePart(t.slice(1),a,i)}).fail(()=>a.reject()))):(a=T.Deferred(),1===t.length?this.getItems(new C.PathRequest(t[0],t)).done(()=>a.resolve()).fail(()=>a.reject()):this._createTreePart(t.slice(1),a,[t[0]]),a)}_setChecked(e){e.setChecked(!0),e instanceof Yi&&e.children().forEach(e=>this._setChecked(e))}selectAllItems(e=!0){var t=T.Deferred();return this._createTree().always(()=>{e?this._rootItems().forEach(e=>e.setChecked(!0)):this._rootItems().forEach(e=>this._setChecked(e)),t.resolve()}),t.promise()}selectItemsByPath(e){var t=T.Deferred(),a=e.split(".");return this._createTreePart(a).done(()=>{this.getItems(new C.PathRequest(a.join("."),a)).done(e=>{e.forEach(e=>{e instanceof Wi&&e.setChecked(!0)})}).always(()=>t.resolve())}),t.promise()}selectItemByPath(e){var a=T.Deferred(),i=e.split(".");return this._createTreePart(i).done(()=>{var t=i.pop();this.getItems(new C.PathRequest(i.join("."),i)).done(e=>{e=e.filter(e=>e.name===t)[0];e instanceof Wi&&e.setChecked(!0)}).always(()=>a.resolve())}),a.promise()}_getParentNode(t){var e=this._rootItems().filter(e=>e.path===(t.id||t.ref))[0];if(e){for(var a=e.path,i=1;i<t.pathParts.length;i++){if(!e)return;a+="."+t.pathParts[i],e=e.children().filter(e=>Object(x.isList)(e)&&e.path==a)[0]}return e}}_getDefaultTreeNodeCheckState(e){return!1}isList(e,t){return Object(x.isList)(e)}}class er extends Zi{constructor(e,t,a,i){super(e,t,a,i)}_getDefaultTreeNodeCheckState(e){return e.isSelected}getNodeByPath(t){var e=this._rootItems().filter(e=>e.path===(t.pathParts||[])[0])[0];if(e){for(var a=e.path,i=1;i<t.pathParts.length;i++){if(!e)return;a+="."+t.pathParts[i],e=e.children().filter(e=>e.path==a)[0]}return e}}}class tr extends I{constructor(e=new qe,t=!0,a){super(),this._requestWrapper=e,this._allowObjectRootElements=t,this._callbacks=a,this._rootItems=_.observableArray([]),this._fieldListItemsProvider=_.observable(null),this._fieldSelectedPath=_.observable(null),this._cachedState={connectionName:null,jsonSource:null},this._createTreeNode=(e,t,a)=>{e=new Yi(e.name,e.displayName,e.specifics,t,a);return this._disposables.push(e.checked.subscribe(()=>this._onChange())),e},this._createLeafTreeNode=(e,t,a)=>{e=new Xi(e.name,e.displayName,e.specifics,t,a);return this._disposables.push(e.checked.subscribe(()=>this._onChange())),e},this._rootElementTitle=Object(C.getLocalization)("Root element:","DataAccessUIStringId.WizardPageChooseJsonSchema_RootElement"),this._rootElementList=_.observable([]),this._selectedRootElement=_.observable(null);var i=null,e=(this._disposables.push(this._rootElementList.subscribe(e=>{i&&i.dispose(),i=this._selectedRootElement.subscribe(e=>{if(!e)return this._rootItems([]);e=this._getSchemaToDataMemberInfo(e);e&&this._rootItems([{name:_.unwrap(e.name),isSelected:_.unwrap(e.selected),displayName:_.unwrap(e.displayName)||_.unwrap(e.name),data:e,specifics:0<e.nodes.length?"List":"Default"}])}),this._selectedRootElement(e[0])})),new x.FieldListProvider(this._createFieldListCallback(),this._rootItems));this._fieldListItemsProvider(new er(e,this._rootItems,this._createTreeNode,this._createLeafTreeNode)),this._disposables.push(this._fieldListItemsProvider()),this._fieldListModel={expandRootItems:!0,itemsProvider:this._fieldListItemsProvider(),selectedPath:this._fieldSelectedPath,treeListController:null,templateName:"dxrd-treelist-with-checkbox"}}_clear(){this._rootItems([]),this._fieldSelectedPath(""),this._rootElementList([]),this._selectedRootElement(null),this._dataSource&&this._dataSource.jsonSchemaProvider.reset(),this._cachedState={connectionName:null,jsonSource:null}}_createFieldListCallback(){return e=>{var t=new He({}),e=(t.nodes=[this._rootItems()[0].data],this._getInnerItemsByPath(e,t));return T.Deferred().resolve(e).promise()}}_getSchemaToDataMemberInfo(t){for(var e=this._dataSource.schema,a=0;a<t.pathParts.length;a++)if(!(e=e.nodes.filter(e=>e.name()===t.pathParts[a])[0]))return null;return e}_mapJsonNodesToTreelistItems(e){return T.map(e||[],e=>{return{name:e.name(),displayName:e.displayName||e.name(),isSelected:e.selected(),isList:e.nodes&&0<e.nodes.length,specifics:"Default"}})}_getNodesByPath(t,e){if(t.fullPath){for(var a=e.nodes,i=0;i<t.pathParts.length;i++){var r=(a||[]).filter(e=>e.name()==t.pathParts[i])[0];if(!r)return[];a=r.nodes}return a}return e.nodes}_getInnerItemsByPath(e,t){e=this._getNodesByPath(e,t);return this._mapJsonNodesToTreelistItems(e)}_beginInternal(e){if(e.connectionName&&this._cachedState.connectionName===e.connectionName||e.jsonSource&&this._cachedState.jsonSource===e.jsonSource)return T.Deferred().resolve().promise();this._clear(),this._cachedState={connectionName:e.connectionName,jsonSource:e.jsonSource};var t=this._dataSource&&this._dataSource.id;return this._dataSource=Ha(e,this._requestWrapper),t&&t!=this._dataSource.id||!this._dataSource.schema.nodes.length?this._dataSource.getSchema(this._callbacks&&this._callbacks.getParameters&&this._callbacks.getParameters()).done(e=>this._updatePage(e)):T.Deferred().done(e=>this._updatePage(e)).resolve(this._dataSource.schema).promise()}_updatePage(e){var t,a=e.getRootElementPartList(this._allowObjectRootElements);this._rootElementList()!==a&&this._rootElementList(this._filterRootElementList(a,e)),this._dataSource.rootElement()&&(t=["root",this._dataSource.rootElement()].join("."),a=this._rootElementList().filter(e=>e.fullPath===t)[0]||this._rootElementList()[0],this._selectedRootElement(a)),this._onChange()}_resetSelectionRecursive(e,t){e!==t&&(e.selected&&e.selected(!1),(e.nodes||[]).forEach(e=>this._resetSelectionRecursive(e,t)))}_mapJsonSchema(e,i){var t=this._fieldListItemsProvider().getNodeByPath(i);if(t)return e.selected(!1!==t.checked()),(e.nodes||[]).forEach(e=>{var t=i.pathParts.concat(e.name()),a=t.join("."),a={fullPath:a,path:e.name(),id:a,pathParts:t};this._mapJsonSchema(e,a)}),e}_filterRootElementList(e,t){return e}canNext(){return!1}canFinish(){return this._fieldListItemsProvider().hasCheckedItems()}commit(){var e;if(this._rootItems()[0])return e=this._rootItems()[0].data,this._resetSelectionRecursive(this._dataSource.schema,e),e={fullPath:e=e.name(),path:"",id:e,pathParts:[e]},this._mapJsonSchema(this._rootItems()[0].data,e),e=this._selectedRootElement().pathParts.slice(1).join("."),this._dataSource.rootElement(e),e=(new C.ModelSerializer).serialize(this._dataSource),T.Deferred().resolve({connectionName:this._dataSource.connectionName(),dataSourceName:e["@Name"],jsonScheme:JSON.stringify(e.Schema),rootElement:e["@RootElement"]}).promise()}initialize(e){return this._beginInternal(e)}reset(){this._clear()}}function ar(e,t,a){e.registerMetadata(O.ChooseJsonSchemaPage,{setState:(e,t)=>{t.dataSourceName=e.dataSourceName,t.jsonScheme=e.jsonScheme,t.rootElement=e.rootElement},getState:e=>e.jsonDataSourceWizard,resetState:(e,t)=>{e.dataSourceName=t.dataSourceName,e.jsonScheme=t.jsonScheme,e.rootElement=t.rootElement},create:()=>new tr(t,void 0,a),description:Object(C.getLocalization)("Select data fields.","DataAccessUIStringId.WizardPageChooseJsonSchema"),template:"dxrd-jsondatasource-fields-page"})}function ir(a){return(e,t)=>a?a(e,t):(new qe).getSelectStatement(e,t)}function rr(i){return(e,t,a)=>i?i(e,t,a):(new qe).rebuildResultSchema(e,t,a)}function or(t){return e=>t?t(e):(new qe).getFederationResultSchema(e)}class sr extends C.Disposable{constructor(e,t=!1,a=e=>e){super(),this.customizeQBInitializationData=a,this._querySource=_.observable(null),this._dbSchemaProvider=_.observable(null),this.designer=_.observable(),this.qbOptions=_.observable(null),this.okButtonDisabled=_.pureComputed(()=>this.designer()&&!this.designer().model().isValid()),this.isVisible=_.observable(!1),this.showLoadIndicator=_.observable(!1),this.localizationIdMap={title:{text:"Query Builder",localizationId:"DataAccessUIStringId.QueryBuilder"},loading:{text:"Loading...",localizationId:"AnalyticsCoreStringId.Loading"},previewResults:{text:"Preview Results...",localizationId:"DataAccessUIStringId.QueryBuilderButtons_PreviewResults"},cancel:{text:"Cancel",localizationId:"AnalyticsCoreStringId.SearchDialog_Cancel"},ok:{text:"OK",localizationId:"DataAccessUIStringId.Button_OK"}},this._rtl=t,this._applyQuery=e,this.qbOptions(this.qbOptions()||this.customizeQBInitializationData({queryBuilderModel:this.designer,dbSchemaProvider:this._dbSchemaProvider,querySource:this._querySource,callbacks:{CustomizeMenuActions:nr.customizeQueryBuilderActions},rtl:this._rtl}))}show(e,t){this._dataSource=t,this._dbSchemaProvider(t.dbSchemaProvider),this._querySource((new C.ModelSerializer).serialize(e)),this.isVisible(!0),this.designer().updateSurface()}cancelHandler(){this.isVisible(!1)}previewHandler(){this.designer().showPreview()}okHandler(){this.designer().model().canSave()&&this._applyQuery(this.createQuery(),this.showLoadIndicator).done(()=>{this.isVisible(!1)})}onHiddingHandler(){this.designer().dataPreview.isVisible(!1)}popupViewModel(e){e=Object(x.getParentContainer)(e);return{visible:this.isVisible,title:this.getDisplayText("title"),showTitle:!0,shading:!0,fullScreen:!1,width:"95%",height:"95%",container:e,wrapperAttr:{class:"dxrd-querybuilder-popup"},position:{of:e},onHidding:this.onHiddingHandler}}getDisplayText(e){return Object(C.getLocalization)(this.localizationIdMap[e].text,this.localizationIdMap[e].localizationId)}}sr.customizeQueryBuilderActions=(e,t)=>{var t=t.Actions,a=Object(x.findFirstItemMatchesCondition)(t,e=>"Delete"===e.text),i=Object(x.findFirstItemMatchesCondition)(t,e=>"Undo"===e.text),r=Object(x.findFirstItemMatchesCondition)(t,e=>"Redo"===e.text);t.splice(0,t.length,a,i,r)};class nr extends sr{constructor(e,t=!1,a=e=>e){super(e,t,a),this.customizeQBInitializationData=a}getDataSource(){return this._dataSource}createQuery(){return new $t(this.designer().model().serialize(),this.getDataSource())}}class dr{constructor(e,t){this._selectStatementCallback=e,this._connection=t}getQuerySqlText(e){e=JSON.stringify({Query:(new C.ModelSerializer).serialize(e)});return this._selectStatementCallback(this._connection(),e).fail(e=>{e=Object(x.getErrorMessage)(e);Object(x.ShowMessage)("Unable to build a SQL string"+(e?": "+e:"."))})}}var k=e(9),lr=e.n(k);function cr(e=!1){return{showLineNumbers:!1,showPrintMargin:!1,enableBasicAutocompletion:!1,enableLiveAutocompletion:!1,readOnly:e,highlightSelectedWord:e,showGutter:!1,highlightActiveLine:!1}}function ur(t){return{onChange:e=>{t(e.getValue())},onValueChange:e=>{e.resize(!0)},changeTimeout:200,overrideEditorFocus:!0,setUseWrapMode:!0}}function pr(){return{getLanguageMode:()=>"ace/mode/sql",createCompleters:()=>[]}}lr.a&&(lr.a.define("ace/mode/sql_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules","ace/mode/doc_comment_highlight_rules"],function(e,t,a){function i(){for(var i="ALL|AND|ANY|BETWEEN|EXISTS|IN|LIKE|NOT|OR|SOME",r=(i+="|NULL|IS|APPLY|INNER|OUTER|LEFT|RIGHT|JOIN|CROSS","OPENDATASOURCE|OPENQUERY|OPENROWSET|OPENXML|AVG|CHECKSUM_AGG|COUNT|COUNT_BIG|GROUPING|GROUPING_ID|MAX|MIN|STDEV|STDEVP|SUM|VAR|VARP|DENSE_RANK|NTILE|RANK|ROW_NUMBER@@DATEFIRST|@@DBTS|@@LANGID|@@LANGUAGE|@@LOCK_TIMEOUT|@@MAX_CONNECTIONS|@@MAX_PRECISION|@@NESTLEVEL|@@OPTIONS|@@REMSERVER|@@SERVERNAME|@@SERVICENAME|@@SPID|@@TEXTSIZE|@@VERSION|CAST|CONVERT|PARSE|TRY_CAST|TRY_CONVERT|TRY_PARSE@@CURSOR_ROWS|@@FETCH_STATUS|CURSOR_STATUS|@@DATEFIRST|@@LANGUAGE|CURRENT_TIMESTAMP|DATEADD|DATEDIFF|DATEFROMPARTS|DATENAME|DATEPART|DATETIME2FROMPARTS|DATETIMEFROMPARTS|DATETIMEOFFSETFROMPARTS|DAY|EOMONTH|GETDATE|GETUTCDATE|ISDATE|MONTH|SET DATEFIRST|SET DATEFORMAT|SET LANGUAGE|SMALLDATETIMEFROMPARTS|SP_HELPLANGUAGE|SWITCHOFFSET|SYSDATETIME|SYSDATETIMEOFFSET|SYSUTCDATETIME|TIMEFROMPARTS|TODATETIMEOFFSET|YEAR|CHOOSE|IIF|ABS|ACOS|ASIN|ATAN|ATN2|CEILING|COS|COT|DEGREES|EXP|FLOOR|LOG|LOG10|PI|POWER|RADIANS|RAND|ROUND|SIGN|SIN|SQRT|SQUARE|TAN|@@PROCID|APPLOCK_MODE|APPLOCK_TEST|APP_NAME|ASSEMBLYPROPERTY|COLUMNPROPERTY|COL_LENGTH|COL_NAME|DATABASEPROPERTYEX|DATABASE_PRINCIPAL_ID|DB_ID|DB_NAME|FILEGROUPPROPERTY|FILEGROUP_ID|FILEGROUP_NAME|FILEPROPERTY|FILE_ID|FILE_IDEX|FILE_NAME|FULLTEXTCATALOGPROPERTY|FULLTEXTSERVICEPROPERTY|INDEXKEY_PROPERTY|INDEXPROPERTY|INDEX_COL|OBJECTPROPERTY|OBJECTPROPERTYEX|OBJECT_DEFINITION|OBJECT_ID|OBJECT_NAME|OBJECT_SCHEMA_NAME|ORIGINAL_DB_NAME|PARSENAME|SCHEMA_ID|SCHEMA_NAME|SCOPE_IDENTITY|SERVERPROPERTY|STATS_DATE|TYPEPROPERTY|TYPE_ID|TYPE_NAME|CERTENCODED|CERTPRIVATEKEY|CURRENT_USER|DATABASE_PRINCIPAL_ID|HAS_PERMS_BY_NAME|IS_MEMBER|IS_ROLEMEMBER|IS_SRVROLEMEMBER|ORIGINAL_LOGIN|PERMISSIONS|PWDCOMPARE|PWDENCRYPT|SCHEMA_ID|SCHEMA_NAME|SESSION_USER|SUSER_ID|SUSER_NAME|SUSER_SID|SUSER_SNAME|SYS.FN_BUILTIN_PERMISSIONS|SYS.FN_GET_AUDIT_FILE|SYS.FN_MY_PERMISSIONS|SYSTEM_USER|USER_ID|USER_NAME|ASCII|CHAR|CHARINDEX|CONCAT|DIFFERENCE|FORMAT|LEN|LOWER|LTRIM|NCHAR|PATINDEX|QUOTENAME|REPLACE|REPLICATE|REVERSE|RTRIM|SOUNDEX|SPACE|STR|STUFF|SUBSTRING|UNICODE|UPPER|$PARTITION|@@ERROR|@@IDENTITY|@@PACK_RECEIVED|@@ROWCOUNT|@@TRANCOUNT|BINARY_CHECKSUM|CHECKSUM|CONNECTIONPROPERTY|CONTEXT_INFO|CURRENT_REQUEST_ID|ERROR_LINE|ERROR_MESSAGE|ERROR_NUMBER|ERROR_PROCEDURE|ERROR_SEVERITY|ERROR_STATE|FORMATMESSAGE|GETANSINULL|GET_FILESTREAM_TRANSACTION_CONTEXT|HOST_ID|HOST_NAME|ISNULL|ISNUMERIC|MIN_ACTIVE_ROWVERSION|NEWID|NEWSEQUENTIALID|ROWCOUNT_BIG|XACT_STATE|@@CONNECTIONS|@@CPU_BUSY|@@IDLE|@@IO_BUSY|@@PACKET_ERRORS|@@PACK_RECEIVED|@@PACK_SENT|@@TIMETICKS|@@TOTAL_ERRORS|@@TOTAL_READ|@@TOTAL_WRITE|FN_VIRTUALFILESTATS|PATINDEX|TEXTPTR|TEXTVALID|COALESCE|NULLIF"),o="BIGINT|BINARY|BIT|CHAR|CURSOR|DATE|DATETIME|DATETIME2|DATETIMEOFFSET|DECIMAL|FLOAT|HIERARCHYID|IMAGE|INTEGER|INT|MONEY|NCHAR|NTEXT|NUMERIC|NVARCHAR|REAL|SMALLDATETIME|SMALLINT|SMALLMONEY|SQL_VARIANT|TABLE|TEXT|TIME|TIMESTAMP|TINYINT|UNIQUEIDENTIFIER|VARBINARY|VARCHAR|XML",e="sp_addextendedproc|sp_addextendedproperty|sp_addmessage|sp_addtype|sp_addumpdevice|sp_add_data_file_recover_suspect_db|sp_add_log_file_recover_suspect_db|sp_altermessage|sp_attach_db|sp_attach_single_file_db|sp_autostats|sp_bindefault|sp_bindrule|sp_bindsession|sp_certify_removable|sp_clean_db_file_free_space|sp_clean_db_free_space|sp_configure|sp_control_plan_guide|sp_createstats|sp_create_plan_guide|sp_create_plan_guide_from_handle|sp_create_removable|sp_cycle_errorlog|sp_datatype_info|sp_dbcmptlevel|sp_dbmmonitoraddmonitoring|sp_dbmmonitorchangealert|sp_dbmmonitorchangemonitoring|sp_dbmmonitordropalert|sp_dbmmonitordropmonitoring|sp_dbmmonitorhelpalert|sp_dbmmonitorhelpmonitoring|sp_dbmmonitorresults|sp_db_increased_partitions|sp_delete_backuphistory|sp_depends|sp_describe_first_result_set|sp_describe_undeclared_parameters|sp_detach_db|sp_dropdevice|sp_dropextendedproc|sp_dropextendedproperty|sp_dropmessage|sp_droptype|sp_execute|sp_executesql|sp_getapplock|sp_getbindtoken|sp_help|sp_helpconstraint|sp_helpdb|sp_helpdevice|sp_helpextendedproc|sp_helpfile|sp_helpfilegroup|sp_helpindex|sp_helplanguage|sp_helpserver|sp_helpsort|sp_helpstats|sp_helptext|sp_helptrigger|sp_indexoption|sp_invalidate_textptr|sp_lock|sp_monitor|sp_prepare|sp_prepexec|sp_prepexecrpc|sp_procoption|sp_recompile|sp_refreshview|sp_releaseapplock|sp_rename|sp_renamedb|sp_resetstatus|sp_sequence_get_range|sp_serveroption|sp_setnetname|sp_settriggerorder|sp_spaceused|sp_tableoption|sp_unbindefault|sp_unbindrule|sp_unprepare|sp_updateextendedproperty|sp_updatestats|sp_validname|sp_who|sys.sp_merge_xtp_checkpoint_files|sys.sp_xtp_bind_db_resource_pool|sys.sp_xtp_checkpoint_force_garbage_collection|sys.sp_xtp_control_proc_exec_stats|sys.sp_xtp_control_query_exec_stats|sys.sp_xtp_unbind_db_resource_pool",t="ABSOLUTE|ACTION|ADA|ADD|ADMIN|AFTER|AGGREGATE|ALIAS|ALL|ALLOCATE|ALTER|AND|ANY|ARE|ARRAY|AS|ASC|ASENSITIVE|ASSERTION|ASYMMETRIC|AT|ATOMIC|AUTHORIZATION|BACKUP|BEFORE|BEGIN|BETWEEN|BIT_LENGTH|BLOB|BOOLEAN|BOTH|BREADTH|BREAK|BROWSE|BULK|BY|CALL|CALLED|CARDINALITY|CASCADE|CASCADED|CASE|CATALOG|CHARACTER|CHARACTER_LENGTH|CHAR_LENGTH|CHECK|CHECKPOINT|CLASS|CLOB|CLOSE|CLUSTERED|COALESCE|COLLATE|COLLATION|COLLECT|COLUMN|COMMIT|COMPLETION|COMPUTE|CONDITION|CONNECT|CONNECTION|CONSTRAINT|CONSTRAINTS|CONSTRUCTOR|CONTAINS|CONTAINSTABLE|CONTINUE|CORR|CORRESPONDING|COVAR_POP|COVAR_SAMP|CREATE|CROSS|CUBE|CUME_DIST|CURRENT|CURRENT_CATALOG|CURRENT_DATE|CURRENT_DEFAULT_TRANSFORM_GROUP|CURRENT_PATH|CURRENT_ROLE|CURRENT_SCHEMA|CURRENT_TIME|CURRENT_TRANSFORM_GROUP_FOR_TYPE|CYCLE|DATA|DATABASE|DBCC|DEALLOCATE|DEC|DECLARE|DEFAULT|DEFERRABLE|DEFERRED|DELETE|DENY|DEPTH|DEREF|DESC|DESCRIBE|DESCRIPTOR|DESTROY|DESTRUCTOR|DETERMINISTIC|DIAGNOSTICS|DICTIONARY|DISCONNECT|DISK|DISTINCT|DISTRIBUTED|DOMAIN|DOUBLE|DROP|DUMP|DYNAMIC|EACH|ELEMENT|ELSE|END|END-EXEC|EQUALS|ERRLVL|ESCAPE|EVERY|EXCEPT|EXCEPTION|EXEC|EXECUTE|EXISTS|EXIT|EXTERNAL|EXTRACT|FETCH|FILE|FILLFACTOR|FILTER|FIRST|FOR|FOREIGN|FORTRAN|FOUND|FREE|FREETEXT|FREETEXTTABLE|FROM|FULL|FULLTEXTTABLE|FUNCTION|FUSION|GENERAL|GET|GLOBAL|GO|GOTO|GRANT|GROUP|HAVING|HOLD|HOLDLOCK|HOST|HOUR|IDENTITY|IDENTITYCOL|IDENTITY_INSERT|IF|IGNORE|IMMEDIATE|IN|INCLUDE|INDEX|INDICATOR|INITIALIZE|INITIALLY|INNER|INOUT|INPUT|INSENSITIVE|INSERT|INTEGER|INTERSECT|INTERSECTION|INTERVAL|INTO|IS|ISOLATION|ITERATE|JOIN|KEY|KILL|LANGUAGE|LARGE|LAST|LATERAL|LEADING|LESS|LEVEL|LIKE|LIKE_REGEX|LIMIT|LINENO|LN|LOAD|LOCAL|LOCALTIME|LOCALTIMESTAMP|LOCATOR|MAP|MATCH|MEMBER|MERGE|METHOD|MINUTE|MOD|MODIFIES|MODIFY|MODULE|MULTISET|NAMES|NATIONAL|NATURAL|NCLOB|NEW|NEXT|NO|NOCHECK|NONCLUSTERED|NONE|NORMALIZE|NOT|NULL|NULLIF|OBJECT|OCCURRENCES_REGEX|OCTET_LENGTH|OF|OFF|OFFSETS|OLD|ON|ONLY|OPEN|OPERATION|OPTION|OR|ORDER|ORDINALITY|OUT|OUTER|OUTPUT|OVER|OVERLAPS|OVERLAY|PAD|PARAMETER|PARAMETERS|PARTIAL|PARTITION|PASCAL|PATH|PERCENT|PERCENTILE_CONT|PERCENTILE_DISC|PERCENT_RANK|PIVOT|PLAN|POSITION|POSITION_REGEX|POSTFIX|PRECISION|PREFIX|PREORDER|PREPARE|PRESERVE|PRIMARY|PRINT|PRIOR|PRIVILEGES|PROC|PROCEDURE|PUBLIC|RAISERROR|RANGE|READ|READS|READTEXT|RECONFIGURE|RECURSIVE|REF|REFERENCES|REFERENCING|REGR_AVGX|REGR_AVGY|REGR_COUNT|REGR_INTERCEPT|REGR_R2|REGR_SLOPE|REGR_SXX|REGR_SXY|REGR_SYY|RELATIVE|RELEASE|REPLICATION|RESTORE|RESTRICT|RESULT|RETURN|RETURNS|REVERT|REVOKE|ROLE|ROLLBACK|ROLLUP|ROUTINE|ROW|ROWCOUNT|ROWGUIDCOL|ROWS|RULE|SAVE|SAVEPOINT|SCHEMA|SCOPE|SCROLL|SEARCH|SECOND|SECTION|SECURITYAUDIT|SELECT|SEMANTICKEYPHRASETABLE|SEMANTICSIMILARITYDETAILSTABLE|SEMANTICSIMILARITYTABLE|SENSITIVE|SEQUENCE|SESSION|SET|SETS|SETUSER|SHUTDOWN|SIMILAR|SIZE|SOME|SPECIFIC|SPECIFICTYPE|SQL|SQLCA|SQLCODE|SQLERROR|SQLEXCEPTION|SQLSTATE|SQLWARNING|START|STATE|STATEMENT|STATIC|STATISTICS|STDDEV_POP|STDDEV_SAMP|STRUCTURE|SUBMULTISET|SUBSTRING_REGEX|SYMMETRIC|SYSTEM|TABLESAMPLE|TEMPORARY|TERMINATE|TEXTSIZE|THAN|THEN|TIMEZONE_HOUR|TIMEZONE_MINUTE|TO|TOP|TRAILING|TRAN|TRANSACTION|TRANSLATE|TRANSLATE_REGEX|TRANSLATION|TREAT|TRIGGER|TRIM|TRUNCATE|TSEQUAL|UESCAPE|UNDER|UNION|UNIQUE|UNKNOWN|UNNEST|UNPIVOT|UPDATE|UPDATETEXT|USAGE|USE|USER|USING|VALUE|VALUES|VARIABLE|VARYING|VAR_POP|VAR_SAMP|VIEW|WAITFOR|WHEN|WHENEVER|WHERE|WHILE|WIDTH_BUCKET|WINDOW|WITH|WITHIN|WITHIN GROUP|WITHOUT|WORK|WRITE|WRITETEXT|XMLAGG|XMLATTRIBUTES|XMLBINARY|XMLCAST|XMLCOMMENT|XMLCONCAT|XMLDOCUMENT|XMLELEMENT|XMLEXISTS|XMLFOREST|XMLITERATE|XMLNAMESPACES|XMLPARSE|XMLPI|XMLQUERY|XMLSERIALIZE|XMLTABLE|XMLTEXT|XMLVALIDATE|ZONE",a=(t=(t=(t=(t=(t=t+"|KEEPIDENTITY|KEEPDEFAULTS|IGNORE_CONSTRAINTS|IGNORE_TRIGGERS|XLOCK|FORCESCAN|FORCESEEK|HOLDLOCK|NOLOCK|NOWAIT|PAGLOCK|READCOMMITTED|READCOMMITTEDLOCK|READPAST|READUNCOMMITTED|REPEATABLEREAD|ROWLOCK|SERIALIZABLE|SNAPSHOT|SPATIAL_WINDOW_MAX_CELLS|TABLOCK|TABLOCKX|UPDLOCK|XLOCK|IGNORE_NONCLUSTERED_COLUMNSTORE_INDEX|EXPAND|VIEWS|FAST|FORCE|KEEP|KEEPFIXED|MAXDOP|MAXRECURSION|OPTIMIZE|PARAMETERIZATION|SIMPLE|FORCED|RECOMPILE|ROBUST|PLAN|SPATIAL_WINDOW_MAX_CELLS|NOEXPAND|HINT"+"|LOOP|HASH|MERGE|REMOTE")+"|TRY|CATCH|THROW"+"|TYPE").split("|")).filter(function(e,t,a){return-1===i.split("|").indexOf(e)&&-1===r.split("|").indexOf(e)&&-1===o.split("|").indexOf(e)})).sort().join("|"),this.createKeywordMapper({"constant.language":i,"storage.type":o,"support.function":r,"support.storedprocedure":e,keyword:t},"identifier",!0)),s="SET ANSI_DEFAULTS|SET ANSI_NULLS|SET ANSI_NULL_DFLT_OFF|SET ANSI_NULL_DFLT_ON|SET ANSI_PADDING|SET ANSI_WARNINGS|SET ARITHABORT|SET ARITHIGNORE|SET CONCAT_NULL_YIELDS_NULL|SET CURSOR_CLOSE_ON_COMMIT|SET DATEFIRST|SET DATEFORMAT|SET DEADLOCK_PRIORITY|SET FIPS_FLAGGER|SET FMTONLY|SET FORCEPLAN|SET IDENTITY_INSERT|SET IMPLICIT_TRANSACTIONS|SET LANGUAGE|SET LOCK_TIMEOUT|SET NOCOUNT|SET NOEXEC|SET NUMERIC_ROUNDABORT|SET OFFSETS|SET PARSEONLY|SET QUERY_GOVERNOR_COST_LIMIT|SET QUOTED_IDENTIFIER|SET REMOTE_PROC_TRANSACTIONS|SET ROWCOUNT|SET SHOWPLAN_ALL|SET SHOWPLAN_TEXT|SET SHOWPLAN_XML|SET STATISTICS IO|SET STATISTICS PROFILE|SET STATISTICS TIME|SET STATISTICS XML|SET TEXTSIZE|SET XACT_ABORT".split("|"),n="READ UNCOMMITTED|READ COMMITTED|REPEATABLE READ|SNAPSHOP|SERIALIZABLE".split("|"),d=0;d<n.length;d++)s.push("SET TRANSACTION ISOLATION LEVEL "+n[d]);for(this.$rules={start:[{token:"string.start",regex:"'",next:[{token:"constant.language.escape",regex:/''/},{token:"string.end",next:"start",regex:"'"},{defaultToken:"string"}]},u.getStartRule("doc-start"),{token:"comment",regex:"--.*$"},{token:"comment",start:"/\\*",end:"\\*/"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:a,regex:"@{0,2}[a-zA-Z_$][a-zA-Z0-9_$]*\\b(?!])"},{token:"constant.class",regex:"@@?[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"\\+|\\-|\\/|\\/\\/|%|<@>|@>|<@|&|\\^|~|<|>|<=|=>|==|!=|<>|=|\\*"},{token:"paren.lparen",regex:"[\\(]"},{token:"paren.rparen",regex:"[\\)]"},{token:"punctuation",regex:",|;"},{token:"text",regex:"\\s+"}],comment:[u.getTagRule(),{token:"comment",regex:"\\*\\/",next:"no_regex"},{defaultToken:"comment",caseInsensitive:!0}]},d=0;d<s.length;d++)this.$rules.start.unshift({token:"set.statement",regex:s[d]});function l(e,t){e.forEach(function(e){c.push({name:e,value:e,score:0,meta:t})})}this.embedRules(u,"doc-",[u.getEndRule("start")]),this.normalizeRules();var c=[];l(e.split("|"),"procedure"),l(i.split("|"),"operator"),l(r.split("|"),"function"),l(o.split("|"),"type"),l(s,"statement"),l(t.split("|"),"keyword"),this.completions=c}var r=lr.a.require("ace/lib/oop"),u=lr.a.require("ace/mode/doc_comment_highlight_rules").DocCommentHighlightRules,o=lr.a.require("ace/mode/text_highlight_rules").TextHighlightRules;r.inherits(i,o),t.SqlHighlightRules=i}),lr.a.define("ace/mode/sql",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/sql_highlight_rules","ace/range"],function(e,t,a){function i(){this.HighlightRules=s}var r=lr.a.require("ace/lib/oop"),o=lr.a.require("ace/mode/text").Mode,s=lr.a.require("ace/mode/sql_highlight_rules").SqlHighlightRules;lr.a.require("ace/range").Range;r.inherits(i,o),function(){this.lineCommentStart="--",this.$id="ace/mode/sql"}.call(i.prototype),t.Mode=i}));class hr extends C.Disposable{constructor(e,t){super(),this._tableQueryString=_.observable(""),this._query=_.observable(),this._needToCustomizeParameters=_.pureComputed(()=>this._query()&&(this._query().type()===u.customSqlQuery||0<this._query().parameters().length)),this.template="dxrd-select-control",this.aceOptions=cr(),this.additionalOptions=ur(e=>{this.sqlString(e)}),this.aceAvailable=Object(P.aceAvailable)(),this.languageHelper=pr(),this.caption=()=>Object(C.getLocalization)("SQL string:","DataAccessUIStringId.QueryControl_SqlString"),this.sqlString=_.pureComputed({read:()=>this._query()&&this._query().type()===u.customSqlQuery?this._query().sqlString():this._tableQueryString(),write:e=>{var t;this._query().type()!==u.customSqlQuery?((t=new wt({"@Name":this._query().name()},this._query().parent)).parameters(this._query().parameters()),t.sqlString(e),this._query(t)):this._query().sqlString(e)}}),this.isNextDisabled=_.pureComputed(()=>!this.sqlString()||!this._needToCustomizeParameters()),this.isFinishDisabled=_.pureComputed(()=>!this.sqlString()||this._needToCustomizeParameters()),this._sqlTextProvider=e,this.disableCustomSql=()=>t,this.aceOptions.readOnly=this.disableCustomSql(),this._disposables.push(this._needToCustomizeParameters,this.sqlString)}setQuery(t,e){return this._query()!==t&&t.type()===u.tableQuery?(e&&e(!0),this._sqlTextProvider.getQuerySqlText(t).done(e=>{e.errorMessage&&Object(x.ShowMessage)(e.errorMessage),this._tableQueryString(e.sqlSelectStatement),this._query(t)}).always(()=>{e&&e(!1)})):(this._query(t),T.Deferred().resolve().promise())}getQuery(){return this._query()}get runQueryBuilderDisabled(){return!1}}class mr extends C.Disposable{constructor(){super(),this.template="dxrd-procedures-control",this.storedProcedures=_.observableArray([]),this.selectedProcedure=_.observableArray([]),this.caption=()=>Object(C.getLocalization)("Select a stored procedure:","DataAccessUIStringId.StoredProcControl_Caption"),this.generateStoredProcedureDisplayName=e=>mr.generateStoredProcedureDisplayName(e),this.isNextDisabled=_.pureComputed(()=>!this._selectedProcedure||!this._needToProcessParameters(this._selectedProcedure)),this.isFinishDisabled=_.pureComputed(()=>!this._selectedProcedure||this._needToProcessParameters(this._selectedProcedure)),this.storedProcedures.subscribe(e=>{e?this._selectedProcedure?this._selectedProcedure=Object(x.getFirstItemByPropertyValue)(this.storedProcedures(),"name",this._selectedProcedure.name):this._query&&this._query.procName()?this._selectedProcedure=Object(x.getFirstItemByPropertyValue)(this.storedProcedures(),"name",this._query.procName()):this._selectedProcedure=e[0]:this._selectedProcedure=null})}_needToProcessParameters(e){return e.arguments.some(mr._availableConvertToParameter)}static _availableConvertToParameter(e){return e.direction!==Oe.Out}get _selectedProcedure(){return this.selectedProcedure()[0]}set _selectedProcedure(e){this.selectedProcedure(e?[e]:[])}scrollActiveItem(e){var t=e.model.selectedProcedure.peek();e.component.scrollToItem(t[0])}static generateStoredProcedureDisplayName(e){return 0===e.arguments.length?e.name:e.arguments.reduce((e,t,a,i)=>e+(t.name+(a<i.length-1?", ":")")),e.name+"(")}setQuery(e){return this._query=e,this._selectedProcedure=Object(x.getFirstItemByPropertyValue)(this.storedProcedures(),"name",e.procName()),T.Deferred().resolve().promise()}getQuery(){var t;return this._selectedProcedure?(t=new jt({"@Name":this._query.name()||this._selectedProcedure.name,ProcName:this._selectedProcedure.name},this._query.parent),this._selectedProcedure.arguments.forEach(e=>{mr._availableConvertToParameter(e)&&t.parameters.push(Object(x.getFirstItemByPropertyValue)(this._query.parameters(),"name",e.name)||new g({"@Name":e.name,"@Type":we.GetType(e.type)},null,_t(we.GetType(e.type))))}),t):null}get runQueryBuilderDisabled(){return!0}}class gr extends I{constructor(e){super(),this._options=e,this._connection=()=>this._dataSource().connection,this._dataSource=()=>this._dataSourceWrapper&&this._dataSourceWrapper.sqlDataSource,this.queryNameCaption=()=>Object(C.getLocalization)("Query Name","AnalyticsCoreStringId.SqlDSWizard_QueryName")+":",this.queryControl=_.observable(),this.runQueryBuilderBtnText=_.pureComputed(()=>this._selectStatementControl.sqlString()&&this._selectStatementControl.getQuery().type()!==u.tableQuery?Object(C.getLocalization)("Create New Query...","AnalyticsCoreStringId.SqlDSWizard_CreateNewQuery"):Object(C.getLocalization)("Run Query Builder...","DataAccessUIStringId.Button_QueryBuilder")).extend({deferred:!0}),this.placeholder=()=>{var e=this.queryControl(),e=e&&e.getQuery(),e=this.initialName||e&&e.generateName();return e&&Object(x.formatUnicorn)(Object(C.getLocalization)("Type custom query name (current name: {0})","AnalyticsCoreStringId.SqlDSWizard_QueryNamePlaceholder"),e)},this.queryName=_.observable(""),this.queryTypeItems=[gr.QUERY_TEXT,gr.SP_TEXT],this.selectedQueryType=_.observable(),this.initialName="",this._proceduresList=new mr,this._disposables.push(this._selectStatementControl=new hr(new dr(ir(this._options.callbacks.selectStatement),this._connection),this._options.disableCustomSql)),this._disposables.push(this.selectedQueryType.subscribe(e=>{e===gr.SP_TEXT?(this[za]&&this[za](!0),this._dataSource().dbSchemaProvider.getDbStoredProcedures().done(e=>{this._proceduresList.storedProcedures([]),this._proceduresList.storedProcedures(e)}).always(e=>this[za]&&this[za](!1)),this.queryControl(this._proceduresList)):this.queryControl(this._selectStatementControl)})),this.selectedQueryType(gr.QUERY_TEXT),this.popupQueryBuilder=new nr((e,t)=>(this.queryName(e.name()||e.generateName()),this._selectStatementControl.setQuery(e,t)),this._options.rtl,this._options.callbacks.customizeQBInitData)}canNext(){return!this.queryControl().isNextDisabled()}canFinish(){return!this.queryControl().isFinishDisabled()||!this.queryControl().isNextDisabled()}runQueryBuilder(){var e=this.queryControl().getQuery();e&&e.type()===u.tableQuery?(e.name(this.queryName()),this.popupQueryBuilder.show(e,this._dataSource())):this.popupQueryBuilder.show(new $t({"@Name":this.queryName()},this._dataSource()),this._dataSource())}localizeQueryType(e){return gr.QUERY_TEXT===e?Object(C.getLocalization)(gr.QUERY_TEXT,"DataAccessUIStringId.WizardPageConfigureQuery_Query"):Object(C.getLocalization)(gr.SP_TEXT,"DataAccessUIStringId.WizardPageConfigureQuery_StoredProcedure")}initialize(e){return this._dataSourceWrapper=Qa(e,this._options.requestWrapper),this._proceduresList.setQuery(new jt({},this._dataSource())),this._selectStatementControl.setQuery(new wt({},this._dataSource())),this.popupQueryBuilder.isVisible(!1),this._dataSourceWrapper.sqlQuery?(this.initialName=this._dataSourceWrapper.sqlQuery.name(),this.queryName(this.initialName),this.selectedQueryType(this._dataSourceWrapper.sqlQuery.type()===u.storedProcQuery?gr.SP_TEXT:gr.QUERY_TEXT),this.queryControl().setQuery(this._dataSourceWrapper.sqlQuery)):(this.selectedQueryType(gr.QUERY_TEXT),T.Deferred().resolve().promise())}commit(){var e,t=this.queryControl().getQuery();return t&&((e=this.queryName()||this.initialName)&&t.name(e),t.name()&&this._dataSourceWrapper.sqlQuery&&this._dataSourceWrapper.sqlQuery.name()===t.name()||t.name(ka(this._dataSource().queries(),t)),this._dataSourceWrapper.sqlQuery=t),T.Deferred().resolve({queryName:this._dataSourceWrapper.sqlQuery.name(),sqlDataSourceJSON:this._dataSourceWrapper.save()}).promise()}}function br(e,t){e.registerMetadata(N.ConfigureQueryPage,{create:()=>new gr(t),setState:(e,t)=>{t.queryName=e.queryName,t.sqlDataSourceJSON=e.sqlDataSourceJSON},getState:e=>e.sqlDataSourceWizard,resetState:(e,t)=>{e.sqlDataSourceJSON=t.sqlDataSourceJSON,e.queryName=t.queryName},template:"dxrd-wizard-create-query-page",description:Object(x.localizeWithUpdateLocalizationMethod)("Create a query or select a stored procedure")||Object(C.getLocalization)("Create a query or select a stored procedure.",x.StringId.WizardPageConfigureQuery)})}gr.QUERY_TEXT="Query",gr.SP_TEXT="Stored Procedure";class fr extends I{constructor(e={createParameterViewModel:e=>e,getParameterFromViewModel:e=>e},t){super(),this.parametersConverter=e,this._requestWrapper=t,this._sqlDataSourceWrapper=new qa(void 0,void 0,this._requestWrapper),this.removeButtonTitle=Object(C.getLocalization)("Remove","DataAccessUIStringId.Button_Remove"),this.parametersEditorOptions={addHandler:()=>this.parametersConverter.createParameterViewModel(new g({"@Name":Object(x.getUniqueNameForNamedObjectsArray)(this.parametersEditorOptions.values.peek().peek(),"param"),"@Type":"System.Int32"})),values:_.observable(_.observableArray([])),displayName:"Parameters",level:0,info:_.observable({displayName:"Parameters",localizationId:"DevExpress.DataAccess.Sql.SqlQuery.Parameters",propertyName:"parameters",modelName:"Parameter",array:!0,editor:v.editorTemplates.getEditor("commonCollection"),template:"#dxrd-parameter-collection-item"}),editorTemplate:"#dxrd-wizard-datasource-parameters",hideButtons:_.observable(!1),collapsed:!1}}_isParametersValid(){return this.getParameters().every(e=>e.isValid())}canNext(){return!1}canFinish(){return this._isParametersValid()}getParameters(){return this.parametersEditorOptions.values()()}initialize(e){return this._sqlDataSourceWrapper=Qa(e,this._requestWrapper),this.parametersEditorOptions.hideButtons(this._sqlDataSourceWrapper.sqlQuery.type()===u.storedProcQuery),setTimeout(()=>{this.parametersEditorOptions.values(_.observableArray(this._sqlDataSourceWrapper.sqlQuery.parameters().map(e=>this.parametersConverter.createParameterViewModel(e))))},100),T.Deferred().resolve().promise()}commit(){return this._sqlDataSourceWrapper.sqlQuery.parameters(this.parametersEditorOptions.values()().map(e=>this.parametersConverter.getParameterFromViewModel(e))),T.Deferred().resolve({sqlDataSourceJSON:this._sqlDataSourceWrapper.save()}).promise()}}function yr(e,t,a){e.registerMetadata(N.ConfigureParametersPage,{create:()=>new fr(a,t),getState:e=>e.sqlDataSourceWizard,setState:(e,t)=>t.sqlDataSourceJSON=e.sqlDataSourceJSON,resetState:()=>{},template:"dxrd-page-configure-parameters",description:Object(C.getLocalization)("Configure query parameters.","AnalyticsCoreStringId.SqlDSWizard_PageConfigureParameters")})}class Sr extends C.Disposable{constructor(a,r,e,t,o){super(),this._callBack=_.observable({deleteAction:t=>{this._customQueries.remove(Object(x.findFirstItemMatchesCondition)(this._customQueries(),e=>(e.name()||e.generateName())===t))},showQbCallBack:null,disableCustomSql:!1}),this._checkedRootNodesCount=_.pureComputed(()=>{for(var e=0,t=0;t<this._rootItems.length&&e<2;t++)e+=this._rootItems[t].countChecked();return e}),this.hasCheckedItems=_.pureComputed(()=>!(0===this._checkedRootNodesCount())),this.nextButtonDisabled=_.pureComputed(()=>!(1<this._checkedRootNodesCount()||this.hasParametersToEdit())),this.hasParametersToEdit=_.pureComputed(()=>{for(var e=0;e<this._rootItems.length;e++)if(this._rootItems[e].hasParamsToEdit&&this._rootItems[e].hasParamsToEdit())return!0;return!1}),this.tables=()=>this._tables,this.views=()=>this._views,this.procedures=()=>this._procedures,this.queries=()=>this._queries,this.customQueries=()=>this._customQueries,this._callBack().showQbCallBack=e,this._callBack().disableCustomSql=t,this._tables=new Ui("tables",Object(C.getLocalization)("Tables","DataAccessStringId.ConfigureMultiQueryPage_TableCategory"),"list",!1,o),this._views=new Ui("views",Object(C.getLocalization)("Views","DataAccessStringId.ConfigureMultiQueryPage_ViewCategory"),"list",!1,o),this._procedures=new Hi("procedures",Object(C.getLocalization)("Stored Procedures","DataAccessStringId.ConfigureMultiQueryPage_SpCategory"),"list",!1,o),this._queries=new Ji("queries",Object(C.getLocalization)("Queries","DataAccessStringId.ConfigureMultiQueryPage_QueryCategory"),"list",!1,this._callBack,o),this._disposables.push(this._tables,this._views,this._procedures,this._queries),this._rootItems=[this._tables,this._views,this._procedures,this._queries],this.getItems=e=>{var t,i=T.Deferred();return e.fullPath?"tables"===e.fullPath?a.getDbSchema().done(e=>{var t;0===this._tables.children().length?(t=[],e.tables.forEach(e=>{e.isView||t.push(new Ui(e.name,e.name,"table",this._tables.checked.peek(),o))}),this._tables.initializeChildren(t),i.resolve(t)):i.resolve(this._tables.children())}).fail(i.reject):"views"===e.fullPath?a.getDbSchema().done(e=>{var t;0===this._views.children().length?(t=[],e.tables.forEach(e=>{e.isView&&t.push(new Ui(e.name,e.name,"view",this._views.checked.peek(),o))}),this._views.initializeChildren(t),i.resolve(t)):i.resolve(this._views.children())}).fail(i.reject):"procedures"===e.fullPath?a.getDbStoredProcedures().done(e=>{0===this._procedures.children().length?(e=e.map(e=>{e=new Fi(e.name,mr.generateStoredProcedureDisplayName(e),"procedure",this._procedures.checked.peek(),e.arguments,o);return this._disposables.push(e),e}),this._procedures.initializeChildren(e),i.resolve(e)):i.resolve(this._procedures.children())}).fail(i.reject):"queries"===e.fullPath?(t=r().map(t=>{var e=t.name()||t.generateName(),a=this._queries.children().filter(e=>e.query===t)[0];return a||(e=new Gi(e,e,"query",!!a&&a.checked(),t.parameters,this._callBack,o,t),this._disposables.push(e),e.setObservableName(_.computed({read:()=>t.name()||t.generateName(),write:e=>t.name(e)})),e)}),this._queries.initializeChildren(t),i.resolve(t)):a.getDbTable(e.path).done(t=>{var e,a=t.isView?Object(x.findFirstItemMatchesCondition)(this._views.children(),e=>e.name===t.name):Object(x.findFirstItemMatchesCondition)(this._tables.children(),e=>e.name===t.name);0===a.children().length?(e=t.columns.map(e=>{e=new Fi(e.name,e.name,"column",a.checked.peek(),null,o);return this._disposables.push(e),e}),a.initializeChildren(e),i.resolve(e)):i.resolve(a.children())}).fail(i.reject):i.resolve(this._rootItems),i.promise()},this._customQueries=r}}class vr{constructor(e,t){this.globalState=e,this.pageFactory=t,this.defaultState=Object(x.extend)(!0,{},e)}_getPageState(e,t=this.globalState){return this.pageFactory.getMetadata(e).getState(t)}setPageState(e,t){this.pageFactory.getMetadata(e).setState(t,this.getPageState(e))}getPageState(e){return this._getPageState(e)}resetPageState(e){var t=Object(x.extend)(!0,{},this._getPageState(e,this.defaultState));this.pageFactory.getMetadata(e).resetState(this.getPageState(e),t)}getCurrentState(){return this.globalState}reset(){this.globalState.reset()}}class xr extends C.Disposable{constructor(e,t,a=()=>{}){super(),this.pageFactory=e,this.stateManager=t,this._onResetPage=a,this._pages=[],this._currentIndex=0}dispose(){this._pages.forEach(e=>e.dispose()),this._pages=[]}__resetPages(e){if(e<this._pages.length)for(var t=this._pages.length-1;e<=t;t--)this.stateManager.resetPageState(this._pages[t].pageId),this._onResetPage(this._pages[t]),this._pages[t].dispose(),this._pages.splice(t,1)}_nextPage(){return this._pages[this._currentIndex+1]}_getNextExistingPage(){this._currentIndex+=1;var e=T.Deferred();return e.resolve(this._pages[this._currentIndex]),e.promise()}_resetPages(){this.__resetPages(this._currentIndex+1)}_getNextNewPage(e){this._currentIndex+=1;var t=T.Deferred(),a=(this.__resetPages(this._currentIndex),this.pageFactory.getMetadata(e)),e=new Ka(e,a.create(),a.template,a.description);return this._pages.push(e),t.resolve(e),t.promise()}_getStartPage(e){e=e||this.getNextPageId();var t=this.pageFactory.getMetadata(e),e=new Ka(e,t.create(),t.template,t.description);return this._pages.push(e),e}_getNextPage(){var e,t=this._getCurrentPage();return t.isChanged||!this._nextPage()?(e=this.getNextPageId(this._getCurrentPage().pageId))?(t.isChanged=!1,this._getNextNewPage(e)):T.Deferred().reject().promise():this._getNextExistingPage()}_getPreviousPage(){var e=T.Deferred();return this._currentIndex-1<0?e.reject(null):(--this._currentIndex,e.resolve(this._pages[this._currentIndex])),e.promise()}_goToPage(t){var e=T.Deferred(),a=this._pages.filter(e=>e.pageId===t)[0];return a?(this._currentIndex=this._pages.indexOf(a),e.resolve(a)):e.reject(null),e.promise()}_getCurrentPage(){return this._pages[this._currentIndex]}_getCurrentState(){return this.stateManager.getCurrentState()}getNextPageId(e){return""}}class _r extends C.Disposable{constructor(e,t){super(),this.pageFactory=e,this.events=new C.EventManager,this._loadingTimeout=null,this.isLoading=_.observable(!1),this._currentPage=_.observable(),this.isVisible=_.observable(!1),this._finishCallback=t,this._disposables.push(this.events)}_createLoadingState(e){e[za]||(e[za]=e=>this._loadingState(e))}_createNextAction(e){e[ja]||(e[ja]=()=>this.nextAction())}_loadingState(e){e?(this._loadingTimeout&&clearTimeout(this._loadingTimeout),this._loadingTimeout=setTimeout(()=>{this.isLoading(!0)},100)):(this._loadingTimeout&&clearTimeout(this._loadingTimeout),this.isLoading(!1))}_callBeforeFinishHandler(e,t){this.events.call("beforeFinish",{state:e})}_callAfterFinishHandler(e,t){this.events.call("afterFinish",{state:e})}onFinish(){this.iterator.dispose()}initialize(e={},t=(e,t)=>new xr(e,t)){this.events.call("beforeInitialize",{wizard:this,state:e}),this.stateManager=new vr(e,this.pageFactory),this.iterator=t(this.pageFactory,this.stateManager),this.events.call("afterInitialize",{wizard:this})}isFirstPage(){return this._currentPage()&&this._currentPage().pageId==this.iterator.getNextPageId()}canNext(){return!this.isLoading()&&this._currentPage()&&this.pageFactory.getMetadata(this._currentPage().pageId).canNext(this._currentPage().page)}canFinish(){return!this.isLoading()&&this._currentPage()&&this.pageFactory.getMetadata(this._currentPage().pageId).canFinish(this._currentPage().page)}_initPage(e){return this.events.call("beforePageInitialize",Pi(e,this)),this._createLoadingState(e.page),this._createNextAction(e.page),e.initialize(this.stateManager.getPageState(e.pageId))}start(){this.events.call("beforeStart",{wizard:this}),this._loadingState(!0);var e=this.iterator._getStartPage();this._initPage(e).done(()=>{this._currentPage(e),this.events.call("afterPageInitialize",Ni(e,this))}).always(()=>this._loadingState(!1)).fail(()=>{this.isVisible(!1)})}canRunWizard(){return!0}nextAction(){var t,a;this.canNext()&&(t=this.iterator._getCurrentPage(),this._loadingState(!0),a=()=>this.iterator._getPreviousPage().always(()=>{this.iterator._resetPages(),this._loadingState(!1)}),t.commit().done(e=>{t.isChanged&&this.stateManager.setPageState(t.pageId,e),this.iterator._getNextPage().done(e=>{e?this._initPage(e).done(()=>{this._currentPage(e),this.events.call("afterPageInitialize",Ni(e,this)),this._loadingState(!1)}).fail(()=>a()):a()}).fail(()=>this._loadingState(!1))}).fail(()=>this._loadingState(!1)))}previousAction(){this.isFirstPage()||(this._loadingState(!0),this.iterator._getPreviousPage().done(e=>{e&&this._currentPage(e)}).always(()=>this._loadingState(!1)))}goToPage(e){this._loadingState(!0),this.iterator._goToPage(e).done(e=>{e&&this._currentPage(e)}).always(()=>this._loadingState(!1))}finishAction(){var a;this.canFinish()&&(this._loadingState(!0),(a=this.iterator._getCurrentPage()).commit().done(e=>{var t;this.stateManager.setPageState(a.pageId,e),this.iterator._resetPages(),this._finishCallback?(t=this.stateManager.getCurrentState(),this._callBeforeFinishHandler(t),this._finishCallback(t).done(e=>{this.onFinish(),this._callAfterFinishHandler(t,e),this.isVisible(!1)}).always(()=>{this._loadingState(!1)})):(this._loadingState(!1),this.isVisible(!1))}))}}class Cr extends _r{constructor(e,t){super(e,t),this.height=_.observable(520),this.width=_.observable(690),this._extendCssClass="",this._container=x.getParentContainer,this.itemsProvider=_.observable(),this.nextButton={text:Object(C.getLocalization)("Next","AnalyticsCoreStringId.Wizard_Next"),disabled:_.computed(()=>!this.canNext()),onClick:()=>this.nextAction()},this.cancelButton={text:Object(C.getLocalization)("Cancel","AnalyticsCoreStringId.SearchDialog_Cancel"),onClick:()=>{this.iterator.dispose(),this.isVisible(!1)}},this.previousButton={text:Object(C.getLocalization)("Previous","AnalyticsCoreStringId.Wizard_Previous"),disabled:_.computed(()=>this.isFirstPage()),onClick:()=>this.previousAction()},this.finishButton={text:Object(C.getLocalization)("Finish","AnalyticsCoreStringId.Wizard_Finish"),type:"default",disabled:_.computed(()=>!this.canFinish()),onClick:()=>this.finishAction()},this._titleTemplate=Object(v.getTemplate)("dx-wizard-headerNew"),this.title="Popup Wizard"}static _getLoadPanelViewModel(e,t){e=T.fn.constructor(e).closest(".dxrd-wizard-content");return{animation:{show:{type:"fade",from:0,to:1,duration:700},hide:{type:"fade",from:1,to:0,duration:700}},deferRendering:!1,message:Object(C.getLocalization)("Loading...","AnalyticsCoreStringId.Loading"),visible:t,shading:!0,shadingColor:"transparent",position:{of:e},container:e}}start(){super.start(),this.isVisible(!0)}_wizardPopupPosition(e){return{of:Object(x.getParentContainer)(e)}}_loadPanelViewModel(e){return this._getLoadPanelViewModel(e,this.isLoading)}_getLoadPanelViewModel(e,t){return Cr._getLoadPanelViewModel(e,t)}}class Tr extends P.TreeListController{constructor(e){super(),this._customizeDBSchemaTreeListActions=e}getActions(e){var t;return e.data&&(e.data instanceof Ji||e.data instanceof Gi)?(t=e.data.getActions(e),this._customizeDBSchemaTreeListActions&&this._customizeDBSchemaTreeListActions(e.data,t),t):[]}canSelect(e){return!0}}class Pr extends I{constructor(e){super(),this._options=e,this._selectedPath=_.observable(null),this._itemsProvider=_.observable(),this._customQueries=_.observableArray([]),this._checkedQueries=_.observableArray([]),this._sqlDataSourceWrapper=new qa(void 0,void 0,void 0),this._dataSource=()=>this._sqlDataSourceWrapper&&this._sqlDataSourceWrapper.sqlDataSource,this._dataConnection=()=>this._dataSource()&&this._dataSource().connection,this._showStatementPopup=e=>{this._popupSelectStatement.isVisible(!0),this._popupSelectStatement.query=e,this._popupSelectStatement.data(e.sqlString())},this._showQbCallBack=(t=null,e=!1)=>{var a;null!==t?(a=Object(x.findFirstItemMatchesCondition)(this._customQueries(),e=>t===(e.name()||e.generateName())),this._queryEditIndex(this._customQueries().indexOf(a)),a.type()===u.customSqlQuery?this._showStatementPopup(a):this._popupQueryBuilder.show(a,this._dataSource())):(this._queryEditIndex(-1),e?this._showStatementPopup(new wt({"@Name":null},this._dataSource())):(a=new $t({"@Name":null},this._dataSource()),this._popupQueryBuilder.show(a,this._dataSource())))},this._popupSelectStatement={isVisible:_.observable(!1),title:()=>Object(C.getLocalization)("Custom SQL Editor","AnalyticsCoreStringId.SqlDSWizard_CustomSqlEditor"),query:null,data:_.observable(),okButtonText:()=>Object(C.getLocalization)("OK","DataAccessUIStringId.Button_OK"),okButtonHandler:e=>{this._popupSelectStatement.query.sqlString(e.model.data()),this._setCustomSqlQuery(this._popupSelectStatement.query),e.model.isVisible(!1)},aceOptions:cr(),aceAvailable:Object(P.aceAvailable)(),additionalOptions:ur(e=>{this._popupSelectStatement.data(e)}),languageHelper:pr(),closest(e,t){return T.fn.constructor(e).closest(t)}},this._customResetOptions=T.noop,this._queryEditIndex=_.observable(-1),this.disableCustomSql=!0,this._scrollViewHeight="calc(100% - 37px)",this._customizeDBSchemaTreeListActions=null,this._isDataLoadingInProcess=_.observable(!1),this._callbacks=this._options.callbacks,this._sqlTextProvider=new dr(ir(this._callbacks.selectStatement),this._dataConnection),this._popupQueryBuilder=new nr((e,t)=>this._setTableQuery(e,t),e.rtl,e.callbacks.customizeQBInitData),this._fieldListModel=_.observable(null),this._disposables.push(this._hasParametersToEdit=_.pureComputed(()=>this._itemsProvider().hasParametersToEdit())),this._disposables.push(this._isDataLoadingInProcess.subscribe(e=>{e||this._onChange(),this[za]&&this[za](e)})),this.disableCustomSql=this._options.disableCustomSql,this._getItemsAfterCheck=t=>{this._resetDataSourceResult(),this._isDataLoadingInProcess(!0),t.checked.peek()&&t.isList?"tables"===t.name||"views"===t.name?this._itemsProvider().getItems(new C.PathRequest(t.name)).done(()=>{t.isList&&0<t.children.peek().length?T.when(...t.children.peek().map(e=>this._getItemsPromise(new C.PathRequest(t.name+"."+e.name)))).always(()=>this._isDataLoadingInProcess(!1)):this._isDataLoadingInProcess(!1)}):"table"===t.specifics||"view"===t.specifics?this._itemsProvider().getItems(new C.PathRequest(t.specifics+"."+t.name)).always(()=>this._isDataLoadingInProcess(!1)):"procedures"===t.name?this._itemsProvider().getItems(new C.PathRequest(t.name)).always(()=>this._isDataLoadingInProcess(!1)):this._isDataLoadingInProcess(!1):this._isDataLoadingInProcess(!1)}}_addQueryAlgorithm(e,t,a,i){e.unChecked()&&"queries"!==t?e.children().forEach(e=>{Pr._removeQuery(a.queries,e)}):(0===e.children().length&&this._itemsProvider().getItems(new C.PathRequest(t)),"tables"===t||"views"===t?this._addQueryFromTables(e,a):"procedures"===t?this._addQueryFromStoredProcedures(e,a):this._addQueryFromCustomQueries(e,i,a.queries))}_addQueryFromTables(e,t){for(var a=0;a<e.children().length;a++){var i=e.children()[a];if(i.unChecked())Pr._removeQuery(t.queries,i);else{var r={},o={Columns:r,Tables:{SelectedTables:{Item1:{"@Name":i.name,"@ControlType":"Table","@ItemType":"Table"}}}};0===i.children().length&&this._itemsProvider().getItems(new C.PathRequest("tables."+i.name)).done(()=>{i.initializeChildren(i.children())});for(var s=0;s<i.children().length;s++){var n=i.children()[s];n.checked()&&(r["Item"+(s+1)]={"@Table":i.name,"@Name":n.name,"@ItemType":"Column"})}Pr._pushQuery(new $t(o,t),i,t.queries)}}}_addQueryFromStoredProcedures(e,t){for(var a=0;a<e.children().length;a++){var i,r=e.children()[a];r.checked()?(i=new jt({"@Name":r.name,ProcName:r.name},t),r.arguments.forEach(e=>{i.parameters.push(new g({"@Name":e.name,"@Type":we.GetType(e.type)},null,_t(we.GetType(e.type))))}),Pr._pushQuery(i,r,t.queries)):Pr._removeQuery(t.queries,r)}}_addQueryFromCustomQueries(e,t,a){for(var i=0;i<e.children().length;i++){var r=e.children()[i],o=Object(x.findFirstItemMatchesCondition)(t.peek(),e=>r.name===(e.name()||e.generateName()));r.checked()&&(o.name(ka(a.peek(),o)),this._checkedQueries.push(o))}}_getItemsPromise(e){return this._itemsProvider().getItems(e)}_resetDataSourceResult(){this._customResetOptions(),this._dataSource().relations([]),this._dataSource().resultSet=null,this._onChange()}_setQueryCore(e){var t=this._fieldListModel().itemsProvider,a=this._queryEditIndex();0<=a?(this._itemsProvider().queries().children()[a].name=e.name(),t.customQueries().splice(a,1,e)):(e.name(ka(t.customQueries().peek(),e)),t.customQueries().push(e),this._selectedPath("queries."+e.name()),(t=(a=this._itemsProvider().queries().children())[a.length-1]).setChecked(!0),t._afterCheckToggled&&t._afterCheckToggled(t)),this._resetDataSourceResult()}static _pushQuery(t,e,a){Object(x.findFirstItemMatchesCondition)(a.peek(),e=>e.name()===(t.name()||t.generateName()))||(t.name(ka(a.peek(),t)),a.push(t)),e.hasQuery=!0}static _removeQuery(e,a){var i;a.hasQuery&&(i=-1,e.peek().some((e,t)=>(e.name()===a.name||e.generateName()===a.name)&&(i=t,!0))&&e.splice(i,1),a.hasQuery=!1)}canNext(){return!this._itemsProvider().nextButtonDisabled()&&this.canFinish()}canFinish(){return this._itemsProvider()&&this._itemsProvider().hasCheckedItems()&&!this._isDataLoadingInProcess()}_AddQueryWithBuilder(){}_runQueryBuilder(){}_loadPanelViewModel(e){return Cr._getLoadPanelViewModel(e,this._isDataLoadingInProcess)}_setTableQuery(e,t){return t&&t(!0),this._sqlTextProvider.getQuerySqlText(e).done(()=>this._setQueryCore(e)).always(()=>{t&&t(!1)})}_setCustomSqlQuery(e){this._setQueryCore(e)}_createTreeListFactory(){return new vi}commit(){this._dataSource().queries.removeAll(),this._checkedQueries.removeAll(),this._addQueryAlgorithm(this._itemsProvider().tables(),"tables",this._dataSource()),this._addQueryAlgorithm(this._itemsProvider().views(),"views",this._dataSource()),this._addQueryAlgorithm(this._itemsProvider().procedures(),"procedures",this._dataSource()),this._addQueryAlgorithm(this._itemsProvider().queries(),"queries",this._dataSource(),this._customQueries),_.utils.arrayPushAll(this._dataSource().queries(),this._checkedQueries()),this._dataSource().queries.valueHasMutated();var e=this._itemsProvider().queries().children().filter(e=>e.checked()).map(e=>e.name),t=this._sqlDataSourceWrapper.sqlDataSource.queries().filter(t=>e.some(e=>e===t.name())||t instanceof jt),a=(t.forEach(e=>this._sqlDataSourceWrapper.sqlDataSource.queries.remove(e)),new C.ModelSerializer);return T.Deferred().resolve({sqlDataSourceJSON:this._sqlDataSourceWrapper.save(),customQueries:t.map(e=>JSON.stringify(a.serialize(e)))}).promise()}initialize(e){this._sqlDataSourceWrapper=Qa(e,this._options.requestWrapper);var e=this._callbacks.customQueriesPreset?this._callbacks.customQueriesPreset(this._dataSource()):T.Deferred().resolve([]).promise(),t=T.Deferred();return e.done(e=>{this._customQueries(e),this._selectedPath("");e=new Sr(this._dataSource().dbSchemaProvider,this._customQueries,this._showQbCallBack,this.disableCustomSql,this._getItemsAfterCheck);this._disposables.push(e),this._itemsProvider(e),this._getItemsPromise(new C.PathRequest("queries")),this._fieldListModel({factory:this._createTreeListFactory(),itemsProvider:this._itemsProvider(),selectedPath:this._selectedPath,treeListController:new Tr(this._customizeDBSchemaTreeListActions),templateName:"dxrd-treelist-with-checkbox"}),this._popupQueryBuilder.isVisible(!1),this._dataSource().dbSchemaProvider.getDbSchema().done(()=>{t.resolve()}).fail(t.reject)}).fail(t.reject),t.promise()}}function Nr(e,t){e.registerMetadata(N.MultiQueryConfigurePage,{create:()=>new Pr(t),setState:(e,t)=>{t.sqlDataSourceJSON=e.sqlDataSourceJSON,t.customQueries=e.customQueries},getState:e=>e.sqlDataSourceWizard,resetState:(e,t)=>{e.sqlDataSourceJSON=t.sqlDataSourceJSON,e.customQueries=t.customQueries},description:Object(C.getLocalization)("Columns selected from specific tables and/or views will be automatically included into a separate query.","AnalyticsCoreStringId.SqlDSWizard_PageConfigureMultiQuery"),template:"dxrd-wizard-add-queries-page"})}class Or extends C.Disposable{constructor(e){super(),this.editor=v.editorTemplates.getEditor("commonCollection"),this.isList=!1,this.contenttemplate="dx-treelist-accordion-contenttemplate-custom-with-actions",this.actionsTemplate="dx-treelist-item-actions",this.dataSourceParameter=_.observable(e),this._name=e.name,this._displayName=e.displayName}get name(){return this._name()}get displayName(){return this._displayName||this.name}}class wr extends Or{constructor(e,t){super(e),this.parent=t}query(){return this.parent.query()}}class Dr{constructor(e){this.isList=!0,this.specifics="List",this.visible=_.observable(!0),this.name=this.displayName=e,this.parameters=_.observableArray([])}removeChild(e){this.parameters.remove(e)}}class Ir extends Dr{constructor(e){super(e.name()),this._query=e}query(){return this._query}}class Er extends P.TreeListController{constructor(e,t){super(),this._createNewParameter=t,this._rootItems=e}hasItems(e){return e.isList}getActions(e){var t,a,i=[];if(e.data){if(e.data.query().type()===u.storedProcQuery)return e.data.isList?[]:[P.treeListEditAction];e.data.isList?(t=e.data,i.push({clickAction:()=>t.parameters.push(new wr(this._createNewParameter(t.name,t.parameters()),t)),imageClassName:"dxrd-image-add",imageTemplateName:"dxrd-svg-operations-add",text:Object(C.getLocalization)("Add parameter","AnalyticsCoreStringId.FieldListActions_AddParameter")})):(a=e.data,i.push({clickAction:()=>{a.parent.removeChild(a)},imageClassName:"dxrd-image-recycle-bin",imageTemplateName:"dxrd-svg-operations-recycle_bin",text:Object(C.getLocalization)("Remove parameter","DataAccessUIStringId.Button_Remove")}),i.push(P.treeListEditAction))}return i}canSelect(e){return!0}}function kr(e,t){return e.type()===u.tableQuery||e.type()===u.customSqlQuery?-1<t.indexOf(e):e.type()===u.storedProcQuery&&0<e.parameters().length}class Ar extends I{constructor(e={createParameterViewModel:e=>e,getParameterFromViewModel:e=>e},t){super(),this.parametersConverter=e,this._requestWrapper=t,this._sqlDataSourceWrapper=new qa(void 0,void 0,this._requestWrapper),this._selectedPath=_.observable(null),this._rootItems=_.observableArray(),this._createNewParameter=(e,t)=>{t=new g({"@Name":Object(x.getUniqueNameForNamedObjectsArray)(t,"parameter"),"@Type":"System.Int32"});return this._selectedPath(e+"."+t.name()),this.parametersConverter.createParameterViewModel(t)},this._scrollViewHeight="100%",this._fieldListModel=_.observable(null),this._removeButtonTitle=Object(C.getLocalization)("Remove","DataAccessUIStringId.Button_Remove");var a=()=>this._onChange();this._disposables.push(_i(this._rootItems,e=>{this._disposables.push(_i(e.parameters,e=>{this._disposables.push(Ti(e.dataSourceParameter,e=>{this._disposables.push(...Ci([e.name,e.value,e.type],a))},a))},a))},a)),this._parametersEditorOptions={addHandler:()=>this.parametersConverter.createParameterViewModel(new g({"@Name":Object(x.getUniqueNameForNamedObjectsArray)(this._parametersEditorOptions.values.peek().peek(),"param"),"@Type":"System.Int32"})),values:_.observable(_.observableArray([])),displayName:"Parameters",level:0,info:_.observable({displayName:"Parameters",localizationId:"DevExpress.DataAccess.Sql.SqlQuery.Parameters",propertyName:"parameters",modelName:"Parameter",array:!0,editor:v.editorTemplates.getEditor("commonCollection"),template:"#dxrd-parameter-collection-item"}),editorTemplate:"#dxrd-wizard-datasource-parameters",hideButtons:_.observable(!1),collapsed:!1}}_isParametersValid(){return this._getParameters().every(e=>e.isValid())}canNext(){return this._isParametersValid()&&1<this._sqlDataSourceWrapper.sqlDataSource.queries().length}canFinish(){return this._isParametersValid()&&1<=this._sqlDataSourceWrapper.sqlDataSource.queries().length}_getParameters(){return[].concat.apply([],(this._rootItems()||[]).map(e=>e.parameters().map(e=>e.dataSourceParameter())))}initialize(e){var a=[],i=this._rootItems();return this._sqlDataSourceWrapper=Qa(e,this._requestWrapper),this._sqlDataSourceWrapper.sqlDataSource.queries().forEach(e=>{var t;kr(e,this._sqlDataSourceWrapper.customQueries)&&((t=new Ir(e)).parameters(e.parameters().map(e=>new wr(this.parametersConverter.createParameterViewModel(e),t))),a.push(t))}),i.filter(t=>a.every(e=>e.name!==t.name)).forEach(e=>{i.splice(this._rootItems().indexOf(e),1)}),a.forEach(t=>{var a=i.filter(e=>e.name===t.name)[0];a?t.parameters().filter(t=>a.parameters().every(e=>e.name!==t.name)).forEach(e=>{a.parameters.push(e)}):i.push(t)}),this._rootItems.valueHasMutated(),this._fieldListModel({itemsProvider:{getItems:t=>{var e,a=T.Deferred();return t.fullPath?(e=Object(x.findFirstItemMatchesCondition)(this._rootItems(),e=>e.name===t.ref),a.resolve(e.parameters())):a.resolve(this._rootItems()),a.promise()}},templateName:"dx-treelist-item-with-hover",selectedPath:this._selectedPath,treeListController:new Er(this._rootItems(),this._createNewParameter)}),T.Deferred().resolve().promise()}commit(){return this._rootItems().forEach(e=>{e.query().parameters(e.parameters().map(e=>this.parametersConverter.getParameterFromViewModel(e.dataSourceParameter())))}),T.Deferred().resolve({sqlDataSourceJSON:this._sqlDataSourceWrapper.sqlDataSourceJSON,customQueries:this._sqlDataSourceWrapper.saveCustomQueries()}).promise()}}function $r(e,t,a){e.registerMetadata(N.MultiQueryConfigureParametersPage,{create:()=>new Ar(a,t),getState:e=>e.sqlDataSourceWizard,setState:(e,t)=>t.customQueries=e.customQueries,resetState:()=>{},description:Object(C.getLocalization)("Configure query parameters.","AnalyticsCoreStringId.SqlDSWizard_PageConfigureParameters"),template:"dxrd-configure-query-parameters-page"})}class zr{constructor(e,t,a,i){this.showPopup=(e,t)=>{this._popupService.subscription&&this._popupService.subscription.dispose(),this._popupService.title(""),this._updateActions(this.target),this._popupService.target(t),this._popupService.visible(!0)},this.target=e,this._action=a,this._popupService=t,this._popupItems=i}_updateActions(t){this._popupService.subscription=this._popupService.visible.subscribe(e=>{this.target.isSelected&&this.target.isSelected(e)}),this._popupService.data({data:this._popupItems,template:"dx-filtereditor-popup-common",click:e=>{t[this._action](e),this._popupService.visible(!1)}})}}class jr{constructor(e,t,a=!1){this._isMaster=a,this.getTitle=()=>this._isMaster?Object(C.getLocalization)("Master Query","AnalyticsCoreStringId.Wizard_MasterDetailRelationship_MasterQuery"):Object(C.getLocalization)("Detail Query","AnalyticsCoreStringId.Wizard_MasterDetailRelationship_DetailQuery"),this.isSelected=_.observable(!1),this.selectColumnText=()=>Object(C.getLocalization)("<Select a Column>","DataAccessUIStringId.JoinEditorEmptyColumnText"),this.column=e,this.queryName=t,this.setColumn=e=>{this.column(e.name())}}}class Br{constructor(a,e){this.isEditable=_.observable(!1),this.relationName=a.name,this.keyColumns=_.pureComputed(()=>a.keyColumns().map(e=>({master:new jr(e.masterColumn,a.masterQuery(),!0),detail:new jr(e.detailColumn,a.detailQuery(),!1)}))),this.create=()=>{a.createKeyColumn()},this.remove=t=>{a.keyColumns.remove(e=>e.masterColumn===t.master.column&&e.detailColumn===t.detail.column),0===a.keyColumns().length&&e.remove(this)}}}class Rr{constructor(e,a){this.relations=_.observableArray(),this.queryName=e,this.add=e=>{this.relations.push(new Br(e,this))},this.create=e=>{e=new It({"@Master":this.queryName,"@Detail":e.name});Object(x.getFirstItemByPropertyValue)(this.relations(),"relationName",e.name())&&e.name(Object(x.getUniqueName)(this.relations().map(e=>e.relationName()),e.name()+"_")),e.createKeyColumn(),this.add(e),a.push(e)},this.remove=t=>{this.relations.remove(t),a.remove(e=>e.name===t.relationName)}}}class Mr extends P.PopupEditorBase{constructor(t,a,e){super(),this.isValid=_.observable(!0),this.loadPanelVisible=_.observable(!1),this.masterQueries=_.observableArray(),this.popupService=new x.PopupService,this.save=()=>{t().some(e=>!e.detailQuery()||!e.masterQuery()||e.keyColumns().some(e=>!e.detailColumn()||!e.masterColumn()))?Object(x.ShowMessage)(Object(C.getLocalization)("Some fields are empty. Please fill all empty fields or remove the corresponding conditions to proceed.","DataAccessUIStringId.JoinEditorFillAllFieldsException")):e().done(()=>{this.popupVisible(!1)})},this.createRelation=t=>{var e=a.tables().filter(e=>e.tableName()!==t.queryName).map(e=>({name:e.tableName()}));return{data:new zr(t,this.popupService,"create",e),templateName:"dx-filtereditor-create"}},this.setColumn=e=>{var t=Object(x.getFirstItemByPropertyValue)(a.tables(),"tableName",e.queryName);return{data:new zr(e,this.popupService,"setColumn",t?t.columns():[]),templateName:"dx-masterdetail-editor-setColumn"}},this._createMainPopupButtons();var i={};a.tables().forEach(e=>{i[e.tableName()]=new Rr(e.tableName(),t)}),t().forEach(e=>{i[e.masterQuery()]=i[e.masterQuery()]||new Rr(e.masterQuery(),t),i[e.masterQuery()].add(e)}),this.masterQueries(T.map(i,e=>e))}title(){return Object(C.getLocalization)("Master-Detail Relation Editor",x.StringId.MasterDetailRelationsEditor)}}class qr extends I{constructor(e){super(),this._getResultSchema=e,this._relations=_.observableArray([]),this._customResetOptions=T.noop,this._relationsEditor=_.observable(null);var a=()=>this._onChange();this._disposables.push(_i(this._relations,t=>{t._disposables.push(...Ci([t.detailQuery,t.name,t.masterQuery],a)),t._disposables.push(_i(t.keyColumns,e=>{t._disposables.push(...Ci([e.detailColumn,e.masterColumn],a))},a))},a))}_getResultSet(e){var t=T.Deferred();return e.resultSet?t.resolve(e.resultSet):this._getResultSchema(e).done(e=>{t.resolve(new Ue(JSON.parse(e.resultSchemaJSON)))}).fail(e=>{t.reject(e)}),t.promise()}_dataSource(){return null}_restoreDataSource(e){}_updateRelations(){var o=this._relations();o.forEach((t,e)=>{var a,i=this._resultSet.tables().filter(e=>e.tableName()===t.detailQuery())[0],r=this._resultSet.tables().filter(e=>e.tableName()===t.masterQuery())[0];i&&r&&((a=t.keyColumns()).forEach((t,e)=>{(i.columns().every(e=>e.name()!==t.detailColumn())||r.columns().every(e=>e.name()!==t.masterColumn()))&&a.splice(e,1)}),0!==a.length)||o.splice(e,1)}),this._relations.valueHasMutated()}canNext(){return!1}canFinish(){return this._relations().every(e=>e.keyColumns().every(e=>!!e.detailColumn()&&!!e.masterColumn()))}initialize(e){return this.relationsSubscription&&this.relationsSubscription.dispose(),this._restoreDataSource(e),this._disposables.push(this.relationsSubscription=this._relations.subscribe(e=>{e.some(e=>!e.moved&&0!==e.moved)&&this._customResetOptions()},null,"arrayChange")),this._getResultSet(this._dataSource()).done(e=>{this._resultSet=e,this._updateRelations(),this._relationsEditor(new Mr(this._relations,this._resultSet,T.noop))}).fail(e=>{Object(x.getErrorMessage)(e)&&Object(x.ShowMessage)(Object(x.getErrorMessage)(e))})}dispose(){super.dispose(),this.disposeObservableArray(this._relations)}}class Lr extends qr{constructor(){super(...arguments),this._customResetOptions=T.noop,this._relationsEditor=_.observable(null)}_restoreDataSource(e){this._sqlDataSourceWrapper=Qa(e)}_dataSource(){return this._sqlDataSourceWrapper.sqlDataSource}commit(){this.relationsSubscription.dispose(),this._sqlDataSourceWrapper.sqlDataSource.relations(this._relations()),this._sqlDataSourceWrapper.sqlDataSource.resultSet=this._resultSet;var t=new C.ModelSerializer;return T.Deferred().resolve({sqlDataSourceJSON:this._sqlDataSourceWrapper.sqlDataSourceJSON,customQueries:this._sqlDataSourceWrapper.saveCustomQueries(),relations:this._relations().map(e=>JSON.stringify(t.serialize(e)))}).promise()}}function Qr(e,t){e.registerMetadata(S.ConfigureMasterDetailRelationshipsPage,{create:()=>new Lr(t),setState:(e,t)=>{t.relations=e.relations},getState:e=>e.sqlDataSourceWizard,resetState:(e,t)=>{e.relations=t.relations},description:Object(C.getLocalization)("Configure master-detail relationships.","AnalyticsCoreStringId.SqlDSWizard_PageConfigureMasterDetailRelations"),template:"dxrd-wizard-configure-relations-page"})}var Vr={None:"None",Count:"Count",Max:"Max",Min:"Min",Avg:"Avg",Sum:"Sum",CountDistinct:"CountDistinct",AvgDistinct:"AvgDistinct",SumDistinct:"SumDistinct"},Wr=[Ut,{propertyName:"displayType",displayName:"Type",localizationId:"DataAccessUIStringId.ParametersColumn_Type",disabled:!0,editor:b.getEditor("text")},{propertyName:"alias",displayName:"Alias",localizationId:"DataAccessUIStringId.QueryBuilderColumns_Alias",editor:b.getEditor("text")},Gt,{propertyName:"sortingType",displayName:"Sort Type",editor:b.getEditor("combobox"),defaultVal:"Unsorted",valuesArray:[{value:"Unsorted",displayValue:"Unsorted",localizationId:"DataAccessUIStringId.SortingTypeNone"},{value:"Ascending",displayValue:"Ascending",localizationId:"DataAccessUIStringId.SortingTypeAscending"},{value:"Descending",displayValue:"Descending",localizationId:"DataAccessUIStringId.SortingTypeDescending"}],localizationId:"AnalyticsCoreStringId.QueryBuilder_SortType"},{propertyName:"sortOrder",displayName:"Sort Order",editor:b.getEditor("numeric"),localizationId:"DataAccessUIStringId.QueryBuilderColumns_SortOrder"},{propertyName:"groupBy",displayName:"Group By",editor:b.getEditor("bool"),defaultVal:!1,localizationId:"DataAccessUIStringId.QueryBuilderColumns_GroupBy"},{propertyName:"aggregate",displayName:"Aggregate",editor:b.getEditor("comboboxUndo"),values:Vr,defaultVal:Vr.None,localizationId:"DataAccessUIStringId.QueryBuilderColumns_Aggregate"}],A={RecordsCount:"RecordsCount",Column:"Column",Expression:"Expression",AllColumns:"AllColumns",AllColumnsQuery:"AllColumnsQuery"},Fr=[{propertyName:"expression",modelName:"#text"},{propertyName:"table",modelName:"@Table"},{propertyName:"column",modelName:"@Name"},{propertyName:"aggregate",modelName:"@Aggregate",defaultVal:Vr.None},{propertyName:"alias",modelName:"@Alias"},{propertyName:"descending",modelName:"@Descending",defaultVal:!1},{propertyName:"itemType",modelName:"@ItemType"}],Ur=[Ut,Gt];class Hr{constructor(e,a,t){if((t=t||new C.ModelSerializer).deserialize(this,e),this._dependedTables=[],this.table()){var i=a.getTable(this.table());this.table=_.pureComputed(()=>i.actualName()),this._dependedTables.push(i)}else if(this.expression())try{this._criteria=da.CriteriaOperatorStateMachine.parse(this.expression()),Object(da.criteriaForEach)(this._criteria,t=>{var e;t instanceof na.OperandProperty&&(e=Object(x.findFirstItemMatchesCondition)(a.tables(),e=>0===t.propertyName.indexOf(e.actualName()+".")))&&this._dependedTables.push(e)})}catch(e){}this.__table=this.table,this.__column=this.column,this.__expression=this.expression}actualName(){return this.alias()||this.column()}toTable(){this.table=this.__table,this.column=this.__column,this.expression=_.observable(null),this.itemType(A[A.Column]),this.__column.peek()&&0===this.alias().indexOf("Expr")&&this.alias(null)}getInfo(){return Fr}isDepended(t){return!!Object(x.findFirstItemMatchesCondition)(this._dependedTables,e=>e.actualName()===t)}}class Jr extends ca{constructor(t,a){super({"@ControlType":"Column"},t,a);var i=t.parentModel(),r=_.pureComputed(()=>Object(x.findFirstItemMatchesCondition)(i.columns(),e=>t.actualName()===e.table()&&A.AllColumns===e.itemType()));this.selected=_.pureComputed({read:()=>!!r(),write:e=>{!!r()!==e&&(e?i.columns.push(new Hr({"@ItemType":A.AllColumns,"@Table":t.actualName()},i,a)):i.columns.remove(e=>t.actualName()===e.table()&&A.AllColumns===e.itemType()))}}),this.name=_.pureComputed(Jr.DisplayName),this._disposables.push(this.name)}getInfo(){return Ur}}Jr.DisplayName=()=>{var e=Object(C.getLocalization)("(All Columns)","DataAccessStringId.QueryBuilder_AllColumns");return"*"===e.charAt(0)?e:"* "+e};class ${static find(e,t,a){return Object(x.findFirstItemMatchesCondition)(e(),e=>e.column()===a&&e.table()===t)}static findByName(e,t){return Object(x.findFirstItemMatchesCondition)(e(),e=>e.actualName()===t)}static removeDependend(e,t){e.remove(e=>e.isDepended(t))}static toExpresson(e,t,a){e.table=_.observable(null),e.column=_.observable(null),e.expression=e.__expression,e.itemType(A[A.Expression]),e.alias()||e.alias($.setUniqueAlias(t,"Expr")),e.expression(a)}static setUniqueAlias(e,t){return $.findByName(e,t)?Object(x.getUniqueName)(e().map(e=>e.actualName()),t+"_"):t}static createNew(e,t,a,i){a=new Hr({"@Table":a,"@Name":i,"@ItemType":"Column"},e);return e.columns===t&&!a.alias()&&$.findByName(t,a.actualName())&&a.alias(this.setUniqueAlias(t,a.table()+"_"+a.column())),a}static addNew(e,t,a,i,r=!1){e=this.createNew(e,t,a,i);return(r?t():t).push(e),e}static remove(e,t,a,i=!1){if(i){for(var r=0;r<e().length;r++)if(e()[r].column()===a&&e()[r].table()===t)return void e().splice(r,1)}else e.remove(e=>e.column()===a&&e.table()===t)}static columnTypeToFederated(e){switch(e){case A[A.Expression]:return f[f.SelectExpression];case A[A.AllColumns]:return f[f.SelectAllNodeColumnsExpression];case A[A.AllColumnsQuery]:return f[f.SelectAllColumnsExpression];default:return f[f.SelectColumnExpression]}}static federatedTypeToColumn(e){switch(e){case f[f.SelectExpression]:return A[A.Expression];case f[f.SelectAllNodeColumnsExpression]:return A[A.AllColumns];case f[f.SelectAllColumnsExpression]:return A[A.AllColumnsQuery];default:return A[A.Column]}}}var Gr={ReadWrite:"ReadWrite",Read:"Read",Disabled:"Disabled"};function Xr(e){return e.aggregate()!==Vr.None}class Yr{constructor(r,o){this.getItems=t=>{var e,a=T.Deferred(),i=[];return i=""===t.fullPath?o.filterTables(r().tables()).map(Yr._createTableInfo):(e=Object(x.findFirstItemMatchesCondition)(r().tables(),e=>e.actualName()===t.fullPath),o.filterColumns(e&&e.columns()||[]).map(e=>Yr._createColumnInfo(e,o))),a.resolve(i),a.promise()},this.hasParameter=t=>0<r().parameters().filter(e=>e.name()===t).length,this.getColumnInfo=t=>{if(t){var e,a=Object(x.find)(r().tables(),e=>0===t.indexOf(e.actualName()+"."));if(a)return(e=Object(x.find)(o.filterColumns(a.columns()||[]),e=>t===a.actualName()+"."+o.getColumnName(e)))?Yr._createColumnInfo(e,o):null}return null}}static _createTableInfo(e){return{displayName:e.actualName(),name:e.actualName(),isList:!0,specifics:"Default",collapsed:_.observable(!0)}}static _createColumnInfo(e,t){return{displayName:t.getColumnName(e),isList:!1,specifics:t.getSpecifics(e),dataType:t.getDataType(e),name:t.getColumnName(e)}}}Yr.whereClauseObjectsFilter={filterColumns:e=>e,filterTables:e=>e,getColumnName:e=>e.name.peek(),getSpecifics:e=>e.specifics,getDataType:e=>e.dataType.peek()},Yr.groupByObjectsFilter={filterColumns:e=>e.filter(Xr),filterTables:e=>e.filter(e=>e.columns().some(Xr)),getColumnName:e=>e.actualName.peek(),getSpecifics:e=>{switch(e.aggregate()){case Vr.Avg:case Vr.AvgDistinct:return"Float";case Vr.Count:case Vr.CountDistinct:return"Integer";default:return e.specifics}},getDataType:e=>null};class Kr extends P.FilterEditorSerializer{constructor(e){super(),this._columns=e,this._aggregatePropertyName=t=>{var e=this._findAggregatedColumn(e=>e.actualName()===t.propertyName);return e?this._columnDisplayName(e):t.propertyName}}_columnDisplayName(e){return e.table()+"."+e.actualName()}_findAggregatedColumn(t){return Object(x.find)(this._columns(),e=>Xr(e)&&t(e))}serializeOperandProperty(t){var e=this._findAggregatedColumn(e=>t.propertyName===this._columnDisplayName(e));return"["+(e?e.actualName():t.propertyName)+"]"}deserialize(e){e=da.CriteriaOperatorStateMachine.parse(e);return e&&Object(da.criteriaForEach)(e,e=>{e instanceof na.OperandProperty&&(e.propertyName=this._aggregatePropertyName(e))}),super.deserializeOperand(e)}}k=e(11);class Zr extends g{getEditorType(e){return Object(x.IsDataAccessExpression)(e)?{header:"dxqb-expressionstring"}:Object(x.getEditorType)(e)}}class eo extends k.OperandParameterSurface{constructor(e,t,a,i){super(e,t,a,i),this.createParameter=()=>{this.canCreateParameters&&(this.model.parameterName=this.parameterName(),this._createParameter(this.parameterName(),this._parameterType),this.helper.onChange())},this._parameterName=_.observable(""),this.isEditable=_.observable(!1),this.defaultDisplay=eo.defaultDisplay,this._parameterName(_.unwrap(e.parameterName)),this.canCreateParameters=this.helper.canCreateParameters,this.fieldsOptions=t.leftPart.fieldsOptions,this.parameterName=_.pureComputed({read:()=>this._parameterName()||this.canCreateParameters&&eo.defaultDisplay()||"",write:e=>{e!==eo.defaultDisplay()&&e&&(this.model.parameterName=_.unwrap(e),this._parameterName(this.model.parameterName))}}),!this.canCreateParameters||this.isDefaultTextDisplayed()||_.unwrap(this.fieldListProvider).hasParameter(e.parameterName)||this.createParameter()}get _parameterType(){return this.fieldsOptions()&&this.fieldsOptions().selected()&&this.fieldsOptions().selected().dataType||"System.String"}_createParameter(t,e){""!==t&&t!==eo.defaultDisplay()&&0===this.helper.parameters().filter(e=>e.name()===t).length&&(e=new Zr({"@Name":t,"@Type":e}),this.helper.newParameters.push(e))}isDefaultTextDisplayed(){return this.parameterName()===eo.defaultDisplay()}}eo.defaultDisplay=()=>Object(C.getLocalization)("Create new parameter","AnalyticsCoreStringId.FilterEditor_Operand_CreateNewParameter");class to extends k.OperandPropertySurface{constructor(e,t,a,i){super(e,t,a,i)}_updateSpecifics(){to.updateSpecifics(this)}static updateSpecifics(e){var t=_.unwrap(e.fieldListProvider);t&&t.getColumnInfo&&(t=t.getColumnInfo(e.propertyName()))&&(e.specifics(t.specifics.toLowerCase()),e.dataType(t.dataType),e=_.unwrap(e.fieldsOptions))&&e.selected(t)}}class ao extends v.FilterEditorHelper{constructor(e){super(),this.handlers.changeParameter=(e,t)=>({data:new P.FilterEditorAddOn(e,t,"changeParameter","items","dxqb-filtereditor-parameterspopup"),templateName:"dxqb-filtereditor-changeparameter"}),this.mapper.parameter=eo,this.mapper.property=to,e===Gr.ReadWrite&&(this.canCreateParameters=!0,this.newParameters=_.observableArray([]),this.onEditorFocusOut=e=>{if(e){var a=this.newParameters(),i=[];if(Object(da.criteriaForEach)(e,t=>{var e;t instanceof na.OperandParameter&&(e=a.filter(e=>e.name()===t.parameterName)[0])&&i.push(e)}),0===i.length)this.newParameters.splice(0);else{for(var t=a.filter(e=>-1===i.indexOf(e)),r=0;r<t.length;r++){var o=a.indexOf(t[r]);-1!==o&&a.splice(o,1)}this.newParameters.valueHasMutated()}}},this.onClosing=()=>{this.newParameters([])}),this.canSelectLists=!1,this.getDisplayPropertyName=()=>T.Deferred().resolve("").promise()}}var io=ao;function ro(e){io=e}class oo extends v.FilterStringOptions{constructor(e,t,a,i){super(e,t,a,i)}initializeFilterStringHelper(a,i,e){var r,o=new io(i);o.canChoiceParameters=i!==Gr.Disabled,e&&(o.serializer=e),i===Gr.ReadWrite?(o.parameters=_.computed(()=>[].concat(a(),o.newParameters())),o.onSave=e=>{var t=o.newParameters();a.push.apply(a,t),o.newParameters([])}):(i===Gr.Read&&(o.parameters=a),r=o.criteriaTreeValidator._checkRightPart,o.criteriaTreeValidator._checkRightPart=e=>{var t;return e instanceof na.OperandParameter?i!==Gr.Disabled&&(i===Gr.Read?(t=e.parameterName,0!==a.peek().filter(e=>e.name()===t).length):void 0):r.apply(this,[e])}),this.helper=o}}var so=[{propertyName:"_tablesObject",modelName:"Tables",info:[{propertyName:"tables",modelName:"SelectedTables",array:!0},{propertyName:"relations",modelName:"Relations",array:!0}]},{propertyName:"parameters",modelName:"Parameters",array:!0},{propertyName:"type",modelName:"@Type"},{propertyName:"name",modelName:"@Name"},{propertyName:"editableName",displayName:"Name",localizationId:"DevExpress.DataAccess.Sql.SqlQuery.Name",editor:b.getEditor("text")},{propertyName:"_filterString",modelName:"Filter",defaultVal:""},{propertyName:"filterString",defaultVal:"",displayName:"Filter",localizationId:"DataAccessUIStringId.FiltersView_Filter",editor:b.getEditor("filterEditor")},{propertyName:"_groupFilterString",modelName:"GroupFilter",defaultVal:""},{propertyName:"groupFilterString",defaultVal:"",displayName:"Group Filter",localizationId:"DataAccessUIStringId.FiltersView_GroupFilter",editor:b.getEditor("filterGroupEditor")},{propertyName:"columns",modelName:"Columns",array:!0},{propertyName:"sorting",modelName:"Sorting",array:!0},{propertyName:"grouping",modelName:"Grouping",array:!0},{propertyName:"itemType",modelName:"@ItemType"},{propertyName:"allColumnsInTablesSelected",displayName:"Select All (*)",localizationId:"AnalyticsCoreStringId.QueryBuilder_SelectAll",editor:b.getEditor("bool")},{propertyName:"top",modelName:"@Top",displayName:"Select Top",defaultVal:0,from:C.floatFromModel,localizationId:"AnalyticsCoreStringId.QueryBuilder_SelectTop",editor:b.getEditor("numeric"),editorOptions:{format:"#0",min:0}},{propertyName:"skip",modelName:"@Skip",displayName:"Offset",defaultVal:0,from:C.floatFromModel,localizationId:"AnalyticsCoreStringId.QueryBuilder_Offset",editor:b.getEditor("numeric"),editorOptions:{format:"#0",min:0}},{propertyName:"distinct",modelName:"@Distinct",defaultVal:!1,from:C.parseBool,displayName:"Select distinct",localizationId:"AnalyticsCoreStringId.QueryBuilder_SelectDistinct",editor:b.getEditor("bool")}];class no extends ca{constructor(e,t,a,i){super(Object(x.extend)({"@ControlType":"Column"},e),a,i),this.isNotAvailable=_.observable(!1),this._type=_.observable(d.Unknown),this._size=_.observable(""),t.size&&this._size(t.size),t.type&&this._type(t.type),this.displayType=_.pureComputed(()=>d[this._type()]+(this._size()?"("+this._size()+")":"")),this.dataType=_.pureComputed(()=>we.GetType(this._type())),this.actualName=_.pureComputed(()=>this.alias()||this.name());var e=a.getColumnConnectionPoints(this),r=(this.rightConnectionPoint={side:_.observable(p.East),location:e.right},this.leftConnectionPoint={side:_.observable(p.West),location:e.left},a.parentModel()),o=_.pureComputed(()=>$.find(r.columns,a.actualName(),this.name())),s=(this.aggregate=_.pureComputed({read:()=>o()?o().aggregate():Vr.None,write:e=>{o()&&o().aggregate(e)}}),this.alias=_.pureComputed({read:()=>o()?o().alias():"",write:e=>{o()&&o().alias(e||null)}}),_.pureComputed(()=>$.find(r.sorting,a.actualName(),this.name()))),n=(this.sortingType=_.computed({read:()=>s()?s().descending()?"Descending":"Ascending":"Unsorted",write:e=>{"Unsorted"!==e?(s()?s():$.addNew(r,r.sorting,a.actualName(),this.name())).descending("Descending"===e):s()&&$.remove(r.sorting,a.actualName(),this.name())}}),this.sortOrder=_.computed({read:()=>{var e=r.sorting().indexOf(s());return e<0?void 0:e+1},write:e=>{var t;s()&&(e=Math.min(e,r.sorting().length),e=Math.max(e,1),t=r.sorting().indexOf(s()),t=r.sorting.splice(t,1),r.sorting.splice(e-1,0,t[0]))}}),_.computed(()=>$.find(r.grouping,a.actualName(),this.name())));this.aggregate.subscribe(e=>{var t=this.parentModel();e!==Vr.None?(this.groupBy(!1),this.alias()&&!this._isAliasAutoGenerated(t.actualName())||(e=this.name()+"_"+e,this.alias($.setUniqueAlias(r.columns,e)))):this._isAliasAutoGenerated(t.actualName())&&this.alias(null)}),this.groupBy=_.computed({read:()=>!!n(),write:e=>{e?($.addNew(r,r.grouping,a.actualName(),this.name()),this.aggregate(Vr.None)):$.remove(r.grouping,a.actualName(),this.name())}}),this.toggleSelected=(e,t=!1)=>{!!o()!==e&&(e?$.addNew(r,r.columns,a.actualName(),this.name(),t):($.remove(r.columns,a.actualName(),this.name(),t),this.groupBy(!1)))},this.selected=_.pureComputed({read:()=>!!o(),write:e=>this.toggleSelected(e)})}_isAliasAutoGenerated(e){return!(!e||!this.alias()||0!==this.alias().indexOf(e+"_")||this.alias().substring(e.length+1)!==this.name())||!(!this.alias()||0!==this.alias().indexOf(this.name()+"_"))&&((e=this.alias().substring(this.name().length+1)).match(new RegExp("_[0-9]+$"))&&(e=e.substring(0,e.indexOf("_"))),0<Object.keys(Vr).indexOf(e))}getInfo(){return Wr}isPropertyDisabled(e){return!!this.isNotAvailable()||("sortOrder"===e?"Unsorted"===this.sortingType():"aggregate"===e||"alias"===e?!this.selected():"groupBy"===e&&(e=this.root,this.aggregate())&&1===e.aggregatedColumnsCount())}get specifics(){return we.GetSpecific(this.dataType())}}var lo=[Ut,Ht,{propertyName:"controlType",modelName:"@ControlType"},{propertyName:"itemType",modelName:"@ItemType"}];class z extends ca{constructor(e,t,a){super(e,t,a),this.serializer=a,this._columnsConnectionPointLeftX=_.pureComputed(()=>this.location.x()),this._columnsConnectionPointRightX=_.pureComputed(()=>this.location.x()+this.size.width()),this._columns=_.observableArray(),this._initialized=_.observable(!1),this.tableOffset=_.observable(0),this.size=new h.Size(199,123),this.location=new h.Point(0,0),this.isReady=_.observable(!1),this.allColumnsSelected=_.computed({read:()=>{var e=this.columns().filter(e=>e.selected());return 0!==e.length&&e.length===this._columns.peek().length},deferEvaluation:!0}),this.isInitialized=_.pureComputed(()=>this._initialized()),this.itemType="Table",this.controlType="Table",this._disposables.push(this.size.height=_.pureComputed({read:()=>0===this._columns().length?z.TABLE_DEFAULT_HEIGHT+this.tableOffset():z.COLUMNS_OFFSET+(z.COLUMN_HEIGHT+z.COLUMN_MARGIN)*(this._columns().length+1)+this.tableOffset(),write:()=>{}})),this.asterisk=new Jr(this,this.serializer),this._disposables.push(this.actualName=_.pureComputed(()=>this.alias()||this.name()))}columns(){return this._columns()}toggleSelectedColumns(){var t=!this.allColumnsSelected.peek(),e=this.parentModel();this._columns.peek().forEach(e=>e.toggleSelected(t,!0)),e.columns.valueHasMutated()}getColumnConnectionPoints(t){var e=_.pureComputed({read:()=>{var e=this._columns.indexOf(t)+1;return this.location.y()+z.COLUMNS_OFFSET+z.COLUMN_MARGIN*e+z.COLUMN_HEIGHT*(e+.5)+this.tableOffset()},deferEvaluation:!0});return this._disposables.push(e),{left:{x:this._columnsConnectionPointLeftX,y:e},right:{x:this._columnsConnectionPointRightX,y:e}}}getInfo(){return lo}getInvalidColumns(){return this.columns().filter(e=>e.isNotAvailable()&&e.selected())}getColumn(e){return Object(x.getFirstItemByPropertyValue)(this._columns(),"name",e)}_initColumns(e,t=!1){var a=[];e.forEach(e=>{a.push(this.createChildColumn(e))}),this._columns(t?[].concat([],this.columns(),a):a)}createChildColumn(e){return new no({"@Name":e.name},e,this,this.serializer)}createColumns(a){var i=0;this.columns().forEach(t=>{var e=a.columns.filter(e=>e.name===t.name())[0];e?(t._type(e.type),t._size(e.size)):(t.isNotAvailable(a.columns.every(e=>e.name!==t.name())),i++)}),this.columns().length-i<a.columns.length&&this._initColumns(a.columns.filter(t=>this.columns().every(e=>e.name()!==t.name)),!0),this._initialized(!0)}}z.COLUMNS_OFFSET=37,z.COLUMN_HEIGHT=32,z.COLUMN_MARGIN=1,z.TABLE_MIN_WIDTH=80,z.TABLE_DEFAULT_HEIGHT=136;class co extends ca{constructor(e,t,a=Gr.ReadWrite,i,r){super(e,null,r),this.topOffset=65,this._findAncestorsRelations=t=>{var a={inner:0,outer:0,relations:[]};return this.relations().forEach(e=>{e.nestedTable()===t&&(a.relations.push(e),"LeftOuter"===e.joinType()?a.outer++:a.inner++,e=this._findAncestorsRelations(e.parentTable()),a.inner+=e.inner,a.outer+=e.outer,a.relations.push.apply(a.relations,e.relations))}),a},this.aggregatedColumnsCount=_.observable(0),this.defaultPageHeight=500,this.defaultPageWidth=500,this.dbSchemaProvider=t,this.onSave=i,this.editableName=_.observable(this.name()),this._disposables.push(this.name=_.pureComputed({read:this.editableName,write:e=>{}}));var o=_.observable(0),s=(this._disposables.push(this.pageWidth=_.pureComputed({read:()=>{var t=this.defaultPageWidth;return this.tables().forEach(e=>{e=e.location.x()+e.size.width();t<e&&(t=e)}),Math.max(o(),t)},write:e=>{o(e)}})),this._disposables.push(this.pageHeight=_.pureComputed(()=>{var t=this.defaultPageHeight;return this.tables().forEach(e=>{e=e.location.y()+e.size.height();t<e&&(t=e+uo.pageMargin)}),t})),this.margins=h.Margins.fromString(),this._disposables.push(this.isValid=_.pureComputed(()=>this._validate())),e=>!e.table()&&e.itemType()===A.AllColumns);this._disposables.push(this.allColumnsInTablesSelected=_.pureComputed({read:()=>this.columns().some(s),write:e=>{e?this.columns.push(new Hr({"@ItemType":"AllColumns"},this,r)):this.columns.remove(s)}})),this.sorting||(this.sorting=_.observableArray([])),this.grouping||(this.grouping=_.observableArray([]))}_initializeTable(t){this.dbSchemaProvider.getDbTable(t.name()).done(e=>{t.createColumns(e)})}_addColumnsToTable(e,t){e._initColumns(t.map(e=>new we({Name:e.column()})))}dispose(){super.dispose(),this.onSave=null}addChild(e){e instanceof ha?-1<this.relations.indexOf(e)||(e.parentModel(this),this.relations.push(e)):e instanceof z?-1<this.tables.indexOf(e)||(e.parentModel(this),null!==Object(x.getFirstItemByPropertyValue)(this.tables(),"actualName",e.name())&&e.alias(Object(x.getUniqueName)(this.tables().map(e=>e.actualName()),e.name()+"_")),this.tables.push(e)):Object(x.NotifyAboutWarning)("Attempt to add wrong child control.")}removeChild(t){if(t instanceof ha){if(!(this.relations().length<1)){for(var e=t,a=this.relations().indexOf(e);0<e.conditions().length;)e.conditions.pop();this.relations.splice(a,1)}}else if(t instanceof z){if(!(this.tables().length<1)){this.tables.splice(this.tables().indexOf(t),1);for(var i=this.relations(),r=i.length-1;-1<r;r--)i[r].parentTable()!==t&&i[r].nestedTable()!==t||this.removeChild(i[r]);this.sorting.remove(e=>e.isDepended(t.actualName())),this.grouping.remove(e=>e.isDepended(t.actualName())),this.columns.remove(e=>e.isDepended(t.actualName()))}}else Object(x.NotifyAboutWarning)("Attempt to remove wrong child control.")}validateRelations(){var e=this.tables().map(e=>e.actualName());return this._validateTable(e,e[0]),e.length<1}_validate(){return 0!==this.tables().length&&!!(this.allColumnsInTablesSelected()||0<this.columns().length)&&this.validateRelations()}_validateTable(t,a){var e=t.indexOf(a);e<0||(t.splice(e,1),this.relations().map(e=>e.parentTableName()===a?e.nestedTableName():e.nestedTableName()===a?e.parentTableName():null).forEach(e=>this._validateTable(t,e)))}createChild(e,t,a){return t?(this._initializeTable(t),this.addChild(t),t):super.createChild(e)}init(){this.tables().forEach(a=>{var i=[],e=this.sorting&&this.sorting()||[],t=this.grouping&&this.grouping()||[];[this.columns(),e,t].forEach(e=>{e.forEach(t=>{a.name()===t.table()&&t.itemType()===A.Column&&i.every(e=>e.column()!==t.column())&&i.push(t)})}),this._addColumnsToTable(a,i),this._initializeTable(a)}),this.tables().reduce((e,t)=>(t.location.x(e),t.location.y(this.topOffset),e+t.size.width()+t.size.width()/2),30);var a=!1;this._disposables.push(_.computed(()=>{var e,t;a||(a=!0,t=(e=this.getAllColumns()).filter(e=>e.aggregate()===Vr.None),this.aggregatedColumnsCount(e.length-t.length),e.length!==t.length?t.filter(e=>e.selected()&&!e.groupBy.peek()).forEach(e=>e.groupBy(!0)):e.every(e=>!e.selected.peek()||e.groupBy.peek())||e.forEach(e=>{e.groupBy.peek()&&e.groupBy(!1)}),a=!1)}))}getTable(t){return Object(x.findFirstItemMatchesCondition)(this.tables(),e=>e.actualName()===t)}canSave(e=!0){var a=[];return this.tables().forEach(t=>{t.getInvalidColumns().forEach(e=>{a.push(Object(x.formatUnicorn)(Object(C.getLocalization)('The schema does not contain the following column: "{0}"."{1}".',"DataAccessStringId.ColumnNotInSchemaValidationException"),t.actualName(),e.actualName()))})}),!(0<a.length&&(e&&Object(x.ShowMessage)(a.join("\n"),"error"),1))}save(){var e;if(this.canSave())return e=this.serialize(!0),this.onSave&&this.onSave(e),e}serialize(e=!1){return e?{Query:this.serialize()}:(new C.ModelSerializer).serialize(this)}_findTableInAncestors(t,a){return this.relations().some(e=>e.nestedTable()===t&&(e.parentTable()===a||this._findTableInAncestors(e.parentTable(),a)))}_findHead(t){var a=null;return this.relations().some(e=>!!(a=e.nestedTable()===t?e:a)),a?this._findHead(a.parentTable()):t}_isHead(t){return!this.relations().some(e=>e.nestedTable()===t)}_reverseRelations(e,t){t.forEach(e=>{var t=e.parentTable();e.parentTable(e.nestedTable()),e.nestedTable(t),e.conditions().forEach(e=>{var t=e.parentColumnName();e.parentColumnName(e.nestedColumnName()),e.nestedColumnName(t)})})}getAllColumns(){return[].concat.apply([],this.tables().map(e=>e.columns()))}cerateJoinCondition(t,a){var i,e,r,o,s=t.parentModel(),n=a.parentModel();return s===n?null:(i=!1,(e=Object(x.findFirstItemMatchesCondition)(this.relations(),e=>(i=e.parentTable()===n&&e.nestedTable()===s,e.parentTable()===s&&e.nestedTable()===n||i)))||(this._findTableInAncestors(s,n)?i=!0:this._findHead(s)===this._findHead(n)||this._isHead(n)||(o=this._findAncestorsRelations(s),r=this._findAncestorsRelations(n),o.outer>r.outer?this._reverseRelations(n,r.relations):o.outer<r.outer?(this._reverseRelations(s,o.relations),i=!0):o.inner>=r.inner?this._reverseRelations(n,r.relations):o.inner<r.inner&&(this._reverseRelations(s,o.relations),i=!0))),i&&(r=s,s=n,n=r,o=t,t=a,a=o),e=e||this.createChild({"@ControlType":"Relation","@Parent":s.actualName(),"@Nested":n.actualName(),"@Type":"Inner"}),Object(x.findFirstItemMatchesCondition)(e.conditions(),e=>e.parentColumn()===t&&e.nestedColumn()===a)||e.createChild({"@ControlType":"JoinCondition","@Parent":t.name(),"@Nested":a.name()}))}tryToCreateRelationsByFK(e){}}co.pageMargin=20;class uo extends co{constructor(e,t,a=Gr.ReadWrite,i,r){super(Object(x.extend)(!0,e,uo.emptyModel,e),t,a,i,r),this.controlType="Query",this.type("SelectQuery"),this.tables=Object(C.deserializeArray)(e.Tables.SelectedTables,e=>new z(e,this,r)),this.columns=Object(C.deserializeArray)(e.Columns,e=>new Hr(e,this,r)),this.sorting=Object(C.deserializeArray)(e.Sorting,e=>new Hr(e,this,r)),this.grouping=Object(C.deserializeArray)(e.Grouping,e=>new Hr(e,this,r)),this.relations=Object(C.deserializeArray)(e.Tables.Relations,e=>new ha(e,this,r)),this.init(),this._tablesObject.tables=this.tables,this._tablesObject.relations=this.relations;var o=Object(C.deserializeArray)(e.Parameters,e=>new Zr(e,r));a===Gr.ReadWrite?(this.parameters=o,this._disposables.push(this.parameters.subscribe(e=>{e.forEach(t=>{"added"!==t.status||t.value.name()||t.value.name(Object(x.getUniqueName)(this.parameters().filter(e=>e!==t.value).map(e=>e.name()),"parameter"))})},null,"arrayChange"))):this._disposables.push(this.parameters=_.computed(()=>o())),this.filterString=new oo(this._filterString,null,_.pureComputed(()=>0===this.tables().length&&this.filterString&&0===this.filterString.value().length)),this.filterString.initializeFilterStringHelper(this.parameters,a),this.groupFilterString=new oo(this._groupFilterString,null,_.pureComputed(()=>!this.columns().some(Xr)&&this.groupFilterString&&0===(this.groupFilterString.value()||"").length)),this.groupFilterString.initializeFilterStringHelper(this.parameters,a,new Kr(this.columns))}isPropertyDisabled(e){return"skip"===e&&0===this.skip()&&!this.sorting().length}getInfo(){return so}createChild(e){return super.createChild(e,"Table"===e["@ControlType"]?new z(e,this):void 0)}tryToCreateRelationsByFK(o){this.dbSchemaProvider.getDbSchema().done(t=>{var e=t.tables.filter(e=>e.name===o.name())[0];e&&e.foreignKeys.forEach(e=>{var t=Object(x.getFirstItemByPropertyValue)(this.tables.peek(),"name",e.primaryKeyTable);if(t)for(var a=0;a<e.primaryKeyColumns.length;a++){var i=Object(x.getFirstItemByPropertyValue)(o.columns(),"name",e.columns[a]),r=Object(x.getFirstItemByPropertyValue)(t.columns(),"name",e.primaryKeyColumns[a]);i&&r&&this.cerateJoinCondition(i,r)}}),this.tables.peek().forEach(r=>{var e=t.tables.filter(e=>e.name===r.name())[0];e&&e.foreignKeys.forEach(e=>{if(e.primaryKeyTable===o.name())for(var t=0;t<e.primaryKeyColumns.length;t++){var a=Object(x.getFirstItemByPropertyValue)(o.columns(),"name",e.primaryKeyColumns[t]),i=Object(x.getFirstItemByPropertyValue)(r.columns(),"name",e.columns[t]);a&&i&&this.cerateJoinCondition(i,a)}})})})}}uo.emptyModel={"@ItemType":"Query",Tables:{SelectedTables:{},Relations:{}},Columns:{},Sorting:{},Grouping:{}};class po extends h.SurfaceElementBase{constructor(e,t=_.observable(1)){super(e,{measureUnit:_.observable("Pixels"),zoom:t,dpi:_.observable(100)},po._unitProperties),this.placeholder=()=>Object(C.getLocalization)("Drop a table or view here to create a query.","AnalyticsCoreStringId.QueryBuilder_SurfacePlaceholder"),this.tables=_.observableArray(),this.relations=_.observableArray(),this.allowMultiselect=!1,this.focused=_.observable(!1),this.selected=_.observable(!1),this.underCursor=_.observable(new x.HoverInfo),this.templateName="dx-query-surface",this.rtl=_.observable(!1),this.measureUnit=this._context.measureUnit,this.dpi=this._context.dpi,(this._context=this).margins={bottom:this._bottom,left:this._left,right:this._right,top:this._top},this.zoom=t,Object(x.createObservableArrayMapCollection)(e.tables,this.tables,this._createSurface),Object(x.createObservableArrayMapCollection)(e.relations,this.relations,this._createSurface),this._joinedColumns=_.computed(()=>{var t=[];return this.relations().forEach(e=>{e.conditions().forEach(e=>{e=e.getControlModel();e.parentColumn()&&t.push(e.parentColumn()),e.nestedColumn()&&t.push(e.nestedColumn())})}),t})}checkParent(e){return!1}getChildrenCollection(){return this.tables}isJoined(e){return-1<this._joinedColumns().indexOf(e.getControlModel())}}po._unitProperties={_width:e=>e.pageWidth,_height:e=>e.pageWidth,pageWidth:e=>e.pageWidth,pageHeight:e=>e.pageHeight,_bottom:e=>e.margins.bottom,_left:e=>e.margins.left,_right:e=>e.margins.right,_top:e=>e.margins.top};class ho extends h.SurfaceElementBase{constructor(e,t,a){super(e,t,Object(x.extend)({},ho._unitProperties,a)),this.template="dx-diagram-element",this.selectiontemplate="dx-diagram-element-selection",this.contenttemplate="dx-diagram-element-content",this.margin=_.observable(0)}}ho._unitProperties={_height:e=>e.size.height,_width:e=>e.size.width,_x:e=>e.location.x,_y:e=>e.location.y};class mo extends h.SurfaceElementBase{constructor(e,t){super(e,t,null),this.template="dxqb-table-field",this.toggleSelected=()=>{this.getControlModel().selected(!this.getControlModel().selected())},this.selectedWrapper=_.pureComputed(()=>this.getControlModel().selected()),this.isNotAvailable=_.pureComputed(()=>this._control.isNotAvailable()),this.isAggregate=_.pureComputed(()=>Xr(this.getControlModel())),this.isAscending=_.pureComputed(()=>"Ascending"===this.getControlModel().sortingType()),this.isDescending=_.pureComputed(()=>"Descending"===this.getControlModel().sortingType()),this.cssClasses=(e,t,a)=>(this._isJoined||(this._isJoined=_.pureComputed(()=>e.isJoined(this)||this.getControlModel()===t.getDragColumn())),this._isHovered||(this._isHovered=_.pureComputed(()=>{var e=!!t.getDragColumn()&&this.getControlModel().parentModel()!==t.getDragColumn().parentModel();return this.underCursor().isOver&&(!x.DragDropHandler.started()||e)})),{"dxd-state-invalid":this.isNotAvailable,"dxd-state-active":this.selected(),"dxd-state-joined":this._isJoined,"dxd-state-hovered":this._isHovered})}}class go extends h.SurfaceElementBase{constructor(e,t){super(e,t,null),this.template="dxqb-table-asterisk-field",this.toggleSelected=()=>{this.getControlModel().selected(!this.getControlModel().selected())},this.selectedWrapper=_.pureComputed(()=>this.getControlModel().selected()),this.isOverAsterisk=_.pureComputed(()=>this.underCursor().isOver&&!x.DragDropHandler.started()),this.cssClasses=()=>({"dxd-state-active":this.selected,"dxd-state-hovered":this.isOverAsterisk()})}}class bo extends ho{constructor(e,t){super(e,t,null),this.showSourceName=!1,this.contenttemplate="dxqb-table",this.titletemplate="dxqb-table-title",this.template="dxqb-table-main",this.toggleSelected=()=>{this.getControlModel().toggleSelectedColumns()},this.selectedWrapper=_.pureComputed(()=>this.getControlModel().allColumnsSelected()),this.isInitialized=e.isInitialized,this.columns=_.pureComputed(()=>e.columns().map(e=>new mo(e,t))),this.asterisk=new go(e.asterisk,t)}resizable(e,t){return Object(x.extend)({},e,{handles:"e,w",$selectedNodes:T.fn.constructor(t),minWidth:z.TABLE_MIN_WIDTH})}}class fo extends no{constructor(e,t,a,i){super(e,t,a,i)}getInfo(){return aa}}class yo extends Jr{constructor(e,t){super(e,t)}getInfo(){return[Ut]}}var So=[{propertyName:"name",modelName:"@Alias"},{propertyName:"type",modelName:"@Type"},{propertyName:"itemType",modelName:"@ItemType"},{propertyName:"queryType",modelName:"@QueryType"},{propertyName:"rootModel",modelName:"Root"},{propertyName:"expressions",modelName:"Expressions",array:!0},{propertyName:"subNodes",modelName:"SubNodes",array:!0}];class vo extends co{constructor(t,e,a,i=Gr.ReadWrite,r){super(Object(x.extend)(!0,t,vo.emptyModel,t),a,i,e=>e,r),this._dbSchemaProvider=a,this.serializer=r,this.expressions=_.observableArray(),this.subNodes=_.observableArray(),this.controlType="FQuery",this.defaultPageHeight=300,this.topOffset=20,this.dataSource=e;i=[];this.tables=_.observableArray(),t.Root&&this.tables.push(this._createTableViewModel(t.Root)),this.tables.push(...Object.keys(t.SubNodes).map(e=>this._createTableViewModel(t.SubNodes[e].Query))),i.push(...Object.keys(t.SubNodes).map(e=>new ga(t.SubNodes[e],r).createRelationModel(this))),this.columns=Object(C.deserializeArray)(t.Expressions,e=>new Hr({"@Name":e["@Name"],"@Alias":e["@Alias"],"@Table":e["@NodeAlias"],"#text":e["@ColumnExpression"],"@ItemType":$.federatedTypeToColumn(e["@ExpressionType"])},this,r)),this.relations=_.observableArray(i),this.init()}_initializeTable(t){this._dbSchemaProvider.getDbTable(t.name(),t.path).done(e=>{t.createColumns(e)})}_createTableViewModel(e){var t=this.dataSource.getPathFromQueryName(e["@SourceName"]);return new _o(e,this,t,this.serializer)}dispose(){super.dispose(),this.dataSource=null}serialize(e){var a=this.serializer||new C.ModelSerializer,t=(this.expressions(this.columns().map(e=>{var t={"@Alias":e.alias(),"@ColumnExpression":e.expression(),"@Name":e.column(),"@NodeAlias":e.table()};return t["@ExpressionType"]=$.columnTypeToFederated(e.itemType()),new ia(t,a)})),this.rootModel(this.tables()[0]),this.tables()),i=(t.shift(),this.relations());return this.subNodes(t.map(t=>{var e=(e=Object(x.findFirstItemMatchesCondition)(i,e=>e.nestedTable()===t))||Object(x.findFirstItemMatchesCondition)(i,e=>e.parentTable()===t);return i.splice(i.indexOf(e),1),ga.deserializeRelationModel(t,e)})),super.serialize(e)}createChild(e,t,a){return super.createChild(e,"FTable"===e["@ControlType"]?new _o(e,this,a):void 0)}cerateJoinCondition(e,t){var a=e.parentModel(),i=t.parentModel();return this.tables().indexOf(a)>this.tables.indexOf(i)?null:super.cerateJoinCondition(e,t)}getInfo(){return So}}vo.emptyModel={"@ItemType":"Query",SubNodes:{},Expressions:{}};class xo extends po{}class _o extends z{constructor(e,t,a,i){super(e,t,i),this.controlType="FTable",a&&!e["@SourceName"]&&this.sourceName(t.dataSource.getQueryNameFromPath(a)),this.name()||this.name(this.sourceName()),this.alias()||this.alias(this.name()),this._disposables.push(this.queryType=_.pureComputed(()=>c[c.SourceNode])),this.tableOffset(12);var r=a.split("."),i=t.dataSource.dataSources().filter(e=>e.id===r[0]||e.ref===r[0]||e.name===r[0])[0];this.path=(i.id||i.ref)+(1<r.length?"."+r.slice(1).join("."):""),this.displaySourceName=_.observable(i.name),this.asterisk=new yo(this,this.serializer)}getInfo(){return ea}getPath(){return this.path}createChildColumn(e){return new fo({"@Name":e.name},e,this,this.serializer)}}class Co extends bo{constructor(){super(...arguments),this.titletemplate="dxqb-federation-table-title"}}class To extends P.TreeListController{constructor(e,t){super(),this.dragDropHandler=e,this.dblClickHandler=t}itemsFilter(e,t,a){return"none"!==e.specifics}isDraggable(e){if(!e.data||!e.data.isListType&&!1!==e.data.isSupportQueries)return!1;for(var t=e.parent;t&&t.data;){if(t.data.isListType)return!1;t=t.parent}return!0}}class Po extends To{itemsFilter(e,t,a){return super.itemsFilter(e,t,a)&&e.isList}hasItems(e){return super.hasItems(e)&&(!e.isListType||!1===e.isSupportQueries)}}class No extends P.PopupEditorBase{constructor(e,t,a=!1,i){super(),this.onSaveCallback=e,this._dataSource=t,this.rtl=a,this.onCloseCallback=i,this.selectedPath=_.observable(),this.title=()=>Object(x.getLocalization)("Query Builder","DataAccessUIStringId.QueryBuilder"),this.getPopupContainer=x.getParentContainer,this.loaded=_.observable(!1),this.maxHeight="90%",this.width="900px",this.height="710px",this.cssClass="dxrd-querybuilder-federation-popup-wrapper",this.resultGridHeight=_.observable(250),this.dragDropHandler=new x.WizardDragDropHandler({dragHelperContent:new x.DragHelperContent(null),parent:".dx-designer-viewport .dxrd-querybuilder-federation-popup-wrapper > .dx-popup-normal",containment:".dxrd-querybuilder-federation-popup",target:this.popupTarget(),addHandler:(e,t,a)=>{(e&&e instanceof No||e instanceof po)&&this.addDataMember(t,a)}});var r=new To(this.dragDropHandler,e=>r.isDraggable(e)&&this.addDataMember(e));this.fieldListModel={itemsProvider:this._dataSource.dbSchemaProvider,treeListController:r,selectedPath:this.selectedPath,pageSize:100,expandRootItems:!0,onItemsChanged:e=>{e.forEach(e=>{e.parent&&r.isDraggable(e.parent)&&e.parent.data.isListType&&e.parent.collapsed(!0)})},rtl:a},this._disposables.push(this.dragDropHandler,r),this._aliasValidationRule={type:"custom",validationCallback:e=>!e.value||this._aliasValidationCallback(e.value,e.data),get message(){return Object(x.getLocalization)("Alias is not unique","DataAccessUIStringId.FederationDataSourceQueryBuilder_AliasUniqueMessage")}},this.resizeHelper=new P.ResizeHelper}_aliasValidationCallback(e,t){return!0}dispose(){super.dispose(),this.fieldListModel=null,this.onSaveCallback=null,this._dataSource=null}addDataMember(e,t){}save(){this.close()}close(){this.onCloseCallback&&this.onCloseCallback(),this.popupVisible(!1)}popupTarget(){return".dxrd-result-source-grid"}onHiding(){}}class Oo{constructor(e,t){this.provider=e,this.tables=t}getItems(e){var t,a=T.Deferred();return""===e.path?a.resolve(this.tables().map(e=>({name:e.actualName(),displayName:e.actualName(),isList:!0,specifics:"List",dragData:{noDragable:!1}}))):((t=e.fullPath.split(".")).shift(),(e=Object(x.findFirstItemMatchesCondition)(this.tables(),e=>e.actualName()===t.join(".")))&&this.provider.getItems(new C.PathRequest(e.path)).done(e=>a.resolve(e))),a.promise()}}class wo extends No{constructor(e,t,a=!1,i){super(e,t,a,i),this.popupContentTemplate="dxrd-querybuilder-select-popup-content",this._querySource=_.observable(null),this.designer=_.observable(null),this.joinResultCollapsed=_.observable(!1),this.width="90%",this.height="90%",this.cssClass="dxrd-querybuilder-federation-popup-wrapper dxrd-querybuilder-select-federation-popup",this._qbOptions={queryBuilderModel:this.designer,dataSource:t,dbSchemaProvider:_.observable(t.dbSchemaProvider),showPropertyGridCondition:e=>"JoinCondition"===e.controlType||"FTable"===e.controlType||"Column"===e.controlType,querySource:this._querySource};var r=[{name:"DataSource",needPrefix:!(this.queryBuilderSurfaceCreator={options:this._qbOptions,creator:e=>new vo(e.querySource(),e.dataSource,e.dbSchemaProvider(),e.parametersMode,new C.ModelSerializer)}),rootPath:"Root"}],o=(this.allColumns=_.pureComputed(()=>{var t,a=[];return this._getQuery()&&(t="",a.push({column:Jr.DisplayName(),table:t,key:f[f.SelectAllColumnsExpression]}),this._getQuery().getAllColumns().map(e=>{var t=e.parentModel();return{column:e.name(),table:t.actualName(),key:this._generateKey(t.actualName(),e.name(),e.actualName(),e.alias())}}).forEach(e=>{e.table&&t!==e.table&&a.push({column:Jr.DisplayName(),table:e.table,key:e.table+"_"+f[f.SelectAllNodeColumnsExpression]}),t=e.table,a.push(e)})),a}),this.columnsExpressions=_.pureComputed(()=>this._getQuery()&&this._getQuery().columns().map((e,t)=>{var a,i;return e.actualName()&&(a=this._generateKey(e.table(),e.column(),e.actualName(),e.alias())),e.itemType()===A[A.Column]?i=e.column():e.itemType()===A[A.Expression]?i=e.expression():e.itemType()===A[A.AllColumns]?(a=e.table()+"_"+f[f.SelectAllNodeColumnsExpression],i=Jr.DisplayName()):e.itemType()===A[A.AllColumnsQuery]&&(a=f[f.SelectAllColumnsExpression],i=Jr.DisplayName()),{alias:e.alias(),key:a,index:t,column:i,table:e.table(),isExpression:_.observable(e.itemType()===A[A.Expression]),expression:e.expression}})),this._disposables.push(this.columnsExpressions,this.allColumns),(e,t)=>{var a=T.fn.constructor(e),t=this._bindingContext.createChildContext({allColumns:this.allColumns,itemsProvider:new Oo(this._dataSource.dbSchemaProvider,this._getQuery().tables),cellInfo:t.data,expression:{value:t.data.expression,onContentReady:this._onContentReady,path:_.observable(r[0].name),customizeCategories:()=>{},rootItems:r,functions:Object(P.functionDisplay)().filter(e=>"Aggregate"!=e.category)},isExpression:t.data.isExpression||_.observable(!1),changeColumn:e=>{this._changeColumn(e.selectedRowsData[0],e.model.cellInfo.index)},switchEditors:e=>{this._switchEditors(e.model.cellInfo)}}),i=document.createElement("div"),a=a.append(i);_.renderTemplate("dxrd-querybuilder-column-combobox",t,{},i,"replaceNode"),Object(x.addDisposeCallback)(e,function(){a=null})});this._disposables.push(this.addRowDisabled=_.pureComputed(()=>!this._getQuery()||0===this._getQuery().tables().length)),this.columnsGrid={rtlEnabled:a,dataSource:this.columnsExpressions,disabled:this.addRowDisabled,showRowLines:!0,height:"100%",showBorders:!0,editing:{allowUpdating:e=>!(e.row&&e.row.data.key&&this._isSelectAllItemByKey(e.row.data.key)),newRowPosition:"last",mode:"cell",texts:{confirmDeleteMessage:""}},paging:{enabled:!1},columns:[{dataField:"column",get caption(){return Object(x.getLocalization)("Column Name","DataAccessUIStringId.QueryBuilderColumns_ColumnName")},cssClass:"dx-editor-cell",editCellTemplate:o,cellTemplate:(e,t)=>{if(t.data.key&&this._isSelectAllItemByKey(t.data.key))return o(e,t);var a=Object(v.getTemplate)("dxrd-querybuilder-column-combobox-masked"),e=T.fn.constructor(e).append(a),a={cellInfo:t.data,isExpression:t.data.isExpression||_.observable(!1),switchEditors:()=>null};_.applyBindings(a,e[0])}},{dataField:"table",get caption(){return Object(x.getLocalization)("Table Name","DataAccessUIStringId.QueryBuilderColumns_TableName")},allowEditing:!1},{dataField:"alias",get caption(){return Object(x.getLocalization)("Alias","DataAccessUIStringId.QueryBuilderColumns_Alias")},disabled:!0,validationRules:[this._aliasValidationRule,{type:"custom",validationCallback:e=>{if(""===e.value&&e.data&&e.data.key){e=$.findByName(this._getQuery().columns,e.data.key);if(e&&e.itemType()===A[A.Expression])return!1}return!0},get message(){return Object(x.getLocalization)("The column name is not specified.","DataAccessStringId.UnnamedColumnValidationException")}}]},{type:"buttons",width:50,buttons:[{icon:"delete",onClick:e=>{this._deleteRow(null!=e.row.data.index?e.row.data.index:this._getQuery().columns().length)},cssClass:"dxrd-querybuilder-grid-actions dxd-icon-highlighted dxrd-image-recycle-bin",template:Object(v.getTemplate)("dxrd-svg-operations-recycle_bin")}]}],onInitialized:e=>{this._bindingContext=_.contextFor(T.fn.constructor(e.element)[0]),this._gridComponent=e.component},onRowUpdating:e=>{this._onRowUpdating(e.oldData,e.newData)}},this.gridResizeHelper=new P.ResizeHelper(this.resultGridHeight,this.joinResultCollapsed)}_onContentReady(e){e.component._isFirstLoad||(e.component._isFirstLoad=!0,T.fn.constructor(e.component.content())[0].parentElement.className+=" dx-dropdowneditor-overlay")}_getQuery(){return this.designer()&&this.designer().model()}_afterChangeColumn(a,e){this._gridComponent.saveEditData().then(()=>{this._gridComponent.cancelEditData();var t=()=>{var e=this._gridComponent.getVisibleRows(),e=null!=a?a:e.length-1;this._gridComponent.editCell(e,0),this._gridComponent.navigateToRow(this.columnsExpressions()[e]),this._gridComponent.off("contentReady",t)};this._gridComponent.on("contentReady",t),e()})}_changeColumn(e,t){var a;e&&(a=$.createNew(this._getQuery(),this._getQuery().columns,e.table,e.column),this._isSelectAllItemByKey(e.key)&&(a=e.table?new Hr({"@Table":e.table,"@ItemType":A[A.AllColumns]},this._getQuery()):new Hr({"@ItemType":A[A.AllColumnsQuery]},this._getQuery())),this._afterChangeColumn(t,()=>null!=t?this._getQuery().columns.splice(t,1,a):this._getQuery().columns.push(a)))}_switchEditors(e){var t,a,i=()=>this._getQuery().columns.notifySubscribers();null!=e.index?(a=this._getQuery().columns()[e.index],e.isExpression()?a.toTable():a.itemType()===A[A.AllColumns]||a.itemType()===A[A.AllColumnsQuery]?(a=new Hr({},this._getQuery()),$.toExpresson(a,this._getQuery().columns,""),this._getQuery().columns.splice(e.index,1,a)):(t=a.column()?"["+a.table()+"."+a.column()+"]":"",$.toExpresson(a,this._getQuery().columns,t))):(a=new Hr({},this._getQuery()),$.toExpresson(a,this._getQuery().columns,""),i=()=>this._getQuery().columns.push(a)),this._afterChangeColumn(e.index,i)}_deleteRow(e){this._gridComponent.deleteRow(e),this._gridComponent.deselectAll(),this._getQuery().columns.splice(e,1)}_onRowUpdating(e,t){var a=this._getQuery().columns()[e.index];a&&a.alias(t.alias),e.alias=t.alias,this._gridComponent.saveEditData()}_aliasValidationCallback(e,t){return e===t.alias&&e===t.key||!$.findByName(this._getQuery().columns,e)}dispose(){super.dispose(),this._bindingContext=null,this._gridComponent=null,this._qbOptions=null,this.queryBuilderSurfaceCreator=null,this.columnsGrid=null}_generateKey(e,t,a,i){return i===a?a:e+"_"+t}_isSelectAllItemByKey(e){return e===f[f.SelectAllColumnsExpression]||-1!==e.indexOf(f[f.SelectAllNodeColumnsExpression])}save(){this.selectQuery.init(this._getQuery().serialize()),this.onSaveCallback(this.selectQuery),this.close()}addRow(){this._gridComponent.addRow(),this._gridComponent.deselectAll()}canSave(){return this._getQuery()&&this._getQuery().isValid()}addDataMember(e,t){var a,i,r=this._getQuery();1<r.tables().length&&!r.validateRelations()||(i=e.data.displayName||e.data.name,a=r.createChild(Object(x.extend)({"@ControlType":"FTable","@Name":i},la.controlsMap.FTable.defaultVal),void 0,e.path),i=_.unwrap(Object(x.findSurface)(a)),t?((e=_.unwrap(Object(x.findSurface)(this.designer()))).underCursor().x=t.left-e.absolutePosition.x(),e.underCursor().y=t.top-e.absolutePosition.y(),i.rect({left:e.underCursor().x,top:e.underCursor().y,width:199})):(t=Math.max.apply(null,r.tables.peek().filter(e=>e!==a).map(e=>e.location.x.peek()+1.25*e.size.width.peek()).concat([30])),a.location.x(t),a.location.y(20)),this.designer().selection.initialize(i))}show(e){this.selectQuery=e,this._querySource((new C.ModelSerializer).serialize(e)),this.popupVisible(!0)}popupTarget(){return".dxrd-select-querybuilder-surface .dxqb-main"}}class Do{constructor(o,s,e){this.getItems=t=>{var r=T.Deferred();return(!e()||t.fullPath.split(".").length>e().split(".").length?r.resolve([]):(o.getItems(t).done(e=>{var i=[],a=[];e.forEach(t=>{var e=s().filter(e=>e.name==t.name)[0];Object(x.isList)(t)&&e&&e.transform.value()?a.push(e):(t.displayName=e&&e.alias||t.displayName,i.push(t))}),0===a.length?r.resolve(i):T.when(...a.map(a=>o.getItems(new C.PathRequest(t.fullPath+"."+a.name)).always(e=>{e.forEach(e=>{var t=(a.alias||a.column)+"_"+e.displayName;e.displayName=t,e.name=t}),r.resolve(e.concat(i))})))}),r)).promise()},this.dispose=()=>{this.getItems=null,o=null}}}class Io extends No{constructor(e,t,a=!1,i){super(e,t,a,i),this.transformGridTitle=_.observable(),this.transformResultGridTitle=_.observable(),this.transformResultCollapsed=_.observable(!1),this.transformSources=_.observable([]),this.currentPath=_.observable(),this.transformQuery=_.observable(),this.popupContentTemplate="dxrd-querybuilder-transform-popup-content",this.transformGrid={rtlEnabled:a,noDataText:()=>"",dataSource:this.transformSources,showRowLines:!0,paging:{enabled:!1},scrolling:{mode:"infinite"},editing:{allowUpdating:!0,mode:"cell"},height:"100%",columns:[{dataField:"column",get caption(){return Object(x.getLocalization)("Column Name","DataAccessUIStringId.QueryBuilderColumns_ColumnName")},allowEditing:!1},{dataField:"alias",get caption(){return Object(x.getLocalization)("Alias","DataAccessUIStringId.QueryBuilderColumns_Alias")},validationRules:[this._aliasValidationRule]},{type:"buttons",get caption(){return Object(x.getLocalization)("Transform","DataAccessUIStringId.FederationDataSourceQueryBuilder_NodeType_Transform")},buttons:[{template:function(e,t){var a=document.createElement("div");e.append(a),_.renderTemplate("dxrd-querybuilder-transform-checkbox",t.data,{},a,"replaceNode")}}]}],onRowUpdating:e=>{e.oldData.alias=e.newData.alias,this.resultFieldListModel.valueHasMutated(),this.transformSources.valueHasMutated()}};var e=new Do(this._dataSource.dbSchemaProvider,this.transformSources,this.currentPath),r=(this.resultFieldListModel=_.observable({itemsProvider:e,path:this.currentPath,selectedPath:_.observable(),treeListController:null}),new Po(this.dragDropHandler,e=>r.isDraggable(e)&&this.addDataMember(e)));this.fieldListModel={itemsProvider:this._dataSource.dbSchemaProvider,treeListController:r,selectedPath:this.selectedPath,pageSize:100,expandRootItems:!0},this._disposables.push(this.currentPath.subscribe(e=>{this.selectedPath(e),this.transformGridTitle(Object(x.formatUnicorn)(Object(x.getLocalization)("Transformation node root: {0}","DataAccessUIStringId.FederationDataSourceQueryBuilder_TransformationNodeRoot"),this._dataSource.getQueryNameFromPath(e)))}),r,e,r),this.transformResultGridTitle(Object(x.getLocalization)("Transformation result","DataAccessUIStringId.FederationDataSourceQueryBuilder_TransformationResult"))}_updateColumns(a,i){this.transformSources(a.map(e=>{var t=!e.isList;return{columns:a,column:e.displayName,name:e.name,key:i+"."+e.name,alias:void 0,transform:{value:_.observable(t&&void 0),disabled:t,onValueChanged:()=>{this.resultFieldListModel.valueHasMutated()}}}}))}_aliasValidationCallback(t,e){var a=Object(x.findFirstItemMatchesCondition)(this.transformSources(),e=>e.alias===t);return!(!a||a.key!==e.key)||!a}dispose(){super.dispose(),this.resultFieldListModel=null,this.transformGrid=null}addDataMember(e){this.currentPath(e.path),this.updateColumns(),this.transformSources.valueHasMutated()}updateColumns(){var t=this.currentPath();this._dataSource.fielListProvider.getItems(new C.PathRequest(this.currentPath())).done(e=>{this._updateColumns(e,t)})}canSave(){return this.transformSources().some(e=>e.transform.value()||e.alias)}save(){var t=this.transformQuery();t.root(new ta({},new C.ModelSerializer,this._dataSource.getQueryNameFromPath(this.currentPath()),this.currentPath())),t.transformationRules([]),this.transformSources().forEach(e=>{(e.transform.value()||e.alias)&&t.transformationRules.push(new xa({"@Name":e.name,"@Alias":e.alias,"@Unfold":e.transform.value(),"@Flatten":e.transform.value()}))}),this.onSaveCallback(this.transformQuery()),this.close()}onHiding(){this.transformQuery(null),this.transformResultCollapsed(!1),this.currentPath(""),this.transformSources([])}show(t){var a,e,i;this.transformQuery(t),t.root&&t.root()&&(a=this._dataSource.getPathFromQueryName(t.root().sourceName()),this.currentPath(a),this._dataSource.fielListProvider.getItems(new C.PathRequest(a)).done(e=>{this._updateColumns(e,a),t.transformationRules().forEach(t=>{var e=this.transformSources().filter(e=>e.name===t.name())[0];e.alias=t.alias(),e.transform.value(t.unfold())})})),this.currentPath()||(e=this._dataSource.dataSources()[0],i=e.ref||e.id,e.isListType?(this.currentPath(i),this.updateColumns()):this._dataSource.fielListProvider.getItems(new C.PathRequest(i)).done(e=>{this.currentPath(e[0]&&e[0].isListType?i+"."+e[0].name:i),this.updateColumns()})),this.popupVisible(!0)}}class Eo extends No{constructor(e,t,a=!1,i){super(e,t,a,i),this.unionQuery=_.observable(),this.unionAll=_.observable(!1),this.columns=_.observableArray(),this.popupContentTemplate="dxrd-querybuilder-union-popup-content",this.buttonItems.push({toolbar:"bottom",location:"before",widget:"dxCheckBox",options:{text:Object(x.getLocalization)("Union All","DataAccessUIStringId.FederationDataSourceQueryBuilder_NodeType_UnionAll"),value:this.unionAll}});e=_.pureComputed(()=>this.unionQuery()&&this.unionQuery().queries().map(e=>{e=e.alias.peek();return{source:e.split("_").join(" - "),name:e}}));this._disposables.push(e),this.sourcesGrid={rtlEnabled:a,noDataText:()=>Object(x.getLocalization)("Drop a table or view here to create a query.","AnalyticsCoreStringId.QueryBuilder_SurfacePlaceholder"),dataSource:e,showRowLines:!0,paging:{enabled:!1},scrolling:{mode:"infinite"},columns:[{dataField:"source",get caption(){return Object(x.getLocalization)("Source","DataAccessUIStringId.QueryBuilderColumns_Source")}},{type:"buttons",width:30,buttons:[{icon:"delete",onClick:e=>{this.unionQuery().removeQuery(e.row.data.name),this.unionQuery.valueHasMutated()},cssClass:"dxrd-image-recycle-bin",template:Object(v.getTemplate)("dxrd-svg-operations-recycle_bin")}]}]},this._disposables.push(this.unionQuery.subscribe(e=>{var a=[],i=[];this.columns([]),e&&0!==e.queries().length&&(e.queries().forEach(e=>a.push(e.expressions())),a[0]&&a[0].forEach(t=>{a.every(e=>!!e.filter(e=>e.name()===t.name())[0])&&i.push({name:t.name(),alias:t.alias(),key:t.table()+"."+t.name()})}),this.columns(i))})),this._disposables.push(this.unionAll.subscribe(e=>{this.unionQuery()&&(e?this.unionQuery().unionType(Ca[Ca.UnionAll]):this.unionQuery().unionType(Ca[Ca.Union]))})),this.aliasGrid={rtlEnabled:a,dataSource:this.columns,showRowLines:!0,editing:{allowUpdating:!0,mode:"cell"},paging:{enabled:!1},scrolling:{mode:"infinite"},height:"100%",columns:[{dataField:"name",caption:"Column Name",allowEditing:!1},{dataField:"alias",get caption(){return Object(x.getLocalization)("Alias","DataAccessUIStringId.QueryBuilderColumns_Alias")},validationRules:[this._aliasValidationRule]}],onRowUpdating:e=>{e.oldData.alias=e.newData.alias}}}_aliasValidationCallback(t,e){var a=Object(x.findFirstItemMatchesCondition)(this.columns(),e=>e.alias===t);return!(!a||a.key!==e.key)||!a}dispose(){super.dispose(),this.sourcesGrid=null,this.aliasGrid=null}addDataMember(t){this._dataSource.fielListProvider.getItems(new C.PathRequest(t.path)).done(e=>{e.forEach(e=>this.unionQuery().addSelectQuery(t.path,e.name)),this.unionQuery.valueHasMutated()})}canSave(){return this.unionQuery()&&0<this.unionQuery().queries().length}save(){this.unionQuery().queries().forEach(e=>{e.expressions(e.expressions().filter(t=>{var e=this.columns().filter(e=>e.name===t.name())[0];return!!e&&(t.alias(e.alias),!0)}))}),this.onSaveCallback(this.unionQuery()),this.close()}onHiding(){this.unionQuery(null),this.unionAll(!1)}show(e){this.unionQuery(e),this.popupVisible(!0),this.unionAll(e.unionType()===Ca[Ca.UnionAll])}}class ko extends C.Disposable{constructor(e,t,a,i=!1){super(),this._dataSource=e,this.queries=t,this._showSelectQbCallBack=(e=null)=>{this._popupSelectQueryBuilder.show(this._getQuery(()=>new fa({}),e))},this._showUnionQbCallBack=(e=null)=>{this._popupUnionQueryBuilder.show(this._getQuery(()=>new Pa({},this._dataSource.dataSources),e))},this._showTransformQbCallBack=(e=null)=>{this._popupTransformQueryBuilder.show(this._getQuery(()=>new va({}),e))},this.template="dx-querybuilder-federation-popup-templates";e=e=>{this._setQuery(e),t.valueHasMutated(),a.onSave&&a.onSave()};this._afterAddQuery=a.afterAddQuery,this._disposables.push(t.subscribe(e=>e.forEach(e=>{e.sources().forEach(e=>this._dataSource.addSource(e))}))),this._disposables.push(this._popupSelectQueryBuilder=new wo(e,this._dataSource,i,a.onClose)),this._disposables.push(this._popupUnionQueryBuilder=new Eo(e,this._dataSource,i,a.onClose)),this._disposables.push(this._popupTransformQueryBuilder=new Io(e,this._dataSource,i,a.onClose)),this.callBacks={joinCallBack:this._showSelectQbCallBack,unionCallBack:this._showUnionQbCallBack,transformCallBack:this._showTransformQbCallBack},this.popupItems=[{template:"dxrd-querybuilder-federation-popup",model:this._popupSelectQueryBuilder},{template:"dxrd-querybuilder-federation-popup",model:this._popupUnionQueryBuilder},{template:"dxrd-querybuilder-federation-popup",model:this._popupTransformQueryBuilder}]}_getQuery(e,t){return t?Object(x.findFirstItemMatchesCondition)(this.queries(),e=>t===e.alias()):e()}_setQuery(t){t&&-1===this.queries.indexOf(t)&&(t.alias(t.alias()||t.generateName()),this._dataSource.queries().filter(e=>e.alias()===t.alias())[0]&&t.alias(Object(x.getUniqueName)(this._dataSource.queries().map(e=>e.alias()),t.alias())),this.queries.push(t),this._afterAddQuery)&&this._afterAddQuery(t)}editQuery(e,t){switch(e){case c.SelectNode:this.callBacks.joinCallBack(t);break;case c.UnionNode:this.callBacks.unionCallBack(t);break;case c.TransformationNode:this.callBacks.transformCallBack(t)}}dispose(){super.dispose(),this._dataSource=null}}class Ao{constructor(e){this._rootItems=e}afterItemsFilled(e,t){t.forEach(e=>{void 0===e.isListType&&(e.isListType="List"===e.specifics)})}beforeItemsFilled(e,t){return!e.fullPath&&(t.push(...this._rootItems().map(e=>({name:e.id||e.ref,displayName:e.name,isList:!0,specifics:e.specifics||"ListSource",isSupportQueries:e.isSupportQueries,isListType:e.isListType}))),!0)}}class $o extends Ji{constructor(e,t,a,i,r,o){super(e,t,a,i,r,o),this.callbacks=r,this.addAction={clickAction:()=>this.showPopover(),imageClassName:"dxrd-image-add",imageTemplateName:"dxrd-svg-operations-add",templateName:"dx-treelist-federation-action-with-popover",text:Object(x.getLocalization)("Add query","AnalyticsCoreStringId.SqlDSWizard_AddQuery")},this.className="dxrd-federation-addqueries-popover"}getActions(e){var t=[];return 0===e.path.indexOf("queries")&&t.push(this.addAction),t}popoverListItems(){return[{name:Object(x.getLocalization)("Join","DataAccessUIStringId.FederationDataSourceQueryBuilder_NodeType_Select"),addAction:()=>this.callbacks().showQbCallBacks.joinCallBack(),className:this.className},{name:Object(x.getLocalization)("Union","DataAccessUIStringId.FederationDataSourceQueryBuilder_NodeType_Union"),addAction:()=>this.callbacks().showQbCallBacks.unionCallBack(),className:this.className},{name:Object(x.getLocalization)("Transform","DataAccessUIStringId.FederationDataSourceQueryBuilder_NodeType_Transform"),addAction:()=>this.callbacks().showQbCallBacks.transformCallBack(),className:this.className}]}}class zo extends Zi{constructor(e,t,r,i,o){super(e,t,(e,t,a)=>new jo(e.name,e.displayName,e.specifics,e.isListType,t,a,o),(e,t,a)=>new Xi(e.name,e.displayName,e.specifics,t,a,o)),this._callBack=_.observable({deleteAction:t=>{this._customQueries.remove(Object(x.findFirstItemMatchesCondition)(this._customQueries(),e=>(e.alias()||e.generateName())===t))},disableCustomSql:!1,showQbCallBack:null,showQbCallBacks:null});var s=this.getItems;this._customQueries=i,this.getItems=e=>{var t,a=T.Deferred();return e.fullPath&&2<e.fullPath.split(".").length&&a.resolve([]),"queries"===e.fullPath?(t=i().map(t=>{var e,a=t.alias()||t.generateName(),i=this._queries.children().filter(e=>e.query===t)[0];if(i)return i;e=t instanceof Pa?_.observable(Object(x.extend)(this._callBack(),{showQbCallBack:r.unionCallBack})):t instanceof va?_.observable(Object(x.extend)(this._callBack(),{showQbCallBack:r.transformCallBack})):_.observable(Object(x.extend)(this._callBack(),{showQbCallBack:r.joinCallBack}));a=new Gi(a,a,"query",!!i&&i.checked(),_.observableArray([]),e,o,t);return a.path="queries."+a.name,this._disposables.push(a),a}),this._queries.initializeChildren(t),a.resolve(t)):s(e,!0).done(e=>a.resolve(e)),a.promise()},this._callBack().showQbCallBacks=r,this._disposables.push(this._queries=new $o("queries",Object(C.getLocalization)("Federated Queries","DataAccessUIStringId.FederatedQueryCollectionList_Title"),"list",!1,this._callBack,o)),t.valueHasMutated(),this._rootItems.push(this._queries),this.dispose=()=>{super.dispose(),this.removeProperties()}}isList(e,t){return!t.isListType&&super.isList(e,t)}}class jo extends Yi{constructor(e,t,a,i,r,o,s){super(e,t,a,r,o,s),this.isListType=i}}class Bo extends I{constructor(e){super(),this._options=e,this._selectedPath=_.observable(null),this._itemsProvider=_.observable(),this._customQueries=_.observableArray([]),this._setQueryChecked=e=>{var t=this._itemsProvider().getRootItems();this._selectedPath("queries."+e.alias());e=Object(x.findFirstItemMatchesCondition)(t,e=>"queries"===e.name).children(),t=e[e.length-1];t.setChecked(!0),t._afterCheckToggled&&t._afterCheckToggled(t)},this._dataSources=_.observableArray(),this._scrollViewHeight="calc(100% - 37px)",this._isDataLoadingInProcess=_.observable(!1),this._customizeDBSchemaTreeListActions=null,this._dataSources(this._options.dataSources()),this._disposables.push(this._fieldListProvider=new x.FieldListProvider(this._wrapFieldListCallback(this._options.callbacks.fieldListsCallback),this._dataSources,[new Ao(this._dataSources)],!0)),this._disposables.push(this._dataSource=new Ea({},this._dataSources,this._fieldListProvider,new C.ModelSerializer)),this._disposables.push(this._queriesPopupHelper=new ko(this._dataSource,this._customQueries,{afterAddQuery:this._setQueryChecked},this._options.rtl)),this._fieldListModel=_.observable(null),this._getItemsAfterCheck=t=>{var a,e,i=t.path.split(".");"query"==t.specifics?((a=t.query||Object(x.findFirstItemMatchesCondition)(this._customQueries(),e=>(e.alias()||a.generateName())===t.name)).alias(t.name),t.checked.peek()?-1===this._dataSource.queries.indexOf(a)&&this._dataSource.queries.push(a):this._dataSource.queries.remove(a)):!t.isList||2<i.length?(e=i.pop(),i=i.join("."),t.checked.peek()?this._dataSource.addSelectQuery(i,e):this._dataSource.removeExpression(e,i)):t.children().forEach(e=>this._getItemsAfterCheck(e)),this._onChange(),this[za]&&this[za](!1)}}_wrapFieldListCallback(a){return t=>{var e=Object(x.findFirstItemMatchesCondition)(this._dataSources(),e=>null!=e.id&&null!=t.id&&e.id===t.id||null!=e.ref&&null!=t.id&&e.ref===t.ref);return e?a(t,e):a(t)}}canNext(){return 1<this._dataSource.queries().length}canFinish(){return 0<this._dataSource.queries().length}_createTreeListFactory(){return new vi}_loadPanelViewModel(e){return Cr._getLoadPanelViewModel(e,this._isDataLoadingInProcess)}commit(){return T.Deferred().resolve({federationDataSourceJSON:JSON.stringify((new C.ModelSerializer).serialize(this._dataSource)),federatedQueries:[]}).promise()}initialize(e){var t=T.Deferred(),a=_.observableArray(T.map(this._dataSources(),e=>({name:e.id||e.ref,displayName:e.name,isList:!0,specifics:e.specifics||"ListSource",isListType:e.isListType,dragData:{noDragable:!1}}))),a=new zo(this._fieldListProvider,a,this._queriesPopupHelper.callBacks,this._customQueries,this._getItemsAfterCheck);return this._disposables.push(a),this._itemsProvider(a),this._fieldListModel({factory:this._createTreeListFactory(),itemsProvider:this._itemsProvider(),selectedPath:this._selectedPath,treeListController:new Tr(this._customizeDBSchemaTreeListActions),templateName:"dxrd-treelist-with-checkbox"}),t.resolve().promise()}}function Ro(e,t){e.registerMetadata(Aa.FederatedQueryConfigurePage,{create:()=>new Bo(t),setState:(e,t)=>{t.federationDataSourceJSON=e.federationDataSourceJSON,t.federatedQueries=e.federatedQueries},getState:e=>e.federationDataSourceWizard,resetState:(e,t)=>{e.federationDataSourceJSON=t.federationDataSourceJSON,e.federatedQueries=t.federatedQueries},description:Object(C.getLocalization)("Columns selected from specific tables and/or views will be automatically included into a separate query.","AnalyticsCoreStringId.SqlDSWizard_PageConfigureMultiQuery"),template:"dxrd-wizard-add-federated-queries-page"})}class Mo extends qr{constructor(e,t){super(e),this._options=t,this._customResetOptions=T.noop,this._relationsEditor=_.observable(null)}_restoreDataSource(e){this._federationDataSource=Fa(e,this._options.dataSources)}_dataSource(){return this._federationDataSource}commit(){this.relationsSubscription.dispose();var e=this._relations().map(e=>wa.create(e)),t=(this._federationDataSource.relations(e),this._federationDataSource.resultSet=this._resultSet,new C.ModelSerializer);return T.Deferred().resolve({federationDataSourceJSON:JSON.stringify((new C.ModelSerializer).serialize(this._federationDataSource)),relations:e.map(e=>JSON.stringify(t.serialize(e)))}).promise()}}function qo(e,t,a){e.registerMetadata(Aa.FederatedMasterDetailRelationshipsPage,{create:()=>new Mo(t,a),setState:(e,t)=>{t.relations=e.relations},getState:e=>e.federationDataSourceWizard,resetState:(e,t)=>{e.relations=t.relations},description:Object(C.getLocalization)("Configure master-detail relationships.","AnalyticsCoreStringId.SqlDSWizard_PageConfigureMasterDetailRelations"),template:"dxrd-wizard-configure-relations-page"})}class Lo{constructor(){this.metadata={}}registerMetadata(e,t){t.canFinish||(t.canFinish=e=>e.canFinish()),t.canNext||(t.canNext=e=>e.canNext()),this.metadata[e]=t}getMetadata(e){return this.metadata[e]}unregisterMetadata(e){delete this.metadata[e]}reset(){this.metadata={}}}class Qo{constructor(){this.connectionStrings={json:_.observableArray([]),sql:_.observableArray([])},this.callbacks={},this.rtl=!1,this.disableCustomSql=!1,this.wizardSettings=(new Wo).createDefault(),this.allowCreateNewJsonConnection=!1,this.predefinedDataSources=_.observable([])}get jsonDataSourceAvailable(){return this.wizardSettings.enableJsonDataSource&&(this.allowCreateNewJsonConnection||0<(_.unwrap(this.connectionStrings.json)||[]).length)}get sqlDataSourceAvailable(){return this.wizardSettings.enableSqlDataSource&&0<(_.unwrap(this.connectionStrings.sql)||[]).length}get objectDataSourceAvailable(){return this.wizardSettings.enableObjectDataSource}get canCreateDataSource(){return this.jsonDataSourceAvailable||this.sqlDataSourceAvailable||this.objectDataSourceAvailable}get federationDataSourceAvailable(){return this.wizardSettings.enableFederationDataSource&&this.dataSources&&this.dataSources()&&0<this.dataSources().length}}class Vo extends Qo{}class Wo{createDefault(e){var t={enableJsonDataSource:!0,enableSqlDataSource:!0,enableObjectDataSource:!0,enableFederationDataSource:!0};return e&&(void 0!==e.enableJsonDataSource&&(t.enableJsonDataSource=e.enableJsonDataSource),void 0!==e.enableSqlDataSource&&(t.enableSqlDataSource=e.enableSqlDataSource),null!=e.enableObjectDataSource&&(t.enableObjectDataSource=e.enableObjectDataSource),null!=e.enableFederationDataSource)&&(t.enableFederationDataSource=e.enableFederationDataSource),t}}class Fo extends xr{constructor(e,t,a){super(e,t),this._dataSourceWizardOptions=a}getNextPageId(e){return!e&&Oi(this._dataSourceWizardOptions)?S.ChooseDataSourceTypePage:e?e===S.ChooseDataSourceTypePage&&this._getCurrentState().dataSourceType===y.Sql?N.ChooseConnectionPage:e===S.ChooseDataSourceTypePage&&this._getCurrentState().dataSourceType===y.Federation?Aa.FederatedQueryConfigurePage:e===S.ChooseDataSourceTypePage&&this._getCurrentState().dataSourceType===y.Json&&0<this._dataSourceWizardOptions.connectionStrings.json().length?O.ChooseConnectionPage:this._dataSourceWizardOptions.allowCreateNewJsonConnection&&e===S.ChooseDataSourceTypePage&&this._getCurrentState().dataSourceType===y.Json?O.ChooseJsonSourcePage:e===O.ChooseConnectionPage&&this._getCurrentState().jsonDataSourceWizard.connectionName?O.ChooseJsonSchemaPage:this._dataSourceWizardOptions.allowCreateNewJsonConnection&&e===O.ChooseConnectionPage&&!this._getCurrentState().jsonDataSourceWizard.connectionName?O.ChooseJsonSourcePage:e===O.ChooseJsonSourcePage?O.ChooseJsonSchemaPage:e===N.ChooseConnectionPage&&this._getCurrentState().sqlDataSourceWizard.name?N.ConfigureQueryPage:e===N.ConfigureQueryPage&&this._getCurrentState().sqlDataSourceWizard.sqlDataSourceJSON?N.ConfigureParametersPage:void 0:this.getNextPageId(S.ChooseDataSourceTypePage)}}class Uo extends Cr{constructor(e,t){super(e,t.callbacks.finishCallback),this._wizardOptions=t,this._extendCssClass="dxrd-sqldatasource-wizard",this.title=Object(C.getLocalization)("Data Source Wizard","AnalyticsCoreStringId.DSWizard_Title")}initialize(e,t=(e,t)=>new Fo(e,t,this._wizardOptions)){this._wizardOptions.sqlDataSourceAvailable||!Object(x.isEmptyObject)(e.sqlDataSourceWizard)?e.dataSourceType=y.Sql:(this._wizardOptions.jsonDataSourceAvailable||e.jsonDataSourceWizard.jsonSource)&&(e.dataSourceType=y.Json),super.initialize(e,t)}canRunWizard(){return this._wizardOptions.jsonDataSourceAvailable||this._wizardOptions.sqlDataSourceAvailable}}function Ho(e=new Lo,t){return Ma(e,t),qi(e,t.requestWrapper,t.callbacks.getItemsProviderCallback),ki(e,t),ar(e,t.requestWrapper,t.callbacks),di(e,t.callbacks.getItemsProviderCallback),br(e,t),ei(e,t.connectionStrings.sql),yr(e,t.requestWrapper),e}function Jo(e=new Lo,t){return e=Ho(e,t),new Uo(e,t)}class Go extends I{constructor(e){super(),this._dataSourceWizardOptions=e,this._types=_.observableArray([]),this._objectDataSource=new Mt;e=this._dataSourceWizardOptions.callbacks.getItemsProviderCallback;this._disposables.push(this._provider=new ui(this._dataSourceWizardOptions.requestWrapper),this._chooseObjectType=new hi(this._types,this._provider),this._chooseObjectDataMember=new bi(this._chooseObjectType.selectedType,this._chooseObjectType.selectedCtor),this._chooseObjectParameters=new si(this._chooseObjectType.selectedCtor,this._chooseObjectDataMember.selectedDataMembers,e&&e())),this._initSections()}_initSections(){this._sections=[{data:this._chooseObjectType,disabled:()=>!1,description:Object(C.getLocalization)("Choose the type and its constructor.","AnalyticsCoreStringId.ObjectDSWizard_ChooseType_Description"),position:xi(this._dataSourceWizardOptions.rtl?E.Right:E.Left),template:"dx-objectdatasource-types-section"},{data:this._chooseObjectDataMember,disabled:()=>!this._chooseObjectDataMember.dataMembers().length,description:Object(C.getLocalization)("Choose the entire object or a data member to bind.","AnalyticsCoreStringId.ObjectDSWizard_ChooseDataMember_Description"),position:xi(this._dataSourceWizardOptions.rtl?E.TopLeft:E.TopRight),disabledText:Object(C.getLocalization)("To select a data member, choose a type that contains at least one data member.","AnalyticsCoreStringId.ObjectDSWizard_ChooseDataMember_Disabled_Description"),template:"dx-objectdatasource-datamembers-section"},{data:this._chooseObjectParameters,disabled:()=>!this._chooseObjectParameters.hasParameters(),position:xi(this._dataSourceWizardOptions.rtl?E.BottomLeft:E.BottomRight),description:Object(C.getLocalization)("Configure constructor parameters and/or method parameters.","AnalyticsCoreStringId.ObjectDSWizard_ConfigureParameters_Description"),disabledText:Object(C.getLocalization)("To specify parameters, select a parameterized constructor or method.","AnalyticsCoreStringId.ObjectDSWizard_ConfigureParameters_Disabled_Description"),template:"dx-objectdatasource-parameters-section"}]}showDescription(e,t){return[e+1,t].join(". ")}canNext(){return!1}canFinish(){return!!this._chooseObjectDataMember.selectedDataMembers().length}commit(){var e=this._chooseObjectDataMember.selectedDataMembers()[0];return T.Deferred().resolve({selectedType:this._chooseObjectType.selectedType().name,ctor:this._chooseObjectType.selectedCtor(),dataSourceName:this._objectDataSource.name(),context:this._context,dataMember:!e||e.isEntireObject()?void 0:e}).promise()}initialize(e){return this._context=e.objectDataSourceWizard.context,this._objectDataSource.setState(e.objectDataSourceWizard),this._chooseObjectType.selectedCtor(this._objectDataSource.ctor),this._chooseObjectDataMember.selectedDataMembers([this._objectDataSource.dataMember]),this._provider.getObjectTypeDescriptions(e.objectDataSourceWizard.context).done(e=>{e.types.forEach(e=>e.members.splice(0,0,Vt.empty())),this._types(e.types||[]),0<e.types.length&&this._chooseObjectType.selectedPath(e.types[0].name)}),T.Deferred().resolve().promise()}}function Xo(e,t){e.registerMetadata(w.SpecifyObjectDataSourceSettingsPage,{setState:(e,t)=>{t.objectDataSourceWizard.ctor=e.ctor,t.objectDataSourceWizard.dataMember=e.dataMember,t.objectDataSourceWizard.selectedType=e.selectedType,t.objectDataSourceWizard.dataSourceName=e.dataSourceName},getState:e=>e,resetState:(e,t)=>{e.objectDataSourceWizard.ctor=t.objectDataSourceWizard.ctor,e.objectDataSourceWizard.dataMember=t.objectDataSourceWizard.dataMember,e.objectDataSourceWizard.selectedType=t.objectDataSourceWizard.selectedType,e.objectDataSourceWizard.dataSourceName=t.objectDataSourceWizard.dataSourceName},create:()=>new Go(t),template:"dxrd-page-objectsource",navigationPanelText:Object(C.getLocalization)("Specify Data Source Settings","AnalyticsCoreStringId.Wizard_SpecifyDataSourceSettingsPage")})}class Yo extends Qo{}class Ko extends Cr{constructor(e,t){super(e,t.callbacks.finishCallback),this._wizardOptions=t,this.title=Object(C.getLocalization)("Data Source Wizard","AnalyticsCoreStringId.SqlDSWizard_Title"),this._extendCssClass="dxrd-multiqueries-sqldatasource-wizard",this.height(443)}canRunWizard(){return this._wizardOptions.jsonDataSourceAvailable||this._wizardOptions.sqlDataSourceAvailable||this._wizardOptions.objectDataSourceAvailable}initialize(e,t=(e,t)=>new Zo(e,t,this._wizardOptions)){this._wizardOptions.sqlDataSourceAvailable||!Object(x.isEmptyObject)(e.sqlDataSourceWizard)?e.dataSourceType=y.Sql:this._wizardOptions.jsonDataSourceAvailable||e.jsonDataSourceWizard.jsonSource?e.dataSourceType=y.Json:this._wizardOptions.objectDataSourceAvailable&&(e.dataSourceType=y.Object),super.initialize(e,t)}}class Zo extends xr{constructor(e,t,a){super(e,t),this._wizardOptions=a}getNextPageId(e){if(!e&&0<this._wizardOptions.predefinedDataSources().length)return S.ChoosePredefinedDataSourcePage;if((!e||e===S.ChoosePredefinedDataSourcePage)&&Oi(this._wizardOptions))return S.ChooseDataSourceTypePage;if(!e||e===S.ChoosePredefinedDataSourcePage)return this.getNextPageId(S.ChooseDataSourceTypePage);if(e===S.ChooseDataSourceTypePage&&this._getCurrentState().dataSourceType===y.Sql)return N.ChooseConnectionPage;if(e===S.ChooseDataSourceTypePage&&this._getCurrentState().dataSourceType===y.Federation)return Aa.FederatedQueryConfigurePage;if(e===S.ChooseDataSourceTypePage&&this._getCurrentState().dataSourceType===y.Object)return $a.ChooseTypesPage;if(e===$a.ChooseTypesPage&&this._getCurrentState().objectDataSourceWizard.selectedType)return $a.ChooseDataMembersPage;if(e===$a.ChooseDataMembersPage)return $a.ConfigureParametersPage;if(e===S.ChooseDataSourceTypePage&&this._getCurrentState().dataSourceType===y.Json&&0<this._wizardOptions.connectionStrings.json().length)return O.ChooseConnectionPage;if(this._wizardOptions.allowCreateNewJsonConnection&&e===S.ChooseDataSourceTypePage&&this._getCurrentState().dataSourceType===y.Json)return O.ChooseJsonSourcePage;if(e===O.ChooseConnectionPage&&this._getCurrentState().jsonDataSourceWizard.connectionName)return O.ChooseJsonSchemaPage;if(this._wizardOptions.allowCreateNewJsonConnection&&e===O.ChooseConnectionPage&&!this._getCurrentState().jsonDataSourceWizard.connectionName)return O.ChooseJsonSourcePage;if(e===O.ChooseJsonSourcePage)return O.ChooseJsonSchemaPage;if(e===N.ChooseConnectionPage&&this._getCurrentState().sqlDataSourceWizard.name)return N.MultiQueryConfigurePage;if(this._getCurrentState().sqlDataSourceWizard.sqlDataSourceJSON&&e===N.MultiQueryConfigurePage&&0<this._getCurrentState().sqlDataSourceWizard.customQueries.length)return N.MultiQueryConfigureParametersPage;if(e===N.MultiQueryConfigurePage||e===N.MultiQueryConfigureParametersPage){if(1<Qa(this._getCurrentState().sqlDataSourceWizard).sqlDataSource.queries().length)return S.ConfigureMasterDetailRelationshipsPage}else if(e===Aa.FederatedQueryConfigurePage)if(1<Fa(this._getCurrentState().federationDataSourceWizard,this._wizardOptions.dataSources).queries().length)return Aa.FederatedMasterDetailRelationshipsPage}}function es(e=new Lo,t){return Ii(e,t),Ma(e,t),ki(e,t),qi(e,t.requestWrapper,t.callbacks.getItemsProviderCallback),ar(e,t.requestWrapper,t.callbacks),ei(e,t.connectionStrings.sql,t.getSqlConnectionStrings),Xo(e,t),Ro(e,t),qo(e,or(t.callbacks.federationDataSourceResultSchema),t),Nr(e,t),$r(e,t.requestWrapper),Qr(e,rr(t.callbacks.sqlDataSourceResultSchema)),gi(e,t),yi(e,t),di(e,t.callbacks.getItemsProviderCallback),e}function ts(e=new Lo,t){return es(e,t),new Ko(e,t)}class as extends Lo{constructor(){super(...arguments),this.metadata={}}registerMetadata(e,t){super.registerMetadata(e,t)}getMetadata(e){return super.getMetadata(e)}}class is extends Lo{registerMetadata(e,t){super.registerMetadata(e,t),void 0===t.position&&(t.position=Object.keys(this.metadata).length-1),void 0===t.recreate&&(t.recreate=!1),void 0===t.disabledText&&(t.disabledText="")}}class rs extends Ka{constructor(e,t,a){super(e,t,a.template,a.description),this.pageId=e,(this.page=t).onChange&&(this.onChange=e=>{t.onChange(()=>{e(),a.onChange&&a.onChange()})})}}class os{constructor(e,t){this.pageId=e,this.metadata=t,this.page=_.observable(null)}resetPage(){this.page()&&this.page().dispose(),this.page(null)}setPage(e){this.page()!==e&&this.page(e)}}class ss{constructor(e,t,a){this.pageFactory=e,this.stateManager=t,this._resetPageCallback=a,this._pagesIds=[],this._pages=[]}_resetPages(e,t=e=>this._resetPage(e)){if(e<this._pagesIds.length)for(var a=this._pagesIds.length-1;e<=a;a--)this._pagesIds[a].forEach(e=>t(e)),this._pagesIds.splice(a,1)}_tryResetPageByMetadata(e){return!!this.pageFactory.getMetadata(e).recreate&&(this._resetPage(e),!0)}_resetPage(e){this.stateManager.resetPageState(e),this._resetPageCallback(e);e=this._getPage(e);e&&(e.dispose(),this._pages.splice(this._pages.indexOf(e),1))}_createNewPage(e){var t=this.pageFactory.getMetadata(e);return new rs(e,t.create(),t)}_getPage(t){return this._pages.filter(e=>e.pageId===t)[0]}_getNextPage(e){return T.Deferred().resolve(e.map(e=>{var t=this._getPage(e);return t&&!this._tryResetPageByMetadata(e)||(t=this._createNewPage(e),this._pages.push(t)),t})).promise()}_getPageIndex(t){return this._pagesIds.indexOf(this._pagesIds.filter(e=>e.some(e=>e===t))[0])}resetNextPages(e){this._resetPages(this._getPageIndex(e)+1)}getStartPage(){var e=this.getNextPageId(),t=this.pageFactory.getMetadata(e),t=new rs(e,t.create(),t);return this._pagesIds.push([e]),t}getNextPage(e){var t=this._getPageIndex(e),a=this.getNextPageId(e);return a?(a.push||(a=[a]),JSON.stringify(this._pagesIds[t+1])!==JSON.stringify(a)&&(this._resetPages(t+1,e=>{-1===a.indexOf(e)&&this._resetPage(e)}),this._pagesIds.push(a)),this._getNextPage(a)):(this.resetNextPages(e),T.Deferred().reject().promise())}getCurrentState(){return this.stateManager.getCurrentState()}getNextPageId(e){return""}}class ns extends C.Disposable{constructor(e,t,a){super(),this.pageFactory=e,this.events=new C.EventManager,this._loadingTimeout=null,this._changeTimeout=null,this.sections=[],this.isLoading=_.observable(!1),t&&(this._loadingState=t),a&&(this._extendedNextAction=a),this._disposables.push(this.events)}dispose(){super.dispose(),this.sections.forEach(e=>e.resetPage()),this.sections=[]}_createLoadingState(e){e[ns.__loadingStateFunctionName]||(e[ns.__loadingStateFunctionName]=e=>this._loadingState(e))}_createNextAction(e){e[ja]||(e[ja]=()=>this._extendedNextAction())}_loadingState(e){e?(this._loadingTimeout&&clearTimeout(this._loadingTimeout),this._loadingTimeout=setTimeout(()=>{this.isLoading(!0)},100)):(this._loadingTimeout&&clearTimeout(this._loadingTimeout),this.isLoading(!1))}_extendedNextAction(){}_resetPageById(e){this.getPageById(e).resetPage()}initialize(e,t=(e,t)=>new ss(e,t,e=>this._resetPageById(e))){this.events.call("beforeInitialize",{wizard:this,state:e}),this.stateManager=new vr(e,this.pageFactory),this.iterator=t(this.pageFactory,this.stateManager),this.sections=[],Object.keys(this.pageFactory.metadata).forEach(e=>{this.sections.push(new os(e,this.pageFactory.metadata[e]))}),this.sections=this.sections.sort((e,t)=>e.metadata.position-t.metadata.position),this.events.call("afterInitialize",{wizard:this})}_canNext(e){var t=!this.isLoading()&&e&&e.page&&this.pageFactory.getMetadata(e.pageId);return t&&t.canNext(e.page)}_canFinish(e){return!this.isLoading()&&e&&this.pageFactory.getMetadata(e.pageId).canFinish(e.page)}_initPage(e,t=!1,a=!1){if(this._createNextAction(e.page),e.onChange)return e.onChange(()=>{this._changeTimeout&&clearTimeout(this._changeTimeout),this._changeTimeout=setTimeout(()=>{this._nextAction(e)},100)}),e.initialize(this.stateManager.getPageState(e.pageId),t,a).always(()=>this._loadingState(!1));throw Error("Page with id "+e.pageId+" cannot be used in AutoNavigation, because it does not have method OnChange")}getPageById(t){return this.sections.filter(e=>e.pageId===t)[0]}start(){this.events.call("beforeStart",{wizard:this}),this._loadingState(!0);var t=this.iterator.getStartPage();this.events.call("beforePageInitialize",Pi(t,this)),this._initPage(t).done(()=>{var e=this.getPageById(t.pageId);if(!e)throw Error("Page Section with id "+t.pageId+" is not found.");e.setPage(t),this.events.call("afterPageInitialize",Ni(t,this)),this._nextAction(t)})}finishAction(){for(var e=T.Deferred(),t=!1,a=this.sections.length-1;0<=a;a--)if(this.sections[a].page()){this.sections[a].page().commit().done(e=>{this.sections[a].page().isChanged&&(this.events.call("beforeFinish",{wizardModel:this,state:this.stateManager.getCurrentState()}),this.stateManager.setPageState(this.sections[a].page().pageId,e),this.events.call("afterFinish",{wizardResult:this,state:this.stateManager.getCurrentState()}))}).always(()=>e.resolve()),t=!0;break}return t||e.resolve(),e.promise()}_nextAction(a,i=!1){if(!this._canNext(a)&&!this._canFinish(a))return a.resetCommitedState(),this.iterator.resetNextPages(a.pageId);this._loadingState(!0),a.commit().done(e=>{a.isChanged||i||a.page&&a.page.changeAlways?(this.stateManager.setPageState(a.pageId,e),this.iterator.getNextPage(a.pageId).done(e=>{e&&0<e.length?e.forEach(e=>{var t=this.getPageById(e.pageId),e=t&&t.page()||e;this.events.call("beforePageInitialize",Pi(e,this)),this._initPage(e,!!t.page(),a.isChanged||i).done(()=>{this.getPageById(e.pageId).setPage(e),this.events.call("afterPageInitialize",Ni(e,this)),this._nextAction(e,a.isChanged)})}):this._loadingState(!1),a.isChanged=!1}).fail(()=>this._loadingState(!1))):this._loadingState(!1)}).fail(()=>this._loadingState(!1))}}ns.__loadingStateFunctionName="__loadingState";class ds extends I{constructor(){super(),this._sectionsToUnregister=[],this._sectionsToRegister=[],this._sectionPositions=[],this._initInProgress=_.observable(!1),this._defaultMargin=24,this._parentMarginOffset=this._defaultMargin+this._defaultMargin/2,this._className="",this._pageCss={},this.events=new C.EventManager,this._factory=new is,this._sectionsProcessor=new ns(this._factory,e=>{this[za]&&this[za](e)},()=>this[ja]&&this[ja]()),this._sectionsProcessor.events.addHandler("beforeStart",()=>{this._sections=this._sectionsProcessor.sections,this._beforeStart(),this._patchOnChange()}),this._sectionsProcessor.events.addHandler("beforePageInitialize",e=>{this.events.call("beforeSectionInitialize",{section:e.page,sectionId:e.pageId,page:this,state:e.state})}),this._sectionsProcessor.events.addHandler("afterPageInitialize",e=>{this.events.call("afterSectionInitialize",{section:e.page,sectionId:e.pageId,page:this})})}dispose(){this._sectionsProcessor.dispose(),this._factory.reset(),this._sections=[]}_patchOnChange(){Object.keys(this._factory.metadata).forEach(e=>{this._factory.metadata[e].onChange=()=>this._onChange()})}_getPageStyle(e,t=!0){return xi(e,this._defaultMargin,t)}_applyCustomizations(){this._sectionsToUnregister.forEach(e=>e()),this._sectionsToUnregister=[],this._sectionPositions.forEach(e=>e()),this._sectionPositions=[],this._sectionsToRegister.forEach(e=>e()),this._sectionsToRegister=[]}_setSectionPosition(e,t){this._pageCss[e]=_.observable(this._getPageStyle(t))}registerSections(){}canNext(){return this._sectionsProcessor.sections.every(this._sectionCondition)}_sectionCondition(e){return e.metadata.required?e.page()&&e.metadata.canNext(e.page().page):!e.page()||e.metadata.canNext(e.page().page)}canFinish(){for(var e=this._sections.length-1;0<=e;e--)if(this._sections[e].page()&&this._sections[e].metadata.canFinish(this._sections[e].page().page))return!0;return!1}setSectionPosition(e,t){this._sectionPositions.push(()=>{this._setSectionPosition(e,t)})}registerSection(e,t){this._sectionsToRegister.push(()=>{this._factory.registerMetadata(e,t)})}unregisterSection(e){this._sectionsToUnregister.push(()=>this._factory.unregisterMetadata(e))}_loadPanelViewModel(e){return!1}getNextSectionId(e){}initialize(e,t){return this.registerSections(),this._applyCustomizations(),this._sectionsProcessor.initialize(Object(x.extend)(!0,{},e)),this._stateManager=this._sectionsProcessor.stateManager,this._sectionsProcessor.iterator.getNextPageId=e=>this.getNextSectionId(e),this._sectionsProcessor.start(),T.Deferred().resolve().promise()}_beforeStart(){}commit(){var e=T.Deferred();return this._sectionsProcessor.finishAction().done(()=>{e.resolve(Object(x.extend)(!0,{},this._stateManager.getCurrentState()))}),e.promise()}_getPageDescription(e,t){return e+1+". "+t.metadata.description}_showPageDescription(){return 1<this._sections.length}}class ls extends ds{constructor(e,t){super(),this.wizardOptions=e,this.dataSources=t,this.disabledSectionText=Object(x.getLocalization)('To specify a data source, select "No, I\'d like to create a new data source".',"AnalyticsCoreStringId.Wizard_SelectDataSourceType_Placeholder")}registerSections(){this.showPredefinedDataSourceSection()&&(Ii(this._factory,this.wizardOptions),this._setSectionPosition(S.ChoosePredefinedDataSourcePage)),this.showChooseDataSourceTypeSection()&&(Ma(this._factory,this.wizardOptions),this._setSectionPosition(S.ChooseDataSourceTypePage),this._factory.getMetadata(S.ChooseDataSourceTypePage).disabledText=this.disabledSectionText),this.showPredefinedDataSourceSection()&&this.showChooseDataSourceTypeSection()&&(this._setSectionPosition(S.ChoosePredefinedDataSourcePage,E.Top),this._setSectionPosition(S.ChooseDataSourceTypePage,E.Bottom))}showPredefinedDataSourceSection(){return 0<this.dataSources.length}showChooseDataSourceTypeSection(){return this.wizardOptions.canCreateDataSource&&Oi(this.wizardOptions)}getNextSectionId(e){return!e&&this.showPredefinedDataSourceSection()?S.ChoosePredefinedDataSourcePage:!e&&this.showChooseDataSourceTypeSection()||e===S.ChoosePredefinedDataSourcePage&&!this._stateManager.getCurrentState().predeifnedDataSourceName&&this.showChooseDataSourceTypeSection()?S.ChooseDataSourceTypePage:void 0}}function cs(e,t){e.registerMetadata(w.SelectDataSourcePage,{setState:(e,t)=>{t.dataSourceType=e.dataSourceType,t.predeifnedDataSourceName=e.predeifnedDataSourceName},getState:e=>e,resetState:(e,t)=>{e.dataSource=t.dataSource,e.predeifnedDataSourceName=null},create:()=>new ls(t,t.predefinedDataSources()),navigationPanelText:Object(x.getLocalization)("Select Data Source","ASPxReportsStringId.ReportDesigner_Wizard_SelectDataSource"),template:"dx-wizard-fullscreen-page"})}class us extends ds{constructor(e){super(),this._dataSourceWizardOptions=e}registerSections(){0<this._dataSourceWizardOptions.connectionStrings.json().length&&(Qi(this._factory,this._dataSourceWizardOptions.connectionStrings.json,this._dataSourceWizardOptions.allowCreateNewJsonConnection,this._dataSourceWizardOptions.callbacks.getItemsProviderCallback,this._dataSourceWizardOptions.getJsonConnectionStrings),this._setSectionPosition(D.SpecifyJsonConnectionPage,this._dataSourceWizardOptions.rtl?E.Right:E.Left)),this._dataSourceWizardOptions.allowCreateNewJsonConnection&&0===this._dataSourceWizardOptions.connectionStrings.json().length&&(qi(this._factory,this._dataSourceWizardOptions.requestWrapper,this._dataSourceWizardOptions.callbacks.getItemsProviderCallback),this._setSectionPosition(D.ChooseJsonSourcePage,this._dataSourceWizardOptions.rtl?E.Right:E.Left),this._factory.getMetadata(D.ChooseJsonSourcePage).disabledText=Object(C.getLocalization)('To create a data connection, select "No, I\'d like to create a new data connection".',"AnalyticsCoreStringId.JsonDSWizard_CreateNewConnectionPage_Placeholder")),ar(this._factory,this._dataSourceWizardOptions.requestWrapper,this._dataSourceWizardOptions.callbacks),this._setSectionPosition(D.ChooseJsonSchemaPage,this._dataSourceWizardOptions.rtl?E.Left:E.Right),this._factory.getMetadata(D.ChooseJsonSchemaPage).disabledText=Object(C.getLocalization)("To select data fields, choose or create a data connection.","AnalyticsCoreStringId.JsonDSWizard_ChooseJsonSchemaPage_Placeholder")}getNextSectionId(e){return!e&&0<this._dataSourceWizardOptions.connectionStrings.json().length?D.SpecifyJsonConnectionPage:e?this._dataSourceWizardOptions.allowCreateNewJsonConnection?e===D.SpecifyJsonConnectionPage||e===D.ChooseJsonSourcePage?D.ChooseJsonSchemaPage:void 0:e===D.SpecifyJsonConnectionPage?D.ChooseJsonSchemaPage:void 0:D.ChooseJsonSourcePage}canNext(){var e=this._sectionsProcessor.getPageById(D.ChooseJsonSchemaPage);return e&&e.page()&&e.metadata.canNext(e.page().page)}}function ps(e,t){e.registerMetadata(w.SpecifyJsonDataSourceSettingsPage,{setState:(e,t)=>{t.jsonDataSourceWizard.connectionName=e.jsonDataSourceWizard.connectionName,t.jsonDataSourceWizard.newConnectionName=e.jsonDataSourceWizard.newConnectionName,t.jsonDataSourceWizard.jsonSource=e.jsonDataSourceWizard.jsonSource,t.jsonDataSourceWizard.dataSourceName=e.jsonDataSourceWizard.dataSourceName,t.jsonDataSourceWizard.jsonScheme=e.jsonDataSourceWizard.jsonScheme,t.jsonDataSourceWizard.rootElement=e.jsonDataSourceWizard.rootElement},getState:e=>e,resetState:(e,t)=>{e.jsonDataSourceWizard.connectionName=t.jsonDataSourceWizard.connectionName,e.jsonDataSourceWizard.jsonSource=t.jsonDataSourceWizard.jsonSource,e.jsonDataSourceWizard.dataSourceName=t.jsonDataSourceWizard.dataSourceName,e.jsonDataSourceWizard.newConnectionName=t.jsonDataSourceWizard.newConnectionName,e.jsonDataSourceWizard.jsonScheme=t.jsonDataSourceWizard.jsonScheme,e.jsonDataSourceWizard.rootElement=t.jsonDataSourceWizard.rootElement},create:()=>new us(t),navigationPanelText:Object(C.getLocalization)("Specify Data Source Settings","AnalyticsCoreStringId.Wizard_SpecifyDataSourceSettingsPage"),template:"dx-wizard-fullscreen-page"})}class hs extends ds{constructor(e){super(),this._dataSourceWizardOptions=e}getNextSectionId(e){var t;return e?e===D.ChooseSqlConnectionPage&&this._stateManager.getCurrentState().sqlDataSourceWizard.name?D.ConfigureQueryPage:e===D.ConfigureQueryPage?(e=[],0<((t=this._stateManager.getCurrentState().sqlDataSourceWizard).customQueries||[]).length&&e.push(D.ConfigureQueryParametersPage),1<Qa(t).sqlDataSource.queries().length&&e.push(D.ConfigureMasterDetailRelationshipsPage),e):void 0:D.ChooseSqlConnectionPage}registerSections(){ei(this._factory,this._dataSourceWizardOptions.connectionStrings.sql,this._dataSourceWizardOptions.getSqlConnectionStrings),Nr(this._factory,this._dataSourceWizardOptions),Qr(this._factory,rr(this._dataSourceWizardOptions.callbacks.sqlDataSourceResultSchema)),$r(this._factory,this._dataSourceWizardOptions.requestWrapper);var e=this._factory.getMetadata(D.ChooseSqlConnectionPage);e.description=Object(C.getLocalization)("Choose a data connection.","AnalyticsCoreStringId.SqlDSWizard_PageChooseConnection"),(e=this._factory.getMetadata(D.ConfigureQueryPage)).recreate=!0,e.description=Object(C.getLocalization)("Choose predefined queries and/or create custom queries.","AnalyticsCoreStringId.Wizard_Queries_Description"),e.required=!0,(e=this._factory.getMetadata(D.ConfigureMasterDetailRelationshipsPage)).description=Object(C.getLocalization)("Configure master-detail relationships.","AnalyticsCoreStringId.SqlDSWizard_PageConfigureMasterDetailRelations"),e.disabledText=Object(C.getLocalization)("To create a master-detail relationship, select two or more queries.","AnalyticsCoreStringId.Wizard_MasterDetailRelationship_Placeholder"),(e=this._factory.getMetadata(D.ConfigureQueryParametersPage)).description=Object(C.getLocalization)("Configure query parameters.","AnalyticsCoreStringId.SqlDSWizard_PageConfigureParameters"),e.disabledText=Object(C.getLocalization)("To specify query parameters, select a parameterized stored procedure or create a custom query.","AnalyticsCoreStringId.Wizard_ConfigureQueryParameters_Placeholder"),this._setSectionPosition(D.ChooseSqlConnectionPage,this._dataSourceWizardOptions.rtl?E.TopRight:E.TopLeft),this._setSectionPosition(D.ConfigureQueryPage,this._dataSourceWizardOptions.rtl?E.TopLeft:E.TopRight),this._setSectionPosition(D.ConfigureQueryParametersPage,this._dataSourceWizardOptions.rtl?E.BottomLeft:E.BottomRight),this._setSectionPosition(D.ConfigureMasterDetailRelationshipsPage,this._dataSourceWizardOptions.rtl?E.BottomRight:E.BottomLeft)}}function ms(e,t){e.registerMetadata(w.SpecifySqlDataSourceSettingsPage,{setState:(e,t)=>{t.sqlDataSourceWizard.customQueries=e.sqlDataSourceWizard.customQueries,t.sqlDataSourceWizard.name=e.sqlDataSourceWizard.name,t.sqlDataSourceWizard.queryName=e.sqlDataSourceWizard.name,t.sqlDataSourceWizard.sqlDataSourceJSON=e.sqlDataSourceWizard.sqlDataSourceJSON,t.sqlDataSourceWizard.relations=e.sqlDataSourceWizard.relations},getState:e=>e,resetState:(e,t)=>{e.sqlDataSourceWizard=Object(x.extend)(!0,{},t)},create:()=>new hs(t),navigationPanelText:Object(C.getLocalization)("Specify Data Source Settings","AnalyticsCoreStringId.Wizard_SpecifyDataSourceSettingsPage"),template:"dx-wizard-fullscreen-page"})}class gs extends ds{constructor(e){super(),this._dataSourceWizardOptions=e}getNextSectionId(e){return e?e===D.ConfigureFederatedQueriesPage&&1<Fa(this._stateManager.getCurrentState().federationDataSourceWizard,this._dataSourceWizardOptions.dataSources).queries().length?D.ConfigureFederatedMasterDetailRelationshipsPage:void 0:D.ConfigureFederatedQueriesPage}_showPageDescription(){return!0}registerSections(){Ro(this._factory,this._dataSourceWizardOptions),qo(this._factory,or(this._dataSourceWizardOptions.callbacks.federationDataSourceResultSchema),this._dataSourceWizardOptions);var e=this._factory.getMetadata(D.ConfigureFederatedQueriesPage);e.description=Object(C.getLocalization)("Create a federated query.","DataAccessUIStringId.WizardPageConfigureFederatedQueryPage"),(e=this._factory.getMetadata(D.ConfigureFederatedMasterDetailRelationshipsPage)).description=Object(C.getLocalization)("Configure master-detail relationships.","AnalyticsCoreStringId.SqlDSWizard_PageConfigureMasterDetailRelations"),e.disabledText=Object(C.getLocalization)("To create a master-detail relationship, select two or more queries.","AnalyticsCoreStringId.Wizard_MasterDetailRelationship_Placeholder"),this._setSectionPosition(D.ConfigureFederatedQueriesPage,E.Top),this._setSectionPosition(D.ConfigureFederatedMasterDetailRelationshipsPage,E.Bottom)}}function bs(e,t){e.registerMetadata(w.SpecifyFederationDataSourceSettingsPage,{setState:(e,t)=>{t.federationDataSourceWizard.federationDataSourceJSON=e.federationDataSourceWizard.federationDataSourceJSON,t.federationDataSourceWizard.federatedQueries=e.federationDataSourceWizard.federatedQueries,t.federationDataSourceWizard.relations=e.federationDataSourceWizard.relations,t.federationDataSourceWizard.name=e.federationDataSourceWizard.name},getState:e=>e,resetState:(e,t)=>{e.federationDataSourceWizard=Object(x.extend)(!0,{},t)},create:()=>new gs(t),navigationPanelText:Object(C.getLocalization)("Specify Data Source Settings","AnalyticsCoreStringId.Wizard_SpecifyDataSourceSettingsPage"),template:"dx-wizard-fullscreen-page"})}class fs extends C.Disposable{constructor(r){super(),this._steps=[],this._disposables.push(r._currentPage.subscribe(t=>{var e=this._steps.filter(e=>e.pageIds.some(e=>e===t.pageId))[0];e&&(e.currentPageId=t.pageId,e.disabled(!1),this._setStepVisible(e.stepIndex))})),Object.keys(r.pageFactory.metadata).forEach(e=>{var t,a=r.pageFactory.metadata[e],i=this._steps.filter(e=>e.text===a.navigationPanelText)[0];i?i.pageIds.push(e):(t={text:a.navigationPanelText,pageIds:[e],currentPageId:null,stepIndex:this._steps.length,disabled:_.observable(!0),visible:_.observable(!0)},this._disposables.push(t.isActive=_.computed(()=>r._currentPage()&&t.currentPageId===r._currentPage().pageId)),t.clickAction=()=>{t.isActive()||r.goToPage(t.currentPageId)},this._steps.push(t))}),this._disposables.push(this.isVisible=_.computed(()=>1<this._steps.filter(e=>e.visible()).length))}resetAll(){this._steps.forEach(e=>{e.disabled(!0)})}_currentStep(t){return this._steps.filter(e=>e.currentPageId===t)[0]}_reset(e){e=this._currentStep(e);e&&e.disabled(!0)}_resetNextPages(e){e=this._currentStep(e);if(e)for(var t=e.stepIndex+1;t<this._steps.length;t++)this._steps[t].disabled(!0)}_setStepVisible(a){var e=this._steps.filter((e,t)=>t<a);0<e.length&&!e.some(e=>!e.disabled())&&e.forEach(e=>e.visible(!1))}}class ys extends Cr{constructor(e,t){super(e,t),this._extendCssClass="dx-wizard-fullscreen",this.navigationPanel=_.observable(null),this.isVisible.subscribe(e=>{e||(this.navigationPanel()&&this.navigationPanel().resetAll(),this.navigationPanel()&&this.navigationPanel().dispose(),this._onCloseCallback&&this._onCloseCallback())})}_onClose(e){this._onCloseCallback=e}onFinish(){super.onFinish(),this.navigationPanel().dispose()}_initPage(e){return e.onChange&&e.onChange(()=>this.navigationPanel()._resetNextPages(e.pageId)),super._initPage(e)}_onResetPage(e){this.navigationPanel()._reset(e.pageId)}start(e){e&&(this._finishCallback=e),this.navigationPanel()&&this.navigationPanel().resetAll(),this.navigationPanel()&&this.navigationPanel().dispose(),this.navigationPanel(new fs(this)),super.start()}_pageDescription(){var e=this.navigationPanel()._steps.filter(e=>e.isActive())[0];return e?e.text:this.pageFactory.getMetadata(this._currentPage().pageId).description}_description(){return""}}class Ss extends ys{constructor(e,t){super(e,t.callbacks.finishCallback),this._dataSourceWizardOptions=t}initialize(e,t=(e,t)=>new vs(e,t,this._dataSourceWizardOptions,e=>this._onResetPage(e))){this._dataSourceWizardOptions.sqlDataSourceAvailable||!Object(x.isEmptyObject)(e.sqlDataSourceWizard)?e.dataSourceType=y.Sql:this._dataSourceWizardOptions.jsonDataSourceAvailable||e.jsonDataSourceWizard.jsonSource?e.dataSourceType=y.Json:!this._dataSourceWizardOptions.objectDataSourceAvailable&&Object(x.isEmptyObject)(e.objectDataSourceWizard)||(e.dataSourceType=y.Object),super.initialize(e,t)}canRunWizard(){return this._dataSourceWizardOptions.canCreateDataSource}_description(){return Object(C.getLocalization)("Data Source Wizard","AnalyticsCoreStringId.DSWizard_Title")}}class vs extends xr{constructor(e,t,a,i){super(e,t,i),this._dataSourceOptions=a}_shouldSelectDataSource(){return Oi(this._dataSourceOptions)||0<this._dataSourceOptions.predefinedDataSources().length}getNextPageId(e){return!e&&this._shouldSelectDataSource()?w.SelectDataSourcePage:!e&&this._dataSourceOptions.sqlDataSourceAvailable?w.SpecifySqlDataSourceSettingsPage:!e&&this._dataSourceOptions.jsonDataSourceAvailable?w.SpecifyJsonDataSourceSettingsPage:!e&&this._dataSourceOptions.objectDataSourceAvailable?w.SpecifyObjectDataSourceSettingsPage:e===w.SelectDataSourcePage&&this._getCurrentState().dataSourceType===y.Json?w.SpecifyJsonDataSourceSettingsPage:e===w.SelectDataSourcePage&&this._getCurrentState().dataSourceType===y.Sql?w.SpecifySqlDataSourceSettingsPage:e===w.SelectDataSourcePage&&this._getCurrentState().dataSourceType===y.Object?w.SpecifyObjectDataSourceSettingsPage:e===w.SelectDataSourcePage&&this._getCurrentState().dataSourceType===y.Federation?w.SpecifyFederationDataSourceSettingsPage:void 0}}function xs(e){var t=new as,a=new Ss(t,e);return cs(t,e),ms(t,e),bs(t,e),ps(t,e),Xo(t,e),a}class _s{constructor(e,t){this.handler=e,this.isVisible=_.observable(!0),this.isDisabled=_.observable(!1),this.text=t}}class Cs extends v.Editor{constructor(e,t,a,i){super(e,t,a,i)}generateValue(t){return this.undoValue||this._disposables.push(this.undoValue=_.computed({read:()=>this.value(),write:e=>{t().start(),this.value(e),t().end()}})),this.undoValue}}class Ts extends P.PopupEditorBase{constructor(e,t,a=!1){super(),this._dataSource=e,this._callBack=t,this.rtl=a,this.className="dxrd-federated-manageQueries-editor",this._disposables.push(this._queriesPopupHelper=new ko(this._dataSource,this._dataSource.queries,{},a)),this._createAddQueryButton(),this.queriesStoreData=_.pureComputed(()=>this._dataSource&&this._dataSource.queries().map(e=>({name:e.alias(),id:e.alias(),type:c[e.queryType()]}))),this._disposables.push(this.queriesStoreData),this.queriesGrid={rtlEnabled:a,dataSource:this.queriesStoreData,showColumnLines:!1,hoverStateEnabled:!0,scrolling:{mode:"infinite"},height:"100%",editing:{mode:"cell",allowUpdating:!0},onRowUpdating:e=>{e.oldData.alias=e.newData.name},columns:[{dataField:"name",get caption(){return Object(x.getLocalization)("Name","AnalyticsCoreStringId.CollectionEditor_Name_Placeholder")}},{type:"buttons",width:100,buttons:[{icon:"edit",onClick:e=>{this._queriesPopupHelper.editQuery(e.row.data.type,e.row.data.id)},cssClass:"dxrd-manage-queries-actions dxd-icon-highlighted dxrd-image-operations-edit-query",template:Object(v.getTemplate)("dxrd-svg-operations-edit")},{icon:"delete",onClick:e=>{this._dataSource.removeQuery(e.row.data.id)},cssClass:"dxrd-manage-queries-actions dxd-icon-highlighted dxrd-image-recycle-bin",template:Object(v.getTemplate)("dxrd-svg-operations-recycle_bin")}]}]}}_createAddQueryButton(){var e=new $o("queries",Object(x.getLocalization)("Federated Queries","DataAccessUIStringId.FederatedQueryCollectionList_Title"),"list",!1,_.observable({showQbCallBacks:this._queriesPopupHelper.callBacks})).popoverListItems(),e={text:Object(x.getLocalization)("Add query","AnalyticsCoreStringId.SqlDSWizard_AddQuery"),items:e.map(e=>({text:e.name,onClick:e.addAction})),dropDownOptions:{width:150,container:".dx-designer-viewport"},useItemTextAsTitle:!1};this.buttonItems.push({toolbar:"bottom",location:"before",template:function(){return Object(v.getTemplate)("dxrd-managequeries-selectbox")},options:e})}save(){this.queriesStoreData().forEach(t=>{var e=Object(x.findFirstItemMatchesCondition)(this._dataSource.queries(),e=>e.alias()===t.id);e.sources().forEach(e=>this._dataSource.addSource(e)),e&&t.id!==t.name&&e.alias(t.name)}),this._callBack(),super.save(),this.dispose()}canSave(){return!!this.queriesStoreData().length}close(){super.close(),this.dispose()}dispose(){super.dispose(),this.queriesGrid=null,this._dataSource=null,this._callBack=null}title(){return Object(x.getLocalization)("Manage Queries","DataAccessUIStringId.FederatedQueryCollectionEditorForm_Title")}}class Ps extends C.Disposable{constructor(e,t,a=e=>!0,i){super(),this.editableObj=t,this.getDisplayName=i,this._collapsed=e,this._disposables.push(this.visible=_.pureComputed(()=>!this.disabled()&&!this._collapsed())),this._disposables.push(this.disabled=_.pureComputed(()=>{var e=!t()||!a(t());return e&&!this._collapsed()&&this._collapsed(!0),e}))}dispose(){super.dispose(),this._collapsed=null}toogle(){this._collapsed(!this._collapsed())}get title(){return this.getDisplayName(this.editableObj())}}b.registerEditors({bool:{header:"dx-boolean-select",custom:"dxqb-property-editor"},combobox:{header:"dx-combobox",custom:"dxqb-property-editor"},comboboxUndo:{header:"dx-combobox-undo",custom:"dxqb-property-editor",editorType:Cs},text:{header:"dx-text",custom:"dxqb-property-editor"},filterEditor:{header:"dxrd-filterstring",custom:"dxqb-property-editor"},filterGroupEditor:{header:"dxrd-filterstringgroup",custom:"dxqb-property-editor"},numeric:{header:"dx-numeric",custom:"dxqb-property-editor"}}),Object(P.addToBindingsCache)("attr: { x1: startPoint().relativeX, y1: startPoint().relativeY, x2: endPoint().relativeX, y2: endPoint().relativeY }",function(e,t){return{attr:function(){return{x1:e.$data.startPoint().relativeX,y1:e.$data.startPoint().relativeY,x2:e.$data.endPoint().relativeX,y2:e.$data.endPoint().relativeY}}}}),Object(P.addToBindingsCache)("styleunit: position, trackCursor: underCursor, style: { 'marginLeft': -3 * _context.zoom() + 'px', 'marginTop': -3 * _context.zoom() + 'px' }, draggable: $root.connectingPointDragHandler",function(e,t){return{styleunit:function(){return e.$data.position},trackCursor:function(){return e.$data.underCursor},style:function(){return{marginLeft:-3*e.$data._context.zoom()+"px",marginTop:-3*e.$data._context.zoom()+"px"}},draggable:function(){return e.$root.connectingPointDragHandler}}}),Object(P.addToBindingsCache)("draggable: $root.connectionPointDragHandler, styleunit: { top: relativeY, left: relativeX }",function(e,t){return{draggable:function(){return e.$root.connectionPointDragHandler},styleunit:function(){return{top:e.$data.relativeY,left:e.$data.relativeX}}}}),Object(P.addToBindingsCache)("styleunit: position, trackCursor: underCursor",function(e,t){return{styleunit:function(){return e.$data.position},trackCursor:function(){return e.$data.underCursor}}}),Object(P.addToBindingsCache)("styleunit: position, dxclick: function() {}, draggable: $root.dragHandler",function(e,t){return{styleunit:function(){return e.$data.position},dxclick:function(){return function(){}},draggable:function(){return e.$root.dragHandler}}}),Object(P.addToBindingsCache)("template: { name: 'dxdd-connection-line' }",function(e,t){return{template:function(){return{name:"dxdd-connection-line"}}}}),Object(P.addToBindingsCache)("with: startPoint",function(e,t){return{with:function(){return e.$data.startPoint}}}),Object(P.addToBindingsCache)("template: { name: 'dxdd-connection-point-selection' }",function(e,t){return{template:function(){return{name:"dxdd-connection-point-selection"}}}}),Object(P.addToBindingsCache)("with: endPoint",function(e,t){return{with:function(){return e.$data.endPoint}}}),Object(P.addToBindingsCache)("attr: { id: 'dxqb-arrow_end' + connectorID() }",function(e,t){return{attr:function(){return{id:"dxqb-arrow_end"+e.$data.connectorID()}}}}),Object(P.addToBindingsCache)("attr: { id: 'dxqb-arrow_start' + connectorID() }",function(e,t){return{attr:function(){return{id:"dxqb-arrow_start"+e.$data.connectorID()}}}}),Object(P.addToBindingsCache)("attr: { points: routePointsSet, 'marker-end': showArrow() ? 'url(#dxqb-arrow_end' + connectorID() + ')' : '', 'marker-start': showRightArrow() ? 'url(#dxqb-arrow_start' + connectorID() + ')' : '' }, updateConnectorArrow: $data",function(e,t){return{attr:function(){return{points:e.$data.routePointsSet,"marker-end":e.$data.showArrow()?"url(#dxqb-arrow_end"+e.$data.connectorID()+")":"","marker-start":e.$data.showRightArrow()?"url(#dxqb-arrow_start"+e.$data.connectorID()+")":""}},updateConnectorArrow:function(){return e.$data}}}),Object(P.addToBindingsCache)("if: showArrow",function(e,t){return{if:function(){return e.$data.showArrow}}}),Object(P.addToBindingsCache)("if: showRightArrow",function(e,t){return{if:function(){return e.$data.showRightArrow}}}),Object(P.addToBindingsCache)("styleunit: position, visible: isVisible",function(e,t){return{styleunit:function(){return e.$data.position},visible:function(){return e.$data.isVisible}}}),Object(P.addToBindingsCache)("styleunit: position",function(e,t){return{styleunit:function(){return e.$data.position}}}),Object(P.addToBindingsCache)("trackCursor: underCursor, click: $root.selectItemProperties",function(e,t){return{trackCursor:function(){return e.$data.underCursor},click:function(){return e.$root.selectItemProperties}}}),Object(P.addToBindingsCache)("styleunit: position, dxclick: function() {}, visible: isVisible",function(e,t){return{styleunit:function(){return e.$data.position},dxclick:function(){return function(){}},visible:function(){return e.$data.isVisible}}}),Object(P.addToBindingsCache)("styleunit: position, style: { cursor: isVerticalLine ? 'ew-resize' : 'ns-resize' }, routeLineDraggable: { starting: $root.resizeHandler.starting, stopped: function() { resizeStopped(); $root.resizeHandler.stopped(); }, forceResize: resizeHandler }",function(e,t){return{styleunit:function(){return e.$data.position},style:function(){return{cursor:e.$data.isVerticalLine?"ew-resize":"ns-resize"}},routeLineDraggable:function(){return{starting:e.$root.resizeHandler.starting,stopped:function(){e.$data.resizeStopped(),e.$root.resizeHandler.stopped()},forceResize:e.$data.resizeHandler}}}}),Object(P.addToBindingsCache)("template: { name: 'dxdd-routed-connection-line' }",function(e,t){return{template:function(){return{name:"dxdd-routed-connection-line"}}}}),Object(P.addToBindingsCache)("foreach: routeLineWrappers",function(e,t){return{foreach:function(){return e.$data.routeLineWrappers}}}),Object(P.addToBindingsCache)("with: $parent",function(e,t){return{with:function(){return e.$parent}}}),Object(P.addToBindingsCache)("ifnot: isLocked",function(e,t){return{ifnot:function(){return e.$data.isLocked}}}),Object(P.addToBindingsCache)("if: isLocked",function(e,t){return{if:function(){return e.$data.isLocked}}}),Object(P.addToBindingsCache)("styleunit: { lineHeight: positionLineHeightWithoutMargins }, style: css",function(e,t){return{styleunit:function(){return{lineHeight:e.$data.positionLineHeightWithoutMargins}},style:function(){return e.$data.css}}}),Object(P.addToBindingsCache)("template: contenttemplate, styleunit: { 'height': positionLineHeightWithoutMargins, 'width': positionWidthWithoutMargins }",function(e,t){return{template:function(){return e.$data.contenttemplate},styleunit:function(){return{height:e.$data.positionLineHeightWithoutMargins,width:e.$data.positionWidthWithoutMargins}}}}),Object(P.addToBindingsCache)("event: { dblclick: $root.inlineTextEdit.show }, css: {'dxrd-selected': selected, 'dxrd-focused': focused }, resizable: $root.resizeHandler, draggable: $root.dragHandler, styleunit: position, trackCursor: underCursor",function(e,t){return{event:function(){return{dblclick:e.$root.inlineTextEdit.show}},css:function(){return{"dxrd-selected":e.$data.selected,"dxrd-focused":e.$data.focused}},resizable:function(){return e.$root.resizeHandler},draggable:function(){return e.$root.dragHandler},styleunit:function(){return e.$data.position},trackCursor:function(){return e.$data.underCursor}}}),Object(P.addToBindingsCache)("template: contenttemplate, styleunit: { 'height': positionLineHeightWithoutMargins, 'width': positionWidthWithoutMargins}",function(e,t){return{template:function(){return e.$data.contenttemplate},styleunit:function(){return{height:e.$data.positionLineHeightWithoutMargins,width:e.$data.positionWidthWithoutMargins}}}}),Object(P.addToBindingsCache)("dxTextArea: { value: text, onKeyUp: keypressAction, valueChangeEvent: 'keyup' }",function(e,t){return{dxTextArea:function(){return{value:e.$data.text,onKeyUp:e.$data.keypressAction,valueChangeEvent:"keyup"}}}}),Object(P.addToBindingsCache)("text: getControlModel().text",function(e,t){return{text:function(){return e.$data.getControlModel().text}}}),Object(P.addToBindingsCache)("if: !$root.inlineTextEdit.visible()",function(e,t){return{if:function(){return!e.$root.inlineTextEdit.visible()}}}),Object(P.addToBindingsCache)("if: $root.inlineTextEdit.visible",function(e,t){return{if:function(){return e.$root.inlineTextEdit.visible}}}),Object(P.addToBindingsCache)("with: $root.inlineTextEdit",function(e,t){return{with:function(){return e.$root.inlineTextEdit}}}),Object(P.addToBindingsCache)("if: getControlModel().type() === 'Ellipse'",function(e,t){return{if:function(){return"Ellipse"===e.$data.getControlModel().type()}}}),Object(P.addToBindingsCache)("if: getControlModel().type() === 'Condition'",function(e,t){return{if:function(){return"Condition"===e.$data.getControlModel().type()}}}),Object(P.addToBindingsCache)("if: !getControlModel().type()",function(e,t){return{if:function(){return!e.$data.getControlModel().type()}}}),Object(P.addToBindingsCache)("foreach: connectingPoints",function(e,t){return{foreach:function(){return e.$data.connectingPoints}}}),Object(P.addToBindingsCache)("template: 'dxdd-connecting-point'",function(e,t){return{template:function(){return"dxdd-connecting-point"}}}),Object(P.addToBindingsCache)("styleunit: { 'width': Math.min(pageWidth(), $root.surfaceSize()) }, click: function(_, e) { $root.selection.clickHandler(null, e); e.stopPropagation(); }, keyDownActions: $root.actionLists",function(a,e){return{styleunit:function(){return{width:Math.min(a.$data.pageWidth(),a.$root.surfaceSize())}},click:function(){return function(e,t){a.$root.selection.clickHandler(null,t),t.stopPropagation()}},keyDownActions:function(){return a.$root.actionLists}}}),Object(P.addToBindingsCache)("styleunit: { minWidth: Math.min(pageWidth(), $root.surfaceSize()), maxWidth: pageWidth(), maxHeight: pageHeight() + 20 }",function(e,t){return{styleunit:function(){return{minWidth:Math.min(e.$data.pageWidth(),e.$root.surfaceSize()),maxWidth:e.$data.pageWidth(),maxHeight:e.$data.pageHeight()+20}}}}),Object(P.addToBindingsCache)("selectable: { selection: $root.selection, zoom: zoom }",function(e,t){return{selectable:function(){return{selection:e.$root.selection,zoom:e.$data.zoom}}}}),Object(P.addToBindingsCache)("styleunit: { 'width': pageWidth(), 'height': pageHeight() }, trackCursor: underCursor",function(e,t){return{styleunit:function(){return{width:e.$data.pageWidth(),height:e.$data.pageHeight()}},trackCursor:function(){return e.$data.underCursor}}}),Object(P.addToBindingsCache)("foreach: controls",function(e,t){return{foreach:function(){return e.$data.controls}}}),Object(P.addToBindingsCache)("template: { name: isSelected() ? selectiontemplate : template }",function(e,t){return{template:function(){return{name:e.$data.isSelected()?e.$data.selectiontemplate:e.$data.template}}}}),Object(P.addToBindingsCache)("attr: { x1: startPoint.x, y1: startPoint.y, x2: endPoint.x, y2: endPoint.y }",function(e,t){return{attr:function(){return{x1:e.$data.startPoint.x,y1:e.$data.startPoint.y,x2:e.$data.endPoint.x,y2:e.$data.endPoint.y}}}}),Object(P.addToBindingsCache)("styleunit: { 'width': $root.surfaceSize }, click: function(_, e) { $root.selection.clickHandler(null, e); e.stopPropagation(); }, keyDownActions: $root.actionLists",function(a,e){return{styleunit:function(){return{width:a.$root.surfaceSize}},click:function(){return function(e,t){a.$root.selection.clickHandler(null,t),t.stopPropagation()}},keyDownActions:function(){return a.$root.actionLists}}}),Object(P.addToBindingsCache)("dxScrollView: { direction: 'both', showScrollbar: 'onHover', scrollByContent: false, scrollByThumb: true, bounceEnabled: false, useNative: false, height: '100%' }",function(e,t){return{dxScrollView:function(){return{direction:"both",showScrollbar:"onHover",scrollByContent:!1,scrollByThumb:!0,bounceEnabled:!1,useNative:!1,height:"100%"}}}}),Object(P.addToBindingsCache)("styleunit: { 'minWidth': pageWidth, 'minHeight': pageHeight }, trackCursor: { recalculateBounds: true, underCursor: underCursor }",function(e,t){return{styleunit:function(){return{minWidth:e.$data.pageWidth,minHeight:e.$data.pageHeight}},trackCursor:function(){return{recalculateBounds:!0,underCursor:e.$data.underCursor}}}}),Object(P.addToBindingsCache)("trackCursor: { recalculateBounds: true, underCursor: underCursor }, style: { 'z-index' : $parent.dragDropStarted() ? 2 : null }",function(e,t){return{trackCursor:function(){return{recalculateBounds:!0,underCursor:e.$data.underCursor}},style:function(){return{"z-index":e.$parent.dragDropStarted()?2:null}}}}),Object(P.addToBindingsCache)("text: placeholder()",function(e,t){return{text:function(){return e.$data.placeholder()}}}),Object(P.addToBindingsCache)("styleunit: { top: position.top(), left: position.left() }",function(e,t){return{styleunit:function(){return{top:e.$data.position.top(),left:e.$data.position.left()}}}}),Object(P.addToBindingsCache)("attr: {x1 : $data.x, y1: $data.y, x2: $parent.routePoints()[$index()+1].x, y2: $parent.routePoints()[$index()+1].y }",function(e,t){return{attr:function(){return{x1:e.$data.x,y1:e.$data.y,x2:e.$parent.routePoints()[e.$index()+1].x,y2:e.$parent.routePoints()[e.$index()+1].y}}}}),Object(P.addToBindingsCache)("if: tables().length === 0",function(e,t){return{if:function(){return 0===e.$data.tables().length}}}),Object(P.addToBindingsCache)("foreach: relations",function(e,t){return{foreach:function(){return e.$data.relations}}}),Object(P.addToBindingsCache)("foreach: conditions",function(e,t){return{foreach:function(){return e.$data.conditions}}}),Object(P.addToBindingsCache)("if: !isSelected()",function(e,t){return{if:function(){return!e.$data.isSelected()}}}),Object(P.addToBindingsCache)("foreach: tables",function(e,t){return{foreach:function(){return e.$data.tables}}}),Object(P.addToBindingsCache)("if: isSelected()",function(e,t){return{if:function(){return e.$data.isSelected()}}}),Object(P.addToBindingsCache)("template: selectiontemplate",function(e,t){return{template:function(){return e.$data.selectiontemplate}}}),Object(P.addToBindingsCache)("with: $root.columnDragHandler.dragDropConnector",function(e,t){return{with:function(){return e.$root.columnDragHandler.dragDropConnector}}}),Object(P.addToBindingsCache)("foreach: routePoints",function(e,t){return{foreach:function(){return e.$data.routePoints}}}),Object(P.addToBindingsCache)("if: $index() < ($parent.routePoints().length - 1)",function(e,t){return{if:function(){return e.$index()<e.$parent.routePoints().length-1}}}),Object(P.addToBindingsCache)("trackCursor: { recalculateBounds: true, underCursor: underCursor }, draggable: $root.columnDragHandler, css: cssClasses($root.surface(), $root.columnDragHandler, $parent), click: $root.selectItemProperties",function(e,t){return{trackCursor:function(){return{recalculateBounds:!0,underCursor:e.$data.underCursor}},draggable:function(){return e.$root.columnDragHandler},css:function(){return e.$data.cssClasses(e.$root.surface(),e.$root.columnDragHandler,e.$parent)},click:function(){return e.$root.selectItemProperties}}}),Object(P.addToBindingsCache)("dxCheckBox: { value: selectedWrapper }, click: function(surface, e) { surface.toggleSelected(); e.stopPropagation(); return true; }",function(e,t){return{dxCheckBox:function(){return{value:e.$data.selectedWrapper}},click:function(){return function(e,t){return e.toggleSelected(),t.stopPropagation(),!0}}}}),Object(P.addToBindingsCache)("attr: { title: getControlModel().actualName }",function(e,t){return{attr:function(){return{title:e.$data.getControlModel().actualName}}}}),Object(P.addToBindingsCache)("text: getControlModel().actualName",function(e,t){return{text:function(){return e.$data.getControlModel().actualName}}}),Object(P.addToBindingsCache)("trackCursor: underCursor, css: cssClasses(), click: $root.selectItemProperties",function(e,t){return{trackCursor:function(){return e.$data.underCursor},css:function(){return e.$data.cssClasses()},click:function(){return e.$root.selectItemProperties}}}),Object(P.addToBindingsCache)("attr: { title: getControlModel().name }",function(e,t){return{attr:function(){return{title:e.$data.getControlModel().name}}}}),Object(P.addToBindingsCache)("text: getControlModel().name",function(e,t){return{text:function(){return e.$data.getControlModel().name}}}),Object(P.addToBindingsCache)("if: $data.isAscending()",function(e,t){return{if:function(){return e.$data.isAscending()}}}),Object(P.addToBindingsCache)("template: 'dxrd-svg-queryBuilder-sorting_asc'",function(e,t){return{template:function(){return"dxrd-svg-queryBuilder-sorting_asc"}}}),Object(P.addToBindingsCache)("if: $data.isDescending()",function(e,t){return{if:function(){return e.$data.isDescending()}}}),Object(P.addToBindingsCache)("template: 'dxrd-svg-queryBuilder-sorting_desc'",function(e,t){return{template:function(){return"dxrd-svg-queryBuilder-sorting_desc"}}}),Object(P.addToBindingsCache)("if: $data.getControlModel().groupBy",function(e,t){return{if:function(){return e.$data.getControlModel().groupBy}}}),Object(P.addToBindingsCache)("template: 'dxrd-svg-queryBuilder-group_by'",function(e,t){return{template:function(){return"dxrd-svg-queryBuilder-group_by"}}}),Object(P.addToBindingsCache)("if: $data.isAggregate()",function(e,t){return{if:function(){return e.$data.isAggregate()}}}),Object(P.addToBindingsCache)("template: 'dxrd-svg-queryBuilder-aggregate'",function(e,t){return{template:function(){return"dxrd-svg-queryBuilder-aggregate"}}}),Object(P.addToBindingsCache)("resizable: resizable($root.resizeHandler, $element), styleunit: position",function(e,t){return{resizable:function(){return e.$data.resizable(e.$root.resizeHandler,t)},styleunit:function(){return e.$data.position}}}),Object(P.addToBindingsCache)("css: {'dxrd-selected': selected, 'dxrd-focused': focused }, draggable: $root.dragHandler, styleunit: position, trackCursor: underCursor, click: $root.selectItemProperties",function(e,t){return{css:function(){return{"dxrd-selected":e.$data.selected,"dxrd-focused":e.$data.focused}},draggable:function(){return e.$root.dragHandler},styleunit:function(){return e.$data.position},trackCursor:function(){return e.$data.underCursor},click:function(){return e.$root.selectItemProperties}}}),Object(P.addToBindingsCache)("styleunit: { lineHeight: position.lineHeight }, style: css",function(e,t){return{styleunit:function(){return{lineHeight:e.$data.position.lineHeight}},style:function(){return e.$data.css}}}),Object(P.addToBindingsCache)("template: contenttemplate, styleunit: { 'height': position.lineHeight, 'width': position.width }",function(e,t){return{template:function(){return e.$data.contenttemplate},styleunit:function(){return{height:e.$data.position.lineHeight,width:e.$data.position.width}}}}),Object(P.addToBindingsCache)("dxCheckBox: { value: selectedWrapper }, click: function(surface, e) { $root.undoEngine().start(); surface.toggleSelected(); $root.undoEngine().end(); e.stopPropagation(); return true; }",function(a,e){return{dxCheckBox:function(){return{value:a.$data.selectedWrapper}},click:function(){return function(e,t){return a.$root.undoEngine().start(),e.toggleSelected(),a.$root.undoEngine().end(),t.stopPropagation(),!0}}}}),Object(P.addToBindingsCache)("text: $root.columnsLoadingMsg()",function(e,t){return{text:function(){return e.$root.columnsLoadingMsg()}}}),Object(P.addToBindingsCache)("style: { cursor: selected() ? 'move' : 'default' }",function(e,t){return{style:function(){return{cursor:e.$data.selected()?"move":"default"}}}}),Object(P.addToBindingsCache)("event: { dblclick: $root.inlineTextEdit.show }, style: { cursor: selected() ? 'move' : 'default' }",function(e,t){return{event:function(){return{dblclick:e.$root.inlineTextEdit.show}},style:function(){return{cursor:e.$data.selected()?"move":"default"}}}}),Object(P.addToBindingsCache)("text: getControlModel().displaySourceName",function(e,t){return{text:function(){return e.$data.getControlModel().displaySourceName}}}),Object(P.addToBindingsCache)("if: $data.isSelected()",function(e,t){return{if:function(){return e.$data.isSelected()}}}),Object(P.addToBindingsCache)("template: titletemplate",function(e,t){return{template:function(){return e.$data.titletemplate}}}),Object(P.addToBindingsCache)("ifnot: $data.isInitialized()",function(e,t){return{ifnot:function(){return e.$data.isInitialized()}}}),Object(P.addToBindingsCache)("if: $data.isInitialized()",function(e,t){return{if:function(){return e.$data.isInitialized()}}}),Object(P.addToBindingsCache)("template: { name: asterisk.template, data: asterisk }",function(e,t){return{template:function(){return{name:e.$data.asterisk.template,data:e.$data.asterisk}}}}),Object(P.addToBindingsCache)("foreach: columns",function(e,t){return{foreach:function(){return e.$data.columns}}}),Object(P.addToBindingsCache)("lazy: { template: $data.template }",function(e,t){return{lazy:function(){return{template:e.$data.template}}}}),Object(P.addToBindingsCache)("if: !$root.inlineTextEdit.visible() || !selected()",function(e,t){return{if:function(){return!e.$root.inlineTextEdit.visible()||!e.$data.selected()}}}),Object(P.addToBindingsCache)("if: $root.inlineTextEdit.visible() && selected()",function(e,t){return{if:function(){return e.$root.inlineTextEdit.visible()&&e.$data.selected()}}}),Object(P.addToBindingsCache)("dxPopup: { showTitle: true, resizeEnabled: true, width: 700, height: 500, maxHeight: '95%', maxWidth: '95%', minHeight: 300, minWidth: 400, title: title(), visible: popupVisible, wrapperAttr: { class: 'dx-filtereditor' }, toolbarItems: buttonItems, showCloseButton: true, container: $root.getPopupContainer($element), position: { of: $root.getPopupContainer($element) }, }",function(e,t){return{dxPopup:function(){return{showTitle:!0,resizeEnabled:!0,width:700,height:500,maxHeight:"95%",maxWidth:"95%",minHeight:300,minWidth:400,title:e.$data.title(),visible:e.$data.popupVisible,wrapperAttr:{class:"dx-filtereditor"},toolbarItems:e.$data.buttonItems,showCloseButton:!0,container:e.$root.getPopupContainer(t),position:{of:e.$root.getPopupContainer(t)}}}}}),Object(P.addToBindingsCache)("text: queryName",function(e,t){return{text:function(){return e.$data.queryName}}}),Object(P.addToBindingsCache)("service: { name: 'createRelation' }",function(e,t){return{service:function(){return{name:"createRelation"}}}}),Object(P.addToBindingsCache)("dxPopupWithAutoHeight: { height: '300px', focusStateEnabled: false, wrapperAttr: { class: 'dx-selectbox-popup-wrapper dx-dropdownlist-popup-wrapper dx-filtereditor-criteriaoperator-popup dx-dropdowneditor-overlay' }, position: $root.rtl ? { my: 'right top', at: 'right bottom', of: popupService.target } : { my: 'left top', at: 'left bottom', of: popupService.target }, container: $root.getPopupContainer($element), target: popupService.target, showTitle: false, showCloseButton: false, animation: {}, hideOnOutsideClick: true, shading: false, minWidth:'170px', maxWidth:'500px', width: 'auto', visible: popupService.visible }",function(e,t){return{dxPopupWithAutoHeight:function(){return{height:"300px",focusStateEnabled:!1,wrapperAttr:{class:"dx-selectbox-popup-wrapper dx-dropdownlist-popup-wrapper dx-filtereditor-criteriaoperator-popup dx-dropdowneditor-overlay"},position:e.$root.rtl?{my:"right top",at:"right bottom",of:e.$data.popupService.target}:{my:"left top",at:"left bottom",of:e.$data.popupService.target},container:e.$root.getPopupContainer(t),target:e.$data.popupService.target,showTitle:!1,showCloseButton:!1,animation:{},hideOnOutsideClick:!0,shading:!1,minWidth:"170px",maxWidth:"500px",width:"auto",visible:e.$data.popupService.visible}}}}),Object(P.addToBindingsCache)("foreach: masterQueries",function(e,t){return{foreach:function(){return e.$data.masterQueries}}}),Object(P.addToBindingsCache)("template: { name: 'dx-masterDetail-editor-relation', foreach: relations }",function(e,t){return{template:function(){return{name:"dx-masterDetail-editor-relation",foreach:e.$data.relations}}}}),Object(P.addToBindingsCache)("attr: { title: $data.getTitle() }, text: queryName",function(e,t){return{attr:function(){return{title:e.$data.getTitle()}},text:function(){return e.$data.queryName}}}),Object(P.addToBindingsCache)("service: { name: 'setColumn' }",function(e,t){return{service:function(){return{name:"setColumn"}}}}),Object(P.addToBindingsCache)("dxclick: function() { $parent.remove($data); }",function(e,t){return{dxclick:function(){return function(){e.$parent.remove(e.$data)}}}}),Object(P.addToBindingsCache)("dxTextBox: { value: relationName, onFocusOut: function() { isEditable(false); } }, focus: { on: isEditable }",function(e,t){return{dxTextBox:function(){return{value:e.$data.relationName,onFocusOut:function(){e.$data.isEditable(!1)}}},focus:function(){return{on:e.$data.isEditable}}}}),Object(P.addToBindingsCache)("text: relationName, click: function() { isEditable(true); }",function(e,t){return{text:function(){return e.$data.relationName},click:function(){return function(){e.$data.isEditable(!0)}}}}),Object(P.addToBindingsCache)("dxclick: create",function(e,t){return{dxclick:function(){return e.$data.create}}}),Object(P.addToBindingsCache)("foreach: keyColumns",function(e,t){return{foreach:function(){return e.$data.keyColumns}}}),Object(P.addToBindingsCache)("template: { name: 'dx-masterDetail-editor-keyColumn', data: master }",function(e,t){return{template:function(){return{name:"dx-masterDetail-editor-keyColumn",data:e.$data.master}}}}),Object(P.addToBindingsCache)("template: { name: 'dx-masterDetail-editor-keyColumn', data: detail }",function(e,t){return{template:function(){return{name:"dx-masterDetail-editor-keyColumn",data:e.$data.detail}}}}),Object(P.addToBindingsCache)("text: target.column() || target.selectColumnText(), dxclick: showPopup, css: { 'dxd-state-selected': target.isSelected, 'default': !target.column() }",function(e,t){return{text:function(){return e.$data.target.column()||e.$data.target.selectColumnText()},dxclick:function(){return e.$data.showPopup},css:function(){return{"dxd-state-selected":e.$data.target.isSelected,default:!e.$data.target.column()}}}}),Object(P.addToBindingsCache)("dxdTableView: $data.value",function(e,t){return{dxdTableView:function(){return e.$data.value}}}),Object(P.addToBindingsCache)("dxPopup: { animation: { show: { type: 'fade', from: 0, to: 1, duration: 700 }, hide: { type: 'fade', from: 1, to: 0, duration: 700 } }, wrapperAttr: { class: 'dxqb-preview' }, visible: isVisible, title: title(), showTitle: true, resizeEnabled: true, shading: true, shadingColor: 'transparent', fullScreen: false, width: 800, height: 544, container: container($element), position: { of: container($element) }, onHidden: function() { $data.data.value(null) }, focusStateEnabled: false }",function(e,t){return{dxPopup:function(){return{animation:{show:{type:"fade",from:0,to:1,duration:700},hide:{type:"fade",from:1,to:0,duration:700}},wrapperAttr:{class:"dxqb-preview"},visible:e.$data.isVisible,title:e.$data.title(),showTitle:!0,resizeEnabled:!0,shading:!0,shadingColor:"transparent",fullScreen:!1,width:800,height:544,container:e.$data.container(t),position:{of:e.$data.container(t)},onHidden:function(){e.$data.data.value(null)},focusStateEnabled:!1}}}}),Object(P.addToBindingsCache)("dxLoadIndicator: { visible: true }",function(e,t){return{dxLoadIndicator:function(){return{visible:!0}}}}),Object(P.addToBindingsCache)("dxButton: { text: okButtonText(), onClick: okButtonHandler, disabled: isLoading }",function(e,t){return{dxButton:function(){return{text:e.$data.okButtonText(),onClick:e.$data.okButtonHandler,disabled:e.$data.isLoading}}}}),Object(P.addToBindingsCache)("dxTextArea: { value: value, valueChangeEvent: 'keyup', readOnly: true }",function(e,t){return{dxTextArea:function(){return{value:e.$data.value,valueChangeEvent:"keyup",readOnly:!0}}}}),Object(P.addToBindingsCache)("dxAceEditor: { value: value, options: aceOptions, additionalOptions: additionalOptions }",function(e,t){return{dxAceEditor:function(){return{value:e.$data.value,options:e.$data.aceOptions,additionalOptions:e.$data.additionalOptions}}}}),Object(P.addToBindingsCache)("if: data && !isLoading()",function(e,t){return{if:function(){return e.$data.data&&!e.$data.isLoading()}}}),Object(P.addToBindingsCache)("template: { name: template, data: data }",function(e,t){return{template:function(){return{name:e.$data.template,data:e.$data.data}}}}),Object(P.addToBindingsCache)("attr: { class: 'dxd-tableview-title-cell dxd-border-secondary dxd-tableview-resizable' }",function(e,t){return{attr:function(){return{class:"dxd-tableview-title-cell dxd-border-secondary dxd-tableview-resizable"}}}}),Object(P.addToBindingsCache)("text: name",function(e,t){return{text:function(){return e.$data.name}}}),Object(P.addToBindingsCache)("dxScrollView: { direction: 'both', scrollByContent: false, showScrollbar: 'always', scrollByThumb: true, bounceEnabled: false, useNative: false, onScroll: $data.onDataScroll, onInitialized: $data.onDataScrollInitialized }",function(e,t){return{dxScrollView:function(){return{direction:"both",scrollByContent:!1,showScrollbar:"always",scrollByThumb:!0,bounceEnabled:!1,useNative:!1,onScroll:e.$data.onDataScroll,onInitialized:e.$data.onDataScrollInitialized}}}}),Object(P.addToBindingsCache)("text: $data, attr: { class: 'dxd-tableview-cell-text dxd-text-primary dxd-tableview-resizable' + $index() }",function(e,t){return{text:function(){return e.$data},attr:function(){return{class:"dxd-tableview-cell-text dxd-text-primary dxd-tableview-resizable"+e.$index()}}}}),Object(P.addToBindingsCache)("text: $parents[1].getImageTooLargeText($data), attr: { class: 'dxd-tableview-cell-text dxd-text-primary dxd-tableview-resizable' + $index() }",function(e,t){return{text:function(){return e.$parents[1].getImageTooLargeText(e.$data)},attr:function(){return{class:"dxd-tableview-cell-text dxd-text-primary dxd-tableview-resizable"+e.$index()}}}}),Object(P.addToBindingsCache)("attr: { class: 'dxd-tableview-cell-text dxd-text-primary dxd-tableview-resizable' + $index() }",function(e,t){return{attr:function(){return{class:"dxd-tableview-cell-text dxd-text-primary dxd-tableview-resizable"+e.$index()}}}}),Object(P.addToBindingsCache)("attr: { src: 'data:image/bmp;base64,' + $data }",function(e,t){return{attr:function(){return{src:"data:image/bmp;base64,"+e.$data}}}}),Object(P.addToBindingsCache)("text: noDataText()",function(e,t){return{text:function(){return e.$data.noDataText()}}}),Object(P.addToBindingsCache)("foreach: rtl ? data.schema.reverse() : data.schema",function(e,t){return{foreach:function(){return e.$data.rtl?e.$data.data.schema.reverse():e.$data.data.schema}}}),Object(P.addToBindingsCache)("if: data.values",function(e,t){return{if:function(){return e.$data.data.values}}}),Object(P.addToBindingsCache)("foreach: data.values",function(e,t){return{foreach:function(){return e.$data.data.values}}}),Object(P.addToBindingsCache)("foreach: $parent.rtl ? $data.reverse() : $data",function(e,t){return{foreach:function(){return e.$parent.rtl?e.$data.reverse():e.$data}}}),Object(P.addToBindingsCache)("ifnot: $parents[1].isImage($index())",function(e,t){return{ifnot:function(){return e.$parents[1].isImage(e.$index())}}}),Object(P.addToBindingsCache)("if: $parents[1].isImage($index())",function(e,t){return{if:function(){return e.$parents[1].isImage(e.$index())}}}),Object(P.addToBindingsCache)("if: $parents[1].isImageTooLarge($data)",function(e,t){return{if:function(){return e.$parents[1].isImageTooLarge(e.$data)}}}),Object(P.addToBindingsCache)("ifnot: $parents[1].isImageTooLarge($data)",function(e,t){return{ifnot:function(){return e.$parents[1].isImageTooLarge(e.$data)}}}),Object(P.addToBindingsCache)("foreach: data.values[0]",function(e,t){return{foreach:function(){return e.$data.data.values[0]}}}),Object(P.addToBindingsCache)("ifnot: data.values",function(e,t){return{ifnot:function(){return e.$data.data.values}}}),Object(P.addToBindingsCache)("treelist: treeListOptions",function(e,t){return{treelist:function(){return e.$data.treeListOptions}}}),Object(P.addToBindingsCache)("treeListSearchPanel: { controllers: $data.fieldListModel.treeListOptions().treeListController }",function(e,t){return{treeListSearchPanel:function(){return{controllers:e.$data.fieldListModel.treeListOptions().treeListController}}}}),Object(P.addToBindingsCache)("dxScrollView: { showScrollbar: 'onHover', scrollByContent: false, scrollByThumb: true, bounceEnabled: false, useNative: false }",function(e,t){return{dxScrollView:function(){return{showScrollbar:"onHover",scrollByContent:!1,scrollByThumb:!0,bounceEnabled:!1,useNative:!1}}}}),Object(P.addToBindingsCache)("dxCollectionEditor: $data",function(e,t){return{dxCollectionEditor:function(){return e.$data}}}),Object(P.addToBindingsCache)("css: { 'dx-image-expanded': !collapsed() }, template: 'dxrd-svg-collapsed'",function(e,t){return{css:function(){return{"dx-image-expanded":!e.$data.collapsed()}},template:function(){return"dxrd-svg-collapsed"}}}),Object(P.addToBindingsCache)("text: $root.getLocalization($parent.name), attr: { title: $root.getLocalization($parent.name) }",function(e,t){return{text:function(){return e.$root.getLocalization(e.$parent.name)},attr:function(){return{title:e.$root.getLocalization(e.$parent.name)}}}}),Object(P.addToBindingsCache)("dxPropertyGrid: { target: value, level: 1, parentDisabled: editor.disabled }",function(e,t){return{dxPropertyGrid:function(){return{target:e.$data.value,level:1,parentDisabled:e.$data.editor.disabled}}}}),Object(P.addToBindingsCache)("foreach: properties.getEditors()",function(e,t){return{foreach:function(){return e.$data.properties.getEditors()}}}),Object(P.addToBindingsCache)('template: { name: "dxqb-fieldlist-wrapper", data: fieldListModel }',function(e,t){return{template:function(){return{name:"dxqb-fieldlist-wrapper",data:e.$data.fieldListModel}}}}),Object(P.addToBindingsCache)("click: $root.findControl",function(e,t){return{click:function(){return e.$root.findControl}}}),Object(P.addToBindingsCache)("template: {name: 'dxqb-toolbar-items', data: actionLists.toolbarItems }",function(e,t){return{template:function(){return{name:"dxqb-toolbar-items",data:e.$data.actionLists.toolbarItems}}}}),Object(P.addToBindingsCache)("template: {name: ko.unwrap($data.imageTemplateName), if: !!ko.unwrap($data.imageTemplateName)}, attr: { class: 'dxrd-toolbar-item-image dxd-icon-highlighted dxd-state-normal ' + (ko.unwrap($data.imageClassName) || ''), title: $data.displayText && $data.displayText() || text }, dxclick: function() { if((typeof $data.disabled === 'function') && !disabled() || !disabled) { clickAction($root.model && $root.model()); } }, css: {'dxrd-disabled-button': disabled, 'dxd-state-active': $data.selected }",function(e,t){return{template:function(){return{name:e.ko.unwrap(e.$data.imageTemplateName),if:!!e.ko.unwrap(e.$data.imageTemplateName)}},attr:function(){return{class:"dxrd-toolbar-item-image dxd-icon-highlighted dxd-state-normal "+(e.ko.unwrap(e.$data.imageClassName)||""),title:e.$data.displayText&&e.$data.displayText()||e.$data.text}},dxclick:function(){return function(){("function"!=typeof e.$data.disabled||e.$data.disabled())&&e.$data.disabled||e.$data.clickAction(e.$root.model&&e.$root.model())}},css:function(){return{"dxrd-disabled-button":e.$data.disabled,"dxd-state-active":e.$data.selected}}}}),Object(P.addToBindingsCache)("lazy: { template: templateName }",function(e,t){return{lazy:function(){return{template:e.$data.templateName}}}}),Object(P.addToBindingsCache)("dxExpressionEditor: getOptions({ options: value, fieldListProvider: $root.parametersBindingsProvider, displayNameProvider: $root.displayNameProvider && $root.displayNameProvider() })",function(e,t){return{dxExpressionEditor:function(){return e.$data.getOptions({options:e.$data.value,fieldListProvider:e.$root.parametersBindingsProvider,displayNameProvider:e.$root.displayNameProvider&&e.$root.displayNameProvider()})}}}),Object(P.addToBindingsCache)("visible: target.isEditable",function(e,t){return{visible:function(){return e.$data.target.isEditable}}}),Object(P.addToBindingsCache)("dxTextBox: { value: target._parameterName, onFocusOut: function() { target.createParameter(); target.isEditable(false); } }",function(e,t){return{dxTextBox:function(){return{value:e.$data.target._parameterName,onFocusOut:function(){e.$data.target.createParameter(),e.$data.target.isEditable(!1)}}}}}),Object(P.addToBindingsCache)("text: target.parameterName, dxclick: showPopup, css: { 'dxd-state-selected': target.isSelected, 'default': target.isDefaultTextDisplayed() }, visible: $data.target.isEditable() === false",function(e,t){return{text:function(){return e.$data.target.parameterName},dxclick:function(){return e.$data.showPopup},css:function(){return{"dxd-state-selected":e.$data.target.isSelected,default:e.$data.target.isDefaultTextDisplayed()}},visible:function(){return!1===e.$data.target.isEditable()}}}),Object(P.addToBindingsCache)("text: name, attr: { 'title': name }, click: function() { $parents[1].click($data); }",function(e,t){return{text:function(){return e.$data.name},attr:function(){return{title:e.$data.name}},click:function(){return function(){e.$parents[1].click(e.$data)}}}}),Object(P.addToBindingsCache)("text: $parent.viewModel.defaultDisplay(), click: function() { $parent.viewModel.isEditable(true); $parent.viewModel._parameterName(''); $parent.visible(false); }",function(e,t){return{text:function(){return e.$parent.viewModel.defaultDisplay()},click:function(){return function(){e.$parent.viewModel.isEditable(!0),e.$parent.viewModel._parameterName(""),e.$parent.visible(!1)}}}}),Object(P.addToBindingsCache)("text: name, click: function() { $parent.click($data); }",function(e,t){return{text:function(){return e.$data.name},click:function(){return function(){e.$parent.click(e.$data)}}}}),Object(P.addToBindingsCache)("if: $parent.viewModel.canCreateParameters",function(e,t){return{if:function(){return e.$parent.viewModel.canCreateParameters}}}),Object(P.addToBindingsCache)("event: { dblclick: function() { $data.dblClickHandler ? $data.dblClickHandler($data) : $data.toggleCollapsed() } }, styleunit: padding, css: { 'dx-treelist-item-selected dxd-state-selected': isSelected() || isMultiSelected() }",function(e,t){return{event:function(){return{dblclick:function(){e.$data.dblClickHandler?e.$data.dblClickHandler(e.$data):e.$data.toggleCollapsed()}}},styleunit:function(){return e.$data.padding},css:function(){return{"dx-treelist-item-selected dxd-state-selected":e.$data.isSelected()||e.$data.isMultiSelected()}}}}),Object(P.addToBindingsCache)('template: "dxqb-treelist-header-item-with-search"',function(e,t){return{template:function(){return"dxqb-treelist-header-item-with-search"}}}),Object(P.addToBindingsCache)("css: $data._extendCssClass('type-page')",function(e,t){return{css:function(){return e.$data._extendCssClass("type-page")}}}),Object(P.addToBindingsCache)("event: { click: $parent._itemClick, dblclick: function() { $parent._goToNextPage() } }, attr: { class: 'dxd-back-highlighted dxd-state-normal dxrd-wizard-type-item dx-fontsize-reestablished dxrd-wizard-type-item-border-color dxd-list-item-back-color ' + $parent._extendCssClass('type-item')}, css: { 'dxd-border-secondary dxd-back-secondary': $parent._IsSelected($data) }",function(e,t){return{event:function(){return{click:e.$parent._itemClick,dblclick:function(){e.$parent._goToNextPage()}}},attr:function(){return{class:"dxd-back-highlighted dxd-state-normal dxrd-wizard-type-item dx-fontsize-reestablished dxrd-wizard-type-item-border-color dxd-list-item-back-color "+e.$parent._extendCssClass("type-item")}},css:function(){return{"dxd-border-secondary dxd-back-secondary":e.$parent._IsSelected(e.$data)}}}}),Object(P.addToBindingsCache)("attr: { class: 'dxrd-wizard-type-image ' + $parent._extendCssClass('type-image') }, css: imageClassName, template: imageTemplateName",function(e,t){return{attr:function(){return{class:"dxrd-wizard-type-image "+e.$parent._extendCssClass("type-image")}},css:function(){return e.$data.imageClassName},template:function(){return e.$data.imageTemplateName}}}),Object(P.addToBindingsCache)("searchHighlighting: { text: text, textToSearch: $parent._textToSearch }, attr: { title: text }, css: $parent._extendCssClass('type-text')",function(e,t){return{searchHighlighting:function(){return{text:e.$data.text,textToSearch:e.$parent._textToSearch}},attr:function(){return{title:e.$data.text}},css:function(){return e.$parent._extendCssClass("type-text")}}}),Object(P.addToBindingsCache)("text: text, attr: { title: text }, css: $parent._extendCssClass('type-text')",function(e,t){return{text:function(){return e.$data.text},attr:function(){return{title:e.$data.text}},css:function(){return e.$parent._extendCssClass("type-text")}}}),Object(P.addToBindingsCache)("foreach: typeItems",function(e,t){return{foreach:function(){return e.$data.typeItems}}}),Object(P.addToBindingsCache)("template: 'dxrd-page-choose-type-item'",function(e,t){return{template:function(){return"dxrd-page-choose-type-item"}}}),Object(P.addToBindingsCache)("if: !!$parent._textToSearch",function(e,t){return{if:function(){return!!e.$parent._textToSearch}}}),Object(P.addToBindingsCache)("ifnot: !!$parent._textToSearch",function(e,t){return{ifnot:function(){return!!e.$parent._textToSearch}}}),Object(P.addToBindingsCache)("treeListSearchPanel: {controllers: ko.unwrap(_fieldListModel).treeListController}",function(e,t){return{treeListSearchPanel:function(){return{controllers:e.ko.unwrap(e.$data._fieldListModel).treeListController}}}}),Object(P.addToBindingsCache)("dxScrollView: { showScrollbar: 'onHover', height: _scrollViewHeight }",function(e,t){return{dxScrollView:function(){return{showScrollbar:"onHover",height:e.$data._scrollViewHeight}}}}),Object(P.addToBindingsCache)("treelist: _fieldListModel",function(e,t){return{treelist:function(){return e.$data._fieldListModel}}}),Object(P.addToBindingsCache)("dxLoadPanel: _loadPanelViewModel($element)",function(e,t){return{dxLoadPanel:function(){return e.$data._loadPanelViewModel(t)}}}),Object(P.addToBindingsCache)("dxButtonWithTemplate: { onClick: function() { clickAction($parent); }, icon: $data.imageTemplateName, iconClass: $data.imageClassName , disabled: $data.disabled && $data.disabled() }, attr: { title: text }",function(e,t){return{dxButtonWithTemplate:function(){return{onClick:function(){e.$data.clickAction(e.$parent)},icon:e.$data.imageTemplateName,iconClass:e.$data.imageClassName,disabled:e.$data.disabled&&e.$data.disabled()}},attr:function(){return{title:e.$data.text}}}}),Object(P.addToBindingsCache)("template: { name: 'dx-popover-list-items', data: ko.utils.extend($parent.data, { className: 'dxrd-federation-addqueries-popover', position: $root.rtl ? 'right' : 'left', popupContainer: $root.getPopupContainer, width: 150 }) }",function(e,t){return{template:function(){return{name:"dx-popover-list-items",data:e.ko.utils.extend(e.$parent.data,{className:"dxrd-federation-addqueries-popover",position:e.$root.rtl?"right":"left",popupContainer:e.$root.getPopupContainer,width:150})}}}}),Object(P.addToBindingsCache)("resizable: gridResizeHelper.resizable($root.resizeHandler, 's')",function(e,t){return{resizable:function(){return e.$data.gridResizeHelper.resizable(e.$root.resizeHandler,"s")}}}),Object(P.addToBindingsCache)("dxQueryBuilderSurface: queryBuilderSurfaceCreator",function(e,t){return{dxQueryBuilderSurface:function(){return e.$data.queryBuilderSurfaceCreator}}}),Object(P.addToBindingsCache)("dxdAccordion: { collapsed: joinResultCollapsed }",function(e,t){return{dxdAccordion:function(){return{collapsed:e.$data.joinResultCollapsed}}}}),Object(P.addToBindingsCache)("template: 'dxrd-svg-collapsed', css: { 'dx-image-expanded': !joinResultCollapsed() }",function(e,t){return{template:function(){return"dxrd-svg-collapsed"},css:function(){return{"dx-image-expanded":!e.$data.joinResultCollapsed()}}}}),Object(P.addToBindingsCache)("text: $root.getLocalization('Join result', 'DataAccessUIStringId.FederationDataSourceQueryBuilder_SelectResult')",function(e,t){return{text:function(){return e.$root.getLocalization("Join result","DataAccessUIStringId.FederationDataSourceQueryBuilder_SelectResult")}}}),Object(P.addToBindingsCache)("style: { height: resultGridHeight }",function(e,t){return{style:function(){return{height:e.$data.resultGridHeight}}}}),Object(P.addToBindingsCache)("dxButton: { icon: 'add', disabled: addRowDisabled, onClick:addRow }",function(e,t){return{dxButton:function(){return{icon:"add",disabled:e.$data.addRowDisabled,onClick:e.$data.addRow}}}}),Object(P.addToBindingsCache)("dxDataGrid: columnsGrid",function(e,t){return{dxDataGrid:function(){return e.$data.columnsGrid}}}),Object(P.addToBindingsCache)("text: cellInfo.column",function(e,t){return{text:function(){return e.$data.cellInfo.column}}}),Object(P.addToBindingsCache)("dxDropDownBox: { dataSource: $data.allColumns, dropDownOptions: { container: $root.getPopupContainer($element), width: $root.calculateWithZoomFactor(357) }, popupPosition: { boundary: $root.getPopupContainer($element) }, value: cellInfo.key, valueExpr: 'key', displayExpr: 'column' }, visible: !$data.isExpression()",function(e,t){return{dxDropDownBox:function(){return{dataSource:e.$data.allColumns,dropDownOptions:{container:e.$root.getPopupContainer(t),width:e.$root.calculateWithZoomFactor(357)},popupPosition:{boundary:e.$root.getPopupContainer(t)},value:e.$data.cellInfo.key,valueExpr:"key",displayExpr:"column"}},visible:function(){return!e.$data.isExpression()}}}),Object(P.addToBindingsCache)("dxDataGrid: { dataSource: $data.allColumns, keyExpr: 'key', remoteOperations: true, height: $root.calculateWithZoomFactor(250), columns: [{ dataField: 'column', sortOrder: 'asc' } , { dataField: 'table'}], hoverStateEnabled: true, selection: { mode: 'single' }, selectedRowKeys: [cellInfo.key], focusedRowEnabled: true, focusedRowKey: cellInfo.key, onSelectionChanged: $data.changeColumn }",function(e,t){return{dxDataGrid:function(){return{dataSource:e.$data.allColumns,keyExpr:"key",remoteOperations:!0,height:e.$root.calculateWithZoomFactor(250),columns:[{dataField:"column",sortOrder:"asc"},{dataField:"table"}],hoverStateEnabled:!0,selection:{mode:"single"},selectedRowKeys:[e.$data.cellInfo.key],focusedRowEnabled:!0,focusedRowKey:e.$data.cellInfo.key,onSelectionChanged:e.$data.changeColumn}}}}),Object(P.addToBindingsCache)("dxExpressionEditor: { options: expression, fieldListProvider: itemsProvider, displayNameProvider: $root.displayNameProvider && $root.displayNameProvider() }, visible: $data.isExpression",function(e,t){return{dxExpressionEditor:function(){return{options:e.$data.expression,fieldListProvider:e.$data.itemsProvider,displayNameProvider:e.$root.displayNameProvider&&e.$root.displayNameProvider()}},visible:function(){return e.$data.isExpression}}}),Object(P.addToBindingsCache)("template: { name: 'dx-wizard-menu-box-editorswitch', data: $data }",function(e,t){return{template:function(){return{name:"dx-wizard-menu-box-editorswitch",data:e.$data}}}}),Object(P.addToBindingsCache)("text: $data.transformGridTitle",function(e,t){return{text:function(){return e.$data.transformGridTitle}}}),Object(P.addToBindingsCache)("dxDataGrid: transformGrid",function(e,t){return{dxDataGrid:function(){return e.$data.transformGrid}}}),Object(P.addToBindingsCache)("dxdAccordion: { collapsed: transformResultCollapsed }",function(e,t){return{dxdAccordion:function(){return{collapsed:e.$data.transformResultCollapsed}}}}),Object(P.addToBindingsCache)("template: 'dxrd-svg-collapsed', css: { 'dx-image-expanded': !transformResultCollapsed() }",function(e,t){return{template:function(){return"dxrd-svg-collapsed"},css:function(){return{"dx-image-expanded":!e.$data.transformResultCollapsed()}}}}),Object(P.addToBindingsCache)("text: $data.transformResultGridTitle",function(e,t){return{text:function(){return e.$data.transformResultGridTitle}}}),Object(P.addToBindingsCache)("treelist: resultFieldListModel",function(e,t){return{treelist:function(){return e.$data.resultFieldListModel}}}),Object(P.addToBindingsCache)("dxCheckBox: transform",function(e,t){return{dxCheckBox:function(){return e.$data.transform}}}),Object(P.addToBindingsCache)("dxPopup: { showTitle: true, title: title(), wrapperAttr: { class: cssClass }, visible: popupVisible, toolbarItems: buttonItems, showCloseButton: true, fullScreen: false, maxHeight: maxHeight, height: height, width: width, onShowing: function(e) { $data.loaded(true); }, rtlEnabled: rtl, onHiding: onHiding, container: getPopupContainer($element), position: { of: getPopupContainer($element)}, resizeEnabled: true, minHeight: 450, minWidth: 650 }",function(t,e){return{dxPopup:function(){return{showTitle:!0,title:t.$data.title(),wrapperAttr:{class:t.$data.cssClass},visible:t.$data.popupVisible,toolbarItems:t.$data.buttonItems,showCloseButton:!0,fullScreen:!1,maxHeight:t.$data.maxHeight,height:t.$data.height,width:t.$data.width,onShowing:function(e){t.$data.loaded(!0)},rtlEnabled:t.$data.rtl,onHiding:t.$data.onHiding,container:t.$data.getPopupContainer(e),position:{of:t.$data.getPopupContainer(e)},resizeEnabled:!0,minHeight:450,minWidth:650}}}}),Object(P.addToBindingsCache)("resizable: resizeHelper.resizable($root.resizeHandler, 'e')",function(e,t){return{resizable:function(){return e.$data.resizeHelper.resizable(e.$root.resizeHandler,"e")}}}),Object(P.addToBindingsCache)("treelist: fieldListModel",function(e,t){return{treelist:function(){return e.$data.fieldListModel}}}),Object(P.addToBindingsCache)("dxDataGrid: sourcesGrid",function(e,t){return{dxDataGrid:function(){return e.$data.sourcesGrid}}}),Object(P.addToBindingsCache)("dxDataGrid: aliasGrid",function(e,t){return{dxDataGrid:function(){return e.$data.aliasGrid}}}),Object(P.addToBindingsCache)("if: loaded",function(e,t){return{if:function(){return e.$data.loaded}}}),Object(P.addToBindingsCache)("template: { name: popupContentTemplate }",function(e,t){return{template:function(){return{name:e.$data.popupContentTemplate}}}}),Object(P.addToBindingsCache)("css: { 'dx-rtl': $root.rtl, 'dx-ltr': !$root.rtl }",function(e,t){return{css:function(){return{"dx-rtl":e.$root.rtl,"dx-ltr":!e.$root.rtl}}}}),Object(P.addToBindingsCache)("css: _extendCssClass",function(e,t){return{css:function(){return e.$data._extendCssClass}}}),Object(P.addToBindingsCache)("visible: $data.navigationPanel().isVisible",function(e,t){return{visible:function(){return e.$data.navigationPanel().isVisible}}}),Object(P.addToBindingsCache)("text: _description(), attr: {'title': _description() }",function(e,t){return{text:function(){return e.$data._description()},attr:function(){return{title:e.$data._description()}}}}),Object(P.addToBindingsCache)("foreach: _steps",function(e,t){return{foreach:function(){return e.$data._steps}}}),Object(P.addToBindingsCache)("visible: $data.visible",function(e,t){return{visible:function(){return e.$data.visible}}}),Object(P.addToBindingsCache)("click: $data.clickAction, text: $data.text, attr: {'title': $data.text }, css: { 'dxrd-disabled': $data.disabled, 'dxd-back-secondary': $data.isActive() }",function(e,t){return{click:function(){return e.$data.clickAction},text:function(){return e.$data.text},attr:function(){return{title:e.$data.text}},css:function(){return{"dxrd-disabled":e.$data.disabled,"dxd-back-secondary":e.$data.isActive()}}}}),Object(P.addToBindingsCache)("visible: $data.isActive",function(e,t){return{visible:function(){return e.$data.isActive}}}),Object(P.addToBindingsCache)("css: { 'withoutPanel': !$data.navigationPanel().isVisible() }",function(e,t){return{css:function(){return{withoutPanel:!e.$data.navigationPanel().isVisible()}}}}),Object(P.addToBindingsCache)("text: _pageDescription()",function(e,t){return{text:function(){return e.$data._pageDescription()}}}),Object(P.addToBindingsCache)("template: { name: template, data: page }",function(e,t){return{template:function(){return{name:e.$data.template,data:e.$data.page}}}}),Object(P.addToBindingsCache)("dxButton: cancelButton",function(e,t){return{dxButton:function(){return e.$data.cancelButton}}}),Object(P.addToBindingsCache)("dxButton: finishButton",function(e,t){return{dxButton:function(){return e.$data.finishButton}}}),Object(P.addToBindingsCache)("dxButton: nextButton",function(e,t){return{dxButton:function(){return e.$data.nextButton}}}),Object(P.addToBindingsCache)("dxButton: previousButton",function(e,t){return{dxButton:function(){return e.$data.previousButton}}}),Object(P.addToBindingsCache)("foreach: _sections, css: _className, styleunit: { top: _parentMarginOffset, left: _parentMarginOffset, right: _parentMarginOffset, bottom: _parentMarginOffset }",function(e,t){return{foreach:function(){return e.$data._sections},css:function(){return e.$data._className},styleunit:function(){return{top:e.$data._parentMarginOffset,left:e.$data._parentMarginOffset,right:e.$data._parentMarginOffset,bottom:e.$data._parentMarginOffset}}}}),Object(P.addToBindingsCache)("css: { 'dxrd-disabled': !$data.page() }, style: $parent._pageCss[$data.pageId]",function(e,t){return{css:function(){return{"dxrd-disabled":!e.$data.page()}},style:function(){return e.$parent._pageCss[e.$data.pageId]}}}),Object(P.addToBindingsCache)("visible: $parent._showPageDescription(), text: $parent._getPageDescription($index(), $data), attr: { title: $parent._getPageDescription($index(), $data) }",function(e,t){return{visible:function(){return e.$parent._showPageDescription()},text:function(){return e.$parent._getPageDescription(e.$index(),e.$data)},attr:function(){return{title:e.$parent._getPageDescription(e.$index(),e.$data)}}}}),Object(P.addToBindingsCache)("template: { name: $parent.metadata.template, data: page }, dxScrollView: { showScrollbar: 'onHover'}",function(e,t){return{template:function(){return{name:e.$parent.metadata.template,data:e.$data.page}},dxScrollView:function(){return{showScrollbar:"onHover"}}}}),Object(P.addToBindingsCache)("text: metadata.disabledText",function(e,t){return{text:function(){return e.$data.metadata.disabledText}}}),Object(P.addToBindingsCache)("if: $data && $data.isVisible()",function(e,t){return{if:function(){return e.$data&&e.$data.isVisible()}}}),Object(P.addToBindingsCache)("with: navigationPanel",function(e,t){return{with:function(){return e.$data.navigationPanel}}}),Object(P.addToBindingsCache)("with: _currentPage",function(e,t){return{with:function(){return e.$data._currentPage}}}),Object(P.addToBindingsCache)("if: $data._sections.length > 0",function(e,t){return{if:function(){return 0<e.$data._sections.length}}}),Object(P.addToBindingsCache)("if: $data.page() !== null",function(e,t){return{if:function(){return null!==e.$data.page()}}}),Object(P.addToBindingsCache)("with: page",function(e,t){return{with:function(){return e.$data.page}}}),Object(P.addToBindingsCache)("if: $data.page() === null",function(e,t){return{if:function(){return null===e.$data.page()}}}),Object(P.addToBindingsCache)("text: _rootElementTitle",function(e,t){return{text:function(){return e.$data._rootElementTitle}}}),Object(P.addToBindingsCache)("dxSelectBox: { dataSource: _rootElementList, value: _selectedRootElement, displayExpr: 'fullPath', displayCustomValue: true, useItemTextAsTitle: true, dropDownOptions: { container: $root.getPopupContainer($element) } }",function(e,t){return{dxSelectBox:function(){return{dataSource:e.$data._rootElementList,value:e.$data._selectedRootElement,displayExpr:"fullPath",displayCustomValue:!0,useItemTextAsTitle:!0,dropDownOptions:{container:e.$root.getPopupContainer(t)}}}}}),Object(P.addToBindingsCache)("dxScrollView: { showScrollbar: 'onHover', useNative: false, scrollByThumb: true }, dxValidationGroup: $data._validationGroup || {}",function(e,t){return{dxScrollView:function(){return{showScrollbar:"onHover",useNative:!1,scrollByThumb:!0}},dxValidationGroup:function(){return e.$data._validationGroup||{}}}}),Object(P.addToBindingsCache)("text: _jsonConnectionTitle, attr: { 'title': _jsonConnectionTitle }",function(e,t){return{text:function(){return e.$data._jsonConnectionTitle},attr:function(){return{title:e.$data._jsonConnectionTitle}}}}),Object(P.addToBindingsCache)("dxTextBox: { value: _connectionName }, dxValidator: { validationRules: $data._connectionNameValidationRules || [] }",function(e,t){return{dxTextBox:function(){return{value:e.$data._connectionName}},dxValidator:function(){return{validationRules:e.$data._connectionNameValidationRules||[]}}}}),Object(P.addToBindingsCache)("text: _jsonSourceTitle, attr: { 'title': _jsonSourceTitle }",function(e,t){return{text:function(){return e.$data._jsonSourceTitle},attr:function(){return{title:e.$data._jsonSourceTitle}}}}),Object(P.addToBindingsCache)("dxLocalizedSelectBox: { dataSource: _sources, value: _selectedSource, valueExpr:'value', displayExpr: 'displayValue', displayCustomValue: true, dropDownOptions: { container: $root.getPopupContainer($element) } }",function(e,t){return{dxLocalizedSelectBox:function(){return{dataSource:e.$data._sources,value:e.$data._selectedSource,valueExpr:"value",displayExpr:"displayValue",displayCustomValue:!0,dropDownOptions:{container:e.$root.getPopupContainer(t)}}}}}),Object(P.addToBindingsCache)("dxValidationGroup: $data.validationGroup || {}",function(e,t){return{dxValidationGroup:function(){return e.$data.validationGroup||{}}}}),Object(P.addToBindingsCache)("css: $data.cssClass",function(e,t){return{css:function(){return e.$data.cssClass}}}),Object(P.addToBindingsCache)("dxValidationSummary: $data.validationSummary || {}, visible: $data.validationSummary && !isValid()",function(e,t){return{dxValidationSummary:function(){return e.$data.validationSummary||{}},visible:function(){return e.$data.validationSummary&&!e.$data.isValid()}}}),Object(P.addToBindingsCache)("dxValidationSummary: $data._validationSummary || {}, visible: $data._validationSummary && _selectedSource().validationSummary && !canNext()",function(e,t){return{dxValidationSummary:function(){return e.$data._validationSummary||{}},visible:function(){return e.$data._validationSummary&&e.$data._selectedSource().validationSummary&&!e.$data.canNext()}}}),Object(P.addToBindingsCache)("with: _selectedSource",function(e,t){return{with:function(){return e.$data._selectedSource}}}),Object(P.addToBindingsCache)("template: { name: 'dx-propertieseditor', data: grid }",function(e,t){return{template:function(){return{name:"dx-propertieseditor",data:e.$data.grid}}}}),Object(P.addToBindingsCache)("dxRadioGroup: { value: selectedDataSourceOperation, items: dataSourceOperations, layout: 'vertical' }",function(e,t){return{dxRadioGroup:function(){return{value:e.$data.selectedDataSourceOperation,items:e.$data.dataSourceOperations,layout:"vertical"}}}}),Object(P.addToBindingsCache)("text: text, attr: { 'title': text }",function(e,t){return{text:function(){return e.$data.text},attr:function(){return{title:e.$data.text}}}}),Object(P.addToBindingsCache)("dxList: { dataSource: availableDataSources, selectedItems: selectedDataSource, focusStateEnabled:false, editEnabled: true, height: dataSourcesListHeight, editConfig: { selectionEnabled: false }, selectionMode: 'single', activeStateEnabled: false, disabled: createNewDataSource, noDataText: $root.dx._static.noDataText() }",function(e,t){return{dxList:function(){return{dataSource:e.$data.availableDataSources,selectedItems:e.$data.selectedDataSource,focusStateEnabled:!1,editEnabled:!0,height:e.$data.dataSourcesListHeight,editConfig:{selectionEnabled:!1},selectionMode:"single",activeStateEnabled:!1,disabled:e.$data.createNewDataSource,noDataText:e.$root.dx._static.noDataText()}}}}),Object(P.addToBindingsCache)("if: isDataSourceCreationAvailable",function(e,t){return{if:function(){return e.$data.isDataSourceCreationAvailable}}}),Object(P.addToBindingsCache)("dxTemplate : { name: 'item' }",function(){return{dxTemplate:{name:"item"}}}),Object(P.addToBindingsCache)("dxRadioGroup: { value: selectedOperation, items: operations, layout: 'vertical' }",function(e,t){return{dxRadioGroup:function(){return{value:e.$data.selectedOperation,items:e.$data.operations,layout:"vertical"}}}}),Object(P.addToBindingsCache)("styleunit: { top: $data.canCreateNew() ? 65 : 0 }",function(e,t){return{styleunit:function(){return{top:e.$data.canCreateNew()?65:0}}}}),Object(P.addToBindingsCache)("dxList: { dataSource: items, onSelectionChanged: function(e) { selectedItems(e.addedItems) }, selectedItems: selectedItems.peek(), hoverStateEnabled:false, editEnabled: true, height: '100%', editConfig: { selectionEnabled: false }, searchExpr: 'name', searchEnabled: true, selectionMode: 'single', activeStateEnabled: false, disabled: _createNew, noDataText: $root.dx._static.noDataText(), searchEditorOptions: { placeholder: $root.dx._static.searchPlaceholder() } }",function(t,e){return{dxList:function(){return{dataSource:t.$data.items,onSelectionChanged:function(e){t.$data.selectedItems(e.addedItems)},selectedItems:t.$data.selectedItems.peek(),hoverStateEnabled:!1,editEnabled:!0,height:"100%",editConfig:{selectionEnabled:!1},searchExpr:"name",searchEnabled:!0,selectionMode:"single",activeStateEnabled:!1,disabled:t.$data._createNew,noDataText:t.$root.dx._static.noDataText(),searchEditorOptions:{placeholder:t.$root.dx._static.searchPlaceholder()}}}}}),Object(P.addToBindingsCache)("event: { dblclick: function(e){ $parent.onDblClick() } }",function(t,e){return{event:function(){return{dblclick:function(e){t.$parent.onDblClick()}}}}}),Object(P.addToBindingsCache)("text: $parent._displayExpr($data)",function(e,t){return{text:function(){return e.$parent._displayExpr(e.$data)}}}),Object(P.addToBindingsCache)("template: { name: 'dxrd-page-selectitems-radio-group', data: $data }",function(e,t){return{template:function(){return{name:"dxrd-page-selectitems-radio-group",data:e.$data}}}}),Object(P.addToBindingsCache)("template: { name: 'dxrd-page-selectitems-list', data: $data }",function(e,t){return{template:function(){return{name:"dxrd-page-selectitems-list",data:e.$data}}}}),Object(P.addToBindingsCache)("if: canCreateNew",function(e,t){return{if:function(){return e.$data.canCreateNew}}}),Object(P.addToBindingsCache)("if: !_createNew()",function(e,t){return{if:function(){return!e.$data._createNew()}}}),Object(P.addToBindingsCache)("if: _createNew",function(e,t){return{if:function(){return e.$data._createNew}}}),Object(P.addToBindingsCache)("template: { name: 'dxrd-page-jsonsource', data: _specifySourceData }",function(e,t){return{template:function(){return{name:"dxrd-page-jsonsource",data:e.$data._specifySourceData}}}}),Object(P.addToBindingsCache)("dxLocalizedSelectBox: { dataSource: _parameterTypes, value: itemType, valueExpr:'value', displayExpr: 'displayValue', displayCustomValue: true, dropDownOptions: { container: $root.getPopupContainer($element) } }",function(e,t){return{dxLocalizedSelectBox:function(){return{dataSource:e.$data._parameterTypes,value:e.$data.itemType,valueExpr:"value",displayExpr:"displayValue",displayCustomValue:!0,dropDownOptions:{container:e.$root.getPopupContainer(t)}}}}}),Object(P.addToBindingsCache)("dxTextBox: { value: name, placeholder: $data.namePlaceholder() }, dxValidator: { validationRules: $parent.editor.editorOptions.nameValidationRules || [] }",function(e,t){return{dxTextBox:function(){return{value:e.$data.name,placeholder:e.$data.namePlaceholder()}},dxValidator:function(){return{validationRules:e.$parent.editor.editorOptions.nameValidationRules||[]}}}}),Object(P.addToBindingsCache)("dxTextBox: { value: _editingValue, placeholder: $data.valuePlaceholder() }, visible: !$data.isExpression()",function(e,t){return{dxTextBox:function(){return{value:e.$data._editingValue,placeholder:e.$data.valuePlaceholder()}},visible:function(){return!e.$data.isExpression()}}}),Object(P.addToBindingsCache)("dxExpressionEditor: { options: _expression, fieldListProvider: $parent.editor.editorOptions.itemsProvider, displayNameProvider: $root.displayNameProvider && $root.displayNameProvider() }, visible: $data.isExpression",function(e,t){return{dxExpressionEditor:function(){return{options:e.$data._expression,fieldListProvider:e.$parent.editor.editorOptions.itemsProvider,displayNameProvider:e.$root.displayNameProvider&&e.$root.displayNameProvider()}},visible:function(){return e.$data.isExpression}}}),Object(P.addToBindingsCache)("dxFileImagePicker: { value: value, placeholderId: 'File', accept:'.json,.txt' }",function(e,t){return{dxFileImagePicker:function(){return{value:e.$data.value,placeholderId:"File",accept:".json,.txt"}}}}),Object(P.addToBindingsCache)("dxTextArea: { value: value, spellcheck: false, isValid: isValid }, dxValidator: $data.validator || { validationRules: jsonStringValidationRules || [] }",function(e,t){return{dxTextArea:function(){return{value:e.$data.value,spellcheck:!1,isValid:e.$data.isValid}},dxValidator:function(){return e.$data.validator||{validationRules:e.$data.jsonStringValidationRules||[]}}}}),Object(P.addToBindingsCache)("dxAceEditor: { value: value, editorContainer: editorContainer, options: aceOptions, additionalOptions: additionalOptions }, css: { 'dx-invalid' : !value() || !isValid() }",function(e,t){return{dxAceEditor:function(){return{value:e.$data.value,editorContainer:e.$data.editorContainer,options:e.$data.aceOptions,additionalOptions:e.$data.additionalOptions}},css:function(){return{"dx-invalid":!e.$data.value()||!e.$data.isValid()}}}}),Object(P.addToBindingsCache)("dxButtonWithTemplate: { onClick: uploadFile, hint: $data.getUploadTitle(), icon: 'dxrd-svg-wizard-Download' }",function(e,t){return{dxButtonWithTemplate:function(){return{onClick:e.$data.uploadFile,hint:e.$data.getUploadTitle(),icon:"dxrd-svg-wizard-Download"}}}}),Object(P.addToBindingsCache)("styleunit: padding, css: { 'dx-treelist-item-selected dxd-state-selected dxd-back-secondary': isSelected }",function(e,t){return{styleunit:function(){return e.$data.padding},css:function(){return{"dx-treelist-item-selected dxd-state-selected dxd-back-secondary":e.$data.isSelected}}}}),Object(P.addToBindingsCache)("css: nodeImageClass",function(e,t){return{css:function(){return e.$data.nodeImageClass}}}),Object(P.addToBindingsCache)("dxButtonWithTemplate: { onClick: function() { clickAction($parent); }, icon: $data.imageTemplateName, iconClass: $data.imageClassName, disabled: $data.disabled && $data.disabled() }, attr: { title: text }",function(e,t){return{dxButtonWithTemplate:function(){return{onClick:function(){e.$data.clickAction(e.$parent)},icon:e.$data.imageTemplateName,iconClass:e.$data.imageClassName,disabled:e.$data.disabled&&e.$data.disabled()}},attr:function(){return{title:e.$data.text}}}}),Object(P.addToBindingsCache)("dxCheckBox: { value: data.checked }, click: function(treeNode, e) { treeNode.data.toggleChecked(); e.stopPropagation(); return true; }",function(e,t){return{dxCheckBox:function(){return{value:e.$data.data.checked}},click:function(){return function(e,t){return e.data.toggleChecked(),t.stopPropagation(),!0}}}}),Object(P.addToBindingsCache)("dxTextBox: { value: queryName }",function(e,t){return{dxTextBox:function(){return{value:e.$data.queryName}}}}),Object(P.addToBindingsCache)("ifnot: $data.disableCustomSql",function(e,t){return{ifnot:function(){return e.$data.disableCustomSql}}}),Object(P.addToBindingsCache)("template: { name: 'dxqb-popup-selectStatment', data: _popupSelectStatement }",function(e,t){return{template:function(){return{name:"dxqb-popup-selectStatment",data:e.$data._popupSelectStatement}}}}),Object(P.addToBindingsCache)("template: { name: 'dxrd-querybuilder-popup', data: _popupQueryBuilder }",function(e,t){return{template:function(){return{name:"dxrd-querybuilder-popup",data:e.$data._popupQueryBuilder}}}}),Object(P.addToBindingsCache)("if: !!$data._fieldListModel()",function(e,t){return{if:function(){return!!e.$data._fieldListModel()}}}),Object(P.addToBindingsCache)("if: $data._relationsEditor()",function(e,t){return{if:function(){return e.$data._relationsEditor()}}}),Object(P.addToBindingsCache)("template: { name: 'dxrd-masterDetail-editor-complete-wizard', data: $data._relationsEditor }",function(e,t){return{template:function(){return{name:"dxrd-masterDetail-editor-complete-wizard",data:e.$data._relationsEditor}}}}),Object(P.addToBindingsCache)("dxPopupWithAutoHeight: { height: '235px', focusStateEnabled: false, position: $root.rtl ? { my: 'right top', at: 'right bottom', of: popupService.target, collision: 'flipfit' } : { my: 'left top', at: 'left bottom', of: popupService.target, collision: 'flipfit' }, wrapperAttr: { class: 'dx-selectbox-popup-wrapper dx-dropdownlist-popup-wrapper dx-filtereditor-criteriaoperator-popup dx-dropdowneditor-overlay' }, container: $root.getPopupContainer($element), target: popupService.target, showTitle: false, showCloseButton: false, animation: {}, hideOnOutsideClick: true, shading: false, minWidth:'170px', maxWidth:'500px', width: 'auto', visible: popupService.visible }",function(e,t){return{dxPopupWithAutoHeight:function(){return{height:"235px",focusStateEnabled:!1,position:e.$root.rtl?{my:"right top",at:"right bottom",of:e.$data.popupService.target,collision:"flipfit"}:{my:"left top",at:"left bottom",of:e.$data.popupService.target,collision:"flipfit"},wrapperAttr:{class:"dx-selectbox-popup-wrapper dx-dropdownlist-popup-wrapper dx-filtereditor-criteriaoperator-popup dx-dropdowneditor-overlay"},container:e.$root.getPopupContainer(t),target:e.$data.popupService.target,showTitle:!1,showCloseButton:!1,animation:{},hideOnOutsideClick:!0,shading:!1,minWidth:"170px",maxWidth:"500px",width:"auto",visible:e.$data.popupService.visible}}}}),Object(P.addToBindingsCache)("dxPopup: { animation: { show: { type: 'fade', from: 0, to: 1, duration: 700 }, hide: { type: 'fade', from: 1, to: 0, duration: 700 } }, wrapperAttr: { class: 'dxqb-preview' }, visible: isVisible, title: title(), showTitle: true, resizeEnabled: true, shading: true, shadingColor: 'transparent', fullScreen: false, width: 800, height: 544, container: closest($element, '.dxrd-wizard'), position: { of: closest($element, '.dx-designer-viewport') }, onHidden: function() { $data.data(null) }, focusStateEnabled: false }",function(e,t){return{dxPopup:function(){return{animation:{show:{type:"fade",from:0,to:1,duration:700},hide:{type:"fade",from:1,to:0,duration:700}},wrapperAttr:{class:"dxqb-preview"},visible:e.$data.isVisible,title:e.$data.title(),showTitle:!0,resizeEnabled:!0,shading:!0,shadingColor:"transparent",fullScreen:!1,width:800,height:544,container:e.$data.closest(t,".dxrd-wizard"),position:{of:e.$data.closest(t,".dx-designer-viewport")},onHidden:function(){e.$data.data(null)},focusStateEnabled:!1}}}}),Object(P.addToBindingsCache)("dxTextArea: { value: data, valueChangeEvent: 'keyup', disabled: false }",function(e,t){return{dxTextArea:function(){return{value:e.$data.data,valueChangeEvent:"keyup",disabled:!1}}}}),Object(P.addToBindingsCache)("dxAceEditor: { value: data, additionalOptions: additionalOptions, options: aceOptions }",function(e,t){return{dxAceEditor:function(){return{value:e.$data.data,additionalOptions:e.$data.additionalOptions,options:e.$data.aceOptions}}}}),Object(P.addToBindingsCache)("dxButton: { text: okButtonText(), onClick: okButtonHandler }",function(e,t){return{dxButton:function(){return{text:e.$data.okButtonText(),onClick:e.$data.okButtonHandler}}}}),Object(P.addToBindingsCache)("event: { dblclick: function() { $data.dblClickHandler ? $data.dblClickHandler($data) : $data.toggleCollapsed() }, mouseenter: mouseenter, mouseleave: mouseleave }, attr: { class: 'dx-treeview-item dx-treelist-item dx-fontsize-reestablished dxd-list-item-back-color ' + ($data.hasItems ? 'dx-treelist-list-item-content ' : 'dx-treelist-field-item-content ') + ($data.isSelected() ? 'dx-treelist-item-selected dxd-state-selected dxd-back-secondary' : '') }, styleunit: padding, css: { 'dx-state-hover': isHovered }",function(e,t){return{event:function(){return{dblclick:function(){e.$data.dblClickHandler?e.$data.dblClickHandler(e.$data):e.$data.toggleCollapsed()},mouseenter:e.$data.mouseenter,mouseleave:e.$data.mouseleave}},attr:function(){return{class:"dx-treeview-item dx-treelist-item dx-fontsize-reestablished dxd-list-item-back-color "+(e.$data.hasItems?"dx-treelist-list-item-content ":"dx-treelist-field-item-content ")+(e.$data.isSelected()?"dx-treelist-item-selected dxd-state-selected dxd-back-secondary":"")}},styleunit:function(){return e.$data.padding},css:function(){return{"dx-state-hover":e.$data.isHovered}}}}),Object(P.addToBindingsCache)("css: nodeImageClass, visible: hasItems, template: 'dxrd-svg-collapsed', click: toggleCollapsed",function(e,t){return{css:function(){return e.$data.nodeImageClass},visible:function(){return e.$data.hasItems},template:function(){return"dxrd-svg-collapsed"},click:function(){return e.$data.toggleCollapsed}}}),Object(P.addToBindingsCache)("event: { dblclick: function() { $data.dblClickHandler && $data.dblClickHandler($data); } }, click: toggleSelected, draggable: isDraggable ? dragDropHandler : null, css: { 'dxrd-disabled': $data.data.disabled && $data.data.disabled() }",function(e,t){return{event:function(){return{dblclick:function(){e.$data.dblClickHandler&&e.$data.dblClickHandler(e.$data)}}},click:function(){return e.$data.toggleSelected},draggable:function(){return e.$data.isDraggable?e.$data.dragDropHandler:null},css:function(){return{"dxrd-disabled":e.$data.data.disabled&&e.$data.data.disabled()}}}}),Object(P.addToBindingsCache)("dxCheckBox: { value: data.checked, disabled: data.selectionDisabled }, click: function(treeNode, e) { treeNode.data.toggleChecked(); e.stopPropagation(); return true; }",function(e,t){return{dxCheckBox:function(){return{value:e.$data.data.checked,disabled:e.$data.data.selectionDisabled}},click:function(){return function(e,t){return e.data.toggleChecked(),t.stopPropagation(),!0}}}}),Object(P.addToBindingsCache)("dxPropertyGrid: { target: $parent.data.dataSourceParameter, level: $parent.data.editor.level + 1 }",function(e,t){return{dxPropertyGrid:function(){return{target:e.$parent.data.dataSourceParameter,level:e.$parent.data.editor.level+1}}}}),Object(P.addToBindingsCache)('template: "dx-treelist-accordion-item-with-checkbox"',function(e,t){return{template:function(){return"dx-treelist-accordion-item-with-checkbox"}}}),Object(P.addToBindingsCache)('template: "dx-treelist-header-item-with-checkbox"',function(e,t){return{template:function(){return"dx-treelist-header-item-with-checkbox"}}}),Object(P.addToBindingsCache)("ifnot: $data.hasItems",function(e,t){return{ifnot:function(){return e.$data.hasItems}}}),Object(P.addToBindingsCache)("if: $data.showIcon",function(e,t){return{if:function(){return e.$data.showIcon}}}),Object(P.addToBindingsCache)("ifnot: $data.showIcon",function(e,t){return{ifnot:function(){return e.$data.showIcon}}}),Object(P.addToBindingsCache)("template: { name: 'dx-popover-list-items', data: ko.utils.extend($parent.data, { position: $root.rtl ? 'left' : 'right', popupContainer: $root.getPopupContainer }) }",function(e,t){return{template:function(){return{name:"dx-popover-list-items",data:e.ko.utils.extend(e.$parent.data,{position:e.$root.rtl?"left":"right",popupContainer:e.$root.getPopupContainer})}}}}),Object(P.addToBindingsCache)("dxList: { dataSource: _chooseObjectDataMember.dataMembers, selectedItems: _chooseObjectDataMember.selectedDataMembers, selectionMode: 'single', activeStateEnabled: false, focusStateEnabled: false, searchExpr: 'displayName', searchEnabled: true, noDataText: $dx._static.noDataText(), searchEditorOptions: { placeholder: $root.dx._static.searchPlaceholder() } }",function(e,t){return{dxList:function(){return{dataSource:e.$data._chooseObjectDataMember.dataMembers,selectedItems:e.$data._chooseObjectDataMember.selectedDataMembers,selectionMode:"single",activeStateEnabled:!1,focusStateEnabled:!1,searchExpr:"displayName",searchEnabled:!0,noDataText:e.$data.$dx._static.noDataText(),searchEditorOptions:{placeholder:e.$root.dx._static.searchPlaceholder()}}}}}),Object(P.addToBindingsCache)("treeListSearchPanel: {controllers: _chooseObjectType.availableTypesTreelistModel.treeListController}",function(e,t){return{treeListSearchPanel:function(){return{controllers:e.$data._chooseObjectType.availableTypesTreelistModel.treeListController}}}}),Object(P.addToBindingsCache)("dxScrollView: { showScrollbar: 'onHover', height: _chooseObjectType._scrollViewHeight}",function(e,t){return{dxScrollView:function(){return{showScrollbar:"onHover",height:e.$data._chooseObjectType._scrollViewHeight}}}}),Object(P.addToBindingsCache)("treelist: _chooseObjectType.availableTypesTreelistModel",function(e,t){return{treelist:function(){return e.$data._chooseObjectType.availableTypesTreelistModel}}}),Object(P.addToBindingsCache)("text: $root.dx._static.noDataText()",function(e,t){return{text:function(){return e.$root.dx._static.noDataText()}}}),Object(P.addToBindingsCache)("if: _chooseObjectType.types && !_chooseObjectType.types().length",function(e,t){return{if:function(){return e.$data._chooseObjectType.types&&!e.$data._chooseObjectType.types().length}}}),Object(P.addToBindingsCache)("style: position, css: { 'dxrd-disabled': $data.disabled() }",function(e,t){return{style:function(){return e.$data.position},css:function(){return{"dxrd-disabled":e.$data.disabled()}}}}),Object(P.addToBindingsCache)("text: $parent.showDescription($index(), description), attr: { title: $parent.showDescription($index(), description) }",function(e,t){return{text:function(){return e.$parent.showDescription(e.$index(),e.$data.description)},attr:function(){return{title:e.$parent.showDescription(e.$index(),e.$data.description)}}}}),Object(P.addToBindingsCache)("text: disabledText",function(e,t){return{text:function(){return e.$data.disabledText}}}),Object(P.addToBindingsCache)("treeListSearchPanel: {controllers: availableTypesTreelistModel.treeListController}",function(e,t){return{treeListSearchPanel:function(){return{controllers:e.$data.availableTypesTreelistModel.treeListController}}}}),Object(P.addToBindingsCache)("dxScrollView: { showScrollbar: 'onHover', height: _scrollViewHeight}",function(e,t){return{dxScrollView:function(){return{showScrollbar:"onHover",height:e.$data._scrollViewHeight}}}}),Object(P.addToBindingsCache)("treelist: availableTypesTreelistModel",function(e,t){return{treelist:function(){return e.$data.availableTypesTreelistModel}}}),Object(P.addToBindingsCache)("dxList: { dataSource: dataMembers, selectedItems: selectedDataMembers, selectionMode: 'single', activeStateEnabled: false, focusStateEnabled: false, searchExpr: 'displayName', searchEnabled: true, noDataText: $root.dx._static.noDataText(), searchEditorOptions: { placeholder: $root.dx._static.searchPlaceholder() } }",function(e,t){return{dxList:function(){return{dataSource:e.$data.dataMembers,selectedItems:e.$data.selectedDataMembers,selectionMode:"single",activeStateEnabled:!1,focusStateEnabled:!1,searchExpr:"displayName",searchEnabled:!0,noDataText:e.$root.dx._static.noDataText(),searchEditorOptions:{placeholder:e.$root.dx._static.searchPlaceholder()}}}}}),Object(P.addToBindingsCache)("text: $data.displayName, attr: { 'title': $data.displayName}",function(e,t){return{text:function(){return e.$data.displayName},attr:function(){return{title:e.$data.displayName}}}}),Object(P.addToBindingsCache)("dxExpressionEditor: getOptions({ options: value, fieldListProvider: value().itemsProvider, displayNameProvider: $root.displayNameProvider && $root.displayNameProvider() })",function(e,t){return{dxExpressionEditor:function(){return e.$data.getOptions({options:e.$data.value,fieldListProvider:e.$data.value().itemsProvider,displayNameProvider:e.$root.displayNameProvider&&e.$root.displayNameProvider()})}}}),Object(P.addToBindingsCache)("dxScrollView: { showScrollbar: 'onHover'}",function(e,t){return{dxScrollView:function(){return{showScrollbar:"onHover"}}}}),Object(P.addToBindingsCache)("foreach: _sections",function(e,t){return{foreach:function(){return e.$data._sections}}}),Object(P.addToBindingsCache)("if: !$data.disabled()",function(e,t){return{if:function(){return!e.$data.disabled()}}}),Object(P.addToBindingsCache)("if: $data.disabled()",function(e,t){return{if:function(){return e.$data.disabled()}}}),Object(P.addToBindingsCache)("if: !!$data",function(e,t){return{if:function(){return!!e.$data}}}),Object(P.addToBindingsCache)("foreach: _grids",function(e,t){return{foreach:function(){return e.$data._grids}}}),Object(P.addToBindingsCache)("template: { name: 'dx-objectdatasource-parameters-grid', data: _ctorParametersObject }",function(e,t){return{template:function(){return{name:"dx-objectdatasource-parameters-grid",data:e.$data._ctorParametersObject}}}}),Object(P.addToBindingsCache)("template: { name: 'dx-objectdatasource-parameters-grid', data: _dataMemberParametersObject }",function(e,t){return{template:function(){return{name:"dx-objectdatasource-parameters-grid",data:e.$data._dataMemberParametersObject}}}}),Object(P.addToBindingsCache)("template: { name: 'dx-objectdatasource-parameters-section', data: _chooseObjectParameters }",function(e,t){return{template:function(){return{name:"dx-objectdatasource-parameters-section",data:e.$data._chooseObjectParameters}}}}),Object(P.addToBindingsCache)("dxCollectionEditor: parametersEditorOptions",function(e,t){return{dxCollectionEditor:function(){return e.$data.parametersEditorOptions}}}),Object(P.addToBindingsCache)("styleunit: { 'marginLeft' : editor.padding }, css: { 'dxrd-group-header-collapsed': collapsed() }",function(e,t){return{styleunit:function(){return{marginLeft:e.$data.editor.padding}},css:function(){return{"dxrd-group-header-collapsed":e.$data.collapsed()}}}}),Object(P.addToBindingsCache)("text: value().name",function(e,t){return{text:function(){return e.$data.value().name}}}),Object(P.addToBindingsCache)("dxPropertyGrid: { target: value, level: editor.level + 1 }",function(e,t){return{dxPropertyGrid:function(){return{target:e.$data.value,level:e.$data.editor.level+1}}}}),Object(P.addToBindingsCache)("dxScrollView: { showScrollbar: 'onHover', useNative: false, scrollByThumb: true }",function(e,t){return{dxScrollView:function(){return{showScrollbar:"onHover",useNative:!1,scrollByThumb:!0}}}}),Object(P.addToBindingsCache)("dxclick: $parents[1].select, css: { 'dxd-state-selected dxd-back-secondary' : $parents[1].selectedIndex() === $index() }",function(e,t){return{dxclick:function(){return e.$parents[1].select},css:function(){return{"dxd-state-selected dxd-back-secondary":e.$parents[1].selectedIndex()===e.$index()}}}}),Object(P.addToBindingsCache)("visible: showButtons",function(e,t){return{visible:function(){return e.$data.showButtons}}}),Object(P.addToBindingsCache)("dxButton: { onClick: add, text: getDisplayTextButton('add') }, attr: { title: getDisplayTextButton('add') }",function(e,t){return{dxButton:function(){return{onClick:e.$data.add,text:e.$data.getDisplayTextButton("add")}},attr:function(){return{title:e.$data.getDisplayTextButton("add")}}}}),Object(P.addToBindingsCache)("dxButton: { onClick: remove, disabled: selectedIndex() === null, text: $parent.removeButtonTitle }, attr: { title: $parent.removeButtonTitle }",function(e,t){return{dxButton:function(){return{onClick:e.$data.remove,disabled:null===e.$data.selectedIndex(),text:e.$parent.removeButtonTitle}},attr:function(){return{title:e.$parent.removeButtonTitle}}}}),Object(P.addToBindingsCache)("if: values().length === 0",function(e,t){return{if:function(){return 0===e.$data.values().length}}}),Object(P.addToBindingsCache)("dxList: { dataSource: _connectionStrings, onSelectionChanged: function(e) { _selectedConnectionString(e.addedItems) }, selectedItems: _selectedConnectionString.peek(), focusStateEnabled: false, searchEnabled: true, searchExpr: 'description', editEnabled: true, editConfig: { selectionEnabled: true }, selectionMode: 'single', activeStateEnabled: false, noDataText: $root.dx._static.noDataText(), searchEditorOptions: { placeholder: $root.dx._static.searchPlaceholder() } }",function(t,e){return{dxList:function(){return{dataSource:t.$data._connectionStrings,onSelectionChanged:function(e){t.$data._selectedConnectionString(e.addedItems)},selectedItems:t.$data._selectedConnectionString.peek(),focusStateEnabled:!1,searchEnabled:!0,searchExpr:"description",editEnabled:!0,editConfig:{selectionEnabled:!0},selectionMode:"single",activeStateEnabled:!1,noDataText:t.$root.dx._static.noDataText(),searchEditorOptions:{placeholder:t.$root.dx._static.searchPlaceholder()}}}}}),Object(P.addToBindingsCache)("text: $data['description'] || $data['name']",function(e,t){return{text:function(){return e.$data.description||e.$data.name}}}),Object(P.addToBindingsCache)("text: caption()",function(e,t){return{text:function(){return e.$data.caption()}}}),Object(P.addToBindingsCache)("visible: !runQueryBuilderDisabled, text: $parent.runQueryBuilderBtnText, click: function() { $parent.runQueryBuilder() }",function(e,t){return{visible:function(){return!e.$data.runQueryBuilderDisabled},text:function(){return e.$parent.runQueryBuilderBtnText},click:function(){return function(){e.$parent.runQueryBuilder()}}}}),Object(P.addToBindingsCache)("dxTextArea: { value: sqlString, valueChangeEvent: 'keyup input blur', readOnly: disableCustomSql() }",function(e,t){return{dxTextArea:function(){return{value:e.$data.sqlString,valueChangeEvent:"keyup input blur",readOnly:e.$data.disableCustomSql()}}}}),Object(P.addToBindingsCache)("dxAceEditor: { value: sqlString, additionalOptions: additionalOptions, options: aceOptions }, css: { 'dx-disabled-ace': disableCustomSql() }",function(e,t){return{dxAceEditor:function(){return{value:e.$data.sqlString,additionalOptions:e.$data.additionalOptions,options:e.$data.aceOptions}},css:function(){return{"dx-disabled-ace":e.$data.disableCustomSql()}}}}),Object(P.addToBindingsCache)("dxList: { dataSource: storedProcedures, searchEnabled: true, searchExpr: 'name', onContentReady: scrollActiveItem, selectedItems: selectedProcedure, editEnabled: true, editConfig: { selectionEnabled: true }, selectionMode: 'single', activeStateEnabled: false, noDataText: $root.dx._static.noDataText() }",function(e,t){return{dxList:function(){return{dataSource:e.$data.storedProcedures,searchEnabled:!0,searchExpr:"name",onContentReady:e.$data.scrollActiveItem,selectedItems:e.$data.selectedProcedure,editEnabled:!0,editConfig:{selectionEnabled:!0},selectionMode:"single",activeStateEnabled:!1,noDataText:e.$root.dx._static.noDataText()}}}}),Object(P.addToBindingsCache)("text: $parent.generateStoredProcedureDisplayName($data)",function(e,t){return{text:function(){return e.$parent.generateStoredProcedureDisplayName(e.$data)}}}),Object(P.addToBindingsCache)("text: queryNameCaption()",function(e,t){return{text:function(){return e.$data.queryNameCaption()}}}),Object(P.addToBindingsCache)("dxTextBox: { value: queryName, placeholder: $data.placeholder() }",function(e,t){return{dxTextBox:function(){return{value:e.$data.queryName,placeholder:e.$data.placeholder()}}}}),Object(P.addToBindingsCache)("dxRadioGroup: { value: selectedQueryType, layout: 'horizontal', items: queryTypeItems }",function(e,t){return{dxRadioGroup:function(){return{value:e.$data.selectedQueryType,layout:"horizontal",items:e.$data.queryTypeItems}}}}),Object(P.addToBindingsCache)("text: $parent.localizeQueryType($data), attr: { 'title': $parent.localizeQueryType($data) }",function(e,t){return{text:function(){return e.$parent.localizeQueryType(e.$data)},attr:function(){return{title:e.$parent.localizeQueryType(e.$data)}}}}),Object(P.addToBindingsCache)("template: { name: queryControl().template, data: queryControl() }",function(e,t){return{template:function(){return{name:e.$data.queryControl().template,data:e.$data.queryControl()}}}}),Object(P.addToBindingsCache)("template: { name: 'dxrd-querybuilder-popup', data: popupQueryBuilder }",function(e,t){return{template:function(){return{name:"dxrd-querybuilder-popup",data:e.$data.popupQueryBuilder}}}}),Object(P.addToBindingsCache)("dxPopup: popupViewModel($element)",function(e,t){return{dxPopup:function(){return e.$data.popupViewModel(t)}}}),Object(P.addToBindingsCache)("dxQueryBuilder: qbOptions",function(e,t){return{dxQueryBuilder:function(){return e.$data.qbOptions}}}),Object(P.addToBindingsCache)("dxButton: { text: getDisplayText('previewResults'), onClick: previewHandler, disabled: okButtonDisabled }",function(e,t){return{dxButton:function(){return{text:e.$data.getDisplayText("previewResults"),onClick:e.$data.previewHandler,disabled:e.$data.okButtonDisabled}}}}),Object(P.addToBindingsCache)("dxButton: { text: getDisplayText('cancel'), onClick: cancelHandler }",function(e,t){return{dxButton:function(){return{text:e.$data.getDisplayText("cancel"),onClick:e.$data.cancelHandler}}}}),Object(P.addToBindingsCache)("dxButton: { text: getDisplayText('ok'), type: 'default', onClick: okHandler, disabled: okButtonDisabled }",function(e,t){return{dxButton:function(){return{text:e.$data.getDisplayText("ok"),type:"default",onClick:e.$data.okHandler,disabled:e.$data.okButtonDisabled}}}}),Object(P.addToBindingsCache)("dxLoadPanel:{ animation: { show: { type: 'fade', from: 0, to: 1, duration: 700 }, hide: { type: 'fade', from: 1, to: 0, duration: 700 } }, deferRendering: false, message: getDisplayText('loading'), visible: showLoadIndicator, shading: true, shadingColor: 'transparent'}",function(e,t){return{dxLoadPanel:function(){return{animation:{show:{type:"fade",from:0,to:1,duration:700},hide:{type:"fade",from:1,to:0,duration:700}},deferRendering:!1,message:e.$data.getDisplayText("loading"),visible:e.$data.showLoadIndicator,shading:!0,shadingColor:"transparent"}}}}),Object(P.addToBindingsCache)("template: 'dxrd-designer'",function(e,t){return{template:function(){return"dxrd-designer"}}}),Object(P.addToBindingsCache)("if: qbOptions",function(e,t){return{if:function(){return e.$data.qbOptions}}}),Object(P.addToBindingsCache)("if: isVisible",function(e,t){return{if:function(){return e.$data.isVisible}}}),Object(P.addToBindingsCache)("css: { 'dxd-state-active': $data.isExpression() }, dxButtonWithTemplate: { onClick: switchEditors, icon: 'dxrd-svg-wizard-expressions' }",function(e,t){return{css:function(){return{"dxd-state-active":e.$data.isExpression()}},dxButtonWithTemplate:function(){return{onClick:e.$data.switchEditors,icon:"dxrd-svg-wizard-expressions"}}}}),Object(P.addToBindingsCache)("dxPopover: { wrapperAttr: { class: $data.className }, width: $data.width || 200, position: position, visible: popoverVisible, target: target, container: popupContainer($element)}",function(e,t){return{dxPopover:function(){return{wrapperAttr:{class:e.$data.className},width:e.$data.width||200,position:e.$data.position,visible:e.$data.popoverVisible,target:e.$data.target,container:e.$data.popupContainer(t)}}}}),Object(P.addToBindingsCache)("attr: { class: $data.className + '-list'}, dxList: { dataSource: popoverListItems(), onItemClick: itemClickAction }",function(e,t){return{attr:function(){return{class:e.$data.className+"-list"}},dxList:function(){return{dataSource:e.$data.popoverListItems(),onItemClick:e.$data.itemClickAction}}}}),Object(P.addToBindingsCache)("attr: { class: $data.className + '-list-item'}",function(e,t){return{attr:function(){return{class:e.$data.className+"-list-item"}}}}),Object(P.addToBindingsCache)("text: name, attr: { title: name }",function(e,t){return{text:function(){return e.$data.name},attr:function(){return{title:e.$data.name}}}}),Object(P.addToBindingsCache)("text: $data.title || $parent.title",function(e,t){return{text:function(){return e.$data.title||e.$parent.title}}}),Object(P.addToBindingsCache)("text: description, attr: { title: description }",function(e,t){return{text:function(){return e.$data.description},attr:function(){return{title:e.$data.description}}}}),Object(P.addToBindingsCache)("dxPopup: { visible: isVisible, wrapperAttr: { class: 'dxrd-wizard dx-editors dxd-text-primary' }, title: isVisible() ? title : '', showTitle: true, fullScreen: false, width: width, height: height, container: $element, visualContainer: _container($element), titleTemplate: _titleTemplate, position: _wizardPopupPosition($element) }, cssArray: [ $data._extendCssClass, { 'dx-rtl': $root.rtl, 'dx-ltr': !$root.rtl }]",function(e,t){return{dxPopup:function(){return{visible:e.$data.isVisible,wrapperAttr:{class:"dxrd-wizard dx-editors dxd-text-primary"},title:e.$data.isVisible()?e.$data.title:"",showTitle:!0,fullScreen:!1,width:e.$data.width,height:e.$data.height,container:t,visualContainer:e.$data._container(t),titleTemplate:e.$data._titleTemplate,position:e.$data._wizardPopupPosition(t)}},cssArray:function(){return[e.$data._extendCssClass,{"dx-rtl":e.$root.rtl,"dx-ltr":!e.$root.rtl}]}}}),P.SvgTemplatesEngine.addTemplates({"dxdd-connection-line":'<svg class="dxdd-connection-line" style="width:100%; height: 100%"> <line class="dxd-qb-relationship-line-color" data-bind="attr: { x1: startPoint().relativeX, y1: startPoint().relativeY, x2: endPoint().relativeX, y2: endPoint().relativeY }" /> </svg>',"dxdd-connecting-point":'<div class="dxdd-connecting-point" data-bind="styleunit: position, trackCursor: underCursor, style: { \'marginLeft\': -3 * _context.zoom() + \'px\', \'marginTop\': -3 * _context.zoom() + \'px\' }, draggable: $root.connectingPointDragHandler"> <svg style="width:100%; height: 100%"> <line x1="0" y1="0" x2="100%" y2="100%" /> <line x1=0 y1="100%" x2="100%" y2="0" /> </svg> </div>',"dxdd-connection-point-selection":'<div class="dxrd-control" data-bind="draggable: $root.connectionPointDragHandler, styleunit: { top: relativeY, left: relativeX }"> </div>',"dxdd-connector":'<div class="dxdd-connector" data-bind="styleunit: position, trackCursor: underCursor"> \x3c!-- ko template: { name: \'dxdd-connection-line\' } --\x3e \x3c!-- /ko --\x3e </div>',"dxdd-connector-selection":"<div class=\"dxdd-connector\" data-bind=\"styleunit: position, dxclick: function() {}, draggable: $root.dragHandler\"> \x3c!-- ko template: { name: 'dxdd-connection-line' } --\x3e \x3c!-- /ko --\x3e \x3c!-- ko with: startPoint --\x3e \x3c!-- ko template: { name: 'dxdd-connection-point-selection' } --\x3e \x3c!-- /ko --\x3e \x3c!-- /ko --\x3e \x3c!-- ko with: endPoint --\x3e \x3c!-- ko template: { name: 'dxdd-connection-point-selection' } --\x3e \x3c!-- /ko --\x3e \x3c!-- /ko --\x3e </div>","dxdd-routed-connection-line":'<svg class="dxdd-connection-line"> <defs> \x3c!-- ko if: showArrow --\x3e <marker data-bind="attr: { id: \'dxqb-arrow_end\' + connectorID() }" viewBox="0 0 5 10" refX="5" refY="5" markerUnits="userSpaceOnUse" orient="auto" markerWidth="14" markerHeight="14"> <polyline class="dxd-qb-relationship-line-color" points="0,0 5,5 0,10" /> </marker> \x3c!-- /ko --\x3e \x3c!-- ko if: showRightArrow --\x3e <marker data-bind="attr: { id: \'dxqb-arrow_start\' + connectorID() }" viewBox="0 0 5 10" refX="5" refY="5" markerUnits="userSpaceOnUse" orient="auto-start-reverse" markerWidth="14" markerHeight="14"> <polyline class="dxd-qb-relationship-line-color" points="0,0 5,5 0,10" /> </marker> \x3c!-- /ko --\x3e </defs> <polyline class="dxd-qb-relationship-line-color" fill="none" data-bind="attr: { points: routePointsSet, \'marker-end\': showArrow() ? \'url(#dxqb-arrow_end\' + connectorID() + \')\' : \'\', \'marker-start\': showRightArrow() ? \'url(#dxqb-arrow_start\' + connectorID() + \')\' : \'\' }, updateConnectorArrow: $data" /> </svg>',"dxdd-routed-connector":'<div class="dxdd-connector" data-bind="styleunit: position, visible: isVisible"> \x3c!-- ko template: { name: \'dxdd-routed-connection-line\' } --\x3e \x3c!-- /ko --\x3e \x3c!-- ko foreach: routeLineWrappers --\x3e <div data-bind="styleunit: position" style="position: absolute;"> \x3c!-- ko with: $parent --\x3e <div class="dxd-selectable" data-bind="trackCursor: underCursor, click: $root.selectItemProperties" style="position: relative; width: 100%; height: 100%;"></div> \x3c!-- /ko --\x3e </div> \x3c!-- /ko --\x3e </div>',"dxdd-routed-connector-selection":'<div class="dxdd-connector dxrd-selected dxd-state-selected" data-bind="styleunit: position, dxclick: function() {}, visible: isVisible"> \x3c!-- ko template: { name: \'dxdd-routed-connection-line\' } --\x3e \x3c!-- /ko --\x3e \x3c!-- ko foreach: routeLineWrappers --\x3e \x3c!-- ko ifnot: isLocked --\x3e <div data-bind="styleunit: position, style: { cursor: isVerticalLine ? \'ew-resize\' : \'ns-resize\' }, routeLineDraggable: { starting: $root.resizeHandler.starting, stopped: function() { resizeStopped(); $root.resizeHandler.stopped(); }, forceResize: resizeHandler }" style="position: absolute;"> </div> \x3c!-- /ko --\x3e \x3c!-- ko if: isLocked --\x3e <div data-bind="styleunit: position" style="position: absolute;"> </div> \x3c!-- /ko --\x3e \x3c!-- /ko --\x3e \x3c!-- ko with: startPoint --\x3e \x3c!-- ko template: { name: \'dxdd-connection-point-selection\' } --\x3e \x3c!-- /ko --\x3e \x3c!-- /ko --\x3e \x3c!-- ko with: endPoint --\x3e \x3c!-- ko template: { name: \'dxdd-connection-point-selection\' } --\x3e \x3c!-- /ko --\x3e \x3c!-- /ko --\x3e </div>',"dx-diagram-element":'<div class="dxrd-control dxd-selectable" data-bind="styleunit: position, trackCursor: underCursor"> <div class="dxrd-control-content-main" data-bind="styleunit: { lineHeight: positionLineHeightWithoutMargins }, style: css"> <div data-bind="template: contenttemplate, styleunit: { \'height\': positionLineHeightWithoutMargins, \'width\': positionWidthWithoutMargins }"> </div> </div> </div>',"dx-diagram-element-selection":'<div class="dxrd-control" data-bind="event: { dblclick: $root.inlineTextEdit.show }, css: {\'dxrd-selected\': selected, \'dxrd-focused\': focused }, resizable: $root.resizeHandler, draggable: $root.dragHandler, styleunit: position, trackCursor: underCursor"> \x3c!-- ko if: !$root.inlineTextEdit.visible() --\x3e <div class="dxrd-control-content-main" data-bind="styleunit: { lineHeight: positionLineHeightWithoutMargins }, style: css"> <div data-bind="template: contenttemplate, styleunit: { \'height\': positionLineHeightWithoutMargins, \'width\': positionWidthWithoutMargins}"> </div> </div> \x3c!-- /ko --\x3e \x3c!-- ko if: $root.inlineTextEdit.visible --\x3e \x3c!-- ko with: $root.inlineTextEdit --\x3e <div class="inline-text-edit" data-bind="dxTextArea: { value: text, onKeyUp: keypressAction, valueChangeEvent: \'keyup\' }"></div> \x3c!-- /ko --\x3e \x3c!-- /ko --\x3e </div>',"dx-diagram-element-content":'<div style="width: 100%; height: 100%; border: 1px solid black"> <div data-bind="text: getControlModel().text"></div> </div>',"dxdd-element-content-with-connecting-points":'<div style="width: 100%; height: 100%; overflow: hidden"> <svg style="top:0; left: 0; width: 100%; height: 100%; stroke: black; fill: transparent; stroke-width: 1"> \x3c!-- ko if: getControlModel().type() === \'Ellipse\' --\x3e <ellipse cx="50%" cy="50%" rx="50%" ry="50%" /> \x3c!-- /ko --\x3e \x3c!-- ko if: getControlModel().type() === \'Condition\' --\x3e <line x1="50%" y1="0" x2="100%" y2="50%" /> <line x1="100%" y1="50%" x2="50%" y2="100%" /> <line x1="50%" y1="100%" x2="0" y2="50%" /> <line x1="0" y1="50%" x2="50%" y2="0" /> \x3c!-- /ko --\x3e \x3c!-- ko if: !getControlModel().type() --\x3e <rect height="100%" width="100%" /> \x3c!-- /ko --\x3e <text x="50%" y="50%" alignment-baseline="middle" style="text-anchor: middle; cursor:default;" data-bind="text: getControlModel().text"></text> </svg> \x3c!-- ko foreach: connectingPoints --\x3e \x3c!-- ko template: \'dxdd-connecting-point\' --\x3e \x3c!-- /ko --\x3e \x3c!-- /ko --\x3e </div>',"dx-diagram-surface":'<div class="dxrd-surface" style="height: 100%; display:inline-block;" data-bind="styleunit: { \'width\': Math.min(pageWidth(), $root.surfaceSize()) }, click: function(_, e) { $root.selection.clickHandler(null, e); e.stopPropagation(); }, keyDownActions: $root.actionLists"> <div class="dxrd-viewport" style="overflow:auto;width:inherit;height:inherit;" data-bind="styleunit: { minWidth: Math.min(pageWidth(), $root.surfaceSize()), maxWidth: pageWidth(), maxHeight: pageHeight() + 20 }"> <div data-bind="selectable: { selection: $root.selection, zoom: zoom }"> <div class="dxrd-ghost-containment"> <div class="dxrd-ghost-container" style="background: white;position: relative;" data-bind="styleunit: { \'width\': pageWidth(), \'height\': pageHeight() }, trackCursor: underCursor"> \x3c!-- ko foreach: controls --\x3e \x3c!-- ko template: { name: isSelected() ? selectiontemplate : template } --\x3e \x3c!-- /ko --\x3e \x3c!-- /ko --\x3e </div> </div> </div> </div> </div>',"dxqb-joincondition":'<div class="dxdd-connector" data-bind="styleunit: position, trackCursor: underCursor"> <svg style="width:100%; height: 100%"> <line data-bind="attr: { x1: startPoint.x, y1: startPoint.y, x2: endPoint.x, y2: endPoint.y }" /> </svg> </div>',"dx-query-surface":'<div class="dxrd-surface" style="display:inline-block;" data-bind="styleunit: { \'width\': $root.surfaceSize }, click: function(_, e) { $root.selection.clickHandler(null, e); e.stopPropagation(); }, keyDownActions: $root.actionLists"> <div class="dxrd-viewport" style="width:inherit;height:inherit;"> <div class="dxqb-mainwin" data-bind="dxScrollView: { direction: \'both\', showScrollbar: \'onHover\', scrollByContent: false, scrollByThumb: true, bounceEnabled: false, useNative: false, height: \'100%\' }"> <div style="height:100%;"> <div class="dxrd-ghost-containment" style="height:100%;"> <div class="dxrd-ghost-container dxqb-ghost-container" data-bind="styleunit: { \'minWidth\': pageWidth, \'minHeight\': pageHeight }, trackCursor: { recalculateBounds: true, underCursor: underCursor }"> <div class="dxqb-main" data-bind="trackCursor: { recalculateBounds: true, underCursor: underCursor }, style: { \'z-index\' : $parent.dragDropStarted() ? 2 : null }"> \x3c!-- ko if: tables().length === 0--\x3e <div class="dxqb-placeholder dxd-empty-area-placeholder-text-color dxd-text-info" data-bind="text: placeholder()"></div> \x3c!-- /ko --\x3e \x3c!-- ko foreach: relations --\x3e \x3c!-- ko foreach: conditions --\x3e \x3c!-- ko if: !isSelected()--\x3e \x3c!-- ko template: template --\x3e \x3c!-- /ko --\x3e \x3c!-- /ko --\x3e \x3c!-- /ko --\x3e \x3c!-- /ko --\x3e \x3c!-- ko foreach: tables --\x3e \x3c!-- ko template: template --\x3e \x3c!-- /ko --\x3e \x3c!-- /ko --\x3e \x3c!-- ko foreach: relations --\x3e \x3c!-- ko foreach: conditions --\x3e \x3c!-- ko if: isSelected()--\x3e \x3c!-- ko template: selectiontemplate --\x3e \x3c!-- /ko --\x3e \x3c!-- /ko --\x3e \x3c!-- /ko --\x3e \x3c!-- /ko --\x3e \x3c!-- ko with: $root.columnDragHandler.dragDropConnector --\x3e <svg class="dxdd-connection-line-draggable" data-bind="styleunit: { top: position.top(), left: position.left() }"> \x3c!-- ko foreach: routePoints --\x3e \x3c!-- ko if: $index() < ($parent.routePoints().length - 1) --\x3e <line class="dxd-qb-relationship-line-color" fill="none" data-bind="attr: {x1 : $data.x, y1: $data.y, x2: $parent.routePoints()[$index()+1].x, y2: $parent.routePoints()[$index()+1].y }"></line> \x3c!-- /ko --\x3e \x3c!-- /ko --\x3e </svg> \x3c!-- /ko --\x3e </div> </div> </div> </div> </div> </div> </div>',"dxqb-relation":"\x3c!-- ko foreach: conditions --\x3e \x3c!-- ko template: { name: isSelected() ? selectiontemplate : template } --\x3e \x3c!-- /ko --\x3e \x3c!-- /ko --\x3e","dxqb-table-field":'<div class="dx-border-inheritor dxd-border-accented"> <div class="dxqb-table-field dxd-qb-table-field-border-color dxd-qb-table-field-back-color dxd-back-highlighted dxd-qb-table-field-separator-color dxd-border-primary" data-bind="trackCursor: { recalculateBounds: true, underCursor: underCursor }, draggable: $root.columnDragHandler, css: cssClasses($root.surface(), $root.columnDragHandler, $parent), click: $root.selectItemProperties"> <div class="dxqb-table-field-background dxd-back-accented"></div> <div class="dxqb-table-field-checkbox-wrapper"> <div class="dxqb-table-field-checkbox" data-bind="dxCheckBox: { value: selectedWrapper }, click: function(surface, e) { surface.toggleSelected(); e.stopPropagation(); return true; }"></div> </div> <div class="dxqb-table-field-content dxd-text-primary" data-bind="attr: { title: getControlModel().actualName }"> <div class="dxqb-table-field-state"> \x3c!-- ko if: $data.isAscending() --\x3e <div class="dxqb-image-field-state dxqb-image-field-sorting-asc">\x3c!-- ko template: \'dxrd-svg-queryBuilder-sorting_asc\' --\x3e\x3c!-- /ko --\x3e</div> \x3c!-- /ko --\x3e \x3c!-- ko if: $data.isDescending() --\x3e <div class="dxqb-image-field-state dxqb-image-field-sorting-desc">\x3c!-- ko template: \'dxrd-svg-queryBuilder-sorting_desc\' --\x3e\x3c!-- /ko --\x3e</div> \x3c!-- /ko --\x3e \x3c!-- ko if: $data.getControlModel().groupBy --\x3e <div class="dxqb-image-field-state dxqb-image-field-group-by">\x3c!-- ko template: \'dxrd-svg-queryBuilder-group_by\' --\x3e\x3c!-- /ko --\x3e</div> \x3c!-- /ko --\x3e \x3c!-- ko if: $data.isAggregate() --\x3e <div class="dxqb-image-field-state dxqb-image-field-aggregate">\x3c!-- ko template: \'dxrd-svg-queryBuilder-aggregate\' --\x3e\x3c!-- /ko --\x3e</div> \x3c!-- /ko --\x3e </div> <div class="dxqb-table-field-caption"> <div class="dxqb-table-field-text dxd-qb-table-field-text-color" data-bind="text: getControlModel().actualName"></div> </div> </div> </div> </div>',"dxqb-table-asterisk-field":'<div class="dx-border-inheritor dxd-border-accented"> <div class="dxqb-table-field dxd-qb-table-field-border-color dxd-qb-table-field-back-color dxd-back-highlighted dxd-border-primary" data-bind="trackCursor: underCursor, css: cssClasses(), click: $root.selectItemProperties"> <div class="dxqb-table-field-background dxd-back-accented"></div> <div class="dxqb-table-field-checkbox-wrapper"> <div class="dxqb-table-field-checkbox" data-bind="dxCheckBox: { value: selectedWrapper }, click: function(surface, e) { surface.toggleSelected(); e.stopPropagation(); return true; }"></div> </div> <div class="dxqb-table-field-content dxd-text-primary" data-bind="attr: { title: getControlModel().name }"> <div class="dxqb-table-field-caption"> <div class="dxqb-table-field-text dxd-qb-table-field-text-color" data-bind="text: getControlModel().name"></div> </div> </div> </div> </div>',"dxqb-table-main":'\x3c!-- ko if: $data.isSelected() --\x3e <div class="dxqb-table-resize-ghost" data-bind="resizable: resizable($root.resizeHandler, $element), styleunit: position"></div> \x3c!-- /ko --\x3e <div class="dxrd-control" data-bind="css: {\'dxrd-selected\': selected, \'dxrd-focused\': focused }, draggable: $root.dragHandler, styleunit: position, trackCursor: underCursor, click: $root.selectItemProperties"> <div class="dxrd-control-content-main dxd-qb-table-back-color dxd-back-primary2" data-bind="styleunit: { lineHeight: position.lineHeight }, style: css"> <div class="dxqb-table-background dxd-back-accented"></div> <div class="dx-background-inheritor dxd-back-accented"> <div class="dxqb-table-border dxd-qb-table-border-color dxd-back-highlighted dxd-state-active dxd-state-no-hover"></div> </div> <div data-bind="template: contenttemplate, styleunit: { \'height\': position.lineHeight, \'width\': position.width }"> </div> </div> </div>',"dxqb-table":'<div class="dxqb-table dxd-qb-table-back-color dxd-back-primary2"> <div class="dx-border-inheritor dxd-border-accented"> <div class="dxqb-table-head-field dxd-qb-table-field-border-color dxd-qb-table-field-back-color dxd-back-highlighted dxd-border-primary"> <div class="dxqb-table-checkbox-all"> <div data-bind="dxCheckBox: { value: selectedWrapper }, click: function(surface, e) { $root.undoEngine().start(); surface.toggleSelected(); $root.undoEngine().end(); e.stopPropagation(); return true; }"></div> </div> \x3c!-- ko template: titletemplate --\x3e \x3c!-- /ko --\x3e </div> </div> <div class="dxqb-table-content"> <div class="dxqb-tableFields-wrapper"> \x3c!-- ko ifnot: $data.isInitialized() --\x3e <div class="dxqb-table-loading"> <div class="dxqb-table-loading-text dxd-text-primary" data-bind="text: $root.columnsLoadingMsg()"></div> </div> \x3c!-- /ko --\x3e \x3c!-- ko if: $data.isInitialized() --\x3e \x3c!-- ko template: { name: asterisk.template, data: asterisk } --\x3e \x3c!-- /ko --\x3e \x3c!-- ko foreach: columns --\x3e \x3c!-- ko lazy: { template: $data.template }--\x3e \x3c!-- /ko --\x3e \x3c!-- /ko --\x3e \x3c!-- /ko --\x3e </div> </div> </div>',"dxqb-table-title":'<div class="dxqb-table-title" data-bind="style: { cursor: selected() ? \'move\' : \'default\' }"> <div class="dxqb-table-title-content dxd-text-primary" data-bind="text: getControlModel().actualName"></div> </div>',"dxqb-federation-table-title":'<div class="dxqb-table-title dxqb-federation-table-title" data-bind="event: { dblclick: $root.inlineTextEdit.show }, style: { cursor: selected() ? \'move\' : \'default\' }"> <div class="dxqb-federation-table-title-container"> \x3c!-- ko if: !$root.inlineTextEdit.visible() || !selected() --\x3e <div class="dxqb-table-title-content dxd-text-primary" data-bind="text: getControlModel().actualName"></div> \x3c!-- /ko --\x3e \x3c!-- ko if: $root.inlineTextEdit.visible() && selected() --\x3e \x3c!-- ko with: $root.inlineTextEdit --\x3e <div class="inline-text-edit" data-bind="dxTextArea: { value: text, onKeyUp: keypressAction, valueChangeEvent: \'keyup\' }"></div> \x3c!-- /ko --\x3e \x3c!-- /ko --\x3e </div> <div class="dxqb-table-subtitle dxd-text-info" data-bind="text: getControlModel().displaySourceName"></div> </div>',"dxrd-masterDetail-editor":"\x3c!-- ko if: $data --\x3e <div> <div data-bind=\"dxPopup: { showTitle: true, resizeEnabled: true, width: 700, height: 500, maxHeight: '95%', maxWidth: '95%', minHeight: 300, minWidth: 400, title: title(), visible: popupVisible, wrapperAttr: { class: 'dx-filtereditor' }, toolbarItems: buttonItems, showCloseButton: true, container: $root.getPopupContainer($element), position: { of: $root.getPopupContainer($element) }, }\"> <div class=\"dx-filtereditor-tree dxd-border-secondary\" data-bind=\"dxScrollView: { showScrollbar: 'onHover', direction: 'both' }\" style=\"cursor: default\"> \x3c!-- ko foreach: masterQueries --\x3e <div class=\"criteria-operator-group\"> <div class=\"criteria-operator-group-item\"> <div class=\"criteria-operator-text dxd-filter-editor-text-color criteria-operator-item-group dxd-filter-editor-group-back-color dxd-state-no-hover stylized\" data-bind=\"text: queryName\"></div> <div data-bind=\"service: { name: 'createRelation' }\"></div> </div> <div class=\"criteria-operator-content\"> \x3c!-- ko template: { name: 'dx-masterDetail-editor-relation', foreach: relations }--\x3e \x3c!-- /ko --\x3e </div> </div> \x3c!-- /ko --\x3e </div> </div> <div class=\"dx-selectbox-popup-wrapper dx-dropdownlist-popup-wrapper dx-filtereditor-criteriaoperator-popup dx-dropdowneditor-overlay\" data-bind=\"dxPopupWithAutoHeight: { height: '300px', focusStateEnabled: false, wrapperAttr: { class: 'dx-selectbox-popup-wrapper dx-dropdownlist-popup-wrapper dx-filtereditor-criteriaoperator-popup dx-dropdowneditor-overlay' }, position: $root.rtl ? { my: 'right top', at: 'right bottom', of: popupService.target } : { my: 'left top', at: 'left bottom', of: popupService.target }, container: $root.getPopupContainer($element), target: popupService.target, showTitle: false, showCloseButton: false, animation: {}, hideOnOutsideClick: true, shading: false, minWidth:'170px', maxWidth:'500px', width: 'auto', visible: popupService.visible }\"> \x3c!-- ko with: popupService--\x3e \x3c!-- ko with: data --\x3e \x3c!-- ko template: template--\x3e \x3c!-- /ko --\x3e \x3c!-- /ko --\x3e \x3c!-- /ko --\x3e </div> </div> \x3c!-- /ko --\x3e","dx-masterDetail-editor-keyColumn":'<div class="criteria-operator-text dxd-filter-editor-text-color criteria-operator-item-field dxd-filter-editor-field-back-color dxd-state-no-hover stylized" data-bind="attr: { title: $data.getTitle() }, text: queryName"></div> <div class="criteria-operator-text dxd-filter-editor-text-color">.</div> <div class="criteria-operator-text dxd-filter-editor-text-color"> <div data-bind="service: { name: \'setColumn\' }"></div> </div>',"dx-masterDetail-editor-relation":'<div class="criteria-operator-group"> <div class="criteria-operator-group-item"> <div class="criteria-operator-action" data-bind="dxclick: function() { $parent.remove($data); }"> <div class="criteria-operator-action-image dx-image-filtereditor-remove">\x3c!-- ko template: \'dxrd-svg-filtereditor-remove\' --\x3e\x3c!-- /ko --\x3e</div> </div> <div class="criteria-operator-item" data-bind="visible: isEditable"> <div class="criteria-operator-item-editor" data-bind="dxTextBox: { value: relationName, onFocusOut: function() { isEditable(false); } }, focus: { on: isEditable }"></div> </div> <div class="criteria-operator-text dxd-filter-editor-text-color criteria-operator-item-value dxd-filter-editor-value-back-color" data-bind="visible: !isEditable()"> <div class="criteria-operator-text dxd-filter-editor-text-color clickable" data-bind="text: relationName, click: function() { isEditable(true); }"></div> </div> <div class="criteria-operator-action" data-bind="dxclick: create"> <div class="criteria-operator-action-image dx-image-filtereditor-add">\x3c!-- ko template: \'dxrd-svg-filtereditor-add\' --\x3e\x3c!-- /ko --\x3e</div> </div> </div> <div class="criteria-operator-content"> \x3c!-- ko foreach: keyColumns --\x3e <div class="criteria-operator-group"> <div class="criteria-operator-group-item"> <div class="criteria-operator-action" data-bind="dxclick: function() { $parent.remove($data); }"> <div class="criteria-operator-action-image dx-image-filtereditor-remove">\x3c!-- ko template: \'dxrd-svg-filtereditor-remove\' --\x3e\x3c!-- /ko --\x3e</div> </div> \x3c!-- ko template: { name: \'dx-masterDetail-editor-keyColumn\', data: master } --\x3e \x3c!-- /ko --\x3e <div class="criteria-operator-text dxd-filter-editor-text-color"> = </div> \x3c!-- ko template: { name: \'dx-masterDetail-editor-keyColumn\', data: detail } --\x3e \x3c!-- /ko --\x3e </div> </div> \x3c!-- /ko --\x3e </div> </div>',"dx-masterdetail-editor-setColumn":"<div class=\"criteria-operator-text dxd-filter-editor-text-color clickable criteria-operator-item-field dxd-filter-editor-field-back-color\" data-bind=\"text: target.column() || target.selectColumnText(), dxclick: showPopup, css: { 'dxd-state-selected': target.isSelected, 'default': !target.column() }\"></div>","dxqb-data-preview":'<div style="height: 100%" data-bind="dxdTableView: $data.value"></div>',"dxqb-popup":'<div data-bind="dxPopup: { animation: { show: { type: \'fade\', from: 0, to: 1, duration: 700 }, hide: { type: \'fade\', from: 1, to: 0, duration: 700 } }, wrapperAttr: { class: \'dxqb-preview\' }, visible: isVisible, title: title(), showTitle: true, resizeEnabled: true, shading: true, shadingColor: \'transparent\', fullScreen: false, width: 800, height: 544, container: container($element), position: { of: container($element) }, onHidden: function() { $data.data.value(null) }, focusStateEnabled: false }"> <div class="dxqb-preview-popup-content"> \x3c!-- ko if: data && !isLoading() --\x3e \x3c!-- ko template: { name: template, data: data } --\x3e \x3c!-- /ko --\x3e \x3c!-- /ko --\x3e \x3c!-- ko if: isLoading --\x3e <div style="text-align: center; padding-top: 25%;"> <div data-bind="dxLoadIndicator: { visible: true }"></div> </div> \x3c!-- /ko --\x3e </div> <div class="dxqb-preview-popup-buttons dxd-border-secondary"> <div class="dxqb-preview-popup-button" data-bind="dxButton: { text: okButtonText(), onClick: okButtonHandler, disabled: isLoading }"></div> </div> </div>',"dxqb-selectstatment-preview":'<div class="dxqb-show-query-string-content dx-widget"> \x3c!-- ko if: !aceAvailable --\x3e <div class="dxrd-show-query-string-editor" data-bind="dxTextArea: { value: value, valueChangeEvent: \'keyup\', readOnly: true }"></div> \x3c!-- /ko --\x3e \x3c!-- ko if: aceAvailable --\x3e <div class="dxrd-show-query-string-editor"> <div class="dxrd-show-query-string-editor-content"> <div class="dx-sql_editor dx-disabled-ace dxd-back-primary2" data-bind="dxAceEditor: { value: value, options: aceOptions, additionalOptions: additionalOptions }"></div> </div> </div> \x3c!-- /ko --\x3e </div>',"dxd-tableview":'<div class="dxd-tableview"> <div class="dxd-tableview-titles"> <table> <tbody> <tr> \x3c!-- ko foreach: rtl ? data.schema.reverse() : data.schema --\x3e <td data-bind="attr: { class: \'dxd-tableview-title-cell dxd-border-secondary dxd-tableview-resizable\' }"> <div class="dxd-tableview-cell-text dxd-qb-data-preview-cell-text-color dxd-text-info" data-bind="text: name"></div> </td> \x3c!-- /ko --\x3e </tr> </tbody> </table> </div> \x3c!-- ko if: data.values --\x3e <div class="dxd-tableview-data" data-bind="dxScrollView: { direction: \'both\', scrollByContent: false, showScrollbar: \'always\', scrollByThumb: true, bounceEnabled: false, useNative: false, onScroll: $data.onDataScroll, onInitialized: $data.onDataScrollInitialized }"> <table> <tbody> \x3c!-- ko foreach: data.values --\x3e <tr> \x3c!-- ko foreach: $parent.rtl ? $data.reverse() : $data --\x3e <td class="dxd-tableview-cell dxd-border-secondary"> \x3c!-- ko ifnot: $parents[1].isImage($index()) --\x3e <div data-bind="text: $data, attr: { class: \'dxd-tableview-cell-text dxd-text-primary dxd-tableview-resizable\' + $index() }"></div> \x3c!-- /ko --\x3e \x3c!-- ko if: $parents[1].isImage($index()) --\x3e \x3c!-- ko if: $parents[1].isImageTooLarge($data) --\x3e <div data-bind="text: $parents[1].getImageTooLargeText($data), attr: { class: \'dxd-tableview-cell-text dxd-text-primary dxd-tableview-resizable\' + $index() }"></div> \x3c!-- /ko --\x3e \x3c!-- ko ifnot: $parents[1].isImageTooLarge($data) --\x3e <div data-bind="attr: { class: \'dxd-tableview-cell-text dxd-text-primary dxd-tableview-resizable\' + $index() }"> <img data-bind="attr: { src: \'data:image/bmp;base64,\' + $data }" /> </div> \x3c!-- /ko --\x3e \x3c!-- /ko --\x3e </td> \x3c!-- /ko --\x3e </tr> \x3c!-- /ko --\x3e <tr class="dxd-tableview-data-fakerow"> \x3c!-- ko foreach: data.values[0] --\x3e <td class="dxd-tableview-cell dxd-border-secondary"> <div data-bind="attr: { class: \'dxd-tableview-cell-text dxd-text-primary dxd-tableview-resizable\' + $index() }"></div> </td> \x3c!-- /ko --\x3e </tr> </tbody> </table> </div> \x3c!-- /ko --\x3e \x3c!-- ko ifnot: data.values --\x3e <div class="dxd-tableview-empty-message" data-bind="text: noDataText()"></div> \x3c!-- /ko --\x3e </div>',"dxqb-fieldlist-wrapper":'<div id="tree" data-bind="treelist: treeListOptions" style="width:100%; height: 100%;"></div>',"dxqb-properties-wrapper":'<div class="dxrd-properties-wrapper" data-bind="visible: active() && visible()"> <div class="dxd-text-primary dxrd-properties-wrapper-full-height"> \x3c!-- ko with: model --\x3e <div class="dxrd-properties-grid dxd-border-primary" data-bind="dxScrollView: { showScrollbar: \'onHover\', useNative: false, scrollByThumb: true }" style="top: 0px;"> <div> \x3c!-- ko foreach: groups --\x3e <div class="dx-fieldset" data-bind="visible: visible"> <div class="dx-accordion" data-bind="dxdAccordion: { collapsed: collapsed }"> <div class="dxrd-group-header dx-accordion-header dxd-border-primary" data-bind="css: { \'dxrd-group-header-collapsed\': collapsed() }"> <div class="dx-collapsing-image" data-bind="template: \'dxrd-svg-collapsed\', css: { \'dx-image-expanded\': !collapsed() }" style="display:inline-block;"></div> <span class="dxrd-group-header-text" data-bind="text: displayName()"></span> </div> <div class="dx-accordion-content dxd-back-primary dxd-border-primary"> \x3c!-- ko ifnot: editorsCreated --\x3e <div class="dx-accordion-content-loading-panel"> <div data-bind="dxLoadIndicator: { visible: !editorsCreated() }"></div> </div> \x3c!-- /ko --\x3e \x3c!-- ko if: $data.editorsRendered() --\x3e <div data-bind="visible: editorsCreated"> <div class="dx-editors"> \x3c!-- ko foreach: editors --\x3e \x3c!-- ko template: editorTemplate --\x3e \x3c!-- /ko --\x3e \x3c!-- ko if: ($index() === $parent.editors().length - 1 && $parent.editorsCreated(true)) --\x3e \x3c!-- /ko --\x3e \x3c!-- /ko --\x3e </div> </div> \x3c!-- /ko --\x3e </div> </div> </div> \x3c!-- /ko --\x3e </div> </div> \x3c!-- /ko --\x3e </div> </div>',"dxqb-propertygrid":'\x3c!-- ko with: value --\x3e <div class="dx-fieldset dxqb-selected-properties"> \x3c!-- ko foreach: properties.getEditors() --\x3e \x3c!-- ko template: editorTemplate --\x3e \x3c!-- /ko --\x3e \x3c!-- /ko --\x3e </div> \x3c!-- /ko --\x3e',"dxqb-fieldspanel":'\x3c!-- ko with: value --\x3e <div data-bind="treeListSearchPanel: { controllers: $data.fieldListModel.treeListOptions().treeListController }"></div> <div class="dxqb-right-panel-fields" data-bind="dxScrollView: { showScrollbar: \'onHover\', scrollByContent: false, scrollByThumb: true, bounceEnabled: false, useNative: false }"> \x3c!-- ko template: { name: "dxqb-fieldlist-wrapper", data: fieldListModel } --\x3e \x3c!-- /ko --\x3e </div> \x3c!-- /ko --\x3e',"dxqb-parameterspanel":'\x3c!-- ko with: value --\x3e <div class="dxqb-right-panel-parameters" data-bind="dxScrollView: { showScrollbar: \'onHover\', scrollByContent: false, scrollByThumb: true, bounceEnabled: false, useNative: false }"> <div style="width: 100%" data-bind="dxCollectionEditor: $data"></div> </div> \x3c!-- /ko --\x3e',"dxqb-collectioneditor-template":'<div class="dxrd-accordion-collection-item" data-bind="dxdAccordion: { collapsed: collapsed }"> <div class="dxrd-group-header dx-accordion-header"> <div> <div class="propertygrid-editor-collapsed dx-collapsing-image" data-bind="css: { \'dx-image-expanded\': !collapsed() }, template: \'dxrd-svg-collapsed\'"></div> <div class="dx-group-header-font" data-bind="text: $root.getLocalization($parent.name), attr: { title: $root.getLocalization($parent.name) }"></div> </div> </div> <div class="dx-accordion-content"> <div data-bind="dxPropertyGrid: { target: value, level: 1, parentDisabled: editor.disabled }"></div> </div> </div>',"dxqb-properties-wrapper-editorlist":'<div class="dxrd-properties-wrapper" data-bind="visible: active() && visible()"> <div style="height:100%" class="dxd-text-primary"> \x3c!-- ko with: model --\x3e <div class="dxrd-properties-grid dxd-border-primary" data-bind="dxScrollView: { showScrollbar: \'onHover\', useNative: false, scrollByThumb: true }" style="top: 0px;"> <div class="dx-fieldset dxqb-selected-properties"> \x3c!-- ko foreach: getEditors() --\x3e \x3c!-- ko template: editorTemplate --\x3e \x3c!-- /ko --\x3e \x3c!-- /ko --\x3e </div> </div> \x3c!-- /ko --\x3e </div> </div>',"dxqb-toolbar":'<div class="dxrd-toolbar-wrapper dxd-toolbar-back-color" data-bind="click: $root.findControl"> <div class="dxqb-toolbar-background dxd-back-primary-invariant"></div> <div class="dxrd-toolbar" data-bind="template: {name: \'dxqb-toolbar-items\', data: actionLists.toolbarItems }"></div> </div>',"dxqb-toolbar-items":'\x3c!-- ko foreach: $data --\x3e \x3c!-- ko if: $data.templateName --\x3e \x3c!-- ko template: templateName --\x3e \x3c!-- /ko --\x3e \x3c!-- /ko --\x3e \x3c!-- ko if: !$data.templateName --\x3e <div class="dxrd-toolbar-item" data-bind="visible: visible"> <div class="dxqb-toolbar-item-container"> <div class="dxqb-toolbar-item-background dxd-back-secondary"></div> <div data-bind="template: {name: ko.unwrap($data.imageTemplateName), if: !!ko.unwrap($data.imageTemplateName)}, attr: { class: \'dxrd-toolbar-item-image dxd-icon-highlighted dxd-state-normal \' + (ko.unwrap($data.imageClassName) || \'\'), title: $data.displayText && $data.displayText() || text }, dxclick: function() { if((typeof $data.disabled === \'function\') && !disabled() || !disabled) { clickAction($root.model && $root.model()); } }, css: {\'dxrd-disabled-button\': disabled, \'dxd-state-active\': $data.selected }"> </div> </div> <div class="dxrd-toolbar-item-separator dxd-toolbar-separator-color dxd-border-secondary" data-bind="visible: $data.hasSeparator"></div> </div> \x3c!-- /ko --\x3e \x3c!-- /ko --\x3e',"dxqb-property-editor":'<div class="dxrd-editor" data-bind="visible: visible"> <div class="dxrd-editor-header"> <div class="dx-field dxd-back-primary"> <div class="dx-field-label dxd-text-primary"> <div class="propertygrid-editor-displayName" data-bind="text: displayName, attr: { \'title\': displayName }"></div> </div> <div class="dx-field-value"> <div data-bind="service: { name: \'createEditorAddOn\' }"></div> \x3c!-- ko lazy: { template: templateName } --\x3e \x3c!-- /ko --\x3e </div> </div> </div> </div>',"dxqb-expressionstring":'\x3c!-- ko if: $data.value() --\x3e <div data-bind="dxExpressionEditor: getOptions({ options: value, fieldListProvider: $root.parametersBindingsProvider, displayNameProvider: $root.displayNameProvider && $root.displayNameProvider() })"></div> \x3c!-- /ko --\x3e',"dxqb-filtereditor-changeparameter":'<div class="criteria-operator-item" data-bind="visible: target.isEditable"> <div class="criteria-operator-item" data-bind="dxTextBox: { value: target._parameterName, onFocusOut: function() { target.createParameter(); target.isEditable(false); } }"></div> </div> <div class="criteria-operator-text dxd-filter-editor-text-color clickable " data-bind="text: target.parameterName, dxclick: showPopup, css: { \'dxd-state-selected\': target.isSelected, \'default\': target.isDefaultTextDisplayed() }, visible: $data.target.isEditable() === false"></div>',"dxqb-filtereditor-propertiespopup":'<div class="dx-widget" data-bind="dxScrollView: { showScrollbar: \'onHover\' }"> \x3c!-- ko foreach: data --\x3e <div data-bind="dxdAccordion: { collapsed: collapsed }"> <div class="dx-accordion-header"> <div class="dx-filtereditor-popup-item dxd-list-item-back-color dx-item dx-list-item dxd-back-highlighted"> <div class="dx-collapsing-image" data-bind="template: \'dxrd-svg-collapsed\', css: { \'dx-image-expanded\': !collapsed() }" style="display:inline-block; margin-left: 5px;"></div> <span class="dx-item-content dx-list-item-content" style="padding-left: 17px" data-bind="text: name"></span> </div> </div> <div class="dx-accordion-content dxd-back-primary"> \x3c!-- ko foreach: items --\x3e <div class="dx-filtereditor-popup-item dx-item dx-list-item dxd-list-item-back-color dxd-back-highlighted"> <span class="dx-item-content dx-list-item-content" style="padding-left: 17px" data-bind="text: name, attr: { \'title\': name }, click: function() { $parents[1].click($data); }"></span> </div> \x3c!--/ko --\x3e </div> </div> \x3c!--/ko --\x3e </div>',"dxqb-filtereditor-parameterspopup":'<div class="dx-widget" data-bind="dxScrollView: { showScrollbar: \'onHover\' }"> \x3c!-- ko if: $parent.viewModel.canCreateParameters --\x3e <div class="dx-filtereditor-popup-item dx-item dx-list-item dxd-list-item-back-color dxd-back-highlighted"> <span class="dx-item-content dx-list-item-content" data-bind="text: $parent.viewModel.defaultDisplay(), click: function() { $parent.viewModel.isEditable(true); $parent.viewModel._parameterName(\'\'); $parent.visible(false); }"></span> </div> \x3c!-- /ko --\x3e \x3c!-- ko foreach: data --\x3e <div class="dx-filtereditor-popup-item dx-item dx-list-item dxd-list-item-back-color dxd-back-highlighted"> <span class="dx-item-content dx-list-item-content" data-bind="text: name, click: function() { $parent.click($data); } "></span> </div> \x3c!-- /ko --\x3e </div>',"dxqb-treelist-item-with-search":'<div data-bind="visible: visible"> \x3c!-- ko template: "dxqb-treelist-header-item-with-search" --\x3e \x3c!-- /ko --\x3e </div>',"dxqb-treelist-header-item-with-search":'<div class="dx-treelist-item dxd-list-item-back-color dxd-back-highlighted" data-bind="event: { dblclick: function() { $data.dblClickHandler ? $data.dblClickHandler($data) : $data.toggleCollapsed() } }, styleunit: padding, css: { \'dx-treelist-item-selected dxd-state-selected\': isSelected() || isMultiSelected() }"> <div class="dx-treelist-collapsedbutton"></div> <div class="dx-treelist-caption"> <div class="dx-treelist-selectedcontent" data-bind="click: toggleSelected, draggable: isDraggable ? dragDropHandler : null"> <div class="dx-treelist-image" data-bind="css: $data.imageClassName, template: {name: $data.imageTemplateName, if: !!ko.unwrap($data.imageTemplateName)}, attr: { title: text }"> </div> \x3c!-- ko template: { name: \'dx-treelist-item-text-content\' } --\x3e \x3c!-- /ko --\x3e </div> </div> </div>',"dxrd-page-choose-datasource-type":"<div class=\"dxrd-wizard-type-page\" data-bind=\"css: $data._extendCssClass('type-page')\"> \x3c!-- ko foreach: typeItems --\x3e \x3c!-- ko template: 'dxrd-page-choose-type-item' --\x3e \x3c!-- /ko --\x3e \x3c!-- /ko --\x3e </div>","dxrd-page-choose-type-item":"<div data-bind=\"event: { click: $parent._itemClick, dblclick: function() { $parent._goToNextPage() } }, attr: { class: 'dxd-back-highlighted dxd-state-normal dxrd-wizard-type-item dx-fontsize-reestablished dxrd-wizard-type-item-border-color dxd-list-item-back-color ' + $parent._extendCssClass('type-item')}, css: { 'dxd-border-secondary dxd-back-secondary': $parent._IsSelected($data) } \"> <div data-bind=\"attr: { class: 'dxrd-wizard-type-image ' + $parent._extendCssClass('type-image') }, css: imageClassName, template: imageTemplateName\"> </div> \x3c!-- ko if: !!$parent._textToSearch --\x3e <div class=\"dxrd-wizard-type-text\" data-bind=\"searchHighlighting: { text: text, textToSearch: $parent._textToSearch }, attr: { title: text }, css: $parent._extendCssClass('type-text')\"></div> \x3c!-- /ko --\x3e \x3c!-- ko ifnot: !!$parent._textToSearch --\x3e <div class=\"dxrd-wizard-type-text\" data-bind=\"text: text, attr: { title: text }, css: $parent._extendCssClass('type-text')\"></div> \x3c!-- /ko --\x3e </div>","dxrd-wizard-add-federated-queries-page":'<div class="dxrd-wizard-page dxrd-wizard-add-federation-queries-page dxrd-wizard-page-treelist-accordion-style"> <div data-bind="treeListSearchPanel: {controllers: ko.unwrap(_fieldListModel).treeListController}"></div> <div class="dxrd-wizard-dataMember dxd-border-secondary" data-bind="dxScrollView: { showScrollbar: \'onHover\', height: _scrollViewHeight }"> <div class="dxrd-wizard-dataMember-treelist" data-bind="treelist: _fieldListModel" style="width:100%; height: 100%;"></div> </div> \x3c!-- ko template: { name: $data._queriesPopupHelper.template, data: _queriesPopupHelper } --\x3e \x3c!-- /ko --\x3e <div class="dxrd-wizard-load-panel dxd-text-primary" data-bind="dxLoadPanel: _loadPanelViewModel($element)"> </div> </div>',"dx-treelist-federation-action-with-popover":"<div class=\"dx-treelist-action-with-popover\" style=\"display: inline-block\"> <div class=\"dx-treelist-action\" data-bind=\"dxButtonWithTemplate: { onClick: function() { clickAction($parent); }, icon: $data.imageTemplateName, iconClass: $data.imageClassName , disabled: $data.disabled && $data.disabled() }, attr: { title: text }\"></div> \x3c!-- ko template: { name: 'dx-popover-list-items', data: ko.utils.extend($parent.data, { className: 'dxrd-federation-addqueries-popover', position: $root.rtl ? 'right' : 'left', popupContainer: $root.getPopupContainer, width: 150 }) }--\x3e \x3c!-- /ko --\x3e </div>","dxrd-querybuilder-select-popup-content":'<div class="dxrd-federation-result-grids dxrd-federation-data-container-column"> <div class="dxd-border-secondary dxrd-select-querybuilder-surface" data-bind="resizable: gridResizeHelper.resizable($root.resizeHandler, \'s\')"> <div style="height:100%;" data-bind="dxQueryBuilderSurface: queryBuilderSurfaceCreator"></div> </div> <div class="dx-accordion dxd-border-secondary dxrd-select-result-alias-grid" data-bind="dxdAccordion: { collapsed: joinResultCollapsed }"> <div class="dxd-back-secondary dx-accordion-header dxd-text-primary"> <div class="dx-collapsing-image" data-bind="template: \'dxrd-svg-collapsed\', css: { \'dx-image-expanded\': !joinResultCollapsed() }" style="display:inline-block;"></div> <span class="dxrd-group-header-text" data-bind="text: $root.getLocalization(\'Join result\', \'DataAccessUIStringId.FederationDataSourceQueryBuilder_SelectResult\')"></span> </div> <div class="dx-accordion-content dxd-border-secondary" data-bind="style: { height: resultGridHeight }"> <div class="dxrd-federation-action-add dxrd-collectioneditor-action" data-bind="dxButton: { icon: \'add\', disabled: addRowDisabled, onClick:addRow }"></div> <div data-bind="dxDataGrid: columnsGrid"></div> </div> </div> </div>',"dxrd-querybuilder-column-combobox-masked":'<div class="dxrd-querybuilder-column-container dxrd-querybuilder-column-container-masked"> <div class="dxrd-querybuilder-column-data"> <div class="dx-texteditor-input" data-bind="text: cellInfo.column"></div> </div> <div class="dxrd-querybuilder-column-editorswitch"> \x3c!-- ko template: { name: \'dx-wizard-menu-box-editorswitch\', data: $data } --\x3e \x3c!-- /ko --\x3e </div> </div>',"dxrd-querybuilder-column-combobox":"<div class=\"dxrd-querybuilder-column-container dxrd-querybuilder-column-container-full\"> <div class=\"dxrd-querybuilder-column-data\"> <div class=\"dx-texteditor-input dx-padding-none\" data-bind=\"dxDropDownBox: { dataSource: $data.allColumns, dropDownOptions: { container: $root.getPopupContainer($element), width: $root.calculateWithZoomFactor(357) }, popupPosition: { boundary: $root.getPopupContainer($element) }, value: cellInfo.key, valueExpr: 'key', displayExpr: 'column' }, visible: !$data.isExpression()\"> <div data-bind=\"dxDataGrid: { dataSource: $data.allColumns, keyExpr: 'key', remoteOperations: true, height: $root.calculateWithZoomFactor(250), columns: [{ dataField: 'column', sortOrder: 'asc' } , { dataField: 'table'}], hoverStateEnabled: true, selection: { mode: 'single' }, selectedRowKeys: [cellInfo.key], focusedRowEnabled: true, focusedRowKey: cellInfo.key, onSelectionChanged: $data.changeColumn } \"></div> </div> <div class=\"dx-texteditor-input dx-padding-none\" data-bind=\"dxExpressionEditor: { options: expression, fieldListProvider: itemsProvider, displayNameProvider: $root.displayNameProvider && $root.displayNameProvider() }, visible: $data.isExpression\"></div> </div> <div class=\"dxrd-querybuilder-column-editorswitch\"> \x3c!-- ko template: { name: 'dx-wizard-menu-box-editorswitch', data: $data } --\x3e \x3c!-- /ko --\x3e </div> </div>","dxrd-querybuilder-transform-popup-content":'<div class="dxrd-federation-result-grids dxrd-federation-data-container-column"> <div class="dx-accordion dxd-border-secondary dxrd-transform-source-grid dxrd-result-source-grid"> <div class="dxd-back-secondary dx-accordion-header dxd-text-primary"> <span class="dxrd-group-header-text" data-bind="text: $data.transformGridTitle"></span> </div> <div class="dx-accordion-content dxd-border-secondary"> <div class="dxd-border-primary dxrd-transform-source-grid dxrd-result-source-grid" data-bind="dxDataGrid: transformGrid"></div> </div> </div> <div class="dx-accordion dxd-border-secondary dxrd-transform-result-grid" data-bind="dxdAccordion: { collapsed: transformResultCollapsed }"> <div class="dxd-back-secondary dx-accordion-header dxd-text-primary"> <div class="dx-collapsing-image" data-bind="template: \'dxrd-svg-collapsed\', css: { \'dx-image-expanded\': !transformResultCollapsed() }" style="display:inline-block;"></div> <span class="dxrd-group-header-text" data-bind="text: $data.transformResultGridTitle"></span> </div> <div class="dx-accordion-content dxd-border-secondary"> <div data-bind="dxScrollView: { showScrollbar: \'onHover\' }"> <div data-bind="treelist: resultFieldListModel" style="width:100%; height: 100%;"></div> </div> </div> </div> </div>',"dxrd-querybuilder-transform-checkbox":'<div class="dxrd-querybuilder-transform-checkbox" data-bind="dxCheckBox: transform"></div>',"dxrd-querybuilder-federation-popup":'<div data-bind="dxPopup: { showTitle: true, title: title(), wrapperAttr: { class: cssClass }, visible: popupVisible, toolbarItems: buttonItems, showCloseButton: true, fullScreen: false, maxHeight: maxHeight, height: height, width: width, onShowing: function(e) { $data.loaded(true); }, rtlEnabled: rtl, onHiding: onHiding, container: getPopupContainer($element), position: { of: getPopupContainer($element)}, resizeEnabled: true, minHeight: 450, minWidth: 650 }"> <div class="dxrd-querybuilder-federation-popup"> \x3c!-- ko if: popupVisible --\x3e \x3c!-- ko if: loaded --\x3e <div class="dxrd-federation-treelist-wrapper dxd-border-secondary" data-bind="resizable: resizeHelper.resizable($root.resizeHandler, \'e\')"> <div class="dxrd-federation-treelist" data-bind="dxScrollView: { showScrollbar: \'onHover\' }"> <div data-bind="treelist: fieldListModel" style="width:100%; height: 100%;"></div> </div> </div> <div class="dxrd-federation-data-container"> \x3c!-- ko template: { name: popupContentTemplate } --\x3e \x3c!-- /ko --\x3e </div> \x3c!-- /ko --\x3e \x3c!-- /ko --\x3e </div> </div>',"dxrd-querybuilder-union-popup-content":'<div class="dxrd-federation-result-grids dxrd-federation-data-container-column"> <div class="dxd-border-secondary dxrd-union-result-source-grid dxrd-result-source-grid" data-bind="dxDataGrid: sourcesGrid"></div> <div class="dxd-border-secondary dxrd-union-result-alias-grid"> <div data-bind="dxDataGrid: aliasGrid"></div> </div> </div>',"dx-wizard-fullscreen":'\x3c!-- ko if: $data && $data.isVisible() --\x3e <div class="dx-fullscreen-wizard dx-editors" data-bind="css: { \'dx-rtl\': $root.rtl, \'dx-ltr\': !$root.rtl }"> <div class="dxrd-wizard dxrd-report-wizard dx-editors dxd-text-primary dxd-back-primary2" data-bind="css: _extendCssClass"> <div class="dxrd-wizard-steps-container dxd-back-primary" data-bind="visible: $data.navigationPanel().isVisible"> <div class="dxrd-wizard-title dxd-border-primary" data-bind="text: _description(), attr: {\'title\': _description() }"></div> \x3c!-- ko with: navigationPanel --\x3e <div class="dxrd-wizard-steps" data-bind="foreach: _steps"> <div class="dxrd-wizard-steps-relative" style="position:relative" data-bind="visible: $data.visible"> <div class="dxrd-wizard-steps-content" data-bind="click: $data.clickAction, text: $data.text, attr: {\'title\': $data.text }, css: { \'dxrd-disabled\': $data.disabled, \'dxd-back-secondary\': $data.isActive() }"></div> <div class="dxrd-wizard-steps-marker dxd-back-primary2" data-bind="visible: $data.isActive"></div> </div> </div> \x3c!-- /ko --\x3e </div> <div class="dxrd-wizard-content" data-bind="css: { \'withoutPanel\': !$data.navigationPanel().isVisible() }"> <div class="dxrd-wizard-part-description dxd-back-contrast"> <div class="dxrd-wizard-part-description-text dxd-text-primary dxd-border-primary" data-bind="text: _pageDescription()"></div> </div> \x3c!-- ko with: _currentPage --\x3e <div class="dxrd-wizard-work-content"> <div class="dxrd-wizard-work-content-relative"> <div data-bind="template: { name: template, data: page } "></div> </div> </div> \x3c!-- /ko --\x3e <div class="dxrd-wizard-load-panel dxd-text-primary" data-bind="dxLoadPanel: _loadPanelViewModel($element)"> </div> <div class="dxrd-wizard-navigation"> <div data-bind="dxButton: cancelButton" class="dxrd-wizard-btn left"></div> <div data-bind="dxButton: finishButton" class="dxrd-wizard-btn right"></div> <div data-bind="dxButton: nextButton" class="dxrd-wizard-btn right"></div> <div data-bind="dxButton: previousButton" class="dxrd-wizard-btn right"></div> </div> </div> </div> </div> \x3c!-- /ko --\x3e',"dx-wizard-fullscreen-page":'\x3c!-- ko if: $data._sections.length > 0 --\x3e <div style="position:absolute;" data-bind="foreach: _sections, css: _className, styleunit: { top: _parentMarginOffset, left: _parentMarginOffset, right: _parentMarginOffset, bottom: _parentMarginOffset }"> <div class="dx-border-inheritor dxd-border-accented"> <div class="dxrd-report-page-tile dxd-border-secondary" data-bind="css: { \'dxrd-disabled\': !$data.page() }, style: $parent._pageCss[$data.pageId]"> <div class="dxrd-report-page-tile-title" data-bind="visible: $parent._showPageDescription(), text: $parent._getPageDescription($index(), $data), attr: { title: $parent._getPageDescription($index(), $data) }"></div> \x3c!-- ko if: $data.page() !== null --\x3e \x3c!-- ko with: page --\x3e <div class="dxrd-report-page-tile-content" data-bind="template: { name: $parent.metadata.template, data: page }, dxScrollView: { showScrollbar: \'onHover\'}"></div> \x3c!-- /ko --\x3e \x3c!-- /ko --\x3e \x3c!-- ko if: $data.page() === null --\x3e <div class="dxrd-report-page-tile-content dx-default-border-style dxd-border-secondary"> <div class="dxrd-wizard-page dxrd-wizard-disabled-content" data-bind="text: metadata.disabledText"></div> </div> \x3c!-- /ko --\x3e </div> </div> </div> \x3c!-- /ko --\x3e',"dxrd-jsondatasource-fields-page":'<div class="dxrd-wizard-page dx-jsonschema-page dx-frameless-style"> <div class="dx-default-border-style dxd-border-secondary dxrd-wizard-dataMember dx-fieldset" style="height:100%"> <div class="dx-field"> <div class="dx-field-label" data-bind="text: _rootElementTitle"></div> <div class="dx-field-value" data-bind="dxSelectBox: { dataSource: _rootElementList, value: _selectedRootElement, displayExpr: \'fullPath\', displayCustomValue: true, useItemTextAsTitle: true, dropDownOptions: { container: $root.getPopupContainer($element) } }"></div> </div> <div class="dxrd-wizard-add-queries-page dxrd-wizard-page-treelist-accordion-style dxd-border-secondary" data-bind="dxScrollView: { showScrollbar: \'onHover\' }"> <div data-bind="treelist: _fieldListModel" style="width:100%; height: 100%;"></div> </div> </div> </div>',"dxrd-page-jsonsource":'<div class="dxrd-wizard-page dx-jsonsource-page dx-frameless-style"> <div class="dx-default-border-style dxd-border-secondary dxrd-wizard-dataMember dx-fieldset" style="height: 100%" data-bind="dxScrollView: { showScrollbar: \'onHover\', useNative: false, scrollByThumb: true }, dxValidationGroup: $data._validationGroup || {}"> <div class="dx-field"> <div class="dx-property-required dx-field-label" data-bind="text: _jsonConnectionTitle, attr: { \'title\': _jsonConnectionTitle }"></div> <div class="dx-field-value" data-bind="dxTextBox: { value: _connectionName }, dxValidator: { validationRules: $data._connectionNameValidationRules || [] }"></div> </div> <div class="dx-field"> <div class="dx-field-label" data-bind="text: _jsonSourceTitle, attr: { \'title\': _jsonSourceTitle }"></div> <div class="dx-field-value" data-bind="dxLocalizedSelectBox: { dataSource: _sources, value: _selectedSource, valueExpr:\'value\', displayExpr: \'displayValue\', displayCustomValue: true, dropDownOptions: { container: $root.getPopupContainer($element) } }"></div> </div> \x3c!-- ko with: _selectedSource --\x3e <div data-bind="dxValidationGroup: $data.validationGroup || {}"> <div data-bind="css: $data.cssClass"> \x3c!-- ko template: { name: \'dx-propertieseditor\', data: grid } --\x3e \x3c!-- /ko --\x3e </div> <div class="dxrd-wizard-validationsummary" data-bind="dxValidationSummary: $data.validationSummary || {}, visible: $data.validationSummary && !isValid()"></div> </div> \x3c!-- /ko --\x3e <div class="dxrd-wizard-validationsummary" data-bind="dxValidationSummary: $data._validationSummary || {}, visible: $data._validationSummary && _selectedSource().validationSummary && !canNext()"></div> </div> </div>',"dx-property-json-string-editor":'<div class="dx-field" data-bind="visible: visible"> \x3c!-- ko template: templateName --\x3e \x3c!-- /ko --\x3e </div>',"dxrd-page-dataSource":'<div class="dxrd-wizard-page"> \x3c!-- ko if: isDataSourceCreationAvailable --\x3e <div class="dxrd-wizard-datasourceoperation dxrd-radio-nowrap-ellipsis" data-bind="dxRadioGroup: { value: selectedDataSourceOperation, items: dataSourceOperations, layout: \'vertical\' }"> <div data-options="dxTemplate : { name: \'item\' }"> <div class="dxrd-radio-nowrap-ellipsis-text" data-bind="text: text, attr: { \'title\': text }"></div> </div> </div> \x3c!-- /ko --\x3e <div class="dxrd-wizard-availabledatasources dx-default-border-style dxd-border-secondary"> <div class="dxrd-wizard-list" data-bind="dxList: { dataSource: availableDataSources, selectedItems: selectedDataSource, focusStateEnabled:false, editEnabled: true, height: dataSourcesListHeight, editConfig: { selectionEnabled: false }, selectionMode: \'single\', activeStateEnabled: false, disabled: createNewDataSource, noDataText: $root.dx._static.noDataText() }"> <div data-options="dxTemplate : { name: \'item\' }"> <div data-bind="text: name"></div> </div> </div> </div></div>',"dxrd-page-selectitems":"<div class=\"dxrd-wizard-page\"> \x3c!-- ko template: { name: 'dxrd-page-selectitems-radio-group', data: $data } --\x3e \x3c!-- /ko --\x3e \x3c!-- ko template: { name: 'dxrd-page-selectitems-list', data: $data } --\x3e \x3c!-- /ko --\x3e </div>","dxrd-page-selectitems-radio-group":'\x3c!-- ko if: canCreateNew --\x3e <div class="dxrd-wizard-datasourceoperation dxrd-radio-nowrap-ellipsis" data-bind="dxRadioGroup: { value: selectedOperation, items: operations, layout: \'vertical\' }"> <div data-options="dxTemplate : { name: \'item\' }"> <div class="dxrd-radio-nowrap-ellipsis-text" data-bind="text: text, attr: { \'title\': text }"></div> </div> </div> \x3c!-- /ko --\x3e',"dxrd-page-selectitems-list":'<div class="dxrd-wizard-availabledatasources dx-default-border-style dxd-border-secondary" data-bind="styleunit: { top: $data.canCreateNew() ? 65 : 0 }"> <div class="dxrd-wizard-list dxd-border-primary" data-bind="dxList: { dataSource: items, onSelectionChanged: function(e) { selectedItems(e.addedItems) }, selectedItems: selectedItems.peek(), hoverStateEnabled:false, editEnabled: true, height: \'100%\', editConfig: { selectionEnabled: false }, searchExpr: \'name\', searchEnabled: true, selectionMode: \'single\', activeStateEnabled: false, disabled: _createNew, noDataText: $root.dx._static.noDataText(), searchEditorOptions: { placeholder: $root.dx._static.searchPlaceholder() } }"> <div data-options="dxTemplate : { name: \'item\' }" data-bind="event: { dblclick: function(e){ $parent.onDblClick() } }"> <div data-bind="text: $parent._displayExpr($data)"></div> </div> </div> </div>',"dxrd-page-specify-connection":"<div class=\"dxrd-wizard-page\"> \x3c!-- ko template: { name: 'dxrd-page-selectitems-radio-group', data: $data } --\x3e \x3c!-- /ko --\x3e \x3c!-- ko if: !_createNew() --\x3e \x3c!-- ko template: { name: 'dxrd-page-selectitems-list', data: $data } --\x3e \x3c!-- /ko --\x3e \x3c!-- /ko --\x3e \x3c!-- ko if: _createNew --\x3e <div class=\"dxrd-page-specify-connection_createNew\"> \x3c!-- ko template: { name: 'dxrd-page-jsonsource', data: _specifySourceData } --\x3e \x3c!-- /ko --\x3e </div> \x3c!-- /ko --\x3e</div>","dx-jsonwizard-parametercollection":'<div class="dx-field"> \x3c!-- ko with: value --\x3e <div class="dx-jsonwizard-parameter-left-container"> <div class="dx-jsonwizard-parameter"> <div data-bind="dxLocalizedSelectBox: { dataSource: _parameterTypes, value: itemType, valueExpr:\'value\', displayExpr: \'displayValue\', displayCustomValue: true, dropDownOptions: { container: $root.getPopupContainer($element) } }"></div> </div> </div> <div class="dx-jsonwizard-parameter-middle-container"> <div data-bind="dxTextBox: { value: name, placeholder: $data.namePlaceholder() }, dxValidator: { validationRules: $parent.editor.editorOptions.nameValidationRules || [] }"></div> </div> <div class="dx-jsonwizard-parameter-right-container"> <div class="dx-jsonwizard-parameter"> <div data-bind="dxTextBox: { value: _editingValue, placeholder: $data.valuePlaceholder() }, visible: !$data.isExpression()"></div> <div data-bind="dxExpressionEditor: { options: _expression, fieldListProvider: $parent.editor.editorOptions.itemsProvider, displayNameProvider: $root.displayNameProvider && $root.displayNameProvider() }, visible: $data.isExpression"></div> </div> </div> \x3c!-- ko template: { name: \'dx-wizard-menu-box-editorswitch\', data: $data } --\x3e \x3c!-- /ko --\x3e \x3c!-- /ko --\x3e </div>',"dx-jsonwizard-loadfile-editor":"<div data-bind=\"dxFileImagePicker: { value: value, placeholderId: 'File', accept:'.json,.txt' }\"></div>","dx-jsonwizard-jsonstring-editor":'\x3c!-- ko if: !aceAvailable --\x3e <div class="dxrd-jsonwizard-jsonstring-editor dxd-border-secondary dxd-back-primary2" data-bind="dxTextArea: { value: value, spellcheck: false, isValid: isValid }, dxValidator: $data.validator || { validationRules: jsonStringValidationRules || [] }"></div> \x3c!-- /ko --\x3e \x3c!-- ko if: aceAvailable --\x3e <div class="dx-texteditor dx-editor-outlined dxrd-jsonwizard-jsonstring-editor dxd-wizard-jsoneditor dxd-border-secondary dxd-back-primary2" data-bind="dxAceEditor: { value: value, editorContainer: editorContainer, options: aceOptions, additionalOptions: additionalOptions }, css: { \'dx-invalid\' : !value() || !isValid() }"></div> \x3c!-- /ko --\x3e <div class="dxd-upload-file"> <div class="dxd-back-primary2"></div> <div data-bind="dxButtonWithTemplate: { onClick: uploadFile, hint: $data.getUploadTitle(), icon: \'dxrd-svg-wizard-Download\' }"></div> </div>',"dxrd-wizard-add-queries-page":'<div class="dxrd-wizard-page dxrd-wizard-add-queries-page dxrd-wizard-page-treelist-accordion-style"> <div data-bind="treeListSearchPanel: {controllers: ko.unwrap(_fieldListModel).treeListController}"></div> <div class="dxrd-wizard-dataMember dxd-border-secondary" data-bind="dxScrollView: { showScrollbar: \'onHover\', height: _scrollViewHeight }"> <div data-bind="treelist: _fieldListModel" style="width:100%; height: 100%;"></div> </div> \x3c!-- ko ifnot: $data.disableCustomSql --\x3e \x3c!-- ko template: { name: \'dxqb-popup-selectStatment\', data: _popupSelectStatement } --\x3e \x3c!-- /ko --\x3e \x3c!-- /ko --\x3e \x3c!-- ko template: { name: \'dxrd-querybuilder-popup\', data: _popupQueryBuilder } --\x3e \x3c!-- /ko --\x3e <div class="dxrd-wizard-load-panel dxd-text-primary" data-bind="dxLoadPanel: _loadPanelViewModel($element)"> </div> </div>',"dxd-custom-query-treelisitem":'<div data-bind="visible: visible"> <div class="dx-background-inheritor dxd-back-highlighted dxd-state-selected"> <div class="dx-treelist-item dx-fontsize-reestablished dxd-list-item-back-color" data-bind=" styleunit: padding, css: { \'dx-treelist-item-selected dxd-state-selected dxd-back-secondary\': isSelected }"> <div class="dx-treelist-collapsedbutton" data-bind="css: nodeImageClass"></div> <div class="dx-treelist-caption"> \x3c!-- ko if: actions && actions.length > 0 --\x3e <div class="dx-treelist-action-container" data-bind="visible: isSelected() || isHovered()"> \x3c!-- ko foreach: actions --\x3e \x3c!-- ko if: $data.templateName --\x3e \x3c!-- ko template: templateName --\x3e \x3c!-- /ko --\x3e \x3c!-- /ko --\x3e \x3c!-- ko if: !$data.templateName --\x3e <div class="dx-treelist-action" data-bind="dxButtonWithTemplate: { onClick: function() { clickAction($parent); }, icon: $data.imageTemplateName, iconClass: $data.imageClassName, disabled: $data.disabled && $data.disabled() }, attr: { title: text }"></div> \x3c!-- /ko --\x3e \x3c!-- /ko --\x3e </div> \x3c!-- /ko --\x3e <div class="dx-treelist-selectedcontent" data-bind="click: toggleSelected"> <div class="dx-treelist-text-wrapper"> <div class="dx-add-queries-page-checkbox" data-bind="dxCheckBox: { value: data.checked }, click: function(treeNode, e) { treeNode.data.toggleChecked(); e.stopPropagation(); return true; }"></div> <div class="dx-treelist-text dx-treelist-text-with-checkbox"> <div class="dx-queryname-textbox" data-bind="dxTextBox: { value: queryName }"></div> </div> </div> </div> </div> </div> </div> </div>',"dxrd-configure-query-parameters-page":'<div class="dxrd-wizard-page dxrd-configure-query-parameters-page dxrd-wizard-page-treelist-accordion-style"> <div class="dxrd-wizard-dataMember dxd-border-secondary" data-bind="dxScrollView: { showScrollbar: \'onHover\', height: _scrollViewHeight }"> \x3c!-- ko if: !!$data._fieldListModel() --\x3e <div data-bind="treelist: _fieldListModel" style="width:100%; height: 100%;"></div> \x3c!-- /ko --\x3e </div> </div>',"dxrd-wizard-configure-relations-page":"<div class=\"dxrd-wizard-page dxrd-wizard-configure-relations-page\"> \x3c!-- ko if: $data._relationsEditor() --\x3e \x3c!-- ko template: { name: 'dxrd-masterDetail-editor-complete-wizard', data: $data._relationsEditor }--\x3e \x3c!-- /ko --\x3e \x3c!-- /ko --\x3e </div>","dxrd-masterDetail-editor-complete-wizard":"<div class=\"dx-filtereditor dxrd-masterDetail-editor-complete-wizard dxd-border-secondary\"> \x3c!-- ko if: $data --\x3e <div class=\"dx-filtereditor-tree dxd-border-secondary\" data-bind=\"dxScrollView: { showScrollbar: 'onHover', direction: 'both' }\" style=\"cursor: default\"> \x3c!-- ko foreach: masterQueries --\x3e <div class=\"criteria-operator-group\"> <div class=\"criteria-operator-group-item\"> <div class=\"criteria-operator-text dxd-filter-editor-text-color criteria-operator-item-group dxd-filter-editor-group-back-color stylized\" data-bind=\"text: queryName\"></div> <div data-bind=\"service: { name: 'createRelation' }\"></div> </div> <div class=\"criteria-operator-content\"> \x3c!-- ko template: { name: 'dx-masterDetail-editor-relation', foreach: relations }--\x3e \x3c!-- /ko --\x3e </div> </div> \x3c!-- /ko --\x3e </div> <div class=\"dx-selectbox-popup-wrapper dx-dropdownlist-popup-wrapper dx-filtereditor-criteriaoperator-popup dx-dropdowneditor-overlay\" data-bind=\"dxPopupWithAutoHeight: { height: '235px', focusStateEnabled: false, position: $root.rtl ? { my: 'right top', at: 'right bottom', of: popupService.target, collision: 'flipfit' } : { my: 'left top', at: 'left bottom', of: popupService.target, collision: 'flipfit' }, wrapperAttr: { class: 'dx-selectbox-popup-wrapper dx-dropdownlist-popup-wrapper dx-filtereditor-criteriaoperator-popup dx-dropdowneditor-overlay' }, container: $root.getPopupContainer($element), target: popupService.target, showTitle: false, showCloseButton: false, animation: {}, hideOnOutsideClick: true, shading: false, minWidth:'170px', maxWidth:'500px', width: 'auto', visible: popupService.visible }\"> \x3c!-- ko with: popupService--\x3e \x3c!-- ko with: data --\x3e \x3c!-- ko template: template--\x3e \x3c!-- /ko --\x3e \x3c!-- /ko --\x3e \x3c!-- /ko --\x3e </div> \x3c!-- /ko --\x3e </div>","dxqb-popup-selectStatment":'<div data-bind="dxPopup: { animation: { show: { type: \'fade\', from: 0, to: 1, duration: 700 }, hide: { type: \'fade\', from: 1, to: 0, duration: 700 } }, wrapperAttr: { class: \'dxqb-preview\' }, visible: isVisible, title: title(), showTitle: true, resizeEnabled: true, shading: true, shadingColor: \'transparent\', fullScreen: false, width: 800, height: 544, container: closest($element, \'.dxrd-wizard\'), position: { of: closest($element, \'.dx-designer-viewport\') }, onHidden: function() { $data.data(null) }, focusStateEnabled: false }"> <div class="dxqb-preview-popup-content"> <div class="dxqb-show-query-string-content dx-widget"> \x3c!-- ko if: !aceAvailable --\x3e <div class="dxrd-show-query-string-editor" data-bind="dxTextArea: { value: data, valueChangeEvent: \'keyup\', disabled: false }"></div> \x3c!-- /ko --\x3e \x3c!-- ko if: aceAvailable --\x3e <div class="dxrd-show-query-string-editor"> <div class="dxrd-show-query-string-editor-content"> <div class="dx-sql_editor dxd-back-primary2" data-bind="dxAceEditor: { value: data, additionalOptions: additionalOptions, options: aceOptions }"></div> </div> </div> \x3c!-- /ko --\x3e </div> </div> <div class="dxqb-preview-popup-buttons dxd-border-secondary"> <div data-bind="dxButton: { text: okButtonText(), onClick: okButtonHandler }" class="dxqb-preview-popup-button"></div> </div> </div>',"dxrd-treelist-with-checkbox":'<div data-bind="visible: visible"> \x3c!-- ko if: hasContent --\x3e \x3c!-- ko template: "dx-treelist-accordion-item-with-checkbox" --\x3e \x3c!-- /ko --\x3e \x3c!-- /ko --\x3e \x3c!-- ko ifnot: hasContent --\x3e \x3c!-- ko template: "dx-treelist-header-item-with-checkbox" --\x3e \x3c!-- /ko --\x3e \x3c!-- /ko --\x3e </div>',"dx-treelist-accordion-item-with-checkbox":'<div data-bind="dxdAccordionExt: { collapsed: collapsed, lazyContentRendering: true }"> \x3c!-- ko template: "dx-treelist-header-item-with-checkbox" --\x3e \x3c!-- /ko --\x3e <div class="dx-fieldset dx-accordion-content dxd-back-primary"> \x3c!-- ko with: data --\x3e \x3c!-- ko template: { name: contenttemplate } --\x3e \x3c!-- /ko --\x3e \x3c!-- /ko --\x3e </div> </div>',"dx-treelist-header-item-with-checkbox":'<div class="dx-background-inheritor dxd-back-highlighted dxd-state-selected"> <div data-bind="event: { dblclick: function() { $data.dblClickHandler ? $data.dblClickHandler($data) : $data.toggleCollapsed() }, mouseenter: mouseenter, mouseleave: mouseleave }, attr: { class: \'dx-treeview-item dx-treelist-item dx-fontsize-reestablished dxd-list-item-back-color \' + ($data.hasItems ? \'dx-treelist-list-item-content \' : \'dx-treelist-field-item-content \') + ($data.isSelected() ? \'dx-treelist-item-selected dxd-state-selected dxd-back-secondary\' : \'\') }, styleunit: padding, css: { \'dx-state-hover\': isHovered }"> \x3c!-- ko ifnot: $data.hasItems--\x3e \x3c!-- ko if: $data.showIcon --\x3e <div class="dx-treelist-image" data-bind="css: $data.imageClassName, template: {name: $data.imageTemplateName, if: !!ko.unwrap($data.imageTemplateName)}, attr: { title: text }"> </div> \x3c!-- /ko --\x3e \x3c!-- ko ifnot: $data.showIcon --\x3e <div class="dx-treelist-collapsedbutton" data-bind="css: nodeImageClass"></div> \x3c!-- /ko --\x3e \x3c!-- /ko --\x3e \x3c!-- ko if: $data.hasItems --\x3e <div class="dx-treelist-collapsedbutton" data-bind="css: nodeImageClass, visible: hasItems, template: \'dxrd-svg-collapsed\', click: toggleCollapsed"></div> \x3c!-- /ko --\x3e <div class="dx-treelist-caption"> \x3c!-- ko if: actions && actions.length > 0 --\x3e <div class="dx-treelist-action-container" data-bind="visible: isSelected() || isHovered()"> \x3c!-- ko foreach: actions --\x3e \x3c!-- ko if: $data.templateName --\x3e \x3c!-- ko template: templateName --\x3e \x3c!-- /ko --\x3e \x3c!-- /ko --\x3e \x3c!-- ko if: !$data.templateName --\x3e <div class="dx-treelist-action" data-bind="dxButtonWithTemplate: { onClick: function() { clickAction($parent); }, icon: $data.imageTemplateName, iconClass: $data.imageClassName, disabled: $data.disabled && $data.disabled() }, attr: { title: text }"></div> \x3c!-- /ko --\x3e \x3c!-- /ko --\x3e </div> \x3c!-- /ko --\x3e <div class="dx-treelist-selectedcontent" data-bind="event: { dblclick: function() { $data.dblClickHandler && $data.dblClickHandler($data); } }, click: toggleSelected, draggable: isDraggable ? dragDropHandler : null, css: { \'dxrd-disabled\': $data.data.disabled && $data.data.disabled() }"> <div class="dx-treelist-text-wrapper"> <div class="dx-add-queries-page-checkbox" data-bind="dxCheckBox: { value: data.checked, disabled: data.selectionDisabled }, click: function(treeNode, e) { treeNode.data.toggleChecked(); e.stopPropagation(); return true; }"></div> \x3c!--ko if: treeListController.searchEnabled --\x3e <div class="dx-treelist-text dx-highlighted-search-text dx-treelist-text-with-checkbox" data-bind="searchHighlighting: { text: text, textToSearch: treeListController.textToSearch, searchOptions: treeListController.searchOptions }, attr: { title: text }"></div> \x3c!-- /ko --\x3e \x3c!--ko ifnot: treeListController.searchEnabled --\x3e <div class="dx-treelist-text dx-treelist-text-with-checkbox" data-bind="text: text, attr: { title: text }"></div> \x3c!-- /ko --\x3e </div> </div> </div> </div></div>',"dx-treelist-action-with-popover":'<div class="dx-treelist-action-with-popover" style="display: inline-block"> <div class="dx-treelist-action" data-bind="dxButtonWithTemplate: { onClick: function() { clickAction($parent); }, icon: $data.imageTemplateName, iconClass: $data.imageClassName , disabled: $data.disabled && $data.disabled() }, attr: { title: text }"></div> \x3c!-- ko template: { name: \'dx-popover-list-items\', data: ko.utils.extend($parent.data, { position: $root.rtl ? \'left\' : \'right\', popupContainer: $root.getPopupContainer }) }--\x3e \x3c!-- /ko --\x3e </div>',"dx-treelist-accordion-contenttemplate-custom-with-actions":'<div data-bind="dxPropertyGrid: { target: $parent.data.dataSourceParameter, level: $parent.data.editor.level + 1 }"></div>',"dxrd-page-objectdatasource-datamembers":'<div class="dx-objectdatasource-datamembers-page"> <div data-bind="dxList: { dataSource: _chooseObjectDataMember.dataMembers, selectedItems: _chooseObjectDataMember.selectedDataMembers, selectionMode: \'single\', activeStateEnabled: false, focusStateEnabled: false, searchExpr: \'displayName\', searchEnabled: true, noDataText: $dx._static.noDataText(), searchEditorOptions: { placeholder: $root.dx._static.searchPlaceholder() } }"> <div data-options="dxTemplate : { name: \'item\' }"> <div data-bind="text: $data.displayName"></div> </div> </div> </div>',"dxrd-page-objectdatasource-types":'<div class="dx-objectdatasource-types-page"> <div class="dxd-border-primary" data-bind="treeListSearchPanel: {controllers: _chooseObjectType.availableTypesTreelistModel.treeListController}"></div> <div data-bind="dxScrollView: { showScrollbar: \'onHover\', height: _chooseObjectType._scrollViewHeight}"> <div data-bind="treelist: _chooseObjectType.availableTypesTreelistModel"></div> \x3c!-- ko if: _chooseObjectType.types && !_chooseObjectType.types().length --\x3e <div class="dxa-no-data-message" data-bind="text: $root.dx._static.noDataText()"></div> \x3c!-- /ko--\x3e </div> </div>',"dxrd-page-objectsource":'<div class="dxrd-wizard-page dx-objectsource-page dx-frameless-style" style="position: absolute; top: 45px; left: 45px; right: 45px; bottom: 45px; margin:0"> \x3c!-- ko foreach: _sections--\x3e <div class="dx-border-inheritor dxd-border-accented"> <div class="dxrd-report-page-tile dxd-border-secondary" data-bind="style: position, css: { \'dxrd-disabled\': $data.disabled() }"> <div class="dxrd-report-page-tile-title" data-bind="text: $parent.showDescription($index(), description), attr: { title: $parent.showDescription($index(), description) }"></div> <div class="dxrd-report-page-tile-content dx-default-border-style dxd-border-secondary"> \x3c!-- ko if: !$data.disabled() --\x3e \x3c!-- ko template: { name: template, data: data } --\x3e \x3c!-- /ko --\x3e \x3c!-- /ko --\x3e \x3c!-- ko if: $data.disabled() --\x3e <div class="dxrd-wizard-page dxrd-wizard-disabled-content" data-bind="text: disabledText"></div> \x3c!-- /ko --\x3e </div> </div> </div> \x3c!-- /ko --\x3e </div>',"dx-objectdatasource-types-section":'<div class="dx-objectdatasource-types-section"> <div data-bind="treeListSearchPanel: {controllers: availableTypesTreelistModel.treeListController}"></div> <div data-bind="dxScrollView: { showScrollbar: \'onHover\', height: _scrollViewHeight}"> <div data-bind="treelist: availableTypesTreelistModel"></div> </div> </div>',"dx-objectdatasource-datamembers-section":'<div class="dx-objectdatasource-parameters-datamembers-section"> <div class="dxd-border-primary" data-bind="dxList: { dataSource: dataMembers, selectedItems: selectedDataMembers, selectionMode: \'single\', activeStateEnabled: false, focusStateEnabled: false, searchExpr: \'displayName\', searchEnabled: true, noDataText: $root.dx._static.noDataText(), searchEditorOptions: { placeholder: $root.dx._static.searchPlaceholder() } }"> <div data-options="dxTemplate : { name: \'item\' }"> <div data-bind="text: $data.displayName"></div> </div> </div> </div>',"dx-objectdatasource-parameters-grid":'\x3c!-- ko if: !!$data --\x3e <div class="dx-field dxd-back-primary"> <div class="dx-field-label" data-bind="text: $data.displayName, attr: { \'title\': $data.displayName}"></div> </div> <div class="dxrd-properties-wrapper"> \x3c!-- ko foreach: _grids --\x3e \x3c!-- ko template: { name: \'dx-propertieseditor\', data: $data }--\x3e \x3c!-- /ko --\x3e \x3c!-- /ko --\x3e </div> \x3c!-- /ko --\x3e',"dx-objectdatasource-expression-popup":'\x3c!-- ko if: $data.value() --\x3e <div data-bind="dxExpressionEditor: getOptions({ options: value, fieldListProvider: value().itemsProvider, displayNameProvider: $root.displayNameProvider && $root.displayNameProvider() })"></div> \x3c!-- /ko --\x3e',"dx-objectdatasource-parameters-section":"<div class=\"dx-objectdatasource-parameters-section\"> <div class=\"dx-fieldset\" data-bind=\"dxScrollView: { showScrollbar: 'onHover'}\"> \x3c!-- ko template: { name: 'dx-objectdatasource-parameters-grid', data: _ctorParametersObject }--\x3e \x3c!-- /ko --\x3e \x3c!-- ko template: { name: 'dx-objectdatasource-parameters-grid', data: _dataMemberParametersObject }--\x3e \x3c!-- /ko --\x3e </div> </div>","dx-objectdatasource-configureparameters-page":"<div class=\"dxrd-report-page-tile-content dx-default-border-style dxd-border-secondary\" data-bind=\"dxScrollView: { showScrollbar: 'onHover'}\"> \x3c!-- ko template: { name: 'dx-objectdatasource-parameters-section', data: _chooseObjectParameters } --\x3e \x3c!-- /ko --\x3e </div>","dxrd-page-configure-parameters":'<div class="dxrd-wizard-page"> <div class="dxrd-datasource-parameters" data-bind="dxCollectionEditor: parametersEditorOptions"></div> </div>',"dxrd-parameter-collection-item":'<div class="dx-accordion" data-bind="dxdAccordion: { collapsed: collapsed }"> <div class="dxrd-group-header dx-accordion-header dxd-text-primary dxd-border-primary" style="border-bottom: 0" data-bind="styleunit: { \'marginLeft\' : editor.padding }, css: { \'dxrd-group-header-collapsed\': collapsed() }"> <div class="dx-collapsing-image" data-bind="template: \'dxrd-svg-collapsed\', css: { \'dx-image-expanded\': !collapsed() }" style="display:inline-block;"></div> <span class="dxrd-group-header-text dxd-text-primary" data-bind="text: value().name"></span> </div> <div class="dx-accordion-content dxd-border-primary"> <div data-bind="dxPropertyGrid: { target: value, level: editor.level + 1 }"></div> </div> </div>',"dxrd-wizard-datasource-parameters":'<div class="dx-fieldset" style="height:100%"> <div class="dx-collectioneditor" style="height:100%"> <div class="dxrd-datasource-parameters-collection"> <div class="dxrd-datasource-parameters-container dxd-border-secondary" data-bind="dxScrollView: { showScrollbar: \'onHover\', useNative: false, scrollByThumb: true }"> \x3c!-- ko if: values().length === 0 --\x3e <div class="dx-collectioneditor-empty dxd-empty-area-placeholder-text-color dxd-text-info"> <span class="dxrd-datasource-parameters-empty-text" data-bind="text: getDisplayTextEmptyArray()"></span> </div> \x3c!-- /ko --\x3e \x3c!-- ko if: values().length !== 0 --\x3e <div class="dx-collectioneditor-items" data-bind="foreach: values"> <div class="dx-background-inheritor dxd-back-highlighted dxd-state-selected" data-bind="with: $parent.createCollectionItemWrapper($parents[1], $index, $element)"> <div class="dx-collectioneditor-item-container dx-fontsize-reestablished dxd-list-item-back-color" data-bind="dxclick: $parents[1].select, css: { \'dxd-state-selected dxd-back-secondary\' : $parents[1].selectedIndex() === $index() }"> <div class="dx-collection-item"></div> </div> </div> </div> \x3c!-- /ko --\x3e </div> </div> <div class="dxrd-collectioneditor-wizard-buttons" data-bind="visible: showButtons"> <div class="dxrd-collectioneditor-action" data-bind="dxButton: { onClick: add, text: getDisplayTextButton(\'add\') }, attr: { title: getDisplayTextButton(\'add\') }"></div> <div class="dxrd-collectioneditor-action" data-bind="dxButton: { onClick: remove, disabled: selectedIndex() === null, text: $parent.removeButtonTitle }, attr: { title: $parent.removeButtonTitle }"></div> </div> </div> </div>',"dxrd-page-connectionstring":'<div class="dxrd-wizard-page"> <div class="dx-wizard-connections dx-default-border-style dxd-border-secondary"> <div class="dxrd-wizard-list dxd-border-primary" data-bind="dxList: { dataSource: _connectionStrings, onSelectionChanged: function(e) { _selectedConnectionString(e.addedItems) }, selectedItems: _selectedConnectionString.peek(), focusStateEnabled: false, searchEnabled: true, searchExpr: \'description\', editEnabled: true, editConfig: { selectionEnabled: true }, selectionMode: \'single\', activeStateEnabled: false, noDataText: $root.dx._static.noDataText(), searchEditorOptions: { placeholder: $root.dx._static.searchPlaceholder() } }"> <div data-options="dxTemplate : { name: \'item\' }"> <div data-bind="text: $data[\'description\'] || $data[\'name\']"></div> </div> </div> </div> </div>',"dxrd-select-control":'<div class="dxrd-create-query-page-query-header"> <div class="dx-editquery-editor" data-bind="text: caption()"></div> <div class="dxd-hyperlink-color dxd-text-accented" data-bind="visible: !runQueryBuilderDisabled, text: $parent.runQueryBuilderBtnText, click: function() { $parent.runQueryBuilder() }"></div> </div> \x3c!-- ko if: !aceAvailable --\x3e <div class="dxrd-wizard-list dxrd-create-query-page-editor dx-default-border-style dxd-border-secondary dx-editquery-editor" data-bind="dxTextArea: { value: sqlString, valueChangeEvent: \'keyup input blur\', readOnly: disableCustomSql() }"></div> \x3c!-- /ko --\x3e \x3c!-- ko if: aceAvailable --\x3e <div class="dxrd-create-query-page-editor dxrd-create-query-page-editor-border dxd-border-secondary dx-editquery-editor"> <div class="dxrd-create-query-page-editor-content"> <div class="dx-sql_editor dxd-back-primary2" data-bind="dxAceEditor: { value: sqlString, additionalOptions: additionalOptions, options: aceOptions }, css: { \'dx-disabled-ace\': disableCustomSql() }"></div> </div> </div> \x3c!-- /ko --\x3e',"dxrd-procedures-control":'<div style="margin-top: 20px" class="dx-editquery-editor" data-bind="text: caption()"></div> <div class="dx-editquery-editor dx-default-border-style dxd-border-secondary"> <div class="dxrd-wizard-list dxrd-create-query-page-editor" data-bind="dxList: { dataSource: storedProcedures, searchEnabled: true, searchExpr: \'name\', onContentReady: scrollActiveItem, selectedItems: selectedProcedure, editEnabled: true, editConfig: { selectionEnabled: true }, selectionMode: \'single\', activeStateEnabled: false, noDataText: $root.dx._static.noDataText() }"> <div data-options="dxTemplate : { name: \'item\' }"> <div data-bind="text: $parent.generateStoredProcedureDisplayName($data)"></div> </div> </div> </div>',"dxrd-wizard-create-query-page":'<div class="dxrd-wizard-page dxrd-wizard-create-query-page"> <div class="dxrd-create-query-page-content"> <div data-bind="text: queryNameCaption()"></div> <div class="dx-editquery-editor" data-bind="dxTextBox: { value: queryName, placeholder: $data.placeholder() }"></div> <div class="dxrd-radio-nowrap-ellipsis" data-bind="dxRadioGroup: { value: selectedQueryType, layout: \'horizontal\', items: queryTypeItems }"> <div data-options="dxTemplate : { name: \'item\' }"> <div class="dxrd-radio-nowrap-ellipsis-text" data-bind="text: $parent.localizeQueryType($data), attr: { \'title\': $parent.localizeQueryType($data) }"></div> </div> </div> \x3c!-- ko template: { name: queryControl().template, data: queryControl() } --\x3e \x3c!-- /ko --\x3e </div> \x3c!-- ko template: { name: \'dxrd-querybuilder-popup\', data: popupQueryBuilder } --\x3e \x3c!-- /ko --\x3e </div>',"dxrd-querybuilder-popup":'<div data-bind="dxPopup: popupViewModel($element)"> \x3c!-- ko if: qbOptions --\x3e \x3c!-- ko if: isVisible --\x3e <div class="dxrd-querybuilder-popup-content"> <div style="height:100%;" data-bind="dxQueryBuilder: qbOptions"></div> </div> \x3c!-- /ko --\x3e <div class="dxrd-querybuilder-popup-buttons dxd-border-secondary"> <div data-bind="dxButton: { text: getDisplayText(\'previewResults\'), onClick: previewHandler, disabled: okButtonDisabled }" class="dxrd-querybuilder-popup-button-left"></div> <div data-bind="dxButton: { text: getDisplayText(\'cancel\'), onClick: cancelHandler }" class="dxrd-querybuilder-popup-button"></div> <div data-bind="dxButton: { text: getDisplayText(\'ok\'), type: \'default\', onClick: okHandler, disabled: okButtonDisabled }" class="dxrd-querybuilder-popup-button"></div> </div> <div class="dxrd-wizard-load-panel dxd-text-primary" data-bind="dxLoadPanel:{ animation: { show: { type: \'fade\', from: 0, to: 1, duration: 700 }, hide: { type: \'fade\', from: 1, to: 0, duration: 700 } }, deferRendering: false, message: getDisplayText(\'loading\'), visible: showLoadIndicator, shading: true, shadingColor: \'transparent\'}"> </div> \x3c!-- /ko --\x3e </div>',"dxrd-querybuilder":'<div class="dx-designer dx-querybuilder" data-bind="template: \'dxrd-designer\'"> </div>',"dx-wizard-menu-box-editorswitch":"<div class=\"dxrd-editormenu-box dxd-property-grid-menu-box-color dxd-back-highlighted\" data-bind=\"css: { 'dxd-state-active': $data.isExpression() }, dxButtonWithTemplate: { onClick: switchEditors, icon: 'dxrd-svg-wizard-expressions' }\"> </div>","dx-popover-list-items":'<div data-bind="dxPopover: { wrapperAttr: { class: $data.className }, width: $data.width || 200, position: position, visible: popoverVisible, target: target, container: popupContainer($element)}"> <div data-bind="attr: { class: $data.className + \'-list\'}, dxList: { dataSource: popoverListItems(), onItemClick: itemClickAction }"> <div data-bind="attr: { class: $data.className + \'-list-item\'}" data-options="dxTemplate : { name: \'item\' }"> <div class="dx-text-content" data-bind="text: name, attr: { title: name }"></div> </div> </div> </div>',"dx-wizard-headerNew":'<div class="dxrd-wizard-header-custom"> \x3c!-- ko with: _currentPage --\x3e <div class="dxrd-span-title" data-bind="text: $data.title || $parent.title"></div> <div class="dxrd-span-description" data-bind="text: description, attr: { title: description }"></div> \x3c!-- /ko --\x3e </div>',"dx-wizard-newlayout":'<div class="dxrd-wizard dx-editors dxd-text-primary" data-bind="dxPopup: { visible: isVisible, wrapperAttr: { class: \'dxrd-wizard dx-editors dxd-text-primary\' }, title: isVisible() ? title : \'\', showTitle: true, fullScreen: false, width: width, height: height, container: $element, visualContainer: _container($element), titleTemplate: _titleTemplate, position: _wizardPopupPosition($element) }, cssArray: [ $data._extendCssClass, { \'dx-rtl\': $root.rtl, \'dx-ltr\': !$root.rtl }]"> <div class="dxrd-wizard-content"> \x3c!-- ko with: _currentPage --\x3e <div style="height: 100%" data-bind="template: { name: template, data: page } "></div> \x3c!-- /ko --\x3e <div class="dxrd-wizard-load-panel dxd-text-primary" data-bind="dxLoadPanel: _loadPanelViewModel($element)"></div> </div> <div class="dxrd-wizard-navigation"> <div data-bind="dxButton: cancelButton" class="dxrd-wizard-btn left"></div> <div data-bind="dxButton: finishButton" class="dxrd-wizard-btn right"></div> <div data-bind="dxButton: nextButton" class="dxrd-wizard-btn right"></div> <div data-bind="dxButton: previousButton" class="dxrd-wizard-btn right"></div> </div> </div>'});class Ns extends x.DragDropHandler{constructor(e,t,a,i,r){super(e,t,a,i,r),this.querySurface=e,this.undoEngine=a,this._dragColumn=_.observable(null),this._dragConditionSurface=null,this.dragDropConnector=_.observable(null),this.cursor="arrow",this.containment=".dxrd-ghost-container",this.helper=void 0}_needToCreateRelation(){return!!(this.selection.dropTarget&&this.selection.dropTarget instanceof mo)&&this.selection.dropTarget.getControlModel().parentModel()!==this.getDragColumn().parentModel()}startDrag(e){if(this._scrollProcessor=new x.dxScrollProcessor(document.getElementsByClassName("dxqb-mainwin")[0]),e instanceof le){var t=e.getControlModel().parentModel();if(this._dragConditionSurface=Object(x.findSurface)(t),!this._dragConditionSurface)return;this._dragConditionSurface.isVisible(!1),this._dragColumn(t.startPoint()===e.getControlModel()?t.nestedColumn():t.parentColumn())}else{if(!(e instanceof mo))throw new Error("ColumnDragHandler can be applied to the Column only.");this._dragColumn(e.getControlModel())}t=new _e({},this.querySurface().getControlModel());this.dragDropConnector(new Ce(t,this.surface()))}setConnectorPoints(e){var t,a,i=this._dragColumn(),r=this.dragDropConnector().getControlModel();this._needToCreateRelation()?(a=te(i,this.selection.dropTarget.getControlModel()),r.startPoint().connectingPoint(a.start),r.endPoint().connectingPoint(a.end)):(a=this.querySurface().rtl()?this.querySurface().pageWidth()-i.leftConnectionPoint.location.x():i.leftConnectionPoint.location.x(),t=this.querySurface().rtl()?this.querySurface().pageWidth()-i.rightConnectionPoint.location.x():i.rightConnectionPoint.location.x(),a=Math.abs(a-e.left)>Math.abs(t-e.left)?i.rightConnectionPoint:i.leftConnectionPoint,r.startPoint().connectingPoint(a),this.dragDropConnector().endPoint().rect({top:e.top,left:e.left}))}drag(e,t){var a=this._scrollProcessor.getScrollOffset();t.position.left+=t.scroll.left+a.left,t.position.top+=t.scroll.top+a.top,t.delta.left=t.position.left-this.surface().underCursor().x-6,t.delta.top=t.position.top-this.surface().underCursor().y-6,this.setConnectorPoints(this._getAbsoluteSurfacePosition(t)),this._scrollProcessor.processOffset({x:e.clientX,y:e.clientY})}doStopDrag(){this._scrollProcessor.dispose(),this._scrollProcessor=null,this.dragHelperContent.reset(),this.dragDropConnector()&&this.dragDropConnector().dispose(),this.dragDropConnector(null);try{var e,t,a=null,i=(this._dragConditionSurface&&!this._dragConditionSurface.isVisible()&&(a=this._dragConditionSurface.getControlModel(),this._dragConditionSurface.isVisible(!0)),this.querySurface().getControlModel());this._needToCreateRelation()&&(e=this.selection.dropTarget.getControlModel(),this.undoEngine().start(),a&&a.parentModel().removeChild(a),t=i.cerateJoinCondition(this._dragColumn(),e),this.undoEngine().end(),null!==t)&&this.selection.initialize(Object(x.findSurface)(t))}finally{this._dragColumn(null)}}getDragColumn(){return this._dragColumn()}}class Os extends x.DragDropHandler{constructor(e,t,a,i,r){super(e,t,a,i,r),this._undoEngine=a,this._query=()=>this._querySurface().getControlModel(),this.getDropCallback=(i,r)=>(e,t)=>{var a=t.createChild(Object(x.extend)({"@ControlType":"Table","@Name":e.data.name},la.controlsMap.Table.defaultVal));return a.isInitialized()?t.tryToCreateRelationsByFK(a):a.isInitialized.subscribe(()=>{i().start(),t.tryToCreateRelationsByFK(a),i().end()}),r&&this.suggestLocation(a,t),a},this._querySurface=e,this.cursor="arrow",this.containment=".dxqb-designer",this.cursorAt={top:0,left:0},this.helper=e=>{super.helper(e),this.recalculateSize(h.Size.fromString("199, 123")),r.setContent(new h.Rectangle(0,0,this._size.width(),this._size.height()))}}suggestLocation(t,e){e=Math.max.apply(null,e.tables.peek().filter(e=>e!==t).map(e=>e.location.x.peek()+3*e.size.width.peek()/2).concat([30]));t.location.x(e),t.location.y(65)}startDrag(e){e&&e.name&&this._query().dbSchemaProvider.getDbTable(e.name)}doStopDrag(e,t){this.dragHelperContent.reset(),this.selection.dropTarget&&(e=this._getAbsoluteSurfacePosition(e),this._querySurface().underCursor().x=e.left-this._querySurface().absolutePosition.x(),this._querySurface().underCursor().y=e.top-this._querySurface().absolutePosition.y(),e=t,t=this.getDropCallback(this._undoEngine,!1)(e,this._query()),this.addControl(t,this._querySurface(),this._size))}addControl(e,t,a){t.getControlModel().addChild(e);e=Object(x.findSurface)(e);e&&(e.rect({left:t.underCursor().x,top:t.underCursor().y,width:a.width()}),this.selection.initialize(e))}}class ws extends h.SurfaceElementBase{constructor(e,t){super(e,t,null),this.conditions=_.observableArray(),this.template="dxqb-relation",Object(x.createObservableArrayMapCollection)(e.conditions,this.conditions,this._createSurface)}_getChildrenHolderName(){return"conditions"}}var Ds={Equal:"Equal",NotEqual:"NotEqual",Greater:"Greater",GreaterOrEqual:"GreaterOrEqual",Less:"Less",LessOrEqual:"LessOrEqual"},Is=[{propertyName:"left",displayName:"Left",editor:b.getEditor("text"),disabled:!0,localizationId:"AnalyticsCoreStringId.QueryBuilder_LeftOperand"},{propertyName:"right",displayName:"Right",editor:b.getEditor("text"),disabled:!0,localizationId:"AnalyticsCoreStringId.QueryBuilder_RightOperand"},{propertyName:"parentColumnName",modelName:"@Parent"},{propertyName:"nestedColumnName",modelName:"@Nested"},{propertyName:"joinType",displayName:"Join Type",editor:b.getEditor("combobox"),defaultVal:"Inner",valuesArray:[{value:"Inner",displayValue:"Inner join",localizationId:"DataAccessStringId.RelationEditorRelationTypeInnerJoin"},{value:"LeftOuter",displayValue:"Left outer join",localizationId:"DataAccessStringId.RelationEditorRelationTypeLeftOuterJoin"},{value:"RightOuter",displayValue:"Right outer join",localizationId:"DataAccessStringId.RelationEditorRelationTypeRightOuterJoin"},{value:"FullOuter",displayValue:"Full outer join",localizationId:"DataAccessStringId.RelationEditorRelationTypeFullOuterJoin"}],localizationId:"AnalyticsCoreStringId.QueryBuilder_JoinType"},{propertyName:"operator",modelName:"@Operator",displayName:"Operator",editor:b.getEditor("combobox"),defaultVal:Ds.Equal,valuesArray:[{value:"Equal",displayValue:"Equals to",localizationId:"DataAccessUIStringId.JoinEditorEqualOperator"},{value:"NotEqual",displayValue:"Does not equal to",localizationId:"DataAccessUIStringId.JoinEditorNotEqualOperator"},{value:"Greater",displayValue:"Is greater than",localizationId:"DataAccessUIStringId.JoinEditorGreaterOperator"},{value:"GreaterOrEqual",displayValue:"Is greater than or equal to",localizationId:"DataAccessUIStringId.JoinEditorGreaterOrEqualOperator"},{value:"Less",displayValue:"Is less than",localizationId:"DataAccessUIStringId.JoinEditorLessOperator"},{value:"LessOrEqual",displayValue:"Is less than or equal to",localizationId:"DataAccessUIStringId.JoinEditorLessOrEqualOperator"}],localizationId:"AnalyticsCoreStringId.QueryBuilder_Operator"},{propertyName:"itemType",modelName:"@itemType"}];class Es extends Ce{constructor(e,t){super(e,t),this._disposables.push(this.showArrow=_.pureComputed(()=>"LeftOuter"===e.joinType()||"FullOuter"===e.joinType())),this._disposables.push(this.showRightArrow=_.pureComputed(()=>"RightOuter"===e.joinType()||"FullOuter"===e.joinType()))}container(){return this.getRoot()}}function ks(){Te(),la.registerControl("Unknown",{info:Zt,type:h.ElementViewModel,nonToolboxItem:!0,surfaceType:h.SurfaceElementBase,isDeleteDeny:!0}),la.registerControl("Relation",{info:pa,defaultVal:{},surfaceType:ws,popularProperties:[],type:ha,elementActionsTypes:[],nonToolboxItem:!0}),la.registerControl("JoinCondition",{info:Is,defaultVal:{},surfaceType:Es,popularProperties:["_parentColumnName","_nestedColumnName","joinType"],type:ua,elementActionsTypes:[],nonToolboxItem:!0}),la.registerControl("Table",{info:lo,defaultVal:{},surfaceType:bo,popularProperties:["name","alias","columns"],type:z,elementActionsTypes:[],nonToolboxItem:!0}),la.registerControl("Column",{info:Wr,defaultVal:{},surfaceType:mo,popularProperties:["name","alias","selected"],type:no,elementActionsTypes:[],nonToolboxItem:!0,isDeleteDeny:!0}),la.registerControl("Query",{info:so,surfaceType:po,popularProperties:["name","filterString","groupFilterString"],type:uo,elementActionsTypes:[],isContainer:!0,nonToolboxItem:!0,isDeleteDeny:!0}),la.registerControl("FTable",{info:lo,defaultVal:{},surfaceType:Co,popularProperties:["name","alias","columns"],type:_o,elementActionsTypes:[],nonToolboxItem:!0}),la.registerControl("FQuery",{info:So,surfaceType:xo,popularProperties:["name"],type:vo,elementActionsTypes:[],isContainer:!0,nonToolboxItem:!0,isDeleteDeny:!0})}class As extends P.TreeListController{constructor(e,t,a){super(),this.undoEngine=e,this.query=t,this._dragDropHandler=a.getDropCallback(e,!0)}dblClickHandler(e){this.undoEngine().start(),this._dragDropHandler(e,this.query()),this.undoEngine().end()}}var $s={propertyName:"parameters",displayName:"parameters",editor:{custom:"dxqb-parameterspanel"}},zs={propertyName:"selectedItem",displayName:"selectedItem",editor:{custom:"dxqb-propertygrid"}},js={propertyName:"fields",displayName:"fields",editor:{custom:"dxqb-fieldspanel"}},Bs={propertyName:"query",displayName:"query",editor:{custom:"dxqb-propertygrid"}};class Rs extends C.TabInfo{constructor(e,t,a,i,r){super({text:"Properties",template:"dxqb-properties-wrapper",model:Rs._createQBPropertyGrid(e,t,a,r)}),this.active(!0),this._getGroupByName("Fields").collapsed(!1),this._disposables.push(i.subscribe(e=>{e instanceof uo||this._getGroupByName("SelectedItem").collapsed(!1)}))}static _getSelectedItemPropertyName(e){var t="Selection Properties",a="AnalyticsCoreStringId.QueryBuilder_SelectionProperties";switch(e&&e.controlType){case"Query":case"FQuery":t="Query Properties",a="AnalyticsCoreStringId.QueryBuilder_QueryProperties";break;case"Table":case"FTable":t="Table Properties",a="AnalyticsCoreStringId.QueryBuilder_TableProperties";break;case"Column":t="Column Properties",a="AnalyticsCoreStringId.QueryBuilder_ColumnProperties";break;case"JoinCondition":t="Relation Properties",a="AnalyticsCoreStringId.QueryBuilder_RelationProperties"}return Object(C.getLocalization)(t,a)}static _createWrappedObject(t,a,e,i){var r=new v.ObjectProperties(t,null,1),o=_.computed(()=>t()&&t().parameters),s=[Bs,zs,js],r={selectedItem:a,query:{editableObject:t,properties:r},fields:a,isPropertyVisible:e=>"selectedItem"!==e||a.editableObject()!==t()};return i&&(r.parameters={values:o,addHandler:()=>new Zr({"@Type":"System.String"}),collapsed:!1,undoEngine:e,isVisibleButton:(e,t)=>"add"===t||"delete"===t,template:"#dxqb-collectioneditor-template",textEmptyArray:{text:"Click the Add button to create a parameter.",localizationId:"AnalyticsCoreStringId.QueryBuilder_PageConfigureParametersEmpty"}},s.push($s)),r.getInfo=()=>s,r}static _createGroups(e,t){var a={Query:{info:[Bs],displayName:()=>Object(C.getLocalization)("Query Properties","AnalyticsCoreStringId.QueryBuilder_QueryProperties")},SelectedItem:{info:[zs],displayName:()=>this._getSelectedItemPropertyName(e())},Fields:{info:[js],displayName:()=>Object(C.getLocalization)("Available tables and views","AnalyticsCoreStringId.QueryBuilder_AvailableTables")}};return t&&(a.Parameters={info:[$s],displayName:()=>Object(C.getLocalization)("Parameters","AnalyticsCoreStringId.QueryBuilder_Parameters")}),a}static _createQBPropertyGrid(e,t,a,i){e=this._createWrappedObject(e,t,a,i);return new x.ControlProperties(_.observable(e),{groups:this._createGroups(t.editableObject,i),editors:e.getInfo()},void 0,!1)}_getGroupByName(t){return this.model.groups.filter(e=>e._displayName===t)[0]}}class Ms extends C.TabInfo{constructor(e){super({text:"Properties",template:"dxqb-properties-wrapper-editorlist",model:e}),this.model=e}}_.bindingHandlers.dxdTableView={init:function(e,t,a,i,r){var o,s,n=Object(v.getTemplate)("dxd-tableview"),d=T.fn.constructor(e).append(n),l=!!r.$root.rtl,c=_.unwrap(t());return _.applyBindings({onDataScroll:e=>{0<=e.scrollOffset.left&&(o=o||d.find(".dxd-tableview-titles"),s=s||d.find(".dxd-tableview-data table"),o.offset({left:s.offset().left,top:o.offset().top}))},onDataScrollInitialized:e=>{var t;s=null,l&&(t=e.component,setTimeout(()=>t.scrollTo({left:t.scrollWidth(),top:0}),1))},data:c,rtl:l,noDataText:x.noDataText,isImage:e=>"System.Byte[]"===c.schema[e].type,isImageTooLarge:e=>"!"===e[0],getImageTooLargeText:e=>"Image too large ("+e.substring(1)+" bytes)"},d.children()[0]),d.find(".dxd-tableview-titles .dxd-tableview-resizable").each((e,t)=>{var a,i=T.fn.constructor(t).find(".dxd-tableview-cell-text"),r=d.find(".dxd-tableview-data .dxd-tableview-resizable"+e),e=(e<c.schema.length-1&&(a=new x.Resizable(t,{handles:"e",start:(e,t)=>{},stop:()=>{},resize:(e,t)=>{var a=Object(x.convertFromCssPixelUnits)(t.dataset.originalLeftMousePosition),e=Object(x.convertFromCssPixelUnits)(t.dataset.originalWidth)+(e.x-a);t.style.width=Object(x.convertToCssPixelUnits)(e),i.outerWidth(e),r.outerWidth(e),r.parent().width(e)}}).initialize(),Object(x.addDisposeCallback)(t,()=>{a.dispose()})),Math.max(i.width(),r.width()));i.width(e),r.width(e)}),Object(x.addDisposeCallback)(d.children()[0],()=>{d=null}),{controlsDescendantBindings:!0}}};var k=e(12),qs=e.n(k),Ls={Surface:"dxrd-surface-template-base",Toolbar:"dxqb-toolbar",RightPanel:"dx-right-panel-lightweight",RightPanelSwitcher:"dx-right-panel-switcher",DataPreview:"dxqb-popup#data",SqlPreview:"dxqb-popup#sql"};function Qs(i,r,o,e){return()=>{var e=i(),t=e.find(".dxrd-right-panel:visible").outerWidth()||0,a=e.width()-(t+5);e.find(".dxrd-surface-wrapper").css(o().rtl()?{left:t,right:0,width:a}:{left:0,right:t,width:a}),r(a),o().pageWidth(a)}}function Vs(e,t){var a=_.observable(!1);return e()._disposables.push(t.subscribe(()=>{a(!1)})),_.pureComputed(function(){return t.peek().getDbSchema().done(()=>{a(!0)}),!a()||e().tables.peek().some(function(e){return!e.isInitialized()})})}function Ws(e,t,a){var i=e.subscribe(e=>{t(new po(e)),t().rtl(!!a.rtl)}),r=new x.SurfaceSelection(["alias","name","sortOrder"]),o=Object(x.createDesigner)(e,t,la,void 0,void 0,void 0,!!a.rtl,r);return o.addDisposables(i),o.findControl=(e,a)=>{T.fn.constructor(".dxqb-main").children(".dxrd-control").each((e,t)=>{t=T.fn.constructor(t);t.offset().top<=a.clientY&&t.offset().left<=a.clientX&&o.selection.focused(_.dataFor(t[0]))})},o.addDisposables({dispose:()=>o.findControl=null}),o}function Fs(e,t,a,i){var r=Qs(()=>T.fn.constructor(e).find(".dxqb-designer"),t.surfaceSize,a),o=(t.addDisposables(a.subscribe(()=>{r()})),()=>{setTimeout(()=>r())});window.addEventListener("resize",o),Object(x.addDisposeCallback)(e,function(){window.removeEventListener("resize",o),t.disposableContainer.dispose()}),t.addDisposables(t.tabPanel.width.subscribe(()=>{r()})),t.updateSurfaceSize=()=>{r()},t.updateSurface=()=>{r(),i&&i()}}function Us(e,t,a,i=!0){var r,o,s,n=a&&a.onServerError&&Object(x.processErrorEvent)(a.onServerError),d=t.requestWrapper||new qe,l=t.parametersMode||Gr.ReadWrite,c=(Re(t.handlerUri),t.queryModelJson&&(p=new Rt(JSON.parse(t.dataSourceJson)),t.dbSchemaProvider=Object(x._wrapModelInObservable)(t.dbSchemaProvider),t.dbSchemaProvider(new Le(p.connection)),t.querySource=Object(x._wrapModelInObservable)(t.querySource),t.querySource(JSON.parse(t.queryModelJson))),t.dbSchemaProvider().connection),u=_.observable(),p=_.observable(),h=_.observable(),m=e=>{u(new uo(e,t.dbSchemaProvider(),l,e=>{a.saveQueryRequested({queryLayout:encodeURIComponent(JSON.stringify(e)),connection:encodeURIComponent(Me(c))})}))},g=(m(t.querySource()),Ws(u,p,t)),n=(n&&g.addDisposables(n),g.rootStyle="dxqb-designer dxd-back-primary-invariant",x.getParentContainer),b=(g.dataPreview={isLoading:_.observable(!1),isVisible:_.observable(!1),title:()=>Object(C.getLocalization)("Data Preview (First 100 Rows Displayed)","AnalyticsCoreStringId.DataPreview_Title"),template:"dxqb-data-preview",data:{value:_.observable()},okButtonText:()=>Object(C.getLocalization)("OK","DataAccessUIStringId.Button_OK"),okButtonHandler:e=>{e.model.isVisible(!1)},container:n},g.selectStatmentPreview={isLoading:_.observable(!1),isVisible:_.observable(!1),template:"dxqb-selectstatment-preview",title:()=>Object(C.getLocalization)("Select Statement Preview","AnalyticsCoreStringId.QueryBuilder_SelectStatementPreview_Title"),data:{value:_.observable(),aceOptions:cr(!0),aceAvailable:Object(P.aceAvailable)(),additionalOptions:ur(e=>{g.selectStatmentPreview.data.value(e)}),languageHelper:pr()},okButtonText:()=>Object(C.getLocalization)("OK","DataAccessUIStringId.Button_OK"),okButtonHandler:e=>{e.model.isVisible(!1)},container:n},g.parts=[{id:Ls.Surface,templateName:Ls.Surface,model:g},{id:Ls.Toolbar,templateName:Ls.Toolbar,model:g},{id:Ls.RightPanel,templateName:Ls.RightPanel,model:g},{id:Ls.DataPreview,templateName:Ls.DataPreview.split("#")[0],model:g.dataPreview},{id:Ls.SqlPreview,templateName:Ls.SqlPreview.split("#")[0],model:g.selectStatmentPreview}],g.columnDragHandler=new Ns(p,g.selection,g.undoEngine,g.snapHelper,g.dragHelperContent),g.fieldDragHandler=new Os(p,g.selection,g.undoEngine,g.snapHelper,g.dragHelperContent),g.connectionPointDragHandler=g.columnDragHandler,g.resizeHandler.handles="e,w",g.columnsLoadingMsg=()=>Object(C.getLocalization)("Loading...","DataAccessWebStringId.QueryBuilder_ColumnsLoading"),e=>{m(e),h({itemsProvider:t.dbSchemaProvider(),treeListController:new As(g.undoEngine,u,g.fieldDragHandler),selectedPath:_.observable(),pageSize:100,templateName:"dxqb-treelist-item-with-search"})}),f=(g.addDisposables(t.querySource.subscribe(e=>{b(e)})),b(t.querySource()),_.observable(Object(x.calculateWithZoomFactor)(355))),n={editableObject:g.editableObject,properties:new v.ObjectProperties(g.editableObject,null,1),fieldListModel:{treeListOptions:h},tablesTop:f,searchPlaceholder:()=>Object(x.searchPlaceholder)()},n=new Rs(u,n,g.undoEngine,g.selection.focused,l===Gr.ReadWrite),y=g.tabPanel,S=(y.tabs.length=0,y.tabs.push(n),y.width(Object(x.calculateWithZoomFactor)(375)),g.fieldDragHandler=new Os(p,g.selection,g.undoEngine,g.snapHelper,g.dragHelperContent),g.fieldListProvider=new Yr(u,Yr.whereClauseObjectsFilter),g.dataBindingsProvider=g.fieldListProvider,g.parametersBindingsProvider=t.parametersItemsProvider||g.dataBindingsProvider,g.dataBindingsGroupProvider=new Yr(u,Yr.groupByObjectsFilter),g.isLoading=Vs(g.model,t.dbSchemaProvider),g.actionLists=new x.ActionLists(p,g.selection,g.undoEngine,(r=g,o=a&&a.customizeActions,s=r.model,e=>{var t=Object(x.findFirstItemMatchesCondition)(e,e=>"Delete"===e.text),a=(t.imageClassName="dx-icon-dxrd-image-recycle-bin",t.imageTemplateName="dxrd-svg-operations-recycle_bin_xl",Object(x.findFirstItemMatchesCondition)(e,e=>"Undo"===e.text)),i=(a.disabled=_.pureComputed(()=>r.isLoading()||!r.undoEngine().undoEnabled()),Object(x.findFirstItemMatchesCondition)(e,e=>"Redo"===e.text));e.splice(0,e.length,t,a,i),e.push({id:Be.Save,text:"Save",displayText:()=>Object(C.getLocalization)("Save","AnalyticsCoreStringId.MenuButtons_Save"),imageClassName:"dxqb-image-save",imageTemplateName:"dxrd-svg-menu-save",disabled:r.isLoading,visible:!0,hotKey:{ctrlKey:!0,keyCode:"S".charCodeAt(0)},clickAction:()=>{s().save()},hasSeparator:!0}),e.push({id:Be.DataPreview,text:"Preview Results",displayText:()=>Object(C.getLocalization)("Preview Results","DataAccessUIStringId.QueryBuilderButtons_PreviewResults"),imageClassName:"dxrd-image-data-preview",imageTemplateName:"dxrd-svg-queryBuilder-data_preview",disabled:r.isLoading,visible:!0,hotKey:{ctrlKey:!0,keyCode:"P".charCodeAt(0)},clickAction:()=>{s().canSave()&&r.showPreview()},hasSeparator:!0}),e.push({id:Be.SelectStatementPreview,text:"Preview Select Statement",displayText:()=>Object(C.getLocalization)("Preview Select Statement","AnalyticsCoreStringId.QueryBuilder_PreviewSelectStatement_Tooltip"),imageClassName:"dxrd-image-selectstatement-preview",imageTemplateName:"dxrd-svg-queryBuilder-select_statment",disabled:r.isLoading,visible:!0,hotKey:{ctrlKey:!0,keyCode:"E".charCodeAt(0)},clickAction:()=>{s().canSave()&&r.showStatement()},hasSeparator:!0}),o&&o(e)})),g.isLoading()||g.undoEngine&&g.undoEngine().clearHistory(),g.addDisposables(g.isLoading.subscribe(e=>{g.undoEngine&&g.undoEngine().clearHistory()})),g.selection.focused(p()),p.subscribe(e=>{g.selection.focused(e)}));return g.addDisposables({dispose:()=>S.dispose()}),g.addDisposables(g.editableObject.subscribe(e=>{f.notifySubscribers(null)})),Object(x.appendStaticContextToRootViewModel)(g),i&&(a&&a.beforeRender&&a.beforeRender(g),T.fn.constructor(e).empty(),_.cleanNode(e),_.applyBindings(g,e)),Fs(e,g,p,()=>f(355)),i&&g.updateSurface(),g.showPreview=()=>{g.dataPreview.isLoading(!0),g.dataPreview.isVisible(!0),d.getDataPreview(c,JSON.stringify(u().serialize(!0))).done(e=>{g.dataPreview.data.value(JSON.parse(e.dataPreviewJSON)),g.dataPreview.isLoading(!1)}).fail(e=>{g.dataPreview.isVisible(!1),Object(x.ShowMessage)(Object(x.getErrorMessage)(e))})},g.showStatement=()=>{g.selectStatmentPreview.isLoading(!0),g.selectStatmentPreview.isVisible(!0),d.getSelectStatement(c,JSON.stringify(u().serialize(!0))).done(e=>{e.errorMessage&&Object(x.ShowMessage)(e.errorMessage),g.selectStatmentPreview.data.value(e.sqlSelectStatement),g.selectStatmentPreview.isLoading(!1)}).fail(e=>{g.selectStatmentPreview.isVisible(!1),Object(x.ShowMessage)(Object(x.getErrorMessage)(e))})},g}function Hs(e,t,a,i=!0){t.localization&&Object(C.addCultureInfo)({messages:t.localization}),qs()({rtlEnabled:!!t.rtl}),ks();var r=[];return a&&a.customizeLocalization&&a.customizeLocalization(r),Object(x.resolveFromPromises)(r,()=>Us(e,t,a,i))}function Js(e,t,a){var i=_.observable(),r=_.observable(),o=(ks(),Ws(i,r,t)),s=new Ms(new v.ObjectProperties(o.editableObject,null,1)),n=o.tabPanel,d=new Ps(n.collapsed,o.editableObject,t.showPropertyGridCondition,Rs._getSelectedItemPropertyName);return o.addDisposables(s,n,d),n.tabs.length=0,n.tabs.push(s),n.width(Object(x.calculateWithZoomFactor)(325)),o.parts=[{id:Ls.Surface,templateName:Ls.Surface,model:o},{id:Ls.RightPanel,templateName:Ls.RightPanel,model:o},{id:Ls.RightPanelSwitcher,templateName:Ls.RightPanelSwitcher,model:d}],o.columnDragHandler=new Ns(r,o.selection,o.undoEngine,o.snapHelper,o.dragHelperContent),o.connectionPointDragHandler=o.columnDragHandler,o.selection.focused(r()),o.addDisposables(r.subscribe(e=>{o.selection.focused(e)})),o.rootStyle="dxqb-designer dxd-back-primary-invariant",o.resizeHandler.handles="e,w",o.columnsLoadingMsg=()=>Object(C.getLocalization)("Loading...","DataAccessWebStringId.QueryBuilder_ColumnsLoading"),Object(x.appendStaticContextToRootViewModel)(o),i(a(t)),T.fn.constructor(e).empty(),_.cleanNode(e),_.applyBindings(o,e),Fs(e,o,r),o.isLoading(!1),o.updateSurface(),Object(x.addDisposeCallback)(e,function(){i()&&i().dispose(),r()&&r().dispose(),a=null,o.disposableContainer.dispose(),o.dispose()}),o}class Gs{constructor(e){this._queryBuilderModel=e}get queryBuilderModel(){return this._queryBuilderModel()}set queryBuilderModel(e){this._queryBuilderModel(e)}UpdateLocalization(e){Object(C.updateLocalization)(e)}GetQueryBuilderModel(){return this.queryBuilderModel}GetJsonQueryModel(){return{Query:this.queryBuilderModel.model().serialize()}}GetSaveQueryModel(){return{queryLayout:JSON.stringify(this.GetJsonQueryModel()),connection:this.SerializeDataConnection()}}SerializeDataConnection(){return Me(this.queryBuilderModel.model().dbSchemaProvider.connection)}AdjustControlCore(){this.queryBuilderModel&&this.queryBuilderModel.updateSurfaceSize()}Save(){this.queryBuilderModel&&this.queryBuilderModel.model().onSave()}ShowPreview(){this.queryBuilderModel&&this.queryBuilderModel.showPreview()}IsQueryValid(){return this.queryBuilderModel&&this.queryBuilderModel.model().isValid()}OnCallback(e){e.queryValidationError&&Object(x.NotifyAboutWarning)(e.queryValidationError,!0)}}var Xs=e(13),Ys=e(14);class Ks{static generateQueryBuilderEvents(a){var t={publicName:"BeforeRender",privateName:"beforeRender"},i={publicName:"SaveQueryRequested",privateName:"saveQueryRequested"},r={publicName:"CustomizeMenuActions",privateName:"customizeActions"},e={publicName:"CustomizeLocalization",privateName:"customizeLocalization"},o={publicName:"OnServerError",privateName:"onServerError"};return r.callback=function(e){a(r.publicName,{Actions:e,GetById:t=>t?e.filter(function(e){return t===e.id})[0]:null})},e.callback=function(t){a(e.publicName,{LoadMessages:e=>{e&&("function"==typeof e.then?t.push(e):Object(Ys.loadMessages)(e))},WidgetLocalization:Xs})},o.callback=function(e){a(o.publicName,{Error:e})},t.callback=function(e){a(t.publicName,e)},i.callback=function(e){a(i.publicName,e)},[t,i,r,e,o]}}class Zs extends x.JSDesignerBindingCommon{constructor(e,t){super(_.unwrap(e),t),this.options=e,this._deferreds=[],this._templateHtml=Object(v.getTemplate)("dxrd-querybuilder"),e.queryBuilderModel=Object(x._wrapModelInObservable)(e.queryBuilderModel),this.sender=new Gs(e.queryBuilderModel),e.callbacks&&e.callbacks._eventSenderCreated&&e.callbacks._eventSenderCreated(this.sender)}_applyBindings(e,t){this._disposables.push(e),t.children().remove();var a,t=t.append(this._templateHtml).children()[0];t&&(_.cleanNode(t),this._callbacks&&this._callbacks.beforeRender&&this._callbacks.beforeRender(e),_.applyBindings(e,t),a=setTimeout(()=>{e&&e.updateSurfaceSize()},1),this._disposables.push({dispose:()=>clearTimeout(a)}))}_initializeCallbacks(){var e;if(this._options.callbacks)return e=Ks.generateQueryBuilderEvents((e,t)=>{this._fireEvent(e,t)}),this._checkCallbackName(e),this._generateCallbackDictionary(e)}_createModel(e){return this._callbacks=this._initializeCallbacks(),Hs(e,this._options,this._callbacks,!1)}dispose(){(this._deferreds||[]).forEach(e=>{e.reject()}),super.dispose()}applyBindings(t){var a=T.fn.constructor(t),e=this._options.requestOptions,i=()=>{e&&e.invokeAction&&(this._options.handlerUri=this._getServerActionUrl(e.host,e.invokeAction)),this._deferreds.push(this._createModel(t).done(e=>{this.options.queryBuilderModel(e),this.sender.queryBuilderModel=e,this._createDisposeFunction(t),this._applyBindings(this.sender.queryBuilderModel,a)}))};e?this._getLocalizationRequest().done(e=>{e&&Object(C.addCultureInfo)(e)}).always(()=>{i()}):i()}}const en="dxQueryBuilder";class tn extends x.DxAnalyticsComponentCommon{getBindingName(){return en}}Object(P.registerBaseBinding)(en,"$data"),_.bindingHandlers[en]={init:function(e,t){t=_.unwrap(t());return new Zs(t||{}).applyBindings(e),{controlsDescendantBindings:!0}}},_.bindingHandlers.dxQueryBuilderSurface={init:function(e,t){var t=_.unwrap(t()),a=t.options,i=Object(v.getTemplate)("dxrd-querybuilder"),e=Js(T.fn.constructor(e).append(i).children()[0],a,t.creator);return a.queryBuilderModel(e),{controlsDescendantBindings:!0}}};k=window.DevExpress||{};(e=k).Analytics=e.Analytics||{},e.QueryBuilder=F,e.Analytics.Diagram=t,e.Analytics.Data=a,e.Analytics.Data.Internal=R,e.Analytics.Data.Utils=M,e.Analytics.Data.Metadata=q,e.Analytics.Wizard=i,e.Analytics.Wizard.Internal=r,e.QueryBuilder.Widgets=L,e.QueryBuilder.Widgets.Internal=o,e.QueryBuilder.Metadata=Q,e.QueryBuilder.Utils=V,e.QueryBuilder.Internal=s,e.QueryBuilder.Elements=n,e.QueryBuilder.Elements.Metadata=W,B.default={QueryBuilder:k.QueryBuilder,Analytics:k.Analytics}}]);
|
|
8
|
+
!function(a){var i={};function r(e){var t;return(i[e]||(t=i[e]={i:e,l:!1,exports:{}},a[e].call(t.exports,t,t.exports,r),t.l=!0,t)).exports}r.m=a,r.c=i,r.d=function(e,t,a){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:a})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var a=Object.create(null);if(r.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)r.d(a,i,function(e){return t[e]}.bind(null,i));return a},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=14)}([function(e,t){e.exports=ko},function(e,t){e.exports=DevExpress.Analytics.Internal},function(e,t){e.exports=DevExpress.Analytics.Utils},function(e,t){e.exports=DevExpress.Analytics.Widgets.Internal},function(e,t){e.exports=jQuery},function(e,t){e.exports=DevExpress.Analytics.Elements},function(e,t){e.exports=DevExpress.Analytics.Widgets},function(e,t){e.exports=DevExpress.Analytics.Criteria},function(e,t){e.exports=DevExpress.Analytics.Criteria.Utils},function(e,t){e.exports=window.ace},function(e,t){e.exports=DevExpress.Analytics.Widgets.Filtering},function(e,t){e.exports=DevExpress.config},function(e,t){e.exports=DevExpress.localization},function(e,t){e.exports=DevExpress.Analytics.Localization},function(z,B,e){"use strict";e.r(B);var p,t={},a=(e.r(t),e.d(t,"name",function(){return U}),e.d(t,"text",function(){return H}),e.d(t,"size",function(){return J}),e.d(t,"location",function(){return G}),e.d(t,"sizeLocation",function(){return X}),e.d(t,"unknownSerializationsInfo",function(){return Y}),e.d(t,"ConnectingPointDragHandler",function(){return de}),e.d(t,"ConnectionPointDragHandler",function(){return ce}),e.d(t,"DiagramElementBaseViewModel",function(){return ie}),e.d(t,"diagramElementSerializationInfo",function(){return re}),e.d(t,"DiagramElementViewModel",function(){return ne}),e.d(t,"DiagramElementBaseSurface",function(){return K}),e.d(t,"DiagramElementSurface",function(){return ue}),e.d(t,"DiagramViewModel",function(){return pe}),e.d(t,"margins",function(){return he}),e.d(t,"pageWidth",function(){return me}),e.d(t,"pageHeight",function(){return ge}),e.d(t,"diagramSerializationsInfo",function(){return be}),e.d(t,"DiagramSurface",function(){return fe}),e.d(t,"ConnectionPointViewModel",function(){return ye}),e.d(t,"connectionPointSerializationInfo",function(){return Se}),e.d(t,"ConnectionPointSurface",function(){return le}),e.d(t,"ConnectorViewModel",function(){return xe}),e.d(t,"ConnectorSurface",function(){return ve}),e.d(t,"RoutedConnectorViewModel",function(){return _e}),e.d(t,"RoutedConnectorSurface",function(){return Ce}),e.d(t,"ConnectingPointViewModel",function(){return oe}),e.d(t,"connectingPointSerializationInfo",function(){return se}),e.d(t,"ConnectingPointSurface",function(){return Z}),e.d(t,"diagramControlsFactory",function(){return ae}),e.d(t,"registerControls",function(){return Te}),e.d(t,"groups",function(){return Ne}),e.d(t,"createDiagramDesigner",function(){return Oe}),e.d(t,"PointSide",function(){return p}),e.d(t,"GRID_SIZE",function(){return ee}),e.d(t,"determineConnectingPoints",function(){return te}),{}),R=(e.r(a),e.d(a,"DBSchemaProvider",function(){return Le}),e.d(a,"DBStoredProcedure",function(){return ke}),e.d(a,"DBStoredProcedureArgumentDirection",function(){return Pe}),e.d(a,"DBStoredProcedureArgument",function(){return Ae}),e.d(a,"DBTable",function(){return Ee}),e.d(a,"ResultSet",function(){return Ue}),e.d(a,"ResultTable",function(){return Ve}),e.d(a,"JsonNodeType",function(){return We}),e.d(a,"JsonNode",function(){return He}),e.d(a,"JsonSchemaNode",function(){return Je}),e.d(a,"JsonSchemaRootNode",function(){return Ge}),e.d(a,"JsonAuthenticationInfo",function(){return Ke}),e.d(a,"JsonParameterType",function(){return l}),e.d(a,"JsonParameter",function(){return Ze}),e.d(a,"JsonSource",function(){return tt}),e.d(a,"JsonDataSource",function(){return dt}),e.d(a,"JsonSchemaProvider",function(){return nt}),e.d(a,"ConnectionOptions",function(){return ut}),e.d(a,"CustomSqlQuery",function(){return wt}),e.d(a,"MasterDetailRelation",function(){return It}),e.d(a,"SqlDataConnection",function(){return Et}),e.d(a,"SqlDataSource",function(){return Rt}),e.d(a,"StoredProcQuery",function(){return zt}),e.d(a,"TableQuery",function(){return $t}),e.d(a,"DataSourceParameter",function(){return g}),e.d(a,"DBColumnType",function(){return d}),e.d(a,"DBColumn",function(){return we}),e.d(a,"DBForeignKey",function(){return De}),e.d(a,"DBSchema",function(){return $e}),e.d(a,"ObjectDataSource",function(){return Mt}),e.d(a,"ObjectDataMemberBase",function(){return qt}),e.d(a,"ObjectParameter",function(){return Lt}),e.d(a,"ObjectDataSourceMethodBase",function(){return Qt}),e.d(a,"ObjectDataMember",function(){return Vt}),e.d(a,"ObjectCtor",function(){return Wt}),e.d(a,"ObjectType",function(){return Ft}),e.d(a,"sourceQuerySerializationsInfo",function(){return ea}),e.d(a,"SourceQuery",function(){return ta}),e.d(a,"selectQuerySerializationsInfo",function(){return ba}),e.d(a,"SelectQuery",function(){return fa}),e.d(a,"subNodeSerializationInfo",function(){return ma}),e.d(a,"SubNode",function(){return ga}),e.d(a,"transformQuerySerializationsInfo",function(){return ya}),e.d(a,"transformationRuleSerializationsInfo",function(){return Sa}),e.d(a,"TransformQuery",function(){return xa}),e.d(a,"FederationTransformationRule",function(){return va}),e.d(a,"FederationDataSource",function(){return Ea}),e.d(a,"FederationSource",function(){return sa}),e.d(a,"FederationMasterDetailRelation",function(){return wa}),e.d(a,"SerializableDataFederationDataSource",function(){return Da}),e.d(a,"FederatedQueriesContainer",function(){return _a}),e.d(a,"expressionSerializationInfo",function(){return aa}),e.d(a,"FederatedQueryExpressionType",function(){return f}),e.d(a,"FederatedQueryExpression",function(){return ia}),e.d(a,"unionQuerySerializationsInfo",function(){return Ta}),e.d(a,"UnionTypes",function(){return Ca}),e.d(a,"UnionQuery",function(){return Pa}),{}),M=(e.r(R),e.d(R,"getDBSchemaCallback",function(){return je}),e.d(R,"getDBStoredProceduresCallback",function(){return ze}),e.d(R,"DBSchemaFederationDataSourceProvider",function(){return Ia}),e.d(R,"generateQueryUniqueName",function(){return ka}),e.d(R,"getJsonSchemaCallback",function(){return rt}),e.d(R,"_setGetJsonSchemaCallback",function(){return ot}),e.d(R,"_resetGetJsonSchemaCallback",function(){return st}),e.d(R,"deserializeToCollection",function(){return Ie}),{}),q=(e.r(M),e.d(M,"SqlQueryType",function(){return u}),e.d(M,"JsonSourceType",function(){return pt}),e.d(M,"FederationQueryType",function(){return c}),{}),i=(e.r(q),e.d(q,"customQuerySerializationsInfo",function(){return Ot}),e.d(q,"masterDetailRelationSerializationsInfo",function(){return Dt}),e.d(q,"storedProcQuerySerializationsInfo",function(){return jt}),e.d(q,"tableQuerySerializationsInfo",function(){return At}),e.d(q,"federationDataSourceSerializationInfo",function(){return ra}),e.d(q,"sourceSerializationInfo",function(){return oa}),e.d(q,"validateName",function(){return ht}),e.d(q,"dsParameterNameValidationRules",function(){return mt}),e.d(q,"parameterValueSerializationsInfo",function(){return gt}),e.d(q,"dsParameterSerializationInfo",function(){return xt}),e.d(q,"storedProcParameterSerializationsInfo",function(){return _t}),{}),r=(e.r(i),e.d(i,"DataSourceWizardPageId",function(){return S}),e.d(i,"SqlDataSourceWizardPageId",function(){return N}),e.d(i,"FederationDataSourceWizardPageId",function(){return Aa}),e.d(i,"JsonDataSourceWizardPageId",function(){return O}),e.d(i,"ObjectDataSourceWizardPageId",function(){return $a}),e.d(i,"FullscreenDataSourceWizardPageId",function(){return w}),e.d(i,"FullscreenDataSourceWizardSectionId",function(){return D}),e.d(i,"_restoreSqlDataSourceFromState",function(){return Qa}),e.d(i,"_setRestoreSqlDataSourceFromState",function(){return Va}),e.d(i,"_resetRestoreSqlDataSourceFromState",function(){return Wa}),e.d(i,"_restoreFederationDataSourceFromState",function(){return Fa}),e.d(i,"_restoreJsonDataSourceFromState",function(){return Ha}),e.d(i,"_setRestoreJsonDataSourceFromState",function(){return Ja}),e.d(i,"_resetRestoreJsonDataSourceFromState",function(){return Ga}),e.d(i,"_restoreObjectDataSourceFromState",function(){return Xa}),e.d(i,"_createDefaultDataSourceWizardState",function(){return Ya}),e.d(i,"WizardPageBase",function(){return I}),e.d(i,"_WrappedWizardPage",function(){return Ka}),e.d(i,"DataSourceType",function(){return y}),e.d(i,"TypeItem",function(){return Ba}),e.d(i,"ChooseDataSourceTypePage",function(){return Ra}),e.d(i,"_registerChooseDataSourceTypePage",function(){return Ma}),e.d(i,"ChooseSqlConnectionPage",function(){return Za}),e.d(i,"_registerChooseSqlConnectionPage",function(){return ei}),e.d(i,"ConfigureObjectDataSourceParametersPage",function(){return ni}),e.d(i,"_registerConfigureObjectDataSourceParametersPage",function(){return di}),e.d(i,"ChooseObjectDataSourceTypesPage",function(){return mi}),e.d(i,"_registerChooseObjectDataSourceTypesPage",function(){return gi}),e.d(i,"ChooseObjectDataSourceDataMembersPage",function(){return fi}),e.d(i,"_registerChooseObjectDataSourceDataMembersPage",function(){return yi}),e.d(i,"ChooseAvailableItemPage",function(){return wi}),e.d(i,"ChooseAvailableDataSourcePage",function(){return Di}),e.d(i,"_registerChooseAvailableDataSourcePage",function(){return Ii}),e.d(i,"ChooseJsonConnectionPage",function(){return Ei}),e.d(i,"_registerChooseJsonConnectionPage",function(){return ki}),e.d(i,"SpecifyJsonConnectionPage",function(){return Li}),e.d(i,"_registerSpecifyJsonConnectionPage",function(){return Qi}),e.d(i,"ChooseJsonSourcePage",function(){return Mi}),e.d(i,"_registerChooseJsonSourcePage",function(){return qi}),e.d(i,"ChooseJsonSchemaPage",function(){return tr}),e.d(i,"_registerChooseJsonSchemaPage",function(){return ar}),e.d(i,"_SqlDataSourceWrapper",function(){return qa}),e.d(i,"ConfigureQueryPage",function(){return gr}),e.d(i,"_registerConfigureQueryPage",function(){return br}),e.d(i,"ConfigureQueryParametersPage",function(){return fr}),e.d(i,"_registerConfigureParametersPage",function(){return yr}),e.d(i,"MultiQueryConfigurePage",function(){return Pr}),e.d(i,"_registerMultiQueryConfigurePage",function(){return Nr}),e.d(i,"_canEditQueryParameters",function(){return kr}),e.d(i,"MultiQueryConfigureParametersPage",function(){return Ar}),e.d(i,"_registerMultiQueryConfigureParametersPage",function(){return $r}),e.d(i,"MasterDetailRelationshipsPageBase",function(){return qr}),e.d(i,"ConfigureMasterDetailRelationshipsPage",function(){return Lr}),e.d(i,"_registerConfigureMasterDetailRelationshipsPage",function(){return Qr}),e.d(i,"FederatedQueryConfigurePage",function(){return Bo}),e.d(i,"_registerFederatedQueryConfigurePage",function(){return Ro}),e.d(i,"FederatedMasterDetailRelationshipsPage",function(){return Mo}),e.d(i,"_registerFederatedMasterDetailRelationshipsPage",function(){return qo}),e.d(i,"PageFactory",function(){return Lo}),e.d(i,"StateManager",function(){return xr}),e.d(i,"PageIterator",function(){return vr}),e.d(i,"__loadingStateFunctionName",function(){return ja}),e.d(i,"__nextActionFunctionName",function(){return za}),e.d(i,"BaseWizard",function(){return _r}),e.d(i,"PopupWizard",function(){return Cr}),e.d(i,"_DataSourceWizardOptionsBase",function(){return Qo}),e.d(i,"_DataSourceWizardOptions",function(){return Vo}),e.d(i,"DataSourceWizardSettings",function(){return Wo}),e.d(i,"DataSourceWizardPageIterator",function(){return Fo}),e.d(i,"DataSourceWizard",function(){return Uo}),e.d(i,"_registerDataSourceWizardPages",function(){return Ho}),e.d(i,"_createDataSourceWizard",function(){return Jo}),e.d(i,"_MultiQueryDataSourceWizardOptions",function(){return Yo}),e.d(i,"MultiQueryDataSourceWizard",function(){return Ko}),e.d(i,"MultiQueryDataSourceWizardPageIterator",function(){return Zo}),e.d(i,"_registerMultiQueryDataSourcePages",function(){return es}),e.d(i,"_createMultiQueryDataSourceWizard",function(){return ts}),e.d(i,"FullscreenWizardPageFactory",function(){return as}),e.d(i,"FullscreenWizardPage",function(){return ds}),e.d(i,"SelectDataSourcePage",function(){return ls}),e.d(i,"_registerSelectDataSourcePage",function(){return cs}),e.d(i,"SpecifyJsonDataSourceSettingsPage",function(){return us}),e.d(i,"_registerSpecifyJsonDataSourceSettingsPage",function(){return ps}),e.d(i,"SpecifySqlDataSourceSettingsPage",function(){return hs}),e.d(i,"_registerSpecifySqlDataSourceSettingsPage",function(){return ms}),e.d(i,"SpecifyFederationDataSourceSettingsPage",function(){return gs}),e.d(i,"_registerSpecifyFederationDataSourceSettingsPage",function(){return bs}),e.d(i,"FullscreenWizard",function(){return ys}),e.d(i,"WizardNavigationPanel",function(){return fs}),e.d(i,"FullscreenDataSourceWizard",function(){return Ss}),e.d(i,"FullscreenDataSourceWizardPageIterator",function(){return xs}),e.d(i,"_createDataSourceFullscreenWizard",function(){return vs}),e.d(i,"parameterTypeToPropertyMap",function(){return Ai}),e.d(i,"SpecifyObjectDataSourceSettingsPage",function(){return Go}),e.d(i,"_registerSpecifyObjectDataSourceSettingsPage",function(){return Xo}),{}),L=(e.r(r),e.d(r,"WrappedWizardPageSection",function(){return rs}),e.d(r,"WizardPageSection",function(){return os}),e.d(r,"WizardPageSectionIterator",function(){return ss}),e.d(r,"WizardPageSectionFactory",function(){return is}),e.d(r,"WizardPageProcessor",function(){return ns}),e.d(r,"getLocalizedValidationErrorMessage",function(){return $i}),e.d(r,"JsonStringEditor",function(){return ji}),e.d(r,"JsonDataSourceJsonSourcePageSettingsBase",function(){return zi}),e.d(r,"JsonDataSourceJsonSourcePageStringSettings",function(){return Bi}),e.d(r,"JsonDataSourceJsonSourcePageUriSettings",function(){return Ri}),e.d(r,"WizardSectionPosition",function(){return E}),e.d(r,"CustomQueryTreeListItem",function(){return Si}),e.d(r,"MultiQueryTreeListItemFactory",function(){return xi}),e.d(r,"getSectionStyle",function(){return vi}),e.d(r,"subscribeArray",function(){return _i}),e.d(r,"subscribeProperties",function(){return Ci}),e.d(r,"subscribeObject",function(){return Ti}),e.d(r,"_createBeforeInitializePageEventArgs",function(){return Pi}),e.d(r,"_createPageEventArgs",function(){return Ni}),e.d(r,"_isMoreThanOneDataSourceTypeAvailable",function(){return Oi}),e.d(r,"ParametersTreeListItemBase",function(){return Or}),e.d(r,"ParametersTreeListItem",function(){return wr}),e.d(r,"ParametersTreeListRootItemBase",function(){return Dr}),e.d(r,"ParametersTreeListRootItem",function(){return Ir}),e.d(r,"ParametersTreeListController",function(){return Er}),e.d(r,"DBSchemaItemsProvider",function(){return Sr}),e.d(r,"DBSchemaTreeListController",function(){return Tr}),e.d(r,"FederationTreeNodeProvider",function(){return jo}),e.d(r,"FederatedQueriesTreeNode",function(){return $o}),e.d(r,"FederationDataSourceItemsExtender",function(){return Ao}),e.d(r,"FederationTablesExpressionFieldListProvider",function(){return Oo}),e.d(r,"FederationSelectQueryBuilderPopup",function(){return wo}),e.d(r,"FederationUnionQueryBuilderPopup",function(){return Eo}),e.d(r,"FederationQueryBuilderPopupBase",function(){return No}),e.d(r,"FederationTransformQueryBuilderPopup",function(){return Io}),e.d(r,"TransformResultSchemaProvider",function(){return Do}),e.d(r,"QueryBuilderPopupBase",function(){return sr}),e.d(r,"QueryBuilderPopup",function(){return nr}),e.d(r,"SelectQuerySqlTextProvider",function(){return dr}),e.d(r,"SelectStatementQueryControl",function(){return hr}),e.d(r,"StoredProceduresQueryControl",function(){return mr}),e.d(r,"defaultObjectDataSourceItemSpecifics",function(){return Vi}),e.d(r,"TreeNodeBase",function(){return Wi}),e.d(r,"TreeLeafNode",function(){return Fi}),e.d(r,"TreeNode",function(){return Ui}),e.d(r,"ParameterTreeNode",function(){return Hi}),e.d(r,"QueriesTreeNode",function(){return Ji}),e.d(r,"TreeQueryNode",function(){return Gi}),e.d(r,"FieldTreeNode",function(){return Xi}),e.d(r,"DataMemberTreeNode",function(){return Yi}),e.d(r,"SingleCheckedDataMemberTreeNode",function(){return Ki}),e.d(r,"TreeNodeItemsProvider",function(){return Zi}),e.d(r,"JsonTreeNodeItemsProvider",function(){return er}),e.d(r,"WizardAction",function(){return _s}),e.d(r,"ObjectTypeDescriptions",function(){return li}),e.d(r,"getObjectTypeDescriptionsCallback",function(){return ci}),e.d(r,"ObjectSchemaProvider",function(){return ui}),e.d(r,"ChooseObjectTypesTreelistController",function(){return pi}),e.d(r,"ChooseObjectTypes",function(){return hi}),e.d(r,"ObjectDataSourceParameterProperty",function(){return ti}),e.d(r,"ObjectDataSourceParametersModel",function(){return ri}),e.d(r,"ChooseObjectMemberParameters",function(){return oi}),e.d(r,"ChooseObjectParameters",function(){return si}),e.d(r,"ChooseObjectDataMembers",function(){return bi}),{}),o=(e.r(L),e.d(L,"expressionFunctions",function(){return Ct}),{}),Q=(e.r(o),e.d(o,"editorTemplates",function(){return b}),e.d(o,"createDefaultSQLAceOptions",function(){return cr}),e.d(o,"createDefaultSQLAdditionalOptions",function(){return ur}),e.d(o,"createDefaultSQLLanguageHelper",function(){return pr}),e.d(o,"UndoEditor",function(){return Cs}),e.d(o,"ManageFederatedQueriesEditor",function(){return Ts}),e.d(o,"FederatedQueriesHelper",function(){return ko}),e.d(o,"RightPanelSwitcher",function(){return Ps}),e.d(o,"GroupFilterEditorSerializer",function(){return Kr}),e.d(o,"OperandParameterQBSurface",function(){return eo}),e.d(o,"OperandPropertyQBSurface",function(){return to}),e.d(o,"isAggregatedExpression",function(){return Xr}),e.d(o,"QueryBuilderObjectsProvider",function(){return Yr}),e.d(o,"QBFilterEditorHelper",function(){return ao}),e.d(o,"QBFilterEditorHelperDefault",function(){return io}),e.d(o,"_setQBFilterEditorHelperDefault",function(){return ro}),e.d(o,"QBFilterStringOptions",function(){return oo}),e.d(o,"KeyColumnSurface",function(){return zr}),e.d(o,"MasterDetailEditor",function(){return Mr}),e.d(o,"MasterDetailEditorPopupManager",function(){return jr}),e.d(o,"MasterDetailRelationSurface",function(){return Br}),e.d(o,"MasterQuerySurface",function(){return Rr}),{}),V=(e.r(Q),e.d(Q,"name",function(){return Ut}),e.d(Q,"alias",function(){return Ht}),e.d(Q,"text",function(){return Jt}),e.d(Q,"selected",function(){return Gt}),e.d(Q,"size",function(){return Xt}),e.d(Q,"location",function(){return Yt}),e.d(Q,"sizeLocation",function(){return Kt}),e.d(Q,"unknownSerializationsInfo",function(){return Zt}),{}),s=(e.r(V),e.d(V,"ActionId",function(){return Be}),e.d(V,"HandlerUri",function(){return Re}),e.d(V,"controlsFactory",function(){return la}),e.d(V,"RequestWrapper",function(){return qe}),e.d(V,"SqlQueryType",function(){return u}),e.d(V,"JsonSourceType",function(){return pt}),e.d(V,"FederationQueryType",function(){return c}),{}),n=(e.r(s),e.d(s,"ColumnDragHandler",function(){return Ns}),e.d(s,"DbObjectDragDropHandler",function(){return Os}),e.d(s,"FederationColumnViewModel",function(){return fo}),e.d(s,"FederationAllColumnsViewModel",function(){return yo}),e.d(s,"federationQuerySerializationsInfo",function(){return So}),e.d(s,"FederationQueryViewModel",function(){return xo}),e.d(s,"FederationQuerySurface",function(){return vo}),e.d(s,"FederationTableViewModel",function(){return _o}),e.d(s,"FederationTableSurface",function(){return Co}),e.d(s,"ColumnExpressionCollectionHelper",function(){return $}),e.d(s,"registerControls",function(){return ks}),e.d(s,"serializeDataConnection",function(){return Me}),e.d(s,"FederatedUnionQueryBuilderTreeListController",function(){return To}),e.d(s,"FederatedTransformQueryBuilderTreeListController",function(){return Po}),e.d(s,"QueryBuilderTreeListController",function(){return As}),e.d(s,"wrapGetSelectStatement",function(){return ir}),e.d(s,"wrapRebuildResultSchema",function(){return rr}),e.d(s,"wrapGetFederationdResultSchema",function(){return or}),e.d(s,"AccordionTabInfo",function(){return Rs}),e.d(s,"SelectedTabInfo",function(){return Ms}),e.d(s,"updateQueryBuilderSurfaceContentSize",function(){return Qs}),e.d(s,"createIsLoadingFlag",function(){return Vs}),e.d(s,"createQueryBuilder",function(){return Hs}),e.d(s,"createQueryBuilderSurface",function(){return Js}),{}),W=(e.r(n),e.d(n,"QueryElementBaseViewModel",function(){return ca}),e.d(n,"AllColumnsViewModel",function(){return Jr}),e.d(n,"AllColumnsSurface",function(){return go}),e.d(n,"ColumnViewModel",function(){return no}),e.d(n,"ColumnExpression",function(){return Hr}),e.d(n,"ColumnSurface",function(){return mo}),e.d(n,"JoinConditionViewModel",function(){return ua}),e.d(n,"JoinConditionSurface",function(){return Es}),e.d(n,"ParameterViewModel",function(){return Zr}),e.d(n,"QueryElementBaseSurface",function(){return ho}),e.d(n,"QueryViewModelBase",function(){return co}),e.d(n,"QueryViewModel",function(){return uo}),e.d(n,"QuerySurface",function(){return po}),e.d(n,"RelationViewModel",function(){return ha}),e.d(n,"RelationSurface",function(){return ws}),e.d(n,"TableViewModel",function(){return j}),e.d(n,"TableSurface",function(){return bo}),{}),F=(e.r(W),e.d(W,"allColumnsSerializationInfo",function(){return Ur}),e.d(W,"AggregationType",function(){return Vr}),e.d(W,"columnSerializationInfo",function(){return Wr}),e.d(W,"ColumnType",function(){return A}),e.d(W,"columnExpressionSerializationsInfo",function(){return Fr}),e.d(W,"ConditionType",function(){return Ds}),e.d(W,"joinConditionSerializationInfo",function(){return Is}),e.d(W,"ParametersMode",function(){return Gr}),e.d(W,"querySerializationsInfo",function(){return so}),e.d(W,"relationSerializationInfo",function(){return pa}),e.d(W,"tableSerializationInfo",function(){return lo}),{}),x=(e.r(F),e.d(F,"JSQueryBuilder",function(){return Gs}),e.d(F,"JSQueryBuilderBinding",function(){return Zs}),e.d(F,"DxQueryBuilder",function(){return tn}),e.d(F,"EventGenerator",function(){return Ks}),e(6)),v=e(1),h=e(5),U={propertyName:"name",modelName:"@Name",displayName:"Name",editor:x.editorTemplates.getEditor("text"),validationRules:v.nameValidationRules},H={propertyName:"text",modelName:"@Text",displayName:"Text",editor:x.editorTemplates.getEditor("text")},J={propertyName:"size",modelName:"@Size",defaultVal:"100,50",from:h.Size.fromString,displayName:"Size",editor:x.editorTemplates.getEditor("objecteditor")},G={propertyName:"location",modelName:"@Location",from:h.Point.fromString,displayName:"Location",editor:x.editorTemplates.getEditor("objecteditor")},X=[J,G],Y=[U].concat(X),_=e(0);class K extends h.SurfaceElementBase{constructor(e,t,a){super(e,t,Object(v.extend)({},K._unitProperties,a)),this.template="dx-diagram-element",this.selectiontemplate="dx-diagram-element-selection",this.contenttemplate="dx-diagram-element-content",this.margin=_.observable(0),this._disposables.push(this.positionWidthWithoutMargins=_.pureComputed(()=>this.position.width()-2*this.margin())),this._disposables.push(this.positionLineHeightWithoutMargins=_.pureComputed(()=>this.position.lineHeight()-2*this.margin()))}}K._unitProperties={_height:e=>e.size.height,_width:e=>e.size.width,_x:e=>e.location.x,_y:e=>e.location.y};class Z extends K{constructor(e,t){super(e,t,Z._unitProperties),this.template="dxdd-connecting-point",this.selectiontemplate="dxdd-connection-point-selection",this.contenttemplate=""}}Z._unitProperties={_x:e=>_.pureComputed(()=>e.location.x()-e.parentModel().location.x()),_y:e=>_.pureComputed(()=>e.location.y()-e.parentModel().location.y())},(k=p=p||{})[k.East=0]="East",k[k.South=1]="South",k[k.North=2]="North",k[k.West=3]="West";const ee=10;function te(e,t){var a,i={start:null,end:null};return t.leftConnectionPoint.location.x()>e.rightConnectionPoint.location.x()+2*ee?(i.start=e.rightConnectionPoint,i.end=t.leftConnectionPoint):e.leftConnectionPoint.location.x()>t.rightConnectionPoint.location.x()+2*ee?(i.start=e.leftConnectionPoint,i.end=t.rightConnectionPoint):(a=(e.rightConnectionPoint.location.x()+e.rightConnectionPoint.location.x())/2,(t.rightConnectionPoint.location.x()+t.rightConnectionPoint.location.x())/2<a?(i.start=e.rightConnectionPoint,i.end=t.rightConnectionPoint):(i.start=e.leftConnectionPoint,i.end=t.leftConnectionPoint)),i}var C=e(2),ae=new C.ControlsFactory;class ie extends h.ElementViewModel{constructor(e,t,a){super(e,t,a)}getControlFactory(){return ae}}var re=[J,G,U,H,{propertyName:"type",modelName:"@Type"}];class oe extends ie{constructor(e,t,a){super(Object(v.extend)({"@ControlType":"ConnectingPoint"},e),t,a),this.side=_.pureComputed(()=>this.percentOffsetY()>=this.percentOffsetX()?this.percentOffsetY()>1-this.percentOffsetX()?p.South:p.West:this.percentOffsetY()>1-this.percentOffsetX()?p.East:p.North),this.size=new h.Size(7,7),this.location=new h.Point(0,0),this.location.x=_.pureComputed(()=>{var e=this.parentModel();return e.location.x()+e.size.width()*this.percentOffsetX()}),this.location.y=_.pureComputed(()=>{var e=this.parentModel();return e.location.y()+e.size.height()*this.percentOffsetY()})}}var se=[{propertyName:"percentOffsetX",modelName:"@PercentOffsetX",defaultVal:.5,from:C.floatFromModel},{propertyName:"percentOffsetY",modelName:"@PercentOffsetY",defaultVal:.5,from:C.floatFromModel}];class ne extends ie{constructor(e,t,a){super(Object(v.extend)({"@ControlType":"DiagramElement"},e),t,a),this.connectingPoints=Object(C.deserializeArray)(e&&e.ConnectingPoints||[],e=>new oe(e,this,a)),void 0===this.text()&&this.text(this.name())}}class de extends v.DragDropHandler{constructor(e,t,a,i,r){super(e,t,a,i,r),this.startConnectingPoint=null,this.newConnector=null,this.cursor="arrow",this.containment=".dxrd-ghost-container",this.helper=e=>{r.update(e)}}startDrag(e){if(!(e instanceof Z))throw new Error("ConnectingPointDragHandler can be applied to the ConnectingPoint only.");this.startConnectingPoint=e;e=this.startConnectingPoint.parent.getControlModel();this.newConnector=e.parentModel().createChild({"@ControlType":"RoutedConnector"}),this.newConnector.startPoint().connectingPoint(this.startConnectingPoint.getControlModel())}drag(e,t){t.dataset.leftPosition=Object(v.convertToCssPixelUnits)(Object(v.convertFromCssPixelUnits)(t.dataset.leftPosition)+t.scroll.left),t.dataset.topPosition=Object(v.convertToCssPixelUnits)(Object(v.convertFromCssPixelUnits)(t.dataset.topPosition)+t.scroll.top);t=this._getAbsoluteSurfacePosition(t);this.newConnectorSurface.endPoint().rect({top:t.top,left:t.left})}doStopDrag(){var e;this.dragHelperContent.reset(),this.selection.dropTarget&&((e=this.selection.dropTarget.getControlModel())instanceof oe?this.newConnector.endPoint().connectingPoint(e):e instanceof ne&&(e=e.connectingPoints(),this.newConnector.endPoint().connectingPoint(e[0])),this.selection.initialize(this.newConnectorSurface))}get newConnectorSurface(){return this.newConnector&&Object(v.findSurface)(this.newConnector)}}class le extends h.SurfaceElementBase{constructor(e,t){super(e,t,le._unitProperties),this.template="dx-diagram-connection-point",this.selectiontemplate="dx-diagram-connection-point",this.relativeX=_.pureComputed(()=>this.rect().left-this.parent.rect().left),this.relativeY=_.pureComputed(()=>this.rect().top-this.parent.rect().top)}container(){return this.getRoot()}}le._unitProperties={_x:e=>e.location.x,_y:e=>e.location.y};class ce extends v.DragDropHandler{constructor(e,t,a,i,r){super(e,t,a,i,r),this.currentConnectionPoint=null,this.cursor="arrow",this.containment=".dxrd-ghost-container",this.helper=e=>{r.update(e)}}startDrag(e){if(!(e instanceof le))throw new Error("ConnectionPointDragHandler can be applied to the ConnectionPoint only.");this.currentConnectionPoint=e}drag(e,t){t.dataset.leftPosition=Object(v.convertToCssPixelUnits)(Object(v.convertFromCssPixelUnits)(t.dataset.leftPosition)+t.scroll.left),t.dataset.topPosition=Object(v.convertToCssPixelUnits)(Object(v.convertFromCssPixelUnits)(t.dataset.topPosition)+t.scroll.top);t=this._getAbsoluteSurfacePosition(t);this.currentConnectionPoint.rect({top:t.top,left:t.left})}doStopDrag(){var e,t;this.dragHelperContent.reset(),this.selection.dropTarget&&((t=this.selection.dropTarget.getControlModel())instanceof oe?(e=this.currentConnectionPoint.parent.getControlModel(),(this.currentConnectionPoint.getControlModel()===e.startPoint()?e.startPoint():e.endPoint()).connectingPoint(t)):t instanceof ne&&(e=this.currentConnectionPoint.parent.getControlModel(),t=t.connectingPoints(),(this.currentConnectionPoint.getControlModel()===e.startPoint()?e.startPoint():e.endPoint()).connectingPoint(t[0])))}}class ue extends K{constructor(e,t){super(e,t,null),this.contenttemplate="dxdd-element-content-with-connecting-points"}_getChildrenHolderName(){return"connectingPoints"}}class pe extends ie{constructor(e){super(e,null,new C.ModelSerializer),this.controlType="Diagram",this.controls=_.observableArray(),this.name("Diagram")}getInfo(){return be}}var he={propertyName:"margins",modelName:"@Margins",from:h.Margins.fromString,displayName:"Margins"},me={propertyName:"pageWidth",modelName:"@PageWidth",defaultVal:850,from:C.floatFromModel,displayName:"Page Width",editor:x.editorTemplates.getEditor("numeric")},ge={propertyName:"pageHeight",modelName:"@PageHeight",defaultVal:1250,from:C.floatFromModel,displayName:"Page Height",editor:x.editorTemplates.getEditor("numeric")},be=[U,me,ge,he];class fe extends h.SurfaceElementBase{constructor(e,t=_.observable(1)){super(e,{measureUnit:_.observable("Pixels"),zoom:t,dpi:_.observable(100)},fe._unitProperties),this.measureUnit=_.observable("Pixels"),this.dpi=_.observable(100),this.controls=_.observableArray(),this.allowMultiselect=!1,this.focused=_.observable(!1),this.selected=_.observable(!1),this.underCursor=_.observable(new v.HoverInfo),this.templateName="dx-diagram-surface",this.margins={bottom:this._bottom,left:this._left,right:this._right,top:this._top},this.zoom=t,this._context=this,Object(v.createObservableArrayMapCollection)(e.controls,this.controls,this._createSurface)}checkParent(e){return!1}get parent(){return this._parent}set parent(e){this._parent=e}getChildrenCollection(){return _.observableArray([])}}fe._unitProperties={_width:e=>e.pageWidth,_height:e=>e.pageWidth,pageWidth:e=>e.pageWidth,pageHeight:e=>e.pageHeight,_bottom:e=>e.margins.bottom,_left:e=>e.margins.left,_right:e=>e.margins.right,_top:e=>e.margins.top};class ye extends ie{constructor(e,t,a){super(Object(v.extend)(e,{"@ControlType":"ConnectionPoint"}),t,a);var i=this.location.x,r=this.location.y;this.location.x=_.pureComputed({read:()=>this.connectingPoint()&&this.connectingPoint().location.x()||i(),write:e=>{this.connectingPoint(null),i(e)}}),this.location.y=_.pureComputed({read:()=>this.connectingPoint()&&this.connectingPoint().location.y()||r(),write:e=>{this.connectingPoint(null),r(e)}})}}var Se=[G,{propertyName:"connectingPoint",modelName:"@ConnectingPoint",link:!0}];class xe extends ie{constructor(e,t,a){super(Object(v.extend)({"@ControlType":"Connector"},e),t,a),this.startPoint(this.startPoint()||new ye({"@Location":"0, 0"},this,a)),this.endPoint(this.endPoint()||new ye({"@Location":"150, 75"},this,a)),this.location=new h.Point(0,0),this._disposables.push(this.location.x=_.pureComputed({read:()=>this.getX(),write:e=>{e-=(this.startPoint().location.x()<this.endPoint().location.x()?this.startPoint():this.endPoint()).location.x();this.startPoint().location.x(this.startPoint().location.x()+e),this.endPoint().location.x(this.endPoint().location.x()+e)}})),this._disposables.push(this.location.y=_.pureComputed({read:()=>this.getY(),write:e=>{e-=(this.startPoint().location.y()<this.endPoint().location.y()?this.startPoint():this.endPoint()).location.y();this.startPoint().location.y(this.startPoint().location.y()+e),this.endPoint().location.y(this.endPoint().location.y()+e)}})),this.size=new h.Size(0,0),this._disposables.push(this.size.width=_.pureComputed({read:()=>this.getWidth(),write:e=>{this.startPoint().location.x()<this.endPoint().location.x()?this.endPoint().location.x(this.startPoint().location.x()+e):this.startPoint().location.x(this.endPoint().location.x()+e)}})),this._disposables.push(this.size.height=_.pureComputed({read:()=>this.getHeight(),write:e=>{this.startPoint().location.y()<this.endPoint().location.y()?this.endPoint().location.y(this.startPoint().location.y()+e):this.startPoint().location.y(this.endPoint().location.y()+e)}}))}getX(){return(this.startPoint().location.x()<this.endPoint().location.x()?this.startPoint():this.endPoint()).location.x()}getY(){return(this.startPoint().location.y()<this.endPoint().location.y()?this.startPoint():this.endPoint()).location.y()}getWidth(){return Math.abs(this.startPoint().location.x()-this.endPoint().location.x())||xe.MIN_LINE_THICKNESS}getHeight(){return Math.abs(this.startPoint().location.y()-this.endPoint().location.y())||xe.MIN_LINE_THICKNESS}}xe.MIN_LINE_THICKNESS=3;class ve extends K{constructor(e,t){super(e,t,null),this.template="dxdd-connector",this.selectiontemplate="dxdd-connector-selection",this.startPoint=_.pureComputed(()=>new le(e.startPoint(),t)),this.endPoint=_.pureComputed(()=>new le(e.endPoint(),t))}}class _e extends xe{constructor(e,t,a){super(Object(v.extend)({"@ControlType":"RoutedConnector"},e),t,a),this._isUpdating=!1,this._getPower=function(e){for(var t=0;t<10;t++)if(e>=Math.pow(2,t)&&e<Math.pow(2,t+1))return t+1;return 1},this.seriesNumber=_.observable(1),this.routePoints=_.observable([]),this.freezeRoute=_.observable(!1),this._disposables.push(_.computed(()=>{var e=!(1+this.startPoint().location.x()+this.startPoint().location.y()+this.endPoint().location.x()+this.endPoint().location.y());this._isUpdating||this.freezeRoute(e)})),this._disposables.push(_.computed(()=>{var e,t,a,i,r,o,s,n,d,l,c,u;this.freezeRoute()||(e=[],t=this._getStartPointSide(),a=this._getEndPointSide(),i=new h.Point(this.startPoint().location.x(),this.startPoint().location.y()),r=new h.Point(this.endPoint().location.x(),this.endPoint().location.y()),this.startPoint().connectingPoint()&&(this._fixPoint(i,this.startPoint().connectingPoint().side()),e.push(i)),this.endPoint().connectingPoint()&&this._fixPoint(r,this.endPoint().connectingPoint().side()),o=Math.min(i.x(),r.x()),s=Math.min(i.y(),r.y()),n=Math.abs(i.x()-r.x()),d=Math.abs(i.y()-r.y()),l=this.seriesNumber(),c=this._getRatio(l),u=(l-1)*ee,0<i.y()-r.y()?0<i.x()-r.x()?t===p.North||t===p.East?a===p.North||a===p.East?(1!==l&&e.push(new h.Point(o+(n+=u),s+d)),e.push(new h.Point(o+n,s))):(e.push(new h.Point(o+n,s+d*c)),e.push(new h.Point(o,s+d*c))):a===p.South||a===p.West?e.push(new h.Point(o,s+d)):(e.push(new h.Point(o+n*c,s+d)),e.push(new h.Point(o+n*c,s))):t===p.North||t===p.West?a===p.North||a===p.West?(1!==l&&e.push(new h.Point(o-=u,s+d)),e.push(new h.Point(o,s))):(e.push(new h.Point(o,s+d*c)),e.push(new h.Point(o+n,s+d*c))):a===p.South||a===p.East?e.push(new h.Point(o+n,s+d)):(e.push(new h.Point(o+n*c,s+d)),e.push(new h.Point(o+n*c,s))):0<i.x()-r.x()?t===p.South||t===p.East?a===p.South||a===p.East?(1!==l&&e.push(new h.Point(o+(n+=u),s)),e.push(new h.Point(o+n,s+d))):(e.push(new h.Point(o+n,s+d*c)),e.push(new h.Point(o,s+d*c))):a===p.North||a===p.West?e.push(new h.Point(o,s)):(e.push(new h.Point(o+n*c,s)),e.push(new h.Point(o+n*c,s+d))):t===p.South||t===p.West?a===p.South||a===p.West?(1!==l&&e.push(new h.Point(o-=u,s)),e.push(new h.Point(o,s+d))):(e.push(new h.Point(o,s+d*c)),e.push(new h.Point(o+n,s+d*c))):a===p.North||a===p.East?e.push(new h.Point(o+n,s)):(e.push(new h.Point(o+n*c,s)),e.push(new h.Point(o+n*c,s+d))),this.endPoint().connectingPoint()&&e.push(r),this.routePoints(e))}))}getX(){var t=super.getX();return this.routePoints&&this.routePoints().forEach(e=>{e.x()<t&&(t=e.x())}),t}getY(){var t=super.getY();return this.routePoints&&this.routePoints().forEach(e=>{e.y()<t&&(t=e.y())}),t}getWidth(){var t=super.getWidth(),a=this.getX();return this.routePoints&&[this.startPoint().location,this.endPoint().location].concat(this.routePoints()).forEach(e=>{e.x()-a>t&&(t=e.x()-a)}),t}getHeight(){var t=super.getHeight(),a=this.getY();return this.routePoints&&[this.startPoint().location,this.endPoint().location].concat(this.routePoints()).forEach(e=>{e.y()-a>t&&(t=e.y()-a)}),Math.round(t)}_fixPoint(e,t){switch(t){case p.North:e.y(e.y()-ee);break;case p.East:e.x(e.x()+ee);break;case p.West:e.x(e.x()-ee);break;case p.South:e.y(e.y()+ee)}}_getStartPointSide(){return this.startPoint().connectingPoint()?this.startPoint().connectingPoint().side():this.startPoint().location.y()!==this.endPoint().location.y()?this.startPoint().location.y()>this.endPoint().location.y()?p.North:p.South:this.startPoint().location.x()>this.endPoint().location.x()?p.West:p.East}_getEndPointSide(){return this.endPoint().connectingPoint()?this.endPoint().connectingPoint().side():this.startPoint().location.y()!==this.endPoint().location.y()?this.startPoint().location.y()>this.endPoint().location.y()?p.South:p.North:this.startPoint().location.x()>this.endPoint().location.x()?p.East:p.West}_getRatio(e){for(var t=this._getPower(e),a=Math.pow(2,t),i=Math.pow(2,t-1),r=[],o=1;o<i;o++)o%2!=0&&(r.push(a-o),r.push(o));return r.reverse(),(r[e-i]||1)/a}beginUpdate(){this._isUpdating=!0}endUpdate(){this._isUpdating=!1}}class Ce extends K{constructor(e,t){super(e,t,null),this.template="dxdd-routed-connector",this.selectiontemplate="dxdd-routed-connector-selection",this.showArrow=_.observable(!1),this.showRightArrow=_.observable(!1),this.isVisible=_.observable(!0),this.routePoints=_.observableArray(),this.routePointsSet=_.pureComputed(()=>{var t=[];return this.routePoints().forEach(e=>{t.push(e.x()+" "+e.y())}),t.join(", ")}),this.routeLineWrappers=_.pureComputed(()=>{for(var e=[],t=1;t<this.routePoints().length;t++)e.push(this._createRouteLineWrapper(this.routePoints()[t-1],this.routePoints()[t],1===t||t===this.routePoints().length-1));return e}),this.connectorID=()=>this._connectorID,this._disposables.push(e),this._connectorID=Ce._connectorsCount++,this.startPoint=_.pureComputed(()=>new le(e.startPoint(),t)),this.endPoint=_.pureComputed(()=>new le(e.endPoint(),t)),this._disposables.push(e.routePoints.subscribe(e=>{this._updateRoutePoints()})),this._updateRoutePoints()}_createRoutePoint(e,t){return{x:_.pureComputed(()=>this._context.rtl()?Math.round(this.getControlModel().size.width()-(e.x()-t.x())):Math.round(e.x()-t.x())),y:_.pureComputed(()=>Math.round(e.y()-t.y())),modelPoint:e}}_createRouteLineWrapper(i,r,e=!1){var o=this,s=Math.abs(i.x.peek()-r.x.peek())<1,n=i.modelPoint.y.peek(),d=i.modelPoint.x.peek();return{position:{top:Math.min(i.y.peek(),r.y.peek())-2,left:Math.min(i.x.peek(),r.x.peek())-2,width:Math.abs(i.x.peek()-r.x.peek())+6,height:Math.abs(i.y.peek()-r.y.peek())+6},isVerticalLine:s,resizeHandler:e=>{o._control.freezeRoute(!0);try{var t,a;o._control.beginUpdate(),s?(t=this._context.rtl()?d-e.delta.dx:d+e.delta.dx,i.modelPoint.x(t),r.modelPoint.x(t)):(a=n+e.delta.dy,i.modelPoint.y(a),r.modelPoint.y(a))}finally{o._control.endUpdate()}},resizeStopped:()=>{o._control.routePoints.notifySubscribers(o._control.routePoints())},isLocked:_.observable(e)}}_updateRoutePoints(){var t=[],e=this.getControlModel(),a=e.location;t.push(this._createRoutePoint(e.startPoint().location,a)),e.routePoints().forEach(e=>{t.push(this._createRoutePoint(e,a))}),t.push(this._createRoutePoint(e.endPoint().location,a)),this.routePoints(t)}}function Te(){ae.registerControl("Unknown",{info:Y,type:h.ElementViewModel,nonToolboxItem:!0,surfaceType:h.SurfaceElementBase}),ae.registerControl("Connector",{info:[U,{propertyName:"location",displayName:"Location",editor:x.editorTemplates.getEditor("objecteditor")},{propertyName:"startPoint",modelName:"@StartPoint",link:!0},{propertyName:"endPoint",modelName:"@EndPoint",link:!0}],surfaceType:ve,type:xe,elementActionsTypes:[],nonToolboxItem:!1}),ae.registerControl("RoutedConnector",{info:[U,{propertyName:"location",displayName:"Location",editor:x.editorTemplates.getEditor("objecteditor")},{propertyName:"startPoint",modelName:"@StartPoint",link:!0},{propertyName:"endPoint",modelName:"@EndPoint",link:!0}],surfaceType:Ce,type:_e,elementActionsTypes:[],nonToolboxItem:!1}),ae.registerControl("ConnectionPoint",{info:Se,surfaceType:le,type:ye,elementActionsTypes:[],nonToolboxItem:!0}),ae.registerControl("Diagram",{info:be,surfaceType:fe,popularProperties:["name"],type:pe,elementActionsTypes:[],isContainer:!0,nonToolboxItem:!0}),ae.registerControl("DiagramElement",{info:re,defaultVal:{"@SizeF":"150,50",ConnectingPoints:{Item1:{"@ControlType":"ConnectingPoint","@PercentOffsetX":"1","@PercentOffsetY":"0.5"},Item2:{"@ControlType":"ConnectingPoint","@PercentOffsetX":"0.5","@PercentOffsetY":"1"},Item3:{"@ControlType":"ConnectingPoint","@PercentOffsetX":"0.5","@PercentOffsetY":"0"},Item4:{"@ControlType":"ConnectingPoint","@PercentOffsetX":"0","@PercentOffsetY":"0.5"}}},surfaceType:ue,popularProperties:["text"],type:ne,elementActionsTypes:[],nonToolboxItem:!1}),ae.registerControl("Ellipse",{info:re,defaultVal:{"@SizeF":"150,50","@Type":"Ellipse",ConnectingPoints:{Item1:{"@ControlType":"ConnectingPoint","@PercentOffsetX":"1","@PercentOffsetY":"0.5"},Item2:{"@ControlType":"ConnectingPoint","@PercentOffsetX":"0.5","@PercentOffsetY":"1"},Item3:{"@ControlType":"ConnectingPoint","@PercentOffsetX":"0.5","@PercentOffsetY":"0"},Item4:{"@ControlType":"ConnectingPoint","@PercentOffsetX":"0","@PercentOffsetY":"0.5"}}},surfaceType:ue,popularProperties:["text"],type:ne,elementActionsTypes:[],nonToolboxItem:!1}),ae.registerControl("Condition",{info:re,defaultVal:{"@SizeF":"150,50","@Type":"Condition",ConnectingPoints:{Item1:{"@ControlType":"ConnectingPoint","@PercentOffsetX":"1","@PercentOffsetY":"0.5"},Item2:{"@ControlType":"ConnectingPoint","@PercentOffsetX":"0.5","@PercentOffsetY":"1"},Item3:{"@ControlType":"ConnectingPoint","@PercentOffsetX":"0.5","@PercentOffsetY":"0"},Item4:{"@ControlType":"ConnectingPoint","@PercentOffsetX":"0","@PercentOffsetY":"0.5"}}},surfaceType:ue,popularProperties:["text"],type:ne,elementActionsTypes:[],nonToolboxItem:!1}),ae.registerControl("ConnectingPoint",{info:se,surfaceType:Z,type:oe,elementActionsTypes:[],nonToolboxItem:!0})}Ce._connectorsCount=0;var d,Pe,T=e(4),Ne={Appearance:{info:[]},Behavior:{info:[]},Design:{info:[U]},Layout:{info:[G,J,me,ge]}};function Oe(e,t,a,i){a&&Object(C.addCultureInfo)({messages:a}),Te();var r=_.pureComputed(()=>new pe(t())),a=_.pureComputed(()=>{return new fe(r())}),i=Object(v.createDesigner)(r,a,ae,Ne,void 0,void 0,i),o=(i.connectionPointDragHandler=new ce(a,i.selection,i.undoEngine,i.snapHelper,i.dragHelperContent),i.connectingPointDragHandler=new de(a,i.selection,i.undoEngine,i.snapHelper,i.dragHelperContent),i.isLoading(!1),i.selection.focused(a()),T.fn.constructor(e).children().remove(),_.applyBindings(i,e),Object(v.updateSurfaceContentSize)(i.surfaceSize,e)),s=()=>{o()};return window.addEventListener("resize",s),Object(v.addDisposeCallback)(e,function(){window.removeEventListener("resize",s)}),i.tabPanel.width.subscribe(()=>{o()}),o(),i}_.bindingHandlers.routeLineDraggable={init:(e,t)=>{let a=null;var i=t(),t=Object(v.extend)({snap:".dxrd-drag-snap-line",snapTolerance:v.SnapLinesHelper.snapTolerance},_.unwrap(i),{start:function(e,t){i.starting()},stop:function(e,t){i.stopped()},drag:function(e,t){t=(a=a||{left:Object(v.convertFromCssPixelUnits)(t.dataset.leftPosition),top:Object(v.convertFromCssPixelUnits)(t.dataset.topPosition)})&&e.pageX-a.left,e=a&&e.pageY-a.top;i.forceResize({delta:{dx:t||0,dy:e||0}})}});const r=new v.Draggable(e,t);Object(v.addDisposeCallback)(e,()=>{r.dispose(),e=null})}},_.bindingHandlers.updateConnectorArrow={init:(e,t,a,i,r)=>{var o,s;o=-1,"Microsoft Internet Explorer"==navigator.appName?null!=new RegExp("MSIE ([0-9]{1,}[.0-9]{0,})").exec(navigator.userAgent)&&(o=parseFloat(RegExp.$1)):"Netscape"==navigator.appName&&null!=new RegExp("Trident/.*rv:([0-9]{1,}[.0-9]{0,})").exec(navigator.userAgent)&&(o=parseFloat(RegExp.$1)),-1<o&&o<=11&&(s=r.$data.routePointsSet.subscribe(()=>{r.$data.showArrow()&&e.parentNode.insertBefore(e,e)}),Object(v.addDisposeCallback)(e.parentNode,()=>s.dispose()))}},(k=d=d||{})[k.Unknown=0]="Unknown",k[k.Boolean=1]="Boolean",k[k.Byte=2]="Byte",k[k.SByte=3]="SByte",k[k.Char=4]="Char",k[k.Decimal=5]="Decimal",k[k.Double=6]="Double",k[k.Single=7]="Single",k[k.Int32=8]="Int32",k[k.UInt32=9]="UInt32",k[k.Int16=10]="Int16",k[k.UInt16=11]="UInt16",k[k.Int64=12]="Int64",k[k.UInt64=13]="UInt64",k[k.String=14]="String",k[k.DateTime=15]="DateTime",k[k.Guid=16]="Guid",k[k.TimeSpan=17]="TimeSpan",k[k.ByteArray=18]="ByteArray";class we{constructor(e){this.name=e.Name,this.type=e.ColumnType,this.size=e.Size}static GetType(e){switch(e){case d.Boolean:return"System.Boolean";case d.Byte:return"System.Byte";case d.SByte:return"System.SByte";case d.Char:return"System.Char";case d.Decimal:return"System.Decimal";case d.Double:return"System.Double";case d.Single:return"System.Single";case d.Int32:return"System.Int32";case d.UInt32:return"System.UInt32";case d.Int16:return"System.Int16";case d.UInt16:return"System.UInt16";case d.Int64:return"System.Int64";case d.UInt64:return"System.UInt64";case d.String:return"System.String";case d.DateTime:return"System.DateTime";case d.Guid:return"System.Guid";case d.TimeSpan:return"System.TimeSpan";case d.ByteArray:return"System.Byte[]";default:return"System.Object"}}static GetSpecific(e){switch(e){case"System.Boolean":return"Bool";case"System.Byte":case"System.SByte":case"System.Int16":case"System.UInt16":case"System.Int32":case"System.UInt32":case"System.Int64":case"System.UInt64":return"Integer";case"System.Char":case"System.Guid":case"System.ByteArray":case"System.String":return"String";case"System.Double":case"System.Single":case"System.Decimal":return"Float";case"System.DateTime":case"System.TimeSpan":return"Date";default:return"String"}}}class De{constructor(e){this.name=e.Name,this.primaryKeyTable=e.PrimaryKeyTable,this.columns=e.Columns,this.primaryKeyColumns=e.PrimaryKeyTableKeyColumns}}function Ie(e,t,a){a=a||[];return e&&e.forEach(e=>{a.push(t(e))}),a}class Ee{constructor(e){this.name=e.Name,this.isView="true"===e.IsView||!0===e.IsView,this.columns=Ie(e.columns,e=>new we(e)),this.foreignKeys=Ie(e.foreignKeys,e=>new De(e))}}class ke{constructor(e){this.name=e.Name,this.arguments=Ie(e.arguments,e=>new Ae(e))}}(k=Pe=Pe||{})[k.In=0]="In",k[k.Out=1]="Out",k[k.InOut=2]="InOut";class Ae{constructor(e){this.name=e.Name,this.type=e.Type,this.direction=e.Direction}}class $e{constructor(e){var t=Ie(e.Tables,e=>new Ee(e)),a=(t.sort((e,t)=>e.name.localeCompare(t.name)),Ie(e.Views,e=>new Ee(e)));a.sort((e,t)=>e.name.localeCompare(t.name)),this.tables=t.concat(a),this.procedures=Ie(e.StoredProcedures,e=>new ke(e))}}function je(e,t,a){var i=T.Deferred();return e.getDbSchema(t,a).done(e=>{i.resolve(new $e(JSON.parse(e.dbSchemaJSON)))}).fail(e=>{Object(v.ShowMessage)(Object(v.formatUnicorn)(Object(C.getLocalization)("Schema loading failed. {0}","DxDesignerStringId.Error_SchemaLoadingFailed"),Object(v.getErrorMessage)(e))),i.reject()}),i.promise()}function ze(e,t){var a=T.Deferred();return e.getDbStoredProcedures(t).done(e=>{a.resolve(new $e(JSON.parse(e.dbSchemaJSON)).procedures)}).fail(e=>{Object(v.ShowMessage)(Object(v.formatUnicorn)(Object(C.getLocalization)("Stored procedures loading failed. {0}","DxDesignerStringId.Error_SchemaLoadingFailed"),Object(v.getErrorMessage)(e))),a.reject()}),a.promise()}var Be={Save:"dxqb-save",DataPreview:"dxqb-data-preview",SelectStatementPreview:"dxqb-select-statement-preview"},Re=Object(v.createGlobalModuleVariableFunc)("DXQB.axd");function Me(e){var t=new C.ModelSerializer,a={DataConnection:t.serialize(e)};return e.options&&Object(v.extend)(a,{ConnectionOptions:t.serialize(e.options)}),JSON.stringify(a)}class qe{sendRequest(e,t){return Object(v.ajax)(Re(),e,t)}_sendRequest(e){return Object(v.ajax)(e)}getDbSchema(e,t){e={connectionJSON:Me(e),tables:null,views:null};return t&&0<t.length&&(e.tables=(t||[]).filter(e=>!e.isView).map(e=>e.name),e.views=(t||[]).filter(e=>e.isView).map(e=>e.name)),this.sendRequest("getDBSchema",encodeURIComponent(JSON.stringify(e)))}getDbStoredProcedures(e){e=JSON.stringify({connectionJSON:Me(e)});return this.sendRequest("getDBStoredProcedures",encodeURIComponent(e))}getSelectStatement(e,t){e=JSON.stringify({connectionJSON:Me(e),sqlQueryJSON:t});return this.sendRequest("getSelectStatement",encodeURIComponent(e))}getDataPreview(e,t){e=JSON.stringify({connectionJSON:Me(e),sqlQueryJSON:t});return this.sendRequest("getDataPreview",encodeURIComponent(e))}rebuildResultSchema(e,t,a=!1){e=JSON.stringify({sqlDataSourceJSON:JSON.stringify({SqlDataSource:(new C.ModelSerializer).serialize(e)}),queryName:t,relationsEditing:a});return this.sendRequest("rebuildResultSchema",encodeURIComponent(e))}getFederationResultSchema(e){var t=e.getSerializableModel().getSerializableFederationDataSourceInfo(),e=JSON.stringify({federationDataSourceJSON:JSON.stringify({FederationDataSource:(new C.ModelSerializer).serialize(e)}),dataSources:t.dataSources});return this.sendRequest("getFederationResultSchema",encodeURIComponent(e))}validateJsonUri(e){e=JSON.stringify(e.source.serialize(!0)),e=JSON.stringify({uriJsonSourceJSON:e}),e={uri:Re(),action:"validateJsonEndPoint",arg:encodeURIComponent(e),ignoreError:()=>!0};return this._sendRequest(e)}saveJsonSource(e,t){var t=t.source,a=JSON.stringify(t.serialize(!0)),e=JSON.stringify({connectionName:e,customJson:t.json(),uriJsonSourceJSON:a});return this.sendRequest("saveJsonSource",encodeURIComponent(e))}getJsonSchema(e,t){var a=e.source,i=JSON.stringify(a.serialize(!0)),e=JSON.stringify({connectionName:e.connectionName(),customJson:a.json(),uriJsonSourceJSON:i,parameters:t});return this.sendRequest("getJsonSchema",encodeURIComponent(e))}getObjectTypeDescriptions(e){return this.sendRequest("getObjectSchema",e)}}class Le extends C.Disposable{constructor(e,t=new qe){super(),this._requestWrapper=t,this._tables={},this._tableRequests=_.observableArray([]).extend({deferred:!0}),this.connection=e,this._disposables.push(this.connection.name.subscribe(()=>{this._tables={},this._dbSchema=null,this._dbStoredProceduresSchema=null})),this._disposables.push(_.computed(()=>{var e,t=this._tableRequests();t.length&&(this._tableRequests([]),e=t.map(e=>e.table),this._getDBSchema(e).done(a=>{t.forEach(t=>{var e=a.tables.filter(e=>e.name===t.table.name)[0];e?(t.table.columns=e.columns,t.deferred.resolve(t.table)):t.deferred.reject()})}).fail(()=>t.forEach(e=>e.deferred.reject())))})),this.getItems=e=>{var t=T.Deferred();return e.fullPath?t.resolve([]):this.getDbSchema().done(e=>{t.resolve(T.map(e.tables,e=>{return{name:e.name,displayName:e.name,isList:!1,specifics:e.isView?"view":"table",dragData:{noDragable:!1}}}))}),t.promise()}}_getDBSchema(e){return this._getDBSchemaCallback(this.connection,e)}_getDBSchemaCallback(e,t){return je(this._requestWrapper,e,t)}_getDBStoredProcedures(e){return ze(this._requestWrapper,e)}getDbSchema(){return this._dbSchema&&"rejected"!==this._dbSchema.state()||(this._dbSchema=this._getDBSchema()),this._dbSchema}getDbStoredProcedures(){return this._dbStoredProceduresSchema&&"rejected"!==this._dbStoredProceduresSchema.state()||(this._dbStoredProceduresSchema=this._getDBStoredProcedures(this.connection)),this._dbStoredProceduresSchema}getDbTable(t){var a;return this._tables[t]||(a=T.Deferred(),this._tables[t]=a.promise(),this.getDbSchema().done(e=>{e=Object(v.findFirstItemMatchesCondition)(e.tables,e=>e.name===t);e?0<e.columns.length?a.resolve(e):this._tableRequests.push({table:e,deferred:a}):(a.reject(),Object(v.isCustomizedWithUpdateLocalizationMethod)("The schema does not contain the specified table: ")?Object(C.getLocalization)("The schema does not contain the specified table: "):Object(v.formatUnicorn)(Object(C.getLocalization)('The schema does not contain the specified table: "{0}".',"DataAccessStringId.TableNotInSchemaValidationException"),t))}).fail(()=>a.reject())),this._tables[t]}}var Qe=[{propertyName:"tableName",modelName:"@Name"},{propertyName:"columns",modelName:"Fields",array:!0,info:[{propertyName:"name",modelName:"@Name"},{propertyName:"propertyType",modelName:"@Type"}]}];class Ve{constructor(e,t){(t=t||new C.ModelSerializer).deserialize(this,e)}getInfo(){return Qe}}var We,Fe=[{propertyName:"name",modelName:"@Name"},{propertyName:"tables",modelName:"Views",array:!0}];class Ue{constructor(e,t){(t=t||new C.ModelSerializer).deserialize(this,e),this.tables=Object(C.deserializeArray)(e&&e.Views||[],e=>new Ve(e,t))}getInfo(){return Fe}static from(e,t){return e&&new Ue(e.DataSet,t)||null}static toJson(e,t,a){return{DataSet:t.serialize(e,Fe,a)}}}(k=We=We||{})[k.Object=0]="Object",k[k.Array=1]="Array",k[k.Property=2]="Property";class He{constructor(e,t){this.nodes=[],e&&((t=t||new C.ModelSerializer).deserialize(this,e),e=(t=e.Node)instanceof Array?Ie(t,e=>new He(e)).sort((e,t)=>e.name().localeCompare(t.name())):t?[new He(t)]:[],this.nodes=e)}static from(e,t){return new He(e,t)}static toJsonNodes(e,t,a){return(e||[]).map(e=>He.toJsonNode(e,t,a))}static toJsonNode(e,t,a,i=!0){var r=t.serialize(e,Xe,a),i=i?He.toJsonNodes(e.nodes,t,a):[];return 0<i.length&&(r.Node=i),r}getInfo(){return Xe}}class Je extends He{constructor(e,t){super(e.Node,t),this.nodeType=We[We.Object],this.valueType="Unknown",this.displayName=Object(C.getLocalization)("root"),this.selected=_.observable(!1)}static from(e,t){return new Je(e||{},t)}static toJson(e,t,a){var i;return e?((i={Node:He.toJsonNode(e,t,a,!1)}).Node.Node=He.toJsonNodes(e.nodes,t,a),i):{}}getInfo(){return Xe}}class Ge extends He{constructor(e,t){super(e),this._rootElementList=null}static from(e,t){return new Ge(e,t)}static toJson(e,t,a){return Je.toJson(e.nodes[0],t,a)}getInfo(){return Ye}getRootElementPartList(e=!0){if(!this._rootElementList){if(0===this.nodes.length)return[];this._rootElementList=[];var t=this.nodes[0],a={fullPath:_.unwrap(t.name),path:"",pathParts:[_.unwrap(t.name)]};this._fillRootElementList(t,a,e),this._rootElementList.sort((e,t)=>e.fullPath.localeCompare(t.fullPath))}return this._rootElementList}_fillRootElementList(e=this.nodes[0],a={fullPath:"root",path:"",pathParts:["root"]},i){if(!e)return this._rootElementList;var t=_.unwrap(e.nodeType);if(t!=We[We.Property]){if(t!==We[We.Array])return i&&t===We[We.Object]&&this._rootElementList.push(a),(e.nodes||[]).forEach(e=>{var t=this._getNextPath(a,e.name());this._fillRootElementList(e,t,i)}),this._rootElementList;this._rootElementList.push(a)}}_getNextPath(e,t){var a=e.fullPath?[e.fullPath,t].join("."):t;return{pathParts:e.pathParts.concat(t),fullPath:a,path:t}}}var l,Xe=[{propertyName:"nodes",modelName:"Node",from:He.from,toJsonObject:He.toJsonNodes},{propertyName:"name",modelName:"@Name"},{propertyName:"selected",modelName:"@Selected",from:C.parseBool},{propertyName:"nodeType",modelName:"@NodeType"},{propertyName:"type",modelName:"@Type"}],Ye=[{propertyName:"nodes",modelName:"Node",from:Ge.from,toJsonObject:Ge.toJsonNodes}];class Ke{constructor(e,t){(t=t||new C.ModelSerializer).deserialize(this,e||{})}static from(e,t){return new Ke(e,t)}static toJson(e,t,a){return t.serialize(e,e.getInfo(),a)}getInfo(){return[{propertyName:"password",modelName:"@password",defaultVal:""},{propertyName:"userName",modelName:"@user",defaultVal:""}]}}(k=l=l||{})[k.PathParameter=0]="PathParameter",k[k.QueryParameter=1]="QueryParameter",k[k.Header=2]="Header";class Ze extends C.Disposable{constructor(e,t){super(),this.expression_Prefix="expression:",this.namePlaceholder=()=>Object(C.getLocalization)("Name","AnalyticsCoreStringId.CollectionEditor_Name_Placeholder"),this.valuePlaceholder=()=>Object(C.getLocalization)("Value","AnalyticsCoreStringId.CollectionEditor_Value_Placeholder"),this._editingValue=_.observable(""),this._expression={value:_.observable("")},this.isExpression=_.observable(!1),this.itemsProvider=null,this._parameterTypes=et,(t=t||new C.ModelSerializer).deserialize(this,e),this._initEditingProperties(),this._disposables.push(this.value=_.computed(()=>{var e=this.expression_Prefix+this._expression.value(),t=this._editingValue();return this.isExpression.peek()?e:t}))}static from(e,t){return new Ze(e||{},t)}static toJson(e,t,a){return t.serialize(e,e.getInfo(),a)}_initEditingProperties(){var e=this.value()||"";0===e.indexOf(this.expression_Prefix)?(this.isExpression(!0),this._expression.value(e.substring(this.expression_Prefix.length))):this._editingValue(e)}switchEditors(){var e=!this.isExpression();this.isExpression(e),e?this._expression.value(this._editingValue()?"'"+this._editingValue()+"'":""):this._editingValue("")}getInfo(){return[{propertyName:"name",modelName:"@Name",displayName:"Name",editor:x.editorTemplates.getEditor("text")},{propertyName:"value",modelName:"@Value",displayName:"Value",editor:x.editorTemplates.getEditor("text")},{propertyName:"itemType",modelName:"@ItemType",defaultVal:l[l.PathParameter],alwaysSerialize:!0}]}}var et=[{value:l[l.PathParameter],displayValue:"Path Parameter",localizationId:"AnalyticsCoreStringId.JsonDSWizard_ChooseJsonSourcePage_PathParameter"},{value:l[l.QueryParameter],displayValue:"Query Parameter",localizationId:"AnalyticsCoreStringId.JsonDSWizard_ChooseJsonSourcePage_QueryParameter"},{value:l[l.Header],displayValue:"Header",localizationId:"AnalyticsCoreStringId.JsonDSWizard_ChooseJsonSourcePage_Header"}];class tt extends C.Disposable{constructor(e={},a){function t(e,t){return e&&Array.isArray(e[l[t]])&&e[l[t]]&&(e=e[l[t]]),Object(C.deserializeArray)(e,e=>(e["@ItemType"]||(e["@ItemType"]=l[t]),new Ze(e,a)))}super(),this.sourceType=_.observable(),this.uri=_.observable(),this.json=_.observable(),(a=a||new C.ModelSerializer).deserialize(this,e),this._disposables.push(this.uri.subscribe(e=>{e&&this.sourceType(tt._URIJSONSOURCE_TYPE)})),this._disposables.push(this.json.subscribe(e=>{e&&this.sourceType(tt._CUSTOMJSONSOURCE_TYPE)})),this.queryParameters=t(e.QueryParameters,l.QueryParameter),this.headers=t(e.Headers,l.Header),this.pathParameters=t(e.PathParameters,l.PathParameter)}static from(e,t){return new tt(e||{},t)}static toJson(e,t,a){return t.serialize(e,at,a)}getInfo(){return at}serialize(e=!1){return e?{Source:this.serialize()}:(new C.ModelSerializer).serialize(this)}resetSource(){this.sourceType(""),this.json(""),this.uri("")}}tt._URIJSONSOURCE_TYPE="DevExpress.DataAccess.Json.UriJsonSource",tt._CUSTOMJSONSOURCE_TYPE="DevExpress.DataAccess.Json.CustomJsonSource";var at=[{propertyName:"sourceType",modelName:"@SourceType",defaultVal:""},{propertyName:"json",modelName:"@Json",defaultVal:""},{propertyName:"uri",modelName:"@Uri",defaultVal:""},{propertyName:"authenticationInfo",modelName:"AuthenticationInfo",from:Ke.from,toJsonObject:Ke.toJson},{propertyName:"headers",modelName:"Headers",array:!0},{propertyName:"queryParameters",modelName:"QueryParameters",array:!0},{propertyName:"pathParameters",modelName:"PathParameters",array:!0}],it=(e,t,a=[])=>{var i=T.Deferred();return e.getJsonSchema(t,a).done(e=>{try{var t=JSON.parse(e.jsonSchemaJSON),a=new Ge(t);i.resolve(a)}finally{"pending"===i.state()&&i.reject()}}).fail(e=>{Object(v.ShowMessage)(Object(v.formatUnicorn)(Object(C.getLocalization)("Schema loading failed. {0}","DxDesignerStringId.Error_SchemaLoadingFailed"),Object(v.getErrorMessage)(e))),i.reject()}),i.promise()},rt=it;function ot(e){rt=e}function st(){rt=it}class nt extends C.Disposable{constructor(e,t=new qe){super(),this._requestWrapper=t,this._jsonDataSource=e,this._disposables.push(this._jsonDataSource.source.sourceType.subscribe(()=>{this._jsonSchemaPromise=null})),this.getItems=t=>{var a=T.Deferred();return(this._jsonSchema?T.Deferred().resolve(this._jsonSchema).promise():this.getJsonSchema()).done(e=>{this._jsonSchema=e;e=this.getSchemaByPath(t,e);a.resolve(e)}).fail(a.reject),a.promise()}}reset(){this._jsonSchemaPromise=null}mapToDataMemberContract(e){return T.map(e||[],e=>{return{name:e.name(),displayName:e.displayName||e.name(),isSelected:e.selected(),isList:e.nodes&&0<e.nodes.length,specifics:"table",dragData:{noDragable:!1}}})}getSchemaByPath(t,e){if(t.fullPath){for(var a=e.nodes,i=0;i<t.pathParts.length;i++){var r=(a||[]).filter(e=>e.name()==t.pathParts[i])[0];if(!r)return[];a=r.nodes}return this.mapToDataMemberContract(a)}return this.mapToDataMemberContract(e.nodes)}getJsonSchema(e=[]){return this._jsonSchemaPromise&&"rejected"!==this._jsonSchemaPromise.state()||(this._jsonSchemaPromise=rt(this._requestWrapper,this._jsonDataSource,e)),this._jsonSchemaPromise}}class dt extends C.Disposable{constructor(e,t,a=new qe){super(),(t=t||new C.ModelSerializer).deserialize(this,e),this.jsonSchemaProvider=new nt(this,a),this.source&&this._disposables.push(this.source),this._disposables.push(this.connectionName.subscribe(()=>{this.source.resetSource()}))}getInfo(){return lt}clone(e){e=(e=e||new C.ModelSerializer).serialize(this);return new dt(e)}static from(e,t){return new dt(e,t)}static toJson(e,t,a){return t.serialize(e,lt,a)}getSchema(e=[]){var t=T.Deferred();return this.jsonSchemaProvider.getJsonSchema(e).done(e=>{this.schema=e,t.resolve(e)}).fail(()=>{this.schema=null,t.reject()}),t.promise()}}var lt=[{propertyName:"name",modelName:"@Name"},{propertyName:"connectionName",modelName:"@ConnectionName"},{propertyName:"rootElement",modelName:"@RootElement",defaultVal:"root"},{propertyName:"schema",modelName:"Schema",from:Ge.from,toJsonObject:Ge.toJson},{propertyName:"source",modelName:"Source",from:tt.from,toJsonObject:tt.toJson}],ct=[{propertyName:"closeConnection",modelName:"@CloseConnection",from:C.parseBool},{propertyName:"commandTimeout",modelName:"@DbCommandTimeout",from:e=>{e=parseInt(e);return isNaN(e)&&(e=null),_.observable(e)},defaultVal:null}];class ut{constructor(e,t){this.closeConnection=_.observable(!0),this.commandTimeout=_.observable(null),(t=t||new C.ModelSerializer).deserialize(this,e)}getInfo(){return ct}}var c,u={customSqlQuery:"CustomSqlQuery",tableQuery:"SelectQuery",storedProcQuery:"StoredProcQuery"},pt={fileJsonSource:"FileJsonSource",customJsonSource:"CustomJsonSource",uriJsonSource:"UriJsonSource"};function ht(e){return e&&!e.match(/[~`!"№;%\^:\?*\(\)&\-\+={}\[\]\|\\\/,\.<>'\s]/)}(k=c=c||{})[k.SelectNode=0]="SelectNode",k[k.UnionNode=1]="UnionNode",k[k.SourceNode=2]="SourceNode",k[k.TransformationNode=3]="TransformationNode";var mt=[{type:"custom",validationCallback:e=>ht(e.value),get message(){return Object(C.getLocalization)("Name is required and should be a valid identifier.","AnalyticsCoreStringId.NameIsRequired_Error")}}],gt={propertyName:"value",displayName:"Value",localizationId:"DevExpress.DataAccess.Parameter.Value",editor:x.editorTemplates.getEditor("text")},bt={propertyName:"name",displayName:"Name",localizationId:"DevExpress.DataAccess.Parameter.Name",validationRules:mt,editor:x.editorTemplates.getEditor("text")},ft={propertyName:"type",displayName:"Type",localizationId:"DevExpress.DataAccess.Parameter.Type",modelName:"@Type",editor:x.editorTemplates.getEditor("combobox"),valuesArray:[{value:"System.String",displayValue:"String",localizationId:"AnalyticsCoreStringId.Parameter_Type_String"},{value:"System.DateTime",displayValue:"Date",localizationId:"AnalyticsCoreStringId.Parameter_Type_DateTime"},{value:"System.Int16",displayValue:"Number (16 bit integer)",localizationId:"AnalyticsCoreStringId.Parameter_Type_Int16"},{value:"System.Int32",displayValue:"Number (32 bit integer)",localizationId:"AnalyticsCoreStringId.Parameter_Type_Int32"},{value:"System.Int64",displayValue:"Number (64 bit integer)",localizationId:"AnalyticsCoreStringId.Parameter_Type_Int64"},{value:"System.Single",displayValue:"Number (floating-point)",localizationId:"AnalyticsCoreStringId.Parameter_Type_Float"},{value:"System.Double",displayValue:"Number (double-precision floating-point)",localizationId:"AnalyticsCoreStringId.Parameter_Type_Double"},{value:"System.Decimal",displayValue:"Number (decimal)",localizationId:"AnalyticsCoreStringId.Parameter_Type_Decimal"},{value:"System.Boolean",displayValue:"Boolean",localizationId:"AnalyticsCoreStringId.Parameter_Type_Boolean"},{value:"System.Guid",displayValue:"Guid",localizationId:"AnalyticsCoreStringId.Parameter_Type_Guid"},{value:v.ExpressionType,displayValue:"Expression",localizationId:"DataAccessUIStringId.ParametersColumn_Expression"}]},yt={propertyName:"resultType",displayName:"Result Type",localizationId:"DataAccessWebStringId.QueryBuilder_ResultType",modelName:"@ResultType",editor:x.editorTemplates.getEditor("combobox"),valuesArray:ft.valuesArray.filter(e=>!Object(v.IsDataAccessExpression)(e.value))},St=[{propertyName:"_name",modelName:"@Name"},{propertyName:"_value",modelName:"#text"},gt,{propertyName:"itemType",modelName:"@ItemType"}],xt=[bt,ft,yt].concat(St),vt=[{value:"System.Byte",displayValue:"Non-negative number (8 bit integer)",localizationId:"DataAccessStringId.Type_Byte"},{value:"System.SByte",displayValue:"Number (8 bit integer)",localizationId:"DataAccessStringId.Type_SByte"},{value:"System.UInt32",displayValue:"Non-negative number (32 bit integer)",localizationId:"DataAccessStringId.Type_UInt"},{value:"System.UInt16",displayValue:"Non-negative number (16 bit integer)",localizationId:"DataAccessStringId.Type_UShort"},{value:"System.UInt64",displayValue:"Non-negative number (64 bit integer)",localizationId:"DataAccessStringId.Type_ULong"},{value:"System.Char",displayValue:"Char",localizationId:"DataAccessStringId.Type_Char"},{value:"System.Object",displayValue:"Object",localizationId:"DataAccessStringId.Type_Object"},{value:"System.Byte[]",displayValue:"Byte array",localizationId:"DataAccessStringId.Type_ByteArray"},{value:"System.TimeSpan",displayValue:"Time interval",localizationId:"DataAccessStringId.Type_TimeSpan"}];function _t(t){var e=Object(v.extend)(!0,{},ft),a=[],i=(a.push(ft.valuesArray.filter(e=>e.value===t)[0]||vt.filter(e=>e.value===t)[0]),a.push(ft.valuesArray.filter(e=>Object(v.IsDataAccessExpression)(e.value))[0]),e.valuesArray=a,Object(v.extend)(!0,{},yt));return i.valuesArray=a.slice(0,0),i.disabled=!0,[Object(v.extend)({disabled:!0},bt),e,i].concat(St)}var P=e(3),Ct=Object(P.insertInFunctionDisplay)({String:{CreateTable:[{paramCount:1,text:"CreateTable(, )",displayName:"CreateTable(Column1, ..., ColumnN)",descriptionStringId:"ExpressionEditorStringId.Function_CreateTable"}],FormatString:[{paramCount:1,text:"FormatString(, )",displayName:"FormatString(Format, Value1, ... , ValueN)",descriptionStringId:"ExpressionEditorStringId.Function_FormatString"}]}});function Tt(e,t,a){return Object(v.integerValueConverter)(e,t,a)}function Pt(e,t,a){return Object(v.floatValueConverter)(e,t,a)}class m{constructor(e,t,a,i){this.name=e,this.defaultValue=t,this.realTypeName=i,a&&(this.valueConverter=e=>a(e,t,this.name))}get specifics(){return we.GetSpecific(this.realTypeName||this.name)}}var Nt=()=>{var e=new Date;return e.setHours(0,0,0,0),e};class g extends C.Disposable{constructor(e,t,a=xt){super(),this._serializationsInfo=a,this._valueInfo=_.observable(gt),this._parametersFunctions=Ct,this.isValid=_.observable(!0),(t=t||new C.ModelSerializer).deserialize(this,Object(v.extend)(e,{"@ItemType":"Parameter"})),this._disposables.push(this.name=_.pureComputed({read:()=>this._name(),write:e=>{ht(e)&&this._name(e)}})),this._expressionValue=_.observable({value:this._value,functions:this._parametersFunctions}),this._disposables.push(this.type.subscribe(e=>{Object(v.IsDataAccessExpression)(e)?this.resultType(this._previousResultType):(this.resultType(null),this._previousResultType=e),this._updateValueInfo(e)})),this._previousResultType=Object(v.IsDataAccessExpression)(this.type.peek())?this.resultType():this.type(),this.value=_.pureComputed({read:()=>Object(v.IsDataAccessExpression)(this.type())?this._expressionValue():this._value(),write:e=>{this._value(e)}}),this._updateValueInfo(this.type.peek())}static _getTypeValue(t,e=null){var a=g._typeValues.filter(e=>e.name===t);return 0<a.length?(e&&Object(v.IsDataAccessExpression)(t)&&(a[0].realTypeName=e),a[0]):{name:t,defaultValue:null,specifics:"String",disableEditor:!0}}_getTypeValue(e){return g._getTypeValue(e,this.resultType())}_tryConvertValue(e,t){return g._isValueValid(e)&&(e=(t.valueConverter||(e=>e))(e),g._isValueValid(e))?e:t.defaultValue}static _isValueValid(e){return null!=e&&!isNaN("string"==typeof e?"":e)}getEditorType(e){return Object(v.getEditorType)(e)}_updateValueInfo(e){var e=this._getTypeValue(e),t=this._tryConvertValue(this._value(),e),a=this._expressionValue.peek();this._expressionValue(null),this._value(null),this._valueInfo(Object(v.extend)({},gt,{editor:this.getEditorType(e.name),disabled:!0===e.disableEditor,editorOptions:{onFocusOut:e=>{this.isValid(e.component.option("isValid"))}}})),this._expressionValue(a),this._value(t)}get specifics(){var t=Object(v.IsDataAccessExpression)(this.type.peek())?this.resultType():this.type(),e=g._typeValues.filter(e=>e.name===t);return 0<e.length?e[0].specifics:"string"}getInfo(){var e;return this.type?((e=Object(v.extend)(!0,[],this._serializationsInfo)).splice(e.indexOf(e.filter(e=>"value"===e.propertyName)[0]),1,this._valueInfo()),e):this._serializationsInfo}isPropertyVisible(e){return"resultType"!==e||Object(v.IsDataAccessExpression)(this.type())}}g._typeValues=[new m("System.DateTime",Nt(),e=>{var t;try{t=Object(v.parseDate)(e)}catch(e){t=Nt()}return t}),new m("System.String",""),new m("System.SByte","0",Tt),new m("System.Int16","0",Tt),new m("System.Int32","0",Tt),new m("System.Int64","0",Tt),new m("System.Byte","0",Tt),new m("System.UInt16","0",Tt),new m("System.UInt32","0",Tt),new m("System.UInt64","0",Tt),new m("System.Decimal","0",Pt),new m("System.Double","0",Pt),new m("System.Single","0",Pt),new m("System.Boolean",!1,e=>void 0!==e?"true"===String(e).toLowerCase():e),new m("System.Guid","00000000-0000-0000-0000-000000000000"),new m(v.ExpressionType,"",function(e){var t;return e instanceof Date?(t=e=>(e<10?"0":"")+e,Object(v.formatUnicorn)("#{0}/{1}/{2} {3}:{4}#",t(e.getMonth()+1),t(e.getDate()),e.getFullYear(),t(e.getHours()),t(e.getMinutes()))):(e||"").toString()}),new m("System.Char","")];var Ot=[{propertyName:"type",modelName:"@Type"},{propertyName:"name",modelName:"@Name"},{propertyName:"sqlString",modelName:"Sql",defaultVal:""},{propertyName:"parameters",modelName:"Parameters",array:!0},{propertyName:"itemType",modelName:"@ItemType"}];class wt{constructor(e,t,a){this.parent=t,(a||new C.ModelSerializer).deserialize(this,Object(v.extend)(e,{"@ItemType":"Query"})),this.type=_.pureComputed(()=>u.customSqlQuery),this.parameters=Object(C.deserializeArray)(e.Parameters,e=>new g(e,a))}getInfo(){return Ot}generateName(){return"CustomSqlQuery"}}var Dt=[{propertyName:"masterQuery",modelName:"@Master"},{propertyName:"detailQuery",modelName:"@Detail"},{propertyName:"_customName",modelName:"@Name"},{propertyName:"keyColumns",modelName:"KeyColumns",array:!0,info:[{propertyName:"masterColumn",modelName:"@Master"},{propertyName:"detailColumn",modelName:"@Detail"},{propertyName:"itemType",modelName:"@ItemType"}]},{propertyName:"itemType",modelName:"@ItemType"}];class It extends C.Disposable{constructor(e,t){super(),this.name=_.pureComputed({read:()=>this._customName()||this.masterQuery()+this.detailQuery(),write:e=>{this._customName(e)},deferEvaluation:!0}),(t||new C.ModelSerializer).deserialize(this,Object(v.extend)(e,{"@ItemType":"Relation"})),this._disposables.push(this.name)}dispose(){super.dispose(),this.disposeObservableArray(this.keyColumns)}createKeyColumn(){var e={masterColumn:_.observable(),detailColumn:_.observable(),itemType:"KeyColumn"};this.keyColumns.push(e)}getInfo(){return Dt}}class Et{constructor(e,t){this.name=_.observable(),this.parameteres=_.observable(),this.fromAppConfig=_.observable(!0),(t=t||new C.ModelSerializer).deserialize(this,e)}static from(e,t){return new Et(e,t)}static toJson(e,t,a){return t.serialize(e,kt,a)}getInfo(){return kt}}var kt=[{propertyName:"name",modelName:"@Name"},{propertyName:"parameteres",modelName:"Parameters"},{propertyName:"fromAppConfig",modelName:"@FromAppConfig",defaultVal:!1,from:C.parseBool}],At=[{propertyName:"type",modelName:"@Type"},{propertyName:"name",modelName:"@Name"},{propertyName:"parameters",modelName:"Parameters",array:!0},{propertyName:"_tablesObject",modelName:"Tables",info:[{propertyName:"tables",modelName:"SelectedTables",array:!0,info:[{propertyName:"name",modelName:"@Name"},{propertyName:"alias",modelName:"@Alias"}]}]},{propertyName:"filterString",modelName:"Filter",defaultVal:""},{propertyName:"itemType",modelName:"@ItemType"}];class $t{constructor(e,t,a){this.parent=t,(a||new C.ModelSerializer).deserialize(this,Object(v.extend)(e,{"@ItemType":"Query"})),this.type=_.pureComputed(()=>u.tableQuery),this.parameters=Object(C.deserializeArray)(e.Parameters,e=>new g(e,a))}tables(){return this._tablesObject.tables()}getInfo(){return At}generateName(){return 0<this.tables().length?this.tables()[0].alias()||this.tables()[0].name():"SelectQuery"}}var jt=[{propertyName:"type",modelName:"@Type"},{propertyName:"name",modelName:"@Name"},{propertyName:"procName",modelName:"ProcName"},{propertyName:"parameters",modelName:"Parameters",array:!0},{propertyName:"itemType",modelName:"@ItemType"}];class zt{constructor(e,t,a){this.parent=t,(a||new C.ModelSerializer).deserialize(this,Object(v.extend)(e,{"@ItemType":"Query"})),this.type=_.pureComputed(()=>u.storedProcQuery),this.parameters=Object(C.deserializeArray)(e.Parameters,e=>{var t=e["@Type"];return Object(v.IsDataAccessExpression)(t)&&(t=e["@ResultType"]||t),new g(e,a,_t(t))})}getInfo(){return jt}generateName(){return this.procName()||"Query"}}var Bt=[{propertyName:"name",modelName:"@Name"},{propertyName:"connection",modelName:"Connection",from:Et.from,toJsonObject:Et.toJson},{propertyName:"queries",modelName:"Queries",array:!0},{propertyName:"relations",modelName:"Relations",array:!0},{propertyName:"resultSet",modelName:"ResultSchema",from:Ue.from,toJsonObject:Ue.toJson},{propertyName:"itemType",modelName:"@ItemType"}];class Rt extends C.Disposable{constructor(e,t,a=new qe){super(),(t=t||new C.ModelSerializer).deserialize(this,Object(v.extend)(e,{"@ItemType":"SqlDataSource"}));var i=this._model.Name;i&&(this.name()||this.name(i),delete this._model.Name),this.queries=Object(C.deserializeArray)(e.Queries,e=>this.createQuery(e,t)),this.relations=Object(C.deserializeArray)(e.Relations,e=>new It(e,t)),this.connection&&e.ConnectionOptions&&(this.connection.options=new ut(e.ConnectionOptions,t)),this.dbSchemaProvider=new Le(this.connection,a),this._disposables.push(this.connection.name.subscribe(()=>{this.queries([]),this.relations([]),this.resultSet=null}))}getInfo(){return Bt}createQuery(e,t){if(e["@Type"]===u.customSqlQuery)return new wt(e,this,t);if(e["@Type"]===u.tableQuery)return new $t(e,this,t);if(e["@Type"]===u.storedProcQuery)return new zt(e,this,t);throw new Error("Unknown sql query type.")}}class Mt extends C.Disposable{constructor(){super(...arguments),this.name=_.observable()}setState(e){this.ctor=e.ctor,this.dataMember=e.dataMember,this.selectedType=e.selectedType,this.id=Object(v.guid)().replace(/-/g,""),this.name(e.dataSourceName)}}class qt{constructor(e){e&&(this.name=e.name,this.displayName=e.displayName,this.dataMember=e.dataMember)}}class Lt extends qt{constructor(e){super(e),e&&(this.value=e.value,this.type=e.type,this.resultType=e.resultType)}}class Qt extends qt{constructor(e){super(e),this.parameters=Ie(e.parameters,e=>new Lt(e))}}class Vt extends Qt{constructor(e){super(e),this.disabled=_.observable(!1),this.memberType=e&&e.memberType,this.isStatic=e.isStatic}static empty(){return new Vt({displayName:Vt.entireObject(),name:Vt.entireObject(),parameters:[]})}isEntireObject(){return this.name==Vt.entireObject()&&this.displayName==Vt.entireObject()}isAvailable(){return!this.disabled()}}Vt.entireObject=()=>Object(C.getLocalization)("Entire Object","AnalyticsCoreStringId.ObjectDSWizard_ConfigureParameters_EntireObject");class Wt extends Qt{}class Ft extends qt{constructor(e){super(e),this.ctors=Ie(e.ctors,e=>new Wt(e)),this.members=Ie(e.members,e=>new Vt(e))}updateMembers(t){this.members.forEach(e=>{t?e.disabled(!1):e.disabled(!!e.isEntireObject()||!e.isStatic)})}}var b=new x.EditorTemplates,Ut={propertyName:"name",modelName:"@Name",displayName:"Name",localizationId:"DevExpress.DataAccess.Sql.SqlQuery.Name",disabled:!0,editor:b.getEditor("text")},Ht={propertyName:"alias",modelName:"@Alias",displayName:"Alias",localizationId:"DataAccessUIStringId.QueryBuilderColumns_Alias",defaultVal:"",editor:b.getEditor("text")},Jt={propertyName:"text",modelName:"@Text",displayName:"Text",editor:b.getEditor("text")},Gt={propertyName:"selected",displayName:"Output",editor:b.getEditor("bool"),localizationId:"DataAccessUIStringId.QueryBuilderColumns_Output"},Xt={propertyName:"size",modelName:"@Size",defaultVal:"100,125",from:h.Size.fromString},Yt={propertyName:"location",modelName:"@Location",from:h.Point.fromString},Kt=[Xt,Yt],Zt=[Ut].concat(Kt),ea=[{propertyName:"queryType",modelName:"@QueryType"},Ut,Ht,{propertyName:"sourceName",modelName:"@SourceName"}];class ta extends C.Disposable{constructor(e,t,a,i){super(),this._sourcePath=i,e["@SourceName"]=e["@SourceName"]||a,(t||new C.ModelSerializer).deserialize(this,e),this._disposables.push(this.queryType=_.pureComputed(()=>c[c.SourceNode]))}getInfo(){return ea}getPath(){return this._sourcePath||(this.name()?this.name()===this.sourceName()?this.name():this.sourceName().slice(0,this.sourceName().indexOf(this.name())-1)+"."+this.name():void 0)}}var f,aa=[{propertyName:"table",modelName:"@NodeAlias"},Ut,Ht,{propertyName:"expressionType",modelName:"@ExpressionType"},{propertyName:"columnExpression",modelName:"@ColumnExpression"}];(k=f=f||{})[k.SelectColumnExpression=0]="SelectColumnExpression",k[k.SelectExpression=1]="SelectExpression",k[k.SelectAllColumnsExpression=2]="SelectAllColumnsExpression",k[k.SelectAllNodeColumnsExpression=3]="SelectAllNodeColumnsExpression",k[k.SelectRowCountExpression=4]="SelectRowCountExpression";class ia{constructor(e,t){(t=t||new C.ModelSerializer).deserialize(this,Object(v.extend)(e,{"@ItemType":"Expression"}))}getInfo(){return aa}}var ra=[{propertyName:"name",modelName:"@Name"},{propertyName:"queries",modelName:"Queries",array:!0},{propertyName:"relations",modelName:"Relations",array:!0},{propertyName:"sources",modelName:"Sources",array:!0},{modelName:"SerializableSourceMap",propertyName:"serializableSourceMap",array:!0,info:[{modelName:"@DataSource",propertyName:"dataSource",link:!0},{modelName:"@Name",propertyName:"name"}]}],oa=[{propertyName:"sourceName",modelName:"@SourceName"},{propertyName:"dataMember",modelName:"@DataMember"}];class sa extends C.Disposable{constructor(e,t,a,i){super(),t=t||new C.ModelSerializer,a&&1<(a=a.split(".")).length&&(e["@DataMember"]=a.slice(1).join("_")),i&&(e["@SourceName"]=i),t.deserialize(this,Object(v.extend)(e,{"@ItemType":"Source"}))}getInfo(){return oa}getDataSourceName(){return this.hasDataMember()?this.sourceName().slice(0,this.sourceName().lastIndexOf(this.dataMember())-1):this.sourceName()}getPath(){return this.getDataSourceName()+(this.hasDataMember()?"."+this.dataMember():"")}hasDataMember(){return this.dataMember()&&0!==this.sourceName().lastIndexOf(this.dataMember())}}var na=e(7),da=e(8),la=new C.ControlsFactory;class ca extends h.ElementViewModel{constructor(e,t,a){super(e,t,a)}getControlFactory(){return la}}class ua extends _e{constructor(e,t,a){super(Object(v.extend)(e,{"@ControlType":"JoinCondition","@ItemType":"KeyColumn"}),t,a),this.parentColumn=_.pureComputed(()=>t.parentTable().getColumn(this.parentColumnName())),this.nestedColumn=_.pureComputed(()=>t.nestedTable().getColumn(this.nestedColumnName())),this.joinType=t.joinType,this.left=_.pureComputed(()=>t.parentTableName()+"."+this.parentColumnName()),this.right=_.pureComputed(()=>t.nestedTableName()+"."+this.nestedColumnName()),this._disposables.push(_.computed(()=>{var e;this.parentColumn()&&this.nestedColumn()&&(e=te(this.parentColumn(),this.nestedColumn()),this.startPoint().connectingPoint(e.start),this.endPoint().connectingPoint(e.end))}))}getControlFactory(){return la}preInitProperties(){this.startPoint=_.observable(),this.endPoint=_.observable()}}var pa=[{propertyName:"joinType",modelName:"@Type"},{propertyName:"parentTableName",modelName:"@Parent"},{propertyName:"nestedTableName",modelName:"@Nested"},{propertyName:"conditions",modelName:"KeyColumns",defaultVal:[],array:!0},{propertyName:"itemType",modelName:"@itemType"}];class ha extends ca{constructor(e,t,a){super(Object(v.extend)(e,{"@ControlType":"Relation","@ItemType":"Relation"}),t,a),this.parentTable=_.observable(t.getTable(this.parentTableName.peek())),this.nestedTable=_.observable(t.getTable(this.nestedTableName.peek())),this.parentTableName=_.pureComputed(()=>this.parentTable().actualName()),this.nestedTableName=_.pureComputed(()=>this.nestedTable().actualName()),this.conditions=Object(C.deserializeArray)(e.KeyColumns,e=>new ua(e,this,a))}_getConditionNumber(){for(var e=this.conditions().length+1,t=this.conditions().map(e=>e.seriesNumber()),a=0;a<this.conditions().length;a++)if(-1===t.indexOf(a+1)){e=a+1;break}return e}getInfo(){return pa}addChild(e){this.conditions&&-1===this.conditions.indexOf(e)&&(e.seriesNumber(this._getConditionNumber()),e.parentModel(this),this.conditions.push(e))}removeChild(e){e=this.conditions().indexOf(e);-1<e&&this.conditions.splice(e,1),0===this.conditions().length&&this.parentModel().removeChild(this)}}var ma=[{propertyName:"condition",modelName:"@Condition",defaultVal:""},{propertyName:"joinType",modelName:"@JoinType",defaultVal:"Inner"},{propertyName:"query",modelName:"Query"}];class ga{constructor(e,t){(t=t||new C.ModelSerializer).deserialize(this,Object(v.extend)(e,{"@ItemType":"JoinElement"})),e.Query&&(this.query=_.observable(new ta(e.Query)))}static deserializeRelationModel(e,t){var i=t.parentTableName(),r=t.nestedTableName(),o=[],t=(t.conditions().forEach(e=>{var t="["+r+"."+e.nestedColumnName()+"]",a="["+i+"."+e.parentColumnName()+"]",e=da.operatorTokens[e.operator()];o.push(t+" "+e+" "+a)}),new ga({"@JoinType":t.joinType(),"@Condition":o.join(" And ")}));return t.query(e),t}_parsePath(e){return"["===e[0]&&"]"===e[e.length-1]?da.CriteriaOperatorStateMachine.parse(e).propertyName:e}_createCondition(e,t,a){return{"@ControlType":"JoinCondition","@ItemType":"KeyColumn","@Operator":a,"@Nested":t,"@Parent":e}}_conditionBinary(e){var t=this._parsePath(e.leftPart.propertyName),a=this._parsePath(e.rightPart.propertyName),e=na.BinaryOperatorType[e.operatorType];return this._createCondition(a.split(".")[1],t.split(".")[1],e)}createRelationModel(e){for(var t=da.CriteriaOperatorStateMachine.parse(this.condition()),a=[],t=(t instanceof na.GroupOperator?t.operands.forEach(e=>{e instanceof na.BinaryOperator&&a.push(e)}):t instanceof na.BinaryOperator&&a.push(t),this._parsePath(a[0].rightPart.propertyName).split(".")[0]),i=this._parsePath(a[0].leftPart.propertyName).split(".")[0],r={},o=0;o<a.length;o++)r["Item"+(o+1)]=this._conditionBinary(a[o]);return new ha({"@Parent":t,"@Nested":i,"@Type":this.joinType(),KeyColumns:r},e,new C.ModelSerializer)}getInfo(){return ma}}var ba=[{propertyName:"queryType",modelName:"@QueryType"},{propertyName:"alias",modelName:"@Alias"},{propertyName:"expressions",modelName:"Expressions",array:!0},{propertyName:"subNodes",modelName:"SubNodes",array:!0},{propertyName:"root",modelName:"Root"},{propertyName:"itemType",modelName:"@ItemType"}];class fa extends C.Disposable{constructor(e,t,a){super(),this._path=a,this.init(e,t,a)}get sources(){return _.observableArray([this.root()].concat(this.subNodes().map(e=>e.query())).map(e=>new sa({},new C.ModelSerializer,e.getPath(),e.sourceName())))}getInfo(){return ba}generateName(){return this.root()?this.root().alias():"SelectQuery"}init(e,t,a){(t||new C.ModelSerializer).deserialize(this,Object(v.extend)(e,{"@ItemType":"Query"})),this._disposables.push(this.queryType=_.pureComputed(()=>c[c.SelectNode])),this.expressions=Object(C.deserializeArray)(e.Expressions,e=>new ia(e,t)),this.subNodes=Object(C.deserializeArray)(e.SubNodes,e=>new ga(e,t)),e.Root&&(this.root=_.observable(new ta(e.Root,t,this.alias(),a)))}}var ya=[{propertyName:"queryType",modelName:"@QueryType"},{propertyName:"alias",modelName:"@Alias"},{propertyName:"transformationRules",modelName:"TransformationRules",array:!0},{propertyName:"root",modelName:"Root"},{propertyName:"itemType",modelName:"@ItemType"}],Sa=[{propertyName:"name",modelName:"@Name"},{propertyName:"alias",modelName:"@Alias"},{propertyName:"unfold",modelName:"@Unfold"},{propertyName:"flatten",modelName:"@Flatten"},{propertyName:"itemType",modelName:"@ItemType"}];class xa extends C.Disposable{constructor(e,t){super(),(t||new C.ModelSerializer).deserialize(this,Object(v.extend)(e,{"@ItemType":"Query"})),this._disposables.push(this.queryType=_.pureComputed(()=>c[c.TransformationNode])),this.transformationRules=Object(C.deserializeArray)(e.TransformationRules,e=>new va(e,t)),e.Root&&(this.root=_.observable(new ta(e.Root,t)))}get sources(){return _.observableArray([new sa({},new C.ModelSerializer,this.root().getPath(),this.root().sourceName())])}getInfo(){return ya}generateName(){return this.root()&&this.root().sourceName().split("_").pop()}}class va{constructor(e,t){(t||new C.ModelSerializer).deserialize(this,Object(v.extend)(e,{"@ItemType":"TransformationRule"}))}getInfo(){return Sa}}class _a extends C.Disposable{constructor(e,t,a){super(),this.dataSources=t,this._serializer=a,this.sources=_.observableArray(),this._serializer=a||new C.ModelSerializer}_dataSourceName(e){var t;return(null==(t=null==e?void 0:e.data)?void 0:t.name())||(null==e?void 0:e.name)}getQueryNameFromPath(e){var t=e.split("."),e=this.dataSources().filter(e=>e.ref==t[0]||e.id==t[0])[0];return t[0]=this._dataSourceName(e)||t[0],t.join("_")}getPathFromQueryName(e){for(var t of this.sources()){var a,i;if(t.sourceName()===e)return t=t.getPath().split("."),i=t.shift(),a=this.dataSources().filter(e=>this._dataSourceName(e)==i)[0],(i=a&&(a.ref||a.id)||i)+(0<t.length?"."+t.join("."):"")}}createQuery(e,t){return e["@QueryType"]===c[c.SelectNode]?new fa(e,this._serializer,(t||this).getPathFromQueryName(e.Root&&e.Root["@SourceName"])):null}addSource(t,e){t instanceof sa?this.sources().filter(e=>e.sourceName()==t.sourceName())[0]||this.sources.push(t):this.sources().filter(e=>e.sourceName()==t)[0]||this.sources.push(new sa({},this._serializer,e,t))}removeSource(t){var e=Object(v.findFirstItemMatchesCondition)(this.sources(),e=>e.sourceName()===t);this.queries().some(e=>e.expressions().some(e=>e.table()===t))||this.sources.remove(e)}addSelectQuery(e,t){var a=this.getQueryNameFromPath(e),i=this.queries().filter(e=>e.alias()===a)[0];i||(i=new fa({"@Alias":a,Root:{}},this._serializer,e),this.queries.push(i),this.addSource(a,e)),t&&!i.expressions().filter(e=>e.name()==t)[0]&&(e=new ia({"@NodeAlias":a,"@Name":t,"@ExpressionType":f[f.SelectColumnExpression]},this._serializer),i.expressions.push(e))}removeQuery(t){var e=this.queries().filter(e=>e.alias()===t)[0],e=(this.queries.remove(e),this.sources().filter(e=>e.sourceName()==t)[0]);e&&this.sources.remove(e)}removeExpression(t,e){var a=this.getQueryNameFromPath(e),e=this.queries().filter(e=>e.alias()===a)[0],i=e.expressions().filter(e=>e.name()==t)[0];e.expressions.remove(i),0==e.expressions().length&&this.removeQuery(a)}dispose(){super.dispose(),this.disposeObservableArray(this.sources),this.disposeObservableArray(this.queries)}}var Ca,Ta=[{propertyName:"queryType",modelName:"@QueryType"},{propertyName:"unionType",modelName:"@UnionType"},{propertyName:"alias",modelName:"@Alias"},{propertyName:"queries",modelName:"UnionElements",array:!0}];(k=Ca=Ca||{})[k.Union=0]="Union",k[k.UnionAll=1]="UnionAll";class Pa extends _a{constructor(e,t,a){super(e,t,a),(a||new C.ModelSerializer).deserialize(this,Object(v.extend)(e,{"@ItemType":"Query"})),this._disposables.push(this.queryType=_.pureComputed(()=>c[c.UnionNode])),this.queries=Object(C.deserializeArray)(e.UnionElements,e=>this.createQuery(e))}getInfo(){return Ta}generateName(){return this.queries()[0]&&this.queries()[0].alias().split("_").pop()}}var Na=[{propertyName:"masterColumn",modelName:"@Parent"},{propertyName:"detailColumn",modelName:"@Nested"},{propertyName:"itemType",modelName:"@ItemType"}],Oa=[{propertyName:"masterQuery",modelName:"@MasterQueryName"},{propertyName:"detailQuery",modelName:"@DetailQueryName"},{propertyName:"_customName",modelName:"@RelationName"},{propertyName:"keyColumns",modelName:"KeyColumns",array:!0,info:Na},{propertyName:"itemType",modelName:"@ItemType"}];class wa extends It{static create(e){var t=new C.ModelSerializer;return(e=new wa(t.serialize(e),t)).keyColumns().forEach(e=>e.getInfo=()=>Na),e}constructor(e,t){super(e,t),this.getInfo=()=>Oa,e["@MasterQueryName"]&&e["@DetailQueryName"]&&(t||new C.ModelSerializer).deserialize(this,Object(v.extend)(e,{"@ItemType":"Relation"}))}}class Da extends C.Disposable{constructor(e,t){super(),this.dataSources=_.observableArray([]),this.serializer=t||new C.ModelSerializer,e&&(this.dataSource=e,this.dataSources(this._currentDataSources))}get _currentDataSources(){var e=[];return this.dataSource&&this.dataSource.serializableSourceMap().reduce((e,t)=>(-1===e.indexOf(t.dataSource())&&e.push(t.dataSource()),e),e),e}_collectDependentDataSources(t,a){t.serializableSourceMap&&t.serializableSourceMap().forEach(e=>this._collectDependentDataSources(e.dataSource(),a)),a.filter(e=>_.unwrap(e.name)===_.unwrap(t.name))[0]||a.push(t)}dispose(){this.dataSource=null,this.dataSources=null}getInfo(){return[{propertyName:"dataSources",modelName:"dataSources",array:!0},{propertyName:"dataSource",modelName:"dataSource"}]}collectDependentDataSources(){var t=[];return this._currentDataSources.forEach(e=>this._collectDependentDataSources(e,t)),t}serialize(){var e=new Da(null),t=(e.dataSource=this.dataSource,e.dataSources(this.collectDependentDataSources()),this.serializer.serialize(e));return e.dispose(),t}getSerializableFederationDataSourceInfo(){var t=this.serialize();return{dataSource:JSON.stringify(t.dataSource),dataSources:Object.keys(t.dataSources).map(e=>JSON.stringify(t.dataSources[e]))}}}class Ia extends C.Disposable{constructor(e){super(),this._rootItems=[],this.getItems=e.getItems}getDbSchema(){var t=T.Deferred();return this._rootItems.length?t.resolve(this._rootItems):this.getItems(new C.PathRequest("")).done(e=>{t.resolve(e)}),t.promise()}getDbTable(t,e){var a=T.Deferred();return this.getItems(new C.PathRequest(e)).done(e=>{e=e.map(e=>({Name:e.displayName||e.name}));a.resolve(new Ee({Name:t,columns:e}))}),a.promise()}dispose(){super.dispose(),this.getItems=null}}class Ea extends _a{constructor(e,t,a,i){super(e,t,i),this.dataSources=t,this.fielListProvider=a,this.serializableSourceMap=_.observableArray(),this._serializer.deserialize(this,Object(v.extend)(e,{"@ItemType":"FederationDataSource"})),this.sources=Object(C.deserializeArray)(e.Sources,e=>new sa(e,i)),this.queries=Object(C.deserializeArray)(e.Queries,e=>this.createQuery(e)),this.relations=Object(C.deserializeArray)(e.Relations,e=>new wa(e,this._serializer)),a&&this._disposables.push(this.dbSchemaProvider=new Ia(this.fielListProvider)),this.updateSerializableModel()}getInfo(){return ra}getSerializableModel(){return this._serializableModel}createQuery(e){var t=super.createQuery(e);if(!t){if(e["@QueryType"]===c[c.UnionNode])return new Pa(e,this.dataSources,this._serializer);if(e["@QueryType"]===c[c.TransformationNode])return new xa(e,this._serializer)}return t}updateSerializableModel(){this.serializableSourceMap=_.observableArray(),this.sources().forEach(e=>{var t=e.getDataSourceName();t&&this.serializableSourceMap().push({name:_.observable(e.sourceName()),dataSource:_.observable(this.dataSources().filter(e=>this._dataSourceName(e)===t)[0].data)})}),this._serializableModel=new Da(this,this._serializer)}dispose(){super.dispose(),this.disposeObservableArray(this.relations),this._serializableModel.dispose()}get dependentDataSources(){return this.getSerializableModel().getSerializableFederationDataSourceInfo().dataSources}}function ka(e,t,a="name"){var i=(t[a]()||t.generateName()).replace(".","_");return Object(v.findFirstItemMatchesCondition)(e,e=>e[a]()===i)?Object(v.getUniqueNameForNamedObjectsArray)(e,i+"_"):i}var y,S={ChoosePredefinedDataSourcePage:"choosePredefinedDataSourcePage",ChooseDataSourceTypePage:"chooseDataSourceTypePage",ConfigureMasterDetailRelationshipsPage:"configureMasterDetailRelationshipsPage"},N={ChooseConnectionPage:"chooseSqlConnectionPage",ConfigureQueryPage:"configureSqlQueryPage",ConfigureParametersPage:"configureSqlParametersPage",MultiQueryConfigurePage:"multiSqlQueryConfigurePage",MultiQueryConfigureParametersPage:"multiSqlQueryConfigureParametersPage",FederatedQueryConfigurePage:"federatedQueryConfigurePage"},Aa={FederatedQueryConfigurePage:"federatedQueryConfigurePage",FederatedMasterDetailRelationshipsPage:"federatedMasterDetailRelationshipsPage"},O={ChooseJsonSourcePage:"chooseJsonSourcePage",ChooseJsonSchemaPage:"chooseJsonSchemaPage",ChooseConnectionPage:"chooseJsonConnectionPage",SpecifyJsonConnectionPage:"specifyJsonConnectionPage"},$a={ChooseTypesPage:"chooseObjectDataSourceTypesPage",ChooseDataMembersPage:"chooseObjectDataSourceDataMembersPage",ConfigureParametersPage:"configureObjectDataSourceParametersPage"},w={ChooseDataSourceTypePage:S.ChooseDataSourceTypePage,SpecifySqlDataSourceSettingsPage:"specifySqlDataSourceSettingsPage",SpecifyJsonDataSourceSettingsPage:"specifyJsonDataSourceSettingsPage",SpecifyObjectDataSourceSettingsPage:"specifyObjectDataSourceSettingsPage",SpecifyFederationDataSourceSettingsPage:"specifyFederationDataSourceSettingsPage",SelectDataSourcePage:"selectDataSourcePage"},D={SpecifyJsonConnectionPage:O.SpecifyJsonConnectionPage,ChooseJsonSchemaPage:O.ChooseJsonSchemaPage,ChooseJsonSourcePage:O.ChooseJsonSourcePage,ChooseSqlConnectionPage:N.ChooseConnectionPage,ConfigureFederatedQueriesPage:Aa.FederatedQueryConfigurePage,ConfigureFederatedMasterDetailRelationshipsPage:Aa.FederatedMasterDetailRelationshipsPage,ConfigureQueryPage:N.MultiQueryConfigurePage,ConfigureQueryParametersPage:N.MultiQueryConfigureParametersPage,ConfigureMasterDetailRelationshipsPage:S.ConfigureMasterDetailRelationshipsPage};const ja="__loadingState",za="__nextAction";class I extends C.Disposable{constructor(){super(...arguments),this.changeAlways=!1,this._onChange=()=>{}}dispose(){super.dispose(),this._onChange=()=>{}}commit(){return T.Deferred().resolve().promise()}onChange(e){this._onChange=e}initialize(e,t){return T.Deferred().resolve().promise()}canNext(){return!0}canFinish(){return!1}}(k=y=y||{})[k.NoData=0]="NoData",k[k.Sql=1]="Sql",k[k.Json=2]="Json",k[k.Object=3]="Object",k[k.Federation=4]="Federation";class Ba{constructor(e,t,a,i,r){this.text=Object(C.getLocalization)(e,t),this.imageClassName=a,this.imageTemplateName=i,this.type=r}}class Ra extends I{constructor(e){super(),this._dataSourceTypeOptions=e,this._itemClick=e=>{this.selectedItem(e)},this._IsSelected=e=>this.selectedItem().type===e.type,this.selectedItem=_.observable(),this.typeItems=this._createTypeItems(),this._disposables.push(this.selectedItem.subscribe(()=>this._onChange())),this._extendCssClass=T.noop}canNext(){return null!=this.selectedItem()}canFinish(){return!1}_goToNextPage(){this[za]&&this[za]()}commit(){return T.Deferred().resolve({dataSourceType:this.selectedItem().type}).promise()}_createTypeItems(){var e=[];return this._dataSourceTypeOptions.sqlDataSourceAvailable&&e.push(new Ba("Database","DataAccessUIStringId.DSTypeSql","sqldatasource","dxrd-svg-wizard-SqlDataSource",y.Sql)),this._dataSourceTypeOptions.jsonDataSourceAvailable&&e.push(new Ba("JSON","DataAccessUIStringId.DSTypeJson","jsondatasource","dxrd-svg-wizard-JsonDataSource",y.Json)),this._dataSourceTypeOptions.objectDataSourceAvailable&&e.push(new Ba("Object","DataAccessUIStringId.DSTypeObject","objectdatasource","dxrd-svg-wizard-ObjectDataSource",y.Object)),this._dataSourceTypeOptions.federationDataSourceAvailable&&e.push(new Ba("Data Federation","DataAccessUIStringId.DSTypeFederation","federationdatasource","dxrd-svg-wizard-FederationDataSource",y.Federation)),e}initialize(e){var t;return this.typeItems&&0!==this.typeItems.length?(t=void 0!==e.dataSourceType?e.dataSourceType:this.typeItems[0].type,this.selectedItem(Object(v.findFirstItemMatchesCondition)(this.typeItems,e=>e.type===t))):this.selectedItem(null),T.Deferred().resolve().promise()}}function Ma(e,t){e.registerMetadata(S.ChooseDataSourceTypePage,{setState:(e,t)=>{t.dataSourceType=e.dataSourceType},getState:e=>e,resetState:(e,t)=>{e.dataSourceType=t.dataSourceType},create:()=>new Ra(t),description:Object(C.getLocalization)("Select the data source type.","DataAccessUIStringId.WizardPageChooseDSType"),template:"dxrd-page-choose-datasource-type"})}class qa{constructor(e,a,t){this.sqlDataSourceJSON=e,this.customQueries=[],this.sqlDataSource=new Rt(e?JSON.parse(e):{},void 0,t),a?this.sqlDataSource.queries().some((e,t)=>e.name()===a&&(this._queryIndex=t,!0)):this._queryIndex=this.sqlDataSource.queries().length}get sqlQuery(){return this.sqlDataSource.queries()[this._queryIndex]}set sqlQuery(e){e&&(e.parent=this.sqlDataSource),this.sqlDataSource.queries()[this._queryIndex]=e}saveCustomQueries(){var t=new C.ModelSerializer;return 0<this.customQueries.length&&this.customQueries.map(e=>JSON.stringify(t.serialize(e)))}save(){return JSON.stringify((new C.ModelSerializer).serialize(this.sqlDataSource))}}var E,La=(e,t,a)=>{var i=new qa(e.sqlDataSourceJSON,e.queryName,t),r=(e.name&&i.sqlDataSource.connection.name(e.name),new C.ModelSerializer);return e.customQueries&&0<e.customQueries.length&&(i.customQueries=e.customQueries.map(e=>i.sqlDataSource.createQuery(JSON.parse(e),r)),i.sqlDataSource.queries.push(...i.customQueries)),e.relations&&0<e.relations.length&&i.sqlDataSource.relations.push(...e.relations.map(e=>new It(JSON.parse(e),r))),i.sqlDataSource.id=a||Object(v.guid)().replace(/-/g,""),i},Qa=La,Va=e=>{Qa=e},Wa=()=>{Qa=La},Fa=(e,t,a)=>{t=new Ea(JSON.parse(e.federationDataSourceJSON),t);return a&&(t.id=a),e.relations&&0<e.relations.length&&t.relations.push(...e.relations.map(e=>new wa(JSON.parse(e),new C.ModelSerializer))),t},Ua=(e,t,a)=>{t=new dt({Source:e.jsonSource&&JSON.parse(e.jsonSource)||{},Schema:e.jsonScheme&&JSON.parse(e.jsonScheme)||{},"@RootElement":e.rootElement||""},void 0,t);return e.connectionName&&t.connectionName(e.connectionName),e.dataSourceName&&t.name(e.dataSourceName),t.id=a||Object(v.guid)().replace(/-/g,""),t},Ha=Ua;function Ja(e){Ha=e}function Ga(){Ha=Ua}function Xa(e,t,a){var i=new Mt;return i.setState(e),a&&(i.id=a),i}function Ya(e={},t={jsonSource:""},a={},i={}){return{dataSourceType:y.Sql,jsonDataSourceWizard:t,sqlDataSourceWizard:e,objectDataSourceWizard:a,federationDataSourceWizard:i,dataSourceId:Object(v.guid)().replace(/-/g,"")}}class Ka extends C.Disposable{constructor(e,t,a,i){super(),this.pageId=e,this.page=t,this.template=a,this.description=i,this._isInitialized=!1,this._initDef=null,this.isChanged=!0,t.onChange&&(this.onChange=e=>t.onChange(e))}dispose(){this.onChange=null,this[ja]=null,this.page.dispose(),this._initDef&&this._initDef.reject(),this._initDef=null}resetCommitedState(){this._lastCommitedState=null}commit(){return this.page.commit().done(e=>{this.isChanged=JSON.stringify(this._lastCommitedState)!==JSON.stringify(e),this._lastCommitedState=e})}initialize(e,t=!1,a=!1){return this._initDef&&this._initDef.reject(),this._initDef=T.Deferred(),!this._isInitialized||t?(this._isInitialized=!0,this.page.initialize(e,a).fail(()=>{this._isInitialized=!1,this._initDef&&this._initDef.reject()}).done(e=>{this._initDef&&this._initDef.resolve(e)})):this._initDef.resolve(),this._initDef.promise()}}class Za extends I{constructor(e,t){super(),this._getSqlConnectionsCallback=t,this._connectionStrings=_.observableArray([]),this._selectedConnectionString=_.observableArray([]),this._connectionStrings=e,this._disposables.push(this._selectedConnectionString.subscribe(()=>this._onChange()))}initialize(t){var a,e,i=e=>{1===e.length?this._selectedConnectionString([e[0]]):(e=Object(v.getFirstItemByPropertyValue)(e,"name",t.name)||e[0],this._selectedConnectionString(e?[e]:[]))};return(this._getSqlConnectionsCallback?(a=T.Deferred(),this._getSqlConnectionsCallback().done(e=>{this._connectionStrings(e),i(e),a.resolve(e)}).fail(()=>{a.reject()}),a):(e=this._connectionStrings(),i(e),T.Deferred().resolve())).promise()}canNext(){return 0!==this._selectedConnectionString().length}commit(){var e=T.Deferred();return this._selectedConnectionString()[0]?e.resolve({name:this._selectedConnectionString()[0].name}):e.resolve(),e.promise()}}function ei(e,t,a){e.registerMetadata(N.ChooseConnectionPage,{create:()=>new Za(t,a),setState:(e,t)=>{t.name=e.name},getState:e=>e.sqlDataSourceWizard,resetState:(e,t)=>{e.name=t.name},template:"dxrd-page-connectionstring",description:Object(v.localizeWithUpdateLocalizationMethod)("Choose a data connection")||Object(C.getLocalization)("Choose a data connection.","AnalyticsCoreStringId.SqlDSWizard_PageChooseConnection")})}class ti extends C.Disposable{constructor(e,t){super(),this._parameter=e,this._itemsProvider=t,this.type=_.observable(""),this.type(this._parameter.type);e=g._getTypeValue(this._parameter.resultType);this._initGetInfo(e),(new C.ModelSerializer).deserialize(this,{}),this._subscribeProperties(),this._afterInitialize()}switchPropertyType(){this.isExpression()?(this.type(this._parameter.resultType),this._parameter.value=this.value()):(this.type(v.ExpressionType),this._parameter.value=this.expression.value())}isExpression(){return Object(v.IsDataAccessExpression)(this.type())}_generateInfo(e,t="value"){return Object(v.extend)({},{displayName:this._parameter.displayName,propertyName:t,modelName:t,editorOptions:{}},e)}_initGetInfo(t){var e=[this._generateInfo({editor:Object(v.getEditorType)(this._parameter.resultType),from:e=>_.observable((t.valueConverter||(e=>e))(e)),defaultVal:!this.isExpression()&&this._parameter.value||t.defaultValue}),this._generateInfo({editor:{header:"dx-objectdatasource-expression-popup"},from:e=>({value:_.observable(e),itemsProvider:this._itemsProvider}),defaultVal:this.isExpression()&&this._parameter.value||""},"expression")];this._disposables.push({dispose:()=>this.getInfo=void 0}),this.getInfo=()=>e}_isDateTimeParamerterType(){return"System.DateTime"===this._parameter.resultType}_patchOriginalParameterValue(e){e&&this._isDateTimeParamerterType()&&e instanceof Date?this._parameter.value=Object(C.serializeDate)(e):this._parameter.value=e}_afterInitialize(){!this.isExpression()&&this._isDateTimeParamerterType()&&this._patchOriginalParameterValue(this.value())}_subscribeProperties(){this._disposables.push(this.type.subscribe(e=>{this._parameter.type=e}),this.expression.value.subscribe(e=>{this.isExpression()&&this._patchOriginalParameterValue(e)}),this.value.subscribe(e=>{this.isExpression()||this._patchOriginalParameterValue(e)}))}isPropertyVisible(e){return this.isExpression()?"expression"===e:"value"===e}}class ai{constructor(e){this._editor=e,this.imageTemplateName="dx-objectdatasource-expression"}_doWithModel(e){var t=this._editor._model();if(t instanceof ti)return e(t)}switchEditors(){this._doWithModel(e=>e.switchPropertyType())}isExpression(){return this._doWithModel(e=>e.isExpression())}}class ii extends x.ObjectProperties{constructor(e){super(_.observable(e)),this.createEditorAddOn=e=>{return{data:new ai(e),templateName:"dx-wizard-menu-box-editorswitch"}}}}class ri extends C.Disposable{constructor(e,a){super(),this.displayName=e.displayName,this._grids=e.parameters.map(e=>{var e=new ti(e,a),t=new ii(e);return this._disposables.push(e),this._disposables.push(t),t})}}class oi extends C.Disposable{constructor(e){super(),this._itemsProvider=e,this._ctorParametersObject=_.observable(),this._dataMemberParametersObject=_.observable(),this.hasParameters=()=>this._dataMemberParametersObject()||this._ctorParametersObject()}_updateParameters(e,t){this[e]()&&this[e]().dispose(),t&&0<t.parameters.length?this[e](new ri(t,this._itemsProvider)):this[e](null)}updateCtorParameters(e){this._updateParameters("_ctorParametersObject",e)}updateMethodParameters(e){this._updateParameters("_dataMemberParametersObject",e)}}class si extends oi{constructor(e,t,a){super(a),this._disposables.push(e.subscribe(e=>{this.updateCtorParameters(e)})),this._disposables.push(t.subscribe(e=>{this.updateMethodParameters(e[0])}))}}class ni extends I{constructor(e){super(),this._objectDataSource=new Mt,this._disposables.push(this._chooseObjectParameters=new oi(e))}canNext(){return!1}canFinish(){return!0}commit(){return T.Deferred().resolve({selectedType:this._objectDataSource.selectedType,ctor:this._objectDataSource.ctor,dataMember:this._objectDataSource.dataMember,dataSourceName:this._objectDataSource.name()}).promise()}initialize(e){return this._objectDataSource.setState(e),this._chooseObjectParameters.updateCtorParameters(this._objectDataSource.ctor),this._chooseObjectParameters.updateMethodParameters(this._objectDataSource.dataMember),T.Deferred().resolve().promise()}}function di(e,t){e.registerMetadata($a.ConfigureParametersPage,{setState:(e,t)=>{t.ctor=e.ctor,t.dataMember=e.dataMember,t.selectedType=e.selectedType},getState:e=>e.objectDataSourceWizard,resetState:(e,t)=>{e.dataMember=t.dataMember},create:()=>new ni(t&&t()),description:Object(C.getLocalization)("Configure constructor parameters and/or method parameters.","AnalyticsCoreStringId.ObjectDSWizard_ConfigureParameters_Description"),template:"dx-objectdatasource-configureparameters-page"})}class li{constructor(e){e=Ie(e,e=>new Ft(e));this.types=e.sort((e,t)=>e.displayName.localeCompare(t.displayName))}}function ci(e,t){var a=T.Deferred();return e.getObjectTypeDescriptions(t).done(e=>{try{var t=new li(e.objectDataSourceInfoJson);a.resolve(t)}finally{"pending"===a.state()&&a.reject()}}).fail(e=>{Object(v.ShowMessage)(Object(v.formatUnicorn)(Object(C.getLocalization)("Schema loading failed. {0}","DxDesignerStringId.Error_SchemaLoadingFailed"),Object(v.getErrorMessage)(e))),a.reject()}),a.promise()}class ui extends C.Disposable{constructor(e=new qe){super(),this._requestWrapper=e,this.getItems=t=>{var a=T.Deferred();return this.getObjectTypeDescriptions().done(e=>{a.resolve(this.getSchemaByPath(t,e))}).fail(a.reject),a.promise()}}dispose(){this._objectTypeDescriptionsPromise=null}getSchemaByPath(t,e){if(t.fullPath){for(var a=[],i=0;i<t.pathParts.length;i++){var r=(e.types||[]).filter(e=>e.name==t.pathParts[i])[0];if(!r)return[];a=r.ctors}return a.map(e=>Object(v.extend)({},e,{isList:!1,specifics:"default"}))}return e.types.map(e=>Object(v.extend)({},e,{isList:!0,specifics:"List"}))}getObjectTypeDescriptions(e=""){return this._objectTypeDescriptionsPromise&&"rejected"!==this._objectTypeDescriptionsPromise.state()||(this._objectTypeDescriptionsPromise=ci(this._requestWrapper,e)),this._objectTypeDescriptionsPromise}}class pi extends P.TreeListController{canSelect(e){return!0}}class hi extends C.Disposable{constructor(e,t){super(),this.types=e,this.selectedType=_.observable(),this.selectedCtor=_.observable(),this.selectedPath=_.observable(""),this._scrollViewHeight="calc(100% - 36px)",this.availableTypesTreelistModel={expandRootItems:!0,itemsProvider:t,selectedPath:this.selectedPath,treeListController:new pi},this._disposables.push(this.availableTypesTreelistModel.selectedPath.subscribe(a=>{e().forEach(t=>{t.name==a?(this.selectedType(t),null==this.selectedCtor()?this.selectedCtor.valueHasMutated():this.selectedCtor(null)):t.ctors.forEach(e=>{t.name.concat(".").concat(e.name)==a&&(this.selectedType(t),this.selectedCtor(e))})})}))}}class mi extends I{constructor(e=new qe){super(),this._requestWrapper=e,this._objectDataSource=new Mt,this._types=_.observableArray([]),this._disposables.push(this._provider=new ui(this._requestWrapper),this._chooseObjectType=new hi(this._types,this._provider))}canNext(){return!!this._selectedTypeName}canFinish(){return!1}commit(){return T.Deferred().resolve({selectedType:this._selectedTypeName,selectedObjectType:this._chooseObjectType.selectedType(),ctor:this._chooseObjectType.selectedCtor()}).promise()}initialize(e){return this._objectDataSource.setState(e),this._provider.getObjectTypeDescriptions(e.context).done(e=>{e.types.forEach(e=>e.members.splice(0,0,Vt.empty())),this._types(e.types||[]),0<e.types.length&&this._chooseObjectType.selectedPath(e.types[0].name)}),T.Deferred().resolve().promise()}get _selectedTypeName(){return this._chooseObjectType.selectedType()?this._chooseObjectType.selectedType().name:null}}function gi(e,t){e.registerMetadata($a.ChooseTypesPage,{setState:(e,t)=>{t.selectedType=e.selectedType,t.selectedObjectType=e.selectedObjectType,t.ctor=e.ctor},getState:e=>e.objectDataSourceWizard,resetState:(e,t)=>{e.selectedType=t.selectedType,e.selectedObjectType=t.selectedObjectType,e.ctor=t.ctor},create:()=>new mi(t.requestWrapper),description:Object(C.getLocalization)("Choose the type and its constructor.","AnalyticsCoreStringId.ObjectDSWizard_ChooseType_Description"),template:"dxrd-page-objectdatasource-types"})}class bi extends C.Disposable{constructor(t,e){super(),this.dataMembers=_.observableArray([]),this.selectedDataMembers=_.observableArray([]);var a=t()&&t().name;this._disposables.push(e.subscribe(e=>{t().updateMembers(e),a!=t().name&&(this.dataMembers(t().members),this.selectedDataMembers([]),a=t().name),this.coerceSelection()}))}coerceSelection(){var e=this.selectedDataMembers()[0],e=e&&e.isAvailable()?e:this.dataMembers().filter(e=>e.isAvailable())[0];this.selectedDataMembers([e])}}class fi extends I{constructor(e=new qe){super(),this._requestWrapper=e,this._objectDataSource=new Mt,this._type=_.observable(),this._ctor=_.observable(),this._disposables.push(this._chooseObjectDataMember=new bi(this._type,this._ctor))}initialize(e){return this._objectDataSource.setState(e),this._type(e.selectedObjectType),this._ctor(e.ctor),T.Deferred().resolve().promise()}canNext(){return!!this._needParametersPage}canFinish(){return!this._needParametersPage}commit(){return T.Deferred().resolve({selectedType:this._type().name,ctor:this._ctor(),dataMember:!this._selectedDataMember||this._selectedDataMember.isEntireObject()?void 0:this._selectedDataMember}).promise()}get _selectedDataMember(){var e=this._chooseObjectDataMember.selectedDataMembers();return e?e[0]:null}get _needParametersPage(){return!!this._selectedDataMember&&0<this._selectedDataMember.parameters.length||!!this._ctor()&&0<this._ctor().parameters.length}}function yi(e,t){e.registerMetadata($a.ChooseDataMembersPage,{setState:(e,t)=>{t.selectedType=e.selectedType,t.ctor=e.ctor,t.dataMember=e.dataMember},getState:e=>e.objectDataSourceWizard,resetState:(e,t)=>{e.dataMember=t.dataMember},create:()=>new fi(t.requestWrapper),description:Object(C.getLocalization)("Choose the entire object or a data member to bind.","AnalyticsCoreStringId.ObjectDSWizard_ChooseDataMember_Description"),template:"dxrd-page-objectdatasource-datamembers"})}(k=E=E||{})[k.Left=1]="Left",k[k.TopLeft=2]="TopLeft",k[k.BottomLeft=3]="BottomLeft",k[k.Right=4]="Right",k[k.TopRight=5]="TopRight",k[k.BottomRight=6]="BottomRight",k[k.Top=7]="Top",k[k.Bottom=8]="Bottom";class Si extends P.TreeListItemViewModel{constructor(){super(...arguments),this.queryName=_.computed({read:()=>this.data&&this.data.name,write:e=>{var t=this.data;t&&t.name!==e&&(t.name=e,t._afterCheckToggled)&&t._afterCheckToggled(t)}}),this.editingMode=_.observable(!1)}dispose(){super.dispose(),this.queryName.dispose()}_getTemplateName(){return this._getCustomizedTemplateName(!0)}_getCustomizedTemplateName(e){return e?"dxd-custom-query-treelisitem":super._getTemplateName()}}class xi extends P.DefaultTreeListItemFactory{createItem(e,t,a,i,r){return"queries"===t[0]?new Si(e,t,a,i,r):super.createItem(e,t,a,i,r)}}function vi(e,t=30,a=!0){var i="inherit",t="-"+t/2+"px";return e?{top:e===E.Left||e===E.Right||e===E.Top||e===E.TopLeft||e===E.TopRight?t:i,bottom:e===E.Left||e===E.Right||e===E.Bottom||e===E.BottomLeft||e===E.BottomRight?t:i,left:e===E.Top||e===E.Bottom||e===E.Left||e===E.TopLeft||e===E.BottomLeft?t:i,right:e===E.Top||e===E.Bottom||e===E.Right||e===E.TopRight||e===E.BottomRight?t:i,width:e===E.Top||e===E.Bottom?i:"50%",height:e===E.Left||e===E.Right?i:"50%",display:a?"block":"none"}:{top:t,bottom:t,left:t,right:t,width:i,height:i,display:a?"block":"none"}}function _i(e,t,a){return e().forEach(e=>t(e,a)),e.subscribe(e=>{e.forEach(e=>{"added"===e.status?t(e.value,a):"deleted"===e.status&&e.value.dispose&&e.value.dispose()}),a()},null,"arrayChange")}function Ci(e,t){var a=[];return e.forEach(e=>{e&&e.subscribe&&a.push(e.subscribe(e=>t(e)))}),a}function Ti(e,t,a){return t(e(),a),e.subscribe(e=>{t(e,a),a()})}function Pi(e,t){return{page:e.page,pageId:e.pageId,wizard:t,state:t.stateManager.getPageState(e.pageId)}}function Ni(e,t){return{page:e.page,pageId:e.pageId,wizard:t}}function Oi(e){return 1<[e.jsonDataSourceAvailable,e.sqlDataSourceAvailable,e.objectDataSourceAvailable,e.federationDataSourceAvailable].filter(e=>!!e).length}class wi extends I{constructor(e,t=!0,a){super(),this.items=e,this._getJsonConnectionsCallback=a,this.selectedItems=_.observableArray([]),this.operations=[{text:this.existingOperationText,createNew:!1},{text:this.createNewOperationText,createNew:!0}],this.selectedOperation=_.observable(this.operations[0]),this._createNew=_.pureComputed(()=>this.selectedOperation().createNew),this.canCreateNew=_.observable(t),this._disposables.push(...Ci([this.selectedOperation,this.selectedItems],()=>this._onChange()))}canNext(){return 0!==this.selectedItems().length||this.selectedOperation().createNew}initialize(a){var i,e;return(this._getJsonConnectionsCallback?(i=T.Deferred(),this._getJsonConnectionsCallback().done(e=>{this.items(e);var t=this._getSelectedItem(a);this.selectedItems(t?[t]:[]),i.resolve(e)}).fail(()=>{i.reject()}),i):(e=this._getSelectedItem(a),this.selectedItems(e?[e]:[]),T.Deferred().resolve(this))).promise()}_displayExpr(e){return e.description||e.name}_getSelectedItem(e){return this.items()[0]}onDblClick(){this[za]&&this[za]()}get createNewOperationText(){return Object(C.getLocalization)("No, I'd like to create a new data source","AnalyticsCoreStringId.Wizard_CreateNewDataSource")}get existingOperationText(){return Object(C.getLocalization)("Yes, let me choose an existing data source from the list","AnalyticsCoreStringId.Wizard_ChooseDataSourceFromList")}}class Di extends wi{commit(){return T.Deferred().resolve({predeifnedDataSourceName:this.selectedOperation().createNew?null:this.selectedItems()[0].name}).promise()}_getSelectedItem(t){var e=this.items()||[];return t.predeifnedDataSourceName?e.filter(e=>e.name===t.predeifnedDataSourceName)[0]:0===e.length?null:e[0]}canNext(){return this.selectedOperation().createNew}canFinish(){return!this.selectedOperation().createNew}}function Ii(e,t){e.registerMetadata(S.ChoosePredefinedDataSourcePage,{setState:(e,t)=>{t.predeifnedDataSourceName=e.predeifnedDataSourceName},getState:e=>e,resetState:(e,t)=>{e.predeifnedDataSourceName=null},create:()=>new Di(t.predefinedDataSources,t.canCreateDataSource),template:"dxrd-page-selectitems",description:Object(v.getLocalization)("Do you want to use an existing data source?","AnalyticsCoreStringId.Wizard_UseExisting_DataSource")+" "+Object(v.getLocalization)("The Wizard assigns the selected or a newly created data source to the report.","AnalyticsCoreStringId.Wizard_DataSourceAssignment_Description")})}class Ei extends wi{commit(){return T.Deferred().resolve({connectionName:this.selectedOperation().createNew?null:this.selectedItems()[0].name}).promise()}_getSelectedItem(e){return Object(v.getFirstItemByPropertyValue)(this.items(),"name",e.connectionName)||super._getSelectedItem()}get createNewOperationText(){return Object(C.getLocalization)("No, I'd like to create a new data connection","AnalyticsCoreStringId.JsonDSWizard_CreateNewConnection")}get existingOperationText(){return Object(C.getLocalization)("Yes, let me choose an existing data connection from the list","AnalyticsCoreStringId.JsonDSWizard_UseExistingConnection")}}function ki(e,t){e.registerMetadata(O.ChooseConnectionPage,{create:()=>new Ei(t.connectionStrings&&t.connectionStrings.json,t.allowCreateNewJsonConnection,t.getJsonConnectionStrings),description:t.allowCreateNewJsonConnection?Object(C.getLocalization)("Do you want to use an existing data connection?","AnalyticsCoreStringId.JsonDSWizard_ChooseConnection_Description"):Object(C.getLocalization)("Choose a data connection.","AnalyticsCoreStringId.SqlDSWizard_PageChooseConnection"),getState:e=>e.jsonDataSourceWizard,setState:(e,t)=>t.connectionName=e.connectionName,resetState:(e,t)=>{e.connectionName=t.connectionName},template:"dxrd-page-selectitems"})}var Ai={PathParameter:"pathParameters",QueryParameter:"queryParameters",Header:"headers"};function $i(e,t,a){e=e||Object(C.getLocalization)("The value cannot be empty","AnalyticsCoreStringId.ParametersPanel_DateTimeValueValidationError");return t?(a=a?Object(v.formatUnicorn)("{0}. {1}",t,a):t,Object(C._stringEndsWith)(a,":")||(a+=":"),Object(v.formatUnicorn)("{0} {1}",a,e)):e}class ji extends x.Editor{constructor(e,t,a,i){super(e,t,a,i),this.aceEditorHasErrors=_.observable(!1),this.aceAvailable=Object(P.aceAvailable)(),this.editorContainer=_.observable(),this.languageHelper={getLanguageMode:()=>"ace/mode/json",createCompleters:()=>[]},this.aceOptions={showLineNumbers:!1,highlightActiveLine:!1,showPrintMargin:!1,enableBasicAutocompletion:!0,enableLiveAutocompletion:!0},this.isValid=_.computed(()=>this._model()&&this._model().isValid()),this.additionalOptions={onChangeAnnotation:e=>{e=e&&e.getAnnotations()||[];this._model()&&this._model().aceEditorHasErrors&&this._model().aceEditorHasErrors(0<e.filter(e=>"error"===e.type||"warning"===e.type).length)},onBlur:()=>{var e=this.editorContainer();e&&this.value(e.getValue())}},this.jsonStringValidationRules=[{type:"custom",reevaluate:!0,validationCallback:e=>this.isValid(),get message(){return $i(Object(C.getLocalization)("The value cannot be empty and should have a valid format.","AnalyticsCoreStringId.ValueIsRequiredOrInvalidFormat_Error"),Object(C.getLocalization)("JSON String:","DataAccessUIStringId.WizardPageChooseJsonSource_Custom"))}}]}uploadFile(e){e&&e.event&&(e.event.stopPropagation(),e.event.preventDefault()),Object(v.uploadFile)({accept:".json,.txt"}).done(e=>{e=atob(e.content);0===e.indexOf("")&&(e=e.substr("".length)),this.value(e)})}getUploadTitle(){return Object(C.getLocalization)("Upload JSON File","AnalyticsCoreStringId.UploadJsonFile_Title")}}class zi extends C.Disposable{constructor(){super(),this._validationGroup=null,this._validationSummary=null,this.validationGroup={onInitialized:e=>this._onValidationGroupInitialized(e),onDisposing:e=>this._onValidationGroupDisposing(e),validate:()=>this._validate()},this.validationSummary={onInitialized:e=>this._onValidationSummaryInitialized(e),onDisposing:e=>this._onValidationSummaryDisposing(e)},this._disposables.push(this.grid=new x.ObjectProperties(_.observable(this)))}dispose(){this._validationSummary&&this._validationSummary.dispose(),this._validationGroup&&this._validationGroup.dispose(),this._validationSummary=null,this._validationGroup=null,super.dispose()}_onValidationGroupInitialized(e){this._validationGroup=e.component}_onValidationGroupDisposing(e){this._validationGroup=null}_onValidationSummaryInitialized(e){this._validationSummary=e.component}_onValidationSummaryDisposing(e){this._validationSummary=null}_repaintSummary(){this._validationSummary&&this._validationSummary.repaint()}_validate(){this._validationSummary&&this._validationGroup&&this._validationGroup.validate()}}class Bi extends zi{constructor(){super(),this._validatorsReady=_.observable(!1),this.isValid=_.pureComputed(()=>{var e=this._isJsonSourceValid(this.stringSource()),t=this.aceEditorHasErrors();return e&&!t}),this.validationGroup=null,this.validationSummary=null,this.stringSource=_.observable(""),this.aceEditorHasErrors=_.observable(!1),this.cssClass={"dxrd-wizard-json-string-source-grid":!0},this._disposables.push(this.grid=new x.ObjectProperties(_.observable(this)))}onChange(e){var t=null,a=()=>{e(),clearTimeout(t),t=setTimeout(()=>this._validate(),1)};this._disposables.push(this.stringSource.subscribe(e=>a()))}_isJsonSourceValid(e){if(!e)return!1;var t=!0;try{JSON.parse(e)}catch(e){t=!1}return t}isEmpty(){return!this.stringSource()}reset(){this.stringSource("")}setValue(e){this.stringSource(e.source.json())}getInfo(){return[{propertyName:"stringSource",defaultVal:"",displayName:"JSON String",editor:{header:"dx-jsonwizard-jsonstring-editor",editorType:ji,custom:"dx-property-json-string-editor"}}]}applySettings(e){e.source.uri(void 0),e.source.json(this.stringSource()),e.source.authenticationInfo=new Ke({}),e.source.headers([]),e.source.queryParameters([]),e.source.pathParameters([])}}class Ri extends zi{constructor(e,t){super(),this._requestWrapper=e,this._itemsProvider=t,this._isUriValid=_.observable(!1),this._lastValidatedJsonSourceJSON="",this._authNameValidatorInstance=null,this._isInitUri=!0,this._collectionItemNamePlaceholder=Object(C.getLocalization)("Name","AnalyticsCoreStringId.CollectionEditor_Name_Placeholder"),this._lastValidateDeferred=null,this._sourceUriValidatorsReady=_.observable(!0),this._basicAuthValidatorsReady=_.observable(!1),this._validationRequested=_.observable(!1).extend({deferred:!0}),this._noEmptyProperties=_.pureComputed(()=>{var e=this._isBasicHttpAuthValid(),t=this._isParametersValid(),a=!!this.sourceUri();return e&&t&&a}),this._lastValidationMessage=_.observable(),this._getSerializedUriSource=(e=new dt({}))=>(this.applySettings(e),JSON.stringify(e.source.serialize(!0))),this._sourceUriValidationCallback=t=>{var a;return this.sourceUri()?(a=!1,this._isInitUri=!1,this._getSerializedUriSource()==this._lastValidatedJsonSourceJSON?!this._lastValidationMessage():(this._lastValidationMessage()||this._lastValidationMessage(Object(C.getLocalization)("Validation...","AnalyticsCoreStringId.Validation")),this._validateUriSource().done(e=>{a=t.rule.isValid=e.isUriValid,e.faultMessage&&(t.rule.message=e.faultMessage),this._lastValidationMessage(a?null:e.faultMessage),t.validator.validate(),setTimeout(()=>this._repaintSummary(),1)}),a)):this._isInitUri?!(this._isInitUri=!1):(t.rule.message=$i(null,Object(C.getLocalization)("Web Service Endpoint (URI):","DataAccessUIStringId.WizardPageChooseJsonSource_URI")),!1)},this.isValid=_.pureComputed(()=>{var e=this._noEmptyProperties(),t=this._isUriValid();return e&&t}),this._validatorsReady=_.pureComputed({read:()=>{var e=this._sourceUriValidatorsReady(),t=!this.basicHttpAuth.password()&&!this.basicHttpAuth.userName(),a=this._basicAuthValidatorsReady();return e&&(a||t)},write:e=>{this._basicAuthValidatorsReady(e)}}),this.sourceUri=_.observable(""),this.basicHttpAuth={password:_.observable(""),userName:_.observable("")},this.parameters=_.observableArray([]),this._disposables.push(this.resultUri=_.pureComputed(()=>this._getResultUri())),this._disposables.push(this.grid=new x.ObjectProperties(_.observable(this))),this._disposables.push(_.computed(()=>{var e=this._validatorsReady(),t=this._validationRequested();e&&t&&this._validate()})),this._disposables.push(this._validatorsReady)}_validateUriSource(){var a=Object(C.getLocalization)("Invalid URI.","AnalyticsCoreStringId.ReportDesigner_Wizard_JsonSource_UriValidationError"),i=Object(C.getLocalization)("Web Service Endpoint (URI):","DataAccessUIStringId.WizardPageChooseJsonSource_URI"),r=(this._isUriValid(!1),this._lastValidateDeferred&&this._lastValidateDeferred.reject(),T.Deferred());this._lastValidateDeferred=r;try{var e=new dt({}),t=this._getSerializedUriSource(e),o=(this._lastValidatedJsonSourceJSON=t,e=>{var t;r.state&&"rejected"===r.state()||(this._isUriValid(e.isUriValid),t=$i((e.isUriValid?"":e&&e.faultMessage)||a,i),r.resolve({isUriValid:e.isUriValid,faultMessage:t}))});this._requestWrapper.validateJsonUri(e).done(o).fail((e={})=>{e.isValid=!1,o(e)})}catch(e){this._isUriValid(!1)}return r.promise()}_isCollectionValid(e){return!this[e]().length||this[e]().every(e=>e.name())}_isParametersValid(){return this._isCollectionValid("parameters")}_isBasicHttpAuthValid(){return!this.basicHttpAuth.password()||!!this.basicHttpAuth.userName()}_getSourceUriInfo(){var e={propertyName:"sourceUri",displayName:"Web Service Endpoint (URI):",localizationId:"DataAccessUIStringId.WizardPageChooseJsonSource_URI",defaultVal:"",editor:x.editorTemplates.getEditor("text"),validatorOptions:null,isRequired:!0,editorOptions:{elementAttr:{title:this.sourceUri}}},t=this;return e.validatorOptions={onInitialized:e=>{this._sourceUriValidatorsReady(!0)},onDisposed:()=>{this._sourceUriValidatorsReady(!1)},validationRules:[{type:"custom",assignValueFirst:!0,isDeferred:_.pureComputed(()=>this._noEmptyProperties()),get message(){return t._lastValidationMessage()},validationCallback:this._sourceUriValidationCallback}]},e}_getBasicHttpAuthInfo(){var e={propertyName:"userName",displayName:"Username:",localizationId:"DataAccessUIStringId.WizardPageConfigureJsonConnection_UsernameText",editor:x.editorTemplates.getEditor("text"),validatorOptions:void 0},t={propertyName:"basicHttpAuth",displayName:"Basic HTTP Authentication",localizationId:"DataAccessUIStringId.WizardPageConfigureJsonConnection_BasicHttpAuthText",info:[e,Object(v.createPasswordSerializationInfo)({propertyName:"password",displayName:"Password:",localizationId:"DataAccessUIStringId.WizardPageConfigureJsonConnection_PasswordText"},!1)],editor:x.editorTemplates.getEditor("objecteditor")};return e.validatorOptions={onInitialized:e=>{e=e&&e.component;this._authNameValidatorInstance&&this._authNameValidatorInstance!=e&&this._authNameValidatorInstance.dispose(),this._authNameValidatorInstance=e,this._basicAuthValidatorsReady(!0)},onDisposed:()=>{this._authNameValidatorInstance=null},validationRules:[{type:"custom",reevaluate:!0,assignValueFirst:!0,get message(){return $i(null,Object(C.getLocalization)(t.displayName,t.localizationId),Object(C.getLocalization)(e.displayName,e.localizationId))},validationCallback:e=>this._isBasicHttpAuthValid()}]},t}_getParametersInfo(){var e={propertyName:"parameters",displayName:"Parameters",localizationId:"AnalyticsCoreStringId.QueryBuilder_Parameters",array:!0,addHandler:()=>{var e=Object(v.getUniqueNameForNamedObjectsArray)(this.parameters(),"parameter");return Ze.from({"@Name":e})},editor:x.editorTemplates.getEditor("commonCollection"),editorOptions:null,template:"#dx-jsonwizard-parametercollection"};return e.editorOptions={itemsProvider:this._itemsProvider,nameValidationRules:[{type:"required",get message(){return $i(null,Object(C.getLocalization)(e.displayName,e.localizationId),this._collectionItemNamePlaceholder)}}]},e}_getResultUriInfo(){return{propertyName:"resultUri",displayName:"Resulting URI:",localizationId:"DataAccessUIStringId.WizardPageChooseJsonSource_ResultingUri",defaultVal:"",editor:x.editorTemplates.getEditor("text"),editorOptions:{readOnly:!0,elementAttr:{title:this.resultUri}}}}_getResultUri(){var e,t,a;return this.sourceUri()&&this._isUriValid()&&this._isParametersValid()?this.sourceUri()&&0===this.parameters().length?this.sourceUri():(a=(e=this.sourceUri().split("?"))[0],t=e[1],a=this._appendPathSegmentsToUri(e[0]),this._appendQuerySegmentsToUri(a,t)):null}_appendPathSegmentsToUri(t){return this.parameters().filter(e=>"PathParameter"===e.itemType()).map(e=>"{"+e.name()+"}").forEach(e=>{t=t.replace(/[\/]+$/g,"")+"/"+e.replace(/^[\/]+/g,"")}),t}_appendQuerySegmentsToUri(e,t){var a=t||"";return this.parameters().filter(e=>"QueryParameter"===e.itemType()).map(e=>e.name()+"={?}").forEach(e=>{a&&(a+="&"),a+=e}),0<a.length&&(e+="?"+a),e}_onValidationSummaryInitialized(e){super._onValidationSummaryInitialized(e),this._isInitUri=!0,setTimeout(()=>{this._validate()},1)}_applyParametersToSource(t){var a=this.parameters().reduce((e,t)=>Object.assign(Object.assign({},e),{[t.itemType()]:[...e[t.itemType()]||[],t]}),{});["PathParameter","QueryParameter","Header"].forEach(e=>{a[e]&&t.source[Ai[e]](a[e])})}applySettings(e){e.source.uri(this.sourceUri()),e.source.json(void 0),e.source.authenticationInfo.password(this.basicHttpAuth.password()),e.source.authenticationInfo.userName(this.basicHttpAuth.userName()),this._applyParametersToSource(e)}getInfo(){return[this._getSourceUriInfo(),this._getBasicHttpAuthInfo(),this._getParametersInfo(),this._getResultUriInfo()]}reset(){this.sourceUri(""),this.basicHttpAuth.password(""),this.basicHttpAuth.userName(""),this.parameters([])}setValue(e){this.sourceUri(e.source.uri()),this.basicHttpAuth.userName(e.source.authenticationInfo.userName()),this.basicHttpAuth.password(e.source.authenticationInfo.password());e=[].concat.apply([],[e.source.pathParameters(),e.source.queryParameters(),e.source.headers()]);this.parameters(e)}dispose(){this._authNameValidatorInstance&&this._authNameValidatorInstance.dispose(),this._lastValidateDeferred&&(this._lastValidateDeferred.reject(),this._lastValidateDeferred=null),super.dispose(),this.disposeObservableArray(this.parameters)}onChange(e){var t=null,a=()=>{e(),clearTimeout(t),t=setTimeout(()=>this._validate(),1)};this._disposables.push(...Ci([this.sourceUri,this.basicHttpAuth.password,this.basicHttpAuth.userName,this.resultUri],a)),this._disposables.push(_i(this.parameters,e=>{e._disposables.push(...Ci([e.name,e.itemType,e.value],a))},a))}isEmpty(){return!this.sourceUri()}_validate(){this._validationSummary&&this._validationGroup&&(this._validatorsReady()?(this._validationGroup.validate(),this._validationRequested(!1)):this._validationRequested(!0))}}class Mi extends I{constructor(e=new qe,t){super(),this._requestWrapper=e,this.__validationGroup=null,this.__validationSummary=null,this._jsonSourceTitle=Object(C.getLocalization)("JSON Source:","DataAccessUIStringId.WizardPageChooseJsonSource_SourceType"),this._jsonConnectionTitle=Object(C.getLocalization)("Connection Name:","AnalyticsCoreStringId.ReportDesigner_Wizard_Json_ConnectionName"),this._connectionNameValidationRules=[{type:"required",get message(){return $i(null,this._jsonConnectionTitle)}}],this._connectionName=_.observable(""),this._validationGroup={onInitialized:e=>this._onValidationGroupInitialized(e),onDisposing:e=>this._onValidationGroupDisposing(e)},this._validationSummary={onInitialized:e=>this._onValidationSummaryInitialized(e),onDisposing:e=>this._onValidationSummaryDisposing(e)},this._sources=[],this._disposables.push(this._jsonStringSettings=new Bi),this._jsonStringSettings.onChange(()=>this._onChange()),this._disposables.push(this._jsonUriSetting=new Ri(this._requestWrapper,t)),this._jsonUriSetting.onChange(()=>this._onChange()),this._sources=[{value:this._jsonUriSetting,displayValue:"Web Service Endpoint (URI)",localizationId:"DataAccessUIStringId.WizardPageChooseJsonSource_SourceType_Uri"},{value:this._jsonStringSettings,displayValue:"JSON String",localizationId:"DataAccessUIStringId.WizardPageChooseJsonSource_SourceType_Custom"}];var a=_.observable();this._selectedSource=_.pureComputed({read:()=>a(),write:e=>{a()!==e&&(a(e),e._validatorsReady&&e._validatorsReady(!1),setTimeout(()=>{e._validate&&e._validate()},1),this._onChange())}}),this._selectedSource(this._sources[0].value),this._disposables.push(this._selectedSource),this._disposables.push(this._connectionName.subscribe(()=>this._onChange()))}_onValidationGroupInitialized(e){this.__validationGroup=e.component}_onValidationGroupDisposing(e){this.__validationGroup=null}_onValidationSummaryInitialized(e){this.__validationSummary=e.component,this.__validationGroup&&this.__validationSummary&&this._connectionName&&this._connectionName()&&setTimeout(()=>{this.__validationGroup&&this.__validationGroup.validate()},1)}_onValidationSummaryDisposing(e){this.__validationSummary=null}canNext(){var e=!!this._connectionName(),t=this._selectedSource().isValid(),a=this._selectedSource().isEmpty();return e&&t&&!a}commit(){var e=new dt({}),e=(this._selectedSource().applySettings(e),(new C.ModelSerializer).serialize(e));return T.Deferred().resolve({jsonSource:JSON.stringify(e.Source),newConnectionName:this._connectionName()}).promise()}initialize(e){this.__validationGroup=null,this.__validationSummary=null;e=Ha(e);return e.source.uri()?this._selectedSource(this._jsonUriSetting):e.source.json()&&this._selectedSource(this._jsonStringSettings),this._selectedSource().setValue(e),T.Deferred().resolve().promise()}}function qi(e,t,a){e.registerMetadata(O.ChooseJsonSourcePage,{setState:(e,t)=>{t.jsonSource=e.jsonSource,t.newConnectionName=e.newConnectionName},getState:e=>e.jsonDataSourceWizard,resetState:(e,t)=>{e.jsonSource=t.jsonSource},create:()=>new Mi(t,a&&a()),description:Object(C.getLocalization)("Create a data connection.","AnalyticsCoreStringId.JsonDSWizard_CreateNewConnectionPage_Description"),template:"dxrd-page-jsonsource"})}class Li extends Ei{constructor(e,t,a,i=new qe,r){super(e,t,r),this._requestWrapper=i,this._disposables.push(this._specifySourceData=new Mi(i,a)),this._specifySourceData.onChange(()=>this._onChange())}commit(){var t=T.Deferred(),e=this._createNew()?this._specifySourceData.commit():super.commit();return e.done(e=>{t.resolve(e)}),t.promise()}canNext(){return this._createNew()?this._specifySourceData.canNext():super.canNext()}initialize(e){var t=T.Deferred();return super.initialize(e).done(()=>{this._specifySourceData.initialize(e).done(()=>{t.resolve(this)})}),t.promise()}}function Qi(e,t,a,i,r){e.registerMetadata(O.SpecifyJsonConnectionPage,{create:()=>new Li(t,a,i&&i(),void 0,r),description:a?Object(C.getLocalization)("Do you want to use an existing data connection?","AnalyticsCoreStringId.JsonDSWizard_ChooseConnection_Description"):Object(C.getLocalization)("Choose a data connection.","AnalyticsCoreStringId.SqlDSWizard_PageChooseConnection"),getState:e=>e.jsonDataSourceWizard,setState:(e,t)=>{t.connectionName=e.connectionName,t.jsonSource=e.jsonSource,t.newConnectionName=e.newConnectionName},resetState:(e,t)=>{e.connectionName=t.connectionName,e.jsonSource=t.jsonSource,e.newConnectionName=t.newConnectionName},template:"dxrd-page-specify-connection"})}var Vi="Default";class Wi extends C.Disposable{constructor(e,t,a,i=!1,r){super(),this.name=e,this.displayName=t,this.specifics=a,this.checked=_.pureComputed(()=>this._checked()),this.isList=!1,this._checked=_.observable(i),this._afterCheckToggled=r||T.noop}unChecked(){return!1===this.checked()}toggleChecked(){this.setChecked(!this.checked.peek()),this._afterCheckToggled(this)}setChecked(e){this._checked(e)}}class Fi extends Wi{constructor(e,t,a,i=!1,r=null,o){super(e,t,a,i,o),this.name=e,this.displayName=t,this.specifics=a,this.hasQuery=!1,this.arguments=r}}class Ui extends Wi{constructor(e,t,a,i,r){super(e,t,a,i,r),this.countChecked=_.pureComputed(()=>{for(var e=0,t=0;t<this.children().length;t++)if(!this.children()[t].unChecked()){if(1<e)break;e++}return e}),this.isList=!0,this.children=_.observableArray([]),this.checked=_.pureComputed({read:()=>{var t,a;return this.initialized()?(a=t=0,this.children().forEach(e=>{!0===e.checked()?t++:!1!==e.checked()&&a++}),(0!==t||0!==a)&&(t===this.children.peek().length||void 0)):this._checked()}})}initialized(){return 0<this.children().length}setChecked(t){this._checked(t),this.children.peek().forEach(e=>{e.setChecked(t)})}initializeChildren(e){this.children(e||[])}}class Hi extends Ui{constructor(e,t,a,i,r){super(e,t,a,i,r),this.countChecked=_.pureComputed(()=>{var e=0;this.hasParamsToEdit(!1);for(var t=0;t<this.children().length;t++){var a=this.children()[t];if(!a.unChecked()){if(1<e)break;e++,a.arguments&&0<a.arguments.length&&this.hasParamsToEdit(!0),"query"===a.specifics&&this.hasParamsToEdit(!0)}}return e}),this.hasParamsToEdit=_.observable(!1)}}class Ji extends Hi{constructor(e,t,a,i,r,o){super(e,t,a,i,o),this.addAction={clickAction:e=>this.disableCustomSql()?this.addQuery():this.showPopover(),imageClassName:"dxrd-image-add",imageTemplateName:"dxrd-svg-operations-add",templateName:"dx-treelist-action-with-popover",text:Object(C.getLocalization)("Add query","AnalyticsCoreStringId.SqlDSWizard_AddQuery")},this.itemClickAction=e=>{this.popoverVisible(!1),e.itemData.addAction()},this.className="dx-addqueries-popover",this.popoverVisible=_.observable(!1),this.path=e,this.addQuery=()=>{r().showQbCallBack()},this.addCustomQuery=()=>{r().showQbCallBack(null,!0)},this.disableCustomSql=()=>r&&r().disableCustomSql,this.target="."+this.addAction.templateName,this.selectionDisabled=_.pureComputed(()=>!this.children().length)}getActions(e){var t=[];return 0===e.path.indexOf("queries")&&t.push(this.addAction),t}popoverListItems(){return[{name:Object(C.getLocalization)("Run Query Builder","DataAccessUIStringId.Button_QueryBuilder"),addAction:()=>this.addQuery()},{name:Object(C.getLocalization)("Write Custom SQL","AnalyticsCoreStringId.SqlDSWizard_WriteCustomSQL"),addAction:()=>this.addCustomQuery()}]}showPopover(){this.popoverVisible(!0)}}class Gi extends Fi{constructor(e,t,a,i,r,o,s,n){super(e,t,a,i,null,s),this.query=n,this.editAction={clickAction:e=>this.editQuery(),imageClassName:"dx-image-edit",imageTemplateName:"dxrd-svg-operations-edit",text:Object(C.getLocalization)("Edit query","AnalyticsCoreStringId.SqlDSWizard_EditQuery")},this.removeAction={clickAction:e=>{this.removeQuery({model:e.data})},imageClassName:"dxrd-image-recycle-bin",imageTemplateName:"dxrd-svg-operations-recycle_bin",text:Object(C.getLocalization)("Remove query","AnalyticsCoreStringId.SqlDSWizard_RemoveQuery")},this.parameters=r,this.removeQuery=e=>{e.model.unChecked()||e.model.toggleChecked(),o().deleteAction(e.model.name)},this.editQuery=e=>{o().showQbCallBack(this.name)},this.hasQuery=!0}setObservableName(e){this._name=e,["name","displayName"].forEach(e=>Object.defineProperty(this,e,{get(){return this._name()},set(e){return this._name(e)},configurable:!0}))}getActions(e){var t=[];return t.push(this.removeAction),t.push(this.editAction),t}}class Xi extends Wi{constructor(e,t,a,i,r,o,s=!1){super(e,t,a,i,o),this.visible=_.observable(!0),this.disabled=_.observable(!1),this.path=r,this.isComplex=a===Vi,s&&(this.dragData={noDragable:!1})}}class Yi extends Ui{constructor(e,t,a,i,r,o){super(e,t,a,i,o),this.visible=_.observable(!0),this.path=r,this.isComplex=this.isList&&a===Vi,this.checked=_.pureComputed({read:()=>{var t,a,e;return this.initialized()?(a=t=0,(e=this.children().filter(e=>e.visible())).forEach(e=>{!0===e.checked()?t++:!1!==e.checked()&&a++}),(0!==t||0!==a)&&(t===e.length||void 0)):this._checked()}})}setChecked(e){super.setChecked(!!this.visible()&&e)}}class Ki extends Yi{constructor(e,t,a,i,r,o){super(e,t,a,i,r,o),this.checked=_.pureComputed({read:()=>this._checked()})}}class Zi extends C.Disposable{constructor(e,t,n,d){super(),this._fullTreeLoaded=!1,this._rootItems=_.observableArray([]),this._checkedRootNodesCount=_.computed(()=>{if(!this._rootItems||0===this._rootItems().length)return 0;for(var e=0,t=0;t<this._rootItems().length&&e<1;t++)e+=this._rootItems()[t].unChecked()?0:1;return e}),this.hasCheckedItems=_.computed(()=>!(0===this._checkedRootNodesCount())),this.getRootItems=()=>this._rootItems(),this.getItems=(o,t=!1)=>{var s=T.Deferred();return o.fullPath||0!==o.pathParts.length?e.getItems(o).done(e=>{var a,i,r=this._getParentNode(o);if(!r||!r.children)return s.reject();0===r.children().length?(a=[],i=[],e.forEach(e=>{var t=this._getDefaultTreeNodeCheckState(e);this.isList(e,r)?o.pathParts.length<=5&&(i.push([].concat(o.fullPath.split("."),[e.name])),a.push(n(e,t,[o.fullPath,e.name].join(".")))):a.push(d(e,t,[o.fullPath,e.name].join(".")))}),r.initializeChildren(a),t?T.when(...i.map(e=>this.getItems(new C.PathRequest(e.join("."),e),t))).always(()=>s.resolve(a)):s.resolve(a)):s.resolve(r.children())}):s.resolve(this._rootItems()),s.promise()},this._disposables.push(t.subscribe(e=>{this._fullTreeLoaded=!1,this._rootItems(e.map(e=>{var t=this._getDefaultTreeNodeCheckState(e);return n(e,t,e.name)}))})),this._disposables.push(this.hasCheckedItems)}_createTree(){return this._fullTreeLoaded?T.Deferred().resolve().promise():T.when(...this._rootItems().map(e=>this.getItems(new C.PathRequest(e.path),!0))).always(()=>this._fullTreeLoaded=!0)}_createTreePart(t,a=T.Deferred(),e){var i,r;return this._fullTreeLoaded?a.resolve().promise():0===t.length?a.resolve():e?(i=[].concat([],e,t[0]),r=new C.PathRequest(i.join("."),i),void(this._getParentNode(r)?this._createTreePart(t.slice(1),a,i):this.getItems(new C.PathRequest(e.join("."),e)).done(e=>{this._createTreePart(t.slice(1),a,i)}).fail(()=>a.reject()))):(a=T.Deferred(),1===t.length?this.getItems(new C.PathRequest(t[0],t)).done(()=>a.resolve()).fail(()=>a.reject()):this._createTreePart(t.slice(1),a,[t[0]]),a)}_setChecked(e){e.setChecked(!0),e instanceof Yi&&e.children().forEach(e=>this._setChecked(e))}selectAllItems(e=!0){var t=T.Deferred();return this._createTree().always(()=>{e?this._rootItems().forEach(e=>e.setChecked(!0)):this._rootItems().forEach(e=>this._setChecked(e)),t.resolve()}),t.promise()}selectItemsByPath(e){var t=T.Deferred(),a=e.split(".");return this._createTreePart(a).done(()=>{this.getItems(new C.PathRequest(a.join("."),a)).done(e=>{e.forEach(e=>{e instanceof Wi&&e.setChecked(!0)})}).always(()=>t.resolve())}),t.promise()}selectItemByPath(e){var a=T.Deferred(),i=e.split(".");return this._createTreePart(i).done(()=>{var t=i.pop();this.getItems(new C.PathRequest(i.join("."),i)).done(e=>{e=e.filter(e=>e.name===t)[0];e instanceof Wi&&e.setChecked(!0)}).always(()=>a.resolve())}),a.promise()}_getParentNode(t){var e=this._rootItems().filter(e=>e.path===(t.id||t.ref))[0];if(e){for(var a=e.path,i=1;i<t.pathParts.length;i++){if(!e)return;a+="."+t.pathParts[i],e=e.children().filter(e=>Object(v.isList)(e)&&e.path==a)[0]}return e}}_getDefaultTreeNodeCheckState(e){return!1}isList(e,t){return Object(v.isList)(e)}}class er extends Zi{constructor(e,t,a,i){super(e,t,a,i)}_getDefaultTreeNodeCheckState(e){return e.isSelected}getNodeByPath(t){var e=this._rootItems().filter(e=>e.path===(t.pathParts||[])[0])[0];if(e){for(var a=e.path,i=1;i<t.pathParts.length;i++){if(!e)return;a+="."+t.pathParts[i],e=e.children().filter(e=>e.path==a)[0]}return e}}}class tr extends I{constructor(e=new qe,t=!0,a){super(),this._requestWrapper=e,this._allowObjectRootElements=t,this._callbacks=a,this._rootItems=_.observableArray([]),this._fieldListItemsProvider=_.observable(null),this._fieldSelectedPath=_.observable(null),this._cachedState={connectionName:null,jsonSource:null},this._createTreeNode=(e,t,a)=>{e=new Yi(e.name,e.displayName,e.specifics,t,a);return this._disposables.push(e.checked.subscribe(()=>this._onChange())),e},this._createLeafTreeNode=(e,t,a)=>{e=new Xi(e.name,e.displayName,e.specifics,t,a);return this._disposables.push(e.checked.subscribe(()=>this._onChange())),e},this._rootElementTitle=Object(C.getLocalization)("Root element:","DataAccessUIStringId.WizardPageChooseJsonSchema_RootElement"),this._rootElementList=_.observable([]),this._selectedRootElement=_.observable(null);var i=null,e=(this._disposables.push(this._rootElementList.subscribe(e=>{i&&i.dispose(),i=this._selectedRootElement.subscribe(e=>{if(!e)return this._rootItems([]);e=this._getSchemaToDataMemberInfo(e);e&&this._rootItems([{name:_.unwrap(e.name),isSelected:_.unwrap(e.selected),displayName:_.unwrap(e.displayName)||_.unwrap(e.name),data:e,specifics:0<e.nodes.length?"List":"Default"}])}),this._selectedRootElement(e[0])})),new v.FieldListProvider(this._createFieldListCallback(),this._rootItems));this._fieldListItemsProvider(new er(e,this._rootItems,this._createTreeNode,this._createLeafTreeNode)),this._disposables.push(this._fieldListItemsProvider()),this._fieldListModel={expandRootItems:!0,itemsProvider:this._fieldListItemsProvider(),selectedPath:this._fieldSelectedPath,treeListController:null,templateName:"dxrd-treelist-with-checkbox"}}_clear(){this._rootItems([]),this._fieldSelectedPath(""),this._rootElementList([]),this._selectedRootElement(null),this._dataSource&&this._dataSource.jsonSchemaProvider.reset(),this._cachedState={connectionName:null,jsonSource:null}}_createFieldListCallback(){return e=>{var t=new He({}),e=(t.nodes=[this._rootItems()[0].data],this._getInnerItemsByPath(e,t));return T.Deferred().resolve(e).promise()}}_getSchemaToDataMemberInfo(t){for(var e=this._dataSource.schema,a=0;a<t.pathParts.length;a++)if(!(e=e.nodes.filter(e=>e.name()===t.pathParts[a])[0]))return null;return e}_mapJsonNodesToTreelistItems(e){return T.map(e||[],e=>{return{name:e.name(),displayName:e.displayName||e.name(),isSelected:e.selected(),isList:e.nodes&&0<e.nodes.length,specifics:"Default"}})}_getNodesByPath(t,e){if(t.fullPath){for(var a=e.nodes,i=0;i<t.pathParts.length;i++){var r=(a||[]).filter(e=>e.name()==t.pathParts[i])[0];if(!r)return[];a=r.nodes}return a}return e.nodes}_getInnerItemsByPath(e,t){e=this._getNodesByPath(e,t);return this._mapJsonNodesToTreelistItems(e)}_beginInternal(e){if(e.connectionName&&this._cachedState.connectionName===e.connectionName||e.jsonSource&&this._cachedState.jsonSource===e.jsonSource)return T.Deferred().resolve().promise();this._clear(),this._cachedState={connectionName:e.connectionName,jsonSource:e.jsonSource};var t=this._dataSource&&this._dataSource.id;return this._dataSource=Ha(e,this._requestWrapper),t&&t!=this._dataSource.id||!this._dataSource.schema.nodes.length?this._dataSource.getSchema(this._callbacks&&this._callbacks.getParameters&&this._callbacks.getParameters()).done(e=>this._updatePage(e)):T.Deferred().done(e=>this._updatePage(e)).resolve(this._dataSource.schema).promise()}_updatePage(e){var t,a=e.getRootElementPartList(this._allowObjectRootElements);this._rootElementList()!==a&&this._rootElementList(this._filterRootElementList(a,e)),this._dataSource.rootElement()&&(t=["root",this._dataSource.rootElement()].join("."),a=this._rootElementList().filter(e=>e.fullPath===t)[0]||this._rootElementList()[0],this._selectedRootElement(a)),this._onChange()}_resetSelectionRecursive(e,t){e!==t&&(e.selected&&e.selected(!1),(e.nodes||[]).forEach(e=>this._resetSelectionRecursive(e,t)))}_mapJsonSchema(e,i){var t=this._fieldListItemsProvider().getNodeByPath(i);if(t)return e.selected(!1!==t.checked()),(e.nodes||[]).forEach(e=>{var t=i.pathParts.concat(e.name()),a=t.join("."),a={fullPath:a,path:e.name(),id:a,pathParts:t};this._mapJsonSchema(e,a)}),e}_filterRootElementList(e,t){return e}canNext(){return!1}canFinish(){return this._fieldListItemsProvider().hasCheckedItems()}commit(){var e;if(this._rootItems()[0])return e=this._rootItems()[0].data,this._resetSelectionRecursive(this._dataSource.schema,e),e={fullPath:e=e.name(),path:"",id:e,pathParts:[e]},this._mapJsonSchema(this._rootItems()[0].data,e),e=this._selectedRootElement().pathParts.slice(1).join("."),this._dataSource.rootElement(e),e=(new C.ModelSerializer).serialize(this._dataSource),T.Deferred().resolve({connectionName:this._dataSource.connectionName(),dataSourceName:e["@Name"],jsonScheme:JSON.stringify(e.Schema),rootElement:e["@RootElement"]}).promise()}initialize(e){return this._beginInternal(e)}reset(){this._clear()}}function ar(e,t,a){e.registerMetadata(O.ChooseJsonSchemaPage,{setState:(e,t)=>{t.dataSourceName=e.dataSourceName,t.jsonScheme=e.jsonScheme,t.rootElement=e.rootElement},getState:e=>e.jsonDataSourceWizard,resetState:(e,t)=>{e.dataSourceName=t.dataSourceName,e.jsonScheme=t.jsonScheme,e.rootElement=t.rootElement},create:()=>new tr(t,void 0,a),description:Object(C.getLocalization)("Select data fields.","DataAccessUIStringId.WizardPageChooseJsonSchema"),template:"dxrd-jsondatasource-fields-page"})}function ir(a){return(e,t)=>a?a(e,t):(new qe).getSelectStatement(e,t)}function rr(i){return(e,t,a)=>i?i(e,t,a):(new qe).rebuildResultSchema(e,t,a)}function or(t){return e=>t?t(e):(new qe).getFederationResultSchema(e)}class sr extends C.Disposable{constructor(e,t=!1,a=e=>e){super(),this.customizeQBInitializationData=a,this._querySource=_.observable(null),this._dbSchemaProvider=_.observable(null),this.designer=_.observable(),this.qbOptions=_.observable(null),this.okButtonDisabled=_.pureComputed(()=>this.designer()&&!this.designer().model().isValid()),this.isVisible=_.observable(!1),this.showLoadIndicator=_.observable(!1),this.localizationIdMap={title:{text:"Query Builder",localizationId:"DataAccessUIStringId.QueryBuilder"},loading:{text:"Loading...",localizationId:"AnalyticsCoreStringId.Loading"},previewResults:{text:"Preview Results...",localizationId:"DataAccessUIStringId.QueryBuilderButtons_PreviewResults"},cancel:{text:"Cancel",localizationId:"AnalyticsCoreStringId.SearchDialog_Cancel"},ok:{text:"OK",localizationId:"DataAccessUIStringId.Button_OK"}},this._rtl=t,this._applyQuery=e,this.qbOptions(this.qbOptions()||this.customizeQBInitializationData({queryBuilderModel:this.designer,dbSchemaProvider:this._dbSchemaProvider,querySource:this._querySource,callbacks:{CustomizeMenuActions:nr.customizeQueryBuilderActions},rtl:this._rtl}))}show(e,t){this._dataSource=t,this._dbSchemaProvider(t.dbSchemaProvider),this._querySource((new C.ModelSerializer).serialize(e)),this.isVisible(!0),this.designer().updateSurface()}cancelHandler(){this.isVisible(!1)}previewHandler(){this.designer().showPreview()}okHandler(){this.designer().model().canSave()&&this._applyQuery(this.createQuery(),this.showLoadIndicator).done(()=>{this.isVisible(!1)})}onHiddingHandler(){this.designer().dataPreview.isVisible(!1)}popupViewModel(e){e=Object(v.getParentContainer)(e);return{visible:this.isVisible,title:this.getDisplayText("title"),showTitle:!0,shading:!0,fullScreen:!1,width:"95%",height:"95%",container:e,wrapperAttr:{class:"dxrd-querybuilder-popup"},position:{of:e},onHidding:this.onHiddingHandler}}getDisplayText(e){return Object(C.getLocalization)(this.localizationIdMap[e].text,this.localizationIdMap[e].localizationId)}}sr.customizeQueryBuilderActions=(e,t)=>{var t=t.Actions,a=Object(v.findFirstItemMatchesCondition)(t,e=>"Delete"===e.text),i=Object(v.findFirstItemMatchesCondition)(t,e=>"Undo"===e.text),r=Object(v.findFirstItemMatchesCondition)(t,e=>"Redo"===e.text);t.splice(0,t.length,a,i,r)};class nr extends sr{constructor(e,t=!1,a=e=>e){super(e,t,a),this.customizeQBInitializationData=a}getDataSource(){return this._dataSource}createQuery(){return new $t(this.designer().model().serialize(),this.getDataSource())}}class dr{constructor(e,t){this._selectStatementCallback=e,this._connection=t}getQuerySqlText(e){e=JSON.stringify({Query:(new C.ModelSerializer).serialize(e)});return this._selectStatementCallback(this._connection(),e).fail(e=>{e=Object(v.getErrorMessage)(e);Object(v.ShowMessage)("Unable to build a SQL string"+(e?": "+e:"."))})}}var k=e(9),lr=e.n(k);function cr(e=!1){return{showLineNumbers:!1,showPrintMargin:!1,enableBasicAutocompletion:!1,enableLiveAutocompletion:!1,readOnly:e,highlightSelectedWord:e,showGutter:!1,highlightActiveLine:!1}}function ur(t){return{onChange:e=>{t(e.getValue())},onValueChange:e=>{e.resize(!0)},changeTimeout:200,overrideEditorFocus:!0,setUseWrapMode:!0}}function pr(){return{getLanguageMode:()=>"ace/mode/sql",createCompleters:()=>[]}}lr.a&&(lr.a.define("ace/mode/sql_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules","ace/mode/doc_comment_highlight_rules"],function(e,t,a){function i(){for(var i="ALL|AND|ANY|BETWEEN|EXISTS|IN|LIKE|NOT|OR|SOME",r=(i+="|NULL|IS|APPLY|INNER|OUTER|LEFT|RIGHT|JOIN|CROSS","OPENDATASOURCE|OPENQUERY|OPENROWSET|OPENXML|AVG|CHECKSUM_AGG|COUNT|COUNT_BIG|GROUPING|GROUPING_ID|MAX|MIN|STDEV|STDEVP|SUM|VAR|VARP|DENSE_RANK|NTILE|RANK|ROW_NUMBER@@DATEFIRST|@@DBTS|@@LANGID|@@LANGUAGE|@@LOCK_TIMEOUT|@@MAX_CONNECTIONS|@@MAX_PRECISION|@@NESTLEVEL|@@OPTIONS|@@REMSERVER|@@SERVERNAME|@@SERVICENAME|@@SPID|@@TEXTSIZE|@@VERSION|CAST|CONVERT|PARSE|TRY_CAST|TRY_CONVERT|TRY_PARSE@@CURSOR_ROWS|@@FETCH_STATUS|CURSOR_STATUS|@@DATEFIRST|@@LANGUAGE|CURRENT_TIMESTAMP|DATEADD|DATEDIFF|DATEFROMPARTS|DATENAME|DATEPART|DATETIME2FROMPARTS|DATETIMEFROMPARTS|DATETIMEOFFSETFROMPARTS|DAY|EOMONTH|GETDATE|GETUTCDATE|ISDATE|MONTH|SET DATEFIRST|SET DATEFORMAT|SET LANGUAGE|SMALLDATETIMEFROMPARTS|SP_HELPLANGUAGE|SWITCHOFFSET|SYSDATETIME|SYSDATETIMEOFFSET|SYSUTCDATETIME|TIMEFROMPARTS|TODATETIMEOFFSET|YEAR|CHOOSE|IIF|ABS|ACOS|ASIN|ATAN|ATN2|CEILING|COS|COT|DEGREES|EXP|FLOOR|LOG|LOG10|PI|POWER|RADIANS|RAND|ROUND|SIGN|SIN|SQRT|SQUARE|TAN|@@PROCID|APPLOCK_MODE|APPLOCK_TEST|APP_NAME|ASSEMBLYPROPERTY|COLUMNPROPERTY|COL_LENGTH|COL_NAME|DATABASEPROPERTYEX|DATABASE_PRINCIPAL_ID|DB_ID|DB_NAME|FILEGROUPPROPERTY|FILEGROUP_ID|FILEGROUP_NAME|FILEPROPERTY|FILE_ID|FILE_IDEX|FILE_NAME|FULLTEXTCATALOGPROPERTY|FULLTEXTSERVICEPROPERTY|INDEXKEY_PROPERTY|INDEXPROPERTY|INDEX_COL|OBJECTPROPERTY|OBJECTPROPERTYEX|OBJECT_DEFINITION|OBJECT_ID|OBJECT_NAME|OBJECT_SCHEMA_NAME|ORIGINAL_DB_NAME|PARSENAME|SCHEMA_ID|SCHEMA_NAME|SCOPE_IDENTITY|SERVERPROPERTY|STATS_DATE|TYPEPROPERTY|TYPE_ID|TYPE_NAME|CERTENCODED|CERTPRIVATEKEY|CURRENT_USER|DATABASE_PRINCIPAL_ID|HAS_PERMS_BY_NAME|IS_MEMBER|IS_ROLEMEMBER|IS_SRVROLEMEMBER|ORIGINAL_LOGIN|PERMISSIONS|PWDCOMPARE|PWDENCRYPT|SCHEMA_ID|SCHEMA_NAME|SESSION_USER|SUSER_ID|SUSER_NAME|SUSER_SID|SUSER_SNAME|SYS.FN_BUILTIN_PERMISSIONS|SYS.FN_GET_AUDIT_FILE|SYS.FN_MY_PERMISSIONS|SYSTEM_USER|USER_ID|USER_NAME|ASCII|CHAR|CHARINDEX|CONCAT|DIFFERENCE|FORMAT|LEN|LOWER|LTRIM|NCHAR|PATINDEX|QUOTENAME|REPLACE|REPLICATE|REVERSE|RTRIM|SOUNDEX|SPACE|STR|STUFF|SUBSTRING|UNICODE|UPPER|$PARTITION|@@ERROR|@@IDENTITY|@@PACK_RECEIVED|@@ROWCOUNT|@@TRANCOUNT|BINARY_CHECKSUM|CHECKSUM|CONNECTIONPROPERTY|CONTEXT_INFO|CURRENT_REQUEST_ID|ERROR_LINE|ERROR_MESSAGE|ERROR_NUMBER|ERROR_PROCEDURE|ERROR_SEVERITY|ERROR_STATE|FORMATMESSAGE|GETANSINULL|GET_FILESTREAM_TRANSACTION_CONTEXT|HOST_ID|HOST_NAME|ISNULL|ISNUMERIC|MIN_ACTIVE_ROWVERSION|NEWID|NEWSEQUENTIALID|ROWCOUNT_BIG|XACT_STATE|@@CONNECTIONS|@@CPU_BUSY|@@IDLE|@@IO_BUSY|@@PACKET_ERRORS|@@PACK_RECEIVED|@@PACK_SENT|@@TIMETICKS|@@TOTAL_ERRORS|@@TOTAL_READ|@@TOTAL_WRITE|FN_VIRTUALFILESTATS|PATINDEX|TEXTPTR|TEXTVALID|COALESCE|NULLIF"),o="BIGINT|BINARY|BIT|CHAR|CURSOR|DATE|DATETIME|DATETIME2|DATETIMEOFFSET|DECIMAL|FLOAT|HIERARCHYID|IMAGE|INTEGER|INT|MONEY|NCHAR|NTEXT|NUMERIC|NVARCHAR|REAL|SMALLDATETIME|SMALLINT|SMALLMONEY|SQL_VARIANT|TABLE|TEXT|TIME|TIMESTAMP|TINYINT|UNIQUEIDENTIFIER|VARBINARY|VARCHAR|XML",e="sp_addextendedproc|sp_addextendedproperty|sp_addmessage|sp_addtype|sp_addumpdevice|sp_add_data_file_recover_suspect_db|sp_add_log_file_recover_suspect_db|sp_altermessage|sp_attach_db|sp_attach_single_file_db|sp_autostats|sp_bindefault|sp_bindrule|sp_bindsession|sp_certify_removable|sp_clean_db_file_free_space|sp_clean_db_free_space|sp_configure|sp_control_plan_guide|sp_createstats|sp_create_plan_guide|sp_create_plan_guide_from_handle|sp_create_removable|sp_cycle_errorlog|sp_datatype_info|sp_dbcmptlevel|sp_dbmmonitoraddmonitoring|sp_dbmmonitorchangealert|sp_dbmmonitorchangemonitoring|sp_dbmmonitordropalert|sp_dbmmonitordropmonitoring|sp_dbmmonitorhelpalert|sp_dbmmonitorhelpmonitoring|sp_dbmmonitorresults|sp_db_increased_partitions|sp_delete_backuphistory|sp_depends|sp_describe_first_result_set|sp_describe_undeclared_parameters|sp_detach_db|sp_dropdevice|sp_dropextendedproc|sp_dropextendedproperty|sp_dropmessage|sp_droptype|sp_execute|sp_executesql|sp_getapplock|sp_getbindtoken|sp_help|sp_helpconstraint|sp_helpdb|sp_helpdevice|sp_helpextendedproc|sp_helpfile|sp_helpfilegroup|sp_helpindex|sp_helplanguage|sp_helpserver|sp_helpsort|sp_helpstats|sp_helptext|sp_helptrigger|sp_indexoption|sp_invalidate_textptr|sp_lock|sp_monitor|sp_prepare|sp_prepexec|sp_prepexecrpc|sp_procoption|sp_recompile|sp_refreshview|sp_releaseapplock|sp_rename|sp_renamedb|sp_resetstatus|sp_sequence_get_range|sp_serveroption|sp_setnetname|sp_settriggerorder|sp_spaceused|sp_tableoption|sp_unbindefault|sp_unbindrule|sp_unprepare|sp_updateextendedproperty|sp_updatestats|sp_validname|sp_who|sys.sp_merge_xtp_checkpoint_files|sys.sp_xtp_bind_db_resource_pool|sys.sp_xtp_checkpoint_force_garbage_collection|sys.sp_xtp_control_proc_exec_stats|sys.sp_xtp_control_query_exec_stats|sys.sp_xtp_unbind_db_resource_pool",t="ABSOLUTE|ACTION|ADA|ADD|ADMIN|AFTER|AGGREGATE|ALIAS|ALL|ALLOCATE|ALTER|AND|ANY|ARE|ARRAY|AS|ASC|ASENSITIVE|ASSERTION|ASYMMETRIC|AT|ATOMIC|AUTHORIZATION|BACKUP|BEFORE|BEGIN|BETWEEN|BIT_LENGTH|BLOB|BOOLEAN|BOTH|BREADTH|BREAK|BROWSE|BULK|BY|CALL|CALLED|CARDINALITY|CASCADE|CASCADED|CASE|CATALOG|CHARACTER|CHARACTER_LENGTH|CHAR_LENGTH|CHECK|CHECKPOINT|CLASS|CLOB|CLOSE|CLUSTERED|COALESCE|COLLATE|COLLATION|COLLECT|COLUMN|COMMIT|COMPLETION|COMPUTE|CONDITION|CONNECT|CONNECTION|CONSTRAINT|CONSTRAINTS|CONSTRUCTOR|CONTAINS|CONTAINSTABLE|CONTINUE|CORR|CORRESPONDING|COVAR_POP|COVAR_SAMP|CREATE|CROSS|CUBE|CUME_DIST|CURRENT|CURRENT_CATALOG|CURRENT_DATE|CURRENT_DEFAULT_TRANSFORM_GROUP|CURRENT_PATH|CURRENT_ROLE|CURRENT_SCHEMA|CURRENT_TIME|CURRENT_TRANSFORM_GROUP_FOR_TYPE|CYCLE|DATA|DATABASE|DBCC|DEALLOCATE|DEC|DECLARE|DEFAULT|DEFERRABLE|DEFERRED|DELETE|DENY|DEPTH|DEREF|DESC|DESCRIBE|DESCRIPTOR|DESTROY|DESTRUCTOR|DETERMINISTIC|DIAGNOSTICS|DICTIONARY|DISCONNECT|DISK|DISTINCT|DISTRIBUTED|DOMAIN|DOUBLE|DROP|DUMP|DYNAMIC|EACH|ELEMENT|ELSE|END|END-EXEC|EQUALS|ERRLVL|ESCAPE|EVERY|EXCEPT|EXCEPTION|EXEC|EXECUTE|EXISTS|EXIT|EXTERNAL|EXTRACT|FETCH|FILE|FILLFACTOR|FILTER|FIRST|FOR|FOREIGN|FORTRAN|FOUND|FREE|FREETEXT|FREETEXTTABLE|FROM|FULL|FULLTEXTTABLE|FUNCTION|FUSION|GENERAL|GET|GLOBAL|GO|GOTO|GRANT|GROUP|HAVING|HOLD|HOLDLOCK|HOST|HOUR|IDENTITY|IDENTITYCOL|IDENTITY_INSERT|IF|IGNORE|IMMEDIATE|IN|INCLUDE|INDEX|INDICATOR|INITIALIZE|INITIALLY|INNER|INOUT|INPUT|INSENSITIVE|INSERT|INTEGER|INTERSECT|INTERSECTION|INTERVAL|INTO|IS|ISOLATION|ITERATE|JOIN|KEY|KILL|LANGUAGE|LARGE|LAST|LATERAL|LEADING|LESS|LEVEL|LIKE|LIKE_REGEX|LIMIT|LINENO|LN|LOAD|LOCAL|LOCALTIME|LOCALTIMESTAMP|LOCATOR|MAP|MATCH|MEMBER|MERGE|METHOD|MINUTE|MOD|MODIFIES|MODIFY|MODULE|MULTISET|NAMES|NATIONAL|NATURAL|NCLOB|NEW|NEXT|NO|NOCHECK|NONCLUSTERED|NONE|NORMALIZE|NOT|NULL|NULLIF|OBJECT|OCCURRENCES_REGEX|OCTET_LENGTH|OF|OFF|OFFSETS|OLD|ON|ONLY|OPEN|OPERATION|OPTION|OR|ORDER|ORDINALITY|OUT|OUTER|OUTPUT|OVER|OVERLAPS|OVERLAY|PAD|PARAMETER|PARAMETERS|PARTIAL|PARTITION|PASCAL|PATH|PERCENT|PERCENTILE_CONT|PERCENTILE_DISC|PERCENT_RANK|PIVOT|PLAN|POSITION|POSITION_REGEX|POSTFIX|PRECISION|PREFIX|PREORDER|PREPARE|PRESERVE|PRIMARY|PRINT|PRIOR|PRIVILEGES|PROC|PROCEDURE|PUBLIC|RAISERROR|RANGE|READ|READS|READTEXT|RECONFIGURE|RECURSIVE|REF|REFERENCES|REFERENCING|REGR_AVGX|REGR_AVGY|REGR_COUNT|REGR_INTERCEPT|REGR_R2|REGR_SLOPE|REGR_SXX|REGR_SXY|REGR_SYY|RELATIVE|RELEASE|REPLICATION|RESTORE|RESTRICT|RESULT|RETURN|RETURNS|REVERT|REVOKE|ROLE|ROLLBACK|ROLLUP|ROUTINE|ROW|ROWCOUNT|ROWGUIDCOL|ROWS|RULE|SAVE|SAVEPOINT|SCHEMA|SCOPE|SCROLL|SEARCH|SECOND|SECTION|SECURITYAUDIT|SELECT|SEMANTICKEYPHRASETABLE|SEMANTICSIMILARITYDETAILSTABLE|SEMANTICSIMILARITYTABLE|SENSITIVE|SEQUENCE|SESSION|SET|SETS|SETUSER|SHUTDOWN|SIMILAR|SIZE|SOME|SPECIFIC|SPECIFICTYPE|SQL|SQLCA|SQLCODE|SQLERROR|SQLEXCEPTION|SQLSTATE|SQLWARNING|START|STATE|STATEMENT|STATIC|STATISTICS|STDDEV_POP|STDDEV_SAMP|STRUCTURE|SUBMULTISET|SUBSTRING_REGEX|SYMMETRIC|SYSTEM|TABLESAMPLE|TEMPORARY|TERMINATE|TEXTSIZE|THAN|THEN|TIMEZONE_HOUR|TIMEZONE_MINUTE|TO|TOP|TRAILING|TRAN|TRANSACTION|TRANSLATE|TRANSLATE_REGEX|TRANSLATION|TREAT|TRIGGER|TRIM|TRUNCATE|TSEQUAL|UESCAPE|UNDER|UNION|UNIQUE|UNKNOWN|UNNEST|UNPIVOT|UPDATE|UPDATETEXT|USAGE|USE|USER|USING|VALUE|VALUES|VARIABLE|VARYING|VAR_POP|VAR_SAMP|VIEW|WAITFOR|WHEN|WHENEVER|WHERE|WHILE|WIDTH_BUCKET|WINDOW|WITH|WITHIN|WITHIN GROUP|WITHOUT|WORK|WRITE|WRITETEXT|XMLAGG|XMLATTRIBUTES|XMLBINARY|XMLCAST|XMLCOMMENT|XMLCONCAT|XMLDOCUMENT|XMLELEMENT|XMLEXISTS|XMLFOREST|XMLITERATE|XMLNAMESPACES|XMLPARSE|XMLPI|XMLQUERY|XMLSERIALIZE|XMLTABLE|XMLTEXT|XMLVALIDATE|ZONE",a=(t=(t=(t=(t=(t=t+"|KEEPIDENTITY|KEEPDEFAULTS|IGNORE_CONSTRAINTS|IGNORE_TRIGGERS|XLOCK|FORCESCAN|FORCESEEK|HOLDLOCK|NOLOCK|NOWAIT|PAGLOCK|READCOMMITTED|READCOMMITTEDLOCK|READPAST|READUNCOMMITTED|REPEATABLEREAD|ROWLOCK|SERIALIZABLE|SNAPSHOT|SPATIAL_WINDOW_MAX_CELLS|TABLOCK|TABLOCKX|UPDLOCK|XLOCK|IGNORE_NONCLUSTERED_COLUMNSTORE_INDEX|EXPAND|VIEWS|FAST|FORCE|KEEP|KEEPFIXED|MAXDOP|MAXRECURSION|OPTIMIZE|PARAMETERIZATION|SIMPLE|FORCED|RECOMPILE|ROBUST|PLAN|SPATIAL_WINDOW_MAX_CELLS|NOEXPAND|HINT"+"|LOOP|HASH|MERGE|REMOTE")+"|TRY|CATCH|THROW"+"|TYPE").split("|")).filter(function(e,t,a){return-1===i.split("|").indexOf(e)&&-1===r.split("|").indexOf(e)&&-1===o.split("|").indexOf(e)})).sort().join("|"),this.createKeywordMapper({"constant.language":i,"storage.type":o,"support.function":r,"support.storedprocedure":e,keyword:t},"identifier",!0)),s="SET ANSI_DEFAULTS|SET ANSI_NULLS|SET ANSI_NULL_DFLT_OFF|SET ANSI_NULL_DFLT_ON|SET ANSI_PADDING|SET ANSI_WARNINGS|SET ARITHABORT|SET ARITHIGNORE|SET CONCAT_NULL_YIELDS_NULL|SET CURSOR_CLOSE_ON_COMMIT|SET DATEFIRST|SET DATEFORMAT|SET DEADLOCK_PRIORITY|SET FIPS_FLAGGER|SET FMTONLY|SET FORCEPLAN|SET IDENTITY_INSERT|SET IMPLICIT_TRANSACTIONS|SET LANGUAGE|SET LOCK_TIMEOUT|SET NOCOUNT|SET NOEXEC|SET NUMERIC_ROUNDABORT|SET OFFSETS|SET PARSEONLY|SET QUERY_GOVERNOR_COST_LIMIT|SET QUOTED_IDENTIFIER|SET REMOTE_PROC_TRANSACTIONS|SET ROWCOUNT|SET SHOWPLAN_ALL|SET SHOWPLAN_TEXT|SET SHOWPLAN_XML|SET STATISTICS IO|SET STATISTICS PROFILE|SET STATISTICS TIME|SET STATISTICS XML|SET TEXTSIZE|SET XACT_ABORT".split("|"),n="READ UNCOMMITTED|READ COMMITTED|REPEATABLE READ|SNAPSHOP|SERIALIZABLE".split("|"),d=0;d<n.length;d++)s.push("SET TRANSACTION ISOLATION LEVEL "+n[d]);for(this.$rules={start:[{token:"string.start",regex:"'",next:[{token:"constant.language.escape",regex:/''/},{token:"string.end",next:"start",regex:"'"},{defaultToken:"string"}]},u.getStartRule("doc-start"),{token:"comment",regex:"--.*$"},{token:"comment",start:"/\\*",end:"\\*/"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:a,regex:"@{0,2}[a-zA-Z_$][a-zA-Z0-9_$]*\\b(?!])"},{token:"constant.class",regex:"@@?[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"\\+|\\-|\\/|\\/\\/|%|<@>|@>|<@|&|\\^|~|<|>|<=|=>|==|!=|<>|=|\\*"},{token:"paren.lparen",regex:"[\\(]"},{token:"paren.rparen",regex:"[\\)]"},{token:"punctuation",regex:",|;"},{token:"text",regex:"\\s+"}],comment:[u.getTagRule(),{token:"comment",regex:"\\*\\/",next:"no_regex"},{defaultToken:"comment",caseInsensitive:!0}]},d=0;d<s.length;d++)this.$rules.start.unshift({token:"set.statement",regex:s[d]});function l(e,t){e.forEach(function(e){c.push({name:e,value:e,score:0,meta:t})})}this.embedRules(u,"doc-",[u.getEndRule("start")]),this.normalizeRules();var c=[];l(e.split("|"),"procedure"),l(i.split("|"),"operator"),l(r.split("|"),"function"),l(o.split("|"),"type"),l(s,"statement"),l(t.split("|"),"keyword"),this.completions=c}var r=lr.a.require("ace/lib/oop"),u=lr.a.require("ace/mode/doc_comment_highlight_rules").DocCommentHighlightRules,o=lr.a.require("ace/mode/text_highlight_rules").TextHighlightRules;r.inherits(i,o),t.SqlHighlightRules=i}),lr.a.define("ace/mode/sql",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/sql_highlight_rules","ace/range"],function(e,t,a){function i(){this.HighlightRules=s}var r=lr.a.require("ace/lib/oop"),o=lr.a.require("ace/mode/text").Mode,s=lr.a.require("ace/mode/sql_highlight_rules").SqlHighlightRules;lr.a.require("ace/range").Range;r.inherits(i,o),function(){this.lineCommentStart="--",this.$id="ace/mode/sql"}.call(i.prototype),t.Mode=i}));class hr extends C.Disposable{constructor(e,t){super(),this._tableQueryString=_.observable(""),this._query=_.observable(),this._needToCustomizeParameters=_.pureComputed(()=>this._query()&&(this._query().type()===u.customSqlQuery||0<this._query().parameters().length)),this.template="dxrd-select-control",this.aceOptions=cr(),this.additionalOptions=ur(e=>{this.sqlString(e)}),this.aceAvailable=Object(P.aceAvailable)(),this.languageHelper=pr(),this.caption=()=>Object(C.getLocalization)("SQL string:","DataAccessUIStringId.QueryControl_SqlString"),this.sqlString=_.pureComputed({read:()=>this._query()&&this._query().type()===u.customSqlQuery?this._query().sqlString():this._tableQueryString(),write:e=>{var t;this._query().type()!==u.customSqlQuery?((t=new wt({"@Name":this._query().name()},this._query().parent)).parameters(this._query().parameters()),t.sqlString(e),this._query(t)):this._query().sqlString(e)}}),this.isNextDisabled=_.pureComputed(()=>!this.sqlString()||!this._needToCustomizeParameters()),this.isFinishDisabled=_.pureComputed(()=>!this.sqlString()||this._needToCustomizeParameters()),this._sqlTextProvider=e,this.disableCustomSql=()=>t,this.aceOptions.readOnly=this.disableCustomSql(),this._disposables.push(this._needToCustomizeParameters,this.sqlString)}setQuery(t,e){return this._query()!==t&&t.type()===u.tableQuery?(e&&e(!0),this._sqlTextProvider.getQuerySqlText(t).done(e=>{e.errorMessage&&Object(v.ShowMessage)(e.errorMessage),this._tableQueryString(e.sqlSelectStatement),this._query(t)}).always(()=>{e&&e(!1)})):(this._query(t),T.Deferred().resolve().promise())}getQuery(){return this._query()}get runQueryBuilderDisabled(){return!1}}class mr extends C.Disposable{constructor(){super(),this.template="dxrd-procedures-control",this.storedProcedures=_.observableArray([]),this.selectedProcedure=_.observableArray([]),this.caption=()=>Object(C.getLocalization)("Select a stored procedure:","DataAccessUIStringId.StoredProcControl_Caption"),this.generateStoredProcedureDisplayName=e=>mr.generateStoredProcedureDisplayName(e),this.isNextDisabled=_.pureComputed(()=>!this._selectedProcedure||!this._needToProcessParameters(this._selectedProcedure)),this.isFinishDisabled=_.pureComputed(()=>!this._selectedProcedure||this._needToProcessParameters(this._selectedProcedure)),this.storedProcedures.subscribe(e=>{e?this._selectedProcedure?this._selectedProcedure=Object(v.getFirstItemByPropertyValue)(this.storedProcedures(),"name",this._selectedProcedure.name):this._query&&this._query.procName()?this._selectedProcedure=Object(v.getFirstItemByPropertyValue)(this.storedProcedures(),"name",this._query.procName()):this._selectedProcedure=e[0]:this._selectedProcedure=null})}_needToProcessParameters(e){return e.arguments.some(mr._availableConvertToParameter)}static _availableConvertToParameter(e){return e.direction!==Pe.Out}get _selectedProcedure(){return this.selectedProcedure()[0]}set _selectedProcedure(e){this.selectedProcedure(e?[e]:[])}scrollActiveItem(e){var t=e.model.selectedProcedure.peek();e.component.scrollToItem(t[0])}static generateStoredProcedureDisplayName(e){return 0===e.arguments.length?e.name:e.arguments.reduce((e,t,a,i)=>e+(t.name+(a<i.length-1?", ":")")),e.name+"(")}setQuery(e){return this._query=e,this._selectedProcedure=Object(v.getFirstItemByPropertyValue)(this.storedProcedures(),"name",e.procName()),T.Deferred().resolve().promise()}getQuery(){var t;return this._selectedProcedure?(t=new zt({"@Name":this._query.name()||this._selectedProcedure.name,ProcName:this._selectedProcedure.name},this._query.parent),this._selectedProcedure.arguments.forEach(e=>{mr._availableConvertToParameter(e)&&t.parameters.push(Object(v.getFirstItemByPropertyValue)(this._query.parameters(),"name",e.name)||new g({"@Name":e.name,"@Type":we.GetType(e.type)},null,_t(we.GetType(e.type))))}),t):null}get runQueryBuilderDisabled(){return!0}}class gr extends I{constructor(e){super(),this._options=e,this._connection=()=>this._dataSource().connection,this._dataSource=()=>this._dataSourceWrapper&&this._dataSourceWrapper.sqlDataSource,this.queryNameCaption=()=>Object(C.getLocalization)("Query Name","AnalyticsCoreStringId.SqlDSWizard_QueryName")+":",this.queryControl=_.observable(),this.runQueryBuilderBtnText=_.pureComputed(()=>this._selectStatementControl.sqlString()&&this._selectStatementControl.getQuery().type()!==u.tableQuery?Object(C.getLocalization)("Create New Query...","AnalyticsCoreStringId.SqlDSWizard_CreateNewQuery"):Object(C.getLocalization)("Run Query Builder...","DataAccessUIStringId.Button_QueryBuilder")).extend({deferred:!0}),this.placeholder=()=>{var e=this.queryControl(),e=e&&e.getQuery(),e=this.initialName||e&&e.generateName();return e&&Object(v.formatUnicorn)(Object(C.getLocalization)("Type custom query name (current name: {0})","AnalyticsCoreStringId.SqlDSWizard_QueryNamePlaceholder"),e)},this.queryName=_.observable(""),this.queryTypeItems=[gr.QUERY_TEXT,gr.SP_TEXT],this.selectedQueryType=_.observable(),this.initialName="",this._proceduresList=new mr,this._disposables.push(this._selectStatementControl=new hr(new dr(ir(this._options.callbacks.selectStatement),this._connection),this._options.disableCustomSql)),this._disposables.push(this.selectedQueryType.subscribe(e=>{e===gr.SP_TEXT?(this[ja]&&this[ja](!0),this._dataSource().dbSchemaProvider.getDbStoredProcedures().done(e=>{this._proceduresList.storedProcedures([]),this._proceduresList.storedProcedures(e)}).always(e=>this[ja]&&this[ja](!1)),this.queryControl(this._proceduresList)):this.queryControl(this._selectStatementControl)})),this.selectedQueryType(gr.QUERY_TEXT),this.popupQueryBuilder=new nr((e,t)=>(this.queryName(e.name()||e.generateName()),this._selectStatementControl.setQuery(e,t)),this._options.rtl,this._options.callbacks.customizeQBInitData)}canNext(){return!this.queryControl().isNextDisabled()}canFinish(){return!this.queryControl().isFinishDisabled()||!this.queryControl().isNextDisabled()}runQueryBuilder(){var e=this.queryControl().getQuery();e&&e.type()===u.tableQuery?(e.name(this.queryName()),this.popupQueryBuilder.show(e,this._dataSource())):this.popupQueryBuilder.show(new $t({"@Name":this.queryName()},this._dataSource()),this._dataSource())}localizeQueryType(e){return gr.QUERY_TEXT===e?Object(C.getLocalization)(gr.QUERY_TEXT,"DataAccessUIStringId.WizardPageConfigureQuery_Query"):Object(C.getLocalization)(gr.SP_TEXT,"DataAccessUIStringId.WizardPageConfigureQuery_StoredProcedure")}initialize(e){return this._dataSourceWrapper=Qa(e,this._options.requestWrapper),this._proceduresList.setQuery(new zt({},this._dataSource())),this._selectStatementControl.setQuery(new wt({},this._dataSource())),this.popupQueryBuilder.isVisible(!1),this._dataSourceWrapper.sqlQuery?(this.initialName=this._dataSourceWrapper.sqlQuery.name(),this.queryName(this.initialName),this.selectedQueryType(this._dataSourceWrapper.sqlQuery.type()===u.storedProcQuery?gr.SP_TEXT:gr.QUERY_TEXT),this.queryControl().setQuery(this._dataSourceWrapper.sqlQuery)):(this.selectedQueryType(gr.QUERY_TEXT),T.Deferred().resolve().promise())}commit(){var e,t=this.queryControl().getQuery();return t&&((e=this.queryName()||this.initialName)&&t.name(e),t.name()&&this._dataSourceWrapper.sqlQuery&&this._dataSourceWrapper.sqlQuery.name()===t.name()||t.name(ka(this._dataSource().queries(),t)),this._dataSourceWrapper.sqlQuery=t),T.Deferred().resolve({queryName:this._dataSourceWrapper.sqlQuery.name(),sqlDataSourceJSON:this._dataSourceWrapper.save()}).promise()}}function br(e,t){e.registerMetadata(N.ConfigureQueryPage,{create:()=>new gr(t),setState:(e,t)=>{t.queryName=e.queryName,t.sqlDataSourceJSON=e.sqlDataSourceJSON},getState:e=>e.sqlDataSourceWizard,resetState:(e,t)=>{e.sqlDataSourceJSON=t.sqlDataSourceJSON,e.queryName=t.queryName},template:"dxrd-wizard-create-query-page",description:Object(v.localizeWithUpdateLocalizationMethod)("Create a query or select a stored procedure")||Object(C.getLocalization)("Create a query or select a stored procedure.",v.StringId.WizardPageConfigureQuery)})}gr.QUERY_TEXT="Query",gr.SP_TEXT="Stored Procedure";class fr extends I{constructor(e={createParameterViewModel:e=>e,getParameterFromViewModel:e=>e},t){super(),this.parametersConverter=e,this._requestWrapper=t,this._sqlDataSourceWrapper=new qa(void 0,void 0,this._requestWrapper),this.removeButtonTitle=Object(C.getLocalization)("Remove","DataAccessUIStringId.Button_Remove"),this.parametersEditorOptions={addHandler:()=>this.parametersConverter.createParameterViewModel(new g({"@Name":Object(v.getUniqueNameForNamedObjectsArray)(this.parametersEditorOptions.values.peek().peek(),"param"),"@Type":"System.Int32"})),values:_.observable(_.observableArray([])),displayName:"Parameters",level:0,info:_.observable({displayName:"Parameters",localizationId:"DevExpress.DataAccess.Sql.SqlQuery.Parameters",propertyName:"parameters",modelName:"Parameter",array:!0,editor:x.editorTemplates.getEditor("commonCollection"),template:"#dxrd-parameter-collection-item"}),editorTemplate:"#dxrd-wizard-datasource-parameters",hideButtons:_.observable(!1),collapsed:!1}}_isParametersValid(){return this.getParameters().every(e=>e.isValid())}canNext(){return!1}canFinish(){return this._isParametersValid()}getParameters(){return this.parametersEditorOptions.values()()}initialize(e){return this._sqlDataSourceWrapper=Qa(e,this._requestWrapper),this.parametersEditorOptions.hideButtons(this._sqlDataSourceWrapper.sqlQuery.type()===u.storedProcQuery),setTimeout(()=>{this.parametersEditorOptions.values(_.observableArray(this._sqlDataSourceWrapper.sqlQuery.parameters().map(e=>this.parametersConverter.createParameterViewModel(e))))},100),T.Deferred().resolve().promise()}commit(){return this._sqlDataSourceWrapper.sqlQuery.parameters(this.parametersEditorOptions.values()().map(e=>this.parametersConverter.getParameterFromViewModel(e))),T.Deferred().resolve({sqlDataSourceJSON:this._sqlDataSourceWrapper.save()}).promise()}}function yr(e,t,a){e.registerMetadata(N.ConfigureParametersPage,{create:()=>new fr(a,t),getState:e=>e.sqlDataSourceWizard,setState:(e,t)=>t.sqlDataSourceJSON=e.sqlDataSourceJSON,resetState:()=>{},template:"dxrd-page-configure-parameters",description:Object(C.getLocalization)("Configure query parameters.","AnalyticsCoreStringId.SqlDSWizard_PageConfigureParameters")})}class Sr extends C.Disposable{constructor(a,r,e,t,o){super(),this._callBack=_.observable({deleteAction:t=>{this._customQueries.remove(Object(v.findFirstItemMatchesCondition)(this._customQueries(),e=>(e.name()||e.generateName())===t))},showQbCallBack:null,disableCustomSql:!1}),this._checkedRootNodesCount=_.pureComputed(()=>{for(var e=0,t=0;t<this._rootItems.length&&e<2;t++)e+=this._rootItems[t].countChecked();return e}),this.hasCheckedItems=_.pureComputed(()=>!(0===this._checkedRootNodesCount())),this.nextButtonDisabled=_.pureComputed(()=>!(1<this._checkedRootNodesCount()||this.hasParametersToEdit())),this.hasParametersToEdit=_.pureComputed(()=>{for(var e=0;e<this._rootItems.length;e++)if(this._rootItems[e].hasParamsToEdit&&this._rootItems[e].hasParamsToEdit())return!0;return!1}),this.tables=()=>this._tables,this.views=()=>this._views,this.procedures=()=>this._procedures,this.queries=()=>this._queries,this.customQueries=()=>this._customQueries,this._callBack().showQbCallBack=e,this._callBack().disableCustomSql=t,this._tables=new Ui("tables",Object(C.getLocalization)("Tables","DataAccessStringId.ConfigureMultiQueryPage_TableCategory"),"list",!1,o),this._views=new Ui("views",Object(C.getLocalization)("Views","DataAccessStringId.ConfigureMultiQueryPage_ViewCategory"),"list",!1,o),this._procedures=new Hi("procedures",Object(C.getLocalization)("Stored Procedures","DataAccessStringId.ConfigureMultiQueryPage_SpCategory"),"list",!1,o),this._queries=new Ji("queries",Object(C.getLocalization)("Queries","DataAccessStringId.ConfigureMultiQueryPage_QueryCategory"),"list",!1,this._callBack,o),this._disposables.push(this._tables,this._views,this._procedures,this._queries),this._rootItems=[this._tables,this._views,this._procedures,this._queries],this.getItems=e=>{var t,i=T.Deferred();return e.fullPath?"tables"===e.fullPath?a.getDbSchema().done(e=>{var t;0===this._tables.children().length?(t=[],e.tables.forEach(e=>{e.isView||t.push(new Ui(e.name,e.name,"table",this._tables.checked.peek(),o))}),this._tables.initializeChildren(t),i.resolve(t)):i.resolve(this._tables.children())}).fail(i.reject):"views"===e.fullPath?a.getDbSchema().done(e=>{var t;0===this._views.children().length?(t=[],e.tables.forEach(e=>{e.isView&&t.push(new Ui(e.name,e.name,"view",this._views.checked.peek(),o))}),this._views.initializeChildren(t),i.resolve(t)):i.resolve(this._views.children())}).fail(i.reject):"procedures"===e.fullPath?a.getDbStoredProcedures().done(e=>{0===this._procedures.children().length?(e=e.map(e=>{e=new Fi(e.name,mr.generateStoredProcedureDisplayName(e),"procedure",this._procedures.checked.peek(),e.arguments,o);return this._disposables.push(e),e}),this._procedures.initializeChildren(e),i.resolve(e)):i.resolve(this._procedures.children())}).fail(i.reject):"queries"===e.fullPath?(t=r().map(t=>{var e=t.name()||t.generateName(),a=this._queries.children().filter(e=>e.query===t)[0];return a||(e=new Gi(e,e,"query",!!a&&a.checked(),t.parameters,this._callBack,o,t),this._disposables.push(e),e.setObservableName(_.computed({read:()=>t.name()||t.generateName(),write:e=>t.name(e)})),e)}),this._queries.initializeChildren(t),i.resolve(t)):a.getDbTable(e.path).done(t=>{var e,a=t.isView?Object(v.findFirstItemMatchesCondition)(this._views.children(),e=>e.name===t.name):Object(v.findFirstItemMatchesCondition)(this._tables.children(),e=>e.name===t.name);0===a.children().length?(e=t.columns.map(e=>{e=new Fi(e.name,e.name,"column",a.checked.peek(),null,o);return this._disposables.push(e),e}),a.initializeChildren(e),i.resolve(e)):i.resolve(a.children())}).fail(i.reject):i.resolve(this._rootItems),i.promise()},this._customQueries=r}}class xr{constructor(e,t){this.globalState=e,this.pageFactory=t,this.defaultState=Object(v.extend)(!0,{},e)}_getPageState(e,t=this.globalState){return this.pageFactory.getMetadata(e).getState(t)}setPageState(e,t){this.pageFactory.getMetadata(e).setState(t,this.getPageState(e))}getPageState(e){return this._getPageState(e)}resetPageState(e){var t=Object(v.extend)(!0,{},this._getPageState(e,this.defaultState));this.pageFactory.getMetadata(e).resetState(this.getPageState(e),t)}getCurrentState(){return this.globalState}reset(){this.globalState.reset()}}class vr extends C.Disposable{constructor(e,t,a=()=>{}){super(),this.pageFactory=e,this.stateManager=t,this._onResetPage=a,this._pages=[],this._currentIndex=0}dispose(){this._pages.forEach(e=>e.dispose()),this._pages=[]}__resetPages(e){if(e<this._pages.length)for(var t=this._pages.length-1;e<=t;t--)this.stateManager.resetPageState(this._pages[t].pageId),this._onResetPage(this._pages[t]),this._pages[t].dispose(),this._pages.splice(t,1)}_nextPage(){return this._pages[this._currentIndex+1]}_getNextExistingPage(){this._currentIndex+=1;var e=T.Deferred();return e.resolve(this._pages[this._currentIndex]),e.promise()}_resetPages(){this.__resetPages(this._currentIndex+1)}_getNextNewPage(e){this._currentIndex+=1;var t=T.Deferred(),a=(this.__resetPages(this._currentIndex),this.pageFactory.getMetadata(e)),e=new Ka(e,a.create(),a.template,a.description);return this._pages.push(e),t.resolve(e),t.promise()}_getStartPage(e){e=e||this.getNextPageId();var t=this.pageFactory.getMetadata(e),e=new Ka(e,t.create(),t.template,t.description);return this._pages.push(e),e}_getNextPage(){var e,t=this._getCurrentPage();return t.isChanged||!this._nextPage()?(e=this.getNextPageId(this._getCurrentPage().pageId))?(t.isChanged=!1,this._getNextNewPage(e)):T.Deferred().reject().promise():this._getNextExistingPage()}_getPreviousPage(){var e=T.Deferred();return this._currentIndex-1<0?e.reject(null):(--this._currentIndex,e.resolve(this._pages[this._currentIndex])),e.promise()}_goToPage(t){var e=T.Deferred(),a=this._pages.filter(e=>e.pageId===t)[0];return a?(this._currentIndex=this._pages.indexOf(a),e.resolve(a)):e.reject(null),e.promise()}_getCurrentPage(){return this._pages[this._currentIndex]}_getCurrentState(){return this.stateManager.getCurrentState()}getNextPageId(e){return""}}class _r extends C.Disposable{constructor(e,t){super(),this.pageFactory=e,this.events=new C.EventManager,this._loadingTimeout=null,this.isLoading=_.observable(!1),this._currentPage=_.observable(),this.isVisible=_.observable(!1),this._finishCallback=t,this._disposables.push(this.events)}_createLoadingState(e){e[ja]||(e[ja]=e=>this._loadingState(e))}_createNextAction(e){e[za]||(e[za]=()=>this.nextAction())}_loadingState(e){e?(this._loadingTimeout&&clearTimeout(this._loadingTimeout),this._loadingTimeout=setTimeout(()=>{this.isLoading(!0)},100)):(this._loadingTimeout&&clearTimeout(this._loadingTimeout),this.isLoading(!1))}_callBeforeFinishHandler(e,t){this.events.call("beforeFinish",{state:e})}_callAfterFinishHandler(e,t){this.events.call("afterFinish",{state:e})}onFinish(){this.iterator.dispose()}initialize(e={},t=(e,t)=>new vr(e,t)){this.events.call("beforeInitialize",{wizard:this,state:e}),this.stateManager=new xr(e,this.pageFactory),this.iterator=t(this.pageFactory,this.stateManager),this.events.call("afterInitialize",{wizard:this})}isFirstPage(){return this._currentPage()&&this._currentPage().pageId==this.iterator.getNextPageId()}canNext(){return!this.isLoading()&&this._currentPage()&&this.pageFactory.getMetadata(this._currentPage().pageId).canNext(this._currentPage().page)}canFinish(){return!this.isLoading()&&this._currentPage()&&this.pageFactory.getMetadata(this._currentPage().pageId).canFinish(this._currentPage().page)}_initPage(e){return this.events.call("beforePageInitialize",Pi(e,this)),this._createLoadingState(e.page),this._createNextAction(e.page),e.initialize(this.stateManager.getPageState(e.pageId))}start(){this.events.call("beforeStart",{wizard:this}),this._loadingState(!0);var e=this.iterator._getStartPage();this._initPage(e).done(()=>{this._currentPage(e),this.events.call("afterPageInitialize",Ni(e,this))}).always(()=>this._loadingState(!1)).fail(()=>{this.isVisible(!1)})}canRunWizard(){return!0}nextAction(){var t,a;this.canNext()&&(t=this.iterator._getCurrentPage(),this._loadingState(!0),a=()=>this.iterator._getPreviousPage().always(()=>{this.iterator._resetPages(),this._loadingState(!1)}),t.commit().done(e=>{t.isChanged&&this.stateManager.setPageState(t.pageId,e),this.iterator._getNextPage().done(e=>{e?this._initPage(e).done(()=>{this._currentPage(e),this.events.call("afterPageInitialize",Ni(e,this)),this._loadingState(!1)}).fail(()=>a()):a()}).fail(()=>this._loadingState(!1))}).fail(()=>this._loadingState(!1)))}previousAction(){this.isFirstPage()||(this._loadingState(!0),this.iterator._getPreviousPage().done(e=>{e&&this._currentPage(e)}).always(()=>this._loadingState(!1)))}goToPage(e){this._loadingState(!0),this.iterator._goToPage(e).done(e=>{e&&this._currentPage(e)}).always(()=>this._loadingState(!1))}finishAction(){var a;this.canFinish()&&(this._loadingState(!0),(a=this.iterator._getCurrentPage()).commit().done(e=>{var t;this.stateManager.setPageState(a.pageId,e),this.iterator._resetPages(),this._finishCallback?(t=this.stateManager.getCurrentState(),this._callBeforeFinishHandler(t),this._finishCallback(t).done(e=>{this.onFinish(),this._callAfterFinishHandler(t,e),this.isVisible(!1)}).always(()=>{this._loadingState(!1)})):(this._loadingState(!1),this.isVisible(!1))}))}}class Cr extends _r{constructor(e,t){super(e,t),this.height=_.observable(520),this.width=_.observable(690),this._extendCssClass="",this._container=v.getParentContainer,this.itemsProvider=_.observable(),this.nextButton={text:Object(C.getLocalization)("Next","AnalyticsCoreStringId.Wizard_Next"),disabled:_.computed(()=>!this.canNext()),onClick:()=>this.nextAction()},this.cancelButton={text:Object(C.getLocalization)("Cancel","AnalyticsCoreStringId.SearchDialog_Cancel"),onClick:()=>{this.iterator.dispose(),this.isVisible(!1)}},this.previousButton={text:Object(C.getLocalization)("Previous","AnalyticsCoreStringId.Wizard_Previous"),disabled:_.computed(()=>this.isFirstPage()),onClick:()=>this.previousAction()},this.finishButton={text:Object(C.getLocalization)("Finish","AnalyticsCoreStringId.Wizard_Finish"),type:"default",disabled:_.computed(()=>!this.canFinish()),onClick:()=>this.finishAction()},this._titleTemplate=Object(x.getTemplate)("dx-wizard-headerNew"),this.title="Popup Wizard"}static _getLoadPanelViewModel(e,t){e=T.fn.constructor(e).closest(".dxrd-wizard-content");return{animation:{show:{type:"fade",from:0,to:1,duration:700},hide:{type:"fade",from:1,to:0,duration:700}},deferRendering:!1,message:Object(C.getLocalization)("Loading...","AnalyticsCoreStringId.Loading"),visible:t,shading:!0,shadingColor:"transparent",position:{of:e},container:e}}start(){super.start(),this.isVisible(!0)}_wizardPopupPosition(e){return{of:Object(v.getParentContainer)(e)}}_loadPanelViewModel(e){return this._getLoadPanelViewModel(e,this.isLoading)}_getLoadPanelViewModel(e,t){return Cr._getLoadPanelViewModel(e,t)}}class Tr extends P.TreeListController{constructor(e){super(),this._customizeDBSchemaTreeListActions=e}getActions(e){var t;return e.data&&(e.data instanceof Ji||e.data instanceof Gi)?(t=e.data.getActions(e),this._customizeDBSchemaTreeListActions&&this._customizeDBSchemaTreeListActions(e.data,t),t):[]}canSelect(e){return!0}}class Pr extends I{constructor(e){super(),this._options=e,this._selectedPath=_.observable(null),this._itemsProvider=_.observable(),this._customQueries=_.observableArray([]),this._checkedQueries=_.observableArray([]),this._sqlDataSourceWrapper=new qa(void 0,void 0,void 0),this._dataSource=()=>this._sqlDataSourceWrapper&&this._sqlDataSourceWrapper.sqlDataSource,this._dataConnection=()=>this._dataSource()&&this._dataSource().connection,this._showStatementPopup=e=>{this._popupSelectStatement.isVisible(!0),this._popupSelectStatement.query=e,this._popupSelectStatement.data(e.sqlString())},this._showQbCallBack=(t=null,e=!1)=>{var a;null!==t?(a=Object(v.findFirstItemMatchesCondition)(this._customQueries(),e=>t===(e.name()||e.generateName())),this._queryEditIndex(this._customQueries().indexOf(a)),a.type()===u.customSqlQuery?this._showStatementPopup(a):this._popupQueryBuilder.show(a,this._dataSource())):(this._queryEditIndex(-1),e?this._showStatementPopup(new wt({"@Name":null},this._dataSource())):(a=new $t({"@Name":null},this._dataSource()),this._popupQueryBuilder.show(a,this._dataSource())))},this._popupSelectStatement={isVisible:_.observable(!1),title:()=>Object(C.getLocalization)("Custom SQL Editor","AnalyticsCoreStringId.SqlDSWizard_CustomSqlEditor"),query:null,data:_.observable(),okButtonText:()=>Object(C.getLocalization)("OK","DataAccessUIStringId.Button_OK"),okButtonHandler:e=>{this._popupSelectStatement.query.sqlString(e.model.data()),this._setCustomSqlQuery(this._popupSelectStatement.query),e.model.isVisible(!1)},aceOptions:cr(),aceAvailable:Object(P.aceAvailable)(),additionalOptions:ur(e=>{this._popupSelectStatement.data(e)}),languageHelper:pr(),closest(e,t){return T.fn.constructor(e).closest(t)}},this._customResetOptions=T.noop,this._queryEditIndex=_.observable(-1),this.disableCustomSql=!0,this._scrollViewHeight="calc(100% - 37px)",this._customizeDBSchemaTreeListActions=null,this._isDataLoadingInProcess=_.observable(!1),this._callbacks=this._options.callbacks,this._sqlTextProvider=new dr(ir(this._callbacks.selectStatement),this._dataConnection),this._popupQueryBuilder=new nr((e,t)=>this._setTableQuery(e,t),e.rtl,e.callbacks.customizeQBInitData),this._fieldListModel=_.observable(null),this._disposables.push(this._hasParametersToEdit=_.pureComputed(()=>this._itemsProvider().hasParametersToEdit())),this._disposables.push(this._isDataLoadingInProcess.subscribe(e=>{e||this._onChange(),this[ja]&&this[ja](e)})),this.disableCustomSql=this._options.disableCustomSql,this._getItemsAfterCheck=t=>{this._resetDataSourceResult(),this._isDataLoadingInProcess(!0),t.checked.peek()&&t.isList?"tables"===t.name||"views"===t.name?this._itemsProvider().getItems(new C.PathRequest(t.name)).done(()=>{t.isList&&0<t.children.peek().length?T.when(...t.children.peek().map(e=>this._getItemsPromise(new C.PathRequest(t.name+"."+e.name)))).always(()=>this._isDataLoadingInProcess(!1)):this._isDataLoadingInProcess(!1)}):"table"===t.specifics||"view"===t.specifics?this._itemsProvider().getItems(new C.PathRequest(t.specifics+"."+t.name)).always(()=>this._isDataLoadingInProcess(!1)):"procedures"===t.name?this._itemsProvider().getItems(new C.PathRequest(t.name)).always(()=>this._isDataLoadingInProcess(!1)):this._isDataLoadingInProcess(!1):this._isDataLoadingInProcess(!1)}}_addQueryAlgorithm(e,t,a,i){e.unChecked()&&"queries"!==t?e.children().forEach(e=>{Pr._removeQuery(a.queries,e)}):(0===e.children().length&&this._itemsProvider().getItems(new C.PathRequest(t)),"tables"===t||"views"===t?this._addQueryFromTables(e,a):"procedures"===t?this._addQueryFromStoredProcedures(e,a):this._addQueryFromCustomQueries(e,i,a.queries))}_addQueryFromTables(e,t){for(var a=0;a<e.children().length;a++){var i=e.children()[a];if(i.unChecked())Pr._removeQuery(t.queries,i);else{var r={},o={Columns:r,Tables:{SelectedTables:{Item1:{"@Name":i.name,"@ControlType":"Table","@ItemType":"Table"}}}};0===i.children().length&&this._itemsProvider().getItems(new C.PathRequest("tables."+i.name)).done(()=>{i.initializeChildren(i.children())});for(var s=0;s<i.children().length;s++){var n=i.children()[s];n.checked()&&(r["Item"+(s+1)]={"@Table":i.name,"@Name":n.name,"@ItemType":"Column"})}Pr._pushQuery(new $t(o,t),i,t.queries)}}}_addQueryFromStoredProcedures(e,t){for(var a=0;a<e.children().length;a++){var i,r=e.children()[a];r.checked()?(i=new zt({"@Name":r.name,ProcName:r.name},t),r.arguments.forEach(e=>{i.parameters.push(new g({"@Name":e.name,"@Type":we.GetType(e.type)},null,_t(we.GetType(e.type))))}),Pr._pushQuery(i,r,t.queries)):Pr._removeQuery(t.queries,r)}}_addQueryFromCustomQueries(e,t,a){for(var i=0;i<e.children().length;i++){var r=e.children()[i],o=Object(v.findFirstItemMatchesCondition)(t.peek(),e=>r.name===(e.name()||e.generateName()));r.checked()&&(o.name(ka(a.peek(),o)),this._checkedQueries.push(o))}}_getItemsPromise(e){return this._itemsProvider().getItems(e)}_resetDataSourceResult(){this._customResetOptions(),this._dataSource().relations([]),this._dataSource().resultSet=null,this._onChange()}_setQueryCore(e){var t=this._fieldListModel().itemsProvider,a=this._queryEditIndex();0<=a?(this._itemsProvider().queries().children()[a].name=e.name(),t.customQueries().splice(a,1,e)):(e.name(ka(t.customQueries().peek(),e)),t.customQueries().push(e),this._selectedPath("queries."+e.name()),(t=(a=this._itemsProvider().queries().children())[a.length-1]).setChecked(!0),t._afterCheckToggled&&t._afterCheckToggled(t)),this._resetDataSourceResult()}static _pushQuery(t,e,a){Object(v.findFirstItemMatchesCondition)(a.peek(),e=>e.name()===(t.name()||t.generateName()))||(t.name(ka(a.peek(),t)),a.push(t)),e.hasQuery=!0}static _removeQuery(e,a){var i;a.hasQuery&&(i=-1,e.peek().some((e,t)=>(e.name()===a.name||e.generateName()===a.name)&&(i=t,!0))&&e.splice(i,1),a.hasQuery=!1)}canNext(){return!this._itemsProvider().nextButtonDisabled()&&this.canFinish()}canFinish(){return this._itemsProvider()&&this._itemsProvider().hasCheckedItems()&&!this._isDataLoadingInProcess()}_AddQueryWithBuilder(){}_runQueryBuilder(){}_loadPanelViewModel(e){return Cr._getLoadPanelViewModel(e,this._isDataLoadingInProcess)}_setTableQuery(e,t){return t&&t(!0),this._sqlTextProvider.getQuerySqlText(e).done(()=>this._setQueryCore(e)).always(()=>{t&&t(!1)})}_setCustomSqlQuery(e){this._setQueryCore(e)}_createTreeListFactory(){return new xi}commit(){this._dataSource().queries.removeAll(),this._checkedQueries.removeAll(),this._addQueryAlgorithm(this._itemsProvider().tables(),"tables",this._dataSource()),this._addQueryAlgorithm(this._itemsProvider().views(),"views",this._dataSource()),this._addQueryAlgorithm(this._itemsProvider().procedures(),"procedures",this._dataSource()),this._addQueryAlgorithm(this._itemsProvider().queries(),"queries",this._dataSource(),this._customQueries),_.utils.arrayPushAll(this._dataSource().queries(),this._checkedQueries()),this._dataSource().queries.valueHasMutated();var e=this._itemsProvider().queries().children().filter(e=>e.checked()).map(e=>e.name),t=this._sqlDataSourceWrapper.sqlDataSource.queries().filter(t=>e.some(e=>e===t.name())||t instanceof zt),a=(t.forEach(e=>this._sqlDataSourceWrapper.sqlDataSource.queries.remove(e)),new C.ModelSerializer);return T.Deferred().resolve({sqlDataSourceJSON:this._sqlDataSourceWrapper.save(),customQueries:t.map(e=>JSON.stringify(a.serialize(e)))}).promise()}initialize(e){this._sqlDataSourceWrapper=Qa(e,this._options.requestWrapper);var e=this._callbacks.customQueriesPreset?this._callbacks.customQueriesPreset(this._dataSource()):T.Deferred().resolve([]).promise(),t=T.Deferred();return e.done(e=>{this._customQueries(e),this._selectedPath("");e=new Sr(this._dataSource().dbSchemaProvider,this._customQueries,this._showQbCallBack,this.disableCustomSql,this._getItemsAfterCheck);this._disposables.push(e),this._itemsProvider(e),this._getItemsPromise(new C.PathRequest("queries")),this._fieldListModel({factory:this._createTreeListFactory(),itemsProvider:this._itemsProvider(),selectedPath:this._selectedPath,treeListController:new Tr(this._customizeDBSchemaTreeListActions),templateName:"dxrd-treelist-with-checkbox"}),this._popupQueryBuilder.isVisible(!1),this._dataSource().dbSchemaProvider.getDbSchema().done(()=>{t.resolve()}).fail(t.reject)}).fail(t.reject),t.promise()}}function Nr(e,t){e.registerMetadata(N.MultiQueryConfigurePage,{create:()=>new Pr(t),setState:(e,t)=>{t.sqlDataSourceJSON=e.sqlDataSourceJSON,t.customQueries=e.customQueries},getState:e=>e.sqlDataSourceWizard,resetState:(e,t)=>{e.sqlDataSourceJSON=t.sqlDataSourceJSON,e.customQueries=t.customQueries},description:Object(C.getLocalization)("Columns selected from specific tables and/or views will be automatically included into a separate query.","AnalyticsCoreStringId.SqlDSWizard_PageConfigureMultiQuery"),template:"dxrd-wizard-add-queries-page"})}class Or extends C.Disposable{constructor(e){super(),this.editor=x.editorTemplates.getEditor("commonCollection"),this.isList=!1,this.contenttemplate="dx-treelist-accordion-contenttemplate-custom-with-actions",this.actionsTemplate="dx-treelist-item-actions",this.dataSourceParameter=_.observable(e),this._name=e.name,this._displayName=e.displayName}get name(){return this._name()}get displayName(){return this._displayName||this.name}}class wr extends Or{constructor(e,t){super(e),this.parent=t}query(){return this.parent.query()}}class Dr{constructor(e){this.isList=!0,this.specifics="List",this.visible=_.observable(!0),this.name=this.displayName=e,this.parameters=_.observableArray([])}removeChild(e){this.parameters.remove(e)}}class Ir extends Dr{constructor(e){super(e.name()),this._query=e}query(){return this._query}}class Er extends P.TreeListController{constructor(e,t){super(),this._createNewParameter=t,this._rootItems=e}hasItems(e){return e.isList}getActions(e){var t,a,i=[];if(e.data){if(e.data.query().type()===u.storedProcQuery)return e.data.isList?[]:[P.treeListEditAction];e.data.isList?(t=e.data,i.push({clickAction:()=>t.parameters.push(new wr(this._createNewParameter(t.name,t.parameters()),t)),imageClassName:"dxrd-image-add",imageTemplateName:"dxrd-svg-operations-add",text:Object(C.getLocalization)("Add parameter","AnalyticsCoreStringId.FieldListActions_AddParameter")})):(a=e.data,i.push({clickAction:()=>{a.parent.removeChild(a)},imageClassName:"dxrd-image-recycle-bin",imageTemplateName:"dxrd-svg-operations-recycle_bin",text:Object(C.getLocalization)("Remove parameter","DataAccessUIStringId.Button_Remove")}),i.push(P.treeListEditAction))}return i}canSelect(e){return!0}}function kr(e,t){return e.type()===u.tableQuery||e.type()===u.customSqlQuery?-1<t.indexOf(e):e.type()===u.storedProcQuery&&0<e.parameters().length}class Ar extends I{constructor(e={createParameterViewModel:e=>e,getParameterFromViewModel:e=>e},t){super(),this.parametersConverter=e,this._requestWrapper=t,this._sqlDataSourceWrapper=new qa(void 0,void 0,this._requestWrapper),this._selectedPath=_.observable(null),this._rootItems=_.observableArray(),this._createNewParameter=(e,t)=>{t=new g({"@Name":Object(v.getUniqueNameForNamedObjectsArray)(t,"parameter"),"@Type":"System.Int32"});return this._selectedPath(e+"."+t.name()),this.parametersConverter.createParameterViewModel(t)},this._scrollViewHeight="100%",this._fieldListModel=_.observable(null),this._removeButtonTitle=Object(C.getLocalization)("Remove","DataAccessUIStringId.Button_Remove");var a=()=>this._onChange();this._disposables.push(_i(this._rootItems,e=>{this._disposables.push(_i(e.parameters,e=>{this._disposables.push(Ti(e.dataSourceParameter,e=>{this._disposables.push(...Ci([e.name,e.value,e.type],a))},a))},a))},a)),this._parametersEditorOptions={addHandler:()=>this.parametersConverter.createParameterViewModel(new g({"@Name":Object(v.getUniqueNameForNamedObjectsArray)(this._parametersEditorOptions.values.peek().peek(),"param"),"@Type":"System.Int32"})),values:_.observable(_.observableArray([])),displayName:"Parameters",level:0,info:_.observable({displayName:"Parameters",localizationId:"DevExpress.DataAccess.Sql.SqlQuery.Parameters",propertyName:"parameters",modelName:"Parameter",array:!0,editor:x.editorTemplates.getEditor("commonCollection"),template:"#dxrd-parameter-collection-item"}),editorTemplate:"#dxrd-wizard-datasource-parameters",hideButtons:_.observable(!1),collapsed:!1}}_isParametersValid(){return this._getParameters().every(e=>e.isValid())}canNext(){return this._isParametersValid()&&1<this._sqlDataSourceWrapper.sqlDataSource.queries().length}canFinish(){return this._isParametersValid()&&1<=this._sqlDataSourceWrapper.sqlDataSource.queries().length}_getParameters(){return[].concat.apply([],(this._rootItems()||[]).map(e=>e.parameters().map(e=>e.dataSourceParameter())))}initialize(e){var a=[],i=this._rootItems();return this._sqlDataSourceWrapper=Qa(e,this._requestWrapper),this._sqlDataSourceWrapper.sqlDataSource.queries().forEach(e=>{var t;kr(e,this._sqlDataSourceWrapper.customQueries)&&((t=new Ir(e)).parameters(e.parameters().map(e=>new wr(this.parametersConverter.createParameterViewModel(e),t))),a.push(t))}),i.filter(t=>a.every(e=>e.name!==t.name)).forEach(e=>{i.splice(this._rootItems().indexOf(e),1)}),a.forEach(t=>{var a=i.filter(e=>e.name===t.name)[0];a?t.parameters().filter(t=>a.parameters().every(e=>e.name!==t.name)).forEach(e=>{a.parameters.push(e)}):i.push(t)}),this._rootItems.valueHasMutated(),this._fieldListModel({itemsProvider:{getItems:t=>{var e,a=T.Deferred();return t.fullPath?(e=Object(v.findFirstItemMatchesCondition)(this._rootItems(),e=>e.name===t.ref),a.resolve(e.parameters())):a.resolve(this._rootItems()),a.promise()}},templateName:"dx-treelist-item-with-hover",selectedPath:this._selectedPath,treeListController:new Er(this._rootItems(),this._createNewParameter)}),T.Deferred().resolve().promise()}commit(){return this._rootItems().forEach(e=>{e.query().parameters(e.parameters().map(e=>this.parametersConverter.getParameterFromViewModel(e.dataSourceParameter())))}),T.Deferred().resolve({sqlDataSourceJSON:this._sqlDataSourceWrapper.sqlDataSourceJSON,customQueries:this._sqlDataSourceWrapper.saveCustomQueries()}).promise()}}function $r(e,t,a){e.registerMetadata(N.MultiQueryConfigureParametersPage,{create:()=>new Ar(a,t),getState:e=>e.sqlDataSourceWizard,setState:(e,t)=>t.customQueries=e.customQueries,resetState:()=>{},description:Object(C.getLocalization)("Configure query parameters.","AnalyticsCoreStringId.SqlDSWizard_PageConfigureParameters"),template:"dxrd-configure-query-parameters-page"})}class jr{constructor(e,t,a,i){this.showPopup=(e,t)=>{this._popupService.subscription&&this._popupService.subscription.dispose(),this._popupService.title(""),this._updateActions(this.target),this._popupService.target(t),this._popupService.visible(!0)},this.target=e,this._action=a,this._popupService=t,this._popupItems=i}_updateActions(t){this._popupService.subscription=this._popupService.visible.subscribe(e=>{this.target.isSelected&&this.target.isSelected(e)}),this._popupService.data({data:this._popupItems,template:"dx-filtereditor-popup-common",click:e=>{t[this._action](e),this._popupService.visible(!1)}})}}class zr{constructor(e,t,a=!1){this._isMaster=a,this.getTitle=()=>this._isMaster?Object(C.getLocalization)("Master Query","AnalyticsCoreStringId.Wizard_MasterDetailRelationship_MasterQuery"):Object(C.getLocalization)("Detail Query","AnalyticsCoreStringId.Wizard_MasterDetailRelationship_DetailQuery"),this.isSelected=_.observable(!1),this.selectColumnText=()=>Object(C.getLocalization)("<Select a Column>","DataAccessUIStringId.JoinEditorEmptyColumnText"),this.column=e,this.queryName=t,this.setColumn=e=>{this.column(e.name())}}}class Br{constructor(a,e){this.isEditable=_.observable(!1),this.relationName=a.name,this.keyColumns=_.pureComputed(()=>a.keyColumns().map(e=>({master:new zr(e.masterColumn,a.masterQuery(),!0),detail:new zr(e.detailColumn,a.detailQuery(),!1)}))),this.create=()=>{a.createKeyColumn()},this.remove=t=>{a.keyColumns.remove(e=>e.masterColumn===t.master.column&&e.detailColumn===t.detail.column),0===a.keyColumns().length&&e.remove(this)}}}class Rr{constructor(e,a){this.relations=_.observableArray(),this.queryName=e,this.add=e=>{this.relations.push(new Br(e,this))},this.create=e=>{e=new It({"@Master":this.queryName,"@Detail":e.name});Object(v.getFirstItemByPropertyValue)(this.relations(),"relationName",e.name())&&e.name(Object(v.getUniqueName)(this.relations().map(e=>e.relationName()),e.name()+"_")),e.createKeyColumn(),this.add(e),a.push(e)},this.remove=t=>{this.relations.remove(t),a.remove(e=>e.name===t.relationName)}}}class Mr extends P.PopupEditorBase{constructor(t,a,e){super(),this.isValid=_.observable(!0),this.loadPanelVisible=_.observable(!1),this.masterQueries=_.observableArray(),this.popupService=new v.PopupService,this.save=()=>{t().some(e=>!e.detailQuery()||!e.masterQuery()||e.keyColumns().some(e=>!e.detailColumn()||!e.masterColumn()))?Object(v.ShowMessage)(Object(C.getLocalization)("Some fields are empty. Please fill all empty fields or remove the corresponding conditions to proceed.","DataAccessUIStringId.JoinEditorFillAllFieldsException")):e().done(()=>{this.popupVisible(!1)})},this.createRelation=t=>{var e=a.tables().filter(e=>e.tableName()!==t.queryName).map(e=>({name:e.tableName()}));return{data:new jr(t,this.popupService,"create",e),templateName:"dx-filtereditor-create"}},this.setColumn=e=>{var t=Object(v.getFirstItemByPropertyValue)(a.tables(),"tableName",e.queryName);return{data:new jr(e,this.popupService,"setColumn",t?t.columns():[]),templateName:"dx-masterdetail-editor-setColumn"}},this._createMainPopupButtons();var i={};a.tables().forEach(e=>{i[e.tableName()]=new Rr(e.tableName(),t)}),t().forEach(e=>{i[e.masterQuery()]=i[e.masterQuery()]||new Rr(e.masterQuery(),t),i[e.masterQuery()].add(e)}),this.masterQueries(T.map(i,e=>e))}title(){return Object(C.getLocalization)("Master-Detail Relation Editor",v.StringId.MasterDetailRelationsEditor)}}class qr extends I{constructor(e){super(),this._getResultSchema=e,this._relations=_.observableArray([]),this._customResetOptions=T.noop,this._relationsEditor=_.observable(null);var a=()=>this._onChange();this._disposables.push(_i(this._relations,t=>{t._disposables.push(...Ci([t.detailQuery,t.name,t.masterQuery],a)),t._disposables.push(_i(t.keyColumns,e=>{t._disposables.push(...Ci([e.detailColumn,e.masterColumn],a))},a))},a))}_getResultSet(e){var t=T.Deferred();return e.resultSet?t.resolve(e.resultSet):this._getResultSchema(e).done(e=>{t.resolve(new Ue(JSON.parse(e.resultSchemaJSON)))}).fail(e=>{t.reject(e)}),t.promise()}_dataSource(){return null}_restoreDataSource(e){}_updateRelations(){var o=this._relations();o.forEach((t,e)=>{var a,i=this._resultSet.tables().filter(e=>e.tableName()===t.detailQuery())[0],r=this._resultSet.tables().filter(e=>e.tableName()===t.masterQuery())[0];i&&r&&((a=t.keyColumns()).forEach((t,e)=>{(i.columns().every(e=>e.name()!==t.detailColumn())||r.columns().every(e=>e.name()!==t.masterColumn()))&&a.splice(e,1)}),0!==a.length)||o.splice(e,1)}),this._relations.valueHasMutated()}canNext(){return!1}canFinish(){return this._relations().every(e=>e.keyColumns().every(e=>!!e.detailColumn()&&!!e.masterColumn()))}initialize(e){return this.relationsSubscription&&this.relationsSubscription.dispose(),this._restoreDataSource(e),this._disposables.push(this.relationsSubscription=this._relations.subscribe(e=>{e.some(e=>!e.moved&&0!==e.moved)&&this._customResetOptions()},null,"arrayChange")),this._getResultSet(this._dataSource()).done(e=>{this._resultSet=e,this._updateRelations(),this._relationsEditor(new Mr(this._relations,this._resultSet,T.noop))}).fail(e=>{Object(v.getErrorMessage)(e)&&Object(v.ShowMessage)(Object(v.getErrorMessage)(e))})}dispose(){super.dispose(),this.disposeObservableArray(this._relations)}}class Lr extends qr{constructor(){super(...arguments),this._customResetOptions=T.noop,this._relationsEditor=_.observable(null)}_restoreDataSource(e){this._sqlDataSourceWrapper=Qa(e)}_dataSource(){return this._sqlDataSourceWrapper.sqlDataSource}commit(){this.relationsSubscription.dispose(),this._sqlDataSourceWrapper.sqlDataSource.relations(this._relations()),this._sqlDataSourceWrapper.sqlDataSource.resultSet=this._resultSet;var t=new C.ModelSerializer;return T.Deferred().resolve({sqlDataSourceJSON:this._sqlDataSourceWrapper.sqlDataSourceJSON,customQueries:this._sqlDataSourceWrapper.saveCustomQueries(),relations:this._relations().map(e=>JSON.stringify(t.serialize(e)))}).promise()}}function Qr(e,t){e.registerMetadata(S.ConfigureMasterDetailRelationshipsPage,{create:()=>new Lr(t),setState:(e,t)=>{t.relations=e.relations},getState:e=>e.sqlDataSourceWizard,resetState:(e,t)=>{e.relations=t.relations},description:Object(C.getLocalization)("Configure master-detail relationships.","AnalyticsCoreStringId.SqlDSWizard_PageConfigureMasterDetailRelations"),template:"dxrd-wizard-configure-relations-page"})}var Vr={None:"None",Count:"Count",Max:"Max",Min:"Min",Avg:"Avg",Sum:"Sum",CountDistinct:"CountDistinct",AvgDistinct:"AvgDistinct",SumDistinct:"SumDistinct"},Wr=[Ut,{propertyName:"displayType",displayName:"Type",localizationId:"DataAccessUIStringId.ParametersColumn_Type",disabled:!0,editor:b.getEditor("text")},{propertyName:"alias",displayName:"Alias",localizationId:"DataAccessUIStringId.QueryBuilderColumns_Alias",editor:b.getEditor("text")},Gt,{propertyName:"sortingType",displayName:"Sort Type",editor:b.getEditor("combobox"),defaultVal:"Unsorted",valuesArray:[{value:"Unsorted",displayValue:"Unsorted",localizationId:"DataAccessUIStringId.SortingTypeNone"},{value:"Ascending",displayValue:"Ascending",localizationId:"DataAccessUIStringId.SortingTypeAscending"},{value:"Descending",displayValue:"Descending",localizationId:"DataAccessUIStringId.SortingTypeDescending"}],localizationId:"AnalyticsCoreStringId.QueryBuilder_SortType"},{propertyName:"sortOrder",displayName:"Sort Order",editor:b.getEditor("numeric"),localizationId:"DataAccessUIStringId.QueryBuilderColumns_SortOrder"},{propertyName:"groupBy",displayName:"Group By",editor:b.getEditor("bool"),defaultVal:!1,localizationId:"DataAccessUIStringId.QueryBuilderColumns_GroupBy"},{propertyName:"aggregate",displayName:"Aggregate",editor:b.getEditor("comboboxUndo"),values:Vr,defaultVal:Vr.None,localizationId:"DataAccessUIStringId.QueryBuilderColumns_Aggregate"}],A={RecordsCount:"RecordsCount",Column:"Column",Expression:"Expression",AllColumns:"AllColumns",AllColumnsQuery:"AllColumnsQuery"},Fr=[{propertyName:"expression",modelName:"#text"},{propertyName:"table",modelName:"@Table"},{propertyName:"column",modelName:"@Name"},{propertyName:"aggregate",modelName:"@Aggregate",defaultVal:Vr.None},{propertyName:"alias",modelName:"@Alias"},{propertyName:"descending",modelName:"@Descending",defaultVal:!1},{propertyName:"itemType",modelName:"@ItemType"}],Ur=[Ut,Gt];class Hr{constructor(e,a,t){if((t=t||new C.ModelSerializer).deserialize(this,e),this._dependedTables=[],this.table()){var i=a.getTable(this.table());this.table=_.pureComputed(()=>i.actualName()),this._dependedTables.push(i)}else if(this.expression())try{this._criteria=da.CriteriaOperatorStateMachine.parse(this.expression()),Object(da.criteriaForEach)(this._criteria,t=>{var e;t instanceof na.OperandProperty&&(e=Object(v.findFirstItemMatchesCondition)(a.tables(),e=>0===t.propertyName.indexOf(e.actualName()+".")))&&this._dependedTables.push(e)})}catch(e){}this.__table=this.table,this.__column=this.column,this.__expression=this.expression}actualName(){return this.alias()||this.column()}toTable(){this.table=this.__table,this.column=this.__column,this.expression=_.observable(null),this.itemType(A[A.Column]),this.__column.peek()&&0===this.alias().indexOf("Expr")&&this.alias(null)}getInfo(){return Fr}isDepended(t){return!!Object(v.findFirstItemMatchesCondition)(this._dependedTables,e=>e.actualName()===t)}}class Jr extends ca{constructor(t,a){super({"@ControlType":"Column"},t,a);var i=t.parentModel(),r=_.pureComputed(()=>Object(v.findFirstItemMatchesCondition)(i.columns(),e=>t.actualName()===e.table()&&A.AllColumns===e.itemType()));this.selected=_.pureComputed({read:()=>!!r(),write:e=>{!!r()!==e&&(e?i.columns.push(new Hr({"@ItemType":A.AllColumns,"@Table":t.actualName()},i,a)):i.columns.remove(e=>t.actualName()===e.table()&&A.AllColumns===e.itemType()))}}),this.name=_.pureComputed(Jr.DisplayName),this._disposables.push(this.name)}getInfo(){return Ur}}Jr.DisplayName=()=>{var e=Object(C.getLocalization)("(All Columns)","DataAccessStringId.QueryBuilder_AllColumns");return"*"===e.charAt(0)?e:"* "+e};class ${static find(e,t,a){return Object(v.findFirstItemMatchesCondition)(e(),e=>e.column()===a&&e.table()===t)}static findByName(e,t){return Object(v.findFirstItemMatchesCondition)(e(),e=>e.actualName()===t)}static removeDependend(e,t){e.remove(e=>e.isDepended(t))}static toExpresson(e,t,a){e.table=_.observable(null),e.column=_.observable(null),e.expression=e.__expression,e.itemType(A[A.Expression]),e.alias()||e.alias($.setUniqueAlias(t,"Expr")),e.expression(a)}static setUniqueAlias(e,t){return $.findByName(e,t)?Object(v.getUniqueName)(e().map(e=>e.actualName()),t+"_"):t}static createNew(e,t,a,i){a=new Hr({"@Table":a,"@Name":i,"@ItemType":"Column"},e);return e.columns===t&&!a.alias()&&$.findByName(t,a.actualName())&&a.alias(this.setUniqueAlias(t,a.table()+"_"+a.column())),a}static addNew(e,t,a,i,r=!1){e=this.createNew(e,t,a,i);return(r?t():t).push(e),e}static remove(e,t,a,i=!1){if(i){for(var r=0;r<e().length;r++)if(e()[r].column()===a&&e()[r].table()===t)return void e().splice(r,1)}else e.remove(e=>e.column()===a&&e.table()===t)}static columnTypeToFederated(e){switch(e){case A[A.Expression]:return f[f.SelectExpression];case A[A.AllColumns]:return f[f.SelectAllNodeColumnsExpression];case A[A.AllColumnsQuery]:return f[f.SelectAllColumnsExpression];default:return f[f.SelectColumnExpression]}}static federatedTypeToColumn(e){switch(e){case f[f.SelectExpression]:return A[A.Expression];case f[f.SelectAllNodeColumnsExpression]:return A[A.AllColumns];case f[f.SelectAllColumnsExpression]:return A[A.AllColumnsQuery];default:return A[A.Column]}}}var Gr={ReadWrite:"ReadWrite",Read:"Read",Disabled:"Disabled"};function Xr(e){return e.aggregate()!==Vr.None}class Yr{constructor(r,o){this.getItems=t=>{var e,a=T.Deferred(),i=[];return i=""===t.fullPath?o.filterTables(r().tables()).map(Yr._createTableInfo):(e=Object(v.findFirstItemMatchesCondition)(r().tables(),e=>e.actualName()===t.fullPath),o.filterColumns(e&&e.columns()||[]).map(e=>Yr._createColumnInfo(e,o))),a.resolve(i),a.promise()},this.hasParameter=t=>0<r().parameters().filter(e=>e.name()===t).length,this.getColumnInfo=t=>{if(t){var e,a=Object(v.find)(r().tables(),e=>0===t.indexOf(e.actualName()+"."));if(a)return(e=Object(v.find)(o.filterColumns(a.columns()||[]),e=>t===a.actualName()+"."+o.getColumnName(e)))?Yr._createColumnInfo(e,o):null}return null}}static _createTableInfo(e){return{displayName:e.actualName(),name:e.actualName(),isList:!0,specifics:"Default",collapsed:_.observable(!0)}}static _createColumnInfo(e,t){return{displayName:t.getColumnName(e),isList:!1,specifics:t.getSpecifics(e),dataType:t.getDataType(e),name:t.getColumnName(e)}}}Yr.whereClauseObjectsFilter={filterColumns:e=>e,filterTables:e=>e,getColumnName:e=>e.name.peek(),getSpecifics:e=>e.specifics,getDataType:e=>e.dataType.peek()},Yr.groupByObjectsFilter={filterColumns:e=>e.filter(Xr),filterTables:e=>e.filter(e=>e.columns().some(Xr)),getColumnName:e=>e.actualName.peek(),getSpecifics:e=>{switch(e.aggregate()){case Vr.Avg:case Vr.AvgDistinct:return"Float";case Vr.Count:case Vr.CountDistinct:return"Integer";default:return e.specifics}},getDataType:e=>null};class Kr extends P.FilterEditorSerializer{constructor(e){super(),this._columns=e,this._aggregatePropertyName=t=>{var e=this._findAggregatedColumn(e=>e.actualName()===t.propertyName);return e?this._columnDisplayName(e):t.propertyName}}_columnDisplayName(e){return e.table()+"."+e.actualName()}_findAggregatedColumn(t){return Object(v.find)(this._columns(),e=>Xr(e)&&t(e))}serializeOperandProperty(t){var e=this._findAggregatedColumn(e=>t.propertyName===this._columnDisplayName(e));return"["+(e?e.actualName():t.propertyName)+"]"}deserialize(e){e=da.CriteriaOperatorStateMachine.parse(e);return e&&Object(da.criteriaForEach)(e,e=>{e instanceof na.OperandProperty&&(e.propertyName=this._aggregatePropertyName(e))}),super.deserializeOperand(e)}}k=e(10);class Zr extends g{getEditorType(e){return Object(v.IsDataAccessExpression)(e)?{header:"dxqb-expressionstring"}:Object(v.getEditorType)(e)}}class eo extends k.OperandParameterSurface{constructor(e,t,a,i){super(e,t,a,i),this.createParameter=()=>{this.canCreateParameters&&(this.model.parameterName=this.parameterName(),this._createParameter(this.parameterName(),this._parameterType),this.helper.onChange())},this._parameterName=_.observable(""),this.isEditable=_.observable(!1),this.defaultDisplay=eo.defaultDisplay,this._parameterName(_.unwrap(e.parameterName)),this.canCreateParameters=this.helper.canCreateParameters,this.fieldsOptions=t.leftPart.fieldsOptions,this.parameterName=_.pureComputed({read:()=>this._parameterName()||this.canCreateParameters&&eo.defaultDisplay()||"",write:e=>{e!==eo.defaultDisplay()&&e&&(this.model.parameterName=_.unwrap(e),this._parameterName(this.model.parameterName))}}),!this.canCreateParameters||this.isDefaultTextDisplayed()||_.unwrap(this.fieldListProvider).hasParameter(e.parameterName)||this.createParameter()}get _parameterType(){return this.fieldsOptions()&&this.fieldsOptions().selected()&&this.fieldsOptions().selected().dataType||"System.String"}_createParameter(t,e){""!==t&&t!==eo.defaultDisplay()&&0===this.helper.parameters().filter(e=>e.name()===t).length&&(e=new Zr({"@Name":t,"@Type":e}),this.helper.newParameters.push(e))}isDefaultTextDisplayed(){return this.parameterName()===eo.defaultDisplay()}}eo.defaultDisplay=()=>Object(C.getLocalization)("Create new parameter","AnalyticsCoreStringId.FilterEditor_Operand_CreateNewParameter");class to extends k.OperandPropertySurface{constructor(e,t,a,i){super(e,t,a,i)}_updateSpecifics(){to.updateSpecifics(this)}static updateSpecifics(e){var t=_.unwrap(e.fieldListProvider);t&&t.getColumnInfo&&(t=t.getColumnInfo(e.propertyName()))&&(e.specifics(t.specifics.toLowerCase()),e.dataType(t.dataType),e=_.unwrap(e.fieldsOptions))&&e.selected(t)}}class ao extends x.FilterEditorHelper{constructor(e){super(),this.handlers.changeParameter=(e,t)=>({data:new P.FilterEditorAddOn(e,t,"changeParameter","items","dxqb-filtereditor-parameterspopup"),templateName:"dxqb-filtereditor-changeparameter"}),this.mapper.parameter=eo,this.mapper.property=to,e===Gr.ReadWrite&&(this.canCreateParameters=!0,this.newParameters=_.observableArray([]),this.onEditorFocusOut=e=>{if(e){var a=this.newParameters(),i=[];if(Object(da.criteriaForEach)(e,t=>{var e;t instanceof na.OperandParameter&&(e=a.filter(e=>e.name()===t.parameterName)[0])&&i.push(e)}),0===i.length)this.newParameters.splice(0);else{for(var t=a.filter(e=>-1===i.indexOf(e)),r=0;r<t.length;r++){var o=a.indexOf(t[r]);-1!==o&&a.splice(o,1)}this.newParameters.valueHasMutated()}}},this.onClosing=()=>{this.newParameters([])}),this.canSelectLists=!1,this.getDisplayPropertyName=()=>T.Deferred().resolve("").promise()}}var io=ao;function ro(e){io=e}class oo extends x.FilterStringOptions{constructor(e,t,a,i){super(e,t,a,i)}initializeFilterStringHelper(a,i,e){var r,o=new io(i);o.canChoiceParameters=i!==Gr.Disabled,e&&(o.serializer=e),i===Gr.ReadWrite?(o.parameters=_.computed(()=>[].concat(a(),o.newParameters())),o.onSave=e=>{var t=o.newParameters();a.push.apply(a,t),o.newParameters([])}):(i===Gr.Read&&(o.parameters=a),r=o.criteriaTreeValidator._checkRightPart,o.criteriaTreeValidator._checkRightPart=e=>{var t;return e instanceof na.OperandParameter?i!==Gr.Disabled&&(i===Gr.Read?(t=e.parameterName,0!==a.peek().filter(e=>e.name()===t).length):void 0):r.apply(this,[e])}),this.helper=o}}var so=[{propertyName:"_tablesObject",modelName:"Tables",info:[{propertyName:"tables",modelName:"SelectedTables",array:!0},{propertyName:"relations",modelName:"Relations",array:!0}]},{propertyName:"parameters",modelName:"Parameters",array:!0},{propertyName:"type",modelName:"@Type"},{propertyName:"name",modelName:"@Name"},{propertyName:"editableName",displayName:"Name",localizationId:"DevExpress.DataAccess.Sql.SqlQuery.Name",editor:b.getEditor("text")},{propertyName:"_filterString",modelName:"Filter",defaultVal:""},{propertyName:"filterString",defaultVal:"",displayName:"Filter",localizationId:"DataAccessUIStringId.FiltersView_Filter",editor:b.getEditor("filterEditor")},{propertyName:"_groupFilterString",modelName:"GroupFilter",defaultVal:""},{propertyName:"groupFilterString",defaultVal:"",displayName:"Group Filter",localizationId:"DataAccessUIStringId.FiltersView_GroupFilter",editor:b.getEditor("filterGroupEditor")},{propertyName:"columns",modelName:"Columns",array:!0},{propertyName:"sorting",modelName:"Sorting",array:!0},{propertyName:"grouping",modelName:"Grouping",array:!0},{propertyName:"itemType",modelName:"@ItemType"},{propertyName:"allColumnsInTablesSelected",displayName:"Select All (*)",localizationId:"AnalyticsCoreStringId.QueryBuilder_SelectAll",editor:b.getEditor("bool")},{propertyName:"top",modelName:"@Top",displayName:"Select Top",defaultVal:0,from:C.floatFromModel,localizationId:"AnalyticsCoreStringId.QueryBuilder_SelectTop",editor:b.getEditor("numeric"),editorOptions:{format:"#0",min:0}},{propertyName:"skip",modelName:"@Skip",displayName:"Offset",defaultVal:0,from:C.floatFromModel,localizationId:"AnalyticsCoreStringId.QueryBuilder_Offset",editor:b.getEditor("numeric"),editorOptions:{format:"#0",min:0}},{propertyName:"distinct",modelName:"@Distinct",defaultVal:!1,from:C.parseBool,displayName:"Select distinct",localizationId:"AnalyticsCoreStringId.QueryBuilder_SelectDistinct",editor:b.getEditor("bool")}];class no extends ca{constructor(e,t,a,i){super(Object(v.extend)({"@ControlType":"Column"},e),a,i),this.isNotAvailable=_.observable(!1),this._type=_.observable(d.Unknown),this._size=_.observable(""),t.size&&this._size(t.size),t.type&&this._type(t.type),this.displayType=_.pureComputed(()=>d[this._type()]+(this._size()?"("+this._size()+")":"")),this.dataType=_.pureComputed(()=>we.GetType(this._type())),this.actualName=_.pureComputed(()=>this.alias()||this.name());var e=a.getColumnConnectionPoints(this),r=(this.rightConnectionPoint={side:_.observable(p.East),location:e.right},this.leftConnectionPoint={side:_.observable(p.West),location:e.left},a.parentModel()),o=_.pureComputed(()=>$.find(r.columns,a.actualName(),this.name())),s=(this.aggregate=_.pureComputed({read:()=>o()?o().aggregate():Vr.None,write:e=>{o()&&o().aggregate(e)}}),this.alias=_.pureComputed({read:()=>o()?o().alias():"",write:e=>{o()&&o().alias(e||null)}}),_.pureComputed(()=>$.find(r.sorting,a.actualName(),this.name()))),n=(this.sortingType=_.computed({read:()=>s()?s().descending()?"Descending":"Ascending":"Unsorted",write:e=>{"Unsorted"!==e?(s()?s():$.addNew(r,r.sorting,a.actualName(),this.name())).descending("Descending"===e):s()&&$.remove(r.sorting,a.actualName(),this.name())}}),this.sortOrder=_.computed({read:()=>{var e=r.sorting().indexOf(s());return e<0?void 0:e+1},write:e=>{var t;s()&&(e=Math.min(e,r.sorting().length),e=Math.max(e,1),t=r.sorting().indexOf(s()),t=r.sorting.splice(t,1),r.sorting.splice(e-1,0,t[0]))}}),_.computed(()=>$.find(r.grouping,a.actualName(),this.name())));this.aggregate.subscribe(e=>{var t=this.parentModel();e!==Vr.None?(this.groupBy(!1),this.alias()&&!this._isAliasAutoGenerated(t.actualName())||(e=this.name()+"_"+e,this.alias($.setUniqueAlias(r.columns,e)))):this._isAliasAutoGenerated(t.actualName())&&this.alias(null)}),this.groupBy=_.computed({read:()=>!!n(),write:e=>{e?($.addNew(r,r.grouping,a.actualName(),this.name()),this.aggregate(Vr.None)):$.remove(r.grouping,a.actualName(),this.name())}}),this.toggleSelected=(e,t=!1)=>{!!o()!==e&&(e?$.addNew(r,r.columns,a.actualName(),this.name(),t):($.remove(r.columns,a.actualName(),this.name(),t),this.groupBy(!1)))},this.selected=_.pureComputed({read:()=>!!o(),write:e=>this.toggleSelected(e)})}_isAliasAutoGenerated(e){return!(!e||!this.alias()||0!==this.alias().indexOf(e+"_")||this.alias().substring(e.length+1)!==this.name())||!(!this.alias()||0!==this.alias().indexOf(this.name()+"_"))&&((e=this.alias().substring(this.name().length+1)).match(new RegExp("_[0-9]+$"))&&(e=e.substring(0,e.indexOf("_"))),0<Object.keys(Vr).indexOf(e))}getInfo(){return Wr}isPropertyDisabled(e){return!!this.isNotAvailable()||("sortOrder"===e?"Unsorted"===this.sortingType():"aggregate"===e||"alias"===e?!this.selected():"groupBy"===e&&(e=this.root,this.aggregate())&&1===e.aggregatedColumnsCount())}get specifics(){return we.GetSpecific(this.dataType())}}var lo=[Ut,Ht,{propertyName:"controlType",modelName:"@ControlType"},{propertyName:"itemType",modelName:"@ItemType"}];class j extends ca{constructor(e,t,a){super(e,t,a),this.serializer=a,this._columnsConnectionPointLeftX=_.pureComputed(()=>this.location.x()),this._columnsConnectionPointRightX=_.pureComputed(()=>this.location.x()+this.size.width()),this._columns=_.observableArray(),this._initialized=_.observable(!1),this.tableOffset=_.observable(0),this.size=new h.Size(199,123),this.location=new h.Point(0,0),this.isReady=_.observable(!1),this.allColumnsSelected=_.computed({read:()=>{var e=this.columns().filter(e=>e.selected());return 0!==e.length&&e.length===this._columns.peek().length},deferEvaluation:!0}),this.isInitialized=_.pureComputed(()=>this._initialized()),this.itemType="Table",this.controlType="Table",this._disposables.push(this.size.height=_.pureComputed({read:()=>0===this._columns().length?j.TABLE_DEFAULT_HEIGHT+this.tableOffset():j.COLUMNS_OFFSET+(j.COLUMN_HEIGHT+j.COLUMN_MARGIN)*(this._columns().length+1)+this.tableOffset(),write:()=>{}})),this.asterisk=new Jr(this,this.serializer),this._disposables.push(this.actualName=_.pureComputed(()=>this.alias()||this.name()))}columns(){return this._columns()}toggleSelectedColumns(){var t=!this.allColumnsSelected.peek(),e=this.parentModel();this._columns.peek().forEach(e=>e.toggleSelected(t,!0)),e.columns.valueHasMutated()}getColumnConnectionPoints(t){var e=_.pureComputed({read:()=>{var e=this._columns.indexOf(t)+1;return this.location.y()+j.COLUMNS_OFFSET+j.COLUMN_MARGIN*e+j.COLUMN_HEIGHT*(e+.5)+this.tableOffset()},deferEvaluation:!0});return this._disposables.push(e),{left:{x:this._columnsConnectionPointLeftX,y:e},right:{x:this._columnsConnectionPointRightX,y:e}}}getInfo(){return lo}getInvalidColumns(){return this.columns().filter(e=>e.isNotAvailable()&&e.selected())}getColumn(e){return Object(v.getFirstItemByPropertyValue)(this._columns(),"name",e)}_initColumns(e,t=!1){var a=[];e.forEach(e=>{a.push(this.createChildColumn(e))}),this._columns(t?[].concat([],this.columns(),a):a)}createChildColumn(e){return new no({"@Name":e.name},e,this,this.serializer)}createColumns(a){var i=0;this.columns().forEach(t=>{var e=a.columns.filter(e=>e.name===t.name())[0];e?(t._type(e.type),t._size(e.size)):(t.isNotAvailable(a.columns.every(e=>e.name!==t.name())),i++)}),this.columns().length-i<a.columns.length&&this._initColumns(a.columns.filter(t=>this.columns().every(e=>e.name()!==t.name)),!0),this._initialized(!0)}}j.COLUMNS_OFFSET=37,j.COLUMN_HEIGHT=32,j.COLUMN_MARGIN=1,j.TABLE_MIN_WIDTH=80,j.TABLE_DEFAULT_HEIGHT=136;class co extends ca{constructor(e,t,a=Gr.ReadWrite,i,r){super(e,null,r),this.topOffset=65,this._findAncestorsRelations=t=>{var a={inner:0,outer:0,relations:[]};return this.relations().forEach(e=>{e.nestedTable()===t&&(a.relations.push(e),"LeftOuter"===e.joinType()?a.outer++:a.inner++,e=this._findAncestorsRelations(e.parentTable()),a.inner+=e.inner,a.outer+=e.outer,a.relations.push.apply(a.relations,e.relations))}),a},this.aggregatedColumnsCount=_.observable(0),this.defaultPageHeight=500,this.defaultPageWidth=500,this.dbSchemaProvider=t,this.onSave=i,this.editableName=_.observable(this.name()),this._disposables.push(this.name=_.pureComputed({read:this.editableName,write:e=>{}}));var o=_.observable(0),s=(this._disposables.push(this.pageWidth=_.pureComputed({read:()=>{var t=this.defaultPageWidth;return this.tables().forEach(e=>{e=e.location.x()+e.size.width();t<e&&(t=e)}),Math.max(o(),t)},write:e=>{o(e)}})),this._disposables.push(this.pageHeight=_.pureComputed(()=>{var t=this.defaultPageHeight;return this.tables().forEach(e=>{e=e.location.y()+e.size.height();t<e&&(t=e+uo.pageMargin)}),t})),this.margins=h.Margins.fromString(),this._disposables.push(this.isValid=_.pureComputed(()=>this._validate())),e=>!e.table()&&e.itemType()===A.AllColumns);this._disposables.push(this.allColumnsInTablesSelected=_.pureComputed({read:()=>this.columns().some(s),write:e=>{e?this.columns.push(new Hr({"@ItemType":"AllColumns"},this,r)):this.columns.remove(s)}})),this.sorting||(this.sorting=_.observableArray([])),this.grouping||(this.grouping=_.observableArray([]))}_initializeTable(t){this.dbSchemaProvider.getDbTable(t.name()).done(e=>{t.createColumns(e)})}_addColumnsToTable(e,t){e._initColumns(t.map(e=>new we({Name:e.column()})))}dispose(){super.dispose(),this.onSave=null}addChild(e){e instanceof ha?-1<this.relations.indexOf(e)||(e.parentModel(this),this.relations.push(e)):e instanceof j?-1<this.tables.indexOf(e)||(e.parentModel(this),null!==Object(v.getFirstItemByPropertyValue)(this.tables(),"actualName",e.name())&&e.alias(Object(v.getUniqueName)(this.tables().map(e=>e.actualName()),e.name()+"_")),this.tables.push(e)):Object(v.NotifyAboutWarning)("Attempt to add wrong child control.")}removeChild(t){if(t instanceof ha){if(!(this.relations().length<1)){for(var e=t,a=this.relations().indexOf(e);0<e.conditions().length;)e.conditions.pop();this.relations.splice(a,1)}}else if(t instanceof j){if(!(this.tables().length<1)){this.tables.splice(this.tables().indexOf(t),1);for(var i=this.relations(),r=i.length-1;-1<r;r--)i[r].parentTable()!==t&&i[r].nestedTable()!==t||this.removeChild(i[r]);this.sorting.remove(e=>e.isDepended(t.actualName())),this.grouping.remove(e=>e.isDepended(t.actualName())),this.columns.remove(e=>e.isDepended(t.actualName()))}}else Object(v.NotifyAboutWarning)("Attempt to remove wrong child control.")}validateRelations(){var e=this.tables().map(e=>e.actualName());return this._validateTable(e,e[0]),e.length<1}_validate(){return 0!==this.tables().length&&!!(this.allColumnsInTablesSelected()||0<this.columns().length)&&this.validateRelations()}_validateTable(t,a){var e=t.indexOf(a);e<0||(t.splice(e,1),this.relations().map(e=>e.parentTableName()===a?e.nestedTableName():e.nestedTableName()===a?e.parentTableName():null).forEach(e=>this._validateTable(t,e)))}createChild(e,t,a){return t?(this._initializeTable(t),this.addChild(t),t):super.createChild(e)}init(){this.tables().forEach(a=>{var i=[],e=this.sorting&&this.sorting()||[],t=this.grouping&&this.grouping()||[];[this.columns(),e,t].forEach(e=>{e.forEach(t=>{a.name()===t.table()&&t.itemType()===A.Column&&i.every(e=>e.column()!==t.column())&&i.push(t)})}),this._addColumnsToTable(a,i),this._initializeTable(a)}),this.tables().reduce((e,t)=>(t.location.x(e),t.location.y(this.topOffset),e+t.size.width()+t.size.width()/2),30);var a=!1;this._disposables.push(_.computed(()=>{var e,t;a||(a=!0,t=(e=this.getAllColumns()).filter(e=>e.aggregate()===Vr.None),this.aggregatedColumnsCount(e.length-t.length),e.length!==t.length?t.filter(e=>e.selected()&&!e.groupBy.peek()).forEach(e=>e.groupBy(!0)):e.every(e=>!e.selected.peek()||e.groupBy.peek())||e.forEach(e=>{e.groupBy.peek()&&e.groupBy(!1)}),a=!1)}))}getTable(t){return Object(v.findFirstItemMatchesCondition)(this.tables(),e=>e.actualName()===t)}canSave(e=!0){var a=[];return this.tables().forEach(t=>{t.getInvalidColumns().forEach(e=>{a.push(Object(v.formatUnicorn)(Object(C.getLocalization)('The schema does not contain the following column: "{0}"."{1}".',"DataAccessStringId.ColumnNotInSchemaValidationException"),t.actualName(),e.actualName()))})}),!(0<a.length&&(e&&Object(v.ShowMessage)(a.join("\n"),"error"),1))}save(){var e;if(this.canSave())return e=this.serialize(!0),this.onSave&&this.onSave(e),e}serialize(e=!1){return e?{Query:this.serialize()}:(new C.ModelSerializer).serialize(this)}_findTableInAncestors(t,a){return this.relations().some(e=>e.nestedTable()===t&&(e.parentTable()===a||this._findTableInAncestors(e.parentTable(),a)))}_findHead(t){var a=null;return this.relations().some(e=>!!(a=e.nestedTable()===t?e:a)),a?this._findHead(a.parentTable()):t}_isHead(t){return!this.relations().some(e=>e.nestedTable()===t)}_reverseRelations(e,t){t.forEach(e=>{var t=e.parentTable();e.parentTable(e.nestedTable()),e.nestedTable(t),e.conditions().forEach(e=>{var t=e.parentColumnName();e.parentColumnName(e.nestedColumnName()),e.nestedColumnName(t)})})}getAllColumns(){return[].concat.apply([],this.tables().map(e=>e.columns()))}cerateJoinCondition(t,a){var i,e,r,o,s=t.parentModel(),n=a.parentModel();return s===n?null:(i=!1,(e=Object(v.findFirstItemMatchesCondition)(this.relations(),e=>(i=e.parentTable()===n&&e.nestedTable()===s,e.parentTable()===s&&e.nestedTable()===n||i)))||(this._findTableInAncestors(s,n)?i=!0:this._findHead(s)===this._findHead(n)||this._isHead(n)||(o=this._findAncestorsRelations(s),r=this._findAncestorsRelations(n),o.outer>r.outer?this._reverseRelations(n,r.relations):o.outer<r.outer?(this._reverseRelations(s,o.relations),i=!0):o.inner>=r.inner?this._reverseRelations(n,r.relations):o.inner<r.inner&&(this._reverseRelations(s,o.relations),i=!0))),i&&(r=s,s=n,n=r,o=t,t=a,a=o),e=e||this.createChild({"@ControlType":"Relation","@Parent":s.actualName(),"@Nested":n.actualName(),"@Type":"Inner"}),Object(v.findFirstItemMatchesCondition)(e.conditions(),e=>e.parentColumn()===t&&e.nestedColumn()===a)||e.createChild({"@ControlType":"JoinCondition","@Parent":t.name(),"@Nested":a.name()}))}tryToCreateRelationsByFK(e){}}co.pageMargin=20;class uo extends co{constructor(e,t,a=Gr.ReadWrite,i,r){super(Object(v.extend)(!0,e,uo.emptyModel,e),t,a,i,r),this.controlType="Query",this.type("SelectQuery"),this.tables=Object(C.deserializeArray)(e.Tables.SelectedTables,e=>new j(e,this,r)),this.columns=Object(C.deserializeArray)(e.Columns,e=>new Hr(e,this,r)),this.sorting=Object(C.deserializeArray)(e.Sorting,e=>new Hr(e,this,r)),this.grouping=Object(C.deserializeArray)(e.Grouping,e=>new Hr(e,this,r)),this.relations=Object(C.deserializeArray)(e.Tables.Relations,e=>new ha(e,this,r)),this.init(),this._tablesObject.tables=this.tables,this._tablesObject.relations=this.relations;var o=Object(C.deserializeArray)(e.Parameters,e=>new Zr(e,r));a===Gr.ReadWrite?(this.parameters=o,this._disposables.push(this.parameters.subscribe(e=>{e.forEach(t=>{"added"!==t.status||t.value.name()||t.value.name(Object(v.getUniqueName)(this.parameters().filter(e=>e!==t.value).map(e=>e.name()),"parameter"))})},null,"arrayChange"))):this._disposables.push(this.parameters=_.computed(()=>o())),this.filterString=new oo(this._filterString,null,_.pureComputed(()=>0===this.tables().length&&this.filterString&&0===this.filterString.value().length)),this.filterString.initializeFilterStringHelper(this.parameters,a),this.groupFilterString=new oo(this._groupFilterString,null,_.pureComputed(()=>!this.columns().some(Xr)&&this.groupFilterString&&0===(this.groupFilterString.value()||"").length)),this.groupFilterString.initializeFilterStringHelper(this.parameters,a,new Kr(this.columns))}isPropertyDisabled(e){return"skip"===e&&0===this.skip()&&!this.sorting().length}getInfo(){return so}createChild(e){return super.createChild(e,"Table"===e["@ControlType"]?new j(e,this):void 0)}tryToCreateRelationsByFK(o){this.dbSchemaProvider.getDbSchema().done(t=>{var e=t.tables.filter(e=>e.name===o.name())[0];e&&e.foreignKeys.forEach(e=>{var t=Object(v.getFirstItemByPropertyValue)(this.tables.peek(),"name",e.primaryKeyTable);if(t)for(var a=0;a<e.primaryKeyColumns.length;a++){var i=Object(v.getFirstItemByPropertyValue)(o.columns(),"name",e.columns[a]),r=Object(v.getFirstItemByPropertyValue)(t.columns(),"name",e.primaryKeyColumns[a]);i&&r&&this.cerateJoinCondition(i,r)}}),this.tables.peek().forEach(r=>{var e=t.tables.filter(e=>e.name===r.name())[0];e&&e.foreignKeys.forEach(e=>{if(e.primaryKeyTable===o.name())for(var t=0;t<e.primaryKeyColumns.length;t++){var a=Object(v.getFirstItemByPropertyValue)(o.columns(),"name",e.primaryKeyColumns[t]),i=Object(v.getFirstItemByPropertyValue)(r.columns(),"name",e.columns[t]);a&&i&&this.cerateJoinCondition(i,a)}})})})}}uo.emptyModel={"@ItemType":"Query",Tables:{SelectedTables:{},Relations:{}},Columns:{},Sorting:{},Grouping:{}};class po extends h.SurfaceElementBase{constructor(e,t=_.observable(1)){super(e,{measureUnit:_.observable("Pixels"),zoom:t,dpi:_.observable(100)},po._unitProperties),this.placeholder=()=>Object(C.getLocalization)("Drop a table or view here to create a query.","AnalyticsCoreStringId.QueryBuilder_SurfacePlaceholder"),this.tables=_.observableArray(),this.relations=_.observableArray(),this.allowMultiselect=!1,this.focused=_.observable(!1),this.selected=_.observable(!1),this.underCursor=_.observable(new v.HoverInfo),this.templateName="dx-query-surface",this.rtl=_.observable(!1),this.measureUnit=this._context.measureUnit,this.dpi=this._context.dpi,(this._context=this).margins={bottom:this._bottom,left:this._left,right:this._right,top:this._top},this.zoom=t,Object(v.createObservableArrayMapCollection)(e.tables,this.tables,this._createSurface),Object(v.createObservableArrayMapCollection)(e.relations,this.relations,this._createSurface),this._joinedColumns=_.computed(()=>{var t=[];return this.relations().forEach(e=>{e.conditions().forEach(e=>{e=e.getControlModel();e.parentColumn()&&t.push(e.parentColumn()),e.nestedColumn()&&t.push(e.nestedColumn())})}),t})}checkParent(e){return!1}getChildrenCollection(){return this.tables}isJoined(e){return-1<this._joinedColumns().indexOf(e.getControlModel())}}po._unitProperties={_width:e=>e.pageWidth,_height:e=>e.pageWidth,pageWidth:e=>e.pageWidth,pageHeight:e=>e.pageHeight,_bottom:e=>e.margins.bottom,_left:e=>e.margins.left,_right:e=>e.margins.right,_top:e=>e.margins.top};class ho extends h.SurfaceElementBase{constructor(e,t,a){super(e,t,Object(v.extend)({},ho._unitProperties,a)),this.template="dx-diagram-element",this.selectiontemplate="dx-diagram-element-selection",this.contenttemplate="dx-diagram-element-content",this.margin=_.observable(0)}}ho._unitProperties={_height:e=>e.size.height,_width:e=>e.size.width,_x:e=>e.location.x,_y:e=>e.location.y};class mo extends h.SurfaceElementBase{constructor(e,t){super(e,t,null),this.template="dxqb-table-field",this.toggleSelected=()=>{this.getControlModel().selected(!this.getControlModel().selected())},this.selectedWrapper=_.pureComputed(()=>this.getControlModel().selected()),this.isNotAvailable=_.pureComputed(()=>this._control.isNotAvailable()),this.isAggregate=_.pureComputed(()=>Xr(this.getControlModel())),this.isAscending=_.pureComputed(()=>"Ascending"===this.getControlModel().sortingType()),this.isDescending=_.pureComputed(()=>"Descending"===this.getControlModel().sortingType()),this.cssClasses=(e,t,a)=>(this._isJoined||(this._isJoined=_.pureComputed(()=>e.isJoined(this)||this.getControlModel()===t.getDragColumn())),this._isHovered||(this._isHovered=_.pureComputed(()=>{var e=!!t.getDragColumn()&&this.getControlModel().parentModel()!==t.getDragColumn().parentModel();return this.underCursor().isOver&&(!v.DragDropHandler.started()||e)})),{"dxd-state-invalid":this.isNotAvailable,"dxd-state-active":this.selected(),"dxd-state-joined":this._isJoined,"dxd-state-hovered":this._isHovered})}}class go extends h.SurfaceElementBase{constructor(e,t){super(e,t,null),this.template="dxqb-table-asterisk-field",this.toggleSelected=()=>{this.getControlModel().selected(!this.getControlModel().selected())},this.selectedWrapper=_.pureComputed(()=>this.getControlModel().selected()),this.isOverAsterisk=_.pureComputed(()=>this.underCursor().isOver&&!v.DragDropHandler.started()),this.cssClasses=()=>({"dxd-state-active":this.selected,"dxd-state-hovered":this.isOverAsterisk()})}}class bo extends ho{constructor(e,t){super(e,t,null),this.showSourceName=!1,this.contenttemplate="dxqb-table",this.titletemplate="dxqb-table-title",this.template="dxqb-table-main",this.toggleSelected=()=>{this.getControlModel().toggleSelectedColumns()},this.selectedWrapper=_.pureComputed(()=>this.getControlModel().allColumnsSelected()),this.isInitialized=e.isInitialized,this.columns=_.pureComputed(()=>e.columns().map(e=>new mo(e,t))),this.asterisk=new go(e.asterisk,t)}resizable(e,t){return Object(v.extend)({},e,{handles:"e,w",$selectedNodes:T.fn.constructor(t),minWidth:j.TABLE_MIN_WIDTH})}}class fo extends no{constructor(e,t,a,i){super(e,t,a,i)}getInfo(){return aa}}class yo extends Jr{constructor(e,t){super(e,t)}getInfo(){return[Ut]}}var So=[{propertyName:"name",modelName:"@Alias"},{propertyName:"type",modelName:"@Type"},{propertyName:"itemType",modelName:"@ItemType"},{propertyName:"queryType",modelName:"@QueryType"},{propertyName:"rootModel",modelName:"Root"},{propertyName:"expressions",modelName:"Expressions",array:!0},{propertyName:"subNodes",modelName:"SubNodes",array:!0}];class xo extends co{constructor(t,e,a,i=Gr.ReadWrite,r){super(Object(v.extend)(!0,t,xo.emptyModel,t),a,i,e=>e,r),this._dbSchemaProvider=a,this.serializer=r,this.expressions=_.observableArray(),this.subNodes=_.observableArray(),this.controlType="FQuery",this.defaultPageHeight=300,this.topOffset=20,this.dataSource=e;i=[];this.tables=_.observableArray(),t.Root&&this.tables.push(this._createTableViewModel(t.Root)),this.tables.push(...Object.keys(t.SubNodes).map(e=>this._createTableViewModel(t.SubNodes[e].Query))),i.push(...Object.keys(t.SubNodes).map(e=>new ga(t.SubNodes[e],r).createRelationModel(this))),this.columns=Object(C.deserializeArray)(t.Expressions,e=>new Hr({"@Name":e["@Name"],"@Alias":e["@Alias"],"@Table":e["@NodeAlias"],"#text":e["@ColumnExpression"],"@ItemType":$.federatedTypeToColumn(e["@ExpressionType"])},this,r)),this.relations=_.observableArray(i),this.init()}_initializeTable(t){this._dbSchemaProvider.getDbTable(t.name(),t.path).done(e=>{t.createColumns(e)})}_createTableViewModel(e){var t=this.dataSource.getPathFromQueryName(e["@SourceName"]);return new _o(e,this,t,this.serializer)}dispose(){super.dispose(),this.dataSource=null}serialize(e){var a=this.serializer||new C.ModelSerializer,t=(this.expressions(this.columns().map(e=>{var t={"@Alias":e.alias(),"@ColumnExpression":e.expression(),"@Name":e.column(),"@NodeAlias":e.table()};return t["@ExpressionType"]=$.columnTypeToFederated(e.itemType()),new ia(t,a)})),this.rootModel(this.tables()[0]),this.tables()),i=(t.shift(),this.relations());return this.subNodes(t.map(t=>{var e=(e=Object(v.findFirstItemMatchesCondition)(i,e=>e.nestedTable()===t))||Object(v.findFirstItemMatchesCondition)(i,e=>e.parentTable()===t);return i.splice(i.indexOf(e),1),ga.deserializeRelationModel(t,e)})),super.serialize(e)}createChild(e,t,a){return super.createChild(e,"FTable"===e["@ControlType"]?new _o(e,this,a):void 0)}cerateJoinCondition(e,t){var a=e.parentModel(),i=t.parentModel();return this.tables().indexOf(a)>this.tables.indexOf(i)?null:super.cerateJoinCondition(e,t)}getInfo(){return So}}xo.emptyModel={"@ItemType":"Query",SubNodes:{},Expressions:{}};class vo extends po{}class _o extends j{constructor(e,t,a,i){super(e,t,i),this.controlType="FTable",a&&!e["@SourceName"]&&this.sourceName(t.dataSource.getQueryNameFromPath(a)),this.name()||this.name(this.sourceName()),this.alias()||this.alias(this.name()),this._disposables.push(this.queryType=_.pureComputed(()=>c[c.SourceNode])),this.tableOffset(12);var r=a.split("."),i=t.dataSource.dataSources().filter(e=>e.id===r[0]||e.ref===r[0]||e.name===r[0])[0];this.path=(i.id||i.ref)+(1<r.length?"."+r.slice(1).join("."):""),this.displaySourceName=_.observable(i.name),this.asterisk=new yo(this,this.serializer)}getInfo(){return ea}getPath(){return this.path}createChildColumn(e){return new fo({"@Name":e.name},e,this,this.serializer)}}class Co extends bo{constructor(){super(...arguments),this.titletemplate="dxqb-federation-table-title"}}class To extends P.TreeListController{constructor(e,t){super(),this.dragDropHandler=e,this.dblClickHandler=t}itemsFilter(e,t,a){return"none"!==e.specifics}isDraggable(e){if(!e.data||!e.data.isListType&&!1!==e.data.isSupportQueries)return!1;for(var t=e.parent;t&&t.data;){if(t.data.isListType)return!1;t=t.parent}return!0}}class Po extends To{itemsFilter(e,t,a){return super.itemsFilter(e,t,a)&&e.isList}hasItems(e){return super.hasItems(e)&&(!e.isListType||!1===e.isSupportQueries)}}class No extends P.PopupEditorBase{constructor(e,t,a=!1,i){super(),this.onSaveCallback=e,this._dataSource=t,this.rtl=a,this.onCloseCallback=i,this.selectedPath=_.observable(),this.title=()=>Object(v.getLocalization)("Query Builder","DataAccessUIStringId.QueryBuilder"),this.getPopupContainer=v.getParentContainer,this.loaded=_.observable(!1),this.maxHeight="90%",this.width="900px",this.height="710px",this.cssClass="dxrd-querybuilder-federation-popup-wrapper",this.resultGridHeight=_.observable(250),this.dragDropHandler=new v.WizardDragDropHandler({dragHelperContent:new v.DragHelperContent(null),parent:".dx-designer-viewport .dxrd-querybuilder-federation-popup-wrapper > .dx-popup-normal",containment:".dxrd-querybuilder-federation-popup",target:this.popupTarget(),addHandler:(e,t,a)=>{(e&&e instanceof No||e instanceof po)&&this.addDataMember(t,a)}});var r=new To(this.dragDropHandler,e=>r.isDraggable(e)&&this.addDataMember(e));this.fieldListModel={itemsProvider:this._dataSource.dbSchemaProvider,treeListController:r,selectedPath:this.selectedPath,pageSize:100,expandRootItems:!0,onItemsChanged:e=>{e.forEach(e=>{e.parent&&r.isDraggable(e.parent)&&e.parent.data.isListType&&e.parent.collapsed(!0)})},rtl:a},this._disposables.push(this.dragDropHandler,r),this._aliasValidationRule={type:"custom",validationCallback:e=>!e.value||this._aliasValidationCallback(e.value,e.data),get message(){return Object(v.getLocalization)("Alias is not unique","DataAccessUIStringId.FederationDataSourceQueryBuilder_AliasUniqueMessage")}},this.resizeHelper=new P.ResizeHelper}_aliasValidationCallback(e,t){return!0}dispose(){super.dispose(),this.fieldListModel=null,this.onSaveCallback=null,this._dataSource=null}addDataMember(e,t){}save(){this.close()}close(){this.onCloseCallback&&this.onCloseCallback(),this.popupVisible(!1)}popupTarget(){return".dxrd-result-source-grid"}onHiding(){}}class Oo{constructor(e,t){this.provider=e,this.tables=t}getItems(e){var t,a=T.Deferred();return""===e.path?a.resolve(this.tables().map(e=>({name:e.actualName(),displayName:e.actualName(),isList:!0,specifics:"List",dragData:{noDragable:!1}}))):((t=e.fullPath.split(".")).shift(),(e=Object(v.findFirstItemMatchesCondition)(this.tables(),e=>e.actualName()===t.join(".")))&&this.provider.getItems(new C.PathRequest(e.path)).done(e=>a.resolve(e))),a.promise()}}class wo extends No{constructor(e,t,a=!1,i){super(e,t,a,i),this.popupContentTemplate="dxrd-querybuilder-select-popup-content",this._querySource=_.observable(null),this.designer=_.observable(null),this.joinResultCollapsed=_.observable(!1),this.width="90%",this.height="90%",this.cssClass="dxrd-querybuilder-federation-popup-wrapper dxrd-querybuilder-select-federation-popup",this._qbOptions={queryBuilderModel:this.designer,dataSource:t,dbSchemaProvider:_.observable(t.dbSchemaProvider),showPropertyGridCondition:e=>"JoinCondition"===e.controlType||"FTable"===e.controlType||"Column"===e.controlType,querySource:this._querySource};var r=[{name:"DataSource",needPrefix:!(this.queryBuilderSurfaceCreator={options:this._qbOptions,creator:e=>new xo(e.querySource(),e.dataSource,e.dbSchemaProvider(),e.parametersMode,new C.ModelSerializer)}),rootPath:"Root"}],o=(this.allColumns=_.pureComputed(()=>{var t,a=[];return this._getQuery()&&(t="",a.push({column:Jr.DisplayName(),table:t,key:f[f.SelectAllColumnsExpression]}),this._getQuery().getAllColumns().map(e=>{var t=e.parentModel();return{column:e.name(),table:t.actualName(),key:this._generateKey(t.actualName(),e.name(),e.actualName(),e.alias())}}).forEach(e=>{e.table&&t!==e.table&&a.push({column:Jr.DisplayName(),table:e.table,key:e.table+"_"+f[f.SelectAllNodeColumnsExpression]}),t=e.table,a.push(e)})),a}),this.columnsExpressions=_.pureComputed(()=>this._getQuery()&&this._getQuery().columns().map((e,t)=>{var a,i;return e.actualName()&&(a=this._generateKey(e.table(),e.column(),e.actualName(),e.alias())),e.itemType()===A[A.Column]?i=e.column():e.itemType()===A[A.Expression]?i=e.expression():e.itemType()===A[A.AllColumns]?(a=e.table()+"_"+f[f.SelectAllNodeColumnsExpression],i=Jr.DisplayName()):e.itemType()===A[A.AllColumnsQuery]&&(a=f[f.SelectAllColumnsExpression],i=Jr.DisplayName()),{alias:e.alias(),key:a,index:t,column:i,table:e.table(),isExpression:_.observable(e.itemType()===A[A.Expression]),expression:e.expression}})),this._disposables.push(this.columnsExpressions,this.allColumns),(e,t)=>{var a=T.fn.constructor(e),t=this._bindingContext.createChildContext({allColumns:this.allColumns,itemsProvider:new Oo(this._dataSource.dbSchemaProvider,this._getQuery().tables),cellInfo:t.data,expression:{value:t.data.expression,onContentReady:this._onContentReady,path:_.observable(r[0].name),customizeCategories:()=>{},rootItems:r,functions:Object(P.functionDisplay)().filter(e=>"Aggregate"!=e.category)},isExpression:t.data.isExpression||_.observable(!1),changeColumn:e=>{this._changeColumn(e.selectedRowsData[0],e.model.cellInfo.index)},switchEditors:e=>{this._switchEditors(e.model.cellInfo)}}),i=document.createElement("div"),a=a.append(i);_.renderTemplate("dxrd-querybuilder-column-combobox",t,{},i,"replaceNode"),Object(v.addDisposeCallback)(e,function(){a=null})});this._disposables.push(this.addRowDisabled=_.pureComputed(()=>!this._getQuery()||0===this._getQuery().tables().length)),this.columnsGrid={rtlEnabled:a,dataSource:this.columnsExpressions,disabled:this.addRowDisabled,showRowLines:!0,height:"100%",showBorders:!0,editing:{allowUpdating:e=>!(e.row&&e.row.data.key&&this._isSelectAllItemByKey(e.row.data.key)),newRowPosition:"last",mode:"cell",texts:{confirmDeleteMessage:""}},paging:{enabled:!1},columns:[{dataField:"column",get caption(){return Object(v.getLocalization)("Column Name","DataAccessUIStringId.QueryBuilderColumns_ColumnName")},cssClass:"dx-editor-cell",editCellTemplate:o,cellTemplate:(e,t)=>{if(t.data.key&&this._isSelectAllItemByKey(t.data.key))return o(e,t);var a=Object(x.getTemplate)("dxrd-querybuilder-column-combobox-masked"),e=T.fn.constructor(e).append(a),a={cellInfo:t.data,isExpression:t.data.isExpression||_.observable(!1),switchEditors:()=>null};_.applyBindings(a,e[0])}},{dataField:"table",get caption(){return Object(v.getLocalization)("Table Name","DataAccessUIStringId.QueryBuilderColumns_TableName")},allowEditing:!1},{dataField:"alias",get caption(){return Object(v.getLocalization)("Alias","DataAccessUIStringId.QueryBuilderColumns_Alias")},disabled:!0,validationRules:[this._aliasValidationRule,{type:"custom",validationCallback:e=>{if(""===e.value&&e.data&&e.data.key){e=$.findByName(this._getQuery().columns,e.data.key);if(e&&e.itemType()===A[A.Expression])return!1}return!0},get message(){return Object(v.getLocalization)("The column name is not specified.","DataAccessStringId.UnnamedColumnValidationException")}}]},{type:"buttons",width:50,buttons:[{icon:"delete",onClick:e=>{this._deleteRow(null!=e.row.data.index?e.row.data.index:this._getQuery().columns().length)},cssClass:"dxrd-querybuilder-grid-actions dxd-icon-highlighted dxrd-image-recycle-bin",template:Object(x.getTemplate)("dxrd-svg-operations-recycle_bin")}]}],onInitialized:e=>{this._bindingContext=_.contextFor(T.fn.constructor(e.element)[0]),this._gridComponent=e.component},onRowUpdating:e=>{this._onRowUpdating(e.oldData,e.newData)}},this.gridResizeHelper=new P.ResizeHelper(this.resultGridHeight,this.joinResultCollapsed)}_onContentReady(e){e.component._isFirstLoad||(e.component._isFirstLoad=!0,T.fn.constructor(e.component.content())[0].parentElement.className+=" dx-dropdowneditor-overlay")}_getQuery(){return this.designer()&&this.designer().model()}_afterChangeColumn(a,e){this._gridComponent.saveEditData().then(()=>{this._gridComponent.cancelEditData();var t=()=>{var e=this._gridComponent.getVisibleRows(),e=null!=a?a:e.length-1;this._gridComponent.editCell(e,0),this._gridComponent.navigateToRow(this.columnsExpressions()[e]),this._gridComponent.off("contentReady",t)};this._gridComponent.on("contentReady",t),e()})}_changeColumn(e,t){var a;e&&(a=$.createNew(this._getQuery(),this._getQuery().columns,e.table,e.column),this._isSelectAllItemByKey(e.key)&&(a=e.table?new Hr({"@Table":e.table,"@ItemType":A[A.AllColumns]},this._getQuery()):new Hr({"@ItemType":A[A.AllColumnsQuery]},this._getQuery())),this._afterChangeColumn(t,()=>null!=t?this._getQuery().columns.splice(t,1,a):this._getQuery().columns.push(a)))}_switchEditors(e){var t,a,i=()=>this._getQuery().columns.notifySubscribers();null!=e.index?(a=this._getQuery().columns()[e.index],e.isExpression()?a.toTable():a.itemType()===A[A.AllColumns]||a.itemType()===A[A.AllColumnsQuery]?(a=new Hr({},this._getQuery()),$.toExpresson(a,this._getQuery().columns,""),this._getQuery().columns.splice(e.index,1,a)):(t=a.column()?"["+a.table()+"."+a.column()+"]":"",$.toExpresson(a,this._getQuery().columns,t))):(a=new Hr({},this._getQuery()),$.toExpresson(a,this._getQuery().columns,""),i=()=>this._getQuery().columns.push(a)),this._afterChangeColumn(e.index,i)}_deleteRow(e){this._gridComponent.deleteRow(e),this._gridComponent.deselectAll(),this._getQuery().columns.splice(e,1)}_onRowUpdating(e,t){var a=this._getQuery().columns()[e.index];a&&a.alias(t.alias),e.alias=t.alias,this._gridComponent.saveEditData()}_aliasValidationCallback(e,t){return e===t.alias&&e===t.key||!$.findByName(this._getQuery().columns,e)}dispose(){super.dispose(),this._bindingContext=null,this._gridComponent=null,this._qbOptions=null,this.queryBuilderSurfaceCreator=null,this.columnsGrid=null}_generateKey(e,t,a,i){return i===a?a:e+"_"+t}_isSelectAllItemByKey(e){return e===f[f.SelectAllColumnsExpression]||-1!==e.indexOf(f[f.SelectAllNodeColumnsExpression])}save(){this.selectQuery.init(this._getQuery().serialize()),this.onSaveCallback(this.selectQuery),this.close()}addRow(){this._gridComponent.addRow(),this._gridComponent.deselectAll()}canSave(){return this._getQuery()&&this._getQuery().isValid()}addDataMember(e,t){var a,i,r=this._getQuery();1<r.tables().length&&!r.validateRelations()||(i=e.data.displayName||e.data.name,a=r.createChild(Object(v.extend)({"@ControlType":"FTable","@Name":i},la.controlsMap.FTable.defaultVal),void 0,e.path),i=_.unwrap(Object(v.findSurface)(a)),t?((e=_.unwrap(Object(v.findSurface)(this.designer()))).underCursor().x=t.left-e.absolutePosition.x(),e.underCursor().y=t.top-e.absolutePosition.y(),i.rect({left:e.underCursor().x,top:e.underCursor().y,width:199})):(t=Math.max.apply(null,r.tables.peek().filter(e=>e!==a).map(e=>e.location.x.peek()+1.25*e.size.width.peek()).concat([30])),a.location.x(t),a.location.y(20)),this.designer().selection.initialize(i))}show(e){this.selectQuery=e,this._querySource((new C.ModelSerializer).serialize(e)),this.popupVisible(!0)}popupTarget(){return".dxrd-select-querybuilder-surface .dxqb-main"}}class Do{constructor(o,s,e){this.getItems=t=>{var r=T.Deferred();return(!e()||t.fullPath.split(".").length>e().split(".").length?r.resolve([]):(o.getItems(t).done(e=>{var i=[],a=[];e.forEach(t=>{var e=s().filter(e=>e.name==t.name)[0];Object(v.isList)(t)&&e&&e.transform.value()?a.push(e):(t.displayName=e&&e.alias||t.displayName,i.push(t))}),0===a.length?r.resolve(i):T.when(...a.map(a=>o.getItems(new C.PathRequest(t.fullPath+"."+a.name)).always(e=>{e.forEach(e=>{var t=(a.alias||a.column)+"_"+e.displayName;e.displayName=t,e.name=t}),r.resolve(e.concat(i))})))}),r)).promise()},this.dispose=()=>{this.getItems=null,o=null}}}class Io extends No{constructor(e,t,a=!1,i){super(e,t,a,i),this.transformGridTitle=_.observable(),this.transformResultGridTitle=_.observable(),this.transformResultCollapsed=_.observable(!1),this.transformSources=_.observable([]),this.currentPath=_.observable(),this.transformQuery=_.observable(),this.popupContentTemplate="dxrd-querybuilder-transform-popup-content",this.transformGrid={rtlEnabled:a,noDataText:()=>"",dataSource:this.transformSources,showRowLines:!0,paging:{enabled:!1},scrolling:{mode:"infinite"},editing:{allowUpdating:!0,mode:"cell"},height:"100%",columns:[{dataField:"column",get caption(){return Object(v.getLocalization)("Column Name","DataAccessUIStringId.QueryBuilderColumns_ColumnName")},allowEditing:!1},{dataField:"alias",get caption(){return Object(v.getLocalization)("Alias","DataAccessUIStringId.QueryBuilderColumns_Alias")},validationRules:[this._aliasValidationRule]},{type:"buttons",get caption(){return Object(v.getLocalization)("Transform","DataAccessUIStringId.FederationDataSourceQueryBuilder_NodeType_Transform")},buttons:[{template:function(e,t){var a=document.createElement("div");e.append(a),_.renderTemplate("dxrd-querybuilder-transform-checkbox",t.data,{},a,"replaceNode")}}]}],onRowUpdating:e=>{e.oldData.alias=e.newData.alias,this.resultFieldListModel.valueHasMutated(),this.transformSources.valueHasMutated()}};var e=new Do(this._dataSource.dbSchemaProvider,this.transformSources,this.currentPath),r=(this.resultFieldListModel=_.observable({itemsProvider:e,path:this.currentPath,selectedPath:_.observable(),treeListController:null}),new Po(this.dragDropHandler,e=>r.isDraggable(e)&&this.addDataMember(e)));this.fieldListModel={itemsProvider:this._dataSource.dbSchemaProvider,treeListController:r,selectedPath:this.selectedPath,pageSize:100,expandRootItems:!0},this._disposables.push(this.currentPath.subscribe(e=>{this.selectedPath(e),this.transformGridTitle(Object(v.formatUnicorn)(Object(v.getLocalization)("Transformation node root: {0}","DataAccessUIStringId.FederationDataSourceQueryBuilder_TransformationNodeRoot"),this._dataSource.getQueryNameFromPath(e)))}),r,e,r),this.transformResultGridTitle(Object(v.getLocalization)("Transformation result","DataAccessUIStringId.FederationDataSourceQueryBuilder_TransformationResult"))}_updateColumns(a,i){this.transformSources(a.map(e=>{var t=!e.isList;return{columns:a,column:e.displayName,name:e.name,key:i+"."+e.name,alias:void 0,transform:{value:_.observable(t&&void 0),disabled:t,onValueChanged:()=>{this.resultFieldListModel.valueHasMutated()}}}}))}_aliasValidationCallback(t,e){var a=Object(v.findFirstItemMatchesCondition)(this.transformSources(),e=>e.alias===t);return!(!a||a.key!==e.key)||!a}dispose(){super.dispose(),this.resultFieldListModel=null,this.transformGrid=null}addDataMember(e){this.currentPath(e.path),this.updateColumns(),this.transformSources.valueHasMutated()}updateColumns(){var t=this.currentPath();this._dataSource.fielListProvider.getItems(new C.PathRequest(this.currentPath())).done(e=>{this._updateColumns(e,t)})}canSave(){return this.transformSources().some(e=>e.transform.value()||e.alias)}save(){var t=this.transformQuery();t.root(new ta({},new C.ModelSerializer,this._dataSource.getQueryNameFromPath(this.currentPath()),this.currentPath())),t.transformationRules([]),this.transformSources().forEach(e=>{(e.transform.value()||e.alias)&&t.transformationRules.push(new va({"@Name":e.name,"@Alias":e.alias,"@Unfold":e.transform.value(),"@Flatten":e.transform.value()}))}),this.onSaveCallback(this.transformQuery()),this.close()}onHiding(){this.transformQuery(null),this.transformResultCollapsed(!1),this.currentPath(""),this.transformSources([])}show(t){var a,e,i;this.transformQuery(t),t.root&&t.root()&&(a=this._dataSource.getPathFromQueryName(t.root().sourceName()),this.currentPath(a),this._dataSource.fielListProvider.getItems(new C.PathRequest(a)).done(e=>{this._updateColumns(e,a),t.transformationRules().forEach(t=>{var e=this.transformSources().filter(e=>e.name===t.name())[0];e.alias=t.alias(),e.transform.value(t.unfold())})})),this.currentPath()||(e=this._dataSource.dataSources()[0],i=e.ref||e.id,e.isListType?(this.currentPath(i),this.updateColumns()):this._dataSource.fielListProvider.getItems(new C.PathRequest(i)).done(e=>{this.currentPath(e[0]&&e[0].isListType?i+"."+e[0].name:i),this.updateColumns()})),this.popupVisible(!0)}}class Eo extends No{constructor(e,t,a=!1,i){super(e,t,a,i),this.unionQuery=_.observable(),this.unionAll=_.observable(!1),this.columns=_.observableArray(),this.popupContentTemplate="dxrd-querybuilder-union-popup-content",this.buttonItems.push({toolbar:"bottom",location:"before",widget:"dxCheckBox",options:{text:Object(v.getLocalization)("Union All","DataAccessUIStringId.FederationDataSourceQueryBuilder_NodeType_UnionAll"),value:this.unionAll}});e=_.pureComputed(()=>this.unionQuery()&&this.unionQuery().queries().map(e=>{e=e.alias.peek();return{source:e.split("_").join(" - "),name:e}}));this._disposables.push(e),this.sourcesGrid={rtlEnabled:a,noDataText:()=>Object(v.getLocalization)("Drop a table or view here to create a query.","AnalyticsCoreStringId.QueryBuilder_SurfacePlaceholder"),dataSource:e,showRowLines:!0,paging:{enabled:!1},scrolling:{mode:"infinite"},columns:[{dataField:"source",get caption(){return Object(v.getLocalization)("Source","DataAccessUIStringId.QueryBuilderColumns_Source")}},{type:"buttons",width:30,buttons:[{icon:"delete",onClick:e=>{this.unionQuery().removeQuery(e.row.data.name),this.unionQuery.valueHasMutated()},cssClass:"dxrd-image-recycle-bin",template:Object(x.getTemplate)("dxrd-svg-operations-recycle_bin")}]}]},this._disposables.push(this.unionQuery.subscribe(e=>{var a=[],i=[];this.columns([]),e&&0!==e.queries().length&&(e.queries().forEach(e=>a.push(e.expressions())),a[0]&&a[0].forEach(t=>{a.every(e=>!!e.filter(e=>e.name()===t.name())[0])&&i.push({name:t.name(),alias:t.alias(),key:t.table()+"."+t.name()})}),this.columns(i))})),this._disposables.push(this.unionAll.subscribe(e=>{this.unionQuery()&&(e?this.unionQuery().unionType(Ca[Ca.UnionAll]):this.unionQuery().unionType(Ca[Ca.Union]))})),this.aliasGrid={rtlEnabled:a,dataSource:this.columns,showRowLines:!0,editing:{allowUpdating:!0,mode:"cell"},paging:{enabled:!1},scrolling:{mode:"infinite"},height:"100%",columns:[{dataField:"name",caption:"Column Name",allowEditing:!1},{dataField:"alias",get caption(){return Object(v.getLocalization)("Alias","DataAccessUIStringId.QueryBuilderColumns_Alias")},validationRules:[this._aliasValidationRule]}],onRowUpdating:e=>{e.oldData.alias=e.newData.alias}}}_aliasValidationCallback(t,e){var a=Object(v.findFirstItemMatchesCondition)(this.columns(),e=>e.alias===t);return!(!a||a.key!==e.key)||!a}dispose(){super.dispose(),this.sourcesGrid=null,this.aliasGrid=null}addDataMember(t){this._dataSource.fielListProvider.getItems(new C.PathRequest(t.path)).done(e=>{e.forEach(e=>this.unionQuery().addSelectQuery(t.path,e.name)),this.unionQuery.valueHasMutated()})}canSave(){return this.unionQuery()&&0<this.unionQuery().queries().length}save(){this.unionQuery().queries().forEach(e=>{e.expressions(e.expressions().filter(t=>{var e=this.columns().filter(e=>e.name===t.name())[0];return!!e&&(t.alias(e.alias),!0)}))}),this.onSaveCallback(this.unionQuery()),this.close()}onHiding(){this.unionQuery(null),this.unionAll(!1)}show(e){this.unionQuery(e),this.popupVisible(!0),this.unionAll(e.unionType()===Ca[Ca.UnionAll])}}class ko extends C.Disposable{constructor(e,t,a,i=!1){super(),this._dataSource=e,this.queries=t,this._showSelectQbCallBack=(e=null)=>{this._popupSelectQueryBuilder.show(this._getQuery(()=>new fa({}),e))},this._showUnionQbCallBack=(e=null)=>{this._popupUnionQueryBuilder.show(this._getQuery(()=>new Pa({},this._dataSource.dataSources),e))},this._showTransformQbCallBack=(e=null)=>{this._popupTransformQueryBuilder.show(this._getQuery(()=>new xa({}),e))},this.template="dx-querybuilder-federation-popup-templates";e=e=>{this._setQuery(e),t.valueHasMutated(),a.onSave&&a.onSave()};this._afterAddQuery=a.afterAddQuery,this._disposables.push(t.subscribe(e=>e.forEach(e=>{e.sources().forEach(e=>this._dataSource.addSource(e))}))),this._disposables.push(this._popupSelectQueryBuilder=new wo(e,this._dataSource,i,a.onClose)),this._disposables.push(this._popupUnionQueryBuilder=new Eo(e,this._dataSource,i,a.onClose)),this._disposables.push(this._popupTransformQueryBuilder=new Io(e,this._dataSource,i,a.onClose)),this.callBacks={joinCallBack:this._showSelectQbCallBack,unionCallBack:this._showUnionQbCallBack,transformCallBack:this._showTransformQbCallBack},this.popupItems=[{template:"dxrd-querybuilder-federation-popup",model:this._popupSelectQueryBuilder},{template:"dxrd-querybuilder-federation-popup",model:this._popupUnionQueryBuilder},{template:"dxrd-querybuilder-federation-popup",model:this._popupTransformQueryBuilder}]}_getQuery(e,t){return t?Object(v.findFirstItemMatchesCondition)(this.queries(),e=>t===e.alias()):e()}_setQuery(t){t&&-1===this.queries.indexOf(t)&&(t.alias(t.alias()||t.generateName()),this._dataSource.queries().filter(e=>e.alias()===t.alias())[0]&&t.alias(Object(v.getUniqueName)(this._dataSource.queries().map(e=>e.alias()),t.alias())),this.queries.push(t),this._afterAddQuery)&&this._afterAddQuery(t)}editQuery(e,t){switch(e){case c.SelectNode:this.callBacks.joinCallBack(t);break;case c.UnionNode:this.callBacks.unionCallBack(t);break;case c.TransformationNode:this.callBacks.transformCallBack(t)}}dispose(){super.dispose(),this._dataSource=null}}class Ao{constructor(e){this._rootItems=e}afterItemsFilled(e,t){t.forEach(e=>{void 0===e.isListType&&(e.isListType="List"===e.specifics)})}beforeItemsFilled(e,t){return!e.fullPath&&(t.push(...this._rootItems().map(e=>({name:e.id||e.ref,displayName:e.name,isList:!0,specifics:e.specifics||"ListSource",isSupportQueries:e.isSupportQueries,isListType:e.isListType}))),!0)}}class $o extends Ji{constructor(e,t,a,i,r,o){super(e,t,a,i,r,o),this.callbacks=r,this.addAction={clickAction:()=>this.showPopover(),imageClassName:"dxrd-image-add",imageTemplateName:"dxrd-svg-operations-add",templateName:"dx-treelist-federation-action-with-popover",text:Object(v.getLocalization)("Add query","AnalyticsCoreStringId.SqlDSWizard_AddQuery")},this.className="dxrd-federation-addqueries-popover"}getActions(e){var t=[];return 0===e.path.indexOf("queries")&&t.push(this.addAction),t}popoverListItems(){return[{name:Object(v.getLocalization)("Join","DataAccessUIStringId.FederationDataSourceQueryBuilder_NodeType_Select"),addAction:()=>this.callbacks().showQbCallBacks.joinCallBack(),className:this.className},{name:Object(v.getLocalization)("Union","DataAccessUIStringId.FederationDataSourceQueryBuilder_NodeType_Union"),addAction:()=>this.callbacks().showQbCallBacks.unionCallBack(),className:this.className},{name:Object(v.getLocalization)("Transform","DataAccessUIStringId.FederationDataSourceQueryBuilder_NodeType_Transform"),addAction:()=>this.callbacks().showQbCallBacks.transformCallBack(),className:this.className}]}}class jo extends Zi{constructor(e,t,r,i,o){super(e,t,(e,t,a)=>new zo(e.name,e.displayName,e.specifics,e.isListType,t,a,o),(e,t,a)=>new Xi(e.name,e.displayName,e.specifics,t,a,o)),this._callBack=_.observable({deleteAction:t=>{this._customQueries.remove(Object(v.findFirstItemMatchesCondition)(this._customQueries(),e=>(e.alias()||e.generateName())===t))},disableCustomSql:!1,showQbCallBack:null,showQbCallBacks:null});var s=this.getItems;this._customQueries=i,this.getItems=e=>{var t,a=T.Deferred();return e.fullPath&&2<e.fullPath.split(".").length&&a.resolve([]),"queries"===e.fullPath?(t=i().map(t=>{var e,a=t.alias()||t.generateName(),i=this._queries.children().filter(e=>e.query===t)[0];if(i)return i;e=t instanceof Pa?_.observable(Object(v.extend)(this._callBack(),{showQbCallBack:r.unionCallBack})):t instanceof xa?_.observable(Object(v.extend)(this._callBack(),{showQbCallBack:r.transformCallBack})):_.observable(Object(v.extend)(this._callBack(),{showQbCallBack:r.joinCallBack}));a=new Gi(a,a,"query",!!i&&i.checked(),_.observableArray([]),e,o,t);return a.path="queries."+a.name,this._disposables.push(a),a}),this._queries.initializeChildren(t),a.resolve(t)):s(e,!0).done(e=>a.resolve(e)),a.promise()},this._callBack().showQbCallBacks=r,this._disposables.push(this._queries=new $o("queries",Object(C.getLocalization)("Federated Queries","DataAccessUIStringId.FederatedQueryCollectionList_Title"),"list",!1,this._callBack,o)),t.valueHasMutated(),this._rootItems.push(this._queries),this.dispose=()=>{super.dispose(),this.removeProperties()}}isList(e,t){return!t.isListType&&super.isList(e,t)}}class zo extends Yi{constructor(e,t,a,i,r,o,s){super(e,t,a,r,o,s),this.isListType=i}}class Bo extends I{constructor(e){super(),this._options=e,this._selectedPath=_.observable(null),this._itemsProvider=_.observable(),this._customQueries=_.observableArray([]),this._setQueryChecked=e=>{var t=this._itemsProvider().getRootItems();this._selectedPath("queries."+e.alias());e=Object(v.findFirstItemMatchesCondition)(t,e=>"queries"===e.name).children(),t=e[e.length-1];t.setChecked(!0),t._afterCheckToggled&&t._afterCheckToggled(t)},this._dataSources=_.observableArray(),this._scrollViewHeight="calc(100% - 37px)",this._isDataLoadingInProcess=_.observable(!1),this._customizeDBSchemaTreeListActions=null,this._dataSources(this._options.dataSources()),this._disposables.push(this._fieldListProvider=new v.FieldListProvider(this._wrapFieldListCallback(this._options.callbacks.fieldListsCallback),this._dataSources,[new Ao(this._dataSources)],!0)),this._disposables.push(this._dataSource=new Ea({},this._dataSources,this._fieldListProvider,new C.ModelSerializer)),this._disposables.push(this._queriesPopupHelper=new ko(this._dataSource,this._customQueries,{afterAddQuery:this._setQueryChecked},this._options.rtl)),this._fieldListModel=_.observable(null),this._getItemsAfterCheck=t=>{var a,e,i=t.path.split(".");"query"==t.specifics?((a=t.query||Object(v.findFirstItemMatchesCondition)(this._customQueries(),e=>(e.alias()||a.generateName())===t.name)).alias(t.name),t.checked.peek()?-1===this._dataSource.queries.indexOf(a)&&this._dataSource.queries.push(a):this._dataSource.queries.remove(a)):!t.isList||2<i.length?(e=i.pop(),i=i.join("."),t.checked.peek()?this._dataSource.addSelectQuery(i,e):this._dataSource.removeExpression(e,i)):t.children().forEach(e=>this._getItemsAfterCheck(e)),this._onChange(),this[ja]&&this[ja](!1)}}_wrapFieldListCallback(a){return t=>{var e=Object(v.findFirstItemMatchesCondition)(this._dataSources(),e=>null!=e.id&&null!=t.id&&e.id===t.id||null!=e.ref&&null!=t.id&&e.ref===t.ref);return e?a(t,e):a(t)}}canNext(){return 1<this._dataSource.queries().length}canFinish(){return 0<this._dataSource.queries().length}_createTreeListFactory(){return new xi}_loadPanelViewModel(e){return Cr._getLoadPanelViewModel(e,this._isDataLoadingInProcess)}commit(){return T.Deferred().resolve({federationDataSourceJSON:JSON.stringify((new C.ModelSerializer).serialize(this._dataSource)),federatedQueries:[]}).promise()}initialize(e){var t=T.Deferred(),a=_.observableArray(T.map(this._dataSources(),e=>({name:e.id||e.ref,displayName:e.name,isList:!0,specifics:e.specifics||"ListSource",isListType:e.isListType,dragData:{noDragable:!1}}))),a=new jo(this._fieldListProvider,a,this._queriesPopupHelper.callBacks,this._customQueries,this._getItemsAfterCheck);return this._disposables.push(a),this._itemsProvider(a),this._fieldListModel({factory:this._createTreeListFactory(),itemsProvider:this._itemsProvider(),selectedPath:this._selectedPath,treeListController:new Tr(this._customizeDBSchemaTreeListActions),templateName:"dxrd-treelist-with-checkbox"}),t.resolve().promise()}}function Ro(e,t){e.registerMetadata(Aa.FederatedQueryConfigurePage,{create:()=>new Bo(t),setState:(e,t)=>{t.federationDataSourceJSON=e.federationDataSourceJSON,t.federatedQueries=e.federatedQueries},getState:e=>e.federationDataSourceWizard,resetState:(e,t)=>{e.federationDataSourceJSON=t.federationDataSourceJSON,e.federatedQueries=t.federatedQueries},description:Object(C.getLocalization)("Columns selected from specific tables and/or views will be automatically included into a separate query.","AnalyticsCoreStringId.SqlDSWizard_PageConfigureMultiQuery"),template:"dxrd-wizard-add-federated-queries-page"})}class Mo extends qr{constructor(e,t){super(e),this._options=t,this._customResetOptions=T.noop,this._relationsEditor=_.observable(null)}_restoreDataSource(e){this._federationDataSource=Fa(e,this._options.dataSources)}_dataSource(){return this._federationDataSource}commit(){this.relationsSubscription.dispose();var e=this._relations().map(e=>wa.create(e)),t=(this._federationDataSource.relations(e),this._federationDataSource.resultSet=this._resultSet,new C.ModelSerializer);return T.Deferred().resolve({federationDataSourceJSON:JSON.stringify((new C.ModelSerializer).serialize(this._federationDataSource)),relations:e.map(e=>JSON.stringify(t.serialize(e)))}).promise()}}function qo(e,t,a){e.registerMetadata(Aa.FederatedMasterDetailRelationshipsPage,{create:()=>new Mo(t,a),setState:(e,t)=>{t.relations=e.relations},getState:e=>e.federationDataSourceWizard,resetState:(e,t)=>{e.relations=t.relations},description:Object(C.getLocalization)("Configure master-detail relationships.","AnalyticsCoreStringId.SqlDSWizard_PageConfigureMasterDetailRelations"),template:"dxrd-wizard-configure-relations-page"})}class Lo{constructor(){this.metadata={}}registerMetadata(e,t){t.canFinish||(t.canFinish=e=>e.canFinish()),t.canNext||(t.canNext=e=>e.canNext()),this.metadata[e]=t}getMetadata(e){return this.metadata[e]}unregisterMetadata(e){delete this.metadata[e]}reset(){this.metadata={}}}class Qo{constructor(){this.connectionStrings={json:_.observableArray([]),sql:_.observableArray([])},this.callbacks={},this.rtl=!1,this.disableCustomSql=!1,this.wizardSettings=(new Wo).createDefault(),this.allowCreateNewJsonConnection=!1,this.predefinedDataSources=_.observable([])}get jsonDataSourceAvailable(){return this.wizardSettings.enableJsonDataSource&&(this.allowCreateNewJsonConnection||0<(_.unwrap(this.connectionStrings.json)||[]).length)}get sqlDataSourceAvailable(){return this.wizardSettings.enableSqlDataSource&&0<(_.unwrap(this.connectionStrings.sql)||[]).length}get objectDataSourceAvailable(){return this.wizardSettings.enableObjectDataSource}get canCreateDataSource(){return this.jsonDataSourceAvailable||this.sqlDataSourceAvailable||this.objectDataSourceAvailable}get federationDataSourceAvailable(){return this.wizardSettings.enableFederationDataSource&&this.dataSources&&this.dataSources()&&0<this.dataSources().length}}class Vo extends Qo{}class Wo{createDefault(e){var t={enableJsonDataSource:!0,enableSqlDataSource:!0,enableObjectDataSource:!0,enableFederationDataSource:!0};return e&&(void 0!==e.enableJsonDataSource&&(t.enableJsonDataSource=e.enableJsonDataSource),void 0!==e.enableSqlDataSource&&(t.enableSqlDataSource=e.enableSqlDataSource),null!=e.enableObjectDataSource&&(t.enableObjectDataSource=e.enableObjectDataSource),null!=e.enableFederationDataSource)&&(t.enableFederationDataSource=e.enableFederationDataSource),t}}class Fo extends vr{constructor(e,t,a){super(e,t),this._dataSourceWizardOptions=a}getNextPageId(e){return!e&&Oi(this._dataSourceWizardOptions)?S.ChooseDataSourceTypePage:e?e===S.ChooseDataSourceTypePage&&this._getCurrentState().dataSourceType===y.Sql?N.ChooseConnectionPage:e===S.ChooseDataSourceTypePage&&this._getCurrentState().dataSourceType===y.Federation?Aa.FederatedQueryConfigurePage:e===S.ChooseDataSourceTypePage&&this._getCurrentState().dataSourceType===y.Json&&0<this._dataSourceWizardOptions.connectionStrings.json().length?O.ChooseConnectionPage:this._dataSourceWizardOptions.allowCreateNewJsonConnection&&e===S.ChooseDataSourceTypePage&&this._getCurrentState().dataSourceType===y.Json?O.ChooseJsonSourcePage:e===O.ChooseConnectionPage&&this._getCurrentState().jsonDataSourceWizard.connectionName?O.ChooseJsonSchemaPage:this._dataSourceWizardOptions.allowCreateNewJsonConnection&&e===O.ChooseConnectionPage&&!this._getCurrentState().jsonDataSourceWizard.connectionName?O.ChooseJsonSourcePage:e===O.ChooseJsonSourcePage?O.ChooseJsonSchemaPage:e===N.ChooseConnectionPage&&this._getCurrentState().sqlDataSourceWizard.name?N.ConfigureQueryPage:e===N.ConfigureQueryPage&&this._getCurrentState().sqlDataSourceWizard.sqlDataSourceJSON?N.ConfigureParametersPage:void 0:this.getNextPageId(S.ChooseDataSourceTypePage)}}class Uo extends Cr{constructor(e,t){super(e,t.callbacks.finishCallback),this._wizardOptions=t,this._extendCssClass="dxrd-sqldatasource-wizard",this.title=Object(C.getLocalization)("Data Source Wizard","AnalyticsCoreStringId.DSWizard_Title")}initialize(e,t=(e,t)=>new Fo(e,t,this._wizardOptions)){this._wizardOptions.sqlDataSourceAvailable||!Object(v.isEmptyObject)(e.sqlDataSourceWizard)?e.dataSourceType=y.Sql:(this._wizardOptions.jsonDataSourceAvailable||e.jsonDataSourceWizard.jsonSource)&&(e.dataSourceType=y.Json),super.initialize(e,t)}canRunWizard(){return this._wizardOptions.jsonDataSourceAvailable||this._wizardOptions.sqlDataSourceAvailable}}function Ho(e=new Lo,t){return Ma(e,t),qi(e,t.requestWrapper,t.callbacks.getItemsProviderCallback),ki(e,t),ar(e,t.requestWrapper,t.callbacks),di(e,t.callbacks.getItemsProviderCallback),br(e,t),ei(e,t.connectionStrings.sql),yr(e,t.requestWrapper),e}function Jo(e=new Lo,t){return e=Ho(e,t),new Uo(e,t)}class Go extends I{constructor(e){super(),this._dataSourceWizardOptions=e,this._types=_.observableArray([]),this._objectDataSource=new Mt;e=this._dataSourceWizardOptions.callbacks.getItemsProviderCallback;this._disposables.push(this._provider=new ui(this._dataSourceWizardOptions.requestWrapper),this._chooseObjectType=new hi(this._types,this._provider),this._chooseObjectDataMember=new bi(this._chooseObjectType.selectedType,this._chooseObjectType.selectedCtor),this._chooseObjectParameters=new si(this._chooseObjectType.selectedCtor,this._chooseObjectDataMember.selectedDataMembers,e&&e())),this._initSections()}_initSections(){this._sections=[{data:this._chooseObjectType,disabled:()=>!1,description:Object(C.getLocalization)("Choose the type and its constructor.","AnalyticsCoreStringId.ObjectDSWizard_ChooseType_Description"),position:vi(this._dataSourceWizardOptions.rtl?E.Right:E.Left),template:"dx-objectdatasource-types-section"},{data:this._chooseObjectDataMember,disabled:()=>!this._chooseObjectDataMember.dataMembers().length,description:Object(C.getLocalization)("Choose the entire object or a data member to bind.","AnalyticsCoreStringId.ObjectDSWizard_ChooseDataMember_Description"),position:vi(this._dataSourceWizardOptions.rtl?E.TopLeft:E.TopRight),disabledText:Object(C.getLocalization)("To select a data member, choose a type that contains at least one data member.","AnalyticsCoreStringId.ObjectDSWizard_ChooseDataMember_Disabled_Description"),template:"dx-objectdatasource-datamembers-section"},{data:this._chooseObjectParameters,disabled:()=>!this._chooseObjectParameters.hasParameters(),position:vi(this._dataSourceWizardOptions.rtl?E.BottomLeft:E.BottomRight),description:Object(C.getLocalization)("Configure constructor parameters and/or method parameters.","AnalyticsCoreStringId.ObjectDSWizard_ConfigureParameters_Description"),disabledText:Object(C.getLocalization)("To specify parameters, select a parameterized constructor or method.","AnalyticsCoreStringId.ObjectDSWizard_ConfigureParameters_Disabled_Description"),template:"dx-objectdatasource-parameters-section"}]}showDescription(e,t){return[e+1,t].join(". ")}canNext(){return!1}canFinish(){return!!this._chooseObjectDataMember.selectedDataMembers().length}commit(){var e=this._chooseObjectDataMember.selectedDataMembers()[0];return T.Deferred().resolve({selectedType:this._chooseObjectType.selectedType().name,ctor:this._chooseObjectType.selectedCtor(),dataSourceName:this._objectDataSource.name(),context:this._context,dataMember:!e||e.isEntireObject()?void 0:e}).promise()}initialize(e){return this._context=e.objectDataSourceWizard.context,this._objectDataSource.setState(e.objectDataSourceWizard),this._chooseObjectType.selectedCtor(this._objectDataSource.ctor),this._chooseObjectDataMember.selectedDataMembers([this._objectDataSource.dataMember]),this._provider.getObjectTypeDescriptions(e.objectDataSourceWizard.context).done(e=>{e.types.forEach(e=>e.members.splice(0,0,Vt.empty())),this._types(e.types||[]),0<e.types.length&&this._chooseObjectType.selectedPath(e.types[0].name)}),T.Deferred().resolve().promise()}}function Xo(e,t){e.registerMetadata(w.SpecifyObjectDataSourceSettingsPage,{setState:(e,t)=>{t.objectDataSourceWizard.ctor=e.ctor,t.objectDataSourceWizard.dataMember=e.dataMember,t.objectDataSourceWizard.selectedType=e.selectedType,t.objectDataSourceWizard.dataSourceName=e.dataSourceName},getState:e=>e,resetState:(e,t)=>{e.objectDataSourceWizard.ctor=t.objectDataSourceWizard.ctor,e.objectDataSourceWizard.dataMember=t.objectDataSourceWizard.dataMember,e.objectDataSourceWizard.selectedType=t.objectDataSourceWizard.selectedType,e.objectDataSourceWizard.dataSourceName=t.objectDataSourceWizard.dataSourceName},create:()=>new Go(t),template:"dxrd-page-objectsource",navigationPanelText:Object(C.getLocalization)("Specify Data Source Settings","AnalyticsCoreStringId.Wizard_SpecifyDataSourceSettingsPage")})}class Yo extends Qo{}class Ko extends Cr{constructor(e,t){super(e,t.callbacks.finishCallback),this._wizardOptions=t,this.title=Object(C.getLocalization)("Data Source Wizard","AnalyticsCoreStringId.SqlDSWizard_Title"),this._extendCssClass="dxrd-multiqueries-sqldatasource-wizard",this.height(443)}canRunWizard(){return this._wizardOptions.jsonDataSourceAvailable||this._wizardOptions.sqlDataSourceAvailable||this._wizardOptions.objectDataSourceAvailable}initialize(e,t=(e,t)=>new Zo(e,t,this._wizardOptions)){this._wizardOptions.sqlDataSourceAvailable||!Object(v.isEmptyObject)(e.sqlDataSourceWizard)?e.dataSourceType=y.Sql:this._wizardOptions.jsonDataSourceAvailable||e.jsonDataSourceWizard.jsonSource?e.dataSourceType=y.Json:this._wizardOptions.objectDataSourceAvailable&&(e.dataSourceType=y.Object),super.initialize(e,t)}}class Zo extends vr{constructor(e,t,a){super(e,t),this._wizardOptions=a}getNextPageId(e){if(!e&&0<this._wizardOptions.predefinedDataSources().length)return S.ChoosePredefinedDataSourcePage;if((!e||e===S.ChoosePredefinedDataSourcePage)&&Oi(this._wizardOptions))return S.ChooseDataSourceTypePage;if(!e||e===S.ChoosePredefinedDataSourcePage)return this.getNextPageId(S.ChooseDataSourceTypePage);if(e===S.ChooseDataSourceTypePage&&this._getCurrentState().dataSourceType===y.Sql)return N.ChooseConnectionPage;if(e===S.ChooseDataSourceTypePage&&this._getCurrentState().dataSourceType===y.Federation)return Aa.FederatedQueryConfigurePage;if(e===S.ChooseDataSourceTypePage&&this._getCurrentState().dataSourceType===y.Object)return $a.ChooseTypesPage;if(e===$a.ChooseTypesPage&&this._getCurrentState().objectDataSourceWizard.selectedType)return $a.ChooseDataMembersPage;if(e===$a.ChooseDataMembersPage)return $a.ConfigureParametersPage;if(e===S.ChooseDataSourceTypePage&&this._getCurrentState().dataSourceType===y.Json&&0<this._wizardOptions.connectionStrings.json().length)return O.ChooseConnectionPage;if(this._wizardOptions.allowCreateNewJsonConnection&&e===S.ChooseDataSourceTypePage&&this._getCurrentState().dataSourceType===y.Json)return O.ChooseJsonSourcePage;if(e===O.ChooseConnectionPage&&this._getCurrentState().jsonDataSourceWizard.connectionName)return O.ChooseJsonSchemaPage;if(this._wizardOptions.allowCreateNewJsonConnection&&e===O.ChooseConnectionPage&&!this._getCurrentState().jsonDataSourceWizard.connectionName)return O.ChooseJsonSourcePage;if(e===O.ChooseJsonSourcePage)return O.ChooseJsonSchemaPage;if(e===N.ChooseConnectionPage&&this._getCurrentState().sqlDataSourceWizard.name)return N.MultiQueryConfigurePage;if(this._getCurrentState().sqlDataSourceWizard.sqlDataSourceJSON&&e===N.MultiQueryConfigurePage&&0<this._getCurrentState().sqlDataSourceWizard.customQueries.length)return N.MultiQueryConfigureParametersPage;if(e===N.MultiQueryConfigurePage||e===N.MultiQueryConfigureParametersPage){if(1<Qa(this._getCurrentState().sqlDataSourceWizard).sqlDataSource.queries().length)return S.ConfigureMasterDetailRelationshipsPage}else if(e===Aa.FederatedQueryConfigurePage)if(1<Fa(this._getCurrentState().federationDataSourceWizard,this._wizardOptions.dataSources).queries().length)return Aa.FederatedMasterDetailRelationshipsPage}}function es(e=new Lo,t){return Ii(e,t),Ma(e,t),ki(e,t),qi(e,t.requestWrapper,t.callbacks.getItemsProviderCallback),ar(e,t.requestWrapper,t.callbacks),ei(e,t.connectionStrings.sql,t.getSqlConnectionStrings),Xo(e,t),Ro(e,t),qo(e,or(t.callbacks.federationDataSourceResultSchema),t),Nr(e,t),$r(e,t.requestWrapper),Qr(e,rr(t.callbacks.sqlDataSourceResultSchema)),gi(e,t),yi(e,t),di(e,t.callbacks.getItemsProviderCallback),e}function ts(e=new Lo,t){return es(e,t),new Ko(e,t)}class as extends Lo{constructor(){super(...arguments),this.metadata={}}registerMetadata(e,t){super.registerMetadata(e,t)}getMetadata(e){return super.getMetadata(e)}}class is extends Lo{registerMetadata(e,t){super.registerMetadata(e,t),void 0===t.position&&(t.position=Object.keys(this.metadata).length-1),void 0===t.recreate&&(t.recreate=!1),void 0===t.disabledText&&(t.disabledText="")}}class rs extends Ka{constructor(e,t,a){super(e,t,a.template,a.description),this.pageId=e,(this.page=t).onChange&&(this.onChange=e=>{t.onChange(()=>{e(),a.onChange&&a.onChange()})})}}class os{constructor(e,t){this.pageId=e,this.metadata=t,this.page=_.observable(null)}resetPage(){this.page()&&this.page().dispose(),this.page(null)}setPage(e){this.page()!==e&&this.page(e)}}class ss{constructor(e,t,a){this.pageFactory=e,this.stateManager=t,this._resetPageCallback=a,this._pagesIds=[],this._pages=[]}_resetPages(e,t=e=>this._resetPage(e)){if(e<this._pagesIds.length)for(var a=this._pagesIds.length-1;e<=a;a--)this._pagesIds[a].forEach(e=>t(e)),this._pagesIds.splice(a,1)}_tryResetPageByMetadata(e){return!!this.pageFactory.getMetadata(e).recreate&&(this._resetPage(e),!0)}_resetPage(e){this.stateManager.resetPageState(e),this._resetPageCallback(e);e=this._getPage(e);e&&(e.dispose(),this._pages.splice(this._pages.indexOf(e),1))}_createNewPage(e){var t=this.pageFactory.getMetadata(e);return new rs(e,t.create(),t)}_getPage(t){return this._pages.filter(e=>e.pageId===t)[0]}_getNextPage(e){return T.Deferred().resolve(e.map(e=>{var t=this._getPage(e);return t&&!this._tryResetPageByMetadata(e)||(t=this._createNewPage(e),this._pages.push(t)),t})).promise()}_getPageIndex(t){return this._pagesIds.indexOf(this._pagesIds.filter(e=>e.some(e=>e===t))[0])}resetNextPages(e){this._resetPages(this._getPageIndex(e)+1)}getStartPage(){var e=this.getNextPageId(),t=this.pageFactory.getMetadata(e),t=new rs(e,t.create(),t);return this._pagesIds.push([e]),t}getNextPage(e){var t=this._getPageIndex(e),a=this.getNextPageId(e);return a?(a.push||(a=[a]),JSON.stringify(this._pagesIds[t+1])!==JSON.stringify(a)&&(this._resetPages(t+1,e=>{-1===a.indexOf(e)&&this._resetPage(e)}),this._pagesIds.push(a)),this._getNextPage(a)):(this.resetNextPages(e),T.Deferred().reject().promise())}getCurrentState(){return this.stateManager.getCurrentState()}getNextPageId(e){return""}}class ns extends C.Disposable{constructor(e,t,a){super(),this.pageFactory=e,this.events=new C.EventManager,this._loadingTimeout=null,this._changeTimeout=null,this.sections=[],this.isLoading=_.observable(!1),t&&(this._loadingState=t),a&&(this._extendedNextAction=a),this._disposables.push(this.events)}dispose(){super.dispose(),this.sections.forEach(e=>e.resetPage()),this.sections=[]}_createLoadingState(e){e[ns.__loadingStateFunctionName]||(e[ns.__loadingStateFunctionName]=e=>this._loadingState(e))}_createNextAction(e){e[za]||(e[za]=()=>this._extendedNextAction())}_loadingState(e){e?(this._loadingTimeout&&clearTimeout(this._loadingTimeout),this._loadingTimeout=setTimeout(()=>{this.isLoading(!0)},100)):(this._loadingTimeout&&clearTimeout(this._loadingTimeout),this.isLoading(!1))}_extendedNextAction(){}_resetPageById(e){this.getPageById(e).resetPage()}initialize(e,t=(e,t)=>new ss(e,t,e=>this._resetPageById(e))){this.events.call("beforeInitialize",{wizard:this,state:e}),this.stateManager=new xr(e,this.pageFactory),this.iterator=t(this.pageFactory,this.stateManager),this.sections=[],Object.keys(this.pageFactory.metadata).forEach(e=>{this.sections.push(new os(e,this.pageFactory.metadata[e]))}),this.sections=this.sections.sort((e,t)=>e.metadata.position-t.metadata.position),this.events.call("afterInitialize",{wizard:this})}_canNext(e){var t=!this.isLoading()&&e&&e.page&&this.pageFactory.getMetadata(e.pageId);return t&&t.canNext(e.page)}_canFinish(e){return!this.isLoading()&&e&&this.pageFactory.getMetadata(e.pageId).canFinish(e.page)}_initPage(e,t=!1,a=!1){if(this._createNextAction(e.page),e.onChange)return e.onChange(()=>{this._changeTimeout&&clearTimeout(this._changeTimeout),this._changeTimeout=setTimeout(()=>{this._nextAction(e)},100)}),e.initialize(this.stateManager.getPageState(e.pageId),t,a).always(()=>this._loadingState(!1));throw Error("Page with id "+e.pageId+" cannot be used in AutoNavigation, because it does not have method OnChange")}getPageById(t){return this.sections.filter(e=>e.pageId===t)[0]}start(){this.events.call("beforeStart",{wizard:this}),this._loadingState(!0);var t=this.iterator.getStartPage();this.events.call("beforePageInitialize",Pi(t,this)),this._initPage(t).done(()=>{var e=this.getPageById(t.pageId);if(!e)throw Error("Page Section with id "+t.pageId+" is not found.");e.setPage(t),this.events.call("afterPageInitialize",Ni(t,this)),this._nextAction(t)})}finishAction(){for(var e=T.Deferred(),t=!1,a=this.sections.length-1;0<=a;a--)if(this.sections[a].page()){this.sections[a].page().commit().done(e=>{this.sections[a].page().isChanged&&(this.events.call("beforeFinish",{wizardModel:this,state:this.stateManager.getCurrentState()}),this.stateManager.setPageState(this.sections[a].page().pageId,e),this.events.call("afterFinish",{wizardResult:this,state:this.stateManager.getCurrentState()}))}).always(()=>e.resolve()),t=!0;break}return t||e.resolve(),e.promise()}_nextAction(a,i=!1){if(!this._canNext(a)&&!this._canFinish(a))return a.resetCommitedState(),this.iterator.resetNextPages(a.pageId);this._loadingState(!0),a.commit().done(e=>{a.isChanged||i||a.page&&a.page.changeAlways?(this.stateManager.setPageState(a.pageId,e),this.iterator.getNextPage(a.pageId).done(e=>{e&&0<e.length?e.forEach(e=>{var t=this.getPageById(e.pageId),e=t&&t.page()||e;this.events.call("beforePageInitialize",Pi(e,this)),this._initPage(e,!!t.page(),a.isChanged||i).done(()=>{this.getPageById(e.pageId).setPage(e),this.events.call("afterPageInitialize",Ni(e,this)),this._nextAction(e,a.isChanged)})}):this._loadingState(!1),a.isChanged=!1}).fail(()=>this._loadingState(!1))):this._loadingState(!1)}).fail(()=>this._loadingState(!1))}}ns.__loadingStateFunctionName="__loadingState";class ds extends I{constructor(){super(),this._sectionsToUnregister=[],this._sectionsToRegister=[],this._sectionPositions=[],this._initInProgress=_.observable(!1),this._defaultMargin=24,this._parentMarginOffset=this._defaultMargin+this._defaultMargin/2,this._className="",this._pageCss={},this.events=new C.EventManager,this._factory=new is,this._sectionsProcessor=new ns(this._factory,e=>{this[ja]&&this[ja](e)},()=>this[za]&&this[za]()),this._sectionsProcessor.events.addHandler("beforeStart",()=>{this._sections=this._sectionsProcessor.sections,this._beforeStart(),this._patchOnChange()}),this._sectionsProcessor.events.addHandler("beforePageInitialize",e=>{this.events.call("beforeSectionInitialize",{section:e.page,sectionId:e.pageId,page:this,state:e.state})}),this._sectionsProcessor.events.addHandler("afterPageInitialize",e=>{this.events.call("afterSectionInitialize",{section:e.page,sectionId:e.pageId,page:this})})}dispose(){this._sectionsProcessor.dispose(),this._factory.reset(),this._sections=[]}_patchOnChange(){Object.keys(this._factory.metadata).forEach(e=>{this._factory.metadata[e].onChange=()=>this._onChange()})}_getPageStyle(e,t=!0){return vi(e,this._defaultMargin,t)}_applyCustomizations(){this._sectionsToUnregister.forEach(e=>e()),this._sectionsToUnregister=[],this._sectionPositions.forEach(e=>e()),this._sectionPositions=[],this._sectionsToRegister.forEach(e=>e()),this._sectionsToRegister=[]}_setSectionPosition(e,t){this._pageCss[e]=_.observable(this._getPageStyle(t))}registerSections(){}canNext(){return this._sectionsProcessor.sections.every(this._sectionCondition)}_sectionCondition(e){return e.metadata.required?e.page()&&e.metadata.canNext(e.page().page):!e.page()||e.metadata.canNext(e.page().page)}canFinish(){for(var e=this._sections.length-1;0<=e;e--)if(this._sections[e].page()&&this._sections[e].metadata.canFinish(this._sections[e].page().page))return!0;return!1}setSectionPosition(e,t){this._sectionPositions.push(()=>{this._setSectionPosition(e,t)})}registerSection(e,t){this._sectionsToRegister.push(()=>{this._factory.registerMetadata(e,t)})}unregisterSection(e){this._sectionsToUnregister.push(()=>this._factory.unregisterMetadata(e))}_loadPanelViewModel(e){return!1}getNextSectionId(e){}initialize(e,t){return this.registerSections(),this._applyCustomizations(),this._sectionsProcessor.initialize(Object(v.extend)(!0,{},e)),this._stateManager=this._sectionsProcessor.stateManager,this._sectionsProcessor.iterator.getNextPageId=e=>this.getNextSectionId(e),this._sectionsProcessor.start(),T.Deferred().resolve().promise()}_beforeStart(){}commit(){var e=T.Deferred();return this._sectionsProcessor.finishAction().done(()=>{e.resolve(Object(v.extend)(!0,{},this._stateManager.getCurrentState()))}),e.promise()}_getPageDescription(e,t){return e+1+". "+t.metadata.description}_showPageDescription(){return 1<this._sections.length}}class ls extends ds{constructor(e,t){super(),this.wizardOptions=e,this.dataSources=t,this.disabledSectionText=Object(v.getLocalization)('To specify a data source, select "No, I\'d like to create a new data source".',"AnalyticsCoreStringId.Wizard_SelectDataSourceType_Placeholder")}registerSections(){this.showPredefinedDataSourceSection()&&(Ii(this._factory,this.wizardOptions),this._setSectionPosition(S.ChoosePredefinedDataSourcePage)),this.showChooseDataSourceTypeSection()&&(Ma(this._factory,this.wizardOptions),this._setSectionPosition(S.ChooseDataSourceTypePage),this._factory.getMetadata(S.ChooseDataSourceTypePage).disabledText=this.disabledSectionText),this.showPredefinedDataSourceSection()&&this.showChooseDataSourceTypeSection()&&(this._setSectionPosition(S.ChoosePredefinedDataSourcePage,E.Top),this._setSectionPosition(S.ChooseDataSourceTypePage,E.Bottom))}showPredefinedDataSourceSection(){return 0<this.dataSources.length}showChooseDataSourceTypeSection(){return this.wizardOptions.canCreateDataSource&&Oi(this.wizardOptions)}getNextSectionId(e){return!e&&this.showPredefinedDataSourceSection()?S.ChoosePredefinedDataSourcePage:!e&&this.showChooseDataSourceTypeSection()||e===S.ChoosePredefinedDataSourcePage&&!this._stateManager.getCurrentState().predeifnedDataSourceName&&this.showChooseDataSourceTypeSection()?S.ChooseDataSourceTypePage:void 0}}function cs(e,t){e.registerMetadata(w.SelectDataSourcePage,{setState:(e,t)=>{t.dataSourceType=e.dataSourceType,t.predeifnedDataSourceName=e.predeifnedDataSourceName},getState:e=>e,resetState:(e,t)=>{e.dataSource=t.dataSource,e.predeifnedDataSourceName=null},create:()=>new ls(t,t.predefinedDataSources()),navigationPanelText:Object(v.getLocalization)("Select Data Source","ASPxReportsStringId.ReportDesigner_Wizard_SelectDataSource"),template:"dx-wizard-fullscreen-page"})}class us extends ds{constructor(e){super(),this._dataSourceWizardOptions=e}registerSections(){0<this._dataSourceWizardOptions.connectionStrings.json().length&&(Qi(this._factory,this._dataSourceWizardOptions.connectionStrings.json,this._dataSourceWizardOptions.allowCreateNewJsonConnection,this._dataSourceWizardOptions.callbacks.getItemsProviderCallback,this._dataSourceWizardOptions.getJsonConnectionStrings),this._setSectionPosition(D.SpecifyJsonConnectionPage,this._dataSourceWizardOptions.rtl?E.Right:E.Left)),this._dataSourceWizardOptions.allowCreateNewJsonConnection&&0===this._dataSourceWizardOptions.connectionStrings.json().length&&(qi(this._factory,this._dataSourceWizardOptions.requestWrapper,this._dataSourceWizardOptions.callbacks.getItemsProviderCallback),this._setSectionPosition(D.ChooseJsonSourcePage,this._dataSourceWizardOptions.rtl?E.Right:E.Left),this._factory.getMetadata(D.ChooseJsonSourcePage).disabledText=Object(C.getLocalization)('To create a data connection, select "No, I\'d like to create a new data connection".',"AnalyticsCoreStringId.JsonDSWizard_CreateNewConnectionPage_Placeholder")),ar(this._factory,this._dataSourceWizardOptions.requestWrapper,this._dataSourceWizardOptions.callbacks),this._setSectionPosition(D.ChooseJsonSchemaPage,this._dataSourceWizardOptions.rtl?E.Left:E.Right),this._factory.getMetadata(D.ChooseJsonSchemaPage).disabledText=Object(C.getLocalization)("To select data fields, choose or create a data connection.","AnalyticsCoreStringId.JsonDSWizard_ChooseJsonSchemaPage_Placeholder")}getNextSectionId(e){return!e&&0<this._dataSourceWizardOptions.connectionStrings.json().length?D.SpecifyJsonConnectionPage:e?this._dataSourceWizardOptions.allowCreateNewJsonConnection?e===D.SpecifyJsonConnectionPage||e===D.ChooseJsonSourcePage?D.ChooseJsonSchemaPage:void 0:e===D.SpecifyJsonConnectionPage?D.ChooseJsonSchemaPage:void 0:D.ChooseJsonSourcePage}canNext(){var e=this._sectionsProcessor.getPageById(D.ChooseJsonSchemaPage);return e&&e.page()&&e.metadata.canNext(e.page().page)}}function ps(e,t){e.registerMetadata(w.SpecifyJsonDataSourceSettingsPage,{setState:(e,t)=>{t.jsonDataSourceWizard.connectionName=e.jsonDataSourceWizard.connectionName,t.jsonDataSourceWizard.newConnectionName=e.jsonDataSourceWizard.newConnectionName,t.jsonDataSourceWizard.jsonSource=e.jsonDataSourceWizard.jsonSource,t.jsonDataSourceWizard.dataSourceName=e.jsonDataSourceWizard.dataSourceName,t.jsonDataSourceWizard.jsonScheme=e.jsonDataSourceWizard.jsonScheme,t.jsonDataSourceWizard.rootElement=e.jsonDataSourceWizard.rootElement},getState:e=>e,resetState:(e,t)=>{e.jsonDataSourceWizard.connectionName=t.jsonDataSourceWizard.connectionName,e.jsonDataSourceWizard.jsonSource=t.jsonDataSourceWizard.jsonSource,e.jsonDataSourceWizard.dataSourceName=t.jsonDataSourceWizard.dataSourceName,e.jsonDataSourceWizard.newConnectionName=t.jsonDataSourceWizard.newConnectionName,e.jsonDataSourceWizard.jsonScheme=t.jsonDataSourceWizard.jsonScheme,e.jsonDataSourceWizard.rootElement=t.jsonDataSourceWizard.rootElement},create:()=>new us(t),navigationPanelText:Object(C.getLocalization)("Specify Data Source Settings","AnalyticsCoreStringId.Wizard_SpecifyDataSourceSettingsPage"),template:"dx-wizard-fullscreen-page"})}class hs extends ds{constructor(e){super(),this._dataSourceWizardOptions=e}getNextSectionId(e){var t;return e?e===D.ChooseSqlConnectionPage&&this._stateManager.getCurrentState().sqlDataSourceWizard.name?D.ConfigureQueryPage:e===D.ConfigureQueryPage?(e=[],0<((t=this._stateManager.getCurrentState().sqlDataSourceWizard).customQueries||[]).length&&e.push(D.ConfigureQueryParametersPage),1<Qa(t).sqlDataSource.queries().length&&e.push(D.ConfigureMasterDetailRelationshipsPage),e):void 0:D.ChooseSqlConnectionPage}registerSections(){ei(this._factory,this._dataSourceWizardOptions.connectionStrings.sql,this._dataSourceWizardOptions.getSqlConnectionStrings),Nr(this._factory,this._dataSourceWizardOptions),Qr(this._factory,rr(this._dataSourceWizardOptions.callbacks.sqlDataSourceResultSchema)),$r(this._factory,this._dataSourceWizardOptions.requestWrapper);var e=this._factory.getMetadata(D.ChooseSqlConnectionPage);e.description=Object(C.getLocalization)("Choose a data connection.","AnalyticsCoreStringId.SqlDSWizard_PageChooseConnection"),(e=this._factory.getMetadata(D.ConfigureQueryPage)).recreate=!0,e.description=Object(C.getLocalization)("Choose predefined queries and/or create custom queries.","AnalyticsCoreStringId.Wizard_Queries_Description"),e.required=!0,(e=this._factory.getMetadata(D.ConfigureMasterDetailRelationshipsPage)).description=Object(C.getLocalization)("Configure master-detail relationships.","AnalyticsCoreStringId.SqlDSWizard_PageConfigureMasterDetailRelations"),e.disabledText=Object(C.getLocalization)("To create a master-detail relationship, select two or more queries.","AnalyticsCoreStringId.Wizard_MasterDetailRelationship_Placeholder"),(e=this._factory.getMetadata(D.ConfigureQueryParametersPage)).description=Object(C.getLocalization)("Configure query parameters.","AnalyticsCoreStringId.SqlDSWizard_PageConfigureParameters"),e.disabledText=Object(C.getLocalization)("To specify query parameters, select a parameterized stored procedure or create a custom query.","AnalyticsCoreStringId.Wizard_ConfigureQueryParameters_Placeholder"),this._setSectionPosition(D.ChooseSqlConnectionPage,this._dataSourceWizardOptions.rtl?E.TopRight:E.TopLeft),this._setSectionPosition(D.ConfigureQueryPage,this._dataSourceWizardOptions.rtl?E.TopLeft:E.TopRight),this._setSectionPosition(D.ConfigureQueryParametersPage,this._dataSourceWizardOptions.rtl?E.BottomLeft:E.BottomRight),this._setSectionPosition(D.ConfigureMasterDetailRelationshipsPage,this._dataSourceWizardOptions.rtl?E.BottomRight:E.BottomLeft)}}function ms(e,t){e.registerMetadata(w.SpecifySqlDataSourceSettingsPage,{setState:(e,t)=>{t.sqlDataSourceWizard.customQueries=e.sqlDataSourceWizard.customQueries,t.sqlDataSourceWizard.name=e.sqlDataSourceWizard.name,t.sqlDataSourceWizard.queryName=e.sqlDataSourceWizard.name,t.sqlDataSourceWizard.sqlDataSourceJSON=e.sqlDataSourceWizard.sqlDataSourceJSON,t.sqlDataSourceWizard.relations=e.sqlDataSourceWizard.relations},getState:e=>e,resetState:(e,t)=>{e.sqlDataSourceWizard=Object(v.extend)(!0,{},t)},create:()=>new hs(t),navigationPanelText:Object(C.getLocalization)("Specify Data Source Settings","AnalyticsCoreStringId.Wizard_SpecifyDataSourceSettingsPage"),template:"dx-wizard-fullscreen-page"})}class gs extends ds{constructor(e){super(),this._dataSourceWizardOptions=e}getNextSectionId(e){return e?e===D.ConfigureFederatedQueriesPage&&1<Fa(this._stateManager.getCurrentState().federationDataSourceWizard,this._dataSourceWizardOptions.dataSources).queries().length?D.ConfigureFederatedMasterDetailRelationshipsPage:void 0:D.ConfigureFederatedQueriesPage}_showPageDescription(){return!0}registerSections(){Ro(this._factory,this._dataSourceWizardOptions),qo(this._factory,or(this._dataSourceWizardOptions.callbacks.federationDataSourceResultSchema),this._dataSourceWizardOptions);var e=this._factory.getMetadata(D.ConfigureFederatedQueriesPage);e.description=Object(C.getLocalization)("Create a federated query.","DataAccessUIStringId.WizardPageConfigureFederatedQueryPage"),(e=this._factory.getMetadata(D.ConfigureFederatedMasterDetailRelationshipsPage)).description=Object(C.getLocalization)("Configure master-detail relationships.","AnalyticsCoreStringId.SqlDSWizard_PageConfigureMasterDetailRelations"),e.disabledText=Object(C.getLocalization)("To create a master-detail relationship, select two or more queries.","AnalyticsCoreStringId.Wizard_MasterDetailRelationship_Placeholder"),this._setSectionPosition(D.ConfigureFederatedQueriesPage,E.Top),this._setSectionPosition(D.ConfigureFederatedMasterDetailRelationshipsPage,E.Bottom)}}function bs(e,t){e.registerMetadata(w.SpecifyFederationDataSourceSettingsPage,{setState:(e,t)=>{t.federationDataSourceWizard.federationDataSourceJSON=e.federationDataSourceWizard.federationDataSourceJSON,t.federationDataSourceWizard.federatedQueries=e.federationDataSourceWizard.federatedQueries,t.federationDataSourceWizard.relations=e.federationDataSourceWizard.relations,t.federationDataSourceWizard.name=e.federationDataSourceWizard.name},getState:e=>e,resetState:(e,t)=>{e.federationDataSourceWizard=Object(v.extend)(!0,{},t)},create:()=>new gs(t),navigationPanelText:Object(C.getLocalization)("Specify Data Source Settings","AnalyticsCoreStringId.Wizard_SpecifyDataSourceSettingsPage"),template:"dx-wizard-fullscreen-page"})}class fs extends C.Disposable{constructor(r){super(),this._steps=[],this._disposables.push(r._currentPage.subscribe(t=>{var e=this._steps.filter(e=>e.pageIds.some(e=>e===t.pageId))[0];e&&(e.currentPageId=t.pageId,e.disabled(!1),this._setStepVisible(e.stepIndex))})),Object.keys(r.pageFactory.metadata).forEach(e=>{var t,a=r.pageFactory.metadata[e],i=this._steps.filter(e=>e.text===a.navigationPanelText)[0];i?i.pageIds.push(e):(t={text:a.navigationPanelText,pageIds:[e],currentPageId:null,stepIndex:this._steps.length,disabled:_.observable(!0),visible:_.observable(!0)},this._disposables.push(t.isActive=_.computed(()=>r._currentPage()&&t.currentPageId===r._currentPage().pageId)),t.clickAction=()=>{t.isActive()||r.goToPage(t.currentPageId)},this._steps.push(t))}),this._disposables.push(this.isVisible=_.computed(()=>1<this._steps.filter(e=>e.visible()).length))}resetAll(){this._steps.forEach(e=>{e.disabled(!0)})}_currentStep(t){return this._steps.filter(e=>e.currentPageId===t)[0]}_reset(e){e=this._currentStep(e);e&&e.disabled(!0)}_resetNextPages(e){e=this._currentStep(e);if(e)for(var t=e.stepIndex+1;t<this._steps.length;t++)this._steps[t].disabled(!0)}_setStepVisible(a){var e=this._steps.filter((e,t)=>t<a);0<e.length&&!e.some(e=>!e.disabled())&&e.forEach(e=>e.visible(!1))}}class ys extends Cr{constructor(e,t){super(e,t),this._extendCssClass="dx-wizard-fullscreen",this.navigationPanel=_.observable(null),this.isVisible.subscribe(e=>{e||(this.navigationPanel()&&this.navigationPanel().resetAll(),this.navigationPanel()&&this.navigationPanel().dispose(),this._onCloseCallback&&this._onCloseCallback())})}_onClose(e){this._onCloseCallback=e}onFinish(){super.onFinish(),this.navigationPanel().dispose()}_initPage(e){return e.onChange&&e.onChange(()=>this.navigationPanel()._resetNextPages(e.pageId)),super._initPage(e)}_onResetPage(e){this.navigationPanel()._reset(e.pageId)}start(e){e&&(this._finishCallback=e),this.navigationPanel()&&this.navigationPanel().resetAll(),this.navigationPanel()&&this.navigationPanel().dispose(),this.navigationPanel(new fs(this)),super.start()}_pageDescription(){var e=this.navigationPanel()._steps.filter(e=>e.isActive())[0];return e?e.text:this.pageFactory.getMetadata(this._currentPage().pageId).description}_description(){return""}}class Ss extends ys{constructor(e,t){super(e,t.callbacks.finishCallback),this._dataSourceWizardOptions=t}initialize(e,t=(e,t)=>new xs(e,t,this._dataSourceWizardOptions,e=>this._onResetPage(e))){this._dataSourceWizardOptions.sqlDataSourceAvailable||!Object(v.isEmptyObject)(e.sqlDataSourceWizard)?e.dataSourceType=y.Sql:this._dataSourceWizardOptions.jsonDataSourceAvailable||e.jsonDataSourceWizard.jsonSource?e.dataSourceType=y.Json:!this._dataSourceWizardOptions.objectDataSourceAvailable&&Object(v.isEmptyObject)(e.objectDataSourceWizard)||(e.dataSourceType=y.Object),super.initialize(e,t)}canRunWizard(){return this._dataSourceWizardOptions.canCreateDataSource}_description(){return Object(C.getLocalization)("Data Source Wizard","AnalyticsCoreStringId.DSWizard_Title")}}class xs extends vr{constructor(e,t,a,i){super(e,t,i),this._dataSourceOptions=a}_shouldSelectDataSource(){return Oi(this._dataSourceOptions)||0<this._dataSourceOptions.predefinedDataSources().length}getNextPageId(e){return!e&&this._shouldSelectDataSource()?w.SelectDataSourcePage:!e&&this._dataSourceOptions.sqlDataSourceAvailable?w.SpecifySqlDataSourceSettingsPage:!e&&this._dataSourceOptions.jsonDataSourceAvailable?w.SpecifyJsonDataSourceSettingsPage:!e&&this._dataSourceOptions.objectDataSourceAvailable?w.SpecifyObjectDataSourceSettingsPage:e===w.SelectDataSourcePage&&this._getCurrentState().dataSourceType===y.Json?w.SpecifyJsonDataSourceSettingsPage:e===w.SelectDataSourcePage&&this._getCurrentState().dataSourceType===y.Sql?w.SpecifySqlDataSourceSettingsPage:e===w.SelectDataSourcePage&&this._getCurrentState().dataSourceType===y.Object?w.SpecifyObjectDataSourceSettingsPage:e===w.SelectDataSourcePage&&this._getCurrentState().dataSourceType===y.Federation?w.SpecifyFederationDataSourceSettingsPage:void 0}}function vs(e){var t=new as,a=new Ss(t,e);return cs(t,e),ms(t,e),bs(t,e),ps(t,e),Xo(t,e),a}class _s{constructor(e,t){this.handler=e,this.isVisible=_.observable(!0),this.isDisabled=_.observable(!1),this.text=t}}class Cs extends x.Editor{constructor(e,t,a,i){super(e,t,a,i)}generateValue(t){return this.undoValue||this._disposables.push(this.undoValue=_.computed({read:()=>this.value(),write:e=>{t().start(),this.value(e),t().end()}})),this.undoValue}}class Ts extends P.PopupEditorBase{constructor(e,t,a=!1){super(),this._dataSource=e,this._callBack=t,this.rtl=a,this.className="dxrd-federated-manageQueries-editor",this._disposables.push(this._queriesPopupHelper=new ko(this._dataSource,this._dataSource.queries,{},a)),this._createAddQueryButton(),this.queriesStoreData=_.pureComputed(()=>this._dataSource&&this._dataSource.queries().map(e=>({name:e.alias(),id:e.alias(),type:c[e.queryType()]}))),this._disposables.push(this.queriesStoreData),this.queriesGrid={rtlEnabled:a,dataSource:this.queriesStoreData,showColumnLines:!1,hoverStateEnabled:!0,scrolling:{mode:"infinite"},height:"100%",editing:{mode:"cell",allowUpdating:!0},onRowUpdating:e=>{e.oldData.alias=e.newData.name},columns:[{dataField:"name",get caption(){return Object(v.getLocalization)("Name","AnalyticsCoreStringId.CollectionEditor_Name_Placeholder")}},{type:"buttons",width:100,buttons:[{icon:"edit",onClick:e=>{this._queriesPopupHelper.editQuery(e.row.data.type,e.row.data.id)},cssClass:"dxrd-manage-queries-actions dxd-icon-highlighted dxrd-image-operations-edit-query",template:Object(x.getTemplate)("dxrd-svg-operations-edit")},{icon:"delete",onClick:e=>{this._dataSource.removeQuery(e.row.data.id)},cssClass:"dxrd-manage-queries-actions dxd-icon-highlighted dxrd-image-recycle-bin",template:Object(x.getTemplate)("dxrd-svg-operations-recycle_bin")}]}]}}_createAddQueryButton(){var e=new $o("queries",Object(v.getLocalization)("Federated Queries","DataAccessUIStringId.FederatedQueryCollectionList_Title"),"list",!1,_.observable({showQbCallBacks:this._queriesPopupHelper.callBacks})).popoverListItems(),e={text:Object(v.getLocalization)("Add query","AnalyticsCoreStringId.SqlDSWizard_AddQuery"),items:e.map(e=>({text:e.name,onClick:e.addAction})),dropDownOptions:{width:150,container:".dx-designer-viewport"},useItemTextAsTitle:!1};this.buttonItems.push({toolbar:"bottom",location:"before",template:function(){return Object(x.getTemplate)("dxrd-managequeries-selectbox")},options:e})}save(){this.queriesStoreData().forEach(t=>{var e=Object(v.findFirstItemMatchesCondition)(this._dataSource.queries(),e=>e.alias()===t.id);e.sources().forEach(e=>this._dataSource.addSource(e)),e&&t.id!==t.name&&e.alias(t.name)}),this._callBack(),super.save(),this.dispose()}canSave(){return!!this.queriesStoreData().length}close(){super.close(),this.dispose()}dispose(){super.dispose(),this.queriesGrid=null,this._dataSource=null,this._callBack=null}title(){return Object(v.getLocalization)("Manage Queries","DataAccessUIStringId.FederatedQueryCollectionEditorForm_Title")}}class Ps extends C.Disposable{constructor(e,t,a=e=>!0,i){super(),this.editableObj=t,this.getDisplayName=i,this._collapsed=e,this._disposables.push(this.visible=_.pureComputed(()=>!this.disabled()&&!this._collapsed())),this._disposables.push(this.disabled=_.pureComputed(()=>{var e=!t()||!a(t());return e&&!this._collapsed()&&this._collapsed(!0),e}))}dispose(){super.dispose(),this._collapsed=null}toogle(){this._collapsed(!this._collapsed())}get title(){return this.getDisplayName(this.editableObj())}}b.registerEditors({bool:{header:"dx-boolean-select",custom:"dxqb-property-editor"},combobox:{header:"dx-combobox",custom:"dxqb-property-editor"},comboboxUndo:{header:"dx-combobox-undo",custom:"dxqb-property-editor",editorType:Cs},text:{header:"dx-text",custom:"dxqb-property-editor"},filterEditor:{header:"dxrd-filterstring",custom:"dxqb-property-editor"},filterGroupEditor:{header:"dxrd-filterstringgroup",custom:"dxqb-property-editor"},numeric:{header:"dx-numeric",custom:"dxqb-property-editor"}}),Object(P.addToBindingsCache)("attr: { x1: startPoint().relativeX, y1: startPoint().relativeY, x2: endPoint().relativeX, y2: endPoint().relativeY }",function(e,t){return{attr:function(){return{x1:e.$data.startPoint().relativeX,y1:e.$data.startPoint().relativeY,x2:e.$data.endPoint().relativeX,y2:e.$data.endPoint().relativeY}}}}),Object(P.addToBindingsCache)("styleunit: position, trackCursor: underCursor, style: { 'marginLeft': -3 * _context.zoom() + 'px', 'marginTop': -3 * _context.zoom() + 'px' }, draggable: $root.connectingPointDragHandler",function(e,t){return{styleunit:function(){return e.$data.position},trackCursor:function(){return e.$data.underCursor},style:function(){return{marginLeft:-3*e.$data._context.zoom()+"px",marginTop:-3*e.$data._context.zoom()+"px"}},draggable:function(){return e.$root.connectingPointDragHandler}}}),Object(P.addToBindingsCache)("draggable: $root.connectionPointDragHandler, styleunit: { top: relativeY, left: relativeX }",function(e,t){return{draggable:function(){return e.$root.connectionPointDragHandler},styleunit:function(){return{top:e.$data.relativeY,left:e.$data.relativeX}}}}),Object(P.addToBindingsCache)("styleunit: position, trackCursor: underCursor",function(e,t){return{styleunit:function(){return e.$data.position},trackCursor:function(){return e.$data.underCursor}}}),Object(P.addToBindingsCache)("styleunit: position, dxclick: function() {}, draggable: $root.dragHandler",function(e,t){return{styleunit:function(){return e.$data.position},dxclick:function(){return function(){}},draggable:function(){return e.$root.dragHandler}}}),Object(P.addToBindingsCache)("template: { name: 'dxdd-connection-line' }",function(e,t){return{template:function(){return{name:"dxdd-connection-line"}}}}),Object(P.addToBindingsCache)("with: startPoint",function(e,t){return{with:function(){return e.$data.startPoint}}}),Object(P.addToBindingsCache)("template: { name: 'dxdd-connection-point-selection' }",function(e,t){return{template:function(){return{name:"dxdd-connection-point-selection"}}}}),Object(P.addToBindingsCache)("with: endPoint",function(e,t){return{with:function(){return e.$data.endPoint}}}),Object(P.addToBindingsCache)("attr: { id: 'dxqb-arrow_end' + connectorID() }",function(e,t){return{attr:function(){return{id:"dxqb-arrow_end"+e.$data.connectorID()}}}}),Object(P.addToBindingsCache)("attr: { id: 'dxqb-arrow_start' + connectorID() }",function(e,t){return{attr:function(){return{id:"dxqb-arrow_start"+e.$data.connectorID()}}}}),Object(P.addToBindingsCache)("attr: { points: routePointsSet, 'marker-end': showArrow() ? 'url(#dxqb-arrow_end' + connectorID() + ')' : '', 'marker-start': showRightArrow() ? 'url(#dxqb-arrow_start' + connectorID() + ')' : '' }, updateConnectorArrow: $data",function(e,t){return{attr:function(){return{points:e.$data.routePointsSet,"marker-end":e.$data.showArrow()?"url(#dxqb-arrow_end"+e.$data.connectorID()+")":"","marker-start":e.$data.showRightArrow()?"url(#dxqb-arrow_start"+e.$data.connectorID()+")":""}},updateConnectorArrow:function(){return e.$data}}}),Object(P.addToBindingsCache)("if: showArrow",function(e,t){return{if:function(){return e.$data.showArrow}}}),Object(P.addToBindingsCache)("if: showRightArrow",function(e,t){return{if:function(){return e.$data.showRightArrow}}}),Object(P.addToBindingsCache)("styleunit: position, visible: isVisible",function(e,t){return{styleunit:function(){return e.$data.position},visible:function(){return e.$data.isVisible}}}),Object(P.addToBindingsCache)("styleunit: position",function(e,t){return{styleunit:function(){return e.$data.position}}}),Object(P.addToBindingsCache)("trackCursor: underCursor, click: $root.selectItemProperties",function(e,t){return{trackCursor:function(){return e.$data.underCursor},click:function(){return e.$root.selectItemProperties}}}),Object(P.addToBindingsCache)("styleunit: position, dxclick: function() {}, visible: isVisible",function(e,t){return{styleunit:function(){return e.$data.position},dxclick:function(){return function(){}},visible:function(){return e.$data.isVisible}}}),Object(P.addToBindingsCache)("styleunit: position, style: { cursor: isVerticalLine ? 'ew-resize' : 'ns-resize' }, routeLineDraggable: { starting: $root.resizeHandler.starting, stopped: function() { resizeStopped(); $root.resizeHandler.stopped(); }, forceResize: resizeHandler }",function(e,t){return{styleunit:function(){return e.$data.position},style:function(){return{cursor:e.$data.isVerticalLine?"ew-resize":"ns-resize"}},routeLineDraggable:function(){return{starting:e.$root.resizeHandler.starting,stopped:function(){e.$data.resizeStopped(),e.$root.resizeHandler.stopped()},forceResize:e.$data.resizeHandler}}}}),Object(P.addToBindingsCache)("template: { name: 'dxdd-routed-connection-line' }",function(e,t){return{template:function(){return{name:"dxdd-routed-connection-line"}}}}),Object(P.addToBindingsCache)("foreach: routeLineWrappers",function(e,t){return{foreach:function(){return e.$data.routeLineWrappers}}}),Object(P.addToBindingsCache)("with: $parent",function(e,t){return{with:function(){return e.$parent}}}),Object(P.addToBindingsCache)("ifnot: isLocked",function(e,t){return{ifnot:function(){return e.$data.isLocked}}}),Object(P.addToBindingsCache)("if: isLocked",function(e,t){return{if:function(){return e.$data.isLocked}}}),Object(P.addToBindingsCache)("styleunit: { lineHeight: positionLineHeightWithoutMargins }, style: css",function(e,t){return{styleunit:function(){return{lineHeight:e.$data.positionLineHeightWithoutMargins}},style:function(){return e.$data.css}}}),Object(P.addToBindingsCache)("template: contenttemplate, styleunit: { 'height': positionLineHeightWithoutMargins, 'width': positionWidthWithoutMargins }",function(e,t){return{template:function(){return e.$data.contenttemplate},styleunit:function(){return{height:e.$data.positionLineHeightWithoutMargins,width:e.$data.positionWidthWithoutMargins}}}}),Object(P.addToBindingsCache)("event: { dblclick: $root.inlineTextEdit.show }, css: {'dxrd-selected': selected, 'dxrd-focused': focused }, resizable: $root.resizeHandler, draggable: $root.dragHandler, styleunit: position, trackCursor: underCursor",function(e,t){return{event:function(){return{dblclick:e.$root.inlineTextEdit.show}},css:function(){return{"dxrd-selected":e.$data.selected,"dxrd-focused":e.$data.focused}},resizable:function(){return e.$root.resizeHandler},draggable:function(){return e.$root.dragHandler},styleunit:function(){return e.$data.position},trackCursor:function(){return e.$data.underCursor}}}),Object(P.addToBindingsCache)("template: contenttemplate, styleunit: { 'height': positionLineHeightWithoutMargins, 'width': positionWidthWithoutMargins}",function(e,t){return{template:function(){return e.$data.contenttemplate},styleunit:function(){return{height:e.$data.positionLineHeightWithoutMargins,width:e.$data.positionWidthWithoutMargins}}}}),Object(P.addToBindingsCache)("dxTextArea: { value: text, onKeyUp: keypressAction, valueChangeEvent: 'keyup' }",function(e,t){return{dxTextArea:function(){return{value:e.$data.text,onKeyUp:e.$data.keypressAction,valueChangeEvent:"keyup"}}}}),Object(P.addToBindingsCache)("text: getControlModel().text",function(e,t){return{text:function(){return e.$data.getControlModel().text}}}),Object(P.addToBindingsCache)("if: !$root.inlineTextEdit.visible()",function(e,t){return{if:function(){return!e.$root.inlineTextEdit.visible()}}}),Object(P.addToBindingsCache)("if: $root.inlineTextEdit.visible",function(e,t){return{if:function(){return e.$root.inlineTextEdit.visible}}}),Object(P.addToBindingsCache)("with: $root.inlineTextEdit",function(e,t){return{with:function(){return e.$root.inlineTextEdit}}}),Object(P.addToBindingsCache)("if: getControlModel().type() === 'Ellipse'",function(e,t){return{if:function(){return"Ellipse"===e.$data.getControlModel().type()}}}),Object(P.addToBindingsCache)("if: getControlModel().type() === 'Condition'",function(e,t){return{if:function(){return"Condition"===e.$data.getControlModel().type()}}}),Object(P.addToBindingsCache)("if: !getControlModel().type()",function(e,t){return{if:function(){return!e.$data.getControlModel().type()}}}),Object(P.addToBindingsCache)("foreach: connectingPoints",function(e,t){return{foreach:function(){return e.$data.connectingPoints}}}),Object(P.addToBindingsCache)("template: 'dxdd-connecting-point'",function(e,t){return{template:function(){return"dxdd-connecting-point"}}}),Object(P.addToBindingsCache)("styleunit: { 'width': Math.min(pageWidth(), $root.surfaceSize()) }, click: function(_, e) { $root.selection.clickHandler(null, e); e.stopPropagation(); }, keyDownActions: $root.actionLists",function(a,e){return{styleunit:function(){return{width:Math.min(a.$data.pageWidth(),a.$root.surfaceSize())}},click:function(){return function(e,t){a.$root.selection.clickHandler(null,t),t.stopPropagation()}},keyDownActions:function(){return a.$root.actionLists}}}),Object(P.addToBindingsCache)("styleunit: { minWidth: Math.min(pageWidth(), $root.surfaceSize()), maxWidth: pageWidth(), maxHeight: pageHeight() + 20 }",function(e,t){return{styleunit:function(){return{minWidth:Math.min(e.$data.pageWidth(),e.$root.surfaceSize()),maxWidth:e.$data.pageWidth(),maxHeight:e.$data.pageHeight()+20}}}}),Object(P.addToBindingsCache)("selectable: { selection: $root.selection, zoom: zoom }",function(e,t){return{selectable:function(){return{selection:e.$root.selection,zoom:e.$data.zoom}}}}),Object(P.addToBindingsCache)("styleunit: { 'width': pageWidth(), 'height': pageHeight() }, trackCursor: underCursor",function(e,t){return{styleunit:function(){return{width:e.$data.pageWidth(),height:e.$data.pageHeight()}},trackCursor:function(){return e.$data.underCursor}}}),Object(P.addToBindingsCache)("foreach: controls",function(e,t){return{foreach:function(){return e.$data.controls}}}),Object(P.addToBindingsCache)("template: { name: isSelected() ? selectiontemplate : template }",function(e,t){return{template:function(){return{name:e.$data.isSelected()?e.$data.selectiontemplate:e.$data.template}}}}),Object(P.addToBindingsCache)("attr: { x1: startPoint.x, y1: startPoint.y, x2: endPoint.x, y2: endPoint.y }",function(e,t){return{attr:function(){return{x1:e.$data.startPoint.x,y1:e.$data.startPoint.y,x2:e.$data.endPoint.x,y2:e.$data.endPoint.y}}}}),Object(P.addToBindingsCache)("styleunit: { 'width': $root.surfaceSize }, click: function(_, e) { $root.selection.clickHandler(null, e); e.stopPropagation(); }, keyDownActions: $root.actionLists",function(a,e){return{styleunit:function(){return{width:a.$root.surfaceSize}},click:function(){return function(e,t){a.$root.selection.clickHandler(null,t),t.stopPropagation()}},keyDownActions:function(){return a.$root.actionLists}}}),Object(P.addToBindingsCache)("dxScrollView: { direction: 'both', showScrollbar: 'onHover', scrollByContent: false, scrollByThumb: true, bounceEnabled: false, useNative: false, height: '100%' }",function(e,t){return{dxScrollView:function(){return{direction:"both",showScrollbar:"onHover",scrollByContent:!1,scrollByThumb:!0,bounceEnabled:!1,useNative:!1,height:"100%"}}}}),Object(P.addToBindingsCache)("styleunit: { 'minWidth': pageWidth, 'minHeight': pageHeight }, trackCursor: { recalculateBounds: true, underCursor: underCursor }",function(e,t){return{styleunit:function(){return{minWidth:e.$data.pageWidth,minHeight:e.$data.pageHeight}},trackCursor:function(){return{recalculateBounds:!0,underCursor:e.$data.underCursor}}}}),Object(P.addToBindingsCache)("trackCursor: { recalculateBounds: true, underCursor: underCursor }, style: { 'z-index' : $parent.dragDropStarted() ? 2 : null }",function(e,t){return{trackCursor:function(){return{recalculateBounds:!0,underCursor:e.$data.underCursor}},style:function(){return{"z-index":e.$parent.dragDropStarted()?2:null}}}}),Object(P.addToBindingsCache)("text: placeholder()",function(e,t){return{text:function(){return e.$data.placeholder()}}}),Object(P.addToBindingsCache)("styleunit: { top: position.top(), left: position.left() }",function(e,t){return{styleunit:function(){return{top:e.$data.position.top(),left:e.$data.position.left()}}}}),Object(P.addToBindingsCache)("attr: {x1 : $data.x, y1: $data.y, x2: $parent.routePoints()[$index()+1].x, y2: $parent.routePoints()[$index()+1].y }",function(e,t){return{attr:function(){return{x1:e.$data.x,y1:e.$data.y,x2:e.$parent.routePoints()[e.$index()+1].x,y2:e.$parent.routePoints()[e.$index()+1].y}}}}),Object(P.addToBindingsCache)("if: tables().length === 0",function(e,t){return{if:function(){return 0===e.$data.tables().length}}}),Object(P.addToBindingsCache)("foreach: relations",function(e,t){return{foreach:function(){return e.$data.relations}}}),Object(P.addToBindingsCache)("foreach: conditions",function(e,t){return{foreach:function(){return e.$data.conditions}}}),Object(P.addToBindingsCache)("if: !isSelected()",function(e,t){return{if:function(){return!e.$data.isSelected()}}}),Object(P.addToBindingsCache)("foreach: tables",function(e,t){return{foreach:function(){return e.$data.tables}}}),Object(P.addToBindingsCache)("if: isSelected()",function(e,t){return{if:function(){return e.$data.isSelected()}}}),Object(P.addToBindingsCache)("template: selectiontemplate",function(e,t){return{template:function(){return e.$data.selectiontemplate}}}),Object(P.addToBindingsCache)("with: $root.columnDragHandler.dragDropConnector",function(e,t){return{with:function(){return e.$root.columnDragHandler.dragDropConnector}}}),Object(P.addToBindingsCache)("foreach: routePoints",function(e,t){return{foreach:function(){return e.$data.routePoints}}}),Object(P.addToBindingsCache)("if: $index() < ($parent.routePoints().length - 1)",function(e,t){return{if:function(){return e.$index()<e.$parent.routePoints().length-1}}}),Object(P.addToBindingsCache)("trackCursor: { recalculateBounds: true, underCursor: underCursor }, draggable: $root.columnDragHandler, css: cssClasses($root.surface(), $root.columnDragHandler, $parent), click: $root.selectItemProperties",function(e,t){return{trackCursor:function(){return{recalculateBounds:!0,underCursor:e.$data.underCursor}},draggable:function(){return e.$root.columnDragHandler},css:function(){return e.$data.cssClasses(e.$root.surface(),e.$root.columnDragHandler,e.$parent)},click:function(){return e.$root.selectItemProperties}}}),Object(P.addToBindingsCache)("dxCheckBox: { value: selectedWrapper }, click: function(surface, e) { surface.toggleSelected(); e.stopPropagation(); return true; }",function(e,t){return{dxCheckBox:function(){return{value:e.$data.selectedWrapper}},click:function(){return function(e,t){return e.toggleSelected(),t.stopPropagation(),!0}}}}),Object(P.addToBindingsCache)("attr: { title: getControlModel().actualName }",function(e,t){return{attr:function(){return{title:e.$data.getControlModel().actualName}}}}),Object(P.addToBindingsCache)("text: getControlModel().actualName",function(e,t){return{text:function(){return e.$data.getControlModel().actualName}}}),Object(P.addToBindingsCache)("trackCursor: underCursor, css: cssClasses(), click: $root.selectItemProperties",function(e,t){return{trackCursor:function(){return e.$data.underCursor},css:function(){return e.$data.cssClasses()},click:function(){return e.$root.selectItemProperties}}}),Object(P.addToBindingsCache)("attr: { title: getControlModel().name }",function(e,t){return{attr:function(){return{title:e.$data.getControlModel().name}}}}),Object(P.addToBindingsCache)("text: getControlModel().name",function(e,t){return{text:function(){return e.$data.getControlModel().name}}}),Object(P.addToBindingsCache)("if: $data.isAscending()",function(e,t){return{if:function(){return e.$data.isAscending()}}}),Object(P.addToBindingsCache)("template: 'dxrd-svg-queryBuilder-sorting_asc'",function(e,t){return{template:function(){return"dxrd-svg-queryBuilder-sorting_asc"}}}),Object(P.addToBindingsCache)("if: $data.isDescending()",function(e,t){return{if:function(){return e.$data.isDescending()}}}),Object(P.addToBindingsCache)("template: 'dxrd-svg-queryBuilder-sorting_desc'",function(e,t){return{template:function(){return"dxrd-svg-queryBuilder-sorting_desc"}}}),Object(P.addToBindingsCache)("if: $data.getControlModel().groupBy",function(e,t){return{if:function(){return e.$data.getControlModel().groupBy}}}),Object(P.addToBindingsCache)("template: 'dxrd-svg-queryBuilder-group_by'",function(e,t){return{template:function(){return"dxrd-svg-queryBuilder-group_by"}}}),Object(P.addToBindingsCache)("if: $data.isAggregate()",function(e,t){return{if:function(){return e.$data.isAggregate()}}}),Object(P.addToBindingsCache)("template: 'dxrd-svg-queryBuilder-aggregate'",function(e,t){return{template:function(){return"dxrd-svg-queryBuilder-aggregate"}}}),Object(P.addToBindingsCache)("resizable: resizable($root.resizeHandler, $element), styleunit: position",function(e,t){return{resizable:function(){return e.$data.resizable(e.$root.resizeHandler,t)},styleunit:function(){return e.$data.position}}}),Object(P.addToBindingsCache)("css: {'dxrd-selected': selected, 'dxrd-focused': focused }, draggable: $root.dragHandler, styleunit: position, trackCursor: underCursor, click: $root.selectItemProperties",function(e,t){return{css:function(){return{"dxrd-selected":e.$data.selected,"dxrd-focused":e.$data.focused}},draggable:function(){return e.$root.dragHandler},styleunit:function(){return e.$data.position},trackCursor:function(){return e.$data.underCursor},click:function(){return e.$root.selectItemProperties}}}),Object(P.addToBindingsCache)("styleunit: { lineHeight: position.lineHeight }, style: css",function(e,t){return{styleunit:function(){return{lineHeight:e.$data.position.lineHeight}},style:function(){return e.$data.css}}}),Object(P.addToBindingsCache)("template: contenttemplate, styleunit: { 'height': position.lineHeight, 'width': position.width }",function(e,t){return{template:function(){return e.$data.contenttemplate},styleunit:function(){return{height:e.$data.position.lineHeight,width:e.$data.position.width}}}}),Object(P.addToBindingsCache)("dxCheckBox: { value: selectedWrapper }, click: function(surface, e) { $root.undoEngine().start(); surface.toggleSelected(); $root.undoEngine().end(); e.stopPropagation(); return true; }",function(a,e){return{dxCheckBox:function(){return{value:a.$data.selectedWrapper}},click:function(){return function(e,t){return a.$root.undoEngine().start(),e.toggleSelected(),a.$root.undoEngine().end(),t.stopPropagation(),!0}}}}),Object(P.addToBindingsCache)("text: $root.columnsLoadingMsg()",function(e,t){return{text:function(){return e.$root.columnsLoadingMsg()}}}),Object(P.addToBindingsCache)("style: { cursor: selected() ? 'move' : 'default' }",function(e,t){return{style:function(){return{cursor:e.$data.selected()?"move":"default"}}}}),Object(P.addToBindingsCache)("event: { dblclick: $root.inlineTextEdit.show }, style: { cursor: selected() ? 'move' : 'default' }",function(e,t){return{event:function(){return{dblclick:e.$root.inlineTextEdit.show}},style:function(){return{cursor:e.$data.selected()?"move":"default"}}}}),Object(P.addToBindingsCache)("text: getControlModel().displaySourceName",function(e,t){return{text:function(){return e.$data.getControlModel().displaySourceName}}}),Object(P.addToBindingsCache)("if: $data.isSelected()",function(e,t){return{if:function(){return e.$data.isSelected()}}}),Object(P.addToBindingsCache)("template: titletemplate",function(e,t){return{template:function(){return e.$data.titletemplate}}}),Object(P.addToBindingsCache)("ifnot: $data.isInitialized()",function(e,t){return{ifnot:function(){return e.$data.isInitialized()}}}),Object(P.addToBindingsCache)("if: $data.isInitialized()",function(e,t){return{if:function(){return e.$data.isInitialized()}}}),Object(P.addToBindingsCache)("template: { name: asterisk.template, data: asterisk }",function(e,t){return{template:function(){return{name:e.$data.asterisk.template,data:e.$data.asterisk}}}}),Object(P.addToBindingsCache)("foreach: columns",function(e,t){return{foreach:function(){return e.$data.columns}}}),Object(P.addToBindingsCache)("lazy: { template: $data.template }",function(e,t){return{lazy:function(){return{template:e.$data.template}}}}),Object(P.addToBindingsCache)("if: !$root.inlineTextEdit.visible() || !selected()",function(e,t){return{if:function(){return!e.$root.inlineTextEdit.visible()||!e.$data.selected()}}}),Object(P.addToBindingsCache)("if: $root.inlineTextEdit.visible() && selected()",function(e,t){return{if:function(){return e.$root.inlineTextEdit.visible()&&e.$data.selected()}}}),Object(P.addToBindingsCache)("dxPopup: { showTitle: true, resizeEnabled: true, width: 700, height: 500, maxHeight: '95%', maxWidth: '95%', minHeight: 300, minWidth: 400, title: title(), visible: popupVisible, wrapperAttr: { class: 'dx-filtereditor' }, toolbarItems: buttonItems, showCloseButton: true, container: $root.getPopupContainer($element), position: { of: $root.getPopupContainer($element) }, }",function(e,t){return{dxPopup:function(){return{showTitle:!0,resizeEnabled:!0,width:700,height:500,maxHeight:"95%",maxWidth:"95%",minHeight:300,minWidth:400,title:e.$data.title(),visible:e.$data.popupVisible,wrapperAttr:{class:"dx-filtereditor"},toolbarItems:e.$data.buttonItems,showCloseButton:!0,container:e.$root.getPopupContainer(t),position:{of:e.$root.getPopupContainer(t)}}}}}),Object(P.addToBindingsCache)("text: queryName",function(e,t){return{text:function(){return e.$data.queryName}}}),Object(P.addToBindingsCache)("service: { name: 'createRelation' }",function(e,t){return{service:function(){return{name:"createRelation"}}}}),Object(P.addToBindingsCache)("dxPopupWithAutoHeight: { height: '300px', focusStateEnabled: false, wrapperAttr: { class: 'dx-selectbox-popup-wrapper dx-dropdownlist-popup-wrapper dx-filtereditor-criteriaoperator-popup dx-dropdowneditor-overlay' }, position: $root.rtl ? { my: 'right top', at: 'right bottom', of: popupService.target } : { my: 'left top', at: 'left bottom', of: popupService.target }, container: $root.getPopupContainer($element), target: popupService.target, showTitle: false, showCloseButton: false, animation: {}, hideOnOutsideClick: true, shading: false, minWidth:'170px', maxWidth:'500px', width: 'auto', visible: popupService.visible }",function(e,t){return{dxPopupWithAutoHeight:function(){return{height:"300px",focusStateEnabled:!1,wrapperAttr:{class:"dx-selectbox-popup-wrapper dx-dropdownlist-popup-wrapper dx-filtereditor-criteriaoperator-popup dx-dropdowneditor-overlay"},position:e.$root.rtl?{my:"right top",at:"right bottom",of:e.$data.popupService.target}:{my:"left top",at:"left bottom",of:e.$data.popupService.target},container:e.$root.getPopupContainer(t),target:e.$data.popupService.target,showTitle:!1,showCloseButton:!1,animation:{},hideOnOutsideClick:!0,shading:!1,minWidth:"170px",maxWidth:"500px",width:"auto",visible:e.$data.popupService.visible}}}}),Object(P.addToBindingsCache)("foreach: masterQueries",function(e,t){return{foreach:function(){return e.$data.masterQueries}}}),Object(P.addToBindingsCache)("template: { name: 'dx-masterDetail-editor-relation', foreach: relations }",function(e,t){return{template:function(){return{name:"dx-masterDetail-editor-relation",foreach:e.$data.relations}}}}),Object(P.addToBindingsCache)("attr: { title: $data.getTitle() }, text: queryName",function(e,t){return{attr:function(){return{title:e.$data.getTitle()}},text:function(){return e.$data.queryName}}}),Object(P.addToBindingsCache)("service: { name: 'setColumn' }",function(e,t){return{service:function(){return{name:"setColumn"}}}}),Object(P.addToBindingsCache)("dxclick: function() { $parent.remove($data); }",function(e,t){return{dxclick:function(){return function(){e.$parent.remove(e.$data)}}}}),Object(P.addToBindingsCache)("dxTextBox: { value: relationName, onFocusOut: function() { isEditable(false); } }, focus: { on: isEditable }",function(e,t){return{dxTextBox:function(){return{value:e.$data.relationName,onFocusOut:function(){e.$data.isEditable(!1)}}},focus:function(){return{on:e.$data.isEditable}}}}),Object(P.addToBindingsCache)("text: relationName, click: function() { isEditable(true); }",function(e,t){return{text:function(){return e.$data.relationName},click:function(){return function(){e.$data.isEditable(!0)}}}}),Object(P.addToBindingsCache)("dxclick: create",function(e,t){return{dxclick:function(){return e.$data.create}}}),Object(P.addToBindingsCache)("foreach: keyColumns",function(e,t){return{foreach:function(){return e.$data.keyColumns}}}),Object(P.addToBindingsCache)("template: { name: 'dx-masterDetail-editor-keyColumn', data: master }",function(e,t){return{template:function(){return{name:"dx-masterDetail-editor-keyColumn",data:e.$data.master}}}}),Object(P.addToBindingsCache)("template: { name: 'dx-masterDetail-editor-keyColumn', data: detail }",function(e,t){return{template:function(){return{name:"dx-masterDetail-editor-keyColumn",data:e.$data.detail}}}}),Object(P.addToBindingsCache)("text: target.column() || target.selectColumnText(), dxclick: showPopup, css: { 'dxd-state-selected': target.isSelected, 'default': !target.column() }",function(e,t){return{text:function(){return e.$data.target.column()||e.$data.target.selectColumnText()},dxclick:function(){return e.$data.showPopup},css:function(){return{"dxd-state-selected":e.$data.target.isSelected,default:!e.$data.target.column()}}}}),Object(P.addToBindingsCache)("dxdTableView: $data.value",function(e,t){return{dxdTableView:function(){return e.$data.value}}}),Object(P.addToBindingsCache)("dxPopup: { animation: { show: { type: 'fade', from: 0, to: 1, duration: 700 }, hide: { type: 'fade', from: 1, to: 0, duration: 700 } }, wrapperAttr: { class: 'dxqb-preview' }, visible: isVisible, title: title(), showTitle: true, resizeEnabled: true, shading: true, shadingColor: 'transparent', fullScreen: false, width: 800, height: 544, container: container($element), position: { of: container($element) }, onHidden: function() { $data.data.value(null) }, focusStateEnabled: false }",function(e,t){return{dxPopup:function(){return{animation:{show:{type:"fade",from:0,to:1,duration:700},hide:{type:"fade",from:1,to:0,duration:700}},wrapperAttr:{class:"dxqb-preview"},visible:e.$data.isVisible,title:e.$data.title(),showTitle:!0,resizeEnabled:!0,shading:!0,shadingColor:"transparent",fullScreen:!1,width:800,height:544,container:e.$data.container(t),position:{of:e.$data.container(t)},onHidden:function(){e.$data.data.value(null)},focusStateEnabled:!1}}}}),Object(P.addToBindingsCache)("dxLoadIndicator: { visible: true }",function(e,t){return{dxLoadIndicator:function(){return{visible:!0}}}}),Object(P.addToBindingsCache)("dxButton: { text: okButtonText(), onClick: okButtonHandler, disabled: isLoading }",function(e,t){return{dxButton:function(){return{text:e.$data.okButtonText(),onClick:e.$data.okButtonHandler,disabled:e.$data.isLoading}}}}),Object(P.addToBindingsCache)("dxTextArea: { value: value, valueChangeEvent: 'keyup', readOnly: true }",function(e,t){return{dxTextArea:function(){return{value:e.$data.value,valueChangeEvent:"keyup",readOnly:!0}}}}),Object(P.addToBindingsCache)("dxAceEditor: { value: value, options: aceOptions, additionalOptions: additionalOptions }",function(e,t){return{dxAceEditor:function(){return{value:e.$data.value,options:e.$data.aceOptions,additionalOptions:e.$data.additionalOptions}}}}),Object(P.addToBindingsCache)("if: data && !isLoading()",function(e,t){return{if:function(){return e.$data.data&&!e.$data.isLoading()}}}),Object(P.addToBindingsCache)("template: { name: template, data: data }",function(e,t){return{template:function(){return{name:e.$data.template,data:e.$data.data}}}}),Object(P.addToBindingsCache)("attr: { class: 'dxd-tableview-title-cell dxd-border-secondary dxd-tableview-resizable' }",function(e,t){return{attr:function(){return{class:"dxd-tableview-title-cell dxd-border-secondary dxd-tableview-resizable"}}}}),Object(P.addToBindingsCache)("text: name",function(e,t){return{text:function(){return e.$data.name}}}),Object(P.addToBindingsCache)("dxScrollView: { direction: 'both', scrollByContent: false, showScrollbar: 'always', scrollByThumb: true, bounceEnabled: false, useNative: false, onScroll: $data.onDataScroll, onInitialized: $data.onDataScrollInitialized }",function(e,t){return{dxScrollView:function(){return{direction:"both",scrollByContent:!1,showScrollbar:"always",scrollByThumb:!0,bounceEnabled:!1,useNative:!1,onScroll:e.$data.onDataScroll,onInitialized:e.$data.onDataScrollInitialized}}}}),Object(P.addToBindingsCache)("text: $data, attr: { class: 'dxd-tableview-cell-text dxd-text-primary dxd-tableview-resizable' + $index() }",function(e,t){return{text:function(){return e.$data},attr:function(){return{class:"dxd-tableview-cell-text dxd-text-primary dxd-tableview-resizable"+e.$index()}}}}),Object(P.addToBindingsCache)("text: $parents[1].getImageTooLargeText($data), attr: { class: 'dxd-tableview-cell-text dxd-text-primary dxd-tableview-resizable' + $index() }",function(e,t){return{text:function(){return e.$parents[1].getImageTooLargeText(e.$data)},attr:function(){return{class:"dxd-tableview-cell-text dxd-text-primary dxd-tableview-resizable"+e.$index()}}}}),Object(P.addToBindingsCache)("attr: { class: 'dxd-tableview-cell-text dxd-text-primary dxd-tableview-resizable' + $index() }",function(e,t){return{attr:function(){return{class:"dxd-tableview-cell-text dxd-text-primary dxd-tableview-resizable"+e.$index()}}}}),Object(P.addToBindingsCache)("attr: { src: 'data:image/bmp;base64,' + $data }",function(e,t){return{attr:function(){return{src:"data:image/bmp;base64,"+e.$data}}}}),Object(P.addToBindingsCache)("text: noDataText()",function(e,t){return{text:function(){return e.$data.noDataText()}}}),Object(P.addToBindingsCache)("foreach: rtl ? data.schema.reverse() : data.schema",function(e,t){return{foreach:function(){return e.$data.rtl?e.$data.data.schema.reverse():e.$data.data.schema}}}),Object(P.addToBindingsCache)("if: data.values",function(e,t){return{if:function(){return e.$data.data.values}}}),Object(P.addToBindingsCache)("foreach: data.values",function(e,t){return{foreach:function(){return e.$data.data.values}}}),Object(P.addToBindingsCache)("foreach: $parent.rtl ? $data.reverse() : $data",function(e,t){return{foreach:function(){return e.$parent.rtl?e.$data.reverse():e.$data}}}),Object(P.addToBindingsCache)("ifnot: $parents[1].isImage($index())",function(e,t){return{ifnot:function(){return e.$parents[1].isImage(e.$index())}}}),Object(P.addToBindingsCache)("if: $parents[1].isImage($index())",function(e,t){return{if:function(){return e.$parents[1].isImage(e.$index())}}}),Object(P.addToBindingsCache)("if: $parents[1].isImageTooLarge($data)",function(e,t){return{if:function(){return e.$parents[1].isImageTooLarge(e.$data)}}}),Object(P.addToBindingsCache)("ifnot: $parents[1].isImageTooLarge($data)",function(e,t){return{ifnot:function(){return e.$parents[1].isImageTooLarge(e.$data)}}}),Object(P.addToBindingsCache)("foreach: data.values[0]",function(e,t){return{foreach:function(){return e.$data.data.values[0]}}}),Object(P.addToBindingsCache)("ifnot: data.values",function(e,t){return{ifnot:function(){return e.$data.data.values}}}),Object(P.addToBindingsCache)("treelist: treeListOptions",function(e,t){return{treelist:function(){return e.$data.treeListOptions}}}),Object(P.addToBindingsCache)("treeListSearchPanel: { controllers: $data.fieldListModel.treeListOptions().treeListController }",function(e,t){return{treeListSearchPanel:function(){return{controllers:e.$data.fieldListModel.treeListOptions().treeListController}}}}),Object(P.addToBindingsCache)("dxScrollView: { showScrollbar: 'onHover', scrollByContent: false, scrollByThumb: true, bounceEnabled: false, useNative: false }",function(e,t){return{dxScrollView:function(){return{showScrollbar:"onHover",scrollByContent:!1,scrollByThumb:!0,bounceEnabled:!1,useNative:!1}}}}),Object(P.addToBindingsCache)("dxCollectionEditor: $data",function(e,t){return{dxCollectionEditor:function(){return e.$data}}}),Object(P.addToBindingsCache)("css: { 'dx-image-expanded': !collapsed() }, template: 'dxrd-svg-collapsed'",function(e,t){return{css:function(){return{"dx-image-expanded":!e.$data.collapsed()}},template:function(){return"dxrd-svg-collapsed"}}}),Object(P.addToBindingsCache)("text: $root.getLocalization($parent.name), attr: { title: $root.getLocalization($parent.name) }",function(e,t){return{text:function(){return e.$root.getLocalization(e.$parent.name)},attr:function(){return{title:e.$root.getLocalization(e.$parent.name)}}}}),Object(P.addToBindingsCache)("dxPropertyGrid: { target: value, level: 1, parentDisabled: editor.disabled }",function(e,t){return{dxPropertyGrid:function(){return{target:e.$data.value,level:1,parentDisabled:e.$data.editor.disabled}}}}),Object(P.addToBindingsCache)("foreach: properties.getEditors()",function(e,t){return{foreach:function(){return e.$data.properties.getEditors()}}}),Object(P.addToBindingsCache)('template: { name: "dxqb-fieldlist-wrapper", data: fieldListModel }',function(e,t){return{template:function(){return{name:"dxqb-fieldlist-wrapper",data:e.$data.fieldListModel}}}}),Object(P.addToBindingsCache)("click: $root.findControl",function(e,t){return{click:function(){return e.$root.findControl}}}),Object(P.addToBindingsCache)("template: {name: 'dxqb-toolbar-items', data: actionLists.toolbarItems }",function(e,t){return{template:function(){return{name:"dxqb-toolbar-items",data:e.$data.actionLists.toolbarItems}}}}),Object(P.addToBindingsCache)("template: {name: ko.unwrap($data.imageTemplateName), if: !!ko.unwrap($data.imageTemplateName)}, attr: { class: 'dxrd-toolbar-item-image dxd-icon-highlighted dxd-state-normal ' + (ko.unwrap($data.imageClassName) || ''), title: $data.displayText && $data.displayText() || text }, dxclick: function() { if((typeof $data.disabled === 'function') && !disabled() || !disabled) { clickAction($root.model && $root.model()); } }, css: {'dxrd-disabled-button': disabled, 'dxd-state-active': $data.selected }",function(e,t){return{template:function(){return{name:e.ko.unwrap(e.$data.imageTemplateName),if:!!e.ko.unwrap(e.$data.imageTemplateName)}},attr:function(){return{class:"dxrd-toolbar-item-image dxd-icon-highlighted dxd-state-normal "+(e.ko.unwrap(e.$data.imageClassName)||""),title:e.$data.displayText&&e.$data.displayText()||e.$data.text}},dxclick:function(){return function(){("function"!=typeof e.$data.disabled||e.$data.disabled())&&e.$data.disabled||e.$data.clickAction(e.$root.model&&e.$root.model())}},css:function(){return{"dxrd-disabled-button":e.$data.disabled,"dxd-state-active":e.$data.selected}}}}),Object(P.addToBindingsCache)("lazy: { template: templateName }",function(e,t){return{lazy:function(){return{template:e.$data.templateName}}}}),Object(P.addToBindingsCache)("dxExpressionEditor: getOptions({ options: value, fieldListProvider: $root.parametersBindingsProvider, displayNameProvider: $root.displayNameProvider && $root.displayNameProvider() })",function(e,t){return{dxExpressionEditor:function(){return e.$data.getOptions({options:e.$data.value,fieldListProvider:e.$root.parametersBindingsProvider,displayNameProvider:e.$root.displayNameProvider&&e.$root.displayNameProvider()})}}}),Object(P.addToBindingsCache)("visible: target.isEditable",function(e,t){return{visible:function(){return e.$data.target.isEditable}}}),Object(P.addToBindingsCache)("dxTextBox: { value: target._parameterName, onFocusOut: function() { target.createParameter(); target.isEditable(false); } }",function(e,t){return{dxTextBox:function(){return{value:e.$data.target._parameterName,onFocusOut:function(){e.$data.target.createParameter(),e.$data.target.isEditable(!1)}}}}}),Object(P.addToBindingsCache)("text: target.parameterName, dxclick: showPopup, css: { 'dxd-state-selected': target.isSelected, 'default': target.isDefaultTextDisplayed() }, visible: $data.target.isEditable() === false",function(e,t){return{text:function(){return e.$data.target.parameterName},dxclick:function(){return e.$data.showPopup},css:function(){return{"dxd-state-selected":e.$data.target.isSelected,default:e.$data.target.isDefaultTextDisplayed()}},visible:function(){return!1===e.$data.target.isEditable()}}}),Object(P.addToBindingsCache)("text: name, attr: { 'title': name }, click: function() { $parents[1].click($data); }",function(e,t){return{text:function(){return e.$data.name},attr:function(){return{title:e.$data.name}},click:function(){return function(){e.$parents[1].click(e.$data)}}}}),Object(P.addToBindingsCache)("text: $parent.viewModel.defaultDisplay(), click: function() { $parent.viewModel.isEditable(true); $parent.viewModel._parameterName(''); $parent.visible(false); }",function(e,t){return{text:function(){return e.$parent.viewModel.defaultDisplay()},click:function(){return function(){e.$parent.viewModel.isEditable(!0),e.$parent.viewModel._parameterName(""),e.$parent.visible(!1)}}}}),Object(P.addToBindingsCache)("text: name, click: function() { $parent.click($data); }",function(e,t){return{text:function(){return e.$data.name},click:function(){return function(){e.$parent.click(e.$data)}}}}),Object(P.addToBindingsCache)("if: $parent.viewModel.canCreateParameters",function(e,t){return{if:function(){return e.$parent.viewModel.canCreateParameters}}}),Object(P.addToBindingsCache)("event: { dblclick: function() { $data.dblClickHandler ? $data.dblClickHandler($data) : $data.toggleCollapsed() } }, styleunit: padding, css: { 'dx-treelist-item-selected dxd-state-selected': isSelected() || isMultiSelected() }",function(e,t){return{event:function(){return{dblclick:function(){e.$data.dblClickHandler?e.$data.dblClickHandler(e.$data):e.$data.toggleCollapsed()}}},styleunit:function(){return e.$data.padding},css:function(){return{"dx-treelist-item-selected dxd-state-selected":e.$data.isSelected()||e.$data.isMultiSelected()}}}}),Object(P.addToBindingsCache)('template: "dxqb-treelist-header-item-with-search"',function(e,t){return{template:function(){return"dxqb-treelist-header-item-with-search"}}}),Object(P.addToBindingsCache)("css: $data._extendCssClass('type-page')",function(e,t){return{css:function(){return e.$data._extendCssClass("type-page")}}}),Object(P.addToBindingsCache)("event: { click: $parent._itemClick, dblclick: function() { $parent._goToNextPage() } }, attr: { class: 'dxd-back-highlighted dxd-state-normal dxrd-wizard-type-item dx-fontsize-reestablished dxrd-wizard-type-item-border-color dxd-list-item-back-color ' + $parent._extendCssClass('type-item')}, css: { 'dxd-border-secondary dxd-back-secondary': $parent._IsSelected($data) }",function(e,t){return{event:function(){return{click:e.$parent._itemClick,dblclick:function(){e.$parent._goToNextPage()}}},attr:function(){return{class:"dxd-back-highlighted dxd-state-normal dxrd-wizard-type-item dx-fontsize-reestablished dxrd-wizard-type-item-border-color dxd-list-item-back-color "+e.$parent._extendCssClass("type-item")}},css:function(){return{"dxd-border-secondary dxd-back-secondary":e.$parent._IsSelected(e.$data)}}}}),Object(P.addToBindingsCache)("attr: { class: 'dxrd-wizard-type-image ' + $parent._extendCssClass('type-image') }, css: imageClassName, template: imageTemplateName",function(e,t){return{attr:function(){return{class:"dxrd-wizard-type-image "+e.$parent._extendCssClass("type-image")}},css:function(){return e.$data.imageClassName},template:function(){return e.$data.imageTemplateName}}}),Object(P.addToBindingsCache)("searchHighlighting: { text: text, textToSearch: $parent._textToSearch }, attr: { title: text }, css: $parent._extendCssClass('type-text')",function(e,t){return{searchHighlighting:function(){return{text:e.$data.text,textToSearch:e.$parent._textToSearch}},attr:function(){return{title:e.$data.text}},css:function(){return e.$parent._extendCssClass("type-text")}}}),Object(P.addToBindingsCache)("text: text, attr: { title: text }, css: $parent._extendCssClass('type-text')",function(e,t){return{text:function(){return e.$data.text},attr:function(){return{title:e.$data.text}},css:function(){return e.$parent._extendCssClass("type-text")}}}),Object(P.addToBindingsCache)("foreach: typeItems",function(e,t){return{foreach:function(){return e.$data.typeItems}}}),Object(P.addToBindingsCache)("template: 'dxrd-page-choose-type-item'",function(e,t){return{template:function(){return"dxrd-page-choose-type-item"}}}),Object(P.addToBindingsCache)("if: !!$parent._textToSearch",function(e,t){return{if:function(){return!!e.$parent._textToSearch}}}),Object(P.addToBindingsCache)("ifnot: !!$parent._textToSearch",function(e,t){return{ifnot:function(){return!!e.$parent._textToSearch}}}),Object(P.addToBindingsCache)("treeListSearchPanel: {controllers: ko.unwrap(_fieldListModel).treeListController}",function(e,t){return{treeListSearchPanel:function(){return{controllers:e.ko.unwrap(e.$data._fieldListModel).treeListController}}}}),Object(P.addToBindingsCache)("dxScrollView: { showScrollbar: 'onHover', height: _scrollViewHeight }",function(e,t){return{dxScrollView:function(){return{showScrollbar:"onHover",height:e.$data._scrollViewHeight}}}}),Object(P.addToBindingsCache)("treelist: _fieldListModel",function(e,t){return{treelist:function(){return e.$data._fieldListModel}}}),Object(P.addToBindingsCache)("dxLoadPanel: _loadPanelViewModel($element)",function(e,t){return{dxLoadPanel:function(){return e.$data._loadPanelViewModel(t)}}}),Object(P.addToBindingsCache)("dxButtonWithTemplate: { onClick: function() { clickAction($parent); }, icon: $data.imageTemplateName, iconClass: $data.imageClassName , disabled: $data.disabled && $data.disabled() }, attr: { title: text }",function(e,t){return{dxButtonWithTemplate:function(){return{onClick:function(){e.$data.clickAction(e.$parent)},icon:e.$data.imageTemplateName,iconClass:e.$data.imageClassName,disabled:e.$data.disabled&&e.$data.disabled()}},attr:function(){return{title:e.$data.text}}}}),Object(P.addToBindingsCache)("template: { name: 'dx-popover-list-items', data: ko.utils.extend($parent.data, { className: 'dxrd-federation-addqueries-popover', position: $root.rtl ? 'right' : 'left', popupContainer: $root.getPopupContainer, width: 150 }) }",function(e,t){return{template:function(){return{name:"dx-popover-list-items",data:e.ko.utils.extend(e.$parent.data,{className:"dxrd-federation-addqueries-popover",position:e.$root.rtl?"right":"left",popupContainer:e.$root.getPopupContainer,width:150})}}}}),Object(P.addToBindingsCache)("resizable: gridResizeHelper.resizable($root.resizeHandler, 's')",function(e,t){return{resizable:function(){return e.$data.gridResizeHelper.resizable(e.$root.resizeHandler,"s")}}}),Object(P.addToBindingsCache)("dxQueryBuilderSurface: queryBuilderSurfaceCreator",function(e,t){return{dxQueryBuilderSurface:function(){return e.$data.queryBuilderSurfaceCreator}}}),Object(P.addToBindingsCache)("dxdAccordion: { collapsed: joinResultCollapsed }",function(e,t){return{dxdAccordion:function(){return{collapsed:e.$data.joinResultCollapsed}}}}),Object(P.addToBindingsCache)("template: 'dxrd-svg-collapsed', css: { 'dx-image-expanded': !joinResultCollapsed() }",function(e,t){return{template:function(){return"dxrd-svg-collapsed"},css:function(){return{"dx-image-expanded":!e.$data.joinResultCollapsed()}}}}),Object(P.addToBindingsCache)("text: $root.getLocalization('Join result', 'DataAccessUIStringId.FederationDataSourceQueryBuilder_SelectResult')",function(e,t){return{text:function(){return e.$root.getLocalization("Join result","DataAccessUIStringId.FederationDataSourceQueryBuilder_SelectResult")}}}),Object(P.addToBindingsCache)("style: { height: resultGridHeight }",function(e,t){return{style:function(){return{height:e.$data.resultGridHeight}}}}),Object(P.addToBindingsCache)("dxButton: { icon: 'add', disabled: addRowDisabled, onClick:addRow }",function(e,t){return{dxButton:function(){return{icon:"add",disabled:e.$data.addRowDisabled,onClick:e.$data.addRow}}}}),Object(P.addToBindingsCache)("dxDataGrid: columnsGrid",function(e,t){return{dxDataGrid:function(){return e.$data.columnsGrid}}}),Object(P.addToBindingsCache)("text: cellInfo.column",function(e,t){return{text:function(){return e.$data.cellInfo.column}}}),Object(P.addToBindingsCache)("dxDropDownBox: { dataSource: $data.allColumns, dropDownOptions: { container: $root.getPopupContainer($element), width: $root.calculateWithZoomFactor(357) }, popupPosition: { boundary: $root.getPopupContainer($element) }, value: cellInfo.key, valueExpr: 'key', displayExpr: 'column' }, visible: !$data.isExpression()",function(e,t){return{dxDropDownBox:function(){return{dataSource:e.$data.allColumns,dropDownOptions:{container:e.$root.getPopupContainer(t),width:e.$root.calculateWithZoomFactor(357)},popupPosition:{boundary:e.$root.getPopupContainer(t)},value:e.$data.cellInfo.key,valueExpr:"key",displayExpr:"column"}},visible:function(){return!e.$data.isExpression()}}}),Object(P.addToBindingsCache)("dxDataGrid: { dataSource: $data.allColumns, keyExpr: 'key', remoteOperations: true, height: $root.calculateWithZoomFactor(250), columns: [{ dataField: 'column', sortOrder: 'asc' } , { dataField: 'table'}], hoverStateEnabled: true, selection: { mode: 'single' }, selectedRowKeys: [cellInfo.key], focusedRowEnabled: true, focusedRowKey: cellInfo.key, onSelectionChanged: $data.changeColumn }",function(e,t){return{dxDataGrid:function(){return{dataSource:e.$data.allColumns,keyExpr:"key",remoteOperations:!0,height:e.$root.calculateWithZoomFactor(250),columns:[{dataField:"column",sortOrder:"asc"},{dataField:"table"}],hoverStateEnabled:!0,selection:{mode:"single"},selectedRowKeys:[e.$data.cellInfo.key],focusedRowEnabled:!0,focusedRowKey:e.$data.cellInfo.key,onSelectionChanged:e.$data.changeColumn}}}}),Object(P.addToBindingsCache)("dxExpressionEditor: { options: expression, fieldListProvider: itemsProvider, displayNameProvider: $root.displayNameProvider && $root.displayNameProvider() }, visible: $data.isExpression",function(e,t){return{dxExpressionEditor:function(){return{options:e.$data.expression,fieldListProvider:e.$data.itemsProvider,displayNameProvider:e.$root.displayNameProvider&&e.$root.displayNameProvider()}},visible:function(){return e.$data.isExpression}}}),Object(P.addToBindingsCache)("template: { name: 'dx-wizard-menu-box-editorswitch', data: $data }",function(e,t){return{template:function(){return{name:"dx-wizard-menu-box-editorswitch",data:e.$data}}}}),Object(P.addToBindingsCache)("text: $data.transformGridTitle",function(e,t){return{text:function(){return e.$data.transformGridTitle}}}),Object(P.addToBindingsCache)("dxDataGrid: transformGrid",function(e,t){return{dxDataGrid:function(){return e.$data.transformGrid}}}),Object(P.addToBindingsCache)("dxdAccordion: { collapsed: transformResultCollapsed }",function(e,t){return{dxdAccordion:function(){return{collapsed:e.$data.transformResultCollapsed}}}}),Object(P.addToBindingsCache)("template: 'dxrd-svg-collapsed', css: { 'dx-image-expanded': !transformResultCollapsed() }",function(e,t){return{template:function(){return"dxrd-svg-collapsed"},css:function(){return{"dx-image-expanded":!e.$data.transformResultCollapsed()}}}}),Object(P.addToBindingsCache)("text: $data.transformResultGridTitle",function(e,t){return{text:function(){return e.$data.transformResultGridTitle}}}),Object(P.addToBindingsCache)("treelist: resultFieldListModel",function(e,t){return{treelist:function(){return e.$data.resultFieldListModel}}}),Object(P.addToBindingsCache)("dxCheckBox: transform",function(e,t){return{dxCheckBox:function(){return e.$data.transform}}}),Object(P.addToBindingsCache)("dxPopup: { showTitle: true, title: title(), wrapperAttr: { class: cssClass }, visible: popupVisible, toolbarItems: buttonItems, showCloseButton: true, fullScreen: false, maxHeight: maxHeight, height: height, width: width, onShowing: function(e) { $data.loaded(true); }, rtlEnabled: rtl, onHiding: onHiding, container: getPopupContainer($element), position: { of: getPopupContainer($element)}, resizeEnabled: true, minHeight: 450, minWidth: 650 }",function(t,e){return{dxPopup:function(){return{showTitle:!0,title:t.$data.title(),wrapperAttr:{class:t.$data.cssClass},visible:t.$data.popupVisible,toolbarItems:t.$data.buttonItems,showCloseButton:!0,fullScreen:!1,maxHeight:t.$data.maxHeight,height:t.$data.height,width:t.$data.width,onShowing:function(e){t.$data.loaded(!0)},rtlEnabled:t.$data.rtl,onHiding:t.$data.onHiding,container:t.$data.getPopupContainer(e),position:{of:t.$data.getPopupContainer(e)},resizeEnabled:!0,minHeight:450,minWidth:650}}}}),Object(P.addToBindingsCache)("resizable: resizeHelper.resizable($root.resizeHandler, 'e')",function(e,t){return{resizable:function(){return e.$data.resizeHelper.resizable(e.$root.resizeHandler,"e")}}}),Object(P.addToBindingsCache)("treelist: fieldListModel",function(e,t){return{treelist:function(){return e.$data.fieldListModel}}}),Object(P.addToBindingsCache)("dxDataGrid: sourcesGrid",function(e,t){return{dxDataGrid:function(){return e.$data.sourcesGrid}}}),Object(P.addToBindingsCache)("dxDataGrid: aliasGrid",function(e,t){return{dxDataGrid:function(){return e.$data.aliasGrid}}}),Object(P.addToBindingsCache)("if: loaded",function(e,t){return{if:function(){return e.$data.loaded}}}),Object(P.addToBindingsCache)("template: { name: popupContentTemplate }",function(e,t){return{template:function(){return{name:e.$data.popupContentTemplate}}}}),Object(P.addToBindingsCache)("css: { 'dx-rtl': $root.rtl, 'dx-ltr': !$root.rtl }",function(e,t){return{css:function(){return{"dx-rtl":e.$root.rtl,"dx-ltr":!e.$root.rtl}}}}),Object(P.addToBindingsCache)("css: _extendCssClass",function(e,t){return{css:function(){return e.$data._extendCssClass}}}),Object(P.addToBindingsCache)("visible: $data.navigationPanel().isVisible",function(e,t){return{visible:function(){return e.$data.navigationPanel().isVisible}}}),Object(P.addToBindingsCache)("text: _description(), attr: {'title': _description() }",function(e,t){return{text:function(){return e.$data._description()},attr:function(){return{title:e.$data._description()}}}}),Object(P.addToBindingsCache)("foreach: _steps",function(e,t){return{foreach:function(){return e.$data._steps}}}),Object(P.addToBindingsCache)("visible: $data.visible",function(e,t){return{visible:function(){return e.$data.visible}}}),Object(P.addToBindingsCache)("click: $data.clickAction, text: $data.text, attr: {'title': $data.text }, css: { 'dxrd-disabled': $data.disabled, 'dxd-back-secondary': $data.isActive() }",function(e,t){return{click:function(){return e.$data.clickAction},text:function(){return e.$data.text},attr:function(){return{title:e.$data.text}},css:function(){return{"dxrd-disabled":e.$data.disabled,"dxd-back-secondary":e.$data.isActive()}}}}),Object(P.addToBindingsCache)("visible: $data.isActive",function(e,t){return{visible:function(){return e.$data.isActive}}}),Object(P.addToBindingsCache)("css: { 'withoutPanel': !$data.navigationPanel().isVisible() }",function(e,t){return{css:function(){return{withoutPanel:!e.$data.navigationPanel().isVisible()}}}}),Object(P.addToBindingsCache)("text: _pageDescription()",function(e,t){return{text:function(){return e.$data._pageDescription()}}}),Object(P.addToBindingsCache)("template: { name: template, data: page }",function(e,t){return{template:function(){return{name:e.$data.template,data:e.$data.page}}}}),Object(P.addToBindingsCache)("dxButton: cancelButton",function(e,t){return{dxButton:function(){return e.$data.cancelButton}}}),Object(P.addToBindingsCache)("dxButton: finishButton",function(e,t){return{dxButton:function(){return e.$data.finishButton}}}),Object(P.addToBindingsCache)("dxButton: nextButton",function(e,t){return{dxButton:function(){return e.$data.nextButton}}}),Object(P.addToBindingsCache)("dxButton: previousButton",function(e,t){return{dxButton:function(){return e.$data.previousButton}}}),Object(P.addToBindingsCache)("foreach: _sections, css: _className, styleunit: { top: _parentMarginOffset, left: _parentMarginOffset, right: _parentMarginOffset, bottom: _parentMarginOffset }",function(e,t){return{foreach:function(){return e.$data._sections},css:function(){return e.$data._className},styleunit:function(){return{top:e.$data._parentMarginOffset,left:e.$data._parentMarginOffset,right:e.$data._parentMarginOffset,bottom:e.$data._parentMarginOffset}}}}),Object(P.addToBindingsCache)("css: { 'dxrd-disabled': !$data.page() }, style: $parent._pageCss[$data.pageId]",function(e,t){return{css:function(){return{"dxrd-disabled":!e.$data.page()}},style:function(){return e.$parent._pageCss[e.$data.pageId]}}}),Object(P.addToBindingsCache)("visible: $parent._showPageDescription(), text: $parent._getPageDescription($index(), $data), attr: { title: $parent._getPageDescription($index(), $data) }",function(e,t){return{visible:function(){return e.$parent._showPageDescription()},text:function(){return e.$parent._getPageDescription(e.$index(),e.$data)},attr:function(){return{title:e.$parent._getPageDescription(e.$index(),e.$data)}}}}),Object(P.addToBindingsCache)("template: { name: $parent.metadata.template, data: page }, dxScrollView: { showScrollbar: 'onHover'}",function(e,t){return{template:function(){return{name:e.$parent.metadata.template,data:e.$data.page}},dxScrollView:function(){return{showScrollbar:"onHover"}}}}),Object(P.addToBindingsCache)("text: metadata.disabledText",function(e,t){return{text:function(){return e.$data.metadata.disabledText}}}),Object(P.addToBindingsCache)("if: $data && $data.isVisible()",function(e,t){return{if:function(){return e.$data&&e.$data.isVisible()}}}),Object(P.addToBindingsCache)("with: navigationPanel",function(e,t){return{with:function(){return e.$data.navigationPanel}}}),Object(P.addToBindingsCache)("with: _currentPage",function(e,t){return{with:function(){return e.$data._currentPage}}}),Object(P.addToBindingsCache)("if: $data._sections.length > 0",function(e,t){return{if:function(){return 0<e.$data._sections.length}}}),Object(P.addToBindingsCache)("if: $data.page() !== null",function(e,t){return{if:function(){return null!==e.$data.page()}}}),Object(P.addToBindingsCache)("with: page",function(e,t){return{with:function(){return e.$data.page}}}),Object(P.addToBindingsCache)("if: $data.page() === null",function(e,t){return{if:function(){return null===e.$data.page()}}}),Object(P.addToBindingsCache)("text: _rootElementTitle",function(e,t){return{text:function(){return e.$data._rootElementTitle}}}),Object(P.addToBindingsCache)("dxSelectBox: { dataSource: _rootElementList, value: _selectedRootElement, displayExpr: 'fullPath', displayCustomValue: true, useItemTextAsTitle: true, dropDownOptions: { container: $root.getPopupContainer($element) } }",function(e,t){return{dxSelectBox:function(){return{dataSource:e.$data._rootElementList,value:e.$data._selectedRootElement,displayExpr:"fullPath",displayCustomValue:!0,useItemTextAsTitle:!0,dropDownOptions:{container:e.$root.getPopupContainer(t)}}}}}),Object(P.addToBindingsCache)("dxScrollView: { showScrollbar: 'onHover', useNative: false, scrollByThumb: true }, dxValidationGroup: $data._validationGroup || {}",function(e,t){return{dxScrollView:function(){return{showScrollbar:"onHover",useNative:!1,scrollByThumb:!0}},dxValidationGroup:function(){return e.$data._validationGroup||{}}}}),Object(P.addToBindingsCache)("text: _jsonConnectionTitle, attr: { 'title': _jsonConnectionTitle }",function(e,t){return{text:function(){return e.$data._jsonConnectionTitle},attr:function(){return{title:e.$data._jsonConnectionTitle}}}}),Object(P.addToBindingsCache)("dxTextBox: { value: _connectionName }, dxValidator: { validationRules: $data._connectionNameValidationRules || [] }",function(e,t){return{dxTextBox:function(){return{value:e.$data._connectionName}},dxValidator:function(){return{validationRules:e.$data._connectionNameValidationRules||[]}}}}),Object(P.addToBindingsCache)("text: _jsonSourceTitle, attr: { 'title': _jsonSourceTitle }",function(e,t){return{text:function(){return e.$data._jsonSourceTitle},attr:function(){return{title:e.$data._jsonSourceTitle}}}}),Object(P.addToBindingsCache)("dxLocalizedSelectBox: { dataSource: _sources, value: _selectedSource, valueExpr:'value', displayExpr: 'displayValue', displayCustomValue: true, dropDownOptions: { container: $root.getPopupContainer($element) } }",function(e,t){return{dxLocalizedSelectBox:function(){return{dataSource:e.$data._sources,value:e.$data._selectedSource,valueExpr:"value",displayExpr:"displayValue",displayCustomValue:!0,dropDownOptions:{container:e.$root.getPopupContainer(t)}}}}}),Object(P.addToBindingsCache)("dxValidationGroup: $data.validationGroup || {}",function(e,t){return{dxValidationGroup:function(){return e.$data.validationGroup||{}}}}),Object(P.addToBindingsCache)("css: $data.cssClass",function(e,t){return{css:function(){return e.$data.cssClass}}}),Object(P.addToBindingsCache)("dxValidationSummary: $data.validationSummary || {}, visible: $data.validationSummary && !isValid()",function(e,t){return{dxValidationSummary:function(){return e.$data.validationSummary||{}},visible:function(){return e.$data.validationSummary&&!e.$data.isValid()}}}),Object(P.addToBindingsCache)("dxValidationSummary: $data._validationSummary || {}, visible: $data._validationSummary && _selectedSource().validationSummary && !canNext()",function(e,t){return{dxValidationSummary:function(){return e.$data._validationSummary||{}},visible:function(){return e.$data._validationSummary&&e.$data._selectedSource().validationSummary&&!e.$data.canNext()}}}),Object(P.addToBindingsCache)("with: _selectedSource",function(e,t){return{with:function(){return e.$data._selectedSource}}}),Object(P.addToBindingsCache)("template: { name: 'dx-propertieseditor', data: grid }",function(e,t){return{template:function(){return{name:"dx-propertieseditor",data:e.$data.grid}}}}),Object(P.addToBindingsCache)("dxRadioGroup: { value: selectedDataSourceOperation, items: dataSourceOperations, layout: 'vertical' }",function(e,t){return{dxRadioGroup:function(){return{value:e.$data.selectedDataSourceOperation,items:e.$data.dataSourceOperations,layout:"vertical"}}}}),Object(P.addToBindingsCache)("text: text, attr: { 'title': text }",function(e,t){return{text:function(){return e.$data.text},attr:function(){return{title:e.$data.text}}}}),Object(P.addToBindingsCache)("dxList: { dataSource: availableDataSources, selectedItems: selectedDataSource, focusStateEnabled:false, editEnabled: true, height: dataSourcesListHeight, editConfig: { selectionEnabled: false }, selectionMode: 'single', activeStateEnabled: false, disabled: createNewDataSource, noDataText: $root.dx._static.noDataText(), encodeNoDataText: true }",function(e,t){return{dxList:function(){return{dataSource:e.$data.availableDataSources,selectedItems:e.$data.selectedDataSource,focusStateEnabled:!1,editEnabled:!0,height:e.$data.dataSourcesListHeight,editConfig:{selectionEnabled:!1},selectionMode:"single",activeStateEnabled:!1,disabled:e.$data.createNewDataSource,noDataText:e.$root.dx._static.noDataText(),encodeNoDataText:!0}}}}),Object(P.addToBindingsCache)("if: isDataSourceCreationAvailable",function(e,t){return{if:function(){return e.$data.isDataSourceCreationAvailable}}}),Object(P.addToBindingsCache)("dxTemplate : { name: 'item' }",function(){return{dxTemplate:{name:"item"}}}),Object(P.addToBindingsCache)("dxRadioGroup: { value: selectedOperation, items: operations, layout: 'vertical' }",function(e,t){return{dxRadioGroup:function(){return{value:e.$data.selectedOperation,items:e.$data.operations,layout:"vertical"}}}}),Object(P.addToBindingsCache)("styleunit: { top: $data.canCreateNew() ? 65 : 0 }",function(e,t){return{styleunit:function(){return{top:e.$data.canCreateNew()?65:0}}}}),Object(P.addToBindingsCache)("dxList: { dataSource: items, onSelectionChanged: function(e) { selectedItems(e.addedItems) }, selectedItems: selectedItems.peek(), hoverStateEnabled:false, editEnabled: true, height: '100%', editConfig: { selectionEnabled: false }, searchExpr: 'name', searchEnabled: true, selectionMode: 'single', activeStateEnabled: false, disabled: _createNew, noDataText: $root.dx._static.noDataText(), encodeNoDataText: true, searchEditorOptions: { placeholder: $root.dx._static.searchPlaceholder() } }",function(t,e){return{dxList:function(){return{dataSource:t.$data.items,onSelectionChanged:function(e){t.$data.selectedItems(e.addedItems)},selectedItems:t.$data.selectedItems.peek(),hoverStateEnabled:!1,editEnabled:!0,height:"100%",editConfig:{selectionEnabled:!1},searchExpr:"name",searchEnabled:!0,selectionMode:"single",activeStateEnabled:!1,disabled:t.$data._createNew,noDataText:t.$root.dx._static.noDataText(),encodeNoDataText:!0,searchEditorOptions:{placeholder:t.$root.dx._static.searchPlaceholder()}}}}}),Object(P.addToBindingsCache)("event: { dblclick: function(e){ $parent.onDblClick() } }",function(t,e){return{event:function(){return{dblclick:function(e){t.$parent.onDblClick()}}}}}),Object(P.addToBindingsCache)("text: $parent._displayExpr($data)",function(e,t){return{text:function(){return e.$parent._displayExpr(e.$data)}}}),Object(P.addToBindingsCache)("template: { name: 'dxrd-page-selectitems-radio-group', data: $data }",function(e,t){return{template:function(){return{name:"dxrd-page-selectitems-radio-group",data:e.$data}}}}),Object(P.addToBindingsCache)("template: { name: 'dxrd-page-selectitems-list', data: $data }",function(e,t){return{template:function(){return{name:"dxrd-page-selectitems-list",data:e.$data}}}}),Object(P.addToBindingsCache)("if: canCreateNew",function(e,t){return{if:function(){return e.$data.canCreateNew}}}),Object(P.addToBindingsCache)("if: !_createNew()",function(e,t){return{if:function(){return!e.$data._createNew()}}}),Object(P.addToBindingsCache)("if: _createNew",function(e,t){return{if:function(){return e.$data._createNew}}}),Object(P.addToBindingsCache)("template: { name: 'dxrd-page-jsonsource', data: _specifySourceData }",function(e,t){return{template:function(){return{name:"dxrd-page-jsonsource",data:e.$data._specifySourceData}}}}),Object(P.addToBindingsCache)("dxLocalizedSelectBox: { dataSource: _parameterTypes, value: itemType, valueExpr:'value', displayExpr: 'displayValue', displayCustomValue: true, dropDownOptions: { container: $root.getPopupContainer($element) } }",function(e,t){return{dxLocalizedSelectBox:function(){return{dataSource:e.$data._parameterTypes,value:e.$data.itemType,valueExpr:"value",displayExpr:"displayValue",displayCustomValue:!0,dropDownOptions:{container:e.$root.getPopupContainer(t)}}}}}),Object(P.addToBindingsCache)("dxTextBox: { value: name, placeholder: $data.namePlaceholder() }, dxValidator: { validationRules: $parent.editor.editorOptions.nameValidationRules || [] }",function(e,t){return{dxTextBox:function(){return{value:e.$data.name,placeholder:e.$data.namePlaceholder()}},dxValidator:function(){return{validationRules:e.$parent.editor.editorOptions.nameValidationRules||[]}}}}),Object(P.addToBindingsCache)("dxTextBox: { value: _editingValue, placeholder: $data.valuePlaceholder() }, visible: !$data.isExpression()",function(e,t){return{dxTextBox:function(){return{value:e.$data._editingValue,placeholder:e.$data.valuePlaceholder()}},visible:function(){return!e.$data.isExpression()}}}),Object(P.addToBindingsCache)("dxExpressionEditor: { options: _expression, fieldListProvider: $parent.editor.editorOptions.itemsProvider, displayNameProvider: $root.displayNameProvider && $root.displayNameProvider() }, visible: $data.isExpression",function(e,t){return{dxExpressionEditor:function(){return{options:e.$data._expression,fieldListProvider:e.$parent.editor.editorOptions.itemsProvider,displayNameProvider:e.$root.displayNameProvider&&e.$root.displayNameProvider()}},visible:function(){return e.$data.isExpression}}}),Object(P.addToBindingsCache)("dxFileImagePicker: { value: value, placeholderId: 'File', accept:'.json,.txt' }",function(e,t){return{dxFileImagePicker:function(){return{value:e.$data.value,placeholderId:"File",accept:".json,.txt"}}}}),Object(P.addToBindingsCache)("dxTextArea: { value: value, spellcheck: false, isValid: isValid }, dxValidator: $data.validator || { validationRules: jsonStringValidationRules || [] }",function(e,t){return{dxTextArea:function(){return{value:e.$data.value,spellcheck:!1,isValid:e.$data.isValid}},dxValidator:function(){return e.$data.validator||{validationRules:e.$data.jsonStringValidationRules||[]}}}}),Object(P.addToBindingsCache)("dxAceEditor: { value: value, editorContainer: editorContainer, options: aceOptions, additionalOptions: additionalOptions }, css: { 'dx-invalid' : !value() || !isValid() }",function(e,t){return{dxAceEditor:function(){return{value:e.$data.value,editorContainer:e.$data.editorContainer,options:e.$data.aceOptions,additionalOptions:e.$data.additionalOptions}},css:function(){return{"dx-invalid":!e.$data.value()||!e.$data.isValid()}}}}),Object(P.addToBindingsCache)("dxButtonWithTemplate: { onClick: uploadFile, hint: $data.getUploadTitle(), icon: 'dxrd-svg-wizard-Download' }",function(e,t){return{dxButtonWithTemplate:function(){return{onClick:e.$data.uploadFile,hint:e.$data.getUploadTitle(),icon:"dxrd-svg-wizard-Download"}}}}),Object(P.addToBindingsCache)("styleunit: padding, css: { 'dx-treelist-item-selected dxd-state-selected dxd-back-secondary': isSelected }",function(e,t){return{styleunit:function(){return e.$data.padding},css:function(){return{"dx-treelist-item-selected dxd-state-selected dxd-back-secondary":e.$data.isSelected}}}}),Object(P.addToBindingsCache)("css: nodeImageClass",function(e,t){return{css:function(){return e.$data.nodeImageClass}}}),Object(P.addToBindingsCache)("dxButtonWithTemplate: { onClick: function() { clickAction($parent); }, icon: $data.imageTemplateName, iconClass: $data.imageClassName, disabled: $data.disabled && $data.disabled() }, attr: { title: text }",function(e,t){return{dxButtonWithTemplate:function(){return{onClick:function(){e.$data.clickAction(e.$parent)},icon:e.$data.imageTemplateName,iconClass:e.$data.imageClassName,disabled:e.$data.disabled&&e.$data.disabled()}},attr:function(){return{title:e.$data.text}}}}),Object(P.addToBindingsCache)("dxCheckBox: { value: data.checked }, click: function(treeNode, e) { treeNode.data.toggleChecked(); e.stopPropagation(); return true; }",function(e,t){return{dxCheckBox:function(){return{value:e.$data.data.checked}},click:function(){return function(e,t){return e.data.toggleChecked(),t.stopPropagation(),!0}}}}),Object(P.addToBindingsCache)("dxTextBox: { value: queryName }",function(e,t){return{dxTextBox:function(){return{value:e.$data.queryName}}}}),Object(P.addToBindingsCache)("ifnot: $data.disableCustomSql",function(e,t){return{ifnot:function(){return e.$data.disableCustomSql}}}),Object(P.addToBindingsCache)("template: { name: 'dxqb-popup-selectStatment', data: _popupSelectStatement }",function(e,t){return{template:function(){return{name:"dxqb-popup-selectStatment",data:e.$data._popupSelectStatement}}}}),Object(P.addToBindingsCache)("template: { name: 'dxrd-querybuilder-popup', data: _popupQueryBuilder }",function(e,t){return{template:function(){return{name:"dxrd-querybuilder-popup",data:e.$data._popupQueryBuilder}}}}),Object(P.addToBindingsCache)("if: !!$data._fieldListModel()",function(e,t){return{if:function(){return!!e.$data._fieldListModel()}}}),Object(P.addToBindingsCache)("if: $data._relationsEditor()",function(e,t){return{if:function(){return e.$data._relationsEditor()}}}),Object(P.addToBindingsCache)("template: { name: 'dxrd-masterDetail-editor-complete-wizard', data: $data._relationsEditor }",function(e,t){return{template:function(){return{name:"dxrd-masterDetail-editor-complete-wizard",data:e.$data._relationsEditor}}}}),Object(P.addToBindingsCache)("dxPopupWithAutoHeight: { height: '235px', focusStateEnabled: false, position: $root.rtl ? { my: 'right top', at: 'right bottom', of: popupService.target, collision: 'flipfit' } : { my: 'left top', at: 'left bottom', of: popupService.target, collision: 'flipfit' }, wrapperAttr: { class: 'dx-selectbox-popup-wrapper dx-dropdownlist-popup-wrapper dx-filtereditor-criteriaoperator-popup dx-dropdowneditor-overlay' }, container: $root.getPopupContainer($element), target: popupService.target, showTitle: false, showCloseButton: false, animation: {}, hideOnOutsideClick: true, shading: false, minWidth:'170px', maxWidth:'500px', width: 'auto', visible: popupService.visible }",function(e,t){return{dxPopupWithAutoHeight:function(){return{height:"235px",focusStateEnabled:!1,position:e.$root.rtl?{my:"right top",at:"right bottom",of:e.$data.popupService.target,collision:"flipfit"}:{my:"left top",at:"left bottom",of:e.$data.popupService.target,collision:"flipfit"},wrapperAttr:{class:"dx-selectbox-popup-wrapper dx-dropdownlist-popup-wrapper dx-filtereditor-criteriaoperator-popup dx-dropdowneditor-overlay"},container:e.$root.getPopupContainer(t),target:e.$data.popupService.target,showTitle:!1,showCloseButton:!1,animation:{},hideOnOutsideClick:!0,shading:!1,minWidth:"170px",maxWidth:"500px",width:"auto",visible:e.$data.popupService.visible}}}}),Object(P.addToBindingsCache)("dxPopup: { animation: { show: { type: 'fade', from: 0, to: 1, duration: 700 }, hide: { type: 'fade', from: 1, to: 0, duration: 700 } }, wrapperAttr: { class: 'dxqb-preview' }, visible: isVisible, title: title(), showTitle: true, resizeEnabled: true, shading: true, shadingColor: 'transparent', fullScreen: false, width: 800, height: 544, container: closest($element, '.dxrd-wizard'), position: { of: closest($element, '.dx-designer-viewport') }, onHidden: function() { $data.data(null) }, focusStateEnabled: false }",function(e,t){return{dxPopup:function(){return{animation:{show:{type:"fade",from:0,to:1,duration:700},hide:{type:"fade",from:1,to:0,duration:700}},wrapperAttr:{class:"dxqb-preview"},visible:e.$data.isVisible,title:e.$data.title(),showTitle:!0,resizeEnabled:!0,shading:!0,shadingColor:"transparent",fullScreen:!1,width:800,height:544,container:e.$data.closest(t,".dxrd-wizard"),position:{of:e.$data.closest(t,".dx-designer-viewport")},onHidden:function(){e.$data.data(null)},focusStateEnabled:!1}}}}),Object(P.addToBindingsCache)("dxTextArea: { value: data, valueChangeEvent: 'keyup', disabled: false }",function(e,t){return{dxTextArea:function(){return{value:e.$data.data,valueChangeEvent:"keyup",disabled:!1}}}}),Object(P.addToBindingsCache)("dxAceEditor: { value: data, additionalOptions: additionalOptions, options: aceOptions }",function(e,t){return{dxAceEditor:function(){return{value:e.$data.data,additionalOptions:e.$data.additionalOptions,options:e.$data.aceOptions}}}}),Object(P.addToBindingsCache)("dxButton: { text: okButtonText(), onClick: okButtonHandler }",function(e,t){return{dxButton:function(){return{text:e.$data.okButtonText(),onClick:e.$data.okButtonHandler}}}}),Object(P.addToBindingsCache)("event: { dblclick: function() { $data.dblClickHandler ? $data.dblClickHandler($data) : $data.toggleCollapsed() }, mouseenter: mouseenter, mouseleave: mouseleave }, attr: { class: 'dx-treeview-item dx-treelist-item dx-fontsize-reestablished dxd-list-item-back-color ' + ($data.hasItems ? 'dx-treelist-list-item-content ' : 'dx-treelist-field-item-content ') + ($data.isSelected() ? 'dx-treelist-item-selected dxd-state-selected dxd-back-secondary' : '') }, styleunit: padding, css: { 'dx-state-hover': isHovered }",function(e,t){return{event:function(){return{dblclick:function(){e.$data.dblClickHandler?e.$data.dblClickHandler(e.$data):e.$data.toggleCollapsed()},mouseenter:e.$data.mouseenter,mouseleave:e.$data.mouseleave}},attr:function(){return{class:"dx-treeview-item dx-treelist-item dx-fontsize-reestablished dxd-list-item-back-color "+(e.$data.hasItems?"dx-treelist-list-item-content ":"dx-treelist-field-item-content ")+(e.$data.isSelected()?"dx-treelist-item-selected dxd-state-selected dxd-back-secondary":"")}},styleunit:function(){return e.$data.padding},css:function(){return{"dx-state-hover":e.$data.isHovered}}}}),Object(P.addToBindingsCache)("css: nodeImageClass, visible: hasItems, template: 'dxrd-svg-collapsed', click: toggleCollapsed",function(e,t){return{css:function(){return e.$data.nodeImageClass},visible:function(){return e.$data.hasItems},template:function(){return"dxrd-svg-collapsed"},click:function(){return e.$data.toggleCollapsed}}}),Object(P.addToBindingsCache)("event: { dblclick: function() { $data.dblClickHandler && $data.dblClickHandler($data); } }, click: toggleSelected, draggable: isDraggable ? dragDropHandler : null, css: { 'dxrd-disabled': $data.data.disabled && $data.data.disabled() }",function(e,t){return{event:function(){return{dblclick:function(){e.$data.dblClickHandler&&e.$data.dblClickHandler(e.$data)}}},click:function(){return e.$data.toggleSelected},draggable:function(){return e.$data.isDraggable?e.$data.dragDropHandler:null},css:function(){return{"dxrd-disabled":e.$data.data.disabled&&e.$data.data.disabled()}}}}),Object(P.addToBindingsCache)("dxCheckBox: { value: data.checked, disabled: data.selectionDisabled }, click: function(treeNode, e) { treeNode.data.toggleChecked(); e.stopPropagation(); return true; }",function(e,t){return{dxCheckBox:function(){return{value:e.$data.data.checked,disabled:e.$data.data.selectionDisabled}},click:function(){return function(e,t){return e.data.toggleChecked(),t.stopPropagation(),!0}}}}),Object(P.addToBindingsCache)("dxPropertyGrid: { target: $parent.data.dataSourceParameter, level: $parent.data.editor.level + 1 }",function(e,t){return{dxPropertyGrid:function(){return{target:e.$parent.data.dataSourceParameter,level:e.$parent.data.editor.level+1}}}}),Object(P.addToBindingsCache)('template: "dx-treelist-accordion-item-with-checkbox"',function(e,t){return{template:function(){return"dx-treelist-accordion-item-with-checkbox"}}}),Object(P.addToBindingsCache)('template: "dx-treelist-header-item-with-checkbox"',function(e,t){return{template:function(){return"dx-treelist-header-item-with-checkbox"}}}),Object(P.addToBindingsCache)("ifnot: $data.hasItems",function(e,t){return{ifnot:function(){return e.$data.hasItems}}}),Object(P.addToBindingsCache)("if: $data.showIcon",function(e,t){return{if:function(){return e.$data.showIcon}}}),Object(P.addToBindingsCache)("ifnot: $data.showIcon",function(e,t){return{ifnot:function(){return e.$data.showIcon}}}),Object(P.addToBindingsCache)("template: { name: 'dx-popover-list-items', data: ko.utils.extend($parent.data, { position: $root.rtl ? 'left' : 'right', popupContainer: $root.getPopupContainer }) }",function(e,t){return{template:function(){return{name:"dx-popover-list-items",data:e.ko.utils.extend(e.$parent.data,{position:e.$root.rtl?"left":"right",popupContainer:e.$root.getPopupContainer})}}}}),Object(P.addToBindingsCache)("dxList: { dataSource: _chooseObjectDataMember.dataMembers, selectedItems: _chooseObjectDataMember.selectedDataMembers, selectionMode: 'single', activeStateEnabled: false, focusStateEnabled: false, searchExpr: 'displayName', searchEnabled: true, noDataText: $dx._static.noDataText(), encodeNoDataText: true, searchEditorOptions: { placeholder: $root.dx._static.searchPlaceholder() } }",function(e,t){return{dxList:function(){return{dataSource:e.$data._chooseObjectDataMember.dataMembers,selectedItems:e.$data._chooseObjectDataMember.selectedDataMembers,selectionMode:"single",activeStateEnabled:!1,focusStateEnabled:!1,searchExpr:"displayName",searchEnabled:!0,noDataText:e.$data.$dx._static.noDataText(),encodeNoDataText:!0,searchEditorOptions:{placeholder:e.$root.dx._static.searchPlaceholder()}}}}}),Object(P.addToBindingsCache)("treeListSearchPanel: {controllers: _chooseObjectType.availableTypesTreelistModel.treeListController}",function(e,t){return{treeListSearchPanel:function(){return{controllers:e.$data._chooseObjectType.availableTypesTreelistModel.treeListController}}}}),Object(P.addToBindingsCache)("dxScrollView: { showScrollbar: 'onHover', height: _chooseObjectType._scrollViewHeight}",function(e,t){return{dxScrollView:function(){return{showScrollbar:"onHover",height:e.$data._chooseObjectType._scrollViewHeight}}}}),Object(P.addToBindingsCache)("treelist: _chooseObjectType.availableTypesTreelistModel",function(e,t){return{treelist:function(){return e.$data._chooseObjectType.availableTypesTreelistModel}}}),Object(P.addToBindingsCache)("text: $root.dx._static.noDataText()",function(e,t){return{text:function(){return e.$root.dx._static.noDataText()}}}),Object(P.addToBindingsCache)("if: _chooseObjectType.types && !_chooseObjectType.types().length",function(e,t){return{if:function(){return e.$data._chooseObjectType.types&&!e.$data._chooseObjectType.types().length}}}),Object(P.addToBindingsCache)("style: position, css: { 'dxrd-disabled': $data.disabled() }",function(e,t){return{style:function(){return e.$data.position},css:function(){return{"dxrd-disabled":e.$data.disabled()}}}}),Object(P.addToBindingsCache)("text: $parent.showDescription($index(), description), attr: { title: $parent.showDescription($index(), description) }",function(e,t){return{text:function(){return e.$parent.showDescription(e.$index(),e.$data.description)},attr:function(){return{title:e.$parent.showDescription(e.$index(),e.$data.description)}}}}),Object(P.addToBindingsCache)("text: disabledText",function(e,t){return{text:function(){return e.$data.disabledText}}}),Object(P.addToBindingsCache)("treeListSearchPanel: {controllers: availableTypesTreelistModel.treeListController}",function(e,t){return{treeListSearchPanel:function(){return{controllers:e.$data.availableTypesTreelistModel.treeListController}}}}),Object(P.addToBindingsCache)("dxScrollView: { showScrollbar: 'onHover', height: _scrollViewHeight}",function(e,t){return{dxScrollView:function(){return{showScrollbar:"onHover",height:e.$data._scrollViewHeight}}}}),Object(P.addToBindingsCache)("treelist: availableTypesTreelistModel",function(e,t){return{treelist:function(){return e.$data.availableTypesTreelistModel}}}),Object(P.addToBindingsCache)("dxList: { dataSource: dataMembers, selectedItems: selectedDataMembers, selectionMode: 'single', activeStateEnabled: false, focusStateEnabled: false, searchExpr: 'displayName', searchEnabled: true, noDataText: $root.dx._static.noDataText(), encodeNoDataText: true, searchEditorOptions: { placeholder: $root.dx._static.searchPlaceholder() } }",function(e,t){return{dxList:function(){return{dataSource:e.$data.dataMembers,selectedItems:e.$data.selectedDataMembers,selectionMode:"single",activeStateEnabled:!1,focusStateEnabled:!1,searchExpr:"displayName",searchEnabled:!0,noDataText:e.$root.dx._static.noDataText(),encodeNoDataText:!0,searchEditorOptions:{placeholder:e.$root.dx._static.searchPlaceholder()}}}}}),Object(P.addToBindingsCache)("text: $data.displayName, attr: { 'title': $data.displayName}",function(e,t){return{text:function(){return e.$data.displayName},attr:function(){return{title:e.$data.displayName}}}}),Object(P.addToBindingsCache)("dxExpressionEditor: getOptions({ options: value, fieldListProvider: value().itemsProvider, displayNameProvider: $root.displayNameProvider && $root.displayNameProvider() })",function(e,t){return{dxExpressionEditor:function(){return e.$data.getOptions({options:e.$data.value,fieldListProvider:e.$data.value().itemsProvider,displayNameProvider:e.$root.displayNameProvider&&e.$root.displayNameProvider()})}}}),Object(P.addToBindingsCache)("dxScrollView: { showScrollbar: 'onHover'}",function(e,t){return{dxScrollView:function(){return{showScrollbar:"onHover"}}}}),Object(P.addToBindingsCache)("foreach: _sections",function(e,t){return{foreach:function(){return e.$data._sections}}}),Object(P.addToBindingsCache)("if: !$data.disabled()",function(e,t){return{if:function(){return!e.$data.disabled()}}}),Object(P.addToBindingsCache)("if: $data.disabled()",function(e,t){return{if:function(){return e.$data.disabled()}}}),Object(P.addToBindingsCache)("if: !!$data",function(e,t){return{if:function(){return!!e.$data}}}),Object(P.addToBindingsCache)("foreach: _grids",function(e,t){return{foreach:function(){return e.$data._grids}}}),Object(P.addToBindingsCache)("template: { name: 'dx-objectdatasource-parameters-grid', data: _ctorParametersObject }",function(e,t){return{template:function(){return{name:"dx-objectdatasource-parameters-grid",data:e.$data._ctorParametersObject}}}}),Object(P.addToBindingsCache)("template: { name: 'dx-objectdatasource-parameters-grid', data: _dataMemberParametersObject }",function(e,t){return{template:function(){return{name:"dx-objectdatasource-parameters-grid",data:e.$data._dataMemberParametersObject}}}}),Object(P.addToBindingsCache)("template: { name: 'dx-objectdatasource-parameters-section', data: _chooseObjectParameters }",function(e,t){return{template:function(){return{name:"dx-objectdatasource-parameters-section",data:e.$data._chooseObjectParameters}}}}),Object(P.addToBindingsCache)("dxCollectionEditor: parametersEditorOptions",function(e,t){return{dxCollectionEditor:function(){return e.$data.parametersEditorOptions}}}),Object(P.addToBindingsCache)("styleunit: { 'marginLeft' : editor.padding }, css: { 'dxrd-group-header-collapsed': collapsed() }",function(e,t){return{styleunit:function(){return{marginLeft:e.$data.editor.padding}},css:function(){return{"dxrd-group-header-collapsed":e.$data.collapsed()}}}}),Object(P.addToBindingsCache)("text: value().name",function(e,t){return{text:function(){return e.$data.value().name}}}),Object(P.addToBindingsCache)("dxPropertyGrid: { target: value, level: editor.level + 1 }",function(e,t){return{dxPropertyGrid:function(){return{target:e.$data.value,level:e.$data.editor.level+1}}}}),Object(P.addToBindingsCache)("dxScrollView: { showScrollbar: 'onHover', useNative: false, scrollByThumb: true }",function(e,t){return{dxScrollView:function(){return{showScrollbar:"onHover",useNative:!1,scrollByThumb:!0}}}}),Object(P.addToBindingsCache)("dxclick: $parents[1].select, css: { 'dxd-state-selected dxd-back-secondary' : $parents[1].selectedIndex() === $index() }",function(e,t){return{dxclick:function(){return e.$parents[1].select},css:function(){return{"dxd-state-selected dxd-back-secondary":e.$parents[1].selectedIndex()===e.$index()}}}}),Object(P.addToBindingsCache)("visible: showButtons",function(e,t){return{visible:function(){return e.$data.showButtons}}}),Object(P.addToBindingsCache)("dxButton: { onClick: add, text: getDisplayTextButton('add') }, attr: { title: getDisplayTextButton('add') }",function(e,t){return{dxButton:function(){return{onClick:e.$data.add,text:e.$data.getDisplayTextButton("add")}},attr:function(){return{title:e.$data.getDisplayTextButton("add")}}}}),Object(P.addToBindingsCache)("dxButton: { onClick: remove, disabled: selectedIndex() === null, text: $parent.removeButtonTitle }, attr: { title: $parent.removeButtonTitle }",function(e,t){return{dxButton:function(){return{onClick:e.$data.remove,disabled:null===e.$data.selectedIndex(),text:e.$parent.removeButtonTitle}},attr:function(){return{title:e.$parent.removeButtonTitle}}}}),Object(P.addToBindingsCache)("if: values().length === 0",function(e,t){return{if:function(){return 0===e.$data.values().length}}}),Object(P.addToBindingsCache)("dxList: { dataSource: _connectionStrings, onSelectionChanged: function(e) { _selectedConnectionString(e.addedItems) }, selectedItems: _selectedConnectionString.peek(), focusStateEnabled: false, searchEnabled: true, searchExpr: 'description', editEnabled: true, editConfig: { selectionEnabled: true }, selectionMode: 'single', activeStateEnabled: false, noDataText: $root.dx._static.noDataText(), encodeNoDataText: true, searchEditorOptions: { placeholder: $root.dx._static.searchPlaceholder() } }",function(t,e){return{dxList:function(){return{dataSource:t.$data._connectionStrings,onSelectionChanged:function(e){t.$data._selectedConnectionString(e.addedItems)},selectedItems:t.$data._selectedConnectionString.peek(),focusStateEnabled:!1,searchEnabled:!0,searchExpr:"description",editEnabled:!0,editConfig:{selectionEnabled:!0},selectionMode:"single",activeStateEnabled:!1,noDataText:t.$root.dx._static.noDataText(),encodeNoDataText:!0,searchEditorOptions:{placeholder:t.$root.dx._static.searchPlaceholder()}}}}}),Object(P.addToBindingsCache)("text: $data['description'] || $data['name']",function(e,t){return{text:function(){return e.$data.description||e.$data.name}}}),Object(P.addToBindingsCache)("text: caption()",function(e,t){return{text:function(){return e.$data.caption()}}}),Object(P.addToBindingsCache)("visible: !runQueryBuilderDisabled, text: $parent.runQueryBuilderBtnText, click: function() { $parent.runQueryBuilder() }",function(e,t){return{visible:function(){return!e.$data.runQueryBuilderDisabled},text:function(){return e.$parent.runQueryBuilderBtnText},click:function(){return function(){e.$parent.runQueryBuilder()}}}}),Object(P.addToBindingsCache)("dxTextArea: { value: sqlString, valueChangeEvent: 'keyup input blur', readOnly: disableCustomSql() }",function(e,t){return{dxTextArea:function(){return{value:e.$data.sqlString,valueChangeEvent:"keyup input blur",readOnly:e.$data.disableCustomSql()}}}}),Object(P.addToBindingsCache)("dxAceEditor: { value: sqlString, additionalOptions: additionalOptions, options: aceOptions }, css: { 'dx-disabled-ace': disableCustomSql() }",function(e,t){return{dxAceEditor:function(){return{value:e.$data.sqlString,additionalOptions:e.$data.additionalOptions,options:e.$data.aceOptions}},css:function(){return{"dx-disabled-ace":e.$data.disableCustomSql()}}}}),Object(P.addToBindingsCache)("dxList: { dataSource: storedProcedures, searchEnabled: true, searchExpr: 'name', onContentReady: scrollActiveItem, selectedItems: selectedProcedure, editEnabled: true, editConfig: { selectionEnabled: true }, selectionMode: 'single', activeStateEnabled: false, noDataText: $root.dx._static.noDataText(), encodeNoDataText: true }",function(e,t){return{dxList:function(){return{dataSource:e.$data.storedProcedures,searchEnabled:!0,searchExpr:"name",onContentReady:e.$data.scrollActiveItem,selectedItems:e.$data.selectedProcedure,editEnabled:!0,editConfig:{selectionEnabled:!0},selectionMode:"single",activeStateEnabled:!1,noDataText:e.$root.dx._static.noDataText(),encodeNoDataText:!0}}}}),Object(P.addToBindingsCache)("text: $parent.generateStoredProcedureDisplayName($data)",function(e,t){return{text:function(){return e.$parent.generateStoredProcedureDisplayName(e.$data)}}}),Object(P.addToBindingsCache)("text: queryNameCaption()",function(e,t){return{text:function(){return e.$data.queryNameCaption()}}}),Object(P.addToBindingsCache)("dxTextBox: { value: queryName, placeholder: $data.placeholder() }",function(e,t){return{dxTextBox:function(){return{value:e.$data.queryName,placeholder:e.$data.placeholder()}}}}),Object(P.addToBindingsCache)("dxRadioGroup: { value: selectedQueryType, layout: 'horizontal', items: queryTypeItems }",function(e,t){return{dxRadioGroup:function(){return{value:e.$data.selectedQueryType,layout:"horizontal",items:e.$data.queryTypeItems}}}}),Object(P.addToBindingsCache)("text: $parent.localizeQueryType($data), attr: { 'title': $parent.localizeQueryType($data) }",function(e,t){return{text:function(){return e.$parent.localizeQueryType(e.$data)},attr:function(){return{title:e.$parent.localizeQueryType(e.$data)}}}}),Object(P.addToBindingsCache)("template: { name: queryControl().template, data: queryControl() }",function(e,t){return{template:function(){return{name:e.$data.queryControl().template,data:e.$data.queryControl()}}}}),Object(P.addToBindingsCache)("template: { name: 'dxrd-querybuilder-popup', data: popupQueryBuilder }",function(e,t){return{template:function(){return{name:"dxrd-querybuilder-popup",data:e.$data.popupQueryBuilder}}}}),Object(P.addToBindingsCache)("dxPopup: popupViewModel($element)",function(e,t){return{dxPopup:function(){return e.$data.popupViewModel(t)}}}),Object(P.addToBindingsCache)("dxQueryBuilder: qbOptions",function(e,t){return{dxQueryBuilder:function(){return e.$data.qbOptions}}}),Object(P.addToBindingsCache)("dxButton: { text: getDisplayText('previewResults'), onClick: previewHandler, disabled: okButtonDisabled }",function(e,t){return{dxButton:function(){return{text:e.$data.getDisplayText("previewResults"),onClick:e.$data.previewHandler,disabled:e.$data.okButtonDisabled}}}}),Object(P.addToBindingsCache)("dxButton: { text: getDisplayText('cancel'), onClick: cancelHandler }",function(e,t){return{dxButton:function(){return{text:e.$data.getDisplayText("cancel"),onClick:e.$data.cancelHandler}}}}),Object(P.addToBindingsCache)("dxButton: { text: getDisplayText('ok'), type: 'default', onClick: okHandler, disabled: okButtonDisabled }",function(e,t){return{dxButton:function(){return{text:e.$data.getDisplayText("ok"),type:"default",onClick:e.$data.okHandler,disabled:e.$data.okButtonDisabled}}}}),Object(P.addToBindingsCache)("dxLoadPanel:{ animation: { show: { type: 'fade', from: 0, to: 1, duration: 700 }, hide: { type: 'fade', from: 1, to: 0, duration: 700 } }, deferRendering: false, message: getDisplayText('loading'), visible: showLoadIndicator, shading: true, shadingColor: 'transparent'}",function(e,t){return{dxLoadPanel:function(){return{animation:{show:{type:"fade",from:0,to:1,duration:700},hide:{type:"fade",from:1,to:0,duration:700}},deferRendering:!1,message:e.$data.getDisplayText("loading"),visible:e.$data.showLoadIndicator,shading:!0,shadingColor:"transparent"}}}}),Object(P.addToBindingsCache)("template: 'dxrd-designer'",function(e,t){return{template:function(){return"dxrd-designer"}}}),Object(P.addToBindingsCache)("if: qbOptions",function(e,t){return{if:function(){return e.$data.qbOptions}}}),Object(P.addToBindingsCache)("if: isVisible",function(e,t){return{if:function(){return e.$data.isVisible}}}),Object(P.addToBindingsCache)("css: { 'dxd-state-active': $data.isExpression() }, dxButtonWithTemplate: { onClick: switchEditors, icon: 'dxrd-svg-wizard-expressions' }",function(e,t){return{css:function(){return{"dxd-state-active":e.$data.isExpression()}},dxButtonWithTemplate:function(){return{onClick:e.$data.switchEditors,icon:"dxrd-svg-wizard-expressions"}}}}),Object(P.addToBindingsCache)("dxPopover: { wrapperAttr: { class: $data.className }, width: $data.width || 200, position: position, visible: popoverVisible, target: target, container: popupContainer($element)}",function(e,t){return{dxPopover:function(){return{wrapperAttr:{class:e.$data.className},width:e.$data.width||200,position:e.$data.position,visible:e.$data.popoverVisible,target:e.$data.target,container:e.$data.popupContainer(t)}}}}),Object(P.addToBindingsCache)("attr: { class: $data.className + '-list'}, dxList: { dataSource: popoverListItems(), onItemClick: itemClickAction }",function(e,t){return{attr:function(){return{class:e.$data.className+"-list"}},dxList:function(){return{dataSource:e.$data.popoverListItems(),onItemClick:e.$data.itemClickAction}}}}),Object(P.addToBindingsCache)("attr: { class: $data.className + '-list-item'}",function(e,t){return{attr:function(){return{class:e.$data.className+"-list-item"}}}}),Object(P.addToBindingsCache)("text: name, attr: { title: name }",function(e,t){return{text:function(){return e.$data.name},attr:function(){return{title:e.$data.name}}}}),Object(P.addToBindingsCache)("text: $data.title || $parent.title",function(e,t){return{text:function(){return e.$data.title||e.$parent.title}}}),Object(P.addToBindingsCache)("text: description, attr: { title: description }",function(e,t){return{text:function(){return e.$data.description},attr:function(){return{title:e.$data.description}}}}),Object(P.addToBindingsCache)("dxPopup: { animation: { show: { type: 'fadeIn', duration: 700 }, hide: { type: 'fadeOut', duration: 700 } }, visible: isVisible, wrapperAttr: { class: 'dxrd-wizard dx-editors dxd-text-primary' }, title: isVisible() ? title : '', showTitle: true, fullScreen: false, width: width, height: height, container: $element, visualContainer: _container($element), titleTemplate: _titleTemplate, position: _wizardPopupPosition($element) }, cssArray: [ $data._extendCssClass, { 'dx-rtl': $root.rtl, 'dx-ltr': !$root.rtl }]",function(e,t){return{dxPopup:function(){return{animation:{show:{type:"fadeIn",duration:700},hide:{type:"fadeOut",duration:700}},visible:e.$data.isVisible,wrapperAttr:{class:"dxrd-wizard dx-editors dxd-text-primary"},title:e.$data.isVisible()?e.$data.title:"",showTitle:!0,fullScreen:!1,width:e.$data.width,height:e.$data.height,container:t,visualContainer:e.$data._container(t),titleTemplate:e.$data._titleTemplate,position:e.$data._wizardPopupPosition(t)}},cssArray:function(){return[e.$data._extendCssClass,{"dx-rtl":e.$root.rtl,"dx-ltr":!e.$root.rtl}]}}}),P.SvgTemplatesEngine.addTemplates({"dxdd-connection-line":'<svg class="dxdd-connection-line" style="width:100%; height: 100%"> <line class="dxd-qb-relationship-line-color" data-bind="attr: { x1: startPoint().relativeX, y1: startPoint().relativeY, x2: endPoint().relativeX, y2: endPoint().relativeY }" /> </svg>',"dxdd-connecting-point":'<div class="dxdd-connecting-point" data-bind="styleunit: position, trackCursor: underCursor, style: { \'marginLeft\': -3 * _context.zoom() + \'px\', \'marginTop\': -3 * _context.zoom() + \'px\' }, draggable: $root.connectingPointDragHandler"> <svg style="width:100%; height: 100%"> <line x1="0" y1="0" x2="100%" y2="100%" /> <line x1=0 y1="100%" x2="100%" y2="0" /> </svg> </div>',"dxdd-connection-point-selection":'<div class="dxrd-control" data-bind="draggable: $root.connectionPointDragHandler, styleunit: { top: relativeY, left: relativeX }"> </div>',"dxdd-connector":'<div class="dxdd-connector" data-bind="styleunit: position, trackCursor: underCursor"> \x3c!-- ko template: { name: \'dxdd-connection-line\' } --\x3e \x3c!-- /ko --\x3e </div>',"dxdd-connector-selection":"<div class=\"dxdd-connector\" data-bind=\"styleunit: position, dxclick: function() {}, draggable: $root.dragHandler\"> \x3c!-- ko template: { name: 'dxdd-connection-line' } --\x3e \x3c!-- /ko --\x3e \x3c!-- ko with: startPoint --\x3e \x3c!-- ko template: { name: 'dxdd-connection-point-selection' } --\x3e \x3c!-- /ko --\x3e \x3c!-- /ko --\x3e \x3c!-- ko with: endPoint --\x3e \x3c!-- ko template: { name: 'dxdd-connection-point-selection' } --\x3e \x3c!-- /ko --\x3e \x3c!-- /ko --\x3e </div>","dxdd-routed-connection-line":'<svg class="dxdd-connection-line"> <defs> \x3c!-- ko if: showArrow --\x3e <marker data-bind="attr: { id: \'dxqb-arrow_end\' + connectorID() }" viewBox="0 0 5 10" refX="5" refY="5" markerUnits="userSpaceOnUse" orient="auto" markerWidth="14" markerHeight="14"> <polyline class="dxd-qb-relationship-line-color" points="0,0 5,5 0,10" /> </marker> \x3c!-- /ko --\x3e \x3c!-- ko if: showRightArrow --\x3e <marker data-bind="attr: { id: \'dxqb-arrow_start\' + connectorID() }" viewBox="0 0 5 10" refX="5" refY="5" markerUnits="userSpaceOnUse" orient="auto-start-reverse" markerWidth="14" markerHeight="14"> <polyline class="dxd-qb-relationship-line-color" points="0,0 5,5 0,10" /> </marker> \x3c!-- /ko --\x3e </defs> <polyline class="dxd-qb-relationship-line-color" fill="none" data-bind="attr: { points: routePointsSet, \'marker-end\': showArrow() ? \'url(#dxqb-arrow_end\' + connectorID() + \')\' : \'\', \'marker-start\': showRightArrow() ? \'url(#dxqb-arrow_start\' + connectorID() + \')\' : \'\' }, updateConnectorArrow: $data" /> </svg>',"dxdd-routed-connector":'<div class="dxdd-connector" data-bind="styleunit: position, visible: isVisible"> \x3c!-- ko template: { name: \'dxdd-routed-connection-line\' } --\x3e \x3c!-- /ko --\x3e \x3c!-- ko foreach: routeLineWrappers --\x3e <div data-bind="styleunit: position" style="position: absolute;"> \x3c!-- ko with: $parent --\x3e <div class="dxd-selectable" data-bind="trackCursor: underCursor, click: $root.selectItemProperties" style="position: relative; width: 100%; height: 100%;"></div> \x3c!-- /ko --\x3e </div> \x3c!-- /ko --\x3e </div>',"dxdd-routed-connector-selection":'<div class="dxdd-connector dxrd-selected dxd-state-selected" data-bind="styleunit: position, dxclick: function() {}, visible: isVisible"> \x3c!-- ko template: { name: \'dxdd-routed-connection-line\' } --\x3e \x3c!-- /ko --\x3e \x3c!-- ko foreach: routeLineWrappers --\x3e \x3c!-- ko ifnot: isLocked --\x3e <div data-bind="styleunit: position, style: { cursor: isVerticalLine ? \'ew-resize\' : \'ns-resize\' }, routeLineDraggable: { starting: $root.resizeHandler.starting, stopped: function() { resizeStopped(); $root.resizeHandler.stopped(); }, forceResize: resizeHandler }" style="position: absolute;"> </div> \x3c!-- /ko --\x3e \x3c!-- ko if: isLocked --\x3e <div data-bind="styleunit: position" style="position: absolute;"> </div> \x3c!-- /ko --\x3e \x3c!-- /ko --\x3e \x3c!-- ko with: startPoint --\x3e \x3c!-- ko template: { name: \'dxdd-connection-point-selection\' } --\x3e \x3c!-- /ko --\x3e \x3c!-- /ko --\x3e \x3c!-- ko with: endPoint --\x3e \x3c!-- ko template: { name: \'dxdd-connection-point-selection\' } --\x3e \x3c!-- /ko --\x3e \x3c!-- /ko --\x3e </div>',"dx-diagram-element":'<div class="dxrd-control dxd-selectable" data-bind="styleunit: position, trackCursor: underCursor"> <div class="dxrd-control-content-main" data-bind="styleunit: { lineHeight: positionLineHeightWithoutMargins }, style: css"> <div data-bind="template: contenttemplate, styleunit: { \'height\': positionLineHeightWithoutMargins, \'width\': positionWidthWithoutMargins }"> </div> </div> </div>',"dx-diagram-element-selection":'<div class="dxrd-control" data-bind="event: { dblclick: $root.inlineTextEdit.show }, css: {\'dxrd-selected\': selected, \'dxrd-focused\': focused }, resizable: $root.resizeHandler, draggable: $root.dragHandler, styleunit: position, trackCursor: underCursor"> \x3c!-- ko if: !$root.inlineTextEdit.visible() --\x3e <div class="dxrd-control-content-main" data-bind="styleunit: { lineHeight: positionLineHeightWithoutMargins }, style: css"> <div data-bind="template: contenttemplate, styleunit: { \'height\': positionLineHeightWithoutMargins, \'width\': positionWidthWithoutMargins}"> </div> </div> \x3c!-- /ko --\x3e \x3c!-- ko if: $root.inlineTextEdit.visible --\x3e \x3c!-- ko with: $root.inlineTextEdit --\x3e <div class="inline-text-edit" data-bind="dxTextArea: { value: text, onKeyUp: keypressAction, valueChangeEvent: \'keyup\' }"></div> \x3c!-- /ko --\x3e \x3c!-- /ko --\x3e </div>',"dx-diagram-element-content":'<div style="width: 100%; height: 100%; border: 1px solid black"> <div data-bind="text: getControlModel().text"></div> </div>',"dxdd-element-content-with-connecting-points":'<div style="width: 100%; height: 100%; overflow: hidden"> <svg style="top:0; left: 0; width: 100%; height: 100%; stroke: black; fill: transparent; stroke-width: 1"> \x3c!-- ko if: getControlModel().type() === \'Ellipse\' --\x3e <ellipse cx="50%" cy="50%" rx="50%" ry="50%" /> \x3c!-- /ko --\x3e \x3c!-- ko if: getControlModel().type() === \'Condition\' --\x3e <line x1="50%" y1="0" x2="100%" y2="50%" /> <line x1="100%" y1="50%" x2="50%" y2="100%" /> <line x1="50%" y1="100%" x2="0" y2="50%" /> <line x1="0" y1="50%" x2="50%" y2="0" /> \x3c!-- /ko --\x3e \x3c!-- ko if: !getControlModel().type() --\x3e <rect height="100%" width="100%" /> \x3c!-- /ko --\x3e <text x="50%" y="50%" alignment-baseline="middle" style="text-anchor: middle; cursor:default;" data-bind="text: getControlModel().text"></text> </svg> \x3c!-- ko foreach: connectingPoints --\x3e \x3c!-- ko template: \'dxdd-connecting-point\' --\x3e \x3c!-- /ko --\x3e \x3c!-- /ko --\x3e </div>',"dx-diagram-surface":'<div class="dxrd-surface" style="height: 100%; display:inline-block;" data-bind="styleunit: { \'width\': Math.min(pageWidth(), $root.surfaceSize()) }, click: function(_, e) { $root.selection.clickHandler(null, e); e.stopPropagation(); }, keyDownActions: $root.actionLists"> <div class="dxrd-viewport" style="overflow:auto;width:inherit;height:inherit;" data-bind="styleunit: { minWidth: Math.min(pageWidth(), $root.surfaceSize()), maxWidth: pageWidth(), maxHeight: pageHeight() + 20 }"> <div data-bind="selectable: { selection: $root.selection, zoom: zoom }"> <div class="dxrd-ghost-containment"> <div class="dxrd-ghost-container" style="background: white;position: relative;" data-bind="styleunit: { \'width\': pageWidth(), \'height\': pageHeight() }, trackCursor: underCursor"> \x3c!-- ko foreach: controls --\x3e \x3c!-- ko template: { name: isSelected() ? selectiontemplate : template } --\x3e \x3c!-- /ko --\x3e \x3c!-- /ko --\x3e </div> </div> </div> </div> </div>',"dxqb-joincondition":'<div class="dxdd-connector" data-bind="styleunit: position, trackCursor: underCursor"> <svg style="width:100%; height: 100%"> <line data-bind="attr: { x1: startPoint.x, y1: startPoint.y, x2: endPoint.x, y2: endPoint.y }" /> </svg> </div>',"dx-query-surface":'<div class="dxrd-surface" style="display:inline-block;" data-bind="styleunit: { \'width\': $root.surfaceSize }, click: function(_, e) { $root.selection.clickHandler(null, e); e.stopPropagation(); }, keyDownActions: $root.actionLists"> <div class="dxrd-viewport" style="width:inherit;height:inherit;"> <div class="dxqb-mainwin" data-bind="dxScrollView: { direction: \'both\', showScrollbar: \'onHover\', scrollByContent: false, scrollByThumb: true, bounceEnabled: false, useNative: false, height: \'100%\' }"> <div style="height:100%;"> <div class="dxrd-ghost-containment" style="height:100%;"> <div class="dxrd-ghost-container dxqb-ghost-container" data-bind="styleunit: { \'minWidth\': pageWidth, \'minHeight\': pageHeight }, trackCursor: { recalculateBounds: true, underCursor: underCursor }"> <div class="dxqb-main" data-bind="trackCursor: { recalculateBounds: true, underCursor: underCursor }, style: { \'z-index\' : $parent.dragDropStarted() ? 2 : null }"> \x3c!-- ko if: tables().length === 0--\x3e <div class="dxqb-placeholder dxd-empty-area-placeholder-text-color dxd-text-info" data-bind="text: placeholder()"></div> \x3c!-- /ko --\x3e \x3c!-- ko foreach: relations --\x3e \x3c!-- ko foreach: conditions --\x3e \x3c!-- ko if: !isSelected()--\x3e \x3c!-- ko template: template --\x3e \x3c!-- /ko --\x3e \x3c!-- /ko --\x3e \x3c!-- /ko --\x3e \x3c!-- /ko --\x3e \x3c!-- ko foreach: tables --\x3e \x3c!-- ko template: template --\x3e \x3c!-- /ko --\x3e \x3c!-- /ko --\x3e \x3c!-- ko foreach: relations --\x3e \x3c!-- ko foreach: conditions --\x3e \x3c!-- ko if: isSelected()--\x3e \x3c!-- ko template: selectiontemplate --\x3e \x3c!-- /ko --\x3e \x3c!-- /ko --\x3e \x3c!-- /ko --\x3e \x3c!-- /ko --\x3e \x3c!-- ko with: $root.columnDragHandler.dragDropConnector --\x3e <svg class="dxdd-connection-line-draggable" data-bind="styleunit: { top: position.top(), left: position.left() }"> \x3c!-- ko foreach: routePoints --\x3e \x3c!-- ko if: $index() < ($parent.routePoints().length - 1) --\x3e <line class="dxd-qb-relationship-line-color" fill="none" data-bind="attr: {x1 : $data.x, y1: $data.y, x2: $parent.routePoints()[$index()+1].x, y2: $parent.routePoints()[$index()+1].y }"></line> \x3c!-- /ko --\x3e \x3c!-- /ko --\x3e </svg> \x3c!-- /ko --\x3e </div> </div> </div> </div> </div> </div> </div>',"dxqb-relation":"\x3c!-- ko foreach: conditions --\x3e \x3c!-- ko template: { name: isSelected() ? selectiontemplate : template } --\x3e \x3c!-- /ko --\x3e \x3c!-- /ko --\x3e","dxqb-table-field":'<div class="dx-border-inheritor dxd-border-accented"> <div class="dxqb-table-field dxd-qb-table-field-border-color dxd-qb-table-field-back-color dxd-back-highlighted dxd-qb-table-field-separator-color dxd-border-primary" data-bind="trackCursor: { recalculateBounds: true, underCursor: underCursor }, draggable: $root.columnDragHandler, css: cssClasses($root.surface(), $root.columnDragHandler, $parent), click: $root.selectItemProperties"> <div class="dxqb-table-field-background dxd-back-accented"></div> <div class="dxqb-table-field-checkbox-wrapper"> <div class="dxqb-table-field-checkbox" data-bind="dxCheckBox: { value: selectedWrapper }, click: function(surface, e) { surface.toggleSelected(); e.stopPropagation(); return true; }"></div> </div> <div class="dxqb-table-field-content dxd-text-primary" data-bind="attr: { title: getControlModel().actualName }"> <div class="dxqb-table-field-state"> \x3c!-- ko if: $data.isAscending() --\x3e <div class="dxqb-image-field-state dxqb-image-field-sorting-asc">\x3c!-- ko template: \'dxrd-svg-queryBuilder-sorting_asc\' --\x3e\x3c!-- /ko --\x3e</div> \x3c!-- /ko --\x3e \x3c!-- ko if: $data.isDescending() --\x3e <div class="dxqb-image-field-state dxqb-image-field-sorting-desc">\x3c!-- ko template: \'dxrd-svg-queryBuilder-sorting_desc\' --\x3e\x3c!-- /ko --\x3e</div> \x3c!-- /ko --\x3e \x3c!-- ko if: $data.getControlModel().groupBy --\x3e <div class="dxqb-image-field-state dxqb-image-field-group-by">\x3c!-- ko template: \'dxrd-svg-queryBuilder-group_by\' --\x3e\x3c!-- /ko --\x3e</div> \x3c!-- /ko --\x3e \x3c!-- ko if: $data.isAggregate() --\x3e <div class="dxqb-image-field-state dxqb-image-field-aggregate">\x3c!-- ko template: \'dxrd-svg-queryBuilder-aggregate\' --\x3e\x3c!-- /ko --\x3e</div> \x3c!-- /ko --\x3e </div> <div class="dxqb-table-field-caption"> <div class="dxqb-table-field-text dxd-qb-table-field-text-color" data-bind="text: getControlModel().actualName"></div> </div> </div> </div> </div>',"dxqb-table-asterisk-field":'<div class="dx-border-inheritor dxd-border-accented"> <div class="dxqb-table-field dxd-qb-table-field-border-color dxd-qb-table-field-back-color dxd-back-highlighted dxd-border-primary" data-bind="trackCursor: underCursor, css: cssClasses(), click: $root.selectItemProperties"> <div class="dxqb-table-field-background dxd-back-accented"></div> <div class="dxqb-table-field-checkbox-wrapper"> <div class="dxqb-table-field-checkbox" data-bind="dxCheckBox: { value: selectedWrapper }, click: function(surface, e) { surface.toggleSelected(); e.stopPropagation(); return true; }"></div> </div> <div class="dxqb-table-field-content dxd-text-primary" data-bind="attr: { title: getControlModel().name }"> <div class="dxqb-table-field-caption"> <div class="dxqb-table-field-text dxd-qb-table-field-text-color" data-bind="text: getControlModel().name"></div> </div> </div> </div> </div>',"dxqb-table-main":'\x3c!-- ko if: $data.isSelected() --\x3e <div class="dxqb-table-resize-ghost" data-bind="resizable: resizable($root.resizeHandler, $element), styleunit: position"></div> \x3c!-- /ko --\x3e <div class="dxrd-control" data-bind="css: {\'dxrd-selected\': selected, \'dxrd-focused\': focused }, draggable: $root.dragHandler, styleunit: position, trackCursor: underCursor, click: $root.selectItemProperties"> <div class="dxrd-control-content-main dxd-qb-table-back-color dxd-back-primary2" data-bind="styleunit: { lineHeight: position.lineHeight }, style: css"> <div class="dxqb-table-background dxd-back-accented"></div> <div class="dx-background-inheritor dxd-back-accented"> <div class="dxqb-table-border dxd-qb-table-border-color dxd-back-highlighted dxd-state-active dxd-state-no-hover"></div> </div> <div data-bind="template: contenttemplate, styleunit: { \'height\': position.lineHeight, \'width\': position.width }"> </div> </div> </div>',"dxqb-table":'<div class="dxqb-table dxd-qb-table-back-color dxd-back-primary2"> <div class="dx-border-inheritor dxd-border-accented"> <div class="dxqb-table-head-field dxd-qb-table-field-border-color dxd-qb-table-field-back-color dxd-back-highlighted dxd-border-primary"> <div class="dxqb-table-checkbox-all"> <div data-bind="dxCheckBox: { value: selectedWrapper }, click: function(surface, e) { $root.undoEngine().start(); surface.toggleSelected(); $root.undoEngine().end(); e.stopPropagation(); return true; }"></div> </div> \x3c!-- ko template: titletemplate --\x3e \x3c!-- /ko --\x3e </div> </div> <div class="dxqb-table-content"> <div class="dxqb-tableFields-wrapper"> \x3c!-- ko ifnot: $data.isInitialized() --\x3e <div class="dxqb-table-loading"> <div class="dxqb-table-loading-text dxd-text-primary" data-bind="text: $root.columnsLoadingMsg()"></div> </div> \x3c!-- /ko --\x3e \x3c!-- ko if: $data.isInitialized() --\x3e \x3c!-- ko template: { name: asterisk.template, data: asterisk } --\x3e \x3c!-- /ko --\x3e \x3c!-- ko foreach: columns --\x3e \x3c!-- ko lazy: { template: $data.template }--\x3e \x3c!-- /ko --\x3e \x3c!-- /ko --\x3e \x3c!-- /ko --\x3e </div> </div> </div>',"dxqb-table-title":'<div class="dxqb-table-title" data-bind="style: { cursor: selected() ? \'move\' : \'default\' }"> <div class="dxqb-table-title-content dxd-text-primary" data-bind="text: getControlModel().actualName"></div> </div>',"dxqb-federation-table-title":'<div class="dxqb-table-title dxqb-federation-table-title" data-bind="event: { dblclick: $root.inlineTextEdit.show }, style: { cursor: selected() ? \'move\' : \'default\' }"> <div class="dxqb-federation-table-title-container"> \x3c!-- ko if: !$root.inlineTextEdit.visible() || !selected() --\x3e <div class="dxqb-table-title-content dxd-text-primary" data-bind="text: getControlModel().actualName"></div> \x3c!-- /ko --\x3e \x3c!-- ko if: $root.inlineTextEdit.visible() && selected() --\x3e \x3c!-- ko with: $root.inlineTextEdit --\x3e <div class="inline-text-edit" data-bind="dxTextArea: { value: text, onKeyUp: keypressAction, valueChangeEvent: \'keyup\' }"></div> \x3c!-- /ko --\x3e \x3c!-- /ko --\x3e </div> <div class="dxqb-table-subtitle dxd-text-info" data-bind="text: getControlModel().displaySourceName"></div> </div>',"dxrd-masterDetail-editor":"\x3c!-- ko if: $data --\x3e <div> <div data-bind=\"dxPopup: { showTitle: true, resizeEnabled: true, width: 700, height: 500, maxHeight: '95%', maxWidth: '95%', minHeight: 300, minWidth: 400, title: title(), visible: popupVisible, wrapperAttr: { class: 'dx-filtereditor' }, toolbarItems: buttonItems, showCloseButton: true, container: $root.getPopupContainer($element), position: { of: $root.getPopupContainer($element) }, }\"> <div class=\"dx-filtereditor-tree dxd-border-secondary\" data-bind=\"dxScrollView: { showScrollbar: 'onHover', direction: 'both' }\" style=\"cursor: default\"> \x3c!-- ko foreach: masterQueries --\x3e <div class=\"criteria-operator-group\"> <div class=\"criteria-operator-group-item\"> <div class=\"criteria-operator-text dxd-filter-editor-text-color criteria-operator-item-group dxd-filter-editor-group-back-color dxd-state-no-hover stylized\" data-bind=\"text: queryName\"></div> <div data-bind=\"service: { name: 'createRelation' }\"></div> </div> <div class=\"criteria-operator-content\"> \x3c!-- ko template: { name: 'dx-masterDetail-editor-relation', foreach: relations }--\x3e \x3c!-- /ko --\x3e </div> </div> \x3c!-- /ko --\x3e </div> </div> <div class=\"dx-selectbox-popup-wrapper dx-dropdownlist-popup-wrapper dx-filtereditor-criteriaoperator-popup dx-dropdowneditor-overlay\" data-bind=\"dxPopupWithAutoHeight: { height: '300px', focusStateEnabled: false, wrapperAttr: { class: 'dx-selectbox-popup-wrapper dx-dropdownlist-popup-wrapper dx-filtereditor-criteriaoperator-popup dx-dropdowneditor-overlay' }, position: $root.rtl ? { my: 'right top', at: 'right bottom', of: popupService.target } : { my: 'left top', at: 'left bottom', of: popupService.target }, container: $root.getPopupContainer($element), target: popupService.target, showTitle: false, showCloseButton: false, animation: {}, hideOnOutsideClick: true, shading: false, minWidth:'170px', maxWidth:'500px', width: 'auto', visible: popupService.visible }\"> \x3c!-- ko with: popupService--\x3e \x3c!-- ko with: data --\x3e \x3c!-- ko template: template--\x3e \x3c!-- /ko --\x3e \x3c!-- /ko --\x3e \x3c!-- /ko --\x3e </div> </div> \x3c!-- /ko --\x3e","dx-masterDetail-editor-keyColumn":'<div class="criteria-operator-text dxd-filter-editor-text-color criteria-operator-item-field dxd-filter-editor-field-back-color dxd-state-no-hover stylized" data-bind="attr: { title: $data.getTitle() }, text: queryName"></div> <div class="criteria-operator-text dxd-filter-editor-text-color">.</div> <div class="criteria-operator-text dxd-filter-editor-text-color"> <div data-bind="service: { name: \'setColumn\' }"></div> </div>',"dx-masterDetail-editor-relation":'<div class="criteria-operator-group"> <div class="criteria-operator-group-item"> <div class="criteria-operator-action" data-bind="dxclick: function() { $parent.remove($data); }"> <div class="criteria-operator-action-image dx-image-filtereditor-remove">\x3c!-- ko template: \'dxrd-svg-filtereditor-remove\' --\x3e\x3c!-- /ko --\x3e</div> </div> <div class="criteria-operator-item" data-bind="visible: isEditable"> <div class="criteria-operator-item-editor" data-bind="dxTextBox: { value: relationName, onFocusOut: function() { isEditable(false); } }, focus: { on: isEditable }"></div> </div> <div class="criteria-operator-text dxd-filter-editor-text-color criteria-operator-item-value dxd-filter-editor-value-back-color" data-bind="visible: !isEditable()"> <div class="criteria-operator-text dxd-filter-editor-text-color clickable" data-bind="text: relationName, click: function() { isEditable(true); }"></div> </div> <div class="criteria-operator-action" data-bind="dxclick: create"> <div class="criteria-operator-action-image dx-image-filtereditor-add">\x3c!-- ko template: \'dxrd-svg-filtereditor-add\' --\x3e\x3c!-- /ko --\x3e</div> </div> </div> <div class="criteria-operator-content"> \x3c!-- ko foreach: keyColumns --\x3e <div class="criteria-operator-group"> <div class="criteria-operator-group-item"> <div class="criteria-operator-action" data-bind="dxclick: function() { $parent.remove($data); }"> <div class="criteria-operator-action-image dx-image-filtereditor-remove">\x3c!-- ko template: \'dxrd-svg-filtereditor-remove\' --\x3e\x3c!-- /ko --\x3e</div> </div> \x3c!-- ko template: { name: \'dx-masterDetail-editor-keyColumn\', data: master } --\x3e \x3c!-- /ko --\x3e <div class="criteria-operator-text dxd-filter-editor-text-color"> = </div> \x3c!-- ko template: { name: \'dx-masterDetail-editor-keyColumn\', data: detail } --\x3e \x3c!-- /ko --\x3e </div> </div> \x3c!-- /ko --\x3e </div> </div>',"dx-masterdetail-editor-setColumn":"<div class=\"criteria-operator-text dxd-filter-editor-text-color clickable criteria-operator-item-field dxd-filter-editor-field-back-color\" data-bind=\"text: target.column() || target.selectColumnText(), dxclick: showPopup, css: { 'dxd-state-selected': target.isSelected, 'default': !target.column() }\"></div>","dxqb-data-preview":'<div style="height: 100%" data-bind="dxdTableView: $data.value"></div>',"dxqb-popup":'<div data-bind="dxPopup: { animation: { show: { type: \'fade\', from: 0, to: 1, duration: 700 }, hide: { type: \'fade\', from: 1, to: 0, duration: 700 } }, wrapperAttr: { class: \'dxqb-preview\' }, visible: isVisible, title: title(), showTitle: true, resizeEnabled: true, shading: true, shadingColor: \'transparent\', fullScreen: false, width: 800, height: 544, container: container($element), position: { of: container($element) }, onHidden: function() { $data.data.value(null) }, focusStateEnabled: false }"> <div class="dxqb-preview-popup-content"> \x3c!-- ko if: data && !isLoading() --\x3e \x3c!-- ko template: { name: template, data: data } --\x3e \x3c!-- /ko --\x3e \x3c!-- /ko --\x3e \x3c!-- ko if: isLoading --\x3e <div style="text-align: center; padding-top: 25%;"> <div data-bind="dxLoadIndicator: { visible: true }"></div> </div> \x3c!-- /ko --\x3e </div> <div class="dxqb-preview-popup-buttons dxd-border-secondary"> <div class="dxqb-preview-popup-button" data-bind="dxButton: { text: okButtonText(), onClick: okButtonHandler, disabled: isLoading }"></div> </div> </div>',"dxqb-selectstatment-preview":'<div class="dxqb-show-query-string-content dx-widget"> \x3c!-- ko if: !aceAvailable --\x3e <div class="dxrd-show-query-string-editor" data-bind="dxTextArea: { value: value, valueChangeEvent: \'keyup\', readOnly: true }"></div> \x3c!-- /ko --\x3e \x3c!-- ko if: aceAvailable --\x3e <div class="dxrd-show-query-string-editor"> <div class="dxrd-show-query-string-editor-content"> <div class="dx-sql_editor dx-disabled-ace dxd-back-primary2" data-bind="dxAceEditor: { value: value, options: aceOptions, additionalOptions: additionalOptions }"></div> </div> </div> \x3c!-- /ko --\x3e </div>',"dxd-tableview":'<div class="dxd-tableview"> <div class="dxd-tableview-titles"> <table> <tbody> <tr> \x3c!-- ko foreach: rtl ? data.schema.reverse() : data.schema --\x3e <td data-bind="attr: { class: \'dxd-tableview-title-cell dxd-border-secondary dxd-tableview-resizable\' }"> <div class="dxd-tableview-cell-text dxd-qb-data-preview-cell-text-color dxd-text-info" data-bind="text: name"></div> </td> \x3c!-- /ko --\x3e </tr> </tbody> </table> </div> \x3c!-- ko if: data.values --\x3e <div class="dxd-tableview-data" data-bind="dxScrollView: { direction: \'both\', scrollByContent: false, showScrollbar: \'always\', scrollByThumb: true, bounceEnabled: false, useNative: false, onScroll: $data.onDataScroll, onInitialized: $data.onDataScrollInitialized }"> <table> <tbody> \x3c!-- ko foreach: data.values --\x3e <tr> \x3c!-- ko foreach: $parent.rtl ? $data.reverse() : $data --\x3e <td class="dxd-tableview-cell dxd-border-secondary"> \x3c!-- ko ifnot: $parents[1].isImage($index()) --\x3e <div data-bind="text: $data, attr: { class: \'dxd-tableview-cell-text dxd-text-primary dxd-tableview-resizable\' + $index() }"></div> \x3c!-- /ko --\x3e \x3c!-- ko if: $parents[1].isImage($index()) --\x3e \x3c!-- ko if: $parents[1].isImageTooLarge($data) --\x3e <div data-bind="text: $parents[1].getImageTooLargeText($data), attr: { class: \'dxd-tableview-cell-text dxd-text-primary dxd-tableview-resizable\' + $index() }"></div> \x3c!-- /ko --\x3e \x3c!-- ko ifnot: $parents[1].isImageTooLarge($data) --\x3e <div data-bind="attr: { class: \'dxd-tableview-cell-text dxd-text-primary dxd-tableview-resizable\' + $index() }"> <img data-bind="attr: { src: \'data:image/bmp;base64,\' + $data }" /> </div> \x3c!-- /ko --\x3e \x3c!-- /ko --\x3e </td> \x3c!-- /ko --\x3e </tr> \x3c!-- /ko --\x3e <tr class="dxd-tableview-data-fakerow"> \x3c!-- ko foreach: data.values[0] --\x3e <td class="dxd-tableview-cell dxd-border-secondary"> <div data-bind="attr: { class: \'dxd-tableview-cell-text dxd-text-primary dxd-tableview-resizable\' + $index() }"></div> </td> \x3c!-- /ko --\x3e </tr> </tbody> </table> </div> \x3c!-- /ko --\x3e \x3c!-- ko ifnot: data.values --\x3e <div class="dxd-tableview-empty-message" data-bind="text: noDataText()"></div> \x3c!-- /ko --\x3e </div>',"dxqb-fieldlist-wrapper":'<div id="tree" data-bind="treelist: treeListOptions" style="width:100%; height: 100%;"></div>',"dxqb-properties-wrapper":'<div class="dxrd-properties-wrapper" data-bind="visible: active() && visible()"> <div class="dxd-text-primary dxrd-properties-wrapper-full-height"> \x3c!-- ko with: model --\x3e <div class="dxrd-properties-grid dxd-border-primary" data-bind="dxScrollView: { showScrollbar: \'onHover\', useNative: false, scrollByThumb: true }" style="top: 0px;"> <div> \x3c!-- ko foreach: groups --\x3e <div class="dx-fieldset" data-bind="visible: visible"> <div class="dx-accordion" data-bind="dxdAccordion: { collapsed: collapsed }"> <div class="dxrd-group-header dx-accordion-header dxd-border-primary" data-bind="css: { \'dxrd-group-header-collapsed\': collapsed() }"> <div class="dx-collapsing-image" data-bind="template: \'dxrd-svg-collapsed\', css: { \'dx-image-expanded\': !collapsed() }" style="display:inline-block;"></div> <span class="dxrd-group-header-text" data-bind="text: displayName()"></span> </div> <div class="dx-accordion-content dxd-back-primary dxd-border-primary"> \x3c!-- ko ifnot: editorsCreated --\x3e <div class="dx-accordion-content-loading-panel"> <div data-bind="dxLoadIndicator: { visible: !editorsCreated() }"></div> </div> \x3c!-- /ko --\x3e \x3c!-- ko if: $data.editorsRendered() --\x3e <div data-bind="visible: editorsCreated"> <div class="dx-editors"> \x3c!-- ko foreach: editors --\x3e \x3c!-- ko template: editorTemplate --\x3e \x3c!-- /ko --\x3e \x3c!-- ko if: ($index() === $parent.editors().length - 1 && $parent.editorsCreated(true)) --\x3e \x3c!-- /ko --\x3e \x3c!-- /ko --\x3e </div> </div> \x3c!-- /ko --\x3e </div> </div> </div> \x3c!-- /ko --\x3e </div> </div> \x3c!-- /ko --\x3e </div> </div>',"dxqb-propertygrid":'\x3c!-- ko with: value --\x3e <div class="dx-fieldset dxqb-selected-properties"> \x3c!-- ko foreach: properties.getEditors() --\x3e \x3c!-- ko template: editorTemplate --\x3e \x3c!-- /ko --\x3e \x3c!-- /ko --\x3e </div> \x3c!-- /ko --\x3e',"dxqb-fieldspanel":'\x3c!-- ko with: value --\x3e <div data-bind="treeListSearchPanel: { controllers: $data.fieldListModel.treeListOptions().treeListController }"></div> <div class="dxqb-right-panel-fields" data-bind="dxScrollView: { showScrollbar: \'onHover\', scrollByContent: false, scrollByThumb: true, bounceEnabled: false, useNative: false }"> \x3c!-- ko template: { name: "dxqb-fieldlist-wrapper", data: fieldListModel } --\x3e \x3c!-- /ko --\x3e </div> \x3c!-- /ko --\x3e',"dxqb-parameterspanel":'\x3c!-- ko with: value --\x3e <div class="dxqb-right-panel-parameters" data-bind="dxScrollView: { showScrollbar: \'onHover\', scrollByContent: false, scrollByThumb: true, bounceEnabled: false, useNative: false }"> <div style="width: 100%" data-bind="dxCollectionEditor: $data"></div> </div> \x3c!-- /ko --\x3e',"dxqb-collectioneditor-template":'<div class="dxrd-accordion-collection-item" data-bind="dxdAccordion: { collapsed: collapsed }"> <div class="dxrd-group-header dx-accordion-header"> <div> <div class="propertygrid-editor-collapsed dx-collapsing-image" data-bind="css: { \'dx-image-expanded\': !collapsed() }, template: \'dxrd-svg-collapsed\'"></div> <div class="dx-group-header-font" data-bind="text: $root.getLocalization($parent.name), attr: { title: $root.getLocalization($parent.name) }"></div> </div> </div> <div class="dx-accordion-content"> <div data-bind="dxPropertyGrid: { target: value, level: 1, parentDisabled: editor.disabled }"></div> </div> </div>',"dxqb-properties-wrapper-editorlist":'<div class="dxrd-properties-wrapper" data-bind="visible: active() && visible()"> <div style="height:100%" class="dxd-text-primary"> \x3c!-- ko with: model --\x3e <div class="dxrd-properties-grid dxd-border-primary" data-bind="dxScrollView: { showScrollbar: \'onHover\', useNative: false, scrollByThumb: true }" style="top: 0px;"> <div class="dx-fieldset dxqb-selected-properties"> \x3c!-- ko foreach: getEditors() --\x3e \x3c!-- ko template: editorTemplate --\x3e \x3c!-- /ko --\x3e \x3c!-- /ko --\x3e </div> </div> \x3c!-- /ko --\x3e </div> </div>',"dxqb-toolbar":'<div class="dxrd-toolbar-wrapper dxd-toolbar-back-color" data-bind="click: $root.findControl"> <div class="dxqb-toolbar-background dxd-back-primary-invariant"></div> <div class="dxrd-toolbar" data-bind="template: {name: \'dxqb-toolbar-items\', data: actionLists.toolbarItems }"></div> </div>',"dxqb-toolbar-items":'\x3c!-- ko foreach: $data --\x3e \x3c!-- ko if: $data.templateName --\x3e \x3c!-- ko template: templateName --\x3e \x3c!-- /ko --\x3e \x3c!-- /ko --\x3e \x3c!-- ko if: !$data.templateName --\x3e <div class="dxrd-toolbar-item" data-bind="visible: visible"> <div class="dxqb-toolbar-item-container"> <div class="dxqb-toolbar-item-background dxd-back-secondary"></div> <div data-bind="template: {name: ko.unwrap($data.imageTemplateName), if: !!ko.unwrap($data.imageTemplateName)}, attr: { class: \'dxrd-toolbar-item-image dxd-icon-highlighted dxd-state-normal \' + (ko.unwrap($data.imageClassName) || \'\'), title: $data.displayText && $data.displayText() || text }, dxclick: function() { if((typeof $data.disabled === \'function\') && !disabled() || !disabled) { clickAction($root.model && $root.model()); } }, css: {\'dxrd-disabled-button\': disabled, \'dxd-state-active\': $data.selected }"> </div> </div> <div class="dxrd-toolbar-item-separator dxd-toolbar-separator-color dxd-border-secondary" data-bind="visible: $data.hasSeparator"></div> </div> \x3c!-- /ko --\x3e \x3c!-- /ko --\x3e',"dxqb-property-editor":'<div class="dxrd-editor" data-bind="visible: visible"> <div class="dxrd-editor-header"> <div class="dx-field dxd-back-primary"> <div class="dx-field-label dxd-text-primary"> <div class="propertygrid-editor-displayName" data-bind="text: displayName, attr: { \'title\': displayName }"></div> </div> <div class="dx-field-value"> <div data-bind="service: { name: \'createEditorAddOn\' }"></div> \x3c!-- ko lazy: { template: templateName } --\x3e \x3c!-- /ko --\x3e </div> </div> </div> </div>',"dxqb-expressionstring":'\x3c!-- ko if: $data.value() --\x3e <div data-bind="dxExpressionEditor: getOptions({ options: value, fieldListProvider: $root.parametersBindingsProvider, displayNameProvider: $root.displayNameProvider && $root.displayNameProvider() })"></div> \x3c!-- /ko --\x3e',"dxqb-filtereditor-changeparameter":'<div class="criteria-operator-item" data-bind="visible: target.isEditable"> <div class="criteria-operator-item" data-bind="dxTextBox: { value: target._parameterName, onFocusOut: function() { target.createParameter(); target.isEditable(false); } }"></div> </div> <div class="criteria-operator-text dxd-filter-editor-text-color clickable " data-bind="text: target.parameterName, dxclick: showPopup, css: { \'dxd-state-selected\': target.isSelected, \'default\': target.isDefaultTextDisplayed() }, visible: $data.target.isEditable() === false"></div>',"dxqb-filtereditor-propertiespopup":'<div class="dx-widget" data-bind="dxScrollView: { showScrollbar: \'onHover\' }"> \x3c!-- ko foreach: data --\x3e <div data-bind="dxdAccordion: { collapsed: collapsed }"> <div class="dx-accordion-header"> <div class="dx-filtereditor-popup-item dxd-list-item-back-color dx-item dx-list-item dxd-back-highlighted"> <div class="dx-collapsing-image" data-bind="template: \'dxrd-svg-collapsed\', css: { \'dx-image-expanded\': !collapsed() }" style="display:inline-block; margin-left: 5px;"></div> <span class="dx-item-content dx-list-item-content" style="padding-left: 17px" data-bind="text: name"></span> </div> </div> <div class="dx-accordion-content dxd-back-primary"> \x3c!-- ko foreach: items --\x3e <div class="dx-filtereditor-popup-item dx-item dx-list-item dxd-list-item-back-color dxd-back-highlighted"> <span class="dx-item-content dx-list-item-content" style="padding-left: 17px" data-bind="text: name, attr: { \'title\': name }, click: function() { $parents[1].click($data); }"></span> </div> \x3c!--/ko --\x3e </div> </div> \x3c!--/ko --\x3e </div>',"dxqb-filtereditor-parameterspopup":'<div class="dx-widget" data-bind="dxScrollView: { showScrollbar: \'onHover\' }"> \x3c!-- ko if: $parent.viewModel.canCreateParameters --\x3e <div class="dx-filtereditor-popup-item dx-item dx-list-item dxd-list-item-back-color dxd-back-highlighted"> <span class="dx-item-content dx-list-item-content" data-bind="text: $parent.viewModel.defaultDisplay(), click: function() { $parent.viewModel.isEditable(true); $parent.viewModel._parameterName(\'\'); $parent.visible(false); }"></span> </div> \x3c!-- /ko --\x3e \x3c!-- ko foreach: data --\x3e <div class="dx-filtereditor-popup-item dx-item dx-list-item dxd-list-item-back-color dxd-back-highlighted"> <span class="dx-item-content dx-list-item-content" data-bind="text: name, click: function() { $parent.click($data); } "></span> </div> \x3c!-- /ko --\x3e </div>',"dxqb-treelist-item-with-search":'<div data-bind="visible: visible"> \x3c!-- ko template: "dxqb-treelist-header-item-with-search" --\x3e \x3c!-- /ko --\x3e </div>',"dxqb-treelist-header-item-with-search":'<div class="dx-treelist-item dxd-list-item-back-color dxd-back-highlighted" data-bind="event: { dblclick: function() { $data.dblClickHandler ? $data.dblClickHandler($data) : $data.toggleCollapsed() } }, styleunit: padding, css: { \'dx-treelist-item-selected dxd-state-selected\': isSelected() || isMultiSelected() }"> <div class="dx-treelist-collapsedbutton"></div> <div class="dx-treelist-caption"> <div class="dx-treelist-selectedcontent" data-bind="click: toggleSelected, draggable: isDraggable ? dragDropHandler : null"> <div class="dx-treelist-image" data-bind="css: $data.imageClassName, template: {name: $data.imageTemplateName, if: !!ko.unwrap($data.imageTemplateName)}, attr: { title: text }"> </div> \x3c!-- ko template: { name: \'dx-treelist-item-text-content\' } --\x3e \x3c!-- /ko --\x3e </div> </div> </div>',"dxrd-page-choose-datasource-type":"<div class=\"dxrd-wizard-type-page\" data-bind=\"css: $data._extendCssClass('type-page')\"> \x3c!-- ko foreach: typeItems --\x3e \x3c!-- ko template: 'dxrd-page-choose-type-item' --\x3e \x3c!-- /ko --\x3e \x3c!-- /ko --\x3e </div>","dxrd-page-choose-type-item":"<div data-bind=\"event: { click: $parent._itemClick, dblclick: function() { $parent._goToNextPage() } }, attr: { class: 'dxd-back-highlighted dxd-state-normal dxrd-wizard-type-item dx-fontsize-reestablished dxrd-wizard-type-item-border-color dxd-list-item-back-color ' + $parent._extendCssClass('type-item')}, css: { 'dxd-border-secondary dxd-back-secondary': $parent._IsSelected($data) } \"> <div data-bind=\"attr: { class: 'dxrd-wizard-type-image ' + $parent._extendCssClass('type-image') }, css: imageClassName, template: imageTemplateName\"> </div> \x3c!-- ko if: !!$parent._textToSearch --\x3e <div class=\"dxrd-wizard-type-text\" data-bind=\"searchHighlighting: { text: text, textToSearch: $parent._textToSearch }, attr: { title: text }, css: $parent._extendCssClass('type-text')\"></div> \x3c!-- /ko --\x3e \x3c!-- ko ifnot: !!$parent._textToSearch --\x3e <div class=\"dxrd-wizard-type-text\" data-bind=\"text: text, attr: { title: text }, css: $parent._extendCssClass('type-text')\"></div> \x3c!-- /ko --\x3e </div>","dxrd-wizard-add-federated-queries-page":'<div class="dxrd-wizard-page dxrd-wizard-add-federation-queries-page dxrd-wizard-page-treelist-accordion-style"> <div data-bind="treeListSearchPanel: {controllers: ko.unwrap(_fieldListModel).treeListController}"></div> <div class="dxrd-wizard-dataMember dxd-border-secondary" data-bind="dxScrollView: { showScrollbar: \'onHover\', height: _scrollViewHeight }"> <div class="dxrd-wizard-dataMember-treelist" data-bind="treelist: _fieldListModel" style="width:100%; height: 100%;"></div> </div> \x3c!-- ko template: { name: $data._queriesPopupHelper.template, data: _queriesPopupHelper } --\x3e \x3c!-- /ko --\x3e <div class="dxrd-wizard-load-panel dxd-text-primary" data-bind="dxLoadPanel: _loadPanelViewModel($element)"> </div> </div>',"dx-treelist-federation-action-with-popover":"<div class=\"dx-treelist-action-with-popover\" style=\"display: inline-block\"> <div class=\"dx-treelist-action\" data-bind=\"dxButtonWithTemplate: { onClick: function() { clickAction($parent); }, icon: $data.imageTemplateName, iconClass: $data.imageClassName , disabled: $data.disabled && $data.disabled() }, attr: { title: text }\"></div> \x3c!-- ko template: { name: 'dx-popover-list-items', data: ko.utils.extend($parent.data, { className: 'dxrd-federation-addqueries-popover', position: $root.rtl ? 'right' : 'left', popupContainer: $root.getPopupContainer, width: 150 }) }--\x3e \x3c!-- /ko --\x3e </div>","dxrd-querybuilder-select-popup-content":'<div class="dxrd-federation-result-grids dxrd-federation-data-container-column"> <div class="dxd-border-secondary dxrd-select-querybuilder-surface" data-bind="resizable: gridResizeHelper.resizable($root.resizeHandler, \'s\')"> <div style="height:100%;" data-bind="dxQueryBuilderSurface: queryBuilderSurfaceCreator"></div> </div> <div class="dx-accordion dxd-border-secondary dxrd-select-result-alias-grid" data-bind="dxdAccordion: { collapsed: joinResultCollapsed }"> <div class="dxd-back-secondary dx-accordion-header dxd-text-primary"> <div class="dx-collapsing-image" data-bind="template: \'dxrd-svg-collapsed\', css: { \'dx-image-expanded\': !joinResultCollapsed() }" style="display:inline-block;"></div> <span class="dxrd-group-header-text" data-bind="text: $root.getLocalization(\'Join result\', \'DataAccessUIStringId.FederationDataSourceQueryBuilder_SelectResult\')"></span> </div> <div class="dx-accordion-content dxd-border-secondary" data-bind="style: { height: resultGridHeight }"> <div class="dxrd-federation-action-add dxrd-collectioneditor-action" data-bind="dxButton: { icon: \'add\', disabled: addRowDisabled, onClick:addRow }"></div> <div data-bind="dxDataGrid: columnsGrid"></div> </div> </div> </div>',"dxrd-querybuilder-column-combobox-masked":'<div class="dxrd-querybuilder-column-container dxrd-querybuilder-column-container-masked"> <div class="dxrd-querybuilder-column-data"> <div class="dx-texteditor-input" data-bind="text: cellInfo.column"></div> </div> <div class="dxrd-querybuilder-column-editorswitch"> \x3c!-- ko template: { name: \'dx-wizard-menu-box-editorswitch\', data: $data } --\x3e \x3c!-- /ko --\x3e </div> </div>',"dxrd-querybuilder-column-combobox":"<div class=\"dxrd-querybuilder-column-container dxrd-querybuilder-column-container-full\"> <div class=\"dxrd-querybuilder-column-data\"> <div class=\"dx-texteditor-input dx-padding-none\" data-bind=\"dxDropDownBox: { dataSource: $data.allColumns, dropDownOptions: { container: $root.getPopupContainer($element), width: $root.calculateWithZoomFactor(357) }, popupPosition: { boundary: $root.getPopupContainer($element) }, value: cellInfo.key, valueExpr: 'key', displayExpr: 'column' }, visible: !$data.isExpression()\"> <div data-bind=\"dxDataGrid: { dataSource: $data.allColumns, keyExpr: 'key', remoteOperations: true, height: $root.calculateWithZoomFactor(250), columns: [{ dataField: 'column', sortOrder: 'asc' } , { dataField: 'table'}], hoverStateEnabled: true, selection: { mode: 'single' }, selectedRowKeys: [cellInfo.key], focusedRowEnabled: true, focusedRowKey: cellInfo.key, onSelectionChanged: $data.changeColumn } \"></div> </div> <div class=\"dx-texteditor-input dx-padding-none\" data-bind=\"dxExpressionEditor: { options: expression, fieldListProvider: itemsProvider, displayNameProvider: $root.displayNameProvider && $root.displayNameProvider() }, visible: $data.isExpression\"></div> </div> <div class=\"dxrd-querybuilder-column-editorswitch\"> \x3c!-- ko template: { name: 'dx-wizard-menu-box-editorswitch', data: $data } --\x3e \x3c!-- /ko --\x3e </div> </div>","dxrd-querybuilder-transform-popup-content":'<div class="dxrd-federation-result-grids dxrd-federation-data-container-column"> <div class="dx-accordion dxd-border-secondary dxrd-transform-source-grid dxrd-result-source-grid"> <div class="dxd-back-secondary dx-accordion-header dxd-text-primary"> <span class="dxrd-group-header-text" data-bind="text: $data.transformGridTitle"></span> </div> <div class="dx-accordion-content dxd-border-secondary"> <div class="dxd-border-primary dxrd-transform-source-grid dxrd-result-source-grid" data-bind="dxDataGrid: transformGrid"></div> </div> </div> <div class="dx-accordion dxd-border-secondary dxrd-transform-result-grid" data-bind="dxdAccordion: { collapsed: transformResultCollapsed }"> <div class="dxd-back-secondary dx-accordion-header dxd-text-primary"> <div class="dx-collapsing-image" data-bind="template: \'dxrd-svg-collapsed\', css: { \'dx-image-expanded\': !transformResultCollapsed() }" style="display:inline-block;"></div> <span class="dxrd-group-header-text" data-bind="text: $data.transformResultGridTitle"></span> </div> <div class="dx-accordion-content dxd-border-secondary"> <div data-bind="dxScrollView: { showScrollbar: \'onHover\' }"> <div data-bind="treelist: resultFieldListModel" style="width:100%; height: 100%;"></div> </div> </div> </div> </div>',"dxrd-querybuilder-transform-checkbox":'<div class="dxrd-querybuilder-transform-checkbox" data-bind="dxCheckBox: transform"></div>',"dxrd-querybuilder-federation-popup":'<div data-bind="dxPopup: { showTitle: true, title: title(), wrapperAttr: { class: cssClass }, visible: popupVisible, toolbarItems: buttonItems, showCloseButton: true, fullScreen: false, maxHeight: maxHeight, height: height, width: width, onShowing: function(e) { $data.loaded(true); }, rtlEnabled: rtl, onHiding: onHiding, container: getPopupContainer($element), position: { of: getPopupContainer($element)}, resizeEnabled: true, minHeight: 450, minWidth: 650 }"> <div class="dxrd-querybuilder-federation-popup"> \x3c!-- ko if: popupVisible --\x3e \x3c!-- ko if: loaded --\x3e <div class="dxrd-federation-treelist-wrapper dxd-border-secondary" data-bind="resizable: resizeHelper.resizable($root.resizeHandler, \'e\')"> <div class="dxrd-federation-treelist" data-bind="dxScrollView: { showScrollbar: \'onHover\' }"> <div data-bind="treelist: fieldListModel" style="width:100%; height: 100%;"></div> </div> </div> <div class="dxrd-federation-data-container"> \x3c!-- ko template: { name: popupContentTemplate } --\x3e \x3c!-- /ko --\x3e </div> \x3c!-- /ko --\x3e \x3c!-- /ko --\x3e </div> </div>',"dxrd-querybuilder-union-popup-content":'<div class="dxrd-federation-result-grids dxrd-federation-data-container-column"> <div class="dxd-border-secondary dxrd-union-result-source-grid dxrd-result-source-grid" data-bind="dxDataGrid: sourcesGrid"></div> <div class="dxd-border-secondary dxrd-union-result-alias-grid"> <div data-bind="dxDataGrid: aliasGrid"></div> </div> </div>',"dx-wizard-fullscreen":'\x3c!-- ko if: $data && $data.isVisible() --\x3e <div class="dx-fullscreen-wizard dx-editors" data-bind="css: { \'dx-rtl\': $root.rtl, \'dx-ltr\': !$root.rtl }"> <div class="dxrd-wizard dxrd-report-wizard dx-editors dxd-text-primary dxd-back-primary2" data-bind="css: _extendCssClass"> <div class="dxrd-wizard-steps-container dxd-back-primary" data-bind="visible: $data.navigationPanel().isVisible"> <div class="dxrd-wizard-title dxd-border-primary" data-bind="text: _description(), attr: {\'title\': _description() }"></div> \x3c!-- ko with: navigationPanel --\x3e <div class="dxrd-wizard-steps" data-bind="foreach: _steps"> <div class="dxrd-wizard-steps-relative" style="position:relative" data-bind="visible: $data.visible"> <div class="dxrd-wizard-steps-content" data-bind="click: $data.clickAction, text: $data.text, attr: {\'title\': $data.text }, css: { \'dxrd-disabled\': $data.disabled, \'dxd-back-secondary\': $data.isActive() }"></div> <div class="dxrd-wizard-steps-marker dxd-back-primary2" data-bind="visible: $data.isActive"></div> </div> </div> \x3c!-- /ko --\x3e </div> <div class="dxrd-wizard-content" data-bind="css: { \'withoutPanel\': !$data.navigationPanel().isVisible() }"> <div class="dxrd-wizard-part-description dxd-back-contrast"> <div class="dxrd-wizard-part-description-text dxd-text-primary dxd-border-primary" data-bind="text: _pageDescription()"></div> </div> \x3c!-- ko with: _currentPage --\x3e <div class="dxrd-wizard-work-content"> <div class="dxrd-wizard-work-content-relative"> <div data-bind="template: { name: template, data: page } "></div> </div> </div> \x3c!-- /ko --\x3e <div class="dxrd-wizard-load-panel dxd-text-primary" data-bind="dxLoadPanel: _loadPanelViewModel($element)"> </div> <div class="dxrd-wizard-navigation"> <div data-bind="dxButton: cancelButton" class="dxrd-wizard-btn left"></div> <div data-bind="dxButton: finishButton" class="dxrd-wizard-btn right"></div> <div data-bind="dxButton: nextButton" class="dxrd-wizard-btn right"></div> <div data-bind="dxButton: previousButton" class="dxrd-wizard-btn right"></div> </div> </div> </div> </div> \x3c!-- /ko --\x3e',"dx-wizard-fullscreen-page":'\x3c!-- ko if: $data._sections.length > 0 --\x3e <div style="position:absolute;" data-bind="foreach: _sections, css: _className, styleunit: { top: _parentMarginOffset, left: _parentMarginOffset, right: _parentMarginOffset, bottom: _parentMarginOffset }"> <div class="dx-border-inheritor dxd-border-accented"> <div class="dxrd-report-page-tile dxd-border-secondary" data-bind="css: { \'dxrd-disabled\': !$data.page() }, style: $parent._pageCss[$data.pageId]"> <div class="dxrd-report-page-tile-title" data-bind="visible: $parent._showPageDescription(), text: $parent._getPageDescription($index(), $data), attr: { title: $parent._getPageDescription($index(), $data) }"></div> \x3c!-- ko if: $data.page() !== null --\x3e \x3c!-- ko with: page --\x3e <div class="dxrd-report-page-tile-content" data-bind="template: { name: $parent.metadata.template, data: page }, dxScrollView: { showScrollbar: \'onHover\'}"></div> \x3c!-- /ko --\x3e \x3c!-- /ko --\x3e \x3c!-- ko if: $data.page() === null --\x3e <div class="dxrd-report-page-tile-content dx-default-border-style dxd-border-secondary"> <div class="dxrd-wizard-page dxrd-wizard-disabled-content" data-bind="text: metadata.disabledText"></div> </div> \x3c!-- /ko --\x3e </div> </div> </div> \x3c!-- /ko --\x3e',"dxrd-jsondatasource-fields-page":'<div class="dxrd-wizard-page dx-jsonschema-page dx-frameless-style"> <div class="dx-default-border-style dxd-border-secondary dxrd-wizard-dataMember dx-fieldset" style="height:100%"> <div class="dx-field"> <div class="dx-field-label" data-bind="text: _rootElementTitle"></div> <div class="dx-field-value" data-bind="dxSelectBox: { dataSource: _rootElementList, value: _selectedRootElement, displayExpr: \'fullPath\', displayCustomValue: true, useItemTextAsTitle: true, dropDownOptions: { container: $root.getPopupContainer($element) } }"></div> </div> <div class="dxrd-wizard-add-queries-page dxrd-wizard-page-treelist-accordion-style dxd-border-secondary" data-bind="dxScrollView: { showScrollbar: \'onHover\' }"> <div data-bind="treelist: _fieldListModel" style="width:100%; height: 100%;"></div> </div> </div> </div>',"dxrd-page-jsonsource":'<div class="dxrd-wizard-page dx-jsonsource-page dx-frameless-style"> <div class="dx-default-border-style dxd-border-secondary dxrd-wizard-dataMember dx-fieldset" style="height: 100%" data-bind="dxScrollView: { showScrollbar: \'onHover\', useNative: false, scrollByThumb: true }, dxValidationGroup: $data._validationGroup || {}"> <div class="dx-field"> <div class="dx-property-required dx-field-label" data-bind="text: _jsonConnectionTitle, attr: { \'title\': _jsonConnectionTitle }"></div> <div class="dx-field-value" data-bind="dxTextBox: { value: _connectionName }, dxValidator: { validationRules: $data._connectionNameValidationRules || [] }"></div> </div> <div class="dx-field"> <div class="dx-field-label" data-bind="text: _jsonSourceTitle, attr: { \'title\': _jsonSourceTitle }"></div> <div class="dx-field-value" data-bind="dxLocalizedSelectBox: { dataSource: _sources, value: _selectedSource, valueExpr:\'value\', displayExpr: \'displayValue\', displayCustomValue: true, dropDownOptions: { container: $root.getPopupContainer($element) } }"></div> </div> \x3c!-- ko with: _selectedSource --\x3e <div data-bind="dxValidationGroup: $data.validationGroup || {}"> <div data-bind="css: $data.cssClass"> \x3c!-- ko template: { name: \'dx-propertieseditor\', data: grid } --\x3e \x3c!-- /ko --\x3e </div> <div class="dxrd-wizard-validationsummary" data-bind="dxValidationSummary: $data.validationSummary || {}, visible: $data.validationSummary && !isValid()"></div> </div> \x3c!-- /ko --\x3e <div class="dxrd-wizard-validationsummary" data-bind="dxValidationSummary: $data._validationSummary || {}, visible: $data._validationSummary && _selectedSource().validationSummary && !canNext()"></div> </div> </div>',"dx-property-json-string-editor":'<div class="dx-field" data-bind="visible: visible"> \x3c!-- ko template: templateName --\x3e \x3c!-- /ko --\x3e </div>',"dxrd-page-dataSource":'<div class="dxrd-wizard-page"> \x3c!-- ko if: isDataSourceCreationAvailable --\x3e <div class="dxrd-wizard-datasourceoperation dxrd-radio-nowrap-ellipsis" data-bind="dxRadioGroup: { value: selectedDataSourceOperation, items: dataSourceOperations, layout: \'vertical\' }"> <div data-options="dxTemplate : { name: \'item\' }"> <div class="dxrd-radio-nowrap-ellipsis-text" data-bind="text: text, attr: { \'title\': text }"></div> </div> </div> \x3c!-- /ko --\x3e <div class="dxrd-wizard-availabledatasources dx-default-border-style dxd-border-secondary"> <div class="dxrd-wizard-list" data-bind="dxList: { dataSource: availableDataSources, selectedItems: selectedDataSource, focusStateEnabled:false, editEnabled: true, height: dataSourcesListHeight, editConfig: { selectionEnabled: false }, selectionMode: \'single\', activeStateEnabled: false, disabled: createNewDataSource, noDataText: $root.dx._static.noDataText(), encodeNoDataText: true }"> <div data-options="dxTemplate : { name: \'item\' }"> <div data-bind="text: name"></div> </div> </div> </div></div>',"dxrd-page-selectitems":"<div class=\"dxrd-wizard-page\"> \x3c!-- ko template: { name: 'dxrd-page-selectitems-radio-group', data: $data } --\x3e \x3c!-- /ko --\x3e \x3c!-- ko template: { name: 'dxrd-page-selectitems-list', data: $data } --\x3e \x3c!-- /ko --\x3e </div>","dxrd-page-selectitems-radio-group":'\x3c!-- ko if: canCreateNew --\x3e <div class="dxrd-wizard-datasourceoperation dxrd-radio-nowrap-ellipsis" data-bind="dxRadioGroup: { value: selectedOperation, items: operations, layout: \'vertical\' }"> <div data-options="dxTemplate : { name: \'item\' }"> <div class="dxrd-radio-nowrap-ellipsis-text" data-bind="text: text, attr: { \'title\': text }"></div> </div> </div> \x3c!-- /ko --\x3e',"dxrd-page-selectitems-list":'<div class="dxrd-wizard-availabledatasources dx-default-border-style dxd-border-secondary" data-bind="styleunit: { top: $data.canCreateNew() ? 65 : 0 }"> <div class="dxrd-wizard-list dxd-border-primary" data-bind="dxList: { dataSource: items, onSelectionChanged: function(e) { selectedItems(e.addedItems) }, selectedItems: selectedItems.peek(), hoverStateEnabled:false, editEnabled: true, height: \'100%\', editConfig: { selectionEnabled: false }, searchExpr: \'name\', searchEnabled: true, selectionMode: \'single\', activeStateEnabled: false, disabled: _createNew, noDataText: $root.dx._static.noDataText(), encodeNoDataText: true, searchEditorOptions: { placeholder: $root.dx._static.searchPlaceholder() } }"> <div data-options="dxTemplate : { name: \'item\' }" data-bind="event: { dblclick: function(e){ $parent.onDblClick() } }"> <div data-bind="text: $parent._displayExpr($data)"></div> </div> </div> </div>',"dxrd-page-specify-connection":"<div class=\"dxrd-wizard-page\"> \x3c!-- ko template: { name: 'dxrd-page-selectitems-radio-group', data: $data } --\x3e \x3c!-- /ko --\x3e \x3c!-- ko if: !_createNew() --\x3e \x3c!-- ko template: { name: 'dxrd-page-selectitems-list', data: $data } --\x3e \x3c!-- /ko --\x3e \x3c!-- /ko --\x3e \x3c!-- ko if: _createNew --\x3e <div class=\"dxrd-page-specify-connection_createNew\"> \x3c!-- ko template: { name: 'dxrd-page-jsonsource', data: _specifySourceData } --\x3e \x3c!-- /ko --\x3e </div> \x3c!-- /ko --\x3e</div>","dx-jsonwizard-parametercollection":'<div class="dx-field"> \x3c!-- ko with: value --\x3e <div class="dx-jsonwizard-parameter-left-container"> <div class="dx-jsonwizard-parameter"> <div data-bind="dxLocalizedSelectBox: { dataSource: _parameterTypes, value: itemType, valueExpr:\'value\', displayExpr: \'displayValue\', displayCustomValue: true, dropDownOptions: { container: $root.getPopupContainer($element) } }"></div> </div> </div> <div class="dx-jsonwizard-parameter-middle-container"> <div data-bind="dxTextBox: { value: name, placeholder: $data.namePlaceholder() }, dxValidator: { validationRules: $parent.editor.editorOptions.nameValidationRules || [] }"></div> </div> <div class="dx-jsonwizard-parameter-right-container"> <div class="dx-jsonwizard-parameter"> <div data-bind="dxTextBox: { value: _editingValue, placeholder: $data.valuePlaceholder() }, visible: !$data.isExpression()"></div> <div data-bind="dxExpressionEditor: { options: _expression, fieldListProvider: $parent.editor.editorOptions.itemsProvider, displayNameProvider: $root.displayNameProvider && $root.displayNameProvider() }, visible: $data.isExpression"></div> </div> </div> \x3c!-- ko template: { name: \'dx-wizard-menu-box-editorswitch\', data: $data } --\x3e \x3c!-- /ko --\x3e \x3c!-- /ko --\x3e </div>',"dx-jsonwizard-loadfile-editor":"<div data-bind=\"dxFileImagePicker: { value: value, placeholderId: 'File', accept:'.json,.txt' }\"></div>","dx-jsonwizard-jsonstring-editor":'\x3c!-- ko if: !aceAvailable --\x3e <div class="dxrd-jsonwizard-jsonstring-editor dxd-border-secondary dxd-back-primary2" data-bind="dxTextArea: { value: value, spellcheck: false, isValid: isValid }, dxValidator: $data.validator || { validationRules: jsonStringValidationRules || [] }"></div> \x3c!-- /ko --\x3e \x3c!-- ko if: aceAvailable --\x3e <div class="dx-texteditor dx-editor-outlined dxrd-jsonwizard-jsonstring-editor dxd-wizard-jsoneditor dxd-border-secondary dxd-back-primary2" data-bind="dxAceEditor: { value: value, editorContainer: editorContainer, options: aceOptions, additionalOptions: additionalOptions }, css: { \'dx-invalid\' : !value() || !isValid() }"></div> \x3c!-- /ko --\x3e <div class="dxd-upload-file"> <div class="dxd-back-primary2"></div> <div data-bind="dxButtonWithTemplate: { onClick: uploadFile, hint: $data.getUploadTitle(), icon: \'dxrd-svg-wizard-Download\' }"></div> </div>',"dxrd-wizard-add-queries-page":'<div class="dxrd-wizard-page dxrd-wizard-add-queries-page dxrd-wizard-page-treelist-accordion-style"> <div data-bind="treeListSearchPanel: {controllers: ko.unwrap(_fieldListModel).treeListController}"></div> <div class="dxrd-wizard-dataMember dxd-border-secondary" data-bind="dxScrollView: { showScrollbar: \'onHover\', height: _scrollViewHeight }"> <div data-bind="treelist: _fieldListModel" style="width:100%; height: 100%;"></div> </div> \x3c!-- ko ifnot: $data.disableCustomSql --\x3e \x3c!-- ko template: { name: \'dxqb-popup-selectStatment\', data: _popupSelectStatement } --\x3e \x3c!-- /ko --\x3e \x3c!-- /ko --\x3e \x3c!-- ko template: { name: \'dxrd-querybuilder-popup\', data: _popupQueryBuilder } --\x3e \x3c!-- /ko --\x3e <div class="dxrd-wizard-load-panel dxd-text-primary" data-bind="dxLoadPanel: _loadPanelViewModel($element)"> </div> </div>',"dxd-custom-query-treelisitem":'<div data-bind="visible: visible"> <div class="dx-background-inheritor dxd-back-highlighted dxd-state-selected"> <div class="dx-treelist-item dx-fontsize-reestablished dxd-list-item-back-color" data-bind=" styleunit: padding, css: { \'dx-treelist-item-selected dxd-state-selected dxd-back-secondary\': isSelected }"> <div class="dx-treelist-collapsedbutton" data-bind="css: nodeImageClass"></div> <div class="dx-treelist-caption"> \x3c!-- ko if: actions && actions.length > 0 --\x3e <div class="dx-treelist-action-container" data-bind="visible: isSelected() || isHovered()"> \x3c!-- ko foreach: actions --\x3e \x3c!-- ko if: $data.templateName --\x3e \x3c!-- ko template: templateName --\x3e \x3c!-- /ko --\x3e \x3c!-- /ko --\x3e \x3c!-- ko if: !$data.templateName --\x3e <div class="dx-treelist-action" data-bind="dxButtonWithTemplate: { onClick: function() { clickAction($parent); }, icon: $data.imageTemplateName, iconClass: $data.imageClassName, disabled: $data.disabled && $data.disabled() }, attr: { title: text }"></div> \x3c!-- /ko --\x3e \x3c!-- /ko --\x3e </div> \x3c!-- /ko --\x3e <div class="dx-treelist-selectedcontent" data-bind="click: toggleSelected"> <div class="dx-treelist-text-wrapper"> <div class="dx-add-queries-page-checkbox" data-bind="dxCheckBox: { value: data.checked }, click: function(treeNode, e) { treeNode.data.toggleChecked(); e.stopPropagation(); return true; }"></div> <div class="dx-treelist-text dx-treelist-text-with-checkbox"> <div class="dx-queryname-textbox" data-bind="dxTextBox: { value: queryName }"></div> </div> </div> </div> </div> </div> </div> </div>',"dxrd-configure-query-parameters-page":'<div class="dxrd-wizard-page dxrd-configure-query-parameters-page dxrd-wizard-page-treelist-accordion-style"> <div class="dxrd-wizard-dataMember dxd-border-secondary" data-bind="dxScrollView: { showScrollbar: \'onHover\', height: _scrollViewHeight }"> \x3c!-- ko if: !!$data._fieldListModel() --\x3e <div data-bind="treelist: _fieldListModel" style="width:100%; height: 100%;"></div> \x3c!-- /ko --\x3e </div> </div>',"dxrd-wizard-configure-relations-page":"<div class=\"dxrd-wizard-page dxrd-wizard-configure-relations-page\"> \x3c!-- ko if: $data._relationsEditor() --\x3e \x3c!-- ko template: { name: 'dxrd-masterDetail-editor-complete-wizard', data: $data._relationsEditor }--\x3e \x3c!-- /ko --\x3e \x3c!-- /ko --\x3e </div>","dxrd-masterDetail-editor-complete-wizard":"<div class=\"dx-filtereditor dxrd-masterDetail-editor-complete-wizard dxd-border-secondary\"> \x3c!-- ko if: $data --\x3e <div class=\"dx-filtereditor-tree dxd-border-secondary\" data-bind=\"dxScrollView: { showScrollbar: 'onHover', direction: 'both' }\" style=\"cursor: default\"> \x3c!-- ko foreach: masterQueries --\x3e <div class=\"criteria-operator-group\"> <div class=\"criteria-operator-group-item\"> <div class=\"criteria-operator-text dxd-filter-editor-text-color criteria-operator-item-group dxd-filter-editor-group-back-color stylized\" data-bind=\"text: queryName\"></div> <div data-bind=\"service: { name: 'createRelation' }\"></div> </div> <div class=\"criteria-operator-content\"> \x3c!-- ko template: { name: 'dx-masterDetail-editor-relation', foreach: relations }--\x3e \x3c!-- /ko --\x3e </div> </div> \x3c!-- /ko --\x3e </div> <div class=\"dx-selectbox-popup-wrapper dx-dropdownlist-popup-wrapper dx-filtereditor-criteriaoperator-popup dx-dropdowneditor-overlay\" data-bind=\"dxPopupWithAutoHeight: { height: '235px', focusStateEnabled: false, position: $root.rtl ? { my: 'right top', at: 'right bottom', of: popupService.target, collision: 'flipfit' } : { my: 'left top', at: 'left bottom', of: popupService.target, collision: 'flipfit' }, wrapperAttr: { class: 'dx-selectbox-popup-wrapper dx-dropdownlist-popup-wrapper dx-filtereditor-criteriaoperator-popup dx-dropdowneditor-overlay' }, container: $root.getPopupContainer($element), target: popupService.target, showTitle: false, showCloseButton: false, animation: {}, hideOnOutsideClick: true, shading: false, minWidth:'170px', maxWidth:'500px', width: 'auto', visible: popupService.visible }\"> \x3c!-- ko with: popupService--\x3e \x3c!-- ko with: data --\x3e \x3c!-- ko template: template--\x3e \x3c!-- /ko --\x3e \x3c!-- /ko --\x3e \x3c!-- /ko --\x3e </div> \x3c!-- /ko --\x3e </div>","dxqb-popup-selectStatment":'<div data-bind="dxPopup: { animation: { show: { type: \'fade\', from: 0, to: 1, duration: 700 }, hide: { type: \'fade\', from: 1, to: 0, duration: 700 } }, wrapperAttr: { class: \'dxqb-preview\' }, visible: isVisible, title: title(), showTitle: true, resizeEnabled: true, shading: true, shadingColor: \'transparent\', fullScreen: false, width: 800, height: 544, container: closest($element, \'.dxrd-wizard\'), position: { of: closest($element, \'.dx-designer-viewport\') }, onHidden: function() { $data.data(null) }, focusStateEnabled: false }"> <div class="dxqb-preview-popup-content"> <div class="dxqb-show-query-string-content dx-widget"> \x3c!-- ko if: !aceAvailable --\x3e <div class="dxrd-show-query-string-editor" data-bind="dxTextArea: { value: data, valueChangeEvent: \'keyup\', disabled: false }"></div> \x3c!-- /ko --\x3e \x3c!-- ko if: aceAvailable --\x3e <div class="dxrd-show-query-string-editor"> <div class="dxrd-show-query-string-editor-content"> <div class="dx-sql_editor dxd-back-primary2" data-bind="dxAceEditor: { value: data, additionalOptions: additionalOptions, options: aceOptions }"></div> </div> </div> \x3c!-- /ko --\x3e </div> </div> <div class="dxqb-preview-popup-buttons dxd-border-secondary"> <div data-bind="dxButton: { text: okButtonText(), onClick: okButtonHandler }" class="dxqb-preview-popup-button"></div> </div> </div>',"dxrd-treelist-with-checkbox":'<div data-bind="visible: visible"> \x3c!-- ko if: hasContent --\x3e \x3c!-- ko template: "dx-treelist-accordion-item-with-checkbox" --\x3e \x3c!-- /ko --\x3e \x3c!-- /ko --\x3e \x3c!-- ko ifnot: hasContent --\x3e \x3c!-- ko template: "dx-treelist-header-item-with-checkbox" --\x3e \x3c!-- /ko --\x3e \x3c!-- /ko --\x3e </div>',"dx-treelist-accordion-item-with-checkbox":'<div data-bind="dxdAccordionExt: { collapsed: collapsed, lazyContentRendering: true }"> \x3c!-- ko template: "dx-treelist-header-item-with-checkbox" --\x3e \x3c!-- /ko --\x3e <div class="dx-fieldset dx-accordion-content dxd-back-primary"> \x3c!-- ko with: data --\x3e \x3c!-- ko template: { name: contenttemplate } --\x3e \x3c!-- /ko --\x3e \x3c!-- /ko --\x3e </div> </div>',"dx-treelist-header-item-with-checkbox":'<div class="dx-background-inheritor dxd-back-highlighted dxd-state-selected"> <div data-bind="event: { dblclick: function() { $data.dblClickHandler ? $data.dblClickHandler($data) : $data.toggleCollapsed() }, mouseenter: mouseenter, mouseleave: mouseleave }, attr: { class: \'dx-treeview-item dx-treelist-item dx-fontsize-reestablished dxd-list-item-back-color \' + ($data.hasItems ? \'dx-treelist-list-item-content \' : \'dx-treelist-field-item-content \') + ($data.isSelected() ? \'dx-treelist-item-selected dxd-state-selected dxd-back-secondary\' : \'\') }, styleunit: padding, css: { \'dx-state-hover\': isHovered }"> \x3c!-- ko ifnot: $data.hasItems--\x3e \x3c!-- ko if: $data.showIcon --\x3e <div class="dx-treelist-image" data-bind="css: $data.imageClassName, template: {name: $data.imageTemplateName, if: !!ko.unwrap($data.imageTemplateName)}, attr: { title: text }"> </div> \x3c!-- /ko --\x3e \x3c!-- ko ifnot: $data.showIcon --\x3e <div class="dx-treelist-collapsedbutton" data-bind="css: nodeImageClass"></div> \x3c!-- /ko --\x3e \x3c!-- /ko --\x3e \x3c!-- ko if: $data.hasItems --\x3e <div class="dx-treelist-collapsedbutton" data-bind="css: nodeImageClass, visible: hasItems, template: \'dxrd-svg-collapsed\', click: toggleCollapsed"></div> \x3c!-- /ko --\x3e <div class="dx-treelist-caption"> \x3c!-- ko if: actions && actions.length > 0 --\x3e <div class="dx-treelist-action-container" data-bind="visible: isSelected() || isHovered()"> \x3c!-- ko foreach: actions --\x3e \x3c!-- ko if: $data.templateName --\x3e \x3c!-- ko template: templateName --\x3e \x3c!-- /ko --\x3e \x3c!-- /ko --\x3e \x3c!-- ko if: !$data.templateName --\x3e <div class="dx-treelist-action" data-bind="dxButtonWithTemplate: { onClick: function() { clickAction($parent); }, icon: $data.imageTemplateName, iconClass: $data.imageClassName, disabled: $data.disabled && $data.disabled() }, attr: { title: text }"></div> \x3c!-- /ko --\x3e \x3c!-- /ko --\x3e </div> \x3c!-- /ko --\x3e <div class="dx-treelist-selectedcontent" data-bind="event: { dblclick: function() { $data.dblClickHandler && $data.dblClickHandler($data); } }, click: toggleSelected, draggable: isDraggable ? dragDropHandler : null, css: { \'dxrd-disabled\': $data.data.disabled && $data.data.disabled() }"> <div class="dx-treelist-text-wrapper"> <div class="dx-add-queries-page-checkbox" data-bind="dxCheckBox: { value: data.checked, disabled: data.selectionDisabled }, click: function(treeNode, e) { treeNode.data.toggleChecked(); e.stopPropagation(); return true; }"></div> \x3c!--ko if: treeListController.searchEnabled --\x3e <div class="dx-treelist-text dx-highlighted-search-text dx-treelist-text-with-checkbox" data-bind="searchHighlighting: { text: text, textToSearch: treeListController.textToSearch, searchOptions: treeListController.searchOptions }, attr: { title: text }"></div> \x3c!-- /ko --\x3e \x3c!--ko ifnot: treeListController.searchEnabled --\x3e <div class="dx-treelist-text dx-treelist-text-with-checkbox" data-bind="text: text, attr: { title: text }"></div> \x3c!-- /ko --\x3e </div> </div> </div> </div></div>',"dx-treelist-action-with-popover":'<div class="dx-treelist-action-with-popover" style="display: inline-block"> <div class="dx-treelist-action" data-bind="dxButtonWithTemplate: { onClick: function() { clickAction($parent); }, icon: $data.imageTemplateName, iconClass: $data.imageClassName , disabled: $data.disabled && $data.disabled() }, attr: { title: text }"></div> \x3c!-- ko template: { name: \'dx-popover-list-items\', data: ko.utils.extend($parent.data, { position: $root.rtl ? \'left\' : \'right\', popupContainer: $root.getPopupContainer }) }--\x3e \x3c!-- /ko --\x3e </div>',"dx-treelist-accordion-contenttemplate-custom-with-actions":'<div data-bind="dxPropertyGrid: { target: $parent.data.dataSourceParameter, level: $parent.data.editor.level + 1 }"></div>',"dxrd-page-objectdatasource-datamembers":'<div class="dx-objectdatasource-datamembers-page"> <div data-bind="dxList: { dataSource: _chooseObjectDataMember.dataMembers, selectedItems: _chooseObjectDataMember.selectedDataMembers, selectionMode: \'single\', activeStateEnabled: false, focusStateEnabled: false, searchExpr: \'displayName\', searchEnabled: true, noDataText: $dx._static.noDataText(), encodeNoDataText: true, searchEditorOptions: { placeholder: $root.dx._static.searchPlaceholder() } }"> <div data-options="dxTemplate : { name: \'item\' }"> <div data-bind="text: $data.displayName"></div> </div> </div> </div>',"dxrd-page-objectdatasource-types":'<div class="dx-objectdatasource-types-page"> <div class="dxd-border-primary" data-bind="treeListSearchPanel: {controllers: _chooseObjectType.availableTypesTreelistModel.treeListController}"></div> <div data-bind="dxScrollView: { showScrollbar: \'onHover\', height: _chooseObjectType._scrollViewHeight}"> <div data-bind="treelist: _chooseObjectType.availableTypesTreelistModel"></div> \x3c!-- ko if: _chooseObjectType.types && !_chooseObjectType.types().length --\x3e <div class="dxa-no-data-message" data-bind="text: $root.dx._static.noDataText()"></div> \x3c!-- /ko--\x3e </div> </div>',"dxrd-page-objectsource":'<div class="dxrd-wizard-page dx-objectsource-page dx-frameless-style" style="position: absolute; top: 45px; left: 45px; right: 45px; bottom: 45px; margin:0"> \x3c!-- ko foreach: _sections--\x3e <div class="dx-border-inheritor dxd-border-accented"> <div class="dxrd-report-page-tile dxd-border-secondary" data-bind="style: position, css: { \'dxrd-disabled\': $data.disabled() }"> <div class="dxrd-report-page-tile-title" data-bind="text: $parent.showDescription($index(), description), attr: { title: $parent.showDescription($index(), description) }"></div> <div class="dxrd-report-page-tile-content dx-default-border-style dxd-border-secondary"> \x3c!-- ko if: !$data.disabled() --\x3e \x3c!-- ko template: { name: template, data: data } --\x3e \x3c!-- /ko --\x3e \x3c!-- /ko --\x3e \x3c!-- ko if: $data.disabled() --\x3e <div class="dxrd-wizard-page dxrd-wizard-disabled-content" data-bind="text: disabledText"></div> \x3c!-- /ko --\x3e </div> </div> </div> \x3c!-- /ko --\x3e </div>',"dx-objectdatasource-types-section":'<div class="dx-objectdatasource-types-section"> <div data-bind="treeListSearchPanel: {controllers: availableTypesTreelistModel.treeListController}"></div> <div data-bind="dxScrollView: { showScrollbar: \'onHover\', height: _scrollViewHeight}"> <div data-bind="treelist: availableTypesTreelistModel"></div> </div> </div>',"dx-objectdatasource-datamembers-section":'<div class="dx-objectdatasource-parameters-datamembers-section"> <div class="dxd-border-primary" data-bind="dxList: { dataSource: dataMembers, selectedItems: selectedDataMembers, selectionMode: \'single\', activeStateEnabled: false, focusStateEnabled: false, searchExpr: \'displayName\', searchEnabled: true, noDataText: $root.dx._static.noDataText(), encodeNoDataText: true, searchEditorOptions: { placeholder: $root.dx._static.searchPlaceholder() } }"> <div data-options="dxTemplate : { name: \'item\' }"> <div data-bind="text: $data.displayName"></div> </div> </div> </div>',"dx-objectdatasource-parameters-grid":'\x3c!-- ko if: !!$data --\x3e <div class="dx-field dxd-back-primary"> <div class="dx-field-label" data-bind="text: $data.displayName, attr: { \'title\': $data.displayName}"></div> </div> <div class="dxrd-properties-wrapper"> \x3c!-- ko foreach: _grids --\x3e \x3c!-- ko template: { name: \'dx-propertieseditor\', data: $data }--\x3e \x3c!-- /ko --\x3e \x3c!-- /ko --\x3e </div> \x3c!-- /ko --\x3e',"dx-objectdatasource-expression-popup":'\x3c!-- ko if: $data.value() --\x3e <div data-bind="dxExpressionEditor: getOptions({ options: value, fieldListProvider: value().itemsProvider, displayNameProvider: $root.displayNameProvider && $root.displayNameProvider() })"></div> \x3c!-- /ko --\x3e',"dx-objectdatasource-parameters-section":"<div class=\"dx-objectdatasource-parameters-section\"> <div class=\"dx-fieldset\" data-bind=\"dxScrollView: { showScrollbar: 'onHover'}\"> \x3c!-- ko template: { name: 'dx-objectdatasource-parameters-grid', data: _ctorParametersObject }--\x3e \x3c!-- /ko --\x3e \x3c!-- ko template: { name: 'dx-objectdatasource-parameters-grid', data: _dataMemberParametersObject }--\x3e \x3c!-- /ko --\x3e </div> </div>","dx-objectdatasource-configureparameters-page":"<div class=\"dxrd-report-page-tile-content dx-default-border-style dxd-border-secondary\" data-bind=\"dxScrollView: { showScrollbar: 'onHover'}\"> \x3c!-- ko template: { name: 'dx-objectdatasource-parameters-section', data: _chooseObjectParameters } --\x3e \x3c!-- /ko --\x3e </div>","dxrd-page-configure-parameters":'<div class="dxrd-wizard-page"> <div class="dxrd-datasource-parameters" data-bind="dxCollectionEditor: parametersEditorOptions"></div> </div>',"dxrd-parameter-collection-item":'<div class="dx-accordion" data-bind="dxdAccordion: { collapsed: collapsed }"> <div class="dxrd-group-header dx-accordion-header dxd-text-primary dxd-border-primary" style="border-bottom: 0" data-bind="styleunit: { \'marginLeft\' : editor.padding }, css: { \'dxrd-group-header-collapsed\': collapsed() }"> <div class="dx-collapsing-image" data-bind="template: \'dxrd-svg-collapsed\', css: { \'dx-image-expanded\': !collapsed() }" style="display:inline-block;"></div> <span class="dxrd-group-header-text dxd-text-primary" data-bind="text: value().name"></span> </div> <div class="dx-accordion-content dxd-border-primary"> <div data-bind="dxPropertyGrid: { target: value, level: editor.level + 1 }"></div> </div> </div>',"dxrd-wizard-datasource-parameters":'<div class="dx-fieldset" style="height:100%"> <div class="dx-collectioneditor" style="height:100%"> <div class="dxrd-datasource-parameters-collection"> <div class="dxrd-datasource-parameters-container dxd-border-secondary" data-bind="dxScrollView: { showScrollbar: \'onHover\', useNative: false, scrollByThumb: true }"> \x3c!-- ko if: values().length === 0 --\x3e <div class="dx-collectioneditor-empty dxd-empty-area-placeholder-text-color dxd-text-info"> <span class="dxrd-datasource-parameters-empty-text" data-bind="text: getDisplayTextEmptyArray()"></span> </div> \x3c!-- /ko --\x3e \x3c!-- ko if: values().length !== 0 --\x3e <div class="dx-collectioneditor-items" data-bind="foreach: values"> <div class="dx-background-inheritor dxd-back-highlighted dxd-state-selected" data-bind="with: $parent.createCollectionItemWrapper($parents[1], $index, $element)"> <div class="dx-collectioneditor-item-container dx-fontsize-reestablished dxd-list-item-back-color" data-bind="dxclick: $parents[1].select, css: { \'dxd-state-selected dxd-back-secondary\' : $parents[1].selectedIndex() === $index() }"> <div class="dx-collection-item"></div> </div> </div> </div> \x3c!-- /ko --\x3e </div> </div> <div class="dxrd-collectioneditor-wizard-buttons" data-bind="visible: showButtons"> <div class="dxrd-collectioneditor-action" data-bind="dxButton: { onClick: add, text: getDisplayTextButton(\'add\') }, attr: { title: getDisplayTextButton(\'add\') }"></div> <div class="dxrd-collectioneditor-action" data-bind="dxButton: { onClick: remove, disabled: selectedIndex() === null, text: $parent.removeButtonTitle }, attr: { title: $parent.removeButtonTitle }"></div> </div> </div> </div>',"dxrd-page-connectionstring":'<div class="dxrd-wizard-page"> <div class="dx-wizard-connections dx-default-border-style dxd-border-secondary"> <div class="dxrd-wizard-list dxd-border-primary" data-bind="dxList: { dataSource: _connectionStrings, onSelectionChanged: function(e) { _selectedConnectionString(e.addedItems) }, selectedItems: _selectedConnectionString.peek(), focusStateEnabled: false, searchEnabled: true, searchExpr: \'description\', editEnabled: true, editConfig: { selectionEnabled: true }, selectionMode: \'single\', activeStateEnabled: false, noDataText: $root.dx._static.noDataText(), encodeNoDataText: true, searchEditorOptions: { placeholder: $root.dx._static.searchPlaceholder() } }"> <div data-options="dxTemplate : { name: \'item\' }"> <div data-bind="text: $data[\'description\'] || $data[\'name\']"></div> </div> </div> </div> </div>',"dxrd-select-control":'<div class="dxrd-create-query-page-query-header"> <div class="dx-editquery-editor" data-bind="text: caption()"></div> <div class="dxd-hyperlink-color dxd-text-accented" data-bind="visible: !runQueryBuilderDisabled, text: $parent.runQueryBuilderBtnText, click: function() { $parent.runQueryBuilder() }"></div> </div> \x3c!-- ko if: !aceAvailable --\x3e <div class="dxrd-wizard-list dxrd-create-query-page-editor dx-default-border-style dxd-border-secondary dx-editquery-editor" data-bind="dxTextArea: { value: sqlString, valueChangeEvent: \'keyup input blur\', readOnly: disableCustomSql() }"></div> \x3c!-- /ko --\x3e \x3c!-- ko if: aceAvailable --\x3e <div class="dxrd-create-query-page-editor dxrd-create-query-page-editor-border dxd-border-secondary dx-editquery-editor"> <div class="dxrd-create-query-page-editor-content"> <div class="dx-sql_editor dxd-back-primary2" data-bind="dxAceEditor: { value: sqlString, additionalOptions: additionalOptions, options: aceOptions }, css: { \'dx-disabled-ace\': disableCustomSql() }"></div> </div> </div> \x3c!-- /ko --\x3e',"dxrd-procedures-control":'<div style="margin-top: 20px" class="dx-editquery-editor" data-bind="text: caption()"></div> <div class="dx-editquery-editor dx-default-border-style dxd-border-secondary"> <div class="dxrd-wizard-list dxrd-create-query-page-editor" data-bind="dxList: { dataSource: storedProcedures, searchEnabled: true, searchExpr: \'name\', onContentReady: scrollActiveItem, selectedItems: selectedProcedure, editEnabled: true, editConfig: { selectionEnabled: true }, selectionMode: \'single\', activeStateEnabled: false, noDataText: $root.dx._static.noDataText(), encodeNoDataText: true }"> <div data-options="dxTemplate : { name: \'item\' }"> <div data-bind="text: $parent.generateStoredProcedureDisplayName($data)"></div> </div> </div> </div>',"dxrd-wizard-create-query-page":'<div class="dxrd-wizard-page dxrd-wizard-create-query-page"> <div class="dxrd-create-query-page-content"> <div data-bind="text: queryNameCaption()"></div> <div class="dx-editquery-editor" data-bind="dxTextBox: { value: queryName, placeholder: $data.placeholder() }"></div> <div class="dxrd-radio-nowrap-ellipsis" data-bind="dxRadioGroup: { value: selectedQueryType, layout: \'horizontal\', items: queryTypeItems }"> <div data-options="dxTemplate : { name: \'item\' }"> <div class="dxrd-radio-nowrap-ellipsis-text" data-bind="text: $parent.localizeQueryType($data), attr: { \'title\': $parent.localizeQueryType($data) }"></div> </div> </div> \x3c!-- ko template: { name: queryControl().template, data: queryControl() } --\x3e \x3c!-- /ko --\x3e </div> \x3c!-- ko template: { name: \'dxrd-querybuilder-popup\', data: popupQueryBuilder } --\x3e \x3c!-- /ko --\x3e </div>',"dxrd-querybuilder-popup":'<div data-bind="dxPopup: popupViewModel($element)"> \x3c!-- ko if: qbOptions --\x3e \x3c!-- ko if: isVisible --\x3e <div class="dxrd-querybuilder-popup-content"> <div style="height:100%;" data-bind="dxQueryBuilder: qbOptions"></div> </div> \x3c!-- /ko --\x3e <div class="dxrd-querybuilder-popup-buttons dxd-border-secondary"> <div data-bind="dxButton: { text: getDisplayText(\'previewResults\'), onClick: previewHandler, disabled: okButtonDisabled }" class="dxrd-querybuilder-popup-button-left"></div> <div data-bind="dxButton: { text: getDisplayText(\'cancel\'), onClick: cancelHandler }" class="dxrd-querybuilder-popup-button"></div> <div data-bind="dxButton: { text: getDisplayText(\'ok\'), type: \'default\', onClick: okHandler, disabled: okButtonDisabled }" class="dxrd-querybuilder-popup-button"></div> </div> <div class="dxrd-wizard-load-panel dxd-text-primary" data-bind="dxLoadPanel:{ animation: { show: { type: \'fade\', from: 0, to: 1, duration: 700 }, hide: { type: \'fade\', from: 1, to: 0, duration: 700 } }, deferRendering: false, message: getDisplayText(\'loading\'), visible: showLoadIndicator, shading: true, shadingColor: \'transparent\'}"> </div> \x3c!-- /ko --\x3e </div>',"dxrd-querybuilder":'<div class="dx-designer dx-querybuilder" data-bind="template: \'dxrd-designer\'"> </div>',"dx-wizard-menu-box-editorswitch":"<div class=\"dxrd-editormenu-box dxd-property-grid-menu-box-color dxd-back-highlighted\" data-bind=\"css: { 'dxd-state-active': $data.isExpression() }, dxButtonWithTemplate: { onClick: switchEditors, icon: 'dxrd-svg-wizard-expressions' }\"> </div>","dx-popover-list-items":'<div data-bind="dxPopover: { wrapperAttr: { class: $data.className }, width: $data.width || 200, position: position, visible: popoverVisible, target: target, container: popupContainer($element)}"> <div data-bind="attr: { class: $data.className + \'-list\'}, dxList: { dataSource: popoverListItems(), onItemClick: itemClickAction }"> <div data-bind="attr: { class: $data.className + \'-list-item\'}" data-options="dxTemplate : { name: \'item\' }"> <div class="dx-text-content" data-bind="text: name, attr: { title: name }"></div> </div> </div> </div>',"dx-wizard-headerNew":'<div class="dxrd-wizard-header-custom"> \x3c!-- ko with: _currentPage --\x3e <div class="dxrd-span-title" data-bind="text: $data.title || $parent.title"></div> <div class="dxrd-span-description" data-bind="text: description, attr: { title: description }"></div> \x3c!-- /ko --\x3e </div>',"dx-wizard-newlayout":'<div class="dxrd-wizard dx-editors dxd-text-primary" data-bind="dxPopup: { animation: { show: { type: \'fadeIn\', duration: 700 }, hide: { type: \'fadeOut\', duration: 700 } }, visible: isVisible, wrapperAttr: { class: \'dxrd-wizard dx-editors dxd-text-primary\' }, title: isVisible() ? title : \'\', showTitle: true, fullScreen: false, width: width, height: height, container: $element, visualContainer: _container($element), titleTemplate: _titleTemplate, position: _wizardPopupPosition($element) }, cssArray: [ $data._extendCssClass, { \'dx-rtl\': $root.rtl, \'dx-ltr\': !$root.rtl }]"> <div class="dxrd-wizard-content"> \x3c!-- ko with: _currentPage --\x3e <div style="height: 100%" data-bind="template: { name: template, data: page } "></div> \x3c!-- /ko --\x3e <div class="dxrd-wizard-load-panel dxd-text-primary" data-bind="dxLoadPanel: _loadPanelViewModel($element)"></div> </div> <div class="dxrd-wizard-navigation"> <div data-bind="dxButton: cancelButton" class="dxrd-wizard-btn left"></div> <div data-bind="dxButton: finishButton" class="dxrd-wizard-btn right"></div> <div data-bind="dxButton: nextButton" class="dxrd-wizard-btn right"></div> <div data-bind="dxButton: previousButton" class="dxrd-wizard-btn right"></div> </div> </div>'});class Ns extends v.DragDropHandler{constructor(e,t,a,i,r){super(e,t,a,i,r),this.querySurface=e,this.undoEngine=a,this._dragColumn=_.observable(null),this._dragConditionSurface=null,this.dragDropConnector=_.observable(null),this.cursor="arrow",this.containment=".dxrd-ghost-container",this.helper=void 0}_needToCreateRelation(){return!!(this.selection.dropTarget&&this.selection.dropTarget instanceof mo)&&this.selection.dropTarget.getControlModel().parentModel()!==this.getDragColumn().parentModel()}startDrag(e){if(this._scrollProcessor=new v.dxScrollProcessor(document.getElementsByClassName("dxqb-mainwin")[0]),e instanceof le){var t=e.getControlModel().parentModel();if(this._dragConditionSurface=Object(v.findSurface)(t),!this._dragConditionSurface)return;this._dragConditionSurface.isVisible(!1),this._dragColumn(t.startPoint()===e.getControlModel()?t.nestedColumn():t.parentColumn())}else{if(!(e instanceof mo))throw new Error("ColumnDragHandler can be applied to the Column only.");this._dragColumn(e.getControlModel())}t=new _e({},this.querySurface().getControlModel());this.dragDropConnector(new Ce(t,this.surface()))}setConnectorPoints(e){var t,a,i=this._dragColumn(),r=this.dragDropConnector().getControlModel();this._needToCreateRelation()?(a=te(i,this.selection.dropTarget.getControlModel()),r.startPoint().connectingPoint(a.start),r.endPoint().connectingPoint(a.end)):(a=this.querySurface().rtl()?this.querySurface().pageWidth()-i.leftConnectionPoint.location.x():i.leftConnectionPoint.location.x(),t=this.querySurface().rtl()?this.querySurface().pageWidth()-i.rightConnectionPoint.location.x():i.rightConnectionPoint.location.x(),a=Math.abs(a-e.left)>Math.abs(t-e.left)?i.rightConnectionPoint:i.leftConnectionPoint,r.startPoint().connectingPoint(a),this.dragDropConnector().endPoint().rect({top:e.top,left:e.left}))}drag(e,t){var a=this._scrollProcessor.getScrollOffset();t.dataset.leftPosition=Object(v.convertToCssPixelUnits)(Object(v.convertFromCssPixelUnits)(t.dataset.leftPosition)+(t.scroll.left+a.left)),t.dataset.topPosition=Object(v.convertToCssPixelUnits)(Object(v.convertFromCssPixelUnits)(t.dataset.topPosition)+(t.scroll.top+a.top)),t.delta.left=Object(v.convertFromCssPixelUnits)(t.dataset.leftPosition)-this.surface().underCursor().x-6,t.delta.top=Object(v.convertFromCssPixelUnits)(t.dataset.topPosition)-this.surface().underCursor().y-6,this.setConnectorPoints(this._getAbsoluteSurfacePosition(t)),this._scrollProcessor.processOffset({x:e.clientX,y:e.clientY})}doStopDrag(){this._scrollProcessor.dispose(),this._scrollProcessor=null,this.dragHelperContent.reset(),this.dragDropConnector()&&this.dragDropConnector().dispose(),this.dragDropConnector(null);try{var e,t,a=null,i=(this._dragConditionSurface&&!this._dragConditionSurface.isVisible()&&(a=this._dragConditionSurface.getControlModel(),this._dragConditionSurface.isVisible(!0)),this.querySurface().getControlModel());this._needToCreateRelation()&&(e=this.selection.dropTarget.getControlModel(),this.undoEngine().start(),a&&a.parentModel().removeChild(a),t=i.cerateJoinCondition(this._dragColumn(),e),this.undoEngine().end(),null!==t)&&this.selection.initialize(Object(v.findSurface)(t))}finally{this._dragColumn(null)}}getDragColumn(){return this._dragColumn()}}class Os extends v.DragDropHandler{constructor(e,t,a,i,r){super(e,t,a,i,r),this._undoEngine=a,this._query=()=>this._querySurface().getControlModel(),this.getDropCallback=(i,r)=>(e,t)=>{var a=t.createChild(Object(v.extend)({"@ControlType":"Table","@Name":e.data.name},la.controlsMap.Table.defaultVal));return a.isInitialized()?t.tryToCreateRelationsByFK(a):a.isInitialized.subscribe(()=>{i().start(),t.tryToCreateRelationsByFK(a),i().end()}),r&&this.suggestLocation(a,t),a},this._querySurface=e,this.cursor="arrow",this.containment=".dxqb-designer",this.cursorAt={top:0,left:0},this.helper=e=>{super.helper(e),this.recalculateSize(h.Size.fromString("199, 123")),r.setContent(new h.Rectangle(0,0,this._size.width(),this._size.height()))}}suggestLocation(t,e){e=Math.max.apply(null,e.tables.peek().filter(e=>e!==t).map(e=>e.location.x.peek()+3*e.size.width.peek()/2).concat([30]));t.location.x(e),t.location.y(65)}startDrag(e){e&&e.name&&this._query().dbSchemaProvider.getDbTable(e.name)}doStopDrag(e,t){var a;this.dragHelperContent.reset(),this.selection.dropTarget&&(a=this._getAbsoluteSurfacePosition(e),this._querySurface().underCursor().x=a.left-this._querySurface().absolutePosition.x(),this._querySurface().underCursor().y=a.top-this._querySurface().absolutePosition.y(),a=_.dataFor(e),e=this.getDropCallback(this._undoEngine,!1)(a,this._query()),this.addControl(e,this._querySurface(),this._size))}addControl(e,t,a){t.getControlModel().addChild(e);e=Object(v.findSurface)(e);e&&(e.rect({left:t.underCursor().x,top:t.underCursor().y,width:a.width()}),this.selection.initialize(e))}}class ws extends h.SurfaceElementBase{constructor(e,t){super(e,t,null),this.conditions=_.observableArray(),this.template="dxqb-relation",Object(v.createObservableArrayMapCollection)(e.conditions,this.conditions,this._createSurface)}_getChildrenHolderName(){return"conditions"}}var Ds={Equal:"Equal",NotEqual:"NotEqual",Greater:"Greater",GreaterOrEqual:"GreaterOrEqual",Less:"Less",LessOrEqual:"LessOrEqual"},Is=[{propertyName:"left",displayName:"Left",editor:b.getEditor("text"),disabled:!0,localizationId:"AnalyticsCoreStringId.QueryBuilder_LeftOperand"},{propertyName:"right",displayName:"Right",editor:b.getEditor("text"),disabled:!0,localizationId:"AnalyticsCoreStringId.QueryBuilder_RightOperand"},{propertyName:"parentColumnName",modelName:"@Parent"},{propertyName:"nestedColumnName",modelName:"@Nested"},{propertyName:"joinType",displayName:"Join Type",editor:b.getEditor("combobox"),defaultVal:"Inner",valuesArray:[{value:"Inner",displayValue:"Inner join",localizationId:"DataAccessStringId.RelationEditorRelationTypeInnerJoin"},{value:"LeftOuter",displayValue:"Left outer join",localizationId:"DataAccessStringId.RelationEditorRelationTypeLeftOuterJoin"},{value:"RightOuter",displayValue:"Right outer join",localizationId:"DataAccessStringId.RelationEditorRelationTypeRightOuterJoin"},{value:"FullOuter",displayValue:"Full outer join",localizationId:"DataAccessStringId.RelationEditorRelationTypeFullOuterJoin"}],localizationId:"AnalyticsCoreStringId.QueryBuilder_JoinType"},{propertyName:"operator",modelName:"@Operator",displayName:"Operator",editor:b.getEditor("combobox"),defaultVal:Ds.Equal,valuesArray:[{value:"Equal",displayValue:"Equals to",localizationId:"DataAccessUIStringId.JoinEditorEqualOperator"},{value:"NotEqual",displayValue:"Does not equal to",localizationId:"DataAccessUIStringId.JoinEditorNotEqualOperator"},{value:"Greater",displayValue:"Is greater than",localizationId:"DataAccessUIStringId.JoinEditorGreaterOperator"},{value:"GreaterOrEqual",displayValue:"Is greater than or equal to",localizationId:"DataAccessUIStringId.JoinEditorGreaterOrEqualOperator"},{value:"Less",displayValue:"Is less than",localizationId:"DataAccessUIStringId.JoinEditorLessOperator"},{value:"LessOrEqual",displayValue:"Is less than or equal to",localizationId:"DataAccessUIStringId.JoinEditorLessOrEqualOperator"}],localizationId:"AnalyticsCoreStringId.QueryBuilder_Operator"},{propertyName:"itemType",modelName:"@itemType"}];class Es extends Ce{constructor(e,t){super(e,t),this._disposables.push(this.showArrow=_.pureComputed(()=>"LeftOuter"===e.joinType()||"FullOuter"===e.joinType())),this._disposables.push(this.showRightArrow=_.pureComputed(()=>"RightOuter"===e.joinType()||"FullOuter"===e.joinType()))}container(){return this.getRoot()}}function ks(){Te(),la.registerControl("Unknown",{info:Zt,type:h.ElementViewModel,nonToolboxItem:!0,surfaceType:h.SurfaceElementBase,isDeleteDeny:!0}),la.registerControl("Relation",{info:pa,defaultVal:{},surfaceType:ws,popularProperties:[],type:ha,elementActionsTypes:[],nonToolboxItem:!0}),la.registerControl("JoinCondition",{info:Is,defaultVal:{},surfaceType:Es,popularProperties:["_parentColumnName","_nestedColumnName","joinType"],type:ua,elementActionsTypes:[],nonToolboxItem:!0}),la.registerControl("Table",{info:lo,defaultVal:{},surfaceType:bo,popularProperties:["name","alias","columns"],type:j,elementActionsTypes:[],nonToolboxItem:!0}),la.registerControl("Column",{info:Wr,defaultVal:{},surfaceType:mo,popularProperties:["name","alias","selected"],type:no,elementActionsTypes:[],nonToolboxItem:!0,isDeleteDeny:!0}),la.registerControl("Query",{info:so,surfaceType:po,popularProperties:["name","filterString","groupFilterString"],type:uo,elementActionsTypes:[],isContainer:!0,nonToolboxItem:!0,isDeleteDeny:!0}),la.registerControl("FTable",{info:lo,defaultVal:{},surfaceType:Co,popularProperties:["name","alias","columns"],type:_o,elementActionsTypes:[],nonToolboxItem:!0}),la.registerControl("FQuery",{info:So,surfaceType:vo,popularProperties:["name"],type:xo,elementActionsTypes:[],isContainer:!0,nonToolboxItem:!0,isDeleteDeny:!0})}class As extends P.TreeListController{constructor(e,t,a){super(),this.undoEngine=e,this.query=t,this._dragDropHandler=a.getDropCallback(e,!0)}dblClickHandler(e){this.undoEngine().start(),this._dragDropHandler(e,this.query()),this.undoEngine().end()}}var $s={propertyName:"parameters",displayName:"parameters",editor:{custom:"dxqb-parameterspanel"}},js={propertyName:"selectedItem",displayName:"selectedItem",editor:{custom:"dxqb-propertygrid"}},zs={propertyName:"fields",displayName:"fields",editor:{custom:"dxqb-fieldspanel"}},Bs={propertyName:"query",displayName:"query",editor:{custom:"dxqb-propertygrid"}};class Rs extends C.TabInfo{constructor(e,t,a,i,r){super({text:"Properties",template:"dxqb-properties-wrapper",model:Rs._createQBPropertyGrid(e,t,a,r)}),this.active(!0),this._getGroupByName("Fields").collapsed(!1),this._disposables.push(i.subscribe(e=>{e instanceof uo||this._getGroupByName("SelectedItem").collapsed(!1)}))}static _getSelectedItemPropertyName(e){var t="Selection Properties",a="AnalyticsCoreStringId.QueryBuilder_SelectionProperties";switch(e&&e.controlType){case"Query":case"FQuery":t="Query Properties",a="AnalyticsCoreStringId.QueryBuilder_QueryProperties";break;case"Table":case"FTable":t="Table Properties",a="AnalyticsCoreStringId.QueryBuilder_TableProperties";break;case"Column":t="Column Properties",a="AnalyticsCoreStringId.QueryBuilder_ColumnProperties";break;case"JoinCondition":t="Relation Properties",a="AnalyticsCoreStringId.QueryBuilder_RelationProperties"}return Object(C.getLocalization)(t,a)}static _createWrappedObject(t,a,e,i){var r=new x.ObjectProperties(t,null,1),o=_.computed(()=>t()&&t().parameters),s=[Bs,js,zs],r={selectedItem:a,query:{editableObject:t,properties:r},fields:a,isPropertyVisible:e=>"selectedItem"!==e||a.editableObject()!==t()};return i&&(r.parameters={values:o,addHandler:()=>new Zr({"@Type":"System.String"}),collapsed:!1,undoEngine:e,isVisibleButton:(e,t)=>"add"===t||"delete"===t,template:"#dxqb-collectioneditor-template",textEmptyArray:{text:"Click the Add button to create a parameter.",localizationId:"AnalyticsCoreStringId.QueryBuilder_PageConfigureParametersEmpty"}},s.push($s)),r.getInfo=()=>s,r}static _createGroups(e,t){var a={Query:{info:[Bs],displayName:()=>Object(C.getLocalization)("Query Properties","AnalyticsCoreStringId.QueryBuilder_QueryProperties")},SelectedItem:{info:[js],displayName:()=>this._getSelectedItemPropertyName(e())},Fields:{info:[zs],displayName:()=>Object(C.getLocalization)("Available tables and views","AnalyticsCoreStringId.QueryBuilder_AvailableTables")}};return t&&(a.Parameters={info:[$s],displayName:()=>Object(C.getLocalization)("Parameters","AnalyticsCoreStringId.QueryBuilder_Parameters")}),a}static _createQBPropertyGrid(e,t,a,i){e=this._createWrappedObject(e,t,a,i);return new v.ControlProperties(_.observable(e),{groups:this._createGroups(t.editableObject,i),editors:e.getInfo()},void 0,!1)}_getGroupByName(t){return this.model.groups.filter(e=>e._displayName===t)[0]}}class Ms extends C.TabInfo{constructor(e){super({text:"Properties",template:"dxqb-properties-wrapper-editorlist",model:e}),this.model=e}}_.bindingHandlers.dxdTableView={init:function(e,t,a,i,r){var o,s,n=Object(x.getTemplate)("dxd-tableview"),d=T.fn.constructor(e).append(n),l=!!r.$root.rtl,c=_.unwrap(t());return _.applyBindings({onDataScroll:e=>{0<=e.scrollOffset.left&&(o=o||d.find(".dxd-tableview-titles"),s=s||d.find(".dxd-tableview-data table"),o.offset({left:s.offset().left,top:o.offset().top}))},onDataScrollInitialized:e=>{var t;s=null,l&&(t=e.component,setTimeout(()=>t.scrollTo({left:t.scrollWidth(),top:0}),1))},data:c,rtl:l,noDataText:v.noDataText,isImage:e=>"System.Byte[]"===c.schema[e].type,isImageTooLarge:e=>"!"===e[0],getImageTooLargeText:e=>"Image too large ("+e.substring(1)+" bytes)"},d.children()[0]),d.find(".dxd-tableview-titles .dxd-tableview-resizable").each((e,t)=>{var a,i=T.fn.constructor(t).find(".dxd-tableview-cell-text"),r=d.find(".dxd-tableview-data .dxd-tableview-resizable"+e),e=(e<c.schema.length-1&&(a=new v.Resizable(t,{handles:"e",start:(e,t)=>{},stop:()=>{},resize:(e,t)=>{var a=Object(v.convertFromCssPixelUnits)(t.dataset.originalLeftMousePosition),e=Object(v.convertFromCssPixelUnits)(t.dataset.originalWidth)+(e.x-a);t.style.width=Object(v.convertToCssPixelUnits)(e),i.outerWidth(e),r.outerWidth(e),r.parent().width(e)}}).initialize(),Object(v.addDisposeCallback)(t,()=>{a.dispose()})),Math.max(i.width(),r.width()));i.width(e),r.width(e)}),Object(v.addDisposeCallback)(d.children()[0],()=>{d=null}),{controlsDescendantBindings:!0}}};var k=e(11),qs=e.n(k),Ls={Surface:"dxrd-surface-template-base",Toolbar:"dxqb-toolbar",RightPanel:"dx-right-panel-lightweight",RightPanelSwitcher:"dx-right-panel-switcher",DataPreview:"dxqb-popup#data",SqlPreview:"dxqb-popup#sql"};function Qs(i,r,o,e){return()=>{var e=i(),t=e.find(".dxrd-right-panel:visible").outerWidth()||0,a=e.width()-(t+5);e.find(".dxrd-surface-wrapper").css(o().rtl()?{left:t,right:0,width:a}:{left:0,right:t,width:a}),r(a),o().pageWidth(a)}}function Vs(e,t){var a=_.observable(!1);return e()._disposables.push(t.subscribe(()=>{a(!1)})),_.pureComputed(function(){return t.peek().getDbSchema().done(()=>{a(!0)}),!a()||e().tables.peek().some(function(e){return!e.isInitialized()})})}function Ws(e,t,a){var i=e.subscribe(e=>{t(new po(e)),t().rtl(!!a.rtl)}),r=new v.SurfaceSelection(["alias","name","sortOrder"]),o=Object(v.createDesigner)(e,t,la,void 0,void 0,void 0,!!a.rtl,r);return o.addDisposables(i),o.findControl=(e,a)=>{T.fn.constructor(".dxqb-main").children(".dxrd-control").each((e,t)=>{t=T.fn.constructor(t);t.offset().top<=a.clientY&&t.offset().left<=a.clientX&&o.selection.focused(_.dataFor(t[0]))})},o.addDisposables({dispose:()=>o.findControl=null}),o}function Fs(e,t,a,i){var r=Qs(()=>T.fn.constructor(e).find(".dxqb-designer"),t.surfaceSize,a),o=(t.addDisposables(a.subscribe(()=>{r()})),()=>{setTimeout(()=>r())});window.addEventListener("resize",o),Object(v.addDisposeCallback)(e,function(){window.removeEventListener("resize",o),t.disposableContainer.dispose()}),t.addDisposables(t.tabPanel.width.subscribe(()=>{r()})),t.updateSurfaceSize=()=>{r()},t.updateSurface=()=>{r(),i&&i()}}function Us(e,t,a,i=!0){var r,o,s,n=a&&a.onServerError&&Object(v.processErrorEvent)(a.onServerError),d=t.requestWrapper||new qe,l=t.parametersMode||Gr.ReadWrite,c=(Re(t.handlerUri),t.queryModelJson&&(p=new Rt(JSON.parse(t.dataSourceJson)),t.dbSchemaProvider=Object(v._wrapModelInObservable)(t.dbSchemaProvider),t.dbSchemaProvider(new Le(p.connection)),t.querySource=Object(v._wrapModelInObservable)(t.querySource),t.querySource(JSON.parse(t.queryModelJson))),t.dbSchemaProvider().connection),u=_.observable(),p=_.observable(),h=_.observable(),m=e=>{u(new uo(e,t.dbSchemaProvider(),l,e=>{a.saveQueryRequested({queryLayout:encodeURIComponent(JSON.stringify(e)),connection:encodeURIComponent(Me(c))})}))},g=(m(t.querySource()),Ws(u,p,t)),n=(n&&g.addDisposables(n),g.rootStyle="dxqb-designer dxd-back-primary-invariant",v.getParentContainer),b=(g.dataPreview={isLoading:_.observable(!1),isVisible:_.observable(!1),title:()=>Object(C.getLocalization)("Data Preview (First 100 Rows Displayed)","AnalyticsCoreStringId.DataPreview_Title"),template:"dxqb-data-preview",data:{value:_.observable()},okButtonText:()=>Object(C.getLocalization)("OK","DataAccessUIStringId.Button_OK"),okButtonHandler:e=>{e.model.isVisible(!1)},container:n},g.selectStatmentPreview={isLoading:_.observable(!1),isVisible:_.observable(!1),template:"dxqb-selectstatment-preview",title:()=>Object(C.getLocalization)("Select Statement Preview","AnalyticsCoreStringId.QueryBuilder_SelectStatementPreview_Title"),data:{value:_.observable(),aceOptions:cr(!0),aceAvailable:Object(P.aceAvailable)(),additionalOptions:ur(e=>{g.selectStatmentPreview.data.value(e)}),languageHelper:pr()},okButtonText:()=>Object(C.getLocalization)("OK","DataAccessUIStringId.Button_OK"),okButtonHandler:e=>{e.model.isVisible(!1)},container:n},g.parts=[{id:Ls.Surface,templateName:Ls.Surface,model:g},{id:Ls.Toolbar,templateName:Ls.Toolbar,model:g},{id:Ls.RightPanel,templateName:Ls.RightPanel,model:g},{id:Ls.DataPreview,templateName:Ls.DataPreview.split("#")[0],model:g.dataPreview},{id:Ls.SqlPreview,templateName:Ls.SqlPreview.split("#")[0],model:g.selectStatmentPreview}],g.columnDragHandler=new Ns(p,g.selection,g.undoEngine,g.snapHelper,g.dragHelperContent),g.fieldDragHandler=new Os(p,g.selection,g.undoEngine,g.snapHelper,g.dragHelperContent),g.connectionPointDragHandler=g.columnDragHandler,g.resizeHandler.handles="e,w",g.columnsLoadingMsg=()=>Object(C.getLocalization)("Loading...","DataAccessWebStringId.QueryBuilder_ColumnsLoading"),e=>{m(e),h({itemsProvider:t.dbSchemaProvider(),treeListController:new As(g.undoEngine,u,g.fieldDragHandler),selectedPath:_.observable(),pageSize:100,templateName:"dxqb-treelist-item-with-search"})}),f=(g.addDisposables(t.querySource.subscribe(e=>{b(e)})),b(t.querySource()),_.observable(Object(v.calculateWithZoomFactor)(355))),n={editableObject:g.editableObject,properties:new x.ObjectProperties(g.editableObject,null,1),fieldListModel:{treeListOptions:h},tablesTop:f,searchPlaceholder:()=>Object(v.searchPlaceholder)()},n=new Rs(u,n,g.undoEngine,g.selection.focused,l===Gr.ReadWrite),y=g.tabPanel,S=(y.tabs.length=0,y.tabs.push(n),y.width(Object(v.calculateWithZoomFactor)(375)),g.fieldDragHandler=new Os(p,g.selection,g.undoEngine,g.snapHelper,g.dragHelperContent),g.fieldListProvider=new Yr(u,Yr.whereClauseObjectsFilter),g.dataBindingsProvider=g.fieldListProvider,g.parametersBindingsProvider=t.parametersItemsProvider||g.dataBindingsProvider,g.dataBindingsGroupProvider=new Yr(u,Yr.groupByObjectsFilter),g.isLoading=Vs(g.model,t.dbSchemaProvider),g.actionLists=new v.ActionLists(p,g.selection,g.undoEngine,(r=g,o=a&&a.customizeActions,s=r.model,e=>{var t=Object(v.findFirstItemMatchesCondition)(e,e=>"Delete"===e.text),a=(t.imageClassName="dx-icon-dxrd-image-recycle-bin",t.imageTemplateName="dxrd-svg-operations-recycle_bin_xl",Object(v.findFirstItemMatchesCondition)(e,e=>"Undo"===e.text)),i=(a.disabled=_.pureComputed(()=>r.isLoading()||!r.undoEngine().undoEnabled()),Object(v.findFirstItemMatchesCondition)(e,e=>"Redo"===e.text));e.splice(0,e.length,t,a,i),e.push({id:Be.Save,text:"Save",displayText:()=>Object(C.getLocalization)("Save","AnalyticsCoreStringId.MenuButtons_Save"),imageClassName:"dxqb-image-save",imageTemplateName:"dxrd-svg-menu-save",disabled:r.isLoading,visible:!0,hotKey:{ctrlKey:!0,keyCode:"S".charCodeAt(0)},clickAction:()=>{s().save()},hasSeparator:!0}),e.push({id:Be.DataPreview,text:"Preview Results",displayText:()=>Object(C.getLocalization)("Preview Results","DataAccessUIStringId.QueryBuilderButtons_PreviewResults"),imageClassName:"dxrd-image-data-preview",imageTemplateName:"dxrd-svg-queryBuilder-data_preview",disabled:r.isLoading,visible:!0,hotKey:{ctrlKey:!0,keyCode:"P".charCodeAt(0)},clickAction:()=>{s().canSave()&&r.showPreview()},hasSeparator:!0}),e.push({id:Be.SelectStatementPreview,text:"Preview Select Statement",displayText:()=>Object(C.getLocalization)("Preview Select Statement","AnalyticsCoreStringId.QueryBuilder_PreviewSelectStatement_Tooltip"),imageClassName:"dxrd-image-selectstatement-preview",imageTemplateName:"dxrd-svg-queryBuilder-select_statment",disabled:r.isLoading,visible:!0,hotKey:{ctrlKey:!0,keyCode:"E".charCodeAt(0)},clickAction:()=>{s().canSave()&&r.showStatement()},hasSeparator:!0}),o&&o(e)})),g.isLoading()||g.undoEngine&&g.undoEngine().clearHistory(),g.addDisposables(g.isLoading.subscribe(e=>{g.undoEngine&&g.undoEngine().clearHistory()})),g.selection.focused(p()),p.subscribe(e=>{g.selection.focused(e)}));return g.addDisposables({dispose:()=>S.dispose()}),g.addDisposables(g.editableObject.subscribe(e=>{f.notifySubscribers(null)})),Object(v.appendStaticContextToRootViewModel)(g),i&&(a&&a.beforeRender&&a.beforeRender(g),T.fn.constructor(e).empty(),_.cleanNode(e),_.applyBindings(g,e)),Fs(e,g,p,()=>f(355)),i&&g.updateSurface(),g.showPreview=()=>{g.dataPreview.isLoading(!0),g.dataPreview.isVisible(!0),d.getDataPreview(c,JSON.stringify(u().serialize(!0))).done(e=>{g.dataPreview.data.value(JSON.parse(e.dataPreviewJSON)),g.dataPreview.isLoading(!1)}).fail(e=>{g.dataPreview.isVisible(!1),Object(v.ShowMessage)(Object(v.getErrorMessage)(e))})},g.showStatement=()=>{g.selectStatmentPreview.isLoading(!0),g.selectStatmentPreview.isVisible(!0),d.getSelectStatement(c,JSON.stringify(u().serialize(!0))).done(e=>{e.errorMessage&&Object(v.ShowMessage)(e.errorMessage),g.selectStatmentPreview.data.value(e.sqlSelectStatement),g.selectStatmentPreview.isLoading(!1)}).fail(e=>{g.selectStatmentPreview.isVisible(!1),Object(v.ShowMessage)(Object(v.getErrorMessage)(e))})},g}function Hs(e,t,a,i=!0){t.localization&&Object(C.addCultureInfo)({messages:t.localization}),qs()({rtlEnabled:!!t.rtl}),ks();var r=[];return a&&a.customizeLocalization&&a.customizeLocalization(r),Object(v.resolveFromPromises)(r,()=>Us(e,t,a,i))}function Js(e,t,a){var i=_.observable(),r=_.observable(),o=(ks(),Ws(i,r,t)),s=new Ms(new x.ObjectProperties(o.editableObject,null,1)),n=o.tabPanel,d=new Ps(n.collapsed,o.editableObject,t.showPropertyGridCondition,Rs._getSelectedItemPropertyName);return o.addDisposables(s,n,d),n.tabs.length=0,n.tabs.push(s),n.width(Object(v.calculateWithZoomFactor)(325)),o.parts=[{id:Ls.Surface,templateName:Ls.Surface,model:o},{id:Ls.RightPanel,templateName:Ls.RightPanel,model:o},{id:Ls.RightPanelSwitcher,templateName:Ls.RightPanelSwitcher,model:d}],o.columnDragHandler=new Ns(r,o.selection,o.undoEngine,o.snapHelper,o.dragHelperContent),o.connectionPointDragHandler=o.columnDragHandler,o.selection.focused(r()),o.addDisposables(r.subscribe(e=>{o.selection.focused(e)})),o.rootStyle="dxqb-designer dxd-back-primary-invariant",o.resizeHandler.handles="e,w",o.columnsLoadingMsg=()=>Object(C.getLocalization)("Loading...","DataAccessWebStringId.QueryBuilder_ColumnsLoading"),Object(v.appendStaticContextToRootViewModel)(o),i(a(t)),T.fn.constructor(e).empty(),_.cleanNode(e),_.applyBindings(o,e),Fs(e,o,r),o.isLoading(!1),o.updateSurface(),Object(v.addDisposeCallback)(e,function(){i()&&i().dispose(),r()&&r().dispose(),a=null,o.disposableContainer.dispose(),o.dispose()}),o}class Gs{constructor(e){this._queryBuilderModel=e}get queryBuilderModel(){return this._queryBuilderModel()}set queryBuilderModel(e){this._queryBuilderModel(e)}UpdateLocalization(e){Object(C.updateLocalization)(e)}GetQueryBuilderModel(){return this.queryBuilderModel}GetJsonQueryModel(){return{Query:this.queryBuilderModel.model().serialize()}}GetSaveQueryModel(){return{queryLayout:JSON.stringify(this.GetJsonQueryModel()),connection:this.SerializeDataConnection()}}SerializeDataConnection(){return Me(this.queryBuilderModel.model().dbSchemaProvider.connection)}AdjustControlCore(){this.queryBuilderModel&&this.queryBuilderModel.updateSurfaceSize()}Save(){this.queryBuilderModel&&this.queryBuilderModel.model().onSave()}ShowPreview(){this.queryBuilderModel&&this.queryBuilderModel.showPreview()}IsQueryValid(){return this.queryBuilderModel&&this.queryBuilderModel.model().isValid()}OnCallback(e){e.queryValidationError&&Object(v.NotifyAboutWarning)(e.queryValidationError,!0)}}var Xs=e(12),Ys=e(13);class Ks{static generateQueryBuilderEvents(a){var t={publicName:"BeforeRender",privateName:"beforeRender"},i={publicName:"SaveQueryRequested",privateName:"saveQueryRequested"},r={publicName:"CustomizeMenuActions",privateName:"customizeActions"},e={publicName:"CustomizeLocalization",privateName:"customizeLocalization"},o={publicName:"OnServerError",privateName:"onServerError"};return r.callback=function(e){a(r.publicName,{Actions:e,GetById:t=>t?e.filter(function(e){return t===e.id})[0]:null})},e.callback=function(t){a(e.publicName,{LoadMessages:e=>{e&&("function"==typeof e.then?t.push(e):Object(Ys.loadMessages)(e))},WidgetLocalization:Xs})},o.callback=function(e){a(o.publicName,{Error:e})},t.callback=function(e){a(t.publicName,e)},i.callback=function(e){a(i.publicName,e)},[t,i,r,e,o]}}class Zs extends v.JSDesignerBindingCommon{constructor(e,t){super(_.unwrap(e),t),this.options=e,this._deferreds=[],this._templateHtml=Object(x.getTemplate)("dxrd-querybuilder"),e.queryBuilderModel=Object(v._wrapModelInObservable)(e.queryBuilderModel),this.sender=new Gs(e.queryBuilderModel),e.callbacks&&e.callbacks._eventSenderCreated&&e.callbacks._eventSenderCreated(this.sender)}_applyBindings(e,t){this._disposables.push(e),t.children().remove();var a,t=t.append(this._templateHtml).children()[0];t&&(_.cleanNode(t),this._callbacks&&this._callbacks.beforeRender&&this._callbacks.beforeRender(e),_.applyBindings(e,t),a=setTimeout(()=>{e&&e.updateSurfaceSize()},1),this._disposables.push({dispose:()=>clearTimeout(a)}))}_initializeCallbacks(){var e;if(this._options.callbacks)return e=Ks.generateQueryBuilderEvents((e,t)=>{this._fireEvent(e,t)}),this._checkCallbackName(e),this._generateCallbackDictionary(e)}_createModel(e){return this._callbacks=this._initializeCallbacks(),Hs(e,this._options,this._callbacks,!1)}dispose(){(this._deferreds||[]).forEach(e=>{e.reject()}),super.dispose()}applyBindings(t){var a=T.fn.constructor(t),e=this._options.requestOptions,i=()=>{e&&e.invokeAction&&(this._options.handlerUri=this._getServerActionUrl(e.host,e.invokeAction)),this._deferreds.push(this._createModel(t).done(e=>{this.options.queryBuilderModel(e),this.sender.queryBuilderModel=e,this._createDisposeFunction(t),this._applyBindings(this.sender.queryBuilderModel,a)}))};e?this._getLocalizationRequest().done(e=>{e&&Object(C.addCultureInfo)(e)}).always(()=>{i()}):i()}}const en="dxQueryBuilder";class tn extends v.DxAnalyticsComponentCommon{getBindingName(){return en}}Object(P.registerBaseBinding)(en,"$data"),_.bindingHandlers[en]={init:function(e,t){t=_.unwrap(t());return new Zs(t||{}).applyBindings(e),{controlsDescendantBindings:!0}}},_.bindingHandlers.dxQueryBuilderSurface={init:function(e,t){var t=_.unwrap(t()),a=t.options,i=Object(x.getTemplate)("dxrd-querybuilder"),e=Js(T.fn.constructor(e).append(i).children()[0],a,t.creator);return a.queryBuilderModel(e),{controlsDescendantBindings:!0}}};k=window.DevExpress||{};(e=k).Analytics=e.Analytics||{},e.QueryBuilder=F,e.Analytics.Diagram=t,e.Analytics.Data=a,e.Analytics.Data.Internal=R,e.Analytics.Data.Utils=M,e.Analytics.Data.Metadata=q,e.Analytics.Wizard=i,e.Analytics.Wizard.Internal=r,e.QueryBuilder.Widgets=L,e.QueryBuilder.Widgets.Internal=o,e.QueryBuilder.Metadata=Q,e.QueryBuilder.Utils=V,e.QueryBuilder.Internal=s,e.QueryBuilder.Elements=n,e.QueryBuilder.Elements.Metadata=W,B.default={QueryBuilder:k.QueryBuilder,Analytics:k.Analytics}}]);
|