@elyra/canvas 12.9.0 → 12.10.2
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/.eslintrc.js +1 -1
- package/README.md +1 -1
- package/build.sh +1 -1
- package/dist/canvas-constants-af93267a.js +2 -0
- package/dist/canvas-constants-af93267a.js.map +1 -0
- package/dist/canvas-constants-ffce3b78.js +2 -0
- package/dist/canvas-constants-ffce3b78.js.map +1 -0
- package/dist/canvas-controller-3f67c4fb.js +2 -0
- package/dist/canvas-controller-3f67c4fb.js.map +1 -0
- package/dist/canvas-controller-cee447d2.js +2 -0
- package/dist/canvas-controller-cee447d2.js.map +1 -0
- package/dist/common-canvas-e212a9c1.js +2 -0
- package/dist/common-canvas-e212a9c1.js.map +1 -0
- package/dist/common-canvas-e98191b3.js +2 -0
- package/dist/common-canvas-e98191b3.js.map +1 -0
- package/dist/common-canvas.es.js +1 -1
- package/dist/common-canvas.es.js.map +1 -1
- package/dist/common-canvas.js +1 -1
- package/dist/common-canvas.js.map +1 -1
- package/dist/common-properties-653e50e3.js +2 -0
- package/dist/common-properties-653e50e3.js.map +1 -0
- package/dist/common-properties-e2c6def7.js +2 -0
- package/dist/common-properties-e2c6def7.js.map +1 -0
- package/dist/datarecord-metadata-v3-schema-10ddafaf.js +2 -0
- package/dist/datarecord-metadata-v3-schema-10ddafaf.js.map +1 -0
- package/dist/datarecord-metadata-v3-schema-1504c843.js +2 -0
- package/dist/datarecord-metadata-v3-schema-1504c843.js.map +1 -0
- package/dist/{en-3f6094d9.js → en-517f38fc.js} +2 -2
- package/dist/{en-3f6094d9.js.map → en-517f38fc.js.map} +1 -1
- package/dist/{en-8e5bfa1b.js → en-dc6f2e9f.js} +2 -2
- package/dist/{en-8e5bfa1b.js.map → en-dc6f2e9f.js.map} +1 -1
- package/dist/extends-5a45f92e.js +7 -0
- package/dist/extends-5a45f92e.js.map +1 -0
- package/dist/extends-a52336ca.js +8 -0
- package/dist/extends-a52336ca.js.map +1 -0
- package/dist/flexible-table-e6ccbe58.js +2 -0
- package/dist/flexible-table-e6ccbe58.js.map +1 -0
- package/dist/flexible-table-f60c1680.js +2 -0
- package/dist/flexible-table-f60c1680.js.map +1 -0
- package/dist/index-567978da.js +2 -0
- package/dist/{index-c21aec1b.js.map → index-567978da.js.map} +1 -1
- package/dist/index-59486e9a.js +2 -0
- package/dist/{index-7e2e5c97.js.map → index-59486e9a.js.map} +1 -1
- package/dist/isEmpty-def8f509.js +2 -0
- package/dist/{isEmpty-5d2981b6.js.map → isEmpty-def8f509.js.map} +1 -1
- package/dist/isEmpty-e171b734.js +2 -0
- package/dist/{isEmpty-6528e7c8.js.map → isEmpty-e171b734.js.map} +1 -1
- package/dist/lib/canvas-controller.es.js +2 -0
- package/dist/lib/canvas-controller.es.js.map +1 -0
- package/dist/lib/canvas-controller.js +2 -0
- package/dist/lib/canvas-controller.js.map +1 -0
- package/dist/lib/canvas.es.js +1 -1
- package/dist/lib/canvas.js +1 -1
- package/dist/lib/command-stack.es.js.map +1 -1
- package/dist/lib/command-stack.js.map +1 -1
- package/dist/lib/context-menu.es.js +1 -1
- package/dist/lib/context-menu.es.js.map +1 -1
- package/dist/lib/context-menu.js +1 -1
- package/dist/lib/context-menu.js.map +1 -1
- package/dist/lib/properties/field-picker.es.js +1 -1
- package/dist/lib/properties/field-picker.js +1 -1
- package/dist/lib/properties/flexible-table.es.js +1 -1
- package/dist/lib/properties/flexible-table.js +1 -1
- package/dist/lib/properties.es.js +1 -1
- package/dist/lib/properties.js +1 -1
- package/dist/lib/tooltip.es.js +1 -1
- package/dist/lib/tooltip.es.js.map +1 -1
- package/dist/lib/tooltip.js +1 -1
- package/dist/lib/tooltip.js.map +1 -1
- package/dist/styles/common-canvas.min.css +1 -1
- package/dist/styles/common-canvas.min.css.map +1 -1
- package/dist/toolbar-404bf690.js +2 -0
- package/dist/toolbar-404bf690.js.map +1 -0
- package/dist/toolbar-611d8ab9.js +2 -0
- package/dist/toolbar-611d8ab9.js.map +1 -0
- package/locales/command-actions/locales/index.js +1 -1
- package/locales/common-canvas/locales/index.js +1 -1
- package/locales/common-properties/locales/index.js +1 -1
- package/locales/palette/locales/index.js +1 -1
- package/locales/toolbar/locales/index.js +1 -1
- package/package.json +7 -4
- package/rollup.config.js +11 -8
- package/src/.eslintrc.js +1 -1
- package/src/command-actions/arrangeLayoutAction.js +1 -1
- package/src/command-actions/attachNodeToLinksAction.js +1 -1
- package/src/command-actions/collapseSuperNodeInPlaceAction.js +1 -1
- package/src/command-actions/commonPropertiesAction.js +1 -1
- package/src/command-actions/convertSuperNodeExternalToLocalAction.js +1 -1
- package/src/command-actions/convertSuperNodeLocalToExternalAction.js +1 -1
- package/src/command-actions/createAutoNodeAction.js +1 -1
- package/src/command-actions/createCommentAction.js +1 -1
- package/src/command-actions/createCommentLinkAction.js +1 -1
- package/src/command-actions/createNodeAction.js +1 -1
- package/src/command-actions/createNodeAttachLinksAction.js +1 -1
- package/src/command-actions/createNodeLinkAction.js +1 -1
- package/src/command-actions/createNodeLinkDetachedAction.js +1 -1
- package/src/command-actions/createNodeOnLinkAction.js +1 -1
- package/src/command-actions/createSuperNodeAction.js +1 -1
- package/src/command-actions/deconstructSuperNodeAction.js +1 -1
- package/src/command-actions/deleteLinkAction.js +1 -1
- package/src/command-actions/deleteObjectsAction.js +1 -1
- package/src/command-actions/disconnectObjectsAction.js +1 -1
- package/src/command-actions/displayPreviousPipelineAction.js +1 -1
- package/src/command-actions/displaySubPipelineAction.js +1 -1
- package/src/command-actions/editCommentAction.js +1 -1
- package/src/command-actions/editDecorationLabelAction.js +1 -1
- package/src/command-actions/expandSuperNodeInPlaceAction.js +1 -1
- package/src/command-actions/insertNodeIntoLinkAction.js +1 -1
- package/src/command-actions/moveObjectsAction.js +1 -1
- package/src/command-actions/pasteAction.js +1 -1
- package/src/command-actions/saveToPaletteAction.js +1 -1
- package/src/command-actions/setLinksStyleAction.js +2 -2
- package/src/command-actions/setNodeLabelAction.js +1 -1
- package/src/command-actions/setObjectsStyleAction.js +2 -2
- package/src/command-actions/sizeAndPositionObjectsAction.js +1 -1
- package/src/command-actions/updateLinkAction.js +1 -1
- package/src/command-stack/action.js +1 -1
- package/src/command-stack/command-stack.js +1 -1
- package/src/common-canvas/canvas-controller.js +79 -10
- package/src/common-canvas/cc-bottom-panel.jsx +28 -37
- package/src/common-canvas/cc-central-items.jsx +1 -1
- package/src/common-canvas/cc-contents.jsx +12 -4
- package/src/common-canvas/cc-context-menu.jsx +1 -1
- package/src/common-canvas/cc-right-flyout.jsx +1 -1
- package/src/common-canvas/cc-toolbar.jsx +14 -9
- package/src/common-canvas/common-canvas-utils.js +1 -1
- package/src/common-canvas/common-canvas.jsx +25 -5
- package/src/common-canvas/common-canvas.scss +24 -10
- package/src/common-canvas/d3-zoom-extension/.eslintrc.js +1 -1
- package/src/common-canvas/index.js +1 -1
- package/src/common-canvas/label-util.js +1 -1
- package/src/common-canvas/local-storage.js +1 -1
- package/src/common-canvas/svg-canvas-d3.js +40 -33
- package/src/common-canvas/svg-canvas-d3.scss +2 -3
- package/src/common-canvas/svg-canvas-renderer.js +56 -35
- package/src/common-canvas/svg-canvas-utils-comments.js +1 -1
- package/src/common-canvas/svg-canvas-utils-decs.js +1 -1
- package/src/common-canvas/svg-canvas-utils-display.js +1 -1
- package/src/common-canvas/svg-canvas-utils-links.js +1 -1
- package/src/common-canvas/svg-canvas-utils-nodes.js +1 -1
- package/src/common-properties/actions/action-factory.js +1 -1
- package/src/common-properties/actions/actions.scss +1 -1
- package/src/common-properties/actions/button/button.jsx +1 -1
- package/src/common-properties/actions/button/button.scss +1 -1
- package/src/common-properties/actions/button/index.js +1 -1
- package/src/common-properties/actions/image/image.jsx +1 -1
- package/src/common-properties/actions/image/image.scss +1 -1
- package/src/common-properties/actions/image/index.js +1 -1
- package/src/common-properties/actions.js +1 -1
- package/src/common-properties/common-properties.jsx +1 -1
- package/src/common-properties/components/components.scss +1 -1
- package/src/common-properties/components/control-item/control-item.jsx +1 -1
- package/src/common-properties/components/control-item/control-item.scss +1 -1
- package/src/common-properties/components/control-item/index.js +1 -1
- package/src/common-properties/components/editor-form/editor-form.jsx +1 -1
- package/src/common-properties/components/editor-form/editor-form.scss +1 -1
- package/src/common-properties/components/editor-form/index.js +1 -1
- package/src/common-properties/components/empty-table/empty-table.jsx +1 -1
- package/src/common-properties/components/empty-table/empty-table.scss +1 -1
- package/src/common-properties/components/empty-table/index.js +1 -1
- package/src/common-properties/components/field-picker/field-picker.jsx +1 -1
- package/src/common-properties/components/field-picker/field-picker.scss +1 -1
- package/src/common-properties/components/field-picker/index.js +1 -1
- package/src/common-properties/components/flexible-table/flexible-table.jsx +1 -1
- package/src/common-properties/components/flexible-table/index.js +1 -1
- package/src/common-properties/components/main-editor-properties-buttons/index.js +1 -1
- package/src/common-properties/components/main-editor-properties-buttons/main-editor-properties-buttons.jsx +1 -1
- package/src/common-properties/components/moveable-table-rows/index.js +1 -1
- package/src/common-properties/components/moveable-table-rows/moveable-table-rows.jsx +1 -1
- package/src/common-properties/components/moveable-table-rows/moveable-table-rows.scss +1 -1
- package/src/common-properties/components/properties-buttons/index.js +1 -1
- package/src/common-properties/components/properties-buttons/properties-buttons.jsx +1 -1
- package/src/common-properties/components/properties-buttons/properties-buttons.scss +1 -1
- package/src/common-properties/components/properties-editor/index.js +1 -1
- package/src/common-properties/components/properties-editor/properties-editor.jsx +1 -1
- package/src/common-properties/components/properties-modal/index.js +1 -1
- package/src/common-properties/components/properties-modal/properties-modal.jsx +1 -1
- package/src/common-properties/components/properties-modal/properties-modal.scss +1 -1
- package/src/common-properties/components/title-editor/index.js +1 -1
- package/src/common-properties/components/title-editor/title-editor.jsx +1 -1
- package/src/common-properties/components/title-editor/title-editor.scss +1 -1
- package/src/common-properties/components/truncated-content-tooltip/index.js +1 -1
- package/src/common-properties/components/truncated-content-tooltip/truncated-content-tooltip.jsx +7 -2
- package/src/common-properties/components/truncated-content-tooltip/truncated-content-tooltip.scss +1 -1
- package/src/common-properties/components/validation-message/index.js +1 -1
- package/src/common-properties/components/validation-message/validation-message.jsx +1 -1
- package/src/common-properties/components/validation-message/validation-message.scss +1 -1
- package/src/common-properties/components/virtualized-table/index.js +1 -1
- package/src/common-properties/components/virtualized-table/virtualized-table.jsx +2 -3
- package/src/common-properties/components/virtualized-table/virtualized-table.scss +1 -1
- package/src/common-properties/components/wide-flyout/index.js +1 -1
- package/src/common-properties/components/wide-flyout/wide-flyout.jsx +1 -1
- package/src/common-properties/components/wide-flyout/wide-flyout.scss +1 -1
- package/src/common-properties/constants/constants.js +2 -2
- package/src/common-properties/constants/form-constants.js +1 -1
- package/src/common-properties/controls/abstract-table.jsx +1 -1
- package/src/common-properties/controls/abstract-table.scss +1 -1
- package/src/common-properties/controls/checkbox/checkbox.jsx +1 -1
- package/src/common-properties/controls/checkbox/checkbox.scss +1 -1
- package/src/common-properties/controls/checkbox/index.js +1 -1
- package/src/common-properties/controls/checkboxset/checkboxset.jsx +1 -1
- package/src/common-properties/controls/checkboxset/checkboxset.scss +1 -1
- package/src/common-properties/controls/checkboxset/index.js +1 -1
- package/src/common-properties/controls/control-factory.js +1 -1
- package/src/common-properties/controls/controls.scss +1 -1
- package/src/common-properties/controls/datefield/datefield.jsx +32 -32
- package/src/common-properties/controls/datefield/index.js +1 -1
- package/src/common-properties/controls/dropdown/dropdown.jsx +1 -1
- package/src/common-properties/controls/dropdown/dropdown.scss +1 -1
- package/src/common-properties/controls/dropdown/index.js +1 -1
- package/src/common-properties/controls/expression/expression-builder/expression-builder.jsx +1 -1
- package/src/common-properties/controls/expression/expression-builder/expression-builder.scss +1 -1
- package/src/common-properties/controls/expression/expression-builder/expression-select-field-function.jsx +1 -1
- package/src/common-properties/controls/expression/expression-builder/expression-select-operator.jsx +1 -1
- package/src/common-properties/controls/expression/expression-builder/expression-selection-panel.jsx +1 -1
- package/src/common-properties/controls/expression/expression.jsx +1 -1
- package/src/common-properties/controls/expression/expression.scss +1 -1
- package/src/common-properties/controls/expression/expressionInfo-parser.js +1 -1
- package/src/common-properties/controls/expression/index.js +1 -1
- package/src/common-properties/controls/expression/languages/CLEM-hint.js +1 -1
- package/src/common-properties/controls/expression/languages/python-hint.js +1 -1
- package/src/common-properties/controls/expression/languages/r-hint.js +1 -1
- package/src/common-properties/controls/list/index.js +1 -1
- package/src/common-properties/controls/list/list.jsx +1 -1
- package/src/common-properties/controls/multiselect/index.js +1 -1
- package/src/common-properties/controls/multiselect/multiselect.jsx +1 -1
- package/src/common-properties/controls/multiselect/multiselect.scss +1 -1
- package/src/common-properties/controls/numberfield/index.js +1 -1
- package/src/common-properties/controls/numberfield/numberfield.jsx +1 -1
- package/src/common-properties/controls/numberfield/numberfield.scss +1 -1
- package/src/common-properties/controls/passwordfield/index.js +1 -1
- package/src/common-properties/controls/passwordfield/passwordfield.jsx +1 -1
- package/src/common-properties/controls/radioset/index.js +1 -1
- package/src/common-properties/controls/radioset/radioset.jsx +1 -1
- package/src/common-properties/controls/radioset/radioset.scss +1 -1
- package/src/common-properties/controls/readonly/index.js +1 -1
- package/src/common-properties/controls/readonly/readonly.jsx +13 -8
- package/src/common-properties/controls/readonly/readonly.scss +1 -1
- package/src/common-properties/controls/readonlytable/index.js +1 -1
- package/src/common-properties/controls/readonlytable/readonlytable.jsx +1 -1
- package/src/common-properties/controls/selectcolumns/index.js +1 -1
- package/src/common-properties/controls/selectcolumns/selectcolumns.jsx +1 -1
- package/src/common-properties/controls/selectcolumns/selectcolumns.scss +1 -1
- package/src/common-properties/controls/someofselect/index.js +1 -1
- package/src/common-properties/controls/someofselect/someofselect.jsx +1 -1
- package/src/common-properties/controls/someofselect/someofselect.scss +1 -1
- package/src/common-properties/controls/structureeditor/index.js +1 -1
- package/src/common-properties/controls/structureeditor/structureeditor.jsx +1 -1
- package/src/common-properties/controls/structureeditor/structureeditor.scss +1 -1
- package/src/common-properties/controls/structurelisteditor/index.js +1 -1
- package/src/common-properties/controls/structurelisteditor/structurelisteditor.jsx +1 -1
- package/src/common-properties/controls/structuretable/index.js +1 -1
- package/src/common-properties/controls/structuretable/structuretable.jsx +1 -1
- package/src/common-properties/controls/textarea/index.js +1 -1
- package/src/common-properties/controls/textarea/textarea.jsx +1 -1
- package/src/common-properties/controls/textarea/textarea.scss +1 -1
- package/src/common-properties/controls/textfield/index.js +1 -1
- package/src/common-properties/controls/textfield/textfield.jsx +1 -1
- package/src/common-properties/controls/textfield/textfield.scss +1 -1
- package/src/common-properties/controls/timefield/index.js +1 -1
- package/src/common-properties/controls/timefield/timefield.jsx +32 -33
- package/src/common-properties/controls/toggletext/index.js +1 -1
- package/src/common-properties/controls/toggletext/toggletext.jsx +1 -1
- package/src/common-properties/controls/toggletext/toggletext.scss +1 -1
- package/src/common-properties/form/ActionInfo.js +1 -1
- package/src/common-properties/form/Conditions.js +1 -1
- package/src/common-properties/form/ControlInfo.js +1 -1
- package/src/common-properties/form/EditorForm.js +1 -1
- package/src/common-properties/form/Form.js +1 -1
- package/src/common-properties/form/GroupInfo.js +1 -1
- package/src/common-properties/form/ParameterInfo.js +1 -1
- package/src/common-properties/form/PropertyDef.js +1 -1
- package/src/common-properties/form/StructureInfo.js +1 -1
- package/src/common-properties/form/UIItem.js +1 -1
- package/src/common-properties/index.js +1 -1
- package/src/common-properties/index.scss +1 -1
- package/src/common-properties/panels/action-panel/action-panel.jsx +1 -1
- package/src/common-properties/panels/action-panel/action-panel.scss +1 -1
- package/src/common-properties/panels/action-panel/index.js +1 -1
- package/src/common-properties/panels/column/column.jsx +1 -1
- package/src/common-properties/panels/column/column.scss +1 -1
- package/src/common-properties/panels/column/index.js +1 -1
- package/src/common-properties/panels/control/control.jsx +1 -1
- package/src/common-properties/panels/control/control.scss +1 -1
- package/src/common-properties/panels/control/index.js +1 -1
- package/src/common-properties/panels/panels.scss +1 -1
- package/src/common-properties/panels/selector/index.js +1 -1
- package/src/common-properties/panels/selector/selector.jsx +1 -1
- package/src/common-properties/panels/sub-panel/button.jsx +1 -1
- package/src/common-properties/panels/sub-panel/cell.jsx +1 -1
- package/src/common-properties/panels/sub-panel/invoker.jsx +1 -1
- package/src/common-properties/panels/sub-panel/sub-panel.scss +1 -1
- package/src/common-properties/panels/subtabs/index.js +1 -1
- package/src/common-properties/panels/subtabs/subtabs.jsx +1 -1
- package/src/common-properties/panels/subtabs/subtabs.scss +1 -1
- package/src/common-properties/panels/summary/index.js +1 -1
- package/src/common-properties/panels/summary/summary.jsx +1 -1
- package/src/common-properties/panels/summary/summary.scss +1 -1
- package/src/common-properties/panels/text-panel/index.js +1 -1
- package/src/common-properties/panels/text-panel/text-panel.jsx +1 -1
- package/src/common-properties/panels/text-panel/text-panel.scss +1 -1
- package/src/common-properties/panels/twisty/index.js +1 -1
- package/src/common-properties/panels/twisty/twisty.jsx +1 -1
- package/src/common-properties/panels/twisty/twisty.scss +1 -1
- package/src/common-properties/properties-controller.js +1 -1
- package/src/common-properties/properties-main/index.js +1 -1
- package/src/common-properties/properties-main/properties-main-widths.scss +1 -1
- package/src/common-properties/properties-main/properties-main.jsx +1 -1
- package/src/common-properties/properties-main/properties-main.scss +1 -1
- package/src/common-properties/properties-store.js +1 -1
- package/src/common-properties/reducers/action-states.js +1 -1
- package/src/common-properties/reducers/component-metadata.js +1 -1
- package/src/common-properties/reducers/control-states.js +1 -1
- package/src/common-properties/reducers/dataset-metadata.js +1 -1
- package/src/common-properties/reducers/disable-row-move-buttons.js +1 -1
- package/src/common-properties/reducers/error-messages.js +1 -1
- package/src/common-properties/reducers/panel-states.js +1 -1
- package/src/common-properties/reducers/properties.js +1 -1
- package/src/common-properties/reducers/row-selections.js +1 -1
- package/src/common-properties/reducers/row-static.js +1 -1
- package/src/common-properties/reducers/save-button-disable.jsx +1 -1
- package/src/common-properties/schema-validator/properties-schema-validator.js +2 -2
- package/src/common-properties/ui-conditions/condition-ops/cellNotEmpty.js +1 -1
- package/src/common-properties/ui-conditions/condition-ops/colDoesExists.js +1 -1
- package/src/common-properties/ui-conditions/condition-ops/colNotExists.js +1 -1
- package/src/common-properties/ui-conditions/condition-ops/condition-ops.js +1 -1
- package/src/common-properties/ui-conditions/condition-ops/contains.js +1 -1
- package/src/common-properties/ui-conditions/condition-ops/dmMeasurementEquals.js +1 -1
- package/src/common-properties/ui-conditions/condition-ops/dmMeasurementNotEquals.js +1 -1
- package/src/common-properties/ui-conditions/condition-ops/dmRoleEquals.js +1 -1
- package/src/common-properties/ui-conditions/condition-ops/dmRoleNotEquals.js +1 -1
- package/src/common-properties/ui-conditions/condition-ops/dmTypeEquals.js +1 -1
- package/src/common-properties/ui-conditions/condition-ops/dmTypeNotEquals.js +1 -1
- package/src/common-properties/ui-conditions/condition-ops/equals.js +1 -1
- package/src/common-properties/ui-conditions/condition-ops/greaterThan.js +1 -1
- package/src/common-properties/ui-conditions/condition-ops/isDateTime.js +7 -5
- package/src/common-properties/ui-conditions/condition-ops/isEmpty.js +1 -1
- package/src/common-properties/ui-conditions/condition-ops/isNotEmpty.js +1 -1
- package/src/common-properties/ui-conditions/condition-ops/lengthEquals.js +1 -1
- package/src/common-properties/ui-conditions/condition-ops/lengthGreaterThan.js +1 -1
- package/src/common-properties/ui-conditions/condition-ops/lengthLessThan.js +1 -1
- package/src/common-properties/ui-conditions/condition-ops/lessThan.js +1 -1
- package/src/common-properties/ui-conditions/condition-ops/matches.js +1 -1
- package/src/common-properties/ui-conditions/condition-ops/notContains.js +1 -1
- package/src/common-properties/ui-conditions/condition-ops/notEquals.js +1 -1
- package/src/common-properties/ui-conditions/condition-ops/notMatches.js +1 -1
- package/src/common-properties/ui-conditions/conditions-utils.js +1 -1
- package/src/common-properties/ui-conditions/ui-conditions-parser.js +1 -1
- package/src/common-properties/ui-conditions/ui-conditions.js +1 -1
- package/src/common-properties/ui-conditions/ui-groups-parser.js +1 -1
- package/src/common-properties/util/L10nProvider.js +1 -1
- package/src/common-properties/util/control-utils.js +1 -1
- package/src/common-properties/util/property-utils.js +1 -1
- package/src/context-menu/common-context-menu.jsx +12 -3
- package/src/context-menu/context-menu-wrapper.jsx +1 -1
- package/src/context-menu/context-menu.scss +1 -1
- package/src/flow-validation/validate-flow.js +2 -2
- package/src/icons/icon.jsx +1 -1
- package/src/icons/icon.scss +1 -1
- package/src/index.js +1 -1
- package/src/index.scss +1 -1
- package/src/logging/canvas-logger.js +1 -1
- package/src/notification-panel/notification-panel.jsx +1 -1
- package/src/notification-panel/notification-panel.scss +1 -1
- package/src/object-model/api-pipeline.js +9 -37
- package/src/object-model/canvas-in-handler.js +2 -2
- package/src/object-model/canvas-out-handler.js +1 -1
- package/src/object-model/config-utils.js +2 -2
- package/src/object-model/layout-dimensions.js +1 -1
- package/src/object-model/object-model.js +1 -1
- package/src/object-model/pipeline-in-handler.js +2 -3
- package/src/object-model/pipeline-out-handler.js +1 -1
- package/src/object-model/redux/canvas-store.js +69 -1
- package/src/object-model/redux/reducers/bottompanel.js +1 -1
- package/src/object-model/redux/reducers/breadcrumbs.js +1 -1
- package/src/object-model/redux/reducers/canvasconfig.js +1 -1
- package/src/object-model/redux/reducers/canvasinfo.js +1 -1
- package/src/object-model/redux/reducers/canvastoolbar.js +1 -1
- package/src/object-model/redux/reducers/categories.js +1 -1
- package/src/object-model/redux/reducers/comments.js +1 -1
- package/src/object-model/redux/reducers/contextmenu.js +1 -1
- package/src/object-model/redux/reducers/externalpipelineflows.js +1 -1
- package/src/object-model/redux/reducers/links.js +1 -1
- package/src/object-model/redux/reducers/nodes.js +1 -1
- package/src/object-model/redux/reducers/nodetypes.js +1 -1
- package/src/object-model/redux/reducers/notificationpanel.js +1 -1
- package/src/object-model/redux/reducers/notifications.js +1 -1
- package/src/object-model/redux/reducers/palette.js +1 -1
- package/src/object-model/redux/reducers/ports.js +1 -1
- package/src/object-model/redux/reducers/rightflyout.js +1 -1
- package/src/object-model/redux/reducers/selectioninfo.js +1 -1
- package/src/object-model/redux/reducers/tooltip.js +1 -1
- package/src/object-model/schemas-utils/schema-validator.js +2 -2
- package/src/object-model/schemas-utils/upgrade-palette.js +1 -1
- package/src/palette/palette-content-list-item.jsx +7 -6
- package/src/palette/palette-content-list.jsx +4 -2
- package/src/palette/palette-dialog-content-categories.jsx +1 -1
- package/src/palette/palette-dialog-content-category.jsx +1 -1
- package/src/palette/palette-dialog-content-grid-node.jsx +8 -7
- package/src/palette/palette-dialog-content-grid.jsx +4 -1
- package/src/palette/palette-dialog-content.jsx +5 -2
- package/src/palette/palette-dialog-topbar-three-way-icon.jsx +1 -1
- package/src/palette/palette-dialog-topbar.jsx +1 -1
- package/src/palette/palette-dialog.jsx +4 -2
- package/src/palette/palette-flyout-content-category.jsx +1 -1
- package/src/palette/palette-flyout-content-filtered-list.jsx +3 -1
- package/src/palette/palette-flyout-content-search.jsx +1 -1
- package/src/palette/palette-flyout-content.jsx +6 -3
- package/src/palette/palette-flyout-utils.js +5 -5
- package/src/palette/palette-flyout.jsx +4 -2
- package/src/palette/palette.jsx +6 -2
- package/src/palette/palette.scss +1 -1
- package/src/toolbar/toolbar-action-item.jsx +19 -6
- package/src/toolbar/toolbar-divider-item.jsx +1 -1
- package/src/toolbar/toolbar-overflow-item.jsx +1 -1
- package/src/toolbar/toolbar.jsx +2 -6
- package/src/toolbar/toolbar.scss +2 -2
- package/src/tooltip/tooltip.jsx +1 -1
- package/src/tooltip/tooltip.scss +1 -1
- package/stats.html +1 -1
- package/utils/logger.js +1 -1
- package/dist/canvas-controller-6f6b6511.js +0 -2
- package/dist/canvas-controller-6f6b6511.js.map +0 -1
- package/dist/canvas-controller-bf6c2800.js +0 -2
- package/dist/canvas-controller-bf6c2800.js.map +0 -1
- package/dist/common-properties-20877208.js +0 -2
- package/dist/common-properties-20877208.js.map +0 -1
- package/dist/common-properties-ea686c1c.js +0 -2
- package/dist/common-properties-ea686c1c.js.map +0 -1
- package/dist/datarecord-metadata-v3-schema-b4ad907c.js +0 -2
- package/dist/datarecord-metadata-v3-schema-b4ad907c.js.map +0 -1
- package/dist/datarecord-metadata-v3-schema-bf4483dd.js +0 -2
- package/dist/datarecord-metadata-v3-schema-bf4483dd.js.map +0 -1
- package/dist/extends-112ec8af.js +0 -8
- package/dist/extends-112ec8af.js.map +0 -1
- package/dist/extends-51fe578d.js +0 -7
- package/dist/extends-51fe578d.js.map +0 -1
- package/dist/flexible-table-13570aa9.js +0 -2
- package/dist/flexible-table-13570aa9.js.map +0 -1
- package/dist/flexible-table-20276887.js +0 -2
- package/dist/flexible-table-20276887.js.map +0 -1
- package/dist/index-7e2e5c97.js +0 -2
- package/dist/index-c21aec1b.js +0 -2
- package/dist/isEmpty-5d2981b6.js +0 -2
- package/dist/isEmpty-6528e7c8.js +0 -2
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{_ as e,a as t}from"./createClass-32a0cf0f.js";import{_ as n,a as i,b as o,c as a,d as r}from"./getPrototypeOf-97272efe.js";import s from"react";import{connect as l,Provider as c}from"react-redux";import{injectIntl as d}from"react-intl";import u from"prop-types";import{h as p,B as h,s as f,d as g,c as y,g as v,k as m,H as b}from"./isEmpty-6528e7c8.js";import{t as _,u as k,U as P,v as I,I as N,r as w,w as C,x as S,y as L,z as x,B as T,F as E,G as O,H as D,J as j,W as A,K as M,L as R,N as U,O as F,Q as z,V as B,X as H,Y as G,Z as q,$ as V,a0 as Y,a1 as W,a2 as X,a3 as $,a4 as Z,a5 as K,a6 as J,a7 as Q,a8 as ee,a9 as te,aa as ne,ab as ie,ac as oe,ad as ae,ae as re,af as se,ag as le,ah as ce,ai as de,aj as ue,ak as pe,al as he,am as fe,an as ge,ao as ye,ap as ve,aq as me,ar as be,as as _e,at as ke,au as Pe,av as Ie,aw as Ne,ax as we,ay as Ce,az as Se,aA as Le,aB as xe,aC as Te,aD as Ee,aE as Oe,aF as De,aG as je,aH as Ae,aI as Me,aJ as Re,aK as Ue,aL as Fe,aM as ze,aN as Be,aO as He,aP as Ge,aQ as qe,aR as Ve,aS as Ye,aT as We,aU as Xe,aV as $e,aW as Ze,aX as Ke,aY as Je}from"./extends-51fe578d.js";import Qe from"react-inlinesvg";import{t as et,d as tt,s as nt,T as it,h as ot,A as at,b as rt,c as st,i as lt,l as ct,g as dt,u as ut}from"./datarecord-metadata-v3-schema-b4ad907c.js";import{i as pt,h as ht,q as ft,r as gt,t as yt,u as vt,y as mt,v as bt,w as _t,m as kt,n as Pt,a as It,j as Nt}from"./en-8e5bfa1b.js";import{InlineLoading as wt,Search as Ct,Button as St}from"carbon-components-react";import Lt from"./lib/tooltip.es.js";import xt from"react-resize-detector";import Tt from"./lib/context-menu.es.js";import{Locked16 as Et,EditOff16 as Ot,FlowData16 as Dt,Close16 as jt}from"@carbon/icons-react";import At from"./lib/command-stack.es.js";import{v4 as Mt}from"uuid";import{combineReducers as Rt,createStore as Ut}from"redux";import{extractVersion as Ft,LATEST_VERSION as zt,upgradePipelineFlow as Bt}from"@elyra/pipeline-schemas";var Ht="Find palette nodes",Gt="No results found.",qt="Try adjusting your search to find what you're looking for.",Vt="Results restricted to 10 nodes. Try refining your search.",Yt="Show more",Wt="Show less",Xt="Flyout Palette",$t="Dialog Palette";function Zt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,a=i(e);if(t){var r=i(this).constructor;n=Reflect.construct(a,arguments,r)}else n=a.apply(this,arguments);return o(this,n)}}var Kt=function(i){n(r,i);var o=Zt(r);function r(t){var n;return e(this,r),(n=o.call(this,t)).state={hover:!1},n.iconClicked=n.iconClicked.bind(a(n)),n.mouseEnter=n.mouseEnter.bind(a(n)),n.mouseLeave=n.mouseLeave.bind(a(n)),n.mouseDown=n.mouseDown.bind(a(n)),n}return t(r,[{key:"iconClicked",value:function(){this.props.iconClickedMethod()}},{key:"mouseEnter",value:function(){this.setState({hover:!0})}},{key:"mouseLeave",value:function(){this.setState({hover:!1})}},{key:"mouseDown",value:function(e){e.stopPropagation()}},{key:"render",value:function(){var e=this.props.selectedIconName;return this.props.isSelected||(e=this.state.hover?this.props.hoverIconName:this.props.deselectedIconName),s.createElement("div",{draggable:"false",className:"palette-three-way-icon-div"},s.createElement("img",{src:e,draggable:"false",onClick:this.iconClicked,onMouseEnter:this.mouseEnter,onMouseLeave:this.mouseLeave,onMouseDown:this.mouseDown}))}}]),r}(s.Component);Kt.propTypes={iconClickedMethod:u.func.isRequired,isSelected:u.bool.isRequired,selectedIconName:u.string.isRequired,hoverIconName:u.string.isRequired,deselectedIconName:u.string.isRequired};var Jt=Kt;function Qt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,a=i(e);if(t){var r=i(this).constructor;n=Reflect.construct(a,arguments,r)}else n=a.apply(this,arguments);return o(this,n)}}var en=function(i){n(r,i);var o=Qt(r);function r(t){var n;return e(this,r),(n=o.call(this,t)).state={},n.mouseDown=n.mouseDown.bind(a(n)),n.doubleClick=n.doubleClick.bind(a(n)),n.close=n.close.bind(a(n)),n.gridViewSelected=n.gridViewSelected.bind(a(n)),n.listViewSelected=n.listViewSelected.bind(a(n)),n}return t(r,[{key:"mouseDown",value:function(e){this.props.mouseDownMethod(e)}},{key:"doubleClick",value:function(e){this.props.windowMaximizeMethod(e)}},{key:"close",value:function(e){this.props.canvasController.closePalette(e)}},{key:"gridViewSelected",value:function(){this.props.showGridMethod(!0)}},{key:"listViewSelected",value:function(){this.props.showGridMethod(!1)}},{key:"render",value:function(){return s.createElement("div",{className:"palette-dialog-topbar",onMouseDown:this.mouseDown,onDoubleClick:this.doubleClick},s.createElement("span",{className:"left-navbar"},s.createElement(Jt,{iconClickedMethod:this.gridViewSelected,isSelected:this.props.showGrid,selectedIconName:"data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2016%2016%22%20enable-background%3D%22new%200%200%2016%2016%22%3E%3Cg%20fill%3D%22%233D70B2%22%3E%3Cpath%20d%3D%22m9.8%200h6.2v6.2h-6.2z%22%2F%3E%3Cpath%20d%3D%22M8.6%2C0H7.4H0v7.4v1.2V16h7.4h1.2H16V8.6V7.4H8.6V0z%20M7.4%2C14.8H1.2V8.6h6.2V14.8z%20M14.8%2C8.6v6.2H8.6V8.6%20%20H14.8z%20M1.2%2C7.4V1.2h6.2v6.2H1.2z%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E",hoverIconName:"data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2016%2016%22%20enable-background%3D%22new%200%200%2016%2016%22%3E%3Cg%20fill%3D%22%235596e6%22%3E%3Cpath%20d%3D%22m9.8%200h6.2v6.2h-6.2z%22%2F%3E%3Cpath%20d%3D%22M8.6%2C0H7.4H0v7.4v1.2V16h7.4h1.2H16V8.6V7.4H8.6V0z%20M7.4%2C14.8H1.2V8.6h6.2V14.8z%20M14.8%2C8.6v6.2H8.6V8.6%20%20H14.8z%20M1.2%2C7.4V1.2h6.2v6.2H1.2z%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E",deselectedIconName:"data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2016%2016%22%20enable-background%3D%22new%200%200%2016%2016%22%3E%3Cg%20fill%3D%22%23C7C7C7%22%3E%3Cpath%20d%3D%22m9.8%200h6.2v6.2h-6.2z%22%2F%3E%3Cpath%20d%3D%22M8.6%2C0H7.4H0v7.4v1.2V16h7.4h1.2H16V8.6V7.4H8.6V0z%20M7.4%2C14.8H1.2V8.6h6.2V14.8z%20M14.8%2C8.6v6.2H8.6V8.6%20%20H14.8z%20M1.2%2C7.4V1.2h6.2v6.2H1.2z%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E"}),s.createElement(Jt,{iconClickedMethod:this.listViewSelected,isSelected:!this.props.showGrid,selectedIconName:"data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2016%2016%22%20enable-background%3D%22new%200%200%2016%2016%22%3E%3Cg%20fill%3D%22%233D70B2%22%3E%3Cpath%20d%3D%22m0%2014.5h1.5v1.5h-1.5z%22%2F%3E%3Cpath%20d%3D%22m3.3%2014.5h12.7v1.5h-12.7z%22%2F%3E%3Cpath%20d%3D%22m0%209.7h1.5v1.5h-1.5z%22%2F%3E%3Cpath%20d%3D%22m3.3%209.7h12.7v1.5h-12.7z%22%2F%3E%3Cpath%20d%3D%22m0%204.8h1.5v1.5h-1.5z%22%2F%3E%3Cpath%20d%3D%22m3.3%204.8h12.7v1.5h-12.7z%22%2F%3E%3Cpath%20d%3D%22m0%200h1.5v1.5h-1.5z%22%2F%3E%3Cpath%20d%3D%22m3.3%200h12.7v1.5h-12.7z%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E",hoverIconName:"data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2016%2016%22%20enable-background%3D%22new%200%200%2016%2016%22%3E%3Cg%20fill%3D%22%235596e6%22%3E%3Cpath%20d%3D%22m0%2014.5h1.5v1.5h-1.5z%22%2F%3E%3Cpath%20d%3D%22m3.3%2014.5h12.7v1.5h-12.7z%22%2F%3E%3Cpath%20d%3D%22m0%209.7h1.5v1.5h-1.5z%22%2F%3E%3Cpath%20d%3D%22m3.3%209.7h12.7v1.5h-12.7z%22%2F%3E%3Cpath%20d%3D%22m0%204.8h1.5v1.5h-1.5z%22%2F%3E%3Cpath%20d%3D%22m3.3%204.8h12.7v1.5h-12.7z%22%2F%3E%3Cpath%20d%3D%22m0%200h1.5v1.5h-1.5z%22%2F%3E%3Cpath%20d%3D%22m3.3%200h12.7v1.5h-12.7z%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E",deselectedIconName:"data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2016%2016%22%20enable-background%3D%22new%200%200%2016%2016%22%3E%3Cg%20fill%3D%22%23C7C7C7%22%3E%3Cpath%20d%3D%22m0%2014.5h1.5v1.5h-1.5z%22%2F%3E%3Cpath%20d%3D%22m3.3%2014.5h12.7v1.5h-12.7z%22%2F%3E%3Cpath%20d%3D%22m0%209.7h1.5v1.5h-1.5z%22%2F%3E%3Cpath%20d%3D%22m3.3%209.7h12.7v1.5h-12.7z%22%2F%3E%3Cpath%20d%3D%22m0%204.8h1.5v1.5h-1.5z%22%2F%3E%3Cpath%20d%3D%22m3.3%204.8h12.7v1.5h-12.7z%22%2F%3E%3Cpath%20d%3D%22m0%200h1.5v1.5h-1.5z%22%2F%3E%3Cpath%20d%3D%22m3.3%200h12.7v1.5h-12.7z%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E"})),s.createElement("span",{className:"right-navbar"},s.createElement("a",{className:"secondary-action",onClick:this.close},s.createElement("img",{src:"data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2032%2032%22%3E%3Cpath%20style%3D%22fill%3A%233D70B2%22%20d%3D%22M20.293%2010.293L16%2014.586l-4.293-4.293-1.414%201.414L14.586%2016l-4.293%204.293%201.414%201.414L16%2017.414l4.293%204.293%201.414-1.414L17.414%2016l4.293-4.293z%22%2F%3E%3Cpath%20style%3D%22fill%3A%233D70B2%22%20d%3D%22M16%202C8.269%202%202%208.269%202%2016s6.269%2014%2014%2014%2014-6.269%2014-14S23.731%202%2016%202zm0%2026C9.383%2028%204%2022.617%204%2016S9.383%204%2016%204s12%205.383%2012%2012-5.383%2012-12%2012z%22%2F%3E%3C%2Fsvg%3E",draggable:"false",className:"close-icon"}))))}}]),r}(s.Component);en.propTypes={showGridMethod:u.func.isRequired,windowMaximizeMethod:u.func.isRequired,showGrid:u.bool.isRequired,mouseDownMethod:u.func.isRequired,canvasController:u.object.isRequired};var tn=en;function nn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,a=i(e);if(t){var r=i(this).constructor;n=Reflect.construct(a,arguments,r)}else n=a.apply(this,arguments);return o(this,n)}}var on=function(i){n(r,i);var o=nn(r);function r(t){var n;return e(this,r),(n=o.call(this,t)).state={},n.categorySelected=n.categorySelected.bind(a(n)),n}return t(r,[{key:"categorySelected",value:function(e){this.props.categorySelectedMethod(e)}},{key:"render",value:function(){var e="palette-dialog-category";return this.props.selectedCategory===this.props.category.label&&(e="palette-dialog-category-selected"),s.createElement("div",{"data-id":this.props.category.id,className:e,onClick:this.categorySelected},this.props.category.label)}}]),r}(s.Component);on.propTypes={category:u.object.isRequired,selectedCategory:u.string.isRequired,categorySelectedMethod:u.func.isRequired};var an=on;function rn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,a=i(e);if(t){var r=i(this).constructor;n=Reflect.construct(a,arguments,r)}else n=a.apply(this,arguments);return o(this,n)}}var sn=function(i){n(a,i);var o=rn(a);function a(t){var n;return e(this,a),(n=o.call(this,t)).state={},n}return t(a,[{key:"render",value:function(){for(var e=[],t=0;t<this.props.categories.length;t++)e.push(s.createElement(an,{key:this.props.categories[t].label,category:this.props.categories[t],selectedCategory:this.props.selectedCategory,categorySelectedMethod:this.props.categorySelectedMethod}));return s.createElement("div",{className:"palette-dialog-categories palette-scroll"},e)}}]),a}(s.Component);sn.propTypes={categories:u.array.isRequired,selectedCategory:u.string.isRequired,categorySelectedMethod:u.func.isRequired};var ln=sn,cn="data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2064%2060%22%3E%20%3Cpath%20d%3D%22M32%2C42a1.61%2C1.61%2C0%2C0%2C1-.8-.2L9.28%2C30.15l1.6-2.94L32%2C38.47%2C53.12%2C27.21l1.6%2C2.94L32.8%2C41.84A1.71%2C1.71%2C0%2C0%2C1%2C32%2C42Z%22%2F%3E%20%3Cpath%20d%3D%22M32%2C52.05a1.72%2C1.72%2C0%2C0%2C1-.8-.2L9.28%2C40.17l1.6-2.94L32%2C48.48%2C53.12%2C37.23l1.6%2C2.94L32.8%2C51.85A1.72%2C1.72%2C0%2C0%2C1%2C32%2C52.05Z%22%2F%3E%20%3Cpath%20d%3D%22M32%2C32a1.72%2C1.72%2C0%2C0%2C1-.8-.2L9.28%2C20.14a1.66%2C1.66%2C0%2C0%2C1%2C0-2.94L31.2%2C5.52a1.68%2C1.68%2C0%2C0%2C1%2C1.6%2C0L54.72%2C17.2a1.66%2C1.66%2C0%2C0%2C1%2C.69%2C2.26%2C1.74%2C1.74%2C0%2C0%2C1-.69.68L32.8%2C31.82A1.72%2C1.72%2C0%2C0%2C1%2C32%2C32ZM13.64%2C18.67%2C32%2C28.46l18.36-9.79L32%2C8.88Z%22%2F%3E%20%3Crect%20x%3D%225.02%22%20y%3D%221.98%22%20width%3D%2253.96%22%20height%3D%2253.41%22%20fill%3D%22none%22%2F%3E%3C%2Fsvg%3E",dn="data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2064%2060%22%3E%20%3Cdefs%3E%20%20%3CclipPath%20id%3D%22a%22%3E%20%20%20%3Cpolygon%20points%3D%2217.28%204.63%2026.88%2014.07%2024.74%2015.87%2018.94%2010.35%2018.94%2026.29%2015.78%2026.29%2015.78%2010.35%209.97%2016.12%207.91%2014.04%2017.28%204.63%22%2F%3E%20%20%3C%2FclipPath%3E%20%20%3CclipPath%20id%3D%22b%22%3E%20%20%20%3Cpath%20d%3D%22M32.39%2C6.36l.2.1%2C20.35%2C11a2.7%2C2.7%2C0%2C0%2C1%2C1.11%2C1.11%2C2.74%2C2.74%2C0%2C0%2C1-.89%2C3.59l-.22.13L33%2C33a2.66%2C2.66%2C0%2C0%2C1-2.51%2C0l-6-3.13a1.83%2C1.83%2C0%2C1%2C1%2C1.69-3.25l5.57%2C2.89%2C18-9.69L30.85%2C9.68A1.83%2C1.83%2C0%2C0%2C1%2C30%2C7.39l.09-.19A1.83%2C1.83%2C0%2C0%2C1%2C32.39%2C6.36Z%22%20%20%20clip-path%3D%22url%28%23a%29%22%2F%3E%20%20%3C%2FclipPath%3E%20%3C%2Fdefs%3E%20%3Cpolygon%20points%3D%2217.28%204.63%2026.88%2014.07%2024.74%2015.87%2018.94%2010.35%2018.94%2026.29%2015.78%2026.29%2015.78%2010.35%209.97%2016.12%207.91%2014.04%2017.28%204.63%22%2F%3E%20%3Cpath%20d%3D%22M32.39%2C6.36l.2.1%2C20.35%2C11a2.7%2C2.7%2C0%2C0%2C1%2C1.11%2C1.11%2C2.74%2C2.74%2C0%2C0%2C1-.89%2C3.59l-.22.13L33%2C33a2.66%2C2.66%2C0%2C0%2C1-2.51%2C0l-6-3.13a1.83%2C1.83%2C0%2C1%2C1%2C1.69-3.25l5.57%2C2.89%2C18-9.69L30.85%2C9.68A1.83%2C1.83%2C0%2C0%2C1%2C30%2C7.39l.09-.19A1.83%2C1.83%2C0%2C0%2C1%2C32.39%2C6.36Z%22%2F%3E%20%3Cpath%20d%3D%22M53%2C28.53l1.62%2C3L32.52%2C43.43a1.59%2C1.59%2C0%2C0%2C1-.8.21%2C1.66%2C1.66%2C0%2C0%2C1-.81-.21L8.8%2C31.53l1.61-3L31.72%2C40Z%22%2F%3E%20%3Cpath%20d%3D%22M53%2C38.74l1.62%2C3L32.52%2C53.64a1.69%2C1.69%2C0%2C0%2C1-.8.2%2C1.76%2C1.76%2C0%2C0%2C1-.81-.2L8.8%2C41.73l1.61-3L31.72%2C50.21Z%22%2F%3E%3C%2Fsvg%3E";function un(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,a=i(e);if(t){var r=i(this).constructor;n=Reflect.construct(a,arguments,r)}else n=a.apply(this,arguments);return o(this,n)}}var pn=function(i){n(r,i);var o=un(r);function r(t){var n;return e(this,r),(n=o.call(this,t)).state={},n.ghostData=null,n.onDragStart=n.onDragStart.bind(a(n)),n.onDoubleClick=n.onDoubleClick.bind(a(n)),n.onMouseOver=n.onMouseOver.bind(a(n)),n.onMouseLeave=n.onMouseLeave.bind(a(n)),n.onMouseDown=n.onMouseDown.bind(a(n)),n}return t(r,[{key:"onMouseDown",value:function(){this.props.canvasController.closeTip(),this.ghostData=this.props.canvasController.getGhostNode(this.props.nodeTemplate)}},{key:"onDragStart",value:function(e){this.props.canvasController.setDragNodeTemplate(this.props.nodeTemplate),e.dataTransfer.setData(_,""),this.ghostData&&e.dataTransfer.setDragImage(this.ghostData.element,this.ghostData.centerX,this.ghostData.centerY)}},{key:"onDoubleClick",value:function(){this.props.canvasController.createAutoNode&&this.props.canvasController.createAutoNode(this.props.nodeTemplate)}},{key:"onMouseOver",value:function(e){if(0===e.buttons){var t=this.props.category.empty_text?{app_data:{ui_data:{label:this.props.category.empty_text}}}:this.props.nodeTemplate;this.props.canvasController.openTip({id:"paletteTip_"+this.props.nodeTemplate.op,type:k,targetObj:e.currentTarget,nodeTemplate:t,category:this.props.category})}}},{key:"onMouseLeave",value:function(){this.props.canvasController.closeTip()}},{key:"render",value:function(){var e="";p(this.props.nodeTemplate,"app_data.ui_data.label")&&(e=this.props.nodeTemplate.app_data.ui_data.label);var t=s.createElement("div",{className:"node-icon"});if(p(this.props.nodeTemplate,"app_data.ui_data.image")){var n=this.props.nodeTemplate.app_data.ui_data.image;n===P?n=cn:n===I&&(n=dn),t=n.endsWith(".svg")?s.createElement(Qe,{src:n,className:"node-icon",alt:e}):s.createElement("img",{src:n,className:"node-icon",alt:e})}var i="true",o="palette-dialog-grid-node-text";return this.props.category&&0===this.props.category.node_types.length&&this.props.category.empty_text&&(e=this.props.category.empty_text,i="false",o="palette-dialog-grid-node-text-warning",t=s.createElement(N,{type:w.WARNING_UNFILLED,className:"palette-dialog-grid-node-icon-warning",draggable:"false"})),s.createElement("div",{id:this.props.nodeTemplate.id,"data-id":this.props.nodeTemplate.op,draggable:i,onDragStart:this.onDragStart,onDoubleClick:this.onDoubleClick,onMouseOver:this.onMouseOver,onMouseLeave:this.onMouseLeave,onMouseDown:this.onMouseDown,className:"palette-dialog-grid-node-outer"},s.createElement("div",{className:"palette-dialog-grid-node-inner"},s.createElement("div",{className:"palette-dialog-grid-node-icon"},t),s.createElement("div",{className:o},e)))}}]),r}(s.Component);pn.propTypes={category:u.object.isRequired,nodeTemplate:u.object.isRequired,canvasController:u.object.isRequired};var hn=pn;function fn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,a=i(e);if(t){var r=i(this).constructor;n=Reflect.construct(a,arguments,r)}else n=a.apply(this,arguments);return o(this,n)}}var gn=function(i){n(a,i);var o=fn(a);function a(t){var n;return e(this,a),(n=o.call(this,t)).state={},n}return t(a,[{key:"render",value:function(){var e=[];if(this.props.category&&this.props.category.node_types&&0===this.props.category.node_types.length&&this.props.category.empty_text)e.push(s.createElement(hn,{key:"pal_grid_node_empty",category:this.props.category,nodeTemplate:{},canvasController:this.props.canvasController}));else for(var t=0;t<this.props.nodeTypes.length;t++)e.push(s.createElement(hn,{key:"pal_grid_node_"+t,category:this.props.category,nodeTemplate:this.props.nodeTypes[t],canvasController:this.props.canvasController}));var n=this.props.show?"block":"none";return s.createElement("div",{width:"100%",className:"palette-scroll",style:{display:n}},e)}}]),a}(s.Component);gn.propTypes={category:u.object.isRequired,nodeTypes:u.array.isRequired,show:u.bool.isRequired,canvasController:u.object.isRequired};var yn=gn;function vn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,a=i(e);if(t){var r=i(this).constructor;n=Reflect.construct(a,arguments,r)}else n=a.apply(this,arguments);return o(this,n)}}var mn=function(i){n(r,i);var o=vn(r);function r(t){var n;return e(this,r),(n=o.call(this,t)).state={showFullDescription:!1},n.ghostData=null,n.showFullDescription=n.showFullDescription.bind(a(n)),n.showShortDescription=n.showShortDescription.bind(a(n)),n.onDragStart=n.onDragStart.bind(a(n)),n.onDoubleClick=n.onDoubleClick.bind(a(n)),n.onMouseOver=n.onMouseOver.bind(a(n)),n.onMouseLeave=n.onMouseLeave.bind(a(n)),n.onMouseDown=n.onMouseDown.bind(a(n)),n}return t(r,[{key:"onMouseDown",value:function(){this.props.canvasController.closeTip(),this.ghostData=this.props.canvasController.getGhostNode(this.props.nodeTypeInfo.nodeType)}},{key:"onDragStart",value:function(e){this.props.canvasController.setDragNodeTemplate(this.props.nodeTypeInfo.nodeType),e.dataTransfer.setData(_,""),this.ghostData&&e.dataTransfer.setDragImage(this.ghostData.element,this.ghostData.centerX,this.ghostData.centerY)}},{key:"onDoubleClick",value:function(){this.props.canvasController.createAutoNode&&this.props.canvasController.createAutoNode(this.props.nodeTypeInfo.nodeType)}},{key:"onMouseOver",value:function(e){if(!this.props.isDisplaySearchResult&&0===e.buttons){var t=this.props.nodeTypeInfo.category.empty_text?{app_data:{ui_data:{label:this.props.nodeTypeInfo.category.empty_text}}}:this.props.nodeTypeInfo.nodeType;this.props.canvasController.openTip({id:"paletteTip_"+this.props.nodeTypeInfo.nodeType.op,type:k,targetObj:e.currentTarget,nodeTemplate:t,category:this.props.nodeTypeInfo.category})}}},{key:"onMouseLeave",value:function(){this.props.canvasController.closeTip()}},{key:"getHighlightedCategoryLabel",value:function(){return this.getHighlightedText(this.props.nodeTypeInfo.category.label,this.props.nodeTypeInfo.occurrenceInfo.catLabelOccurrences)}},{key:"getHighlightedLabel",value:function(){return this.getHighlightedText(this.props.nodeTypeInfo.nodeType.app_data.ui_data.label,this.props.nodeTypeInfo.occurrenceInfo.nodeLabelOccurrences)}},{key:"getHighlightedDesc",value:function(){var e=this.props.nodeTypeInfo.nodeType.app_data.ui_data.description,t=this.props.nodeTypeInfo.occurrenceInfo.nodeDescOccurrences,n=!1;if(e.length>150&&(n=!0,!this.state.showFullDescription)){var i=this.getAbbreviatedDescription(e,t,150);e=i.abbrDesc,t=i.occurrences}var o=this.getHighlightedText(e,t);if(n)if(this.state.showFullDescription){var a=this.props.intl.formatMessage({id:"palette.flyout.search.less",defaultMessage:Wt});o.push(s.createElement("div",{key:"l_btn",className:"palette-list-item-desc-button",onClick:this.showShortDescription},a))}else{var r=this.props.intl.formatMessage({id:"palette.flyout.search.more",defaultMessage:Yt});o.push(s.createElement("div",{key:"m_btn",className:"palette-list-item-desc-button",onClick:this.showFullDescription},r))}return o}},{key:"getAbbreviatedDescription",value:function(e,t,n){if(0===t.length)return{abbrDesc:e.substring(0,n)+" ...",occurrences:t};var i=t[0].start,o=e.length-i,a="",r=0;return i<n?(r=0,a=e.substring(r,n)+" ..."):o>n?(r=i,a="... "+e.substring(r,i+n)+" ...",r-=4):(r=e.length-n,a="... "+e.substring(r,e.length),r-=4),{abbrDesc:a,occurrences:t.map((function(e){return{start:e.start-r,end:e.end-r}}))}}},{key:"getHighlightedText",value:function(e,t){if(!t||0===t.length)return[s.createElement("span",{key:"o"},e)];var n=[],i=0,o="";return t.forEach((function(a,r){o=e.substring(i,a.start),n.push(s.createElement("span",{key:"s"+r},o)),o=e.substring(a.start,a.end),n.push(s.createElement("mark",{key:"m"+r},o)),i=a.end,r===t.length-1&&a.end<e.length&&(o=e.substring(a.end),n.push(s.createElement("span",{key:"f"+r},o)))})),n}},{key:"showFullDescription",value:function(){this.setState({showFullDescription:!0})}},{key:"showShortDescription",value:function(){this.setState({showFullDescription:!1})}},{key:"imageDrag",value:function(){return!1}},{key:"render",value:function(){var e=null,t="true",n=null;if(p(this.props.nodeTypeInfo.nodeType,"app_data.ui_data.image")){var i=this.props.nodeTypeInfo.nodeType.app_data.ui_data.image;i===P?i=cn:i===I&&(i=dn),n=i.endsWith(".svg")?s.createElement(Qe,{src:i,className:"palette-list-item-icon",draggable:"false"}):s.createElement("img",{src:i,className:"palette-list-item-icon",draggable:"false"})}!p(this.props.nodeTypeInfo.nodeType,"app_data.ui_data.label")||!this.props.isPaletteOpen&&n||(e=this.props.isDisplaySearchResult?this.getHighlightedLabel():s.createElement("span",null,this.props.nodeTypeInfo.nodeType.app_data.ui_data.label));var o=this.props.isShowRanking&&this.props.isDisplaySearchResult&&p(this.props.nodeTypeInfo,"occurrenceInfo.ranking")?s.createElement("span",null,this.props.nodeTypeInfo.occurrenceInfo.ranking):null;0===this.props.nodeTypeInfo.category.node_types.length&&this.props.nodeTypeInfo.category.empty_text&&(this.props.isPaletteOpen&&(e=this.props.nodeTypeInfo.category.empty_text),t="false",n=s.createElement(N,{type:w.WARNING_UNFILLED,className:"palette-list-item-icon-warning",draggable:"false"}));var a=this.props.isDisplaySearchResult?"palette-list-item search-result":"palette-list-item",r=this.props.isDisplaySearchResult?s.createElement("div",{className:"palette-list-item-category-label"},this.getHighlightedCategoryLabel()):null,l=this.props.isDisplaySearchResult&&p(this.props.nodeTypeInfo.nodeType,"app_data.ui_data.description")&&this.props.nodeTypeInfo.nodeType.app_data.ui_data.description?s.createElement("div",{className:"palette-list-item-description"},this.getHighlightedDesc()):null,c=e?s.createElement("div",{className:"palette-list-item-text-div"},e):null;return s.createElement("div",{id:this.props.nodeTypeInfo.nodeType.id,"data-id":this.props.nodeTypeInfo.nodeType.op,draggable:t,onDragStart:this.onDragStart,onDoubleClick:this.onDoubleClick,className:a,onMouseOver:this.onMouseOver,onMouseLeave:this.onMouseLeave,onMouseDown:this.onMouseDown},r,s.createElement("div",{className:"palette-list-item-icon-and-text"},n,c,o),l)}}]),r}(s.Component);mn.propTypes={intl:u.object.isRequired,nodeTypeInfo:u.object.isRequired,isDisplaySearchResult:u.bool.isRequired,canvasController:u.object.isRequired,isPaletteOpen:u.bool.isRequired,isShowRanking:u.bool};var bn=d(mn);function _n(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,a=i(e);if(t){var r=i(this).constructor;n=Reflect.construct(a,arguments,r)}else n=a.apply(this,arguments);return o(this,n)}}var kn=function(i){n(a,i);var o=_n(a);function a(t){var n;return e(this,a),(n=o.call(this,t)).state={},n}return t(a,[{key:"render",value:function(){var e=[];if(this.props.category&&this.props.category.node_types&&0===this.props.category.node_types.length&&this.props.category.empty_text)e.push(s.createElement("div",{key:"item_empty"},s.createElement(bn,{nodeTypeInfo:{nodeType:{},category:this.props.category},isDisplaySearchResult:!1,canvasController:this.props.canvasController,isPaletteOpen:this.props.isPaletteOpen})));else for(var t=0;t<this.props.nodeTypeInfos.length;t++){var n="item_"+t;e.push(s.createElement("div",{key:n},s.createElement(bn,{nodeTypeInfo:this.props.nodeTypeInfos[t],isDisplaySearchResult:!1,canvasController:this.props.canvasController,isPaletteOpen:this.props.isPaletteOpen})))}var i={};return i.borderBottom=this.props.isLastCategory?"none":null,i.display=this.props.show?"block":"none",s.createElement("div",{width:"100%",draggable:"false",className:"palette-content-list palette-scroll",style:i},e)}}]),a}(s.Component);kn.propTypes={category:u.object.isRequired,nodeTypeInfos:u.array.isRequired,show:u.bool.isRequired,canvasController:u.object.isRequired,isPaletteOpen:u.bool.isRequired,isLastCategory:u.bool.isRequired};var Pn=kn;function In(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,a=i(e);if(t){var r=i(this).constructor;n=Reflect.construct(a,arguments,r)}else n=a.apply(this,arguments);return o(this,n)}}var Nn=function(i){n(r,i);var o=In(r);function r(t){var n;return e(this,r),(n=o.call(this,t)).state={selectedCategory:""},n.categorySelected=n.categorySelected.bind(a(n)),n.getUniqueCategories=n.getUniqueCategories.bind(a(n)),n.getSelectedCategory=n.getSelectedCategory.bind(a(n)),n}return t(r,[{key:"getUniqueCategories",value:function(e){var t=[];if(e)for(var n=0;n<e.length;n++)-1===t.indexOf(e[n].label)&&t.push(e[n]);return t}},{key:"getSelectedCategory",value:function(e){var t={};if(e)for(var n=0;n<e.length;n++)e[n].label===this.state.selectedCategory&&(t=e[n]);return t}},{key:"categorySelected",value:function(e){this.setState({selectedCategory:e.target.firstChild.data})}},{key:"render",value:function(){var e=this.getUniqueCategories(this.props.paletteJSON.categories),t=this.getSelectedCategory(this.props.paletteJSON.categories),n=t&&t.node_types?t.node_types:[],i=n.map((function(e){return{nodeType:e,category:t}}));return s.createElement("div",{className:"palette-dialog-content",ref:"palettecontent"},s.createElement(ln,{categories:e,selectedCategory:this.state.selectedCategory,categorySelectedMethod:this.categorySelected}),s.createElement(yn,{show:this.props.showGrid,category:t,nodeTypes:n,canvasController:this.props.canvasController}),s.createElement(Pn,{show:!this.props.showGrid,category:t,nodeTypeInfos:i,canvasController:this.props.canvasController,isPaletteOpen:!0,isLastCategory:!1}))}}],[{key:"getDerivedStateFromProps",value:function(e,t){return e.paletteJSON&&e.paletteJSON.categories&&e.paletteJSON.categories.length>0&&""===t.selectedCategory?{selectedCategory:e.paletteJSON.categories[0].label}:{}}}]),r}(s.Component);Nn.propTypes={paletteJSON:u.object.isRequired,showGrid:u.bool.isRequired,canvasController:u.object.isRequired};var wn=Nn;function Cn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,a=i(e);if(t){var r=i(this).constructor;n=Reflect.construct(a,arguments,r)}else n=a.apply(this,arguments);return o(this,n)}}var Sn=function(i){n(r,i);var o=Cn(r);function r(t){var n;return e(this,r),(n=o.call(this,t)).state={xPos:100,yPos:100,showGrid:!0},n.showGrid=n.showGrid.bind(a(n)),n.mouseDownOnTopBar=n.mouseDownOnTopBar.bind(a(n)),n.mouseDownOnPalette=n.mouseDownOnPalette.bind(a(n)),n.mouseMove=n.mouseMove.bind(a(n)),n.mouseUp=n.mouseUp.bind(a(n)),n.windowResize=n.windowResize.bind(a(n)),n.windowMaximize=n.windowMaximize.bind(a(n)),n.getPaletteDiv=n.getPaletteDiv.bind(a(n)),n.resizePalette=n.resizePalette.bind(a(n)),n.movePalette=n.movePalette.bind(a(n)),n.setResizingCursors=n.setResizingCursors.bind(a(n)),n.setSizingHoverEdge=n.setSizingHoverEdge.bind(a(n)),n.snapToWidth=n.snapToWidth.bind(a(n)),n.snapToHeight=n.snapToHeight.bind(a(n)),n.removePx=n.removePx.bind(a(n)),n.dragging=!1,n.dragOffsetY=0,n.dragOffsetX=0,n.verticalSizingAction="",n.verticalSizingHover="",n.horizontalSizingAction="",n.hoizontalSizingHover="",n.savedWidth=0,n.savedLeft=0,n.savedHeight=0,n.savedTop=0,n.hoverZoneSize=3,n.totalHoverZoneSize=2*n.hoverZoneSize,n.adjustedWidth=137,n.adjustedHeight=51,n.adjustedScrollBarWidth=15,n.isMaximized=!1,n.paletteNodes=[],n.hackPaletteOffset=46,n.hackPaletteTopOffset=n.hackPaletteOffset+4,window.addEventListener("mousemove",n.mouseMove,!1),window.addEventListener("mouseup",n.mouseUp,!1),window.addEventListener("resize",n.windowResize,!1),n}return t(r,[{key:"componentDidUpdate",value:function(){this.windowResize()}},{key:"componentWillUnmount",value:function(){window.removeEventListener("mousemove",this.mouseMove),window.removeEventListener("mouseup",this.mouseUp),window.removeEventListener("resize",this.windowResize)}},{key:"getAdjustedMousePositionBottom",value:function(e,t){var n=e.clientY;return n>t.offsetTop+t.offsetHeight-this.hoverZoneSize&&(n=t.offsetTop+t.offsetHeight-this.hoverZoneSize),n}},{key:"getAdjustedMousePositionLeft",value:function(e,t){var n=e.clientX;return n<t.offsetLeft+this.hoverZoneSize&&(n=t.offsetLeft+this.hoverZoneSize),n}},{key:"getAdjustedMousePositionRight",value:function(e,t){var n=e.clientX;return n>t.offsetLeft+t.offsetWidth-this.hoverZoneSize&&(n=t.offsetLeft+t.offsetWidth-this.hoverZoneSize),n}},{key:"getAdjustedMousePositionTop",value:function(e,t){var n=e.clientY;return n<t.offsetTop+this.hoverZoneSize&&(n=t.offsetTop+this.hoverZoneSize),n}},{key:"getPaletteDiv",value:function(){return this.refs.palette}},{key:"getStyleProperty",value:function(e,t){var n=e.charAt(0),i=e.substring(1),o="#"===n?document.getElementById(i):document.getElementsByClassName(i)[0];return window.getComputedStyle(o,null).getPropertyValue(t)}},{key:"setResizingCursors",value:function(e){var t=this.getPaletteDiv();this.setSizingHoverEdge(e,t),"top"===this.verticalSizingHover?"left"===this.horizontalSizingHover?t.style.cursor="nwse-resize":"right"===this.horizontalSizingHover?t.style.cursor="nesw-resize":t.style.cursor="ns-resize":"bottom"===this.verticalSizingHover?"left"===this.horizontalSizingHover?t.style.cursor="nesw-resize":"right"===this.horizontalSizingHover?t.style.cursor="nwse-resize":t.style.cursor="ns-resize":"left"===this.horizontalSizingHover||"right"===this.horizontalSizingHover?t.style.cursor="ew-resize":t.style.cursor="default"}},{key:"setContentDivHeight",value:function(e,t){var n=t-this.removePx(this.getStyleProperty(".palette-dialog-topbar","height"))-this.totalHoverZoneSize+"px",i=e.childNodes[1];i.style.height=n,i.childNodes[0].style.height=n,i.childNodes[1].style.height=n,i.childNodes[2].style.height=n}},{key:"setSizingHoverEdge",value:function(e,t){e.clientX>t.offsetLeft&&e.clientX<t.offsetLeft+this.totalHoverZoneSize?this.horizontalSizingHover="left":e.clientX<t.offsetLeft+t.offsetWidth&&e.clientX>t.offsetLeft+t.offsetWidth-this.totalHoverZoneSize?this.horizontalSizingHover="right":(this.horizontalSizingHover="",this.horizontalSizingAction=""),e.clientY>t.offsetTop+this.hackPaletteTopOffset&&e.clientY<t.offsetTop+this.hackPaletteTopOffset+this.totalHoverZoneSize?this.verticalSizingHover="top":e.clientY<t.offsetTop+t.offsetHeight+this.hackPaletteOffset&&e.clientY>t.offsetTop+t.offsetHeight+this.hackPaletteOffset-this.totalHoverZoneSize?this.verticalSizingHover="bottom":(this.verticalSizingHover="",this.verticalSizingAction="")}},{key:"mouseDownOnTopBar",value:function(e){this.dragging=!0;var t=this.getPaletteDiv();this.dragOffsetX=e.clientX-t.offsetLeft,this.dragOffsetY=e.clientY-t.offsetTop}},{key:"mouseDownOnPalette",value:function(e){var t=this.getPaletteDiv();""===this.verticalSizingHover&&""===this.horizontalSizingHover||(this.verticalSizingAction=this.verticalSizingHover,this.horizontalSizingAction=this.horizontalSizingHover,this.savedWidth=t.offsetWidth,this.savedLeft=t.offsetLeft,this.savedHeight=t.offsetHeight,this.savedTop=t.offsetTop)}},{key:"mouseMove",value:function(e){""!==this.verticalSizingAction||""!==this.horizontalSizingAction?this.resizePalette(e):!0===this.dragging?this.movePalette(e):this.setResizingCursors(e)}},{key:"mouseUp",value:function(){var e=this.getPaletteDiv();if(this.state.showGrid&&""!==this.horizontalSizingAction){var t=this.removePx(e.style.width);""!==t&&(t=this.snapToWidth(t)),e.style.width=t+"px";var n=e.childNodes[1].childNodes[1];n.clientHeight<n.scrollHeight&&(e.style.width=t+this.adjustedScrollBarWidth+"px")}if(""!==this.verticalSizingAction){var i=this.removePx(e.style.height);if(""!==i){var o=this.snapToHeight(i);e.style.height=o+"px",this.setContentDivHeight(e,o)}}this.dragging=!1,this.verticalSizingAction="",this.horizontalSizingAction="",this.verticalSizingHover="",this.horizontalSizingHover=""}},{key:"movePalette",value:function(e){var t=this.getPaletteDiv(),n=document.getElementById(this.props.parentDivId),i=e.clientX-this.dragOffsetX,o=e.clientY-this.dragOffsetY;i<n.offsetLeft+this.hoverZoneSize&&(i=n.offsetLeft+this.hoverZoneSize),o<n.offsetTop+this.hoverZoneSize&&(o=n.offsetTop+this.hoverZoneSize),i+t.offsetWidth>n.offsetLeft+n.offsetWidth&&(i=n.offsetLeft+n.offsetWidth-t.offsetWidth-this.hoverZoneSize),o+t.offsetHeight>n.offsetTop+n.offsetHeight&&(o=n.offsetTop+n.offsetHeight-t.offsetHeight-this.hoverZoneSize),t.style.left=i+"px",t.style.top=o+"px"}},{key:"removePx",value:function(e){return parseInt(e.substring(0,e.indexOf("px")),10)}},{key:"resizePalette",value:function(e){var t=this.getPaletteDiv(),n=document.getElementById(this.props.parentDivId);this.isMaximized=!1;var i=this.removePx(this.getStyleProperty(".palette-dialog-grid-node-outer","width"))+this.removePx(this.getStyleProperty(".palette-dialog-categories","min-width"))+2*this.hoverZoneSize,o=this.removePx(this.getStyleProperty(".palette-dialog-grid-node-outer","height"))+this.removePx(this.getStyleProperty(".palette-dialog-topbar","height"))+2*this.hoverZoneSize;if("left"===this.horizontalSizingAction){var a=this.getAdjustedMousePositionLeft(e,n),r=this.savedWidth-(a-this.savedLeft);r<=i?t.style.width=i+"px":(t.style.width=r+"px",t.style.left=a+"px")}if("right"===this.horizontalSizingAction){var s=this.getAdjustedMousePositionRight(e,n)-this.savedLeft;s<=i&&(s=i),t.style.width=s+"px"}if("top"===this.verticalSizingAction){var l=this.getAdjustedMousePositionTop(e,n),c=this.savedHeight-(l-this.savedTop);c<=o?(t.style.height=o+"px",this.setContentDivHeight(t,this.minHeight)):(t.style.height=c+"px",t.style.top=l-this.dragOffsetY+"px",this.setContentDivHeight(t,c))}if("bottom"===this.verticalSizingAction){var d=this.getAdjustedMousePositionBottom(e,n)-this.savedTop-this.hackPaletteOffset;d<=o&&(d=o),t.style.height=d+"px",this.setContentDivHeight(t,d)}}},{key:"snapToWidth",value:function(e){var t=this.removePx(this.getStyleProperty(".palette-dialog-grid-node-outer","width"));return Math.round((e-this.adjustedWidth)/t)*t+this.adjustedWidth}},{key:"snapToHeight",value:function(e){var t=this.state.showGrid?this.removePx(this.getStyleProperty(".palette-dialog-grid-node-outer","height")):this.removePx(this.getStyleProperty(".palette-list-item","height"));return Math.round((e-this.adjustedHeight)/t)*t+this.adjustedHeight}},{key:"windowResize",value:function(){var e=this.getPaletteDiv(),t=document.getElementById(this.props.parentDivId);if(t)if(this.isMaximized){var n=t.offsetLeft+this.hoverZoneSize;e.style.left=n+"px";var i=t.offsetWidth-this.totalHoverZoneSize;e.style.width=i+"px";var o=t.offsetTop+this.hoverZoneSize;e.style.top=o+"px";var a=t.offsetHeight-this.totalHoverZoneSize;e.style.height=a+"px",this.setContentDivHeight(e,a)}else{if(e.offsetLeft+e.offsetWidth+this.hoverZoneSize>t.offsetLeft+t.offsetWidth){var r=t.offsetLeft+t.offsetWidth-e.offsetWidth-this.hoverZoneSize;e.style.left=r+"px"}var s=t.offsetWidth-this.totalHoverZoneSize;if(s<e.offsetWidth&&(e.style.width=s+"px",e.style.left=t.offsetLeft+t.offsetWidth-e.offsetWidth-this.hoverZoneSize+"px"),e.offsetTop+e.offsetHeight+this.hoverZoneSize>t.offsetTop+t.offsetHeight){var l=t.offsetTop+t.offsetHeight-e.offsetHeight-this.hoverZoneSize;e.style.top=l+"px"}var c=t.offsetHeight-this.totalHoverZoneSize;c<e.offsetHeight&&(e.style.height=c+"px",e.style.top=t.offsetTop+t.offsetHeight-e.offsetHeight-this.hoverZoneSize+"px",this.setContentDivHeight(e,c))}}},{key:"windowMaximize",value:function(){var e=this.getPaletteDiv(),t=document.getElementById(this.props.parentDivId);if(t)if(this.isMaximized)e.style.width=this.savedWidth+"px",e.style.left=this.savedLeft+"px",e.style.height=this.savedHeight+"px",e.style.top=this.savedTop+"px",this.setContentDivHeight(e,this.savedHeight),this.isMaximized=!1,this.windowResize();else{this.savedWidth=e.offsetWidth,this.savedLeft=e.offsetLeft,this.savedHeight=e.offsetHeight,this.savedTop=e.offsetTop;var n=t.offsetWidth-this.totalHoverZoneSize+1;e.style.width=n+"px",e.style.left=t.offsetLeft+this.hoverZoneSize+"px";var i=t.offsetHeight-this.totalHoverZoneSize+1;e.style.height=i+"px",e.style.top=t.offsetTop+this.hoverZoneSize+"px",this.setContentDivHeight(e,i),this.isMaximized=!0}}},{key:"showGrid",value:function(e){this.setState({showGrid:e})}},{key:"render",value:function(){var e=this.props.showPalette?"block":"none";return s.createElement("nav",{"aria-label":this.props.intl.formatMessage({id:"palette.dialog.label",defaultMessage:$t}),role:"navigation"},s.createElement("div",{className:"palette-dialog-div",ref:"palette",onMouseDown:this.mouseDownOnPalette,style:{display:e}},s.createElement(tn,{mouseDownMethod:this.mouseDownOnTopBar,showGridMethod:this.showGrid,windowMaximizeMethod:this.windowMaximize,showGrid:this.state.showGrid,canvasController:this.props.canvasController}),s.createElement(wn,{paletteJSON:this.props.paletteJSON,showGrid:this.state.showGrid,canvasController:this.props.canvasController})))}}]),r}(s.Component);Sn.propTypes={intl:u.object.isRequired,paletteJSON:u.object.isRequired,showPalette:u.bool.isRequired,parentDivId:u.string.isRequired,canvasController:u.object.isRequired};var Ln=d(Sn),xn=h,Tn=f,En=function(){return xn.Date.now()},On=et,Dn=Math.max,jn=Math.min;var An=function(e,t,n){var i,o,a,r,s,l,c=0,d=!1,u=!1,p=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function h(t){var n=i,a=o;return i=o=void 0,c=t,r=e.apply(a,n)}function f(e){return c=e,s=setTimeout(y,t),d?h(e):r}function g(e){var n=e-l;return void 0===l||n>=t||n<0||u&&e-c>=a}function y(){var e=En();if(g(e))return v(e);s=setTimeout(y,function(e){var n=t-(e-l);return u?jn(n,a-(e-c)):n}(e))}function v(e){return s=void 0,p&&i?h(e):(i=o=void 0,r)}function m(){var e=En(),n=g(e);if(i=arguments,o=this,l=e,n){if(void 0===s)return f(l);if(u)return clearTimeout(s),s=setTimeout(y,t),h(l)}return void 0===s&&(s=setTimeout(y,t)),r}return t=On(t)||0,Tn(n)&&(d=!!n.leading,a=(u="maxWait"in n)?Dn(On(n.maxWait)||0,t):a,p="trailing"in n?!!n.trailing:p),m.cancel=function(){void 0!==s&&clearTimeout(s),c=0,i=l=o=s=void 0},m.flush=function(){return void 0===s?r:v(En())},m};function Mn(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return Rn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Rn(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,r=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return r=e.done,e},e:function(e){s=!0,a=e},f:function(){try{r||null==n.return||n.return()}finally{if(s)throw a}}}}function Rn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function Un(e,t){var n=[];if(e.node_types){var i,o=Mn(e.node_types);try{for(o.s();!(i=o.n()).done;){var a=i.value,r=Fn(a,e,t);r&&n.push({nodeType:a,category:e,occurrenceInfo:r})}}catch(e){o.e(e)}finally{o.f()}}return n}function Fn(e,t,n){if(n.length>0){var i=function(e,t){var n=zn(p(e,"label")?e.label.toLowerCase():"",t),i=n.occurrences,o=n.hitCounts;return{catLabelOccurrences:i,catLabelHitCounts:o}}(t,n),o=i.catLabelOccurrences,a=i.catLabelHitCounts,r=function(e,t){var n=zn(p(e,"app_data.ui_data.label")?e.app_data.ui_data.label.toLowerCase():"",t),i=n.occurrences,o=n.hitCounts;return{nodeLabelOccurrences:i,nodeLabelHitCounts:o}}(e,n),s=r.nodeLabelOccurrences,l=r.nodeLabelHitCounts,c=function(e,t){var n=zn(p(e,"app_data.ui_data.description")?e.app_data.ui_data.description.toLowerCase():"",t),i=n.occurrences,o=n.hitCounts;return{nodeDescOccurrences:i,nodeDescHitCounts:o}}(e,n),d=c.nodeDescOccurrences,u=c.nodeDescHitCounts;if(o.length>0||s.length>0||d.length>0){var h=function(e,t,n,i){for(var o=0,a=0,r=0;r<i;r++)o+=e[r]+10*t[r]+n[r],e[r]+t[r]+n[r]>0&&a++;return o+50*a}(a,l,u,n.length);return{catLabelOccurrences:o,nodeLabelOccurrences:s,nodeDescOccurrences:d,ranking:h}}}return null}function zn(e,t){var n=[],i=[];return t.forEach((function(t){if(t){var o=function(e,t){var n=[],i=0,o=0,a=0;for(;o>-1&&a<20;)(o=e.indexOf(t,i))>-1&&(n.push({start:o,end:o+t.length}),i=o+t.length,a++);return n}(e,t);n=function(e,t){if(0===e.length)return t;if(0===t.length)return e;var n=[];t.forEach((function(t){var i=!1;e.forEach((function(e){t.start<=e.start&&t.end>=e.end?(e.start=t.start,e.end=t.end,i=!0):t.start>=e.start&&t.start<e.end?(t.end>=e.end&&(e.end=t.end),i=!0):t.end>e.start&&t.end<=e.end&&(t.start<e.start&&(e.start=t.start),i=!0)})),i||n.push(t)}));var i=e.concat(n);return i=i.sort((function(e,t){return e.start<t.start?-1:1}))}(n,o),i.push(o.length>0?1:0)}})),{occurrences:n,hitCounts:i}}function Bn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,a=i(e);if(t){var r=i(this).constructor;n=Reflect.construct(a,arguments,r)}else n=a.apply(this,arguments);return o(this,n)}}var Hn=function(i){n(r,i);var o=Bn(r);function r(t){var n;return e(this,r),(n=o.call(this,t)).onMouseOver=n.onMouseOver.bind(a(n)),n.onMouseLeave=n.onMouseLeave.bind(a(n)),n.categorySelected=n.categorySelected.bind(a(n)),n}return t(r,[{key:"onMouseOver",value:function(e){this.props.canvasController.openTip({id:"paletteTip_"+this.props.category.id,type:C,targetObj:e.currentTarget,category:this.props.category})}},{key:"onMouseLeave",value:function(){this.props.canvasController.closeTip()}},{key:"getDisplayLabel",value:function(){return!0===this.props.isPaletteOpen?this.props.category.label:!this.props.category.image&&this.props.category.label&&this.props.category.label.length>0?this.props.category.label.substr(0,3):null}},{key:"getInlineLoadingRenderCategory",value:function(){var e="";return this.props.isPaletteOpen&&(e=this.props.category.loading_text),s.createElement("div",{className:"palette-flyout-category"},s.createElement("div",{className:"palette-flyout-category-item-loading"},s.createElement(wt,{description:e,iconDescription:e,onSuccess:function(){return null},status:"active",successDelay:1500})))}},{key:"getRenderCategory",value:function(){var e="palette-flyout-category-caret";this.props.isPaletteOpen||(e+=" palette-flyout-category-caret-closed");var t=null;(this.props.itemCount>0||this.props.category.empty_text)&&(t=this.props.isCategorySelected?s.createElement(N,{type:w.CHEVRONARROWS.UP,className:e}):s.createElement(N,{type:w.CHEVRONARROWS.DOWN,className:e}));var n=null;this.props.category.image&&""!==this.props.category.image&&(n=this.props.category.image.endsWith(".svg")?s.createElement("div",null,s.createElement(Qe,{src:this.props.category.image,className:"palette-flyout-category-item-icon",draggable:"false"})):s.createElement("div",null,s.createElement("img",{src:this.props.category.image,className:"palette-flyout-category-item-icon",draggable:"false"})));var i=null,o=this.getDisplayLabel();if(!0===this.props.isPaletteOpen){var a=this.props.category.image?"palette-flyout-category-text":"palette-flyout-category-text-no-image";i=s.createElement("span",{className:a},o)}else!this.props.category.image&&this.props.category.label&&this.props.category.label.length>0&&(i=s.createElement("span",{className:"palette-flyout-category-text-abbr"},o));return s.createElement("div",{className:"palette-flyout-category","data-id":pt(this.props.category,"id",""),onClick:this.categorySelected,value:this.props.category.label,onMouseOver:this.onMouseOver,onMouseLeave:this.onMouseLeave},s.createElement("div",{className:"palette-flyout-category-item"},n,i),t)}},{key:"categorySelected",value:function(){this.props.categorySelectedMethod(this.props.category.id)}},{key:"render",value:function(){return this.props.category.loading_text?this.getInlineLoadingRenderCategory():this.getRenderCategory()}}]),r}(s.Component);Hn.propTypes={category:u.object.isRequired,isCategorySelected:u.bool.isRequired,categorySelectedMethod:u.func.isRequired,itemCount:u.number.isRequired,canvasController:u.object.isRequired,isPaletteOpen:u.bool.isRequired};var Gn=Hn;function qn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,a=i(e);if(t){var r=i(this).constructor;n=Reflect.construct(a,arguments,r)}else n=a.apply(this,arguments);return o(this,n)}}var Vn=function(i){n(r,i);var o=qn(r);function r(){var t;return e(this,r),(t=o.call(this)).state={searchString:""},t.searchOnClick=t.searchOnClick.bind(a(t)),t.handleSearchStringChange=t.handleSearchStringChange.bind(a(t)),t}return t(r,[{key:"handleSearchStringChange",value:function(e){var t=this,n=e.target.value||"";this.setState({searchString:n},(function(){return t.props.handleSearchStringChange(n)}))}},{key:"searchOnClick",value:function(){this.props.isPaletteOpen||this.props.canvasController.openPalette()}},{key:"render",value:function(){var e=this.props.intl.formatMessage({id:"palette.flyout.search.placeholder",defaultMessage:Ht});return s.createElement("div",{className:"palette-flyout-search-container",id:"palette-flyout-search"},s.createElement(Ct,{key:"palette-flyout-search",className:"palette-flyout-search",placeholder:e,onChange:this.handleSearchStringChange,size:"sm",value:this.state.searchString,labelText:e,onClick:this.searchOnClick}))}}]),r}(s.Component);Vn.propTypes={intl:u.object.isRequired,handleSearchStringChange:u.func.isRequired,isPaletteOpen:u.bool.isRequired,canvasController:u.object.isRequired};var Yn=d(Vn);function Wn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,a=i(e);if(t){var r=i(this).constructor;n=Reflect.construct(a,arguments,r)}else n=a.apply(this,arguments);return o(this,n)}}var Xn=function(i){n(a,i);var o=Wn(a);function a(t){var n;return e(this,a),(n=o.call(this,t)).state={},n}return t(a,[{key:"getNoResultsDiv",value:function(){var e=this.props.intl.formatMessage({id:"palette.flyout.search.noresults",defaultMessage:Gt}),t=this.props.intl.formatMessage({id:"palette.flyout.search.adjustsearch",defaultMessage:qt});return s.createElement("div",null,s.createElement("div",{className:"palette-no-results-title"},e),s.createElement("br",null),s.createElement("div",{className:"palette-no-results-desc"},t))}},{key:"getContentListDiv",value:function(){for(var e=[],t=0;t<this.props.nodeTypeInfos.length;t++){var n="item_"+t;e.push(s.createElement("div",{key:n},s.createElement(bn,{nodeTypeInfo:this.props.nodeTypeInfos[t],isDisplaySearchResult:!0,isShowRanking:this.props.isShowRanking,canvasController:this.props.canvasController,isPaletteOpen:this.props.isPaletteOpen})))}if(this.props.isNodeTypeInfosArrayTruncated){var i=this.props.intl.formatMessage({id:"palette.flyout.search.resultsrestricted",defaultMessage:Vt});e.push(s.createElement("div",{key:"restrict-item",className:"palette-flyout-restrict-item"},i))}return s.createElement("div",{width:"100%",draggable:"false",className:"palette-scroll"},e)}},{key:"render",value:function(){return 0===this.props.nodeTypeInfos.length?this.getNoResultsDiv():this.getContentListDiv()}}]),a}(s.Component);Xn.propTypes={intl:u.object.isRequired,nodeTypeInfos:u.array.isRequired,canvasController:u.object.isRequired,isPaletteOpen:u.bool.isRequired,isNodeTypeInfosArrayTruncated:u.bool,isShowRanking:u.bool};var $n=d(Xn),Zn=function(){function n(t){e(this,n),this.prefix=t}return t(n,[{key:"log",value:function(e){n.active&&("string"==typeof e?console.info(this.getMessage("",e)):console.info(e))}},{key:"logStartTimer",value:function(e){if(n.active){var t=this.getStartMessage("",e),i=this.getEndMessage("",e);console.info(t),console.time(i)}}},{key:"logEndTimer",value:function(e,t){if(n.active){var i=this.getEndMessage("",e);console.timeEnd(i),t&&console.info("--------------------------------------------------")}}},{key:"debug",value:function(e){n.active&&console.log(this.getMessage("DEBUG",e))}},{key:"warn",value:function(e){console.warn(this.getMessage("WARNING",e))}},{key:"error",value:function(e){console.error(this.getMessage("ERROR",e))}},{key:"getStartMessage",value:function(e,t){return this.getMessage(e,t)+" - start"}},{key:"getEndMessage",value:function(e,t){return this.getMessage(e,t)+" - end"}},{key:"getMessage",value:function(e,t){var n="";if(e&&(n+="["+e+"] "),"string"==typeof this.prefix)n+=this.abbreviate(this.prefix)+" - ";else for(var i=0;i<this.prefix.length;i++)n+=this.abbreviate(this.prefix[i])+" - ";return n+t}},{key:"abbreviate",value:function(e){return e&&e.length>20?e.substr(0,17)+"...":e}}],[{key:"getLoggingState",value:function(){return n.active}},{key:"setLoggingState",value:function(e){n.active=e}},{key:"switchLoggingState",value:function(){n.active?(new n("Logger").log("Switching canvas logging off"),n.active=!1):(n.active=!0,new n("Logger").log("Switching canvas logging on"))}}]),n}();function Kn(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return Jn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Jn(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,r=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return r=e.done,e},e:function(e){s=!0,a=e},f:function(){try{r||null==n.return||n.return()}finally{if(s)throw a}}}}function Jn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function Qn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,a=i(e);if(t){var r=i(this).constructor;n=Reflect.construct(a,arguments,r)}else n=a.apply(this,arguments);return o(this,n)}}Zn.active=!1;var ei=new Zn("PaletteFlyoutContent"),ti=function(i){n(r,i);var o=Qn(r);function r(t){var n;return e(this,r),(n=o.call(this,t)).state={selectedCategoryIds:[],searchString:""},n.categories=[],n.categorySelected=n.categorySelected.bind(a(n)),n.getUniqueCategories=n.getUniqueCategories.bind(a(n)),n.setSearchString=n.setSearchString.bind(a(n)),n.handleSearchStringChange=n.handleSearchStringChange.bind(a(n)),n.setSearchStringThrottled=An(n.setSearchString,200),n}return t(r,[{key:"getUniqueCategories",value:function(e){var t=[];if(e){var n,i=Kn(e);try{for(i.s();!(n=i.n()).done;){var o=n.value;-1===t.indexOf(o.label)&&t.push(o)}}catch(e){i.e(e)}finally{i.f()}}return t}},{key:"getContentDivs",value:function(e){for(var t=this,n=[],i=function(i){var o=e[i],a=i===e.length-1,r=o.node_types.map((function(e){return{nodeType:e,category:o}})),l=t.isCategorySelected(o.id),c=null;l&&(c=s.createElement(Pn,{key:o.label+"-nodes",show:!0,category:o,nodeTypeInfos:r,canvasController:t.props.canvasController,isPaletteOpen:t.props.isPaletteOpen,isLastCategory:a})),n.push(s.createElement("div",{key:o.label+"-container"},s.createElement(Gn,{key:o.id,category:o,isCategorySelected:l,categorySelectedMethod:t.categorySelected,itemCount:r.length,canvasController:t.props.canvasController,isPaletteOpen:t.props.isPaletteOpen}),c))},o=0;o<e.length;o++)i(o);return n}},{key:"getFilteredContentDivs",value:function(e){ei.logStartTimer("getFilteredNodeTypeInfos");var t=function(e,t){for(var n=[],i=t.toLowerCase().split(" ").filter((function(e){return""!==e})),o=0;o<e.length;o++)n.push.apply(n,tt(Un(e[o],i)));return n.sort((function(e,t){return e.occurrenceInfo.ranking<=t.occurrenceInfo.ranking?1:-1}))}(this.categories,this.state.searchString);ei.logEndTimer("getFilteredNodeTypeInfos");var n=!1;return t.length>10&&(t=t.slice(0,10),n=!0),[s.createElement($n,{key:"filtered-nodes",nodeTypeInfos:t,canvasController:this.props.canvasController,isPaletteOpen:this.props.isPaletteOpen,isNodeTypeInfosArrayTruncated:n})]}},{key:"setSearchString",value:function(){this.setState({searchString:this.ss})}},{key:"handleSearchStringChange",value:function(e){this.ss=e,this.setSearchStringThrottled()}},{key:"categorySelected",value:function(e){var t=this.isCategorySelected(e)?this.state.selectedCategoryIds.filter((function(t){return t!==e})):this.state.selectedCategoryIds.concat(e);this.setState({selectedCategoryIds:t})}},{key:"isCategorySelected",value:function(e){return this.state.selectedCategoryIds.some((function(t){return t===e}))}},{key:"render",value:function(){this.categories=this.getUniqueCategories(this.props.paletteJSON.categories);var e=this.props.isPaletteOpen&&this.state.searchString?this.getFilteredContentDivs(this.categories):this.getContentDivs(this.categories),t=s.createElement("div",{className:"palette-flyout-categories"},e),n=s.createElement(Yn,{handleSearchStringChange:this.handleSearchStringChange,isPaletteOpen:this.props.isPaletteOpen,canvasController:this.props.canvasController});return s.createElement("div",{className:"palette-flyout-content"},n,t)}}]),r}(s.Component);ti.propTypes={paletteJSON:u.object.isRequired,canvasController:u.object.isRequired,isPaletteOpen:u.bool.isRequired};var ni=ti;function ii(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,a=i(e);if(t){var r=i(this).constructor;n=Reflect.construct(a,arguments,r)}else n=a.apply(this,arguments);return o(this,n)}}var oi=function(i){n(a,i);var o=ii(a);function a(t){var n;return e(this,a),(n=o.call(this,t)).paletteNodes=[],n}return t(a,[{key:"render",value:function(){var e="palette-flyout-div";return this.props.showPalette?e+=" palette-flyout-div-open":(e+=" palette-flyout-div-closed",this.props.enableNarrowPalette&&(e+=" palette-flyout-div-narrow")),s.createElement("nav",{"aria-label":this.props.intl.formatMessage({id:"palette.flyout.label",defaultMessage:Xt}),role:"navigation"},s.createElement("div",{className:e},s.createElement(ni,{paletteJSON:this.props.paletteJSON,canvasController:this.props.canvasController,isPaletteOpen:this.props.showPalette})))}}]),a}(s.Component);oi.propTypes={intl:u.object.isRequired,paletteJSON:u.object.isRequired,showPalette:u.bool.isRequired,enableNarrowPalette:u.bool.isRequired,canvasController:u.object.isRequired};var ai=d(oi);function ri(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,a=i(e);if(t){var r=i(this).constructor;n=Reflect.construct(a,arguments,r)}else n=a.apply(this,arguments);return o(this,n)}}var si=function(i){n(a,i);var o=ri(a);function a(t){var n;return e(this,a),(n=o.call(this,t)).logger=new Zn("Palette"),n}return t(a,[{key:"render",value:function(){this.logger.log("render");var e=null;return this.props.enablePaletteLayout===S?e=s.createElement(ai,{enableNarrowPalette:this.props.enableNarrowPalette,paletteJSON:this.props.paletteJSON,showPalette:this.props.showPalette,canvasController:this.props.canvasController}):this.props.enablePaletteLayout===L&&(e=s.createElement(Ln,{paletteJSON:this.props.paletteJSON,showPalette:this.props.showPalette,parentDivId:this.props.containingDivId,canvasController:this.props.canvasController})),e}}]),a}(s.Component);si.propTypes={canvasController:u.object.isRequired,containingDivId:u.string.isRequired,enablePaletteLayout:u.string,enableNarrowPalette:u.bool,paletteJSON:u.object,showPalette:u.bool};var li=l((function(e,t){return{enablePaletteLayout:e.canvasconfig.enablePaletteLayout,enableNarrowPalette:e.canvasconfig.enableNarrowPalette,paletteJSON:e.palette.content,showPalette:void 0!==e.palette.isOpen&&e.palette.isOpen}}))(si);function ci(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,a=i(e);if(t){var r=i(this).constructor;n=Reflect.construct(a,arguments,r)}else n=a.apply(this,arguments);return o(this,n)}}var di=function(i){n(r,i);var o=ci(r);function r(t){var n;return e(this,r),(n=o.call(this,t)).state={},n.handleClick=n.handleClick.bind(a(n)),n}return t(r,[{key:"componentDidMount",value:function(){document.addEventListener("mousedown",this.handleClick,!0)}},{key:"componentWillUnmount",value:function(){document.removeEventListener("mousedown",this.handleClick,!0)}},{key:"handleClick",value:function(e){this.props.canvasController.closeTip()}},{key:"render",value:function(){var e=null,t=null;switch(this.props.type){case k:case C:t="right";break;default:t="bottom"}if(this.props.customContent)e=this.props.customContent;else switch(this.props.type){case k:e=s.createElement("div",{className:"tip-palette-item"},s.createElement("div",{className:"tip-palette-category"},this.props.category.label),s.createElement("div",{className:"tip-palette-label"},this.props.nodeTemplate.app_data.ui_data.label),this.props.nodeTemplate.app_data.ui_data.description?s.createElement("div",{className:"tip-palette-desc"},this.props.nodeTemplate.app_data.ui_data.description):"");break;case C:e=s.createElement("div",{className:"tip-palette-item"},s.createElement("div",{className:"tip-palette-label"},this.props.category.label),this.props.category.description?s.createElement("div",{className:"tip-palette-desc"},this.props.category.description):"");break;case D:var n=null;this.props.canvasController.getObjectModel().hasErrorMessage(this.props.node)?n=s.createElement(N,{type:j,className:"tip-node-status error"}):this.props.canvasController.getObjectModel().hasWarningMessage(this.props.node)&&(n=s.createElement(N,{type:A,className:"tip-node-status warning"}));var i=this.props.canvasController.getObjectModel().getPaletteNode(this.props.node.op),o=this.props.node.label,a=i&&i.app_data&&i.app_data.ui_data?i.app_data.ui_data.label:o;if(o!==a&&(o+=" (".concat(a,")")),!(n||o||a||this.props.node.description))return null;e=s.createElement("div",{className:"tip-node"},n,s.createElement("div",{className:"tip-node-label"},o),this.props.node.description?s.createElement("div",{className:"tip-node-desc"},this.props.node.description):"");break;case O:e=g(this.props.port.label)?null:s.createElement("div",{className:"tip-port"},this.props.port.label);break;case E:e=g(this.props.decoration.tooltip)?null:s.createElement("div",{className:"tip-decoration"},this.props.decoration.tooltip);break;case T:break;case x:e=g(this.props.stateTagText)?null:s.createElement("div",{className:"tip-state-tag"},this.props.stateTagText);break;default:e=null}return null!==e?s.createElement(Lt,{tip:e,direction:t,id:this.props.id,targetObj:this.props.targetObj,mousePos:this.props.mousePos,className:[D,O,E,T].includes(this.props.type)?"definition-tooltip":null}):null}}]),r}(s.Component);di.propTypes={canvasController:u.object.isRequired,id:u.string,type:u.oneOf([C,k,D,O,E,T,x]),targetObj:u.object,mousePos:u.object,customContent:u.oneOfType([u.string,u.element]),node:u.object,port:u.object,decoration:u.object,nodeTemplate:u.object,category:u.object,stateTagText:u.string};var ui=l((function(e,t){return{id:e.tooltip.id,type:e.tooltip.type,targetObj:e.tooltip.targetObj,mousePos:e.tooltip.mousePos,customContent:e.tooltip.customContent,node:e.tooltip.node,port:e.tooltip.port,decoration:e.tooltip.decoration,nodeTemplate:e.tooltip.nodeTemplate,category:e.tooltip.category,stateTagText:e.tooltip.stateTagText}}))(di),pi={"menu.highlightBranch":"Highlight branch","menu.highlightUpstream":"Highlight upstream","menu.highlightDownstream":"Highlight downstream","menu.unhighlight":"Unhighlight","menu.highlight":"Highlight","edit.cutSelection":"Cut","edit.copySelection":"Copy","edit.pasteSelection":"Paste","canvas.label":"Canvas","canvas.addComment":"New comment","canvas.selectAll":"Select all","canvas.undo":"Undo","canvas.redo":"Redo","canvas.deleteObject":"Delete","canvas.flowIsEmpty":"Your flow is empty.","canvas.addNodeToStart":"Get started by adding a node.","canvas.stateTagLocked":"Locked","canvas.stateTagReadOnly":"Read-only","canvas.stateTagTipLocked":"This flow is locked and cannot be edited.","canvas.stateTagTipReadOnly":"This flow cannot be edited.","node.createSupernode":"Create supernode","node.createSupernodeExternal":"Create external supernode","node.expandSupernode":"Expand supernode","node.displaySupernodeFullPage":"Display full page","node.collapseSupernodeInPlace":"Collapse supernode","node.deconstructSupernode":"Deconstruct supernode","node.convertSupernodeExternalToLocal":"Convert external to local","node.convertSupernodeLocalToExternal":"Convert local to external","canvas.validateFlow":"Validate Flow","node.editNode":"Open","node.editMenu":"Edit","node.disconnectNode":"Disconnect","node.saveToPalette":"Save to palette","link.deleteLink":"Delete"};function hi(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,a=i(e);if(t){var r=i(this).constructor;n=Reflect.construct(a,arguments,r)}else n=a.apply(this,arguments);return o(this,n)}}var fi=function(i){n(a,i);var o=hi(a);function a(t){var n;return e(this,a),(n=o.call(this,t)).logger=new Zn("CC-ContextMenu"),n}return t(a,[{key:"render",value:function(){this.logger.log("render");var e=null;return g(this.props.contextMenuDef)||(e=s.createElement(Tt,{containingDivId:this.props.containingDivId,contextMenuDef:this.props.contextMenuDef,contextMenuActionHandler:this.props.canvasController.contextMenuActionHandler,contextMenuPos:this.props.canvasController.getContextMenuPos(),closeContextMenu:this.props.canvasController.closeContextMenu,stopPropagation:!0})),e}}]),a}(s.Component);fi.propTypes={canvasController:u.object.isRequired,containingDivId:u.string.isRequired,contextMenuDef:u.array.isRequired};var gi=l((function(e,t){return{contextMenuDef:e.contextmenu.menuDef}}))(fi);function yi(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,a=i(e);if(t){var r=i(this).constructor;n=Reflect.construct(a,arguments,r)}else n=a.apply(this,arguments);return o(this,n)}}var vi=function(i){n(r,i);var o=yi(r);function r(t){var n;return e(this,r),(n=o.call(this,t)).logger=new Zn("CC-StateTag"),n.onMouseOver=n.onMouseOver.bind(a(n)),n.onMouseLeave=n.onMouseLeave.bind(a(n)),n}return t(r,[{key:"onMouseOver",value:function(e){var t;this.props.stateTagType===M?t=this.getLabel("canvas.stateTagTipLocked"):this.props.stateTagType===R&&(t=this.getLabel("canvas.stateTagTipReadOnly")),this.props.canvasController.openTip({id:"stateTagTip",type:x,stateTagType:this.props.stateTagType,stateTagText:t,targetObj:e.currentTarget})}},{key:"onMouseLeave",value:function(){this.props.canvasController.closeTip()}},{key:"getLabel",value:function(e){return this.props.intl.formatMessage({id:e,defaultMessage:pi[e]})}},{key:"getStateTag",value:function(e,t){return s.createElement("div",{className:"state-tag",onMouseOver:this.onMouseOver,onMouseLeave:this.onMouseLeave},t,s.createElement("span",null,e))}},{key:"render",value:function(){this.logger.log("render");var e=null;if(this.props.stateTagType===M){var t=this.getLabel("canvas.stateTagLocked");e=this.getStateTag(t,s.createElement(Et,null))}else if(this.props.stateTagType===R){var n=this.getLabel("canvas.stateTagReadOnly");e=this.getStateTag(n,s.createElement(Ot,null))}return e}}]),r}(s.Component);vi.propTypes={intl:u.object.isRequired,stateTagType:u.string,canvasController:u.object};var mi=d(vi),bi="http://www.w3.org/1999/xhtml",_i={svg:"http://www.w3.org/2000/svg",xhtml:bi,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function ki(e){var t=e+="",n=t.indexOf(":");return n>=0&&"xmlns"!==(t=e.slice(0,n))&&(e=e.slice(n+1)),_i.hasOwnProperty(t)?{space:_i[t],local:e}:e}function Pi(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===bi&&t.documentElement.namespaceURI===bi?t.createElement(e):t.createElementNS(n,e)}}function Ii(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Ni(e){var t=ki(e);return(t.local?Ii:Pi)(t)}function wi(){}function Ci(e){return null==e?wi:function(){return this.querySelector(e)}}function Si(e){return null==e?[]:Array.isArray(e)?e:Array.from(e)}function Li(){return[]}function xi(e){return null==e?Li:function(){return this.querySelectorAll(e)}}function Ti(e){return function(){return this.matches(e)}}function Ei(e){return function(t){return t.matches(e)}}var Oi=Array.prototype.find;function Di(){return this.firstElementChild}var ji=Array.prototype.filter;function Ai(){return Array.from(this.children)}function Mi(e){return new Array(e.length)}function Ri(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}function Ui(e){return function(){return e}}function Fi(e,t,n,i,o,a){for(var r,s=0,l=t.length,c=a.length;s<c;++s)(r=t[s])?(r.__data__=a[s],i[s]=r):n[s]=new Ri(e,a[s]);for(;s<l;++s)(r=t[s])&&(o[s]=r)}function zi(e,t,n,i,o,a,r){var s,l,c,d=new Map,u=t.length,p=a.length,h=new Array(u);for(s=0;s<u;++s)(l=t[s])&&(h[s]=c=r.call(l,l.__data__,s,t)+"",d.has(c)?o[s]=l:d.set(c,l));for(s=0;s<p;++s)c=r.call(e,a[s],s,a)+"",(l=d.get(c))?(i[s]=l,l.__data__=a[s],d.delete(c)):n[s]=new Ri(e,a[s]);for(s=0;s<u;++s)(l=t[s])&&d.get(h[s])===l&&(o[s]=l)}function Bi(e){return e.__data__}function Hi(e){return"object"==typeof e&&"length"in e?e:Array.from(e)}function Gi(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function qi(e){return function(){this.removeAttribute(e)}}function Vi(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Yi(e,t){return function(){this.setAttribute(e,t)}}function Wi(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function Xi(e,t){return function(){var n=t.apply(this,arguments);null==n?this.removeAttribute(e):this.setAttribute(e,n)}}function $i(e,t){return function(){var n=t.apply(this,arguments);null==n?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function Zi(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function Ki(e){return function(){this.style.removeProperty(e)}}function Ji(e,t,n){return function(){this.style.setProperty(e,t,n)}}function Qi(e,t,n){return function(){var i=t.apply(this,arguments);null==i?this.style.removeProperty(e):this.style.setProperty(e,i,n)}}function eo(e,t){return e.style.getPropertyValue(t)||Zi(e).getComputedStyle(e,null).getPropertyValue(t)}function to(e){return function(){delete this[e]}}function no(e,t){return function(){this[e]=t}}function io(e,t){return function(){var n=t.apply(this,arguments);null==n?delete this[e]:this[e]=n}}function oo(e){return e.trim().split(/^|\s+/)}function ao(e){return e.classList||new ro(e)}function ro(e){this._node=e,this._names=oo(e.getAttribute("class")||"")}function so(e,t){for(var n=ao(e),i=-1,o=t.length;++i<o;)n.add(t[i])}function lo(e,t){for(var n=ao(e),i=-1,o=t.length;++i<o;)n.remove(t[i])}function co(e){return function(){so(this,e)}}function uo(e){return function(){lo(this,e)}}function po(e,t){return function(){(t.apply(this,arguments)?so:lo)(this,e)}}function ho(){this.textContent=""}function fo(e){return function(){this.textContent=e}}function go(e){return function(){var t=e.apply(this,arguments);this.textContent=null==t?"":t}}function yo(){this.innerHTML=""}function vo(e){return function(){this.innerHTML=e}}function mo(e){return function(){var t=e.apply(this,arguments);this.innerHTML=null==t?"":t}}function bo(){this.nextSibling&&this.parentNode.appendChild(this)}function _o(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function ko(){return null}function Po(){var e=this.parentNode;e&&e.removeChild(this)}function Io(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function No(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function wo(e){return e.trim().split(/^|\s+/).map((function(e){var t="",n=e.indexOf(".");return n>=0&&(t=e.slice(n+1),e=e.slice(0,n)),{type:e,name:t}}))}function Co(e){return function(){var t=this.__on;if(t){for(var n,i=0,o=-1,a=t.length;i<a;++i)n=t[i],e.type&&n.type!==e.type||n.name!==e.name?t[++o]=n:this.removeEventListener(n.type,n.listener,n.options);++o?t.length=o:delete this.__on}}}function So(e,t,n){return function(){var i,o=this.__on,a=function(e){return function(t){e.call(this,t,this.__data__)}}(t);if(o)for(var r=0,s=o.length;r<s;++r)if((i=o[r]).type===e.type&&i.name===e.name)return this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=a,i.options=n),void(i.value=t);this.addEventListener(e.type,a,n),i={type:e.type,name:e.name,value:t,listener:a,options:n},o?o.push(i):this.__on=[i]}}function Lo(e,t,n){var i=Zi(e),o=i.CustomEvent;"function"==typeof o?o=new o(t,n):(o=i.document.createEvent("Event"),n?(o.initEvent(t,n.bubbles,n.cancelable),o.detail=n.detail):o.initEvent(t,!1,!1)),e.dispatchEvent(o)}function xo(e,t){return function(){return Lo(this,e,t)}}function To(e,t){return function(){return Lo(this,e,t.apply(this,arguments))}}Ri.prototype={constructor:Ri,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}},ro.prototype={add:function(e){this._names.indexOf(e)<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};var Eo=[null];function Oo(e,t){this._groups=e,this._parents=t}function Do(){return new Oo([[document.documentElement]],Eo)}function jo(e){return"string"==typeof e?new Oo([[document.querySelector(e)]],[document.documentElement]):new Oo([[e]],Eo)}Oo.prototype=Do.prototype={constructor:Oo,select:function(e){"function"!=typeof e&&(e=Ci(e));for(var t=this._groups,n=t.length,i=new Array(n),o=0;o<n;++o)for(var a,r,s=t[o],l=s.length,c=i[o]=new Array(l),d=0;d<l;++d)(a=s[d])&&(r=e.call(a,a.__data__,d,s))&&("__data__"in a&&(r.__data__=a.__data__),c[d]=r);return new Oo(i,this._parents)},selectAll:function(e){e="function"==typeof e?function(e){return function(){return Si(e.apply(this,arguments))}}(e):xi(e);for(var t=this._groups,n=t.length,i=[],o=[],a=0;a<n;++a)for(var r,s=t[a],l=s.length,c=0;c<l;++c)(r=s[c])&&(i.push(e.call(r,r.__data__,c,s)),o.push(r));return new Oo(i,o)},selectChild:function(e){return this.select(null==e?Di:function(e){return function(){return Oi.call(this.children,e)}}("function"==typeof e?e:Ei(e)))},selectChildren:function(e){return this.selectAll(null==e?Ai:function(e){return function(){return ji.call(this.children,e)}}("function"==typeof e?e:Ei(e)))},filter:function(e){"function"!=typeof e&&(e=Ti(e));for(var t=this._groups,n=t.length,i=new Array(n),o=0;o<n;++o)for(var a,r=t[o],s=r.length,l=i[o]=[],c=0;c<s;++c)(a=r[c])&&e.call(a,a.__data__,c,r)&&l.push(a);return new Oo(i,this._parents)},data:function(e,t){if(!arguments.length)return Array.from(this,Bi);var n=t?zi:Fi,i=this._parents,o=this._groups;"function"!=typeof e&&(e=Ui(e));for(var a=o.length,r=new Array(a),s=new Array(a),l=new Array(a),c=0;c<a;++c){var d=i[c],u=o[c],p=u.length,h=Hi(e.call(d,d&&d.__data__,c,i)),f=h.length,g=s[c]=new Array(f),y=r[c]=new Array(f),v=l[c]=new Array(p);n(d,u,g,y,v,h,t);for(var m,b,_=0,k=0;_<f;++_)if(m=g[_]){for(_>=k&&(k=_+1);!(b=y[k])&&++k<f;);m._next=b||null}}return(r=new Oo(r,i))._enter=s,r._exit=l,r},enter:function(){return new Oo(this._enter||this._groups.map(Mi),this._parents)},exit:function(){return new Oo(this._exit||this._groups.map(Mi),this._parents)},join:function(e,t,n){var i=this.enter(),o=this,a=this.exit();return"function"==typeof e?(i=e(i))&&(i=i.selection()):i=i.append(e+""),null!=t&&(o=t(o))&&(o=o.selection()),null==n?a.remove():n(a),i&&o?i.merge(o).order():o},merge:function(e){for(var t=e.selection?e.selection():e,n=this._groups,i=t._groups,o=n.length,a=i.length,r=Math.min(o,a),s=new Array(o),l=0;l<r;++l)for(var c,d=n[l],u=i[l],p=d.length,h=s[l]=new Array(p),f=0;f<p;++f)(c=d[f]||u[f])&&(h[f]=c);for(;l<o;++l)s[l]=n[l];return new Oo(s,this._parents)},selection:function(){return this},order:function(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var i,o=e[t],a=o.length-1,r=o[a];--a>=0;)(i=o[a])&&(r&&4^i.compareDocumentPosition(r)&&r.parentNode.insertBefore(i,r),r=i);return this},sort:function(e){function t(t,n){return t&&n?e(t.__data__,n.__data__):!t-!n}e||(e=Gi);for(var n=this._groups,i=n.length,o=new Array(i),a=0;a<i;++a){for(var r,s=n[a],l=s.length,c=o[a]=new Array(l),d=0;d<l;++d)(r=s[d])&&(c[d]=r);c.sort(t)}return new Oo(o,this._parents).order()},call:function(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this},nodes:function(){return Array.from(this)},node:function(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var i=e[t],o=0,a=i.length;o<a;++o){var r=i[o];if(r)return r}return null},size:function(){let e=0;for(const t of this)++e;return e},empty:function(){return!this.node()},each:function(e){for(var t=this._groups,n=0,i=t.length;n<i;++n)for(var o,a=t[n],r=0,s=a.length;r<s;++r)(o=a[r])&&e.call(o,o.__data__,r,a);return this},attr:function(e,t){var n=ki(e);if(arguments.length<2){var i=this.node();return n.local?i.getAttributeNS(n.space,n.local):i.getAttribute(n)}return this.each((null==t?n.local?Vi:qi:"function"==typeof t?n.local?$i:Xi:n.local?Wi:Yi)(n,t))},style:function(e,t,n){return arguments.length>1?this.each((null==t?Ki:"function"==typeof t?Qi:Ji)(e,t,null==n?"":n)):eo(this.node(),e)},property:function(e,t){return arguments.length>1?this.each((null==t?to:"function"==typeof t?io:no)(e,t)):this.node()[e]},classed:function(e,t){var n=oo(e+"");if(arguments.length<2){for(var i=ao(this.node()),o=-1,a=n.length;++o<a;)if(!i.contains(n[o]))return!1;return!0}return this.each(("function"==typeof t?po:t?co:uo)(n,t))},text:function(e){return arguments.length?this.each(null==e?ho:("function"==typeof e?go:fo)(e)):this.node().textContent},html:function(e){return arguments.length?this.each(null==e?yo:("function"==typeof e?mo:vo)(e)):this.node().innerHTML},raise:function(){return this.each(bo)},lower:function(){return this.each(_o)},append:function(e){var t="function"==typeof e?e:Ni(e);return this.select((function(){return this.appendChild(t.apply(this,arguments))}))},insert:function(e,t){var n="function"==typeof e?e:Ni(e),i=null==t?ko:"function"==typeof t?t:Ci(t);return this.select((function(){return this.insertBefore(n.apply(this,arguments),i.apply(this,arguments)||null)}))},remove:function(){return this.each(Po)},clone:function(e){return this.select(e?No:Io)},datum:function(e){return arguments.length?this.property("__data__",e):this.node().__data__},on:function(e,t,n){var i,o,a=wo(e+""),r=a.length;if(!(arguments.length<2)){for(s=t?So:Co,i=0;i<r;++i)this.each(s(a[i],t,n));return this}var s=this.node().__on;if(s)for(var l,c=0,d=s.length;c<d;++c)for(i=0,l=s[c];i<r;++i)if((o=a[i]).type===l.type&&o.name===l.name)return l.value},dispatch:function(e,t){return this.each(("function"==typeof t?To:xo)(e,t))},[Symbol.iterator]:function*(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var i,o=e[t],a=0,r=o.length;a<r;++a)(i=o[a])&&(yield i)}};var Ao=0;function Mo(){return new Ro}function Ro(){this._="@"+(++Ao).toString(36)}function Uo(e){let t;for(;t=e.sourceEvent;)e=t;return e}function Fo(e,t){if(e=Uo(e),void 0===t&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var i=n.createSVGPoint();return i.x=e.clientX,i.y=e.clientY,[(i=i.matrixTransform(t.getScreenCTM().inverse())).x,i.y]}if(t.getBoundingClientRect){var o=t.getBoundingClientRect();return[e.clientX-o.left-t.clientLeft,e.clientY-o.top-t.clientTop]}}return[e.pageX,e.pageY]}Ro.prototype=Mo.prototype={constructor:Ro,get:function(e){for(var t=this._;!(t in e);)if(!(e=e.parentNode))return;return e[t]},set:function(e,t){return e[this._]=t},remove:function(e){return this._ in e&&delete e[this._]},toString:function(){return this._}};var zo=Object.freeze({__proto__:null,create:function(e){return jo(Ni(e).call(document.documentElement))},creator:Ni,local:Mo,matcher:Ti,namespace:ki,namespaces:_i,pointer:Fo,pointers:function(e,t){return e.target&&(e=Uo(e),void 0===t&&(t=e.currentTarget),e=e.touches||[e]),Array.from(e,(e=>Fo(e,t)))},select:jo,selectAll:function(e){return"string"==typeof e?new Oo([document.querySelectorAll(e)],[document.documentElement]):new Oo([Si(e)],Eo)},selection:Do,selector:Ci,selectorAll:xi,style:eo,window:Zi}),Bo={value:()=>{}};function Ho(){for(var e,t=0,n=arguments.length,i={};t<n;++t){if(!(e=arguments[t]+"")||e in i||/[\s.]/.test(e))throw new Error("illegal type: "+e);i[e]=[]}return new Go(i)}function Go(e){this._=e}function qo(e,t){return e.trim().split(/^|\s+/).map((function(e){var n="",i=e.indexOf(".");if(i>=0&&(n=e.slice(i+1),e=e.slice(0,i)),e&&!t.hasOwnProperty(e))throw new Error("unknown type: "+e);return{type:e,name:n}}))}function Vo(e,t){for(var n,i=0,o=e.length;i<o;++i)if((n=e[i]).name===t)return n.value}function Yo(e,t,n){for(var i=0,o=e.length;i<o;++i)if(e[i].name===t){e[i]=Bo,e=e.slice(0,i).concat(e.slice(i+1));break}return null!=n&&e.push({name:t,value:n}),e}Go.prototype=Ho.prototype={constructor:Go,on:function(e,t){var n,i=this._,o=qo(e+"",i),a=-1,r=o.length;if(!(arguments.length<2)){if(null!=t&&"function"!=typeof t)throw new Error("invalid callback: "+t);for(;++a<r;)if(n=(e=o[a]).type)i[n]=Yo(i[n],e.name,t);else if(null==t)for(n in i)i[n]=Yo(i[n],e.name,null);return this}for(;++a<r;)if((n=(e=o[a]).type)&&(n=Vo(i[n],e.name)))return n},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new Go(e)},call:function(e,t){if((n=arguments.length-2)>0)for(var n,i,o=new Array(n),a=0;a<n;++a)o[a]=arguments[a+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(a=0,n=(i=this._[e]).length;a<n;++a)i[a].value.apply(t,o)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var i=this._[e],o=0,a=i.length;o<a;++o)i[o].value.apply(t,n)}};const Wo={passive:!1},Xo={capture:!0,passive:!1};function $o(e){e.stopImmediatePropagation()}function Zo(e){e.preventDefault(),e.stopImmediatePropagation()}function Ko(e){var t=e.document.documentElement,n=jo(e).on("dragstart.drag",Zo,Xo);"onselectstart"in t?n.on("selectstart.drag",Zo,Xo):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function Jo(e,t){var n=e.document.documentElement,i=jo(e).on("dragstart.drag",null);t&&(i.on("click.drag",Zo,Xo),setTimeout((function(){i.on("click.drag",null)}),0)),"onselectstart"in n?i.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}var Qo=e=>()=>e;function ea(e,{sourceEvent:t,subject:n,target:i,identifier:o,active:a,x:r,y:s,dx:l,dy:c,dispatch:d}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:i,enumerable:!0,configurable:!0},identifier:{value:o,enumerable:!0,configurable:!0},active:{value:a,enumerable:!0,configurable:!0},x:{value:r,enumerable:!0,configurable:!0},y:{value:s,enumerable:!0,configurable:!0},dx:{value:l,enumerable:!0,configurable:!0},dy:{value:c,enumerable:!0,configurable:!0},_:{value:d}})}function ta(e){return!e.ctrlKey&&!e.button}function na(){return this.parentNode}function ia(e,t){return null==t?{x:e.x,y:e.y}:t}function oa(){return navigator.maxTouchPoints||"ontouchstart"in this}ea.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};var aa=Object.freeze({__proto__:null,drag:function(){var e,t,n,i,o=ta,a=na,r=ia,s=oa,l={},c=Ho("start","drag","end"),d=0,u=0;function p(e){e.on("mousedown.drag",h).filter(s).on("touchstart.drag",y).on("touchmove.drag",v,Wo).on("touchend.drag touchcancel.drag",m).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function h(r,s){if(!i&&o.call(this,r,s)){var l=b(this,a.call(this,r,s),r,s,"mouse");l&&(jo(r.view).on("mousemove.drag",f,Xo).on("mouseup.drag",g,Xo),Ko(r.view),$o(r),n=!1,e=r.clientX,t=r.clientY,l("start",r))}}function f(i){if(Zo(i),!n){var o=i.clientX-e,a=i.clientY-t;n=o*o+a*a>u}l.mouse("drag",i)}function g(e){jo(e.view).on("mousemove.drag mouseup.drag",null),Jo(e.view,n),Zo(e),l.mouse("end",e)}function y(e,t){if(o.call(this,e,t)){var n,i,r=e.changedTouches,s=a.call(this,e,t),l=r.length;for(n=0;n<l;++n)(i=b(this,s,e,t,r[n].identifier,r[n]))&&($o(e),i("start",e,r[n]))}}function v(e){var t,n,i=e.changedTouches,o=i.length;for(t=0;t<o;++t)(n=l[i[t].identifier])&&(Zo(e),n("drag",e,i[t]))}function m(e){var t,n,o=e.changedTouches,a=o.length;for(i&&clearTimeout(i),i=setTimeout((function(){i=null}),500),t=0;t<a;++t)(n=l[o[t].identifier])&&($o(e),n("end",e,o[t]))}function b(e,t,n,i,o,a){var s,u,h,f=c.copy(),g=Fo(a||n,t);if(null!=(h=r.call(e,new ea("beforestart",{sourceEvent:n,target:p,identifier:o,active:d,x:g[0],y:g[1],dx:0,dy:0,dispatch:f}),i)))return s=h.x-g[0]||0,u=h.y-g[1]||0,function n(a,r,c){var y,v=g;switch(a){case"start":l[o]=n,y=d++;break;case"end":delete l[o],--d;case"drag":g=Fo(c||r,t),y=d}f.call(a,e,new ea(a,{sourceEvent:r,subject:h,target:p,identifier:o,active:y,x:g[0]+s,y:g[1]+u,dx:g[0]-v[0],dy:g[1]-v[1],dispatch:f}),i)}}return p.filter=function(e){return arguments.length?(o="function"==typeof e?e:Qo(!!e),p):o},p.container=function(e){return arguments.length?(a="function"==typeof e?e:Qo(e),p):a},p.subject=function(e){return arguments.length?(r="function"==typeof e?e:Qo(e),p):r},p.touchable=function(e){return arguments.length?(s="function"==typeof e?e:Qo(!!e),p):s},p.on=function(){var e=c.on.apply(c,arguments);return e===c?p:e},p.clickDistance=function(e){return arguments.length?(u=(e=+e)*e,p):Math.sqrt(u)},p},dragDisable:Ko,dragEnable:Jo});function ra(e){return((e*=2)<=1?e*e:--e*(2-e)+1)/2}function sa(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var la=function e(t){function n(e){return Math.pow(e,t)}return t=+t,n.exponent=e,n}(3),ca=function e(t){function n(e){return 1-Math.pow(1-e,t)}return t=+t,n.exponent=e,n}(3),da=function e(t){function n(e){return((e*=2)<=1?Math.pow(e,t):2-Math.pow(2-e,t))/2}return t=+t,n.exponent=e,n}(3),ua=Math.PI,pa=ua/2;function ha(e){return(1-Math.cos(ua*e))/2}function fa(e){return 1.0009775171065494*(Math.pow(2,-10*e)-.0009765625)}function ga(e){return((e*=2)<=1?fa(1-e):2-fa(e-1))/2}function ya(e){return((e*=2)<=1?1-Math.sqrt(1-e*e):Math.sqrt(1-(e-=2)*e)+1)/2}var va=4/11,ma=7.5625;function ba(e){return(e=+e)<va?ma*e*e:e<.7272727272727273?ma*(e-=.5454545454545454)*e+.75:e<.9090909090909091?ma*(e-=.8181818181818182)*e+.9375:ma*(e-=.9545454545454546)*e+.984375}var _a=function e(t){function n(e){return(e=+e)*e*(t*(e-1)+e)}return t=+t,n.overshoot=e,n}(1.70158),ka=function e(t){function n(e){return--e*e*((e+1)*t+e)+1}return t=+t,n.overshoot=e,n}(1.70158),Pa=function e(t){function n(e){return((e*=2)<1?e*e*((t+1)*e-t):(e-=2)*e*((t+1)*e+t)+2)/2}return t=+t,n.overshoot=e,n}(1.70158),Ia=2*Math.PI,Na=function e(t,n){var i=Math.asin(1/(t=Math.max(1,t)))*(n/=Ia);function o(e){return t*fa(- --e)*Math.sin((i-e)/n)}return o.amplitude=function(t){return e(t,n*Ia)},o.period=function(n){return e(t,n)},o}(1,.3),wa=function e(t,n){var i=Math.asin(1/(t=Math.max(1,t)))*(n/=Ia);function o(e){return 1-t*fa(e=+e)*Math.sin((e+i)/n)}return o.amplitude=function(t){return e(t,n*Ia)},o.period=function(n){return e(t,n)},o}(1,.3),Ca=function e(t,n){var i=Math.asin(1/(t=Math.max(1,t)))*(n/=Ia);function o(e){return((e=2*e-1)<0?t*fa(-e)*Math.sin((i-e)/n):2-t*fa(e)*Math.sin((i+e)/n))/2}return o.amplitude=function(t){return e(t,n*Ia)},o.period=function(n){return e(t,n)},o}(1,.3),Sa=Object.freeze({__proto__:null,easeLinear:e=>+e,easeQuad:ra,easeQuadIn:function(e){return e*e},easeQuadOut:function(e){return e*(2-e)},easeQuadInOut:ra,easeCubic:sa,easeCubicIn:function(e){return e*e*e},easeCubicOut:function(e){return--e*e*e+1},easeCubicInOut:sa,easePoly:da,easePolyIn:la,easePolyOut:ca,easePolyInOut:da,easeSin:ha,easeSinIn:function(e){return 1==+e?1:1-Math.cos(e*pa)},easeSinOut:function(e){return Math.sin(e*pa)},easeSinInOut:ha,easeExp:ga,easeExpIn:function(e){return fa(1-+e)},easeExpOut:function(e){return 1-fa(e)},easeExpInOut:ga,easeCircle:ya,easeCircleIn:function(e){return 1-Math.sqrt(1-e*e)},easeCircleOut:function(e){return Math.sqrt(1- --e*e)},easeCircleInOut:ya,easeBounce:ba,easeBounceIn:function(e){return 1-ba(1-e)},easeBounceOut:ba,easeBounceInOut:function(e){return((e*=2)<=1?1-ba(1-e):ba(e-1)+1)/2},easeBack:Pa,easeBackIn:_a,easeBackOut:ka,easeBackInOut:Pa,easeElastic:wa,easeElasticIn:Na,easeElasticOut:wa,easeElasticInOut:Ca});function La(e){if(!e.ok)throw new Error(e.status+" "+e.statusText);return e.blob()}function xa(e){if(!e.ok)throw new Error(e.status+" "+e.statusText);return e.arrayBuffer()}var Ta={},Ea={};function Oa(e){return new Function("d","return {"+e.map((function(e,t){return JSON.stringify(e)+": d["+t+'] || ""'})).join(",")+"}")}function Da(e){var t=Object.create(null),n=[];return e.forEach((function(e){for(var i in e)i in t||n.push(t[i]=i)})),n}function ja(e,t){var n=e+"",i=n.length;return i<t?new Array(t-i+1).join(0)+n:n}function Aa(e){var t,n=e.getUTCHours(),i=e.getUTCMinutes(),o=e.getUTCSeconds(),a=e.getUTCMilliseconds();return isNaN(e)?"Invalid Date":((t=e.getUTCFullYear())<0?"-"+ja(-t,6):t>9999?"+"+ja(t,6):ja(t,4))+"-"+ja(e.getUTCMonth()+1,2)+"-"+ja(e.getUTCDate(),2)+(a?"T"+ja(n,2)+":"+ja(i,2)+":"+ja(o,2)+"."+ja(a,3)+"Z":o?"T"+ja(n,2)+":"+ja(i,2)+":"+ja(o,2)+"Z":i||n?"T"+ja(n,2)+":"+ja(i,2)+"Z":"")}function Ma(e){var t=new RegExp('["'+e+"\n\r]"),n=e.charCodeAt(0);function i(e,t){var i,o=[],a=e.length,r=0,s=0,l=a<=0,c=!1;function d(){if(l)return Ea;if(c)return c=!1,Ta;var t,i,o=r;if(34===e.charCodeAt(o)){for(;r++<a&&34!==e.charCodeAt(r)||34===e.charCodeAt(++r););return(t=r)>=a?l=!0:10===(i=e.charCodeAt(r++))?c=!0:13===i&&(c=!0,10===e.charCodeAt(r)&&++r),e.slice(o+1,t-1).replace(/""/g,'"')}for(;r<a;){if(10===(i=e.charCodeAt(t=r++)))c=!0;else if(13===i)c=!0,10===e.charCodeAt(r)&&++r;else if(i!==n)continue;return e.slice(o,t)}return l=!0,e.slice(o,a)}for(10===e.charCodeAt(a-1)&&--a,13===e.charCodeAt(a-1)&&--a;(i=d())!==Ea;){for(var u=[];i!==Ta&&i!==Ea;)u.push(i),i=d();t&&null==(u=t(u,s++))||o.push(u)}return o}function o(t,n){return t.map((function(t){return n.map((function(e){return r(t[e])})).join(e)}))}function a(t){return t.map(r).join(e)}function r(e){return null==e?"":e instanceof Date?Aa(e):t.test(e+="")?'"'+e.replace(/"/g,'""')+'"':e}return{parse:function(e,t){var n,o,a=i(e,(function(e,i){if(n)return n(e,i-1);o=e,n=t?function(e,t){var n=Oa(e);return function(i,o){return t(n(i),o,e)}}(e,t):Oa(e)}));return a.columns=o||[],a},parseRows:i,format:function(t,n){return null==n&&(n=Da(t)),[n.map(r).join(e)].concat(o(t,n)).join("\n")},formatBody:function(e,t){return null==t&&(t=Da(e)),o(e,t).join("\n")},formatRows:function(e){return e.map(a).join("\n")},formatRow:a,formatValue:r}}var Ra=Ma(",").parse,Ua=Ma("\t").parse;function Fa(e){if(!e.ok)throw new Error(e.status+" "+e.statusText);return e.text()}function za(e,t){return fetch(e,t).then(Fa)}function Ba(e){return function(t,n,i){return 2===arguments.length&&"function"==typeof n&&(i=n,n=void 0),za(t,n).then((function(t){return e(t,i)}))}}var Ha=Ba(Ra),Ga=Ba(Ua);function qa(e){if(!e.ok)throw new Error(e.status+" "+e.statusText);if(204!==e.status&&205!==e.status)return e.json()}function Va(e){return(t,n)=>za(t,n).then((t=>(new DOMParser).parseFromString(t,e)))}var Ya=Va("application/xml"),Wa=Va("text/html"),Xa=Va("image/svg+xml"),$a=Object.freeze({__proto__:null,blob:function(e,t){return fetch(e,t).then(La)},buffer:function(e,t){return fetch(e,t).then(xa)},dsv:function(e,t,n,i){3===arguments.length&&"function"==typeof n&&(i=n,n=void 0);var o=Ma(e);return za(t,n).then((function(e){return o.parse(e,i)}))},csv:Ha,tsv:Ga,image:function(e,t){return new Promise((function(n,i){var o=new Image;for(var a in t)o[a]=t[a];o.onerror=i,o.onload=function(){n(o)},o.src=e}))},json:function(e,t){return fetch(e,t).then(qa)},text:za,xml:Ya,html:Wa,svg:Xa});function Za(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Ka(e,t){var n=Object.create(e.prototype);for(var i in t)n[i]=t[i];return n}function Ja(){}var Qa=1/.7,er="\\s*([+-]?\\d+)\\s*",tr="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",nr="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",ir=/^#([0-9a-f]{3,8})$/,or=new RegExp("^rgb\\("+[er,er,er]+"\\)$"),ar=new RegExp("^rgb\\("+[nr,nr,nr]+"\\)$"),rr=new RegExp("^rgba\\("+[er,er,er,tr]+"\\)$"),sr=new RegExp("^rgba\\("+[nr,nr,nr,tr]+"\\)$"),lr=new RegExp("^hsl\\("+[tr,nr,nr]+"\\)$"),cr=new RegExp("^hsla\\("+[tr,nr,nr,tr]+"\\)$"),dr={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function ur(){return this.rgb().formatHex()}function pr(){return this.rgb().formatRgb()}function hr(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=ir.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?fr(t):3===n?new mr(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?gr(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?gr(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=or.exec(e))?new mr(t[1],t[2],t[3],1):(t=ar.exec(e))?new mr(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=rr.exec(e))?gr(t[1],t[2],t[3],t[4]):(t=sr.exec(e))?gr(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=lr.exec(e))?Pr(t[1],t[2]/100,t[3]/100,1):(t=cr.exec(e))?Pr(t[1],t[2]/100,t[3]/100,t[4]):dr.hasOwnProperty(e)?fr(dr[e]):"transparent"===e?new mr(NaN,NaN,NaN,0):null}function fr(e){return new mr(e>>16&255,e>>8&255,255&e,1)}function gr(e,t,n,i){return i<=0&&(e=t=n=NaN),new mr(e,t,n,i)}function yr(e){return e instanceof Ja||(e=hr(e)),e?new mr((e=e.rgb()).r,e.g,e.b,e.opacity):new mr}function vr(e,t,n,i){return 1===arguments.length?yr(e):new mr(e,t,n,null==i?1:i)}function mr(e,t,n,i){this.r=+e,this.g=+t,this.b=+n,this.opacity=+i}function br(){return"#"+kr(this.r)+kr(this.g)+kr(this.b)}function _r(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===e?")":", "+e+")")}function kr(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function Pr(e,t,n,i){return i<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Nr(e,t,n,i)}function Ir(e){if(e instanceof Nr)return new Nr(e.h,e.s,e.l,e.opacity);if(e instanceof Ja||(e=hr(e)),!e)return new Nr;if(e instanceof Nr)return e;var t=(e=e.rgb()).r/255,n=e.g/255,i=e.b/255,o=Math.min(t,n,i),a=Math.max(t,n,i),r=NaN,s=a-o,l=(a+o)/2;return s?(r=t===a?(n-i)/s+6*(n<i):n===a?(i-t)/s+2:(t-n)/s+4,s/=l<.5?a+o:2-a-o,r*=60):s=l>0&&l<1?0:r,new Nr(r,s,l,e.opacity)}function Nr(e,t,n,i){this.h=+e,this.s=+t,this.l=+n,this.opacity=+i}function wr(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}Za(Ja,hr,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:ur,formatHex:ur,formatHsl:function(){return Ir(this).formatHsl()},formatRgb:pr,toString:pr}),Za(mr,vr,Ka(Ja,{brighter:function(e){return e=null==e?Qa:Math.pow(Qa,e),new mr(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new mr(this.r*e,this.g*e,this.b*e,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:br,formatHex:br,formatRgb:_r,toString:_r})),Za(Nr,(function(e,t,n,i){return 1===arguments.length?Ir(e):new Nr(e,t,n,null==i?1:i)}),Ka(Ja,{brighter:function(e){return e=null==e?Qa:Math.pow(Qa,e),new Nr(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new Nr(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,i=n+(n<.5?n:1-n)*t,o=2*n-i;return new mr(wr(e>=240?e-240:e+120,o,i),wr(e,o,i),wr(e<120?e+240:e-120,o,i),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===e?")":", "+e+")")}}));var Cr=e=>()=>e;function Sr(e){return 1==(e=+e)?Lr:function(t,n){return n-t?function(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(i){return Math.pow(e+i*t,n)}}(t,n,e):Cr(isNaN(t)?n:t)}}function Lr(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):Cr(isNaN(e)?t:e)}var xr=function e(t){var n=Sr(t);function i(e,t){var i=n((e=vr(e)).r,(t=vr(t)).r),o=n(e.g,t.g),a=n(e.b,t.b),r=Lr(e.opacity,t.opacity);return function(t){return e.r=i(t),e.g=o(t),e.b=a(t),e.opacity=r(t),e+""}}return i.gamma=e,i}(1);function Tr(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}var Er=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Or=new RegExp(Er.source,"g");function Dr(e,t){var n,i,o,a=Er.lastIndex=Or.lastIndex=0,r=-1,s=[],l=[];for(e+="",t+="";(n=Er.exec(e))&&(i=Or.exec(t));)(o=i.index)>a&&(o=t.slice(a,o),s[r]?s[r]+=o:s[++r]=o),(n=n[0])===(i=i[0])?s[r]?s[r]+=i:s[++r]=i:(s[++r]=null,l.push({i:r,x:Tr(n,i)})),a=Or.lastIndex;return a<t.length&&(o=t.slice(a),s[r]?s[r]+=o:s[++r]=o),s.length<2?l[0]?function(e){return function(t){return e(t)+""}}(l[0].x):function(e){return function(){return e}}(t):(t=l.length,function(e){for(var n,i=0;i<t;++i)s[(n=l[i]).i]=n.x(e);return s.join("")})}var jr,Ar=180/Math.PI,Mr={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Rr(e,t,n,i,o,a){var r,s,l;return(r=Math.sqrt(e*e+t*t))&&(e/=r,t/=r),(l=e*n+t*i)&&(n-=e*l,i-=t*l),(s=Math.sqrt(n*n+i*i))&&(n/=s,i/=s,l/=s),e*i<t*n&&(e=-e,t=-t,l=-l,r=-r),{translateX:o,translateY:a,rotate:Math.atan2(t,e)*Ar,skewX:Math.atan(l)*Ar,scaleX:r,scaleY:s}}function Ur(e,t,n,i){function o(e){return e.length?e.pop()+" ":""}return function(a,r){var s=[],l=[];return a=e(a),r=e(r),function(e,i,o,a,r,s){if(e!==o||i!==a){var l=r.push("translate(",null,t,null,n);s.push({i:l-4,x:Tr(e,o)},{i:l-2,x:Tr(i,a)})}else(o||a)&&r.push("translate("+o+t+a+n)}(a.translateX,a.translateY,r.translateX,r.translateY,s,l),function(e,t,n,a){e!==t?(e-t>180?t+=360:t-e>180&&(e+=360),a.push({i:n.push(o(n)+"rotate(",null,i)-2,x:Tr(e,t)})):t&&n.push(o(n)+"rotate("+t+i)}(a.rotate,r.rotate,s,l),function(e,t,n,a){e!==t?a.push({i:n.push(o(n)+"skewX(",null,i)-2,x:Tr(e,t)}):t&&n.push(o(n)+"skewX("+t+i)}(a.skewX,r.skewX,s,l),function(e,t,n,i,a,r){if(e!==n||t!==i){var s=a.push(o(a)+"scale(",null,",",null,")");r.push({i:s-4,x:Tr(e,n)},{i:s-2,x:Tr(t,i)})}else 1===n&&1===i||a.push(o(a)+"scale("+n+","+i+")")}(a.scaleX,a.scaleY,r.scaleX,r.scaleY,s,l),a=r=null,function(e){for(var t,n=-1,i=l.length;++n<i;)s[(t=l[n]).i]=t.x(e);return s.join("")}}}var Fr=Ur((function(e){const t=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Mr:Rr(t.a,t.b,t.c,t.d,t.e,t.f)}),"px, ","px)","deg)"),zr=Ur((function(e){return null==e?Mr:(jr||(jr=document.createElementNS("http://www.w3.org/2000/svg","g")),jr.setAttribute("transform",e),(e=jr.transform.baseVal.consolidate())?Rr((e=e.matrix).a,e.b,e.c,e.d,e.e,e.f):Mr)}),", ",")",")");function Br(e){return((e=Math.exp(e))+1/e)/2}var Hr,Gr,qr=function e(t,n,i){function o(e,o){var a,r,s=e[0],l=e[1],c=e[2],d=o[0],u=o[1],p=o[2],h=d-s,f=u-l,g=h*h+f*f;if(g<1e-12)r=Math.log(p/c)/t,a=function(e){return[s+e*h,l+e*f,c*Math.exp(t*e*r)]};else{var y=Math.sqrt(g),v=(p*p-c*c+i*g)/(2*c*n*y),m=(p*p-c*c-i*g)/(2*p*n*y),b=Math.log(Math.sqrt(v*v+1)-v),_=Math.log(Math.sqrt(m*m+1)-m);r=(_-b)/t,a=function(e){var i,o=e*r,a=Br(b),d=c/(n*y)*(a*(i=t*o+b,((i=Math.exp(2*i))-1)/(i+1))-function(e){return((e=Math.exp(e))-1/e)/2}(b));return[s+d*h,l+d*f,c*a/Br(t*o+b)]}}return a.duration=1e3*r*t/Math.SQRT2,a}return o.rho=function(t){var n=Math.max(.001,+t),i=n*n;return e(n,i,i*i)},o}(Math.SQRT2,2,4),Vr=0,Yr=0,Wr=0,Xr=0,$r=0,Zr=0,Kr="object"==typeof performance&&performance.now?performance:Date,Jr="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Qr(){return $r||(Jr(es),$r=Kr.now()+Zr)}function es(){$r=0}function ts(){this._call=this._time=this._next=null}function ns(e,t,n){var i=new ts;return i.restart(e,t,n),i}function is(){$r=(Xr=Kr.now())+Zr,Vr=Yr=0;try{!function(){Qr(),++Vr;for(var e,t=Hr;t;)(e=$r-t._time)>=0&&t._call.call(void 0,e),t=t._next;--Vr}()}finally{Vr=0,function(){var e,t,n=Hr,i=1/0;for(;n;)n._call?(i>n._time&&(i=n._time),e=n,n=n._next):(t=n._next,n._next=null,n=e?e._next=t:Hr=t);Gr=e,as(i)}(),$r=0}}function os(){var e=Kr.now(),t=e-Xr;t>1e3&&(Zr-=t,Xr=e)}function as(e){Vr||(Yr&&(Yr=clearTimeout(Yr)),e-$r>24?(e<1/0&&(Yr=setTimeout(is,e-Kr.now()-Zr)),Wr&&(Wr=clearInterval(Wr))):(Wr||(Xr=Kr.now(),Wr=setInterval(os,1e3)),Vr=1,Jr(is)))}function rs(e,t,n){var i=new ts;return t=null==t?0:+t,i.restart((n=>{i.stop(),e(n+t)}),t,n),i}ts.prototype=ns.prototype={constructor:ts,restart:function(e,t,n){if("function"!=typeof e)throw new TypeError("callback is not a function");n=(null==n?Qr():+n)+(null==t?0:+t),this._next||Gr===this||(Gr?Gr._next=this:Hr=this,Gr=this),this._call=e,this._time=n,as()},stop:function(){this._call&&(this._call=null,this._time=1/0,as())}};var ss=Ho("start","end","cancel","interrupt"),ls=[];function cs(e,t,n,i,o,a){var r=e.__transition;if(r){if(n in r)return}else e.__transition={};!function(e,t,n){var i,o=e.__transition;function a(e){n.state=1,n.timer.restart(r,n.delay,n.time),n.delay<=e&&r(e-n.delay)}function r(a){var c,d,u,p;if(1!==n.state)return l();for(c in o)if((p=o[c]).name===n.name){if(3===p.state)return rs(r);4===p.state?(p.state=6,p.timer.stop(),p.on.call("interrupt",e,e.__data__,p.index,p.group),delete o[c]):+c<t&&(p.state=6,p.timer.stop(),p.on.call("cancel",e,e.__data__,p.index,p.group),delete o[c])}if(rs((function(){3===n.state&&(n.state=4,n.timer.restart(s,n.delay,n.time),s(a))})),n.state=2,n.on.call("start",e,e.__data__,n.index,n.group),2===n.state){for(n.state=3,i=new Array(u=n.tween.length),c=0,d=-1;c<u;++c)(p=n.tween[c].value.call(e,e.__data__,n.index,n.group))&&(i[++d]=p);i.length=d+1}}function s(t){for(var o=t<n.duration?n.ease.call(null,t/n.duration):(n.timer.restart(l),n.state=5,1),a=-1,r=i.length;++a<r;)i[a].call(e,o);5===n.state&&(n.on.call("end",e,e.__data__,n.index,n.group),l())}function l(){for(var i in n.state=6,n.timer.stop(),delete o[t],o)return;delete e.__transition}o[t]=n,n.timer=ns(a,0,n.time)}(e,n,{name:t,index:i,group:o,on:ss,tween:ls,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:0})}function ds(e,t){var n=ps(e,t);if(n.state>0)throw new Error("too late; already scheduled");return n}function us(e,t){var n=ps(e,t);if(n.state>3)throw new Error("too late; already running");return n}function ps(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function hs(e,t){var n,i,o,a=e.__transition,r=!0;if(a){for(o in t=null==t?null:t+"",a)(n=a[o]).name===t?(i=n.state>2&&n.state<5,n.state=6,n.timer.stop(),n.on.call(i?"interrupt":"cancel",e,e.__data__,n.index,n.group),delete a[o]):r=!1;r&&delete e.__transition}}function fs(e,t){var n,i;return function(){var o=us(this,e),a=o.tween;if(a!==n)for(var r=0,s=(i=n=a).length;r<s;++r)if(i[r].name===t){(i=i.slice()).splice(r,1);break}o.tween=i}}function gs(e,t,n){var i,o;if("function"!=typeof n)throw new Error;return function(){var a=us(this,e),r=a.tween;if(r!==i){o=(i=r).slice();for(var s={name:t,value:n},l=0,c=o.length;l<c;++l)if(o[l].name===t){o[l]=s;break}l===c&&o.push(s)}a.tween=o}}function ys(e,t,n){var i=e._id;return e.each((function(){var e=us(this,i);(e.value||(e.value={}))[t]=n.apply(this,arguments)})),function(e){return ps(e,i).value[t]}}function vs(e,t){var n;return("number"==typeof t?Tr:t instanceof hr?xr:(n=hr(t))?(t=n,xr):Dr)(e,t)}function ms(e){return function(){this.removeAttribute(e)}}function bs(e){return function(){this.removeAttributeNS(e.space,e.local)}}function _s(e,t,n){var i,o,a=n+"";return function(){var r=this.getAttribute(e);return r===a?null:r===i?o:o=t(i=r,n)}}function ks(e,t,n){var i,o,a=n+"";return function(){var r=this.getAttributeNS(e.space,e.local);return r===a?null:r===i?o:o=t(i=r,n)}}function Ps(e,t,n){var i,o,a;return function(){var r,s,l=n(this);if(null!=l)return(r=this.getAttribute(e))===(s=l+"")?null:r===i&&s===o?a:(o=s,a=t(i=r,l));this.removeAttribute(e)}}function Is(e,t,n){var i,o,a;return function(){var r,s,l=n(this);if(null!=l)return(r=this.getAttributeNS(e.space,e.local))===(s=l+"")?null:r===i&&s===o?a:(o=s,a=t(i=r,l));this.removeAttributeNS(e.space,e.local)}}function Ns(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function ws(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function Cs(e,t){var n,i;function o(){var o=t.apply(this,arguments);return o!==i&&(n=(i=o)&&ws(e,o)),n}return o._value=t,o}function Ss(e,t){var n,i;function o(){var o=t.apply(this,arguments);return o!==i&&(n=(i=o)&&Ns(e,o)),n}return o._value=t,o}function Ls(e,t){return function(){ds(this,e).delay=+t.apply(this,arguments)}}function xs(e,t){return t=+t,function(){ds(this,e).delay=t}}function Ts(e,t){return function(){us(this,e).duration=+t.apply(this,arguments)}}function Es(e,t){return t=+t,function(){us(this,e).duration=t}}function Os(e,t){if("function"!=typeof t)throw new Error;return function(){us(this,e).ease=t}}function Ds(e,t,n){var i,o,a=function(e){return(e+"").trim().split(/^|\s+/).every((function(e){var t=e.indexOf(".");return t>=0&&(e=e.slice(0,t)),!e||"start"===e}))}(t)?ds:us;return function(){var r=a(this,e),s=r.on;s!==i&&(o=(i=s).copy()).on(t,n),r.on=o}}var js=Do.prototype.constructor;function As(e){return function(){this.style.removeProperty(e)}}function Ms(e,t,n){return function(i){this.style.setProperty(e,t.call(this,i),n)}}function Rs(e,t,n){var i,o;function a(){var a=t.apply(this,arguments);return a!==o&&(i=(o=a)&&Ms(e,a,n)),i}return a._value=t,a}function Us(e){return function(t){this.textContent=e.call(this,t)}}function Fs(e){var t,n;function i(){var i=e.apply(this,arguments);return i!==n&&(t=(n=i)&&Us(i)),t}return i._value=e,i}var zs=0;function Bs(e,t,n,i){this._groups=e,this._parents=t,this._name=n,this._id=i}function Hs(){return++zs}var Gs=Do.prototype;Bs.prototype={constructor:Bs,select:function(e){var t=this._name,n=this._id;"function"!=typeof e&&(e=Ci(e));for(var i=this._groups,o=i.length,a=new Array(o),r=0;r<o;++r)for(var s,l,c=i[r],d=c.length,u=a[r]=new Array(d),p=0;p<d;++p)(s=c[p])&&(l=e.call(s,s.__data__,p,c))&&("__data__"in s&&(l.__data__=s.__data__),u[p]=l,cs(u[p],t,n,p,u,ps(s,n)));return new Bs(a,this._parents,t,n)},selectAll:function(e){var t=this._name,n=this._id;"function"!=typeof e&&(e=xi(e));for(var i=this._groups,o=i.length,a=[],r=[],s=0;s<o;++s)for(var l,c=i[s],d=c.length,u=0;u<d;++u)if(l=c[u]){for(var p,h=e.call(l,l.__data__,u,c),f=ps(l,n),g=0,y=h.length;g<y;++g)(p=h[g])&&cs(p,t,n,g,h,f);a.push(h),r.push(l)}return new Bs(a,r,t,n)},selectChild:Gs.selectChild,selectChildren:Gs.selectChildren,filter:function(e){"function"!=typeof e&&(e=Ti(e));for(var t=this._groups,n=t.length,i=new Array(n),o=0;o<n;++o)for(var a,r=t[o],s=r.length,l=i[o]=[],c=0;c<s;++c)(a=r[c])&&e.call(a,a.__data__,c,r)&&l.push(a);return new Bs(i,this._parents,this._name,this._id)},merge:function(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,i=t.length,o=n.length,a=Math.min(i,o),r=new Array(i),s=0;s<a;++s)for(var l,c=t[s],d=n[s],u=c.length,p=r[s]=new Array(u),h=0;h<u;++h)(l=c[h]||d[h])&&(p[h]=l);for(;s<i;++s)r[s]=t[s];return new Bs(r,this._parents,this._name,this._id)},selection:function(){return new js(this._groups,this._parents)},transition:function(){for(var e=this._name,t=this._id,n=Hs(),i=this._groups,o=i.length,a=0;a<o;++a)for(var r,s=i[a],l=s.length,c=0;c<l;++c)if(r=s[c]){var d=ps(r,t);cs(r,e,n,c,s,{time:d.time+d.delay+d.duration,delay:0,duration:d.duration,ease:d.ease})}return new Bs(i,this._parents,e,n)},call:Gs.call,nodes:Gs.nodes,node:Gs.node,size:Gs.size,empty:Gs.empty,each:Gs.each,on:function(e,t){var n=this._id;return arguments.length<2?ps(this.node(),n).on.on(e):this.each(Ds(n,e,t))},attr:function(e,t){var n=ki(e),i="transform"===n?zr:vs;return this.attrTween(e,"function"==typeof t?(n.local?Is:Ps)(n,i,ys(this,"attr."+e,t)):null==t?(n.local?bs:ms)(n):(n.local?ks:_s)(n,i,t))},attrTween:function(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==t)return this.tween(n,null);if("function"!=typeof t)throw new Error;var i=ki(e);return this.tween(n,(i.local?Cs:Ss)(i,t))},style:function(e,t,n){var i="transform"==(e+="")?Fr:vs;return null==t?this.styleTween(e,function(e,t){var n,i,o;return function(){var a=eo(this,e),r=(this.style.removeProperty(e),eo(this,e));return a===r?null:a===n&&r===i?o:o=t(n=a,i=r)}}(e,i)).on("end.style."+e,As(e)):"function"==typeof t?this.styleTween(e,function(e,t,n){var i,o,a;return function(){var r=eo(this,e),s=n(this),l=s+"";return null==s&&(this.style.removeProperty(e),l=s=eo(this,e)),r===l?null:r===i&&l===o?a:(o=l,a=t(i=r,s))}}(e,i,ys(this,"style."+e,t))).each(function(e,t){var n,i,o,a,r="style."+t,s="end."+r;return function(){var l=us(this,e),c=l.on,d=null==l.value[r]?a||(a=As(t)):void 0;c===n&&o===d||(i=(n=c).copy()).on(s,o=d),l.on=i}}(this._id,e)):this.styleTween(e,function(e,t,n){var i,o,a=n+"";return function(){var r=eo(this,e);return r===a?null:r===i?o:o=t(i=r,n)}}(e,i,t),n).on("end.style."+e,null)},styleTween:function(e,t,n){var i="style."+(e+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(null==t)return this.tween(i,null);if("function"!=typeof t)throw new Error;return this.tween(i,Rs(e,t,null==n?"":n))},text:function(e){return this.tween("text","function"==typeof e?function(e){return function(){var t=e(this);this.textContent=null==t?"":t}}(ys(this,"text",e)):function(e){return function(){this.textContent=e}}(null==e?"":e+""))},textTween:function(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(null==e)return this.tween(t,null);if("function"!=typeof e)throw new Error;return this.tween(t,Fs(e))},remove:function(){return this.on("end.remove",function(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}(this._id))},tween:function(e,t){var n=this._id;if(e+="",arguments.length<2){for(var i,o=ps(this.node(),n).tween,a=0,r=o.length;a<r;++a)if((i=o[a]).name===e)return i.value;return null}return this.each((null==t?fs:gs)(n,e,t))},delay:function(e){var t=this._id;return arguments.length?this.each(("function"==typeof e?Ls:xs)(t,e)):ps(this.node(),t).delay},duration:function(e){var t=this._id;return arguments.length?this.each(("function"==typeof e?Ts:Es)(t,e)):ps(this.node(),t).duration},ease:function(e){var t=this._id;return arguments.length?this.each(Os(t,e)):ps(this.node(),t).ease},easeVarying:function(e){if("function"!=typeof e)throw new Error;return this.each(function(e,t){return function(){var n=t.apply(this,arguments);if("function"!=typeof n)throw new Error;us(this,e).ease=n}}(this._id,e))},end:function(){var e,t,n=this,i=n._id,o=n.size();return new Promise((function(a,r){var s={value:r},l={value:function(){0==--o&&a()}};n.each((function(){var n=us(this,i),o=n.on;o!==e&&((t=(e=o).copy())._.cancel.push(s),t._.interrupt.push(s),t._.end.push(l)),n.on=t})),0===o&&a()}))},[Symbol.iterator]:Gs[Symbol.iterator]};var qs={time:null,delay:0,duration:250,ease:sa};function Vs(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return n}Do.prototype.interrupt=function(e){return this.each((function(){hs(this,e)}))},Do.prototype.transition=function(e){var t,n;e instanceof Bs?(t=e._id,e=e._name):(t=Hs(),(n=qs).time=Qr(),e=null==e?null:e+"");for(var i=this._groups,o=i.length,a=0;a<o;++a)for(var r,s=i[a],l=s.length,c=0;c<l;++c)(r=s[c])&&cs(r,e,t,c,s,n||Vs(r,t));return new Bs(i,this._parents,e,t)};var Ys=function(e){return function(){return e}};function Ws(e,t){var n=t.sourceEvent,i=t.target,o=t.transform,a=t.dispatch;Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:n,enumerable:!0,configurable:!0},target:{value:i,enumerable:!0,configurable:!0},transform:{value:o,enumerable:!0,configurable:!0},_:{value:a}})}function Xs(e,t,n){this.k=e,this.x=t,this.y=n}Xs.prototype={constructor:Xs,scale:function(e){return 1===e?this:new Xs(this.k*e,this.x,this.y)},translate:function(e,t){return 0===e&0===t?this:new Xs(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var $s=new Xs(1,0,0);function Zs(e){for(;!e.__zoom;)if(!(e=e.parentNode))return $s;return e.__zoom}function Ks(e){e.stopImmediatePropagation()}function Js(e){e.preventDefault(),e.stopImmediatePropagation()}function Qs(e){return!(e.ctrlKey&&"wheel"!==e.type||e.button)}function el(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e).hasAttribute("viewBox")?[[(e=e.viewBox.baseVal).x,e.y],[e.x+e.width,e.y+e.height]]:[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]:[[0,0],[e.clientWidth,e.clientHeight]]}function tl(){return this.__zoom||$s}function nl(e){return-e.deltaY*(1===e.deltaMode?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function il(){return navigator.maxTouchPoints||"ontouchstart"in this}function ol(e,t,n){var i=e.invertX(t[0][0])-n[0][0],o=e.invertX(t[1][0])-n[1][0],a=e.invertY(t[0][1])-n[0][1],r=e.invertY(t[1][1])-n[1][1];return e.translate(o>i?(i+o)/2:Math.min(0,i)||Math.max(0,o),r>a?(a+r)/2:Math.min(0,a)||Math.max(0,r))}Zs.prototype=Xs.prototype;var al=Object.freeze({__proto__:null,zoom:function(){var e,t,n,i=Qs,o=el,a=ol,r=nl,s=il,l=[0,1/0],c=[[-1/0,-1/0],[1/0,1/0]],d=250,u=qr,p=Ho("start","zoom","end"),h=500,f=0,g=10,y=!1,v=!1;function m(e){e.property("__zoom",tl).on("wheel.zoom",w).on("mousedown.zoom",x).on("dblclick.zoom",T).on("gesturestart",C).on("gesturechange",S).on("gestureend",L).filter(s).on("touchstart.zoom",E).on("touchmove.zoom",O).on("touchend.zoom touchcancel.zoom",D).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function b(e,t){return(t=Math.max(l[0],Math.min(l[1],t)))===e.k?e:new Xs(t,e.x,e.y)}function _(e,t,n){var i=t[0]-n[0]*e.k,o=t[1]-n[1]*e.k;return i===e.x&&o===e.y?e:new Xs(e.k,i,o)}function k(e){return[(+e[0][0]+ +e[1][0])/2,(+e[0][1]+ +e[1][1])/2]}function P(e,t,n,i){e.on("start.zoom",(function(){I(this,arguments).event(i).start()})).on("interrupt.zoom end.zoom",(function(){I(this,arguments).event(i).end()})).tween("zoom",(function(){var e=this,a=arguments,r=I(e,a).event(i),s=o.apply(e,a),l=null==n?k(s):"function"==typeof n?n.apply(e,a):n,c=Math.max(s[1][0]-s[0][0],s[1][1]-s[0][1]),d=e.__zoom,p="function"==typeof t?t.apply(e,a):t,h=u(d.invert(l).concat(c/d.k),p.invert(l).concat(c/p.k));return function(e){if(1===e)e=p;else{var t=h(e),n=c/t[2];e=new Xs(n,l[0]-t[0]*n,l[1]-t[1]*n)}r.zoom(null,e)}}))}function I(e,t,n){return!n&&e.__zooming||new N(e,t)}function N(e,t){this.that=e,this.args=t,this.active=0,this.sourceEvent=null,this.extent=o.apply(e,t),this.taps=0}function w(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];if(v&&Js(e),i.apply(this,arguments)){var s=I(this,n).event(e),d=this.__zoom,u=Math.max(l[0],Math.min(l[1],d.k*Math.pow(2,r.apply(this,arguments)))),p=Fo(e);if(s.wheel)s.mouse[0][0]===p[0]&&s.mouse[0][1]===p[1]||(s.mouse[1]=d.invert(s.mouse[0]=p)),clearTimeout(s.wheel);else{if(d.k===u)return;!y||e.ctrlKey||e.safariPinchZoom||(s.wheelTransX=-d.x,s.wheelTransY=-d.y),s.mouse=[p,d.invert(p)],hs(this),s.start()}if(Js(e),s.wheel=setTimeout(g,150),!y||e.ctrlKey||e.safariPinchZoom)s.zoom("mouse",a(_(b(d,u),s.mouse[0],s.mouse[1]),s.extent,c));else{s.wheelTransX+=e.deltaX,s.wheelTransY+=e.deltaY;var h=[d.x,d.y],f=[d.x+s.wheelTransX,d.y+s.wheelTransY];s.zoom("mouse",a(_(d,h,f),s.extent,c))}}function g(){s.wheel=null,s.end()}}function C(e){Js(e),this.scale=e.scale}function S(e){Js(e),this.__zoom&&(e.deltaY=100*(this.scale-e.scale),this.scale=e.scale),e.safariPinchZoom=!0,w.apply(this,[e].concat(Array.prototype.slice.call(arguments)))}function L(e){Js(e)}function x(e){for(var t=arguments.length,o=new Array(t>1?t-1:0),r=1;r<t;r++)o[r-1]=arguments[r];if(!n&&i.apply(this,arguments)){var s=I(this,o,!0).event(e),l=jo(e.view).on("mousemove.zoom",g,!0).on("mouseup.zoom",y,!0),d=Fo(e,u),u=e.currentTarget,p=e.clientX,h=e.clientY;Ko(e.view),Ks(e),s.mouse=[d,this.__zoom.invert(d)],hs(this),s.start()}function g(e){if(Js(e),!s.moved){var t=e.clientX-p,n=e.clientY-h;s.moved=t*t+n*n>f}s.event(e).zoom("mouse",a(_(s.that.__zoom,s.mouse[0]=Fo(e,u),s.mouse[1]),s.extent,c))}function y(e){l.on("mousemove.zoom mouseup.zoom",null),Jo(e.view,s.moved),Js(e),s.event(e).end()}}function T(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];if(i.apply(this,arguments)){var s=this.__zoom,l=Fo(e.changedTouches?e.changedTouches[0]:e,this),u=s.invert(l),p=s.k*(e.shiftKey?.5:2),h=a(_(b(s,p),l,u),o.apply(this,n),c);Js(e),d>0?jo(this).transition().duration(d).call(P,h,l,e):jo(this).call(m.transform,h,l,e)}}function E(n){for(var o=arguments.length,a=new Array(o>1?o-1:0),r=1;r<o;r++)a[r-1]=arguments[r];if(i.apply(this,arguments)){var s,l,c,d,u=n.touches,p=u.length,f=I(this,a,n.changedTouches.length===p).event(n);for(Ks(n),l=0;l<p;++l)d=[d=Fo(c=u[l],this),this.__zoom.invert(d),c.identifier],f.touch0?f.touch1||f.touch0[2]===d[2]||(f.touch1=d,f.taps=0):(f.touch0=d,s=!0,f.taps=1+!!e);e&&(e=clearTimeout(e)),s&&(f.taps<2&&(t=d[0],e=setTimeout((function(){e=null}),h)),hs(this),f.start())}}function O(e){if(this.__zooming){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];var o,r,s,l,d=I(this,n).event(e),u=e.changedTouches,p=u.length;for(Js(e),o=0;o<p;++o)s=Fo(r=u[o],this),d.touch0&&d.touch0[2]===r.identifier?d.touch0[0]=s:d.touch1&&d.touch1[2]===r.identifier&&(d.touch1[0]=s);if(r=d.that.__zoom,d.touch1){var h=d.touch0[0],f=d.touch0[1],g=d.touch1[0],y=d.touch1[1],v=(v=g[0]-h[0])*v+(v=g[1]-h[1])*v,m=(m=y[0]-f[0])*m+(m=y[1]-f[1])*m;r=b(r,Math.sqrt(v/m)),s=[(h[0]+g[0])/2,(h[1]+g[1])/2],l=[(f[0]+y[0])/2,(f[1]+y[1])/2]}else{if(!d.touch0)return;s=d.touch0[0],l=d.touch0[1]}d.zoom("touch",a(_(r,s,l),d.extent,c))}}function D(e){for(var i=arguments.length,o=new Array(i>1?i-1:0),a=1;a<i;a++)o[a-1]=arguments[a];if(this.__zooming){var r,s,l=I(this,o).event(e),c=e.changedTouches,d=c.length;for(Ks(e),n&&clearTimeout(n),n=setTimeout((function(){n=null}),h),r=0;r<d;++r)s=c[r],l.touch0&&l.touch0[2]===s.identifier?delete l.touch0:l.touch1&&l.touch1[2]===s.identifier&&delete l.touch1;if(l.touch1&&!l.touch0&&(l.touch0=l.touch1,delete l.touch1),l.touch0)l.touch0[1]=this.__zoom.invert(l.touch0[0]);else if(l.end(),2===l.taps&&(s=Fo(s,this),Math.hypot(t[0]-s[0],t[1]-s[1])<g)){var u=jo(this).on("dblclick.zoom");u&&u.apply(this,arguments)}}}return m.transform=function(e,t,n,i){var o=e.selection?e.selection():e;o.property("__zoom",tl),e!==o?P(e,t,n,i):o.interrupt().each((function(){I(this,arguments).event(i).start().zoom(null,"function"==typeof t?t.apply(this,arguments):t).end()}))},m.scaleBy=function(e,t,n,i){m.scaleTo(e,(function(){var e=this.__zoom.k,n="function"==typeof t?t.apply(this,arguments):t;return e*n}),n,i)},m.scaleTo=function(e,t,n,i){m.transform(e,(function(){var e=o.apply(this,arguments),i=this.__zoom,r=null==n?k(e):"function"==typeof n?n.apply(this,arguments):n,s=i.invert(r),l="function"==typeof t?t.apply(this,arguments):t;return a(_(b(i,l),r,s),e,c)}),n,i)},m.translateBy=function(e,t,n,i){m.transform(e,(function(){return a(this.__zoom.translate("function"==typeof t?t.apply(this,arguments):t,"function"==typeof n?n.apply(this,arguments):n),o.apply(this,arguments),c)}),null,i)},m.translateTo=function(e,t,n,i,r){m.transform(e,(function(){var e=o.apply(this,arguments),r=this.__zoom,s=null==i?k(e):"function"==typeof i?i.apply(this,arguments):i;return a($s.translate(s[0],s[1]).scale(r.k).translate("function"==typeof t?-t.apply(this,arguments):-t,"function"==typeof n?-n.apply(this,arguments):-n),e,c)}),i,r)},N.prototype={event:function(e){return e&&(this.sourceEvent=e),this},start:function(){return 1==++this.active&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(e,t){return this.mouse&&"mouse"!==e&&(this.mouse[1]=t.invert(this.mouse[0])),this.touch0&&"touch"!==e&&(this.touch0[1]=t.invert(this.touch0[0])),this.touch1&&"touch"!==e&&(this.touch1[1]=t.invert(this.touch1[0])),this.that.__zoom=t,this.emit("zoom"),this},end:function(){return 0==--this.active&&(delete this.that.__zooming,this.emit("end")),this},emit:function(e){var t=jo(this.that).datum();p.call(e,this.that,new Ws(e,{sourceEvent:this.sourceEvent,target:m,type:e,transform:this.that.__zoom,dispatch:p}),t)}},m.wheelDelta=function(e){return arguments.length?(r="function"==typeof e?e:Ys(+e),m):r},m.filter=function(e){return arguments.length?(i="function"==typeof e?e:Ys(!!e),m):i},m.touchable=function(e){return arguments.length?(s="function"==typeof e?e:Ys(!!e),m):s},m.extent=function(e){return arguments.length?(o="function"==typeof e?e:Ys([[+e[0][0],+e[0][1]],[+e[1][0],+e[1][1]]]),m):o},m.scaleExtent=function(e){return arguments.length?(l[0]=+e[0],l[1]=+e[1],m):[l[0],l[1]]},m.translateExtent=function(e){return arguments.length?(c[0][0]=+e[0][0],c[1][0]=+e[1][0],c[0][1]=+e[0][1],c[1][1]=+e[1][1],m):[[c[0][0],c[0][1]],[c[1][0],c[1][1]]]},m.constrain=function(e){return arguments.length?(a=e,m):a},m.trackpad=function(e){return arguments.length?(y=e,m):y},m.preventBackGesture=function(e){return arguments.length?(v=e,m):v},m.duration=function(e){return arguments.length?(d=+e,m):d},m.interpolate=function(e){return arguments.length?(u=e,m):u},m.on=function(){var e=p.on.apply(p,arguments);return e===p?m:e},m.clickDistance=function(e){return arguments.length?(f=(e=+e)*e,m):Math.sqrt(f)},m.tapDistance=function(e){return arguments.length?(g=+e,m):g},m},zoomTransform:Zs,zoomIdentity:$s}),rl=function(){function n(){e(this,n)}return t(n,null,[{key:"set",value:function(e,t){try{window.electronUtil&&window.electronUtil.wsdStorage&&window.electronUtil.wsdStorage.setItem?window.electronUtil.wsdStorage.setItem(e,t):window.localStorage&&(window.localStorage[e]=t)}catch(e){n.logger.warn("Local storage is not accessible: "+e)}}},{key:"get",value:function(e){try{if(window.electronUtil&&window.electronUtil.wsdStorage&&window.electronUtil.wsdStorage.getItem)return window.electronUtil.wsdStorage.getItem(e);if(window.localStorage)return window.localStorage[e]}catch(e){n.logger.warn("Local storage is not accessible: "+e)}return null}},{key:"delete",value:function(e){try{window.electronUtil&&window.electronUtil.wsdStorage&&window.electronUtil.wsdStorage.removeItem?window.electronUtil.wsdStorage.removeItem(e):window.localStorage&&delete window.localStorage[e]}catch(e){n.logger.warn("Local storage is not accessible: "+e)}}}]),n}();function sl(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return ll(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ll(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,r=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return r=e.done,e},e:function(e){s=!0,a=e},f:function(){try{r||null==n.return||n.return()}finally{if(s)throw a}}}}function ll(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}rl.logger=new Zn(["LocalStorage"]);var cl=function(){function n(){e(this,n)}return t(n,null,[{key:"getObjectPositions",value:function(e){var t=[];return e.forEach((function(e){t[e.id]={x_pos:e.x_pos,y_pos:e.y_pos}})),t}},{key:"getLinkPositions",value:function(e){var t=[];return e.forEach((function(e){e.srcPos&&(nt(t[e.id],"srcPos.x_pos",e.srcPos.x_pos),nt(t[e.id],"srcPos.y_pos",e.srcPos.y_pos)),e.trgPos&&(t[e.id]||(t[e.id]={}),nt(t[e.id],"trgPos.x_pos",e.trgPos.x_pos),nt(t[e.id],"trgPos.y_pos",e.trgPos.y_pos))})),t}},{key:"moveSurroundingObjects",value:function(e,t,n,i,o,a){var r=this,s=[],l=i-e.width,c=o-e.height,d=e.x_pos+e.width/2,u=e.y_pos+e.height/2;return t.forEach((function(t){if(t.id!==e.id){var i=r.getMoveDeltas(t.x_pos+t.width/2,t.y_pos+t.height/2,n,d,u,l,c);0===i.xDelta&&0===i.yDelta||(s[t.id]={id:t.id,x_pos:t.x_pos+i.xDelta,y_pos:t.y_pos+i.yDelta,width:t.width,height:t.height},a&&(t.x_pos+=i.xDelta,t.y_pos+=i.yDelta))}})),s}},{key:"moveSurroundingDetachedLinks",value:function(e,t,n,i,o,a){var r=this,s=[],l=i-e.width,c=o-e.height,d=e.x_pos+e.width/2,u=e.y_pos+e.height/2;return t.forEach((function(e){if(e.srcPos){var t=r.getMoveDeltas(e.srcPos.x_pos,e.srcPos.y_pos,n,d,u,l,c);0===t.xDelta&&0===t.yDelta||(s[e.id]||(s[e.id]={id:e.id}),nt(s[e.id],"srcPos.x_pos",e.srcPos.x_pos+t.xDelta),nt(s[e.id],"srcPos.y_pos",e.srcPos.y_pos+t.yDelta),a&&(e.srcPos.x_pos+=t.xDelta,e.srcPos.y_pos+=t.yDelta))}if(e.trgPos){var i=r.getMoveDeltas(e.trgPos.x_pos,e.trgPos.y_pos,n,d,u,l,c);0===i.xDelta&&0===i.yDelta||(s[e.id]||(s[e.id]={id:e.id}),nt(s[e.id],"trgPos.x_pos",e.trgPos.x_pos+i.xDelta),nt(s[e.id],"trgPos.y_pos",e.trgPos.y_pos+i.yDelta)),a&&(e.trgPos.x_pos+=i.xDelta,e.trgPos.y_pos+=i.yDelta)}})),s}},{key:"getMoveDeltas",value:function(e,t,n,i,o,a,r){var s=0,l=0;return n.indexOf("n")>-1&&t<o-20?l=-r:n.indexOf("s")>-1&&t>o+20&&(l=r),n.indexOf("w")>-1&&e<i-20?s=-a:n.indexOf("e")>-1&&e>i+20&&(s=a),{xDelta:s,yDelta:l}}},{key:"getSupernodeExpandedWidth",value:function(e,t){return e.expanded_width?e.expanded_width:Math.max(t.supernodeDefaultWidth,e.width)}},{key:"getSupernodeExpandedHeight",value:function(e,t){return e.expanded_height?e.expanded_height:Math.max(t.supernodeDefaultHeight,e.height)}},{key:"getNodePaddingToTargetNodes",value:function(e,t,n,i){var o=0;if("Elbow"===i){var a=this.getCountOfLinksToTargetNodes(e,t,n)*e.layout.minInitialLineIncrement;o=e.layout.minInitialLine+e.layout.minFinalLine+a}else o=2*e.layout.minInitialLine;return o}},{key:"getCountOfLinksToTargetNodes",value:function(e,t,n){var i=this,o=0;return e.outputs&&e.outputs.length>0&&e.outputs.forEach((function(a){i.isNodeOutputLinkedToTargetNodes(e,a,t,n)&&o++})),o}},{key:"isNodeOutputLinkedToTargetNodes",value:function(e,t,n,i){var o=this,a=!1;return i.forEach((function(i){i.srcNodeId===e.id&&i.srcNodePortId===t.id&&o.isTargetNode(i.trgNodeId,n)&&(a=!0)})),a}},{key:"isTargetNode",value:function(e,t){return t.findIndex((function(t){return t.id===e}))>-1}},{key:"getCombinedDecorations",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=e.map((function(e){var n=t.find((function(t){return t.id===e.id}));return n?Object.assign({},e,n):e}));return t&&t.forEach((function(t){-1===e.findIndex((function(e){return e.id===t.id}))&&n.push(t)})),n}},{key:"isCmndCtrlPressed",value:function(e){return this.isMacintosh()?e.metaKey:e.ctrlKey}},{key:"isMacintosh",value:function(){return navigator.platform.indexOf("Mac")>-1}},{key:"stopPropagationAndPreventDefault",value:function(e){e.stopPropagation(),e.preventDefault()}},{key:"snapToGrid",value:function(e,t){var n=e/t,i=Math.trunc(n);return n-i>.5&&i++,i*t}},{key:"getOuterCoord",value:function(e,t,n,i,o,a,r,s,l){var c,d,u=t-o,p=e-o,h=e+n+o,f=t+i+o,g=r-u,y=a-p,v=f-r,m=a-s,b=r-l;if(0===m)c=a,d=l<r?u:f;else if(s>a){var _=b/m;_<g/(a-h)?(c=a-g/_,d=u):_>(r-f)/(a-h)?(c=a+v/_,d=f):(c=h,d=r+(h-a)*_)}else{var k=b/m;k>g/y?(c=a-g/k,d=u):k<(r-f)/y?(c=a+v/k,d=f):(c=p,d=r-y*k)}return{x:c,y:d}}},{key:"lineIntersectRectangle",value:function(e,t,n,i,o,a,r,s){var l=this.lineInside(e,t,n,i,o,a,r,s),c=this.linesIntersect(e,t,n,i,o,a,r,a),d=this.linesIntersect(e,t,n,i,o,a,o,s),u=this.linesIntersect(e,t,n,i,r,a,r,s),p=this.linesIntersect(e,t,n,i,o,s,r,s);return l||c||d||u||p}},{key:"lineInside",value:function(e,t,n,i,o,a,r,s){return e>=o&&e<=r&&t>=a&&t<=s&&n>=o&&n<=r&&i>=a&&i<=s}},{key:"linesIntersect",value:function(e,t,n,i,o,a,r,s){var l=((r-o)*(t-a)-(s-a)*(e-o))/((s-a)*(n-e)-(r-o)*(i-t)),c=((n-e)*(t-a)-(i-t)*(e-o))/((s-a)*(n-e)-(r-o)*(i-t));return l>=0&&l<=1&&c>=0&&c<=1?{x:e+l*(n-e),y:t+l*(i-t)}:null}},{key:"isConnectionAllowed",value:function(e,t,n,i,o,a){return a===U?this.isAssocConnectionAllowed(n,i,o):this.isDataConnectionAllowed(e,t,n,i,o)}},{key:"isConnectionAllowedWithDetachedLinks",value:function(e,t,n,i,o){return(!n||!i||n.id!==i.id)&&!(n&&i&&this.linkAlreadyExists(e,t,n,i,o))}},{key:"isSrcConnectionAllowedWithDetachedLinks",value:function(e,t,n){return!(t&&!this.doesNodeHaveOutputPorts(t))&&(!t||!this.isSrcCardinalityAtMax(e,t,n))}},{key:"isTrgConnectionAllowedWithDetachedLinks",value:function(e,t,n){return!(t&&!this.doesNodeHaveInputPorts(t))&&(!t||!this.isTrgCardinalityAtMax(e,t,n))}},{key:"doesNodeHaveInputPorts",value:function(e){return e.inputs&&e.inputs.length>0}},{key:"doesNodeHaveOutputPorts",value:function(e){return e.outputs&&e.outputs.length>0}},{key:"isDataLinkReplacementAllowed",value:function(e,t,n,i,o){return!!this.isDataConnectionAllowedNoCardinality(e,t,n,i,o)&&(1===this.getMaxCardinality(t,i.inputs)&&!!this.isTrgCardinalityAtMax(t,i,o))}},{key:"isDataConnectionAllowed",value:function(e,t,n,i,o){return!!this.isDataConnectionAllowedNoCardinality(e,t,n,i,o)&&!this.isCardinalityAtMax(e,t,n,i,o)}},{key:"isDataConnectionAllowedNoCardinality",value:function(e,t,n,i,o){return!(!n||!i)&&(n.id!==i.id&&(!!this.doesNodeHaveInputPorts(i)&&!this.linkAlreadyExists(e,t,n,i,o)))}},{key:"isAssocConnectionAllowed",value:function(e,t,n){return!(!e||!t)&&e.id!==t.id}},{key:"isSrcNodeAvailable",value:function(e,t,n,i){return!(!t||t.id!==e.id)||!!this.doesNodeHaveOutputPorts(e)&&!this.isSrcNodePortsCardinalityAtMax(e,i)}},{key:"isTrgNodeAvailable",value:function(e,t,n,i){return!(!t||t.id!==e.id)||!!this.doesNodeHaveInputPorts(e)&&!this.isTrgNodePortsCardinalityAtMax(e,i)}},{key:"linkAlreadyExists",value:function(e,t,n,i,o){var a=!1;return o.forEach((function(o){o.srcNodeId!==n.id||o.srcNodePortId&&o.srcNodePortId!==e||o.trgNodeId!==i.id||o.trgNodePortId&&o.trgNodePortId!==t||(a=!0)})),a}},{key:"isSrcNodePortsCardinalityAtMax",value:function(e,t){var n=this;return!!e&&-1===e.outputs.findIndex((function(i){return!n.isSrcCardinalityAtMax(i.id,e,t)}))}},{key:"isTrgNodePortsCardinalityAtMax",value:function(e,t){var n=this;return!!e&&-1===e.inputs.findIndex((function(i){return!n.isTrgCardinalityAtMax(i.id,e,t)}))}},{key:"isCardinalityAtMax",value:function(e,t,n,i,o){return this.isSrcCardinalityAtMax(e,n,o)||this.isTrgCardinalityAtMax(t,i,o)}},{key:"isSrcCardinalityAtMax",value:function(e,t,n){var i=this,o=e||this.getDefaultOutputPortId(t),a=0;n.forEach((function(e){e.type===F&&e.srcNodeId===t.id&&o&&(e.srcNodePortId===o||!e.srcNodePortId&&i.isFirstPort(t.outputs,o))&&a++}));var r=this.getMaxCardinality(o,t.outputs);return null!==r&&-1!==r&&a>=r}},{key:"isTrgCardinalityAtMax",value:function(e,t,n){var i=this,o=e||this.getDefaultInputPortId(t),a=0;n.forEach((function(e){e.type===F&&e.trgNodeId===t.id&&o&&(e.trgNodePortId===o||!e.trgNodePortId&&i.isFirstPort(t.inputs,o))&&a++}));var r=this.getMaxCardinality(o,t.inputs);return null!==r&&-1!==r&&a>=r}},{key:"isFirstPort",value:function(e,t){return 0===e.findIndex((function(e){return e.id===t}))}},{key:"getPort",value:function(e,t){var n=t.findIndex((function(t){return t.id===e}));return n>-1?t[n]:null}},{key:"getMaxCardinality",value:function(e,t){var n=this.getPort(e,t);return n&&n.cardinality?Number(n.cardinality.max):null}},{key:"isCommentLinkConnectionAllowed",value:function(e,t,n){return!this.commentLinkAlreadyExists(e,t,n)}},{key:"commentLinkAlreadyExists",value:function(e,t,n){var i=!1;return n.forEach((function(n){n.srcNodeId===e&&n.trgNodeId===t&&(i=!0)})),i}},{key:"getDetachedLinksToUpdate",value:function(e,t,n){var i=this,o=[],a=[];return t.forEach((function(t){if(t.nodeOverSrcPos&&t.srcPos&&e.outputs&&e.outputs.length>0){var r=!1;e.outputs.forEach((function(s){if(!1===r&&i.isSrcConnectionAllowedWithDetachedLinks(s.id,e,i.getReplacedLinks(n,o))){var l=Object.assign({},t,{srcNodeId:e.id,srcNodePortId:s.id});delete l.srcPos,o.push(l),a.push(t),r=!0}}))}else if(t.nodeOverTrgPos&&t.trgPos&&e.inputs&&e.inputs.length>0){var s=!1;e.inputs.forEach((function(r){if(!1===s&&i.isTrgConnectionAllowedWithDetachedLinks(r.id,e,i.getReplacedLinks(n,o))){var l=Object.assign({},t,{trgNodeId:e.id,trgNodePortId:r.id});delete l.trgPos,o.push(l),a.push(t),s=!0}}))}})),{newLinks:o,oldLinks:a}}},{key:"getReplacedLinks",value:function(e,t){return e.map((function(e){var n=t.findIndex((function(t){return t.id===e.id}));return n>-1?t[n]:e}))}},{key:"selectInRegion",value:function(e,t,n,i,o){var a,r=[],s=sl(t.nodes);try{for(s.s();!(a=s.n()).done;){var l=a.value;!this.isSuperBindingNode(l)&&e.x1<l.x_pos+l.width&&e.x2>l.x_pos&&e.y1<l.y_pos+l.height&&e.y2>l.y_pos&&r.push(l.id)}}catch(e){s.e(e)}finally{s.f()}var c,d=sl(t.comments);try{for(d.s();!(c=d.n()).done;){var u=c.value;e.x1<u.x_pos+u.width&&e.x2>u.x_pos&&e.y1<u.y_pos+u.height&&e.y2>u.y_pos&&r.push(u.id)}}catch(e){d.e(e)}finally{d.f()}if(n){var p,h=sl(t.links);try{for(h.s();!(p=h.n()).done;){var f=p.value;f.type===F&&i===z||f.type===B||f.type===U&&o===H?this.lineIntersectRectangle(f.x1,f.y1,f.x2,f.y2,e.x1,e.y1,e.x2,e.y2)&&r.push(f.id):(this.isPosInArea({x_pos:f.x1,y_pos:f.y1},e,0)||this.isPosInArea({x_pos:f.x2,y_pos:f.y2},e,0))&&r.push(f.id)}}catch(e){h.e(e)}finally{h.f()}}return r}},{key:"isSelected",value:function(e,t){return-1!==t.findIndex((function(t){return t===e}))}},{key:"isPosInArea",value:function(e,t,n){return e.x_pos>t.x1-n&&e.x_pos<t.x2+n&&e.y_pos>t.y1-n&&e.y_pos<t.y2+n}},{key:"isSuperBindingNode",value:function(e){return e.isSupernodeInputBinding||e.isSupernodeOutputBinding}},{key:"getCanvasDimensions",value:function(e,t,n,i,o){var a=this,r=1/0,s=1/0,l=-1/0,c=-1/0;return e&&e.forEach((function(e){if(!a.isSuperBindingNode(e)){var t=0===o?0:e.layout.nodeHighlightGap;r=Math.min(r,e.x_pos-t),s=Math.min(s,e.y_pos-t),l=Math.max(l,e.x_pos+e.width+t),c=Math.max(c,e.y_pos+e.height+t)}})),t&&t.forEach((function(e){r=Math.min(r,e.x_pos-i),s=Math.min(s,e.y_pos-i),l=Math.max(l,e.x_pos+e.width+i),c=Math.max(c,e.y_pos+e.height+i)})),n&&n.forEach((function(e){e.srcPos&&(r=Math.min(r,e.srcPos.x_pos),s=Math.min(s,e.srcPos.y_pos),l=Math.max(l,e.srcPos.x_pos),c=Math.max(c,e.srcPos.y_pos)),e.trgPos&&(r=Math.min(r,e.trgPos.x_pos),s=Math.min(s,e.trgPos.y_pos),l=Math.max(l,e.trgPos.x_pos),c=Math.max(c,e.trgPos.y_pos))})),r===1/0||s===1/0||l===-1/0||c===-1/0?{left:0,top:0,right:0,bottom:0,width:0,height:0}:{left:r,top:s,right:l,bottom:c,width:l-r,height:c-s}}},{key:"getDataLinksConnectedTo",value:function(e,t,n){var i=this.getDefaultInputPortId(t);return n.filter((function(n){if(n.type===F){var o=n.trgNodePortId||i;return n.trgNodeId===t.id&&o===e}return!1}))}},{key:"getDefaultInputPortId",value:function(e){return e.inputs&&e.inputs.length>0?e.inputs[0].id:null}},{key:"getDefaultOutputPortId",value:function(e){return e.outputs&&e.outputs.length>0?e.outputs[0].id:null}},{key:"getObjectStyle",value:function(e,t,n){if(!e.style&&!e.style_temp)return null;var i=null;return"hover"===n?i=this.getStyleValue(e,t,"default")+";"+this.getStyleValue(e,t,"hover"):"default"===n&&(i=this.getStyleValue(e,t,"default")),i}},{key:"getStyleValue",value:function(e,t,n){var i=pt(e,"style_temp.".concat(t,".").concat(n),null);return null!==i?i:pt(e,"style.".concat(t,".").concat(n),null)}},{key:"filterSupernodes",value:function(e){return e.filter((function(e){return e.type===G}))}},{key:"getSrcPos",value:function(e,t){var n,i;if(e.trgNodeId){var o=t.getNode(e.trgNodeId);n=o.x_pos+o.width/2,i=o.y_pos+o.height/2}else n=e.trgPos.x_pos,i=e.trgPos.y_pos;var a,r,s=t.getNode(e.srcNodeId);s.layout&&"image_center"===s.layout.drawNodeLinkLineFromTo?(a=s.x_pos+s.layout.imagePosX+s.layout.imageWidth/2,r=s.y_pos+s.layout.imagePosY+s.layout.imageHeight/2):(a=s.x_pos+s.width/2,r=s.y_pos+s.height/2);var l=this.getOuterCoord(s.x_pos,s.y_pos,s.width,s.height,0,a,r,n,i);return{x_pos:l.x,y_pos:l.y}}},{key:"getTrgPos",value:function(e,t){var n,i;if(e.srcNodeId){var o=t.getNode(e.srcNodeId);n=o.x_pos+o.width/2,i=o.y_pos+o.height/2}else n=e.srcPos.x_pos,i=e.srcPos.y_pos;var a,r,s=t.getNode(e.trgNodeId);s.layout&&"image_center"===s.layout.drawNodeLinkLineFromTo?(a=s.x_pos+s.layout.imagePosX+s.layout.imageWidth/2,r=s.y_pos+s.layout.imagePosY+s.layout.imageHeight/2):(a=s.x_pos+s.width/2,r=s.y_pos+s.height/2);var l=this.getOuterCoord(s.x_pos,s.y_pos,s.width,s.height,0,a,r,n,i);return{x_pos:l.x,y_pos:l.y}}},{key:"concatUniqueBasedOnId",value:function(e,t){var n=t;return e.forEach((function(e){t.some((function(t){return t.id===e.id}))||n.push(e)})),n}},{key:"preProcessPipeline",value:function(e){var t=this;return this.setAllPortsDisconnected(e),e.links.forEach((function(n){n.type===B?(n.srcObj=t.getComment(n.srcNodeId,e),n.trgNode=t.getNode(n.trgNodeId,e)):(n.srcObj=t.getNode(n.srcNodeId,e),n.trgNode=t.getNode(n.trgNodeId,e),n.srcObj&&t.setOutputPortConnected(n.srcObj,n.srcNodePortId),n.trgNode&&t.setInputPortConnected(n.trgNode,n.trgNodePortId))})),e}},{key:"getNode",value:function(e,t){return t.nodes.find((function(t){return t.id===e}))}},{key:"getComment",value:function(e,t){return t.comments.find((function(t){return t.id===e}))}},{key:"setAllPortsDisconnected",value:function(e){e.nodes.forEach((function(e){e.inputs&&e.inputs.forEach((function(e){return e.isConnected=!1})),e.outputs&&e.outputs.forEach((function(e){return e.isConnected=!1}))}))}},{key:"setInputPortConnected",value:function(e,t){var n=t||this.getDefaultInputPortId(e);e.inputs&&e.inputs.forEach((function(e){e.id===n&&(e.isConnected=!0)}))}},{key:"setOutputPortConnected",value:function(e,t){var n=t||this.getDefaultOutputPortId(e);e.outputs&&e.outputs.forEach((function(e){e.id===n&&(e.isConnected=!0)}))}}]),n}(),dl=function(){function n(t,i,o){e(this,n),this.canvasController=t,this.isSubflow=i,this.pipelineId=o}return t(n,[{key:"isDisplayingCurrentPipeline",value:function(){return this.canvasController.getCurrentBreadcrumb().pipelineId===this.pipelineId}},{key:"setDisplayState",value:function(){this.canvasController.getBreadcrumbs().length>1&&this.isDisplayingCurrentPipeline()?this.displayState="sub-flow-full-page":this.isSubflow?this.displayState="sub-flow-in-place":this.displayState="primary-flow-full-page"}},{key:"getDisplayStateMsg",value:function(){return"Display state set to "+this.displayState}},{key:"isDisplayingPrimaryFlowFullPage",value:function(){return"primary-flow-full-page"===this.displayState}},{key:"isDisplayingSubFlow",value:function(){return"sub-flow-in-place"===this.displayState||"sub-flow-full-page"===this.displayState}},{key:"isDisplayingSubFlowInPlace",value:function(){return"sub-flow-in-place"===this.displayState}},{key:"isDisplayingSubFlowFullPage",value:function(){return"sub-flow-full-page"===this.displayState}},{key:"isDisplayingFullPage",value:function(){return"primary-flow-full-page"===this.displayState||"sub-flow-full-page"===this.displayState}}]),n}();function ul(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return pl(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return pl(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,r=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return r=e.done,e},e:function(e){s=!0,a=e},f:function(){try{r||null==n.return||n.return()}finally{if(s)throw a}}}}function pl(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}var hl=function(){function n(t){e(this,n),this.canvasLayout=t}return t(n,[{key:"getNodeImageClass",value:function(e){return"d3-node-image"}},{key:"getNodeLabelForeignClass",value:function(e){return"d3-foreign-object"+(e.layout.labelOutline?" d3-node-label-outline":"")}},{key:"getNodeLabelClass",value:function(e){if(this.isExpandedSupernode(e))return"d3-node-label d3-label-single-line "+this.getMessageLabelClass(e.messages);var t=e.layout.labelSingleLine?" d3-label-single-line":" d3-label-multi-line",n="center"===e.layout.labelAlign?" d3-label-center":"";return"d3-node-label "+this.getMessageLabelClass(e.messages)+t+n}},{key:"getNodeLabelTextAreaClass",value:function(e){return this.isExpandedSupernode(e)?"d3-node-label-entry d3-label-single-line":"d3-node-label-entry"+(e.layout.labelSingleLine?" d3-label-single-line":" d3-label-multi-line")+("center"===e.layout.labelAlign?" d3-label-center":"")}},{key:"getErrorMarkerIcon",value:function(e){var t="";switch(this.getMessageLevel(e.messages)){case j:t=Y;break;case A:t=V}return t}},{key:"getMessageLevel",value:function(e){var t="";if(e&&e.length>0){var n,i=ul(e);try{for(i.s();!(n=i.n()).done;){var o=n.value;if(o.type===j)return o.type;o.type===A&&(t=o.type)}}catch(e){i.e(e)}finally{i.f()}}return t}},{key:"getMessageLabelClass",value:function(e){var t="";switch(this.getMessageLevel(e)){case j:t="d3-node-error-label";break;case A:t="d3-node-warning-label"}return t}},{key:"getErrorMarkerClass",value:function(e){var t="d3-error-circle-off";switch(this.getMessageLevel(e)){case j:t="d3-error-circle";break;case A:t="d3-warning-circle"}return t}},{key:"getNodeCenterPosX",value:function(e){return e.x_pos+e.width/2}},{key:"getNodeCenterPosY",value:function(e){return e.y_pos+e.height/2}},{key:"getNodeImageCenterPosX",value:function(e){return this.isExpandedSupernode(e)?e.x_pos+this.canvasLayout.supernodeImagePosX+this.canvasLayout.supernodeImageWidth/2:e.x_pos+this.getElementPosX(e.width,e.layout.imagePosX,e.layout.imagePosition)+e.layout.imageWidth/2}},{key:"getNodeImageCenterPosY",value:function(e){return this.isExpandedSupernode(e)?e.y_pos+this.canvasLayout.supernodeImagePosY+this.canvasLayout.supernodeImageHeight/2:e.y_pos+this.getElementPosY(e.height,e.layout.imagePosY,e.layout.imagePosition)+e.layout.imageHeight/2}},{key:"getNodeImagePosX",value:function(e){return this.isExpandedSupernode(e)?this.canvasLayout.supernodeImagePosX:this.getElementPosX(e.width,e.layout.imagePosX,e.layout.imagePosition)}},{key:"getNodeImagePosY",value:function(e){return this.isExpandedSupernode(e)?this.canvasLayout.supernodeImagePosY:this.getElementPosY(e.height,e.layout.imagePosY,e.layout.imagePosition)}},{key:"getNodeImageWidth",value:function(e){return this.isExpandedSupernode(e)?this.canvasLayout.supernodeImageWidth:e.layout.imageWidth}},{key:"getNodeImageHeight",value:function(e){return this.isExpandedSupernode(e)?this.canvasLayout.supernodeImageHeight:e.layout.imageHeight}},{key:"getNodeLabelPosX",value:function(e){if(this.isExpandedSupernode(e))return this.canvasLayout.supernodeLabelPosX;var t=this.getElementPosX(e.width,e.layout.labelPosX,e.layout.labelPosition);return"center"===e.layout.labelAlign?t-e.layout.labelWidth/2:t}},{key:"getNodeLabelPosY",value:function(e){return this.isExpandedSupernode(e)?this.canvasLayout.supernodeLabelPosY:this.getElementPosY(e.height,e.layout.labelPosY,e.layout.labelPosition)}},{key:"getNodeLabelWidth",value:function(e){return this.isExpandedSupernode(e)?e.width-this.canvasLayout.supernodeLabelPosX+this.canvasLayout.supernodeErrorPosX:e.layout.labelWidth}},{key:"getNodeLabelHeight",value:function(e){return this.isExpandedSupernode(e)?this.canvasLayout.supernodeLabelHeight:e.layout.labelHeight}},{key:"getNodeLabelEditIconTranslate",value:function(e,t,n,i){return"translate(".concat(this.getNodeLabelEditIconPosX(e,t,n,i),", ").concat(this.getNodeLabelEditIconPosY(e),")")}},{key:"getNodeLabelEditIconPosX",value:function(e,t,n,i){var o=i?this.getNodeLabelHoverWidth(e):this.getNodeLabelWidth(e),a=i?this.getNodeLabelHoverPosX(e):this.getNodeLabelPosX(e),r=t.getBoundingClientRect().width;if("center"===e.layout.labelAlign&&!this.isExpandedSupernode(e)){var s=o/2;return a+s+Math.min(s,r/n/2)}var l=Math.min(o,r/n);return this.getNodeLabelPosX(e)+l}},{key:"getNodeLabelEditIconPosY",value:function(e){return this.getNodeLabelPosY(e)}},{key:"getNodeLabelHoverPosX",value:function(e){return e.layout.labelSingleLine&&"center"===e.layout.labelAlign?this.getNodeLabelPosX(e)-250:this.getNodeLabelPosX(e)}},{key:"getNodeLabelHoverWidth",value:function(e){return e.layout.labelSingleLine?"center"===e.layout.labelAlign?e.layout.labelWidth+500:e.layout.labelWidth+40:e.layout.labelWidth}},{key:"getNodeLabelHoverHeight",value:function(e,t,n){if(e.layout.labelSingleLine)return e.layout.labelHeight;var i=t.getBoundingClientRect().height/n;return Math.max(i,e.layout.labelHeight)}},{key:"getNodeLabelTextAreaWidth",value:function(e){return this.getNodeLabelWidth(e)+2*q}},{key:"getNodeLabelTextAreaHeight",value:function(e){return this.getNodeLabelHeight(e)+2*q}},{key:"getNodeLabelTextAreaPosX",value:function(e){return this.getNodeLabelPosX(e)-q}},{key:"getNodeLabelTextAreaPosY",value:function(e){return this.getNodeLabelPosY(e)-q}},{key:"getNodeEllipsisTranslate",value:function(e){return"translate(".concat(this.getNodeEllipsisPosX(e),", ").concat(this.getNodeEllipsisPosY(e),")")}},{key:"getNodeEllipsisWidth",value:function(e){return this.isExpandedSupernode(e)?this.canvasLayout.supernodeEllipsisWidth:e.layout.ellipsisWidth}},{key:"getNodeEllipsisHeight",value:function(e){return this.isExpandedSupernode(e)?this.canvasLayout.supernodeEllipsisHeight:e.layout.ellipsisHeight}},{key:"getNodeEllipsisIconWidth",value:function(e){return this.getNodeEllipsisWidth(e)-2*e.layout.ellipsisHoverAreaPadding}},{key:"getNodeEllipsisIconHeight",value:function(e){return this.getNodeEllipsisHeight(e)-2*e.layout.ellipsisHoverAreaPadding}},{key:"getNodeEllipsisPosX",value:function(e){return this.isExpandedSupernode(e)?e.width+this.canvasLayout.supernodeEllipsisPosX:this.getElementPosX(e.width,e.layout.ellipsisPosX,e.layout.ellipsisPosition)}},{key:"getNodeEllipsisPosY",value:function(e){return this.isExpandedSupernode(e)?this.canvasLayout.supernodeEllipsisPosY:this.getElementPosY(e.height,e.layout.ellipsisPosY,e.layout.ellipsisPosition)}},{key:"getNodeExpansionIconTranslate",value:function(e){var t=e.width+this.canvasLayout.supernodeExpansionIconPosX;return"translate(".concat(t,", ").concat(this.canvasLayout.supernodeExpansionIconPosY,")")}},{key:"getNodeErrorPosX",value:function(e){return this.isExpandedSupernode(e)?e.width+this.canvasLayout.supernodeErrorPosX:this.getElementPosX(e.width,e.layout.errorXPos,e.layout.errorPosition)}},{key:"getNodeErrorPosY",value:function(e){return this.isExpandedSupernode(e)?this.canvasLayout.supernodeErrorPosY:this.getElementPosY(e.height,e.layout.errorYPos,e.layout.errorPosition)}},{key:"getNodeErrorWidth",value:function(e){return this.isExpandedSupernode(e)?this.canvasLayout.supernodeErrorWidth:e.layout.errorWidth}},{key:"getNodeErrorHeight",value:function(e){return this.isExpandedSupernode(e)?this.canvasLayout.supernodeErrorHeight:e.layout.errorHeight}},{key:"getElementPosX",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"topLeft",i=0;return n.endsWith("Center")?i+=e/2:n.endsWith("Right")&&(i+=e),i+Number(t)}},{key:"getElementPosY",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"topLeft",i=0;return n.startsWith("middle")?i+=e/2:n.startsWith("bottom")&&(i+=e),i+Number(t)}},{key:"isExpandedSupernode",value:function(e){return this.isSupernode(e)&&this.isExpanded(e)}},{key:"isExpanded",value:function(e){return!0===e.is_expanded}},{key:"isSupernode",value:function(e){return e.type===G}},{key:"isNodeDefaultPortsCardinalityAtMax",value:function(e,t){var n=cl.getDefaultInputPortId(e),i=cl.getDefaultOutputPortId(e);return cl.isSrcCardinalityAtMax(i,e,t)||cl.isTrgCardinalityAtMax(n,e,t)}},{key:"getSupernodePortXOffset",value:function(e,t){return t?t.find((function(t){return t.subflow_node_ref===e})).cx-this.canvasLayout.supernodeSVGAreaPadding:0}},{key:"getSupernodePortYOffset",value:function(e,t){return t?t.find((function(t){return t.subflow_node_ref===e})).cy:0}}]),n}(),fl=function(){function n(){e(this,n)}return t(n,[{key:"getCommentCenterPosX",value:function(e){return e.x_pos+e.width/2}},{key:"getCommentCenterPosY",value:function(e){return e.y_pos+e.height/2}}]),n}(),gl=Math.PI,yl=function(){function n(t,i,o,a){e(this,n),this.canvasLayout=i,this.config=t,this.nodeUtils=o,this.commentUtils=a}return t(n,[{key:"getNewStraightCommentLinkStartPos",value:function(e,t){return cl.getOuterCoord(e.x_pos,e.y_pos,e.width,e.height,this.canvasLayout.linkGap,this.commentUtils.getCommentCenterPosX(e),this.commentUtils.getCommentCenterPosY(e),t.x,t.y)}},{key:"getNewStraightNodeLinkStartPos",value:function(e,t){var n,i;return"image_center"!==e.layout.drawNodeLinkLineFromTo||this.nodeUtils.isExpanded(e)?(n=this.nodeUtils.getNodeCenterPosX(e),i=this.nodeUtils.getNodeCenterPosY(e)):(n=this.nodeUtils.getNodeImageCenterPosX(e),i=this.nodeUtils.getNodeImageCenterPosY(e)),cl.getOuterCoord(e.x_pos,e.y_pos,e.width,e.height,this.canvasLayout.linkGap,n,i,t.x,t.y)}},{key:"addConnectionPaths",value:function(e){var t=this;return e.forEach((function(e){e.pathInfo=t.getConnectorPathInfo(e)})),e}},{key:"getConnectorPathInfo",value:function(e,t){var n=this.getMinInitialLine(e,t);if(Math.abs(e.x1-e.x2)<20&&Math.abs(e.y1-e.y2)<20)return this.getStraightPath(e);if(e.type===F){if(this.canvasLayout.linkType===W||this.canvasLayout.linkType===X)return this.getPortLinkPath(e,n)}else if(e.type===U&&this.config.enableAssocLinkType===$)return this.getAssociationCurvePath(e,n);return this.getStraightPath(e)}},{key:"getMinInitialLine",value:function(e,t){return e.type===B?0:e.minInitialLineForElbow?e.minInitialLineForElbow:e.srcObj&&e.srcObj.layout?e.srcObj.layout.minInitialLine:t||10}},{key:"getLinkCoords",value:function(e,t,n,i,o,a){return e===F?this.canvasLayout.linkType===z?this.getNodeLinkCoordsForStraightLine(t,i):this.getNodeLinkCoordsForPorts(t,n,i,o):e===U?this.config.enableAssocLinkType===$?this.getAssociationCurveLinkCoords(t,i,a):this.getNodeLinkCoordsForStraightLine(t,i):this.getCommentLinkCoords(t,i)}},{key:"getNodeLinkCoordsForStraightLine",value:function(e,t){var n,i,o,a;"image_center"!==e.layout.drawNodeLinkLineFromTo||this.nodeUtils.isExpanded(e)?(n=this.nodeUtils.getNodeCenterPosX(e),i=this.nodeUtils.getNodeCenterPosY(e)):(n=this.nodeUtils.getNodeImageCenterPosX(e),i=this.nodeUtils.getNodeImageCenterPosY(e)),"image_center"!==t.layout.drawNodeLinkLineFromTo||this.nodeUtils.isExpanded(t)?(o=this.nodeUtils.getNodeCenterPosX(t),a=this.nodeUtils.getNodeCenterPosY(t)):(o=this.nodeUtils.getNodeImageCenterPosX(t),a=this.nodeUtils.getNodeImageCenterPosY(t));var r=cl.getOuterCoord(e.x_pos,e.y_pos,e.width,e.height,this.canvasLayout.linkGap,n,i,o,a),s=cl.getOuterCoord(t.x_pos,t.y_pos,t.width,t.height,this.canvasLayout.linkGap,o,a,n,i);return{x1:r.x,y1:r.y,x2:s.x,y2:s.y}}},{key:"getNodeLinkCoordsForPorts",value:function(e,t,n,i){var o=e.width+e.layout.outputPortRightPosX,a=e.layout.outputPortRightPosY,r=n.layout.inputPortLeftPosX,s=n.layout.inputPortLeftPosY;if(this.canvasLayout.linkDirection===Z?(o=e.layout.outputPortBottomPosX,a=e.height+e.layout.outputPortBottomPosY,r=n.layout.inputPortTopPosX,s=n.layout.inputPortTopPosY):this.canvasLayout.linkDirection===K&&(o=e.layout.outputPortBottomPosX,a=e.layout.outputPortBottomPosY,r=n.layout.inputPortTopPosX,s=n.height+n.layout.inputPortTopPosY),e.outputs&&e.outputs.length>0){var l=e.outputs.find((function(e){return e.id===t}));o=l?l.cx:o,a=l?l.cy:a}if(n.inputs&&n.inputs.length>0){var c=n.inputs.find((function(e){return e.id===i}));r=c?c.cx:r,s=c?c.cy:s}return{x1:e.x_pos+o,y1:e.y_pos+a,x2:n.x_pos+r,y2:n.y_pos+s}}},{key:"getAssociationCurveLinkCoords",value:function(e,t,n){var i=0,o=0;return n===J?(i=e.x_pos+e.width,o=t.x_pos):n===Q?(i=e.x_pos,o=t.x_pos+t.width):n===ee?(i=e.x_pos,o=t.x_pos):(i=e.x_pos+e.width,o=t.x_pos+t.width),{x1:i,y1:e.y_pos+e.layout.outputPortRightPosY,x2:o,y2:t.y_pos+t.layout.inputPortLeftPosY}}},{key:"getCommentLinkCoords",value:function(e,t){var n,i,o=this.commentUtils.getCommentCenterPosX(e),a=this.commentUtils.getCommentCenterPosY(e);"image_center"===t.layout.drawCommentLinkLineTo?(n=this.nodeUtils.getNodeImageCenterPosX(t),i=this.nodeUtils.getNodeImageCenterPosY(t)):(n=this.nodeUtils.getNodeCenterPosX(t),i=this.nodeUtils.getNodeCenterPosY(t));var r=cl.getOuterCoord(e.x_pos,e.y_pos,e.width,e.height,this.canvasLayout.linkGap,o,a,n,i),s=cl.getOuterCoord(t.x_pos,t.y_pos,t.width,t.height,this.canvasLayout.linkGap,n,i,o,a);return{x1:r.x,y1:r.y,x2:s.x,y2:s.y}}},{key:"getPortLinkPath",value:function(e,t){var n,i,o,a;e.srcObj&&e.trgNode?this.canvasLayout.linkDirection===Z?(n=-(e.srcObj.x_pos+e.srcObj.width),o=-e.srcObj.x_pos,i=-(e.trgNode.x_pos+e.trgNode.width),a=-e.trgNode.x_pos):this.canvasLayout.linkDirection===K?(n=e.srcObj.x_pos,o=e.srcObj.x_pos+e.srcObj.width,i=e.trgNode.x_pos,a=e.trgNode.x_pos+e.trgNode.width):(n=e.srcObj.y_pos,o=e.srcObj.y_pos+e.srcObj.height,i=e.trgNode.y_pos,a=e.trgNode.y_pos+e.trgNode.height):this.canvasLayout.linkDirection===Z?(n=-e.x1,i=-e.x2,o=-e.x1,a=-e.x2):this.canvasLayout.linkDirection===K?(n=e.x1,i=e.x2,o=e.x1,a=e.x2):(n=e.y1,i=e.y2,o=e.y1,a=e.y2);var r=e;this.canvasLayout.linkDirection===Z?r=this.rotateData90Degrees(r,true):this.canvasLayout.linkDirection===K&&(r=this.rotateData90Degrees(r,false));var s=this.canvasLayout.linkType===X?this.getElbowPathInfo(r,t,n,i,o,a):this.getCurvePathInfo(r,t,n,i,o,a);return this.canvasLayout.linkDirection===Z?(s.elements=this.rotateElements90Degrees(s.elements,false),s.centerPoint=this.rotatePoint90Degrees(s.centerPoint.x,s.centerPoint.y,false)):this.canvasLayout.linkDirection===K&&(s.elements=this.rotateElements90Degrees(s.elements,true),s.centerPoint=this.rotatePoint90Degrees(s.centerPoint.x,s.centerPoint.y,true)),s.path=this.createPath(s.elements),s}},{key:"getCurvePathInfo",value:function(e,t,n,i,o,a){var r={x:0,y:0},s=e.x2-e.x1,l=[];if(l.push({p:"M",x:e.x1,y:e.y1}),s>=t||a>n-this.canvasLayout.wrapAroundNodePadding&&i<o+this.canvasLayout.wrapAroundNodePadding&&e.x2>e.x1){var c=e.x1+(e.x2-e.x1)/2,d=e.y1,u=c,p=e.y2;l.push({p:"C",x:c,y:d,x2:u,y2:p,x3:e.x2,y3:e.y2}),r.x=c,r.y=d+(p-d)/2}else{var h=e.y2-e.y1,f=this.calculateMidY(e,n,o,i,a),g=Math.min(Math.abs(h)/2,-(s-t/2)),y=t-Math.max(s/2,0),v=e.x1+y,m=e.y1,b=v,_=e.y1+(f-e.y1)/2,k=e.x1+(e.x2-e.x1)/2,P=f,I=e.x1-g,N=f,w=e.x2+g,C=f,S=e.x2-y,L=f,x=S,T=f+(e.y2-f)/2;I>w?(l.push({p:"Q",x:v,y:m,x2:b,y2:_},{p:"T",x:I,y:N},{p:"L",x:w,y:C},{p:"Q",x:S,y:L,x2:x,y2:T},{p:"T",x:e.x2,y:e.y2}),r.x=I+(w-I)/2,r.y=N):(l.push({p:"Q",x:v,y:m,x2:b,y2:_},{p:"T",x:k,y:P},{p:"Q",x:S,y:L,x2:x,y2:T},{p:"T",x:e.x2,y:e.y2}),r.x=k,r.y=P)}return{elements:l,centerPoint:r}}},{key:"getElbowPathInfo",value:function(e,t,n,i,o,a){var r,s=e.trgNode?e.trgNode.layout.minFinalLine:30,l={x:0,y:0},c=e.x1+t,d=e.y1,u=c,p=e.y2,h=e.x2-e.x1,f=e.y2-e.y1;r=h>0&&f<4*this.canvasLayout.elbowSize&&f>-4*this.canvasLayout.elbowSize?h<t+s?f/4:f/2:f>=0?this.canvasLayout.elbowSize:-this.canvasLayout.elbowSize;var g=this.canvasLayout.elbowSize,y=!1;h<t+s&&(y=!0,u=e.x2-s,g=Math.min(this.canvasLayout.elbowSize,-(h-(t+s))/2));var v=[];if(v.push({p:"M",x:e.x1,y:e.y1},{p:"L",x:c-this.canvasLayout.elbowSize,y:d},{p:"Q",x:c,y:d,x2:c,y2:d+r}),!1===y)v.push({p:"L",x:u,y:p-r}),l.x=u,l.y=p;else{var m,b,_=h<0?this.calculateMidY(e,n,o,i,a):p-(p-d)/2;_<i&&_<n||_>a&&_>o?(m=_-r,b=p+r):(m=_+r,b=p-r),v.push({p:"L",x:c,y:_-r},{p:"Q",x:c,y:_,x2:c-g,y2:_},{p:"L",x:u+g,y:_},{p:"Q",x:u,y:_,x2:u,y2:m},{p:"L",x:u,y:b}),l.x=c,l.y=_}return v.push({p:"Q",x:u,y:p,x2:u+this.canvasLayout.elbowSize,y2:p},{p:"L",x:e.x2,y:e.y2}),{elements:v,centerPoint:l}}},{key:"calculateMidY",value:function(e,t,n,i,o){return i>=n+this.canvasLayout.wrapAroundNodePadding?n+(i-n)/2:o<=t-this.canvasLayout.wrapAroundNodePadding?o+(t-o)/2:e.y1>e.y2?Math.min(t,i)-this.canvasLayout.wrapAroundSpacing:Math.max(n,o)+this.canvasLayout.wrapAroundSpacing}},{key:"rotateData90Degrees",value:function(e,t){var n=this.rotatePoint90Degrees(e.x1,e.y1,t),i=this.rotatePoint90Degrees(e.x2,e.y2,t);return{x1:n.x,y1:n.y,x2:i.x,y2:i.y}}},{key:"rotateElements90Degrees",value:function(e,t){var n,i=this;return e.forEach((function(e){n=i.rotatePoint90Degrees(e.x,e.y,t),e.x=n.x,e.y=n.y,"Q"!==e.p&&"C"!==e.p||(n=i.rotatePoint90Degrees(e.x2,e.y2,t),e.x2=n.x,e.y2=n.y,"C"===e.p&&(n=i.rotatePoint90Degrees(e.x3,e.y3,t),e.x3=n.x,e.y3=n.y))})),e}},{key:"rotatePoint90Degrees",value:function(e,t,n){return n?{x:t,y:-e}:{x:-t,y:e}}},{key:"createPath",value:function(e){var t=e.length-1,n="";return e.forEach((function(e,i){"M"===e.p?n+="M "+e.x+" "+e.y:"L"===e.p?n+="L "+e.x+" "+e.y:"T"===e.p?n+="T "+e.x+" "+e.y:"Q"===e.p?n+="Q "+e.x+" "+e.y+" "+e.x2+" "+e.y2:"C"===e.p&&(n+="C "+e.x+" "+e.y+" "+e.x2+" "+e.y2+" "+e.x3+" "+e.y3),i<t&&(n+=" ")})),n}},{key:"getStraightPath",value:function(e){var t="M "+e.x1+" "+e.y1+" L "+e.x2+" "+e.y2,n=e.x2-e.x1,i=e.y2-e.y1,o={x:e.x1+n/2,y:e.y1+i/2},a=Math.atan(i/n);return n<0&&(a=gl+a),{path:t,centerPoint:o,angle:a}}},{key:"getAssociationCurvePath",value:function(e,t){return e.assocLinkVariation===Q?this.getCurveLeftPath(e,t):e.assocLinkVariation===ee?this.getDoubleBackLeft(e,t):e.assocLinkVariation===te?this.getDoubleBackRight(e,t):this.getCurveRightPath(e,t)}},{key:"getCurveLeftPath",value:function(e,t){var n=e.x1-(e.x1-e.x2)/2;return this.getCurveOutPath(e,t,n)}},{key:"getCurveRightPath",value:function(e,t){var n=e.x1+(e.x2-e.x1)/2;return this.getCurveOutPath(e,t,n)}},{key:"getCurveOutPath",value:function(e,t,n){var i=e.y1,o=n,a=e.y2;return{path:"M "+e.x1+" "+e.y1+" C "+n+" "+i+" "+o+" "+a+" "+e.x2+" "+e.y2,centerPoint:{x:n,y:i+(a-i)/2}}}},{key:"getDoubleBackLeft",value:function(e,t){var n=Math.min(e.x1,e.x2)-t-100;return this.getDoubleBack(e,t,n)}},{key:"getDoubleBackRight",value:function(e,t){var n=Math.max(e.x1,e.x2)+t+100;return this.getDoubleBack(e,t,n)}},{key:"getDoubleBack",value:function(e,t,n){var i=e.y1,o=n,a=e.y2;return{path:"M "+e.x1+" "+e.y1+" C "+n+" "+i+" "+o+" "+a+" "+e.x2+" "+e.y2,centerPoint:{x:this.calcCenterPoint(e.x1,n,o,e.x2),y:this.calcCenterPoint(e.y1,i,a,e.y2)}}}},{key:"calcCenterPoint",value:function(e,t,n,i){var o=.5;return Math.pow(.5,3)*e+3*Math.pow(.5,2)*o*t+3*Math.pow(.5,2)*o*n+Math.pow(o,3)*i}}]),n}(),vl=function(){function n(t){e(this,n),this.canvasLayout=t}return t(n,[{key:"getDec",value:function(e,t){return t?t.find((function(t){return t.id===e})):null}},{key:"getDecLabelForeignClass",value:function(e){return"d3-foreign-object"+(e.label_outline?" d3-node-label-outline":"")}},{key:"getDecLabelClass",value:function(e,t){var n=e.label_single_line?" d3-label-single-line":" d3-label-multi-line",i="center"===e.label_align?" d3-label-center":"";return this.getDecClass(e,"d3-".concat(t,"-dec-label"))+n+i}},{key:"getDecLabelTextAreaClass",value:function(e){return"d3-dec-label-entry"+(e.label_single_line?" d3-label-single-line":" d3-label-multi-line")+("center"===e.label_align?" d3-label-center":"")}},{key:"getDecTransform",value:function(e,t,n){return"translate(".concat(this.getDecPosX(e,t,n),", ").concat(this.getDecPosY(e,t,n),")")}},{key:"getDecPosX",value:function(e,t,n){return n===ne?this.getLinkDecPosX(e,t,n):this.getNodeDecPosX(e,t)}},{key:"getNodeDecPosX",value:function(e,t){var n=e.position||"topLeft",i=0;return"topLeft"===n||"middleLeft"===n||"bottomLeft"===n?i=void 0!==e.x_pos?Number(e.x_pos):t.layout.decoratorLeftX:"topCenter"===n||"middleCenter"===n||"bottomCenter"===n?i=t.width/2+(void 0!==e.x_pos?Number(e.x_pos):t.layout.decoratorCenterX):"topRight"!==n&&"middleRight"!==n&&"bottomRight"!==n||(i=t.width+(void 0!==e.x_pos?Number(e.x_pos):t.layout.decoratorRightX)),i}},{key:"getLinkDecPosX",value:function(e,t,n){var i=e.position||"middle",o=0;return"middle"===i?o=t.pathInfo.centerPoint?t.pathInfo.centerPoint.x:t.x1+(t.x2-t.x1)/2:"source"===i?o=t.pathInfo.sourcePoint?t.pathInfo.sourcePoint.x:t.x1:"target"===i&&(o=t.pathInfo.targetPoint?t.pathInfo.targetPoint.x:t.x2),o=void 0!==e.x_pos?o+Number(e.x_pos):o,e.distance&&p(t,"pathInfo.angle")&&(o+=Math.cos(t.pathInfo.angle)*e.distance),"center"===e.label_align&&(o-=this.getDecWidth(e,t,n)/2),o}},{key:"getDecPosY",value:function(e,t,n){return n===ne?this.getLinkDecPosY(e,t):this.getNodeDecPosY(e,t)}},{key:"getNodeDecPosY",value:function(e,t){var n=e.position||"topLeft",i=0;return"topLeft"===n||"topCenter"===n||"topRight"===n?i=void 0!==e.y_pos?Number(e.y_pos):t.layout.decoratorTopY:"middleLeft"===n||"middleCenter"===n||"middleRight"===n?i=t.height/2+(void 0!==e.y_pos?Number(e.y_pos):t.layout.decoratorMiddleY):"bottomLeft"!==n&&"bottomCenter"!==n&&"bottomRight"!==n||(i=t.height+(void 0!==e.y_pos?Number(e.y_pos):t.layout.decoratorBottomY)),i}},{key:"getLinkDecPosY",value:function(e,t){var n=e.position||"middle",i=0;return"middle"===n?i=t.pathInfo.centerPoint?t.pathInfo.centerPoint.y:t.y1+(t.y2-t.y1)/2:"source"===n?i=t.pathInfo.sourcePoint?t.pathInfo.sourcePoint.y:t.y1:"target"===n&&(i=t.pathInfo.targetPoint?t.pathInfo.targetPoint.y:t.y2),i=void 0!==e.y_pos?i+Number(e.y_pos):i,e.distance&&p(t,"pathInfo.angle")&&(i+=Math.sin(t.pathInfo.angle)*e.distance),i}},{key:"getDecPadding",value:function(e,t,n){return!1===e.outline?0:n===ne?this.canvasLayout.linkDecoratorPadding:t.layout.decoratorPadding}},{key:"getDecWidth",value:function(e,t,n){return void 0!==e.width?Number(e.width):n===ne?this.canvasLayout.linkDecoratorWidth:t.layout.decoratorWidth}},{key:"getDecHeight",value:function(e,t,n){return void 0!==e.height?Number(e.height):n===ne?this.canvasLayout.linkDecoratorHeight:t.layout.decoratorHeight}},{key:"getDecClass",value:function(e,t){var n=t;return e&&e.class_name&&(n+=" "+e.class_name),n}},{key:"getDecImage",value:function(e){return e?e.image:""}},{key:"getDecLabelEditIconTranslate",value:function(e,t,n,i,o){return"translate(".concat(this.getDecLabelEditIconPosX(e,t,n,i,o),", ").concat(this.getDecLabelEditIconPosY(e),")")}},{key:"getDecLabelEditIconPosX",value:function(e,t,n,i,o){return"center"===e.label_align?this.getDecLabelWidth(e,t,n)/2+i.getBoundingClientRect().width/2/o:i.getBoundingClientRect().width/o}},{key:"getDecLabelEditIconPosY",value:function(e){return 0}},{key:"getDecLabelWidth",value:function(e,t,n){return void 0!==e.width?Number(e.width):n===ne?this.canvasLayout.linkDecoratorLabelWidth:t.layout.decoratorLabelWidth}},{key:"getDecLabelHeight",value:function(e,t,n){return void 0!==e.height?Number(e.height):n===ne?this.canvasLayout.linkDecoratorLabelHeight:t.layout.decoratorLabelHeight}},{key:"getDecLabelTextAreaWidth",value:function(e,t,n){return this.getDecLabelWidth(e,t,n)+2*q}},{key:"getDecLabelTextAreaHeight",value:function(e,t,n){return this.getDecLabelHeight(e,t,n)+2*q}},{key:"getDecLabelTextAreaPosX",value:function(){return-q}},{key:"getDecLabelTextAreaPosY",value:function(){return-(q-1)}}]),n}(),ml=Object.assign({},aa,Sa,zo,$a,al),bl=function(){function n(t,i,o,a,r){var s=this,l=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};e(this,n),this.logger=new Zn(["SVGCanvasRenderer","PipeId",t]),this.logger.logStartTimer("constructor"+t.substring(0,5)),this.pipelineId=t,this.supernodeInfo=l,this.canvasDiv=i,this.canvasInfo=a,this.config=r,this.canvasController=o,this.objectModel=this.canvasController.getObjectModel(),this.activePipeline=this.getActivePipeline(t),this.activePipeline=cl.preProcessPipeline(this.activePipeline),this.superRenderers=[],this.instanceId=this.canvasController.getInstanceId(),this.canvasLayout=this.objectModel.getCanvasLayout(),this.dispUtils=new dl(this.canvasController,this.supernodeInfo.d3Selection,this.pipelineId),this.nodeUtils=new hl(this.canvasLayout),this.commentUtils=new fl,this.linkUtils=new yl(this.config,this.canvasLayout,this.nodeUtils,this.commentUtils),this.decUtils=new vl(this.canvasLayout),this.dispUtils.setDisplayState(),this.logger.log(this.dispUtils.getDisplayStateMsg()),this.initializeZoomVariables(),this.minScaleExtent=.2,this.maxScaleExtent=1.8,this.resizeObj=null,this.resizeObjInitialInfo=null,this.commentSizing=!1,this.commentSizingDirection="",this.nodeSizing=!1,this.nodeSizingDirection="",this.nodeSizingObjectsInfo=[],this.nodeSizingLinksInfo=[],this.notSnappedXPos=0,this.notSnappedYPos=0,this.notSnappedWidth=0,this.notSnappedHeight=0,this.editingText=!1,this.editingTextId="",this.dragging=!1,this.dragOffsetX=0,this.dragOffsetY=0,this.dragRunningX=0,this.dragRunningY=0,this.dragObjects=[],this.dragStartX=0,this.dragStartY=0,this.dragOverLink=null,this.dragOverDetachedLinks=[],this.dragPointerOffsetInNode=null,this.dragNewLinkOverNode=null,this.selecting=!1,this.movingBindingNodes=!1,this.contextMenuClosedOnZoom=!1,this.regionSelect=!1,this.region={startX:0,startY:0,width:0,height:0},this.regionStartTransformX=0,this.regionStartTransformY=0,this.drawingNewLinkData=null,this.drag=ml.drag().on("start",this.dragStart.bind(this)).on("drag",this.dragMove.bind(this)).on("end",this.dragEnd.bind(this)),this.draggingLinkData=null,this.dragSelectionHandle=ml.drag().on("start",this.dragStartLinkHandle.bind(this)).on("drag",this.dragMoveLinkHandle.bind(this)).on("end",this.dragEndLinkHandle.bind(this)),this.zoom=ml.zoom().trackpad(this.config.enableInteractionType===se).preventBackGesture(!0).wheelDelta((function(e){return-e.deltaY*(s.config.enableInteractionType===se?.02:.002)})).scaleExtent([this.minScaleExtent,this.maxScaleExtent]).on("start",this.zoomStart.bind(this)).on("zoom",this.zoomAction.bind(this)).on("end",this.zoomEnd.bind(this)),this.initializeGhostDiv(),this.canvasSVG=this.createCanvasSVG(),this.canvasGrp=this.createCanvasGroup(this.canvasSVG,"d3-canvas-group"),this.canvasUnderlay=this.createCanvasUnderlay(this.canvasGrp,"d3-canvas-underlay"),this.commentsGrp=this.createCanvasGroup(this.canvasGrp,"d3-comments-group"),this.nodesLinksGrp=this.createCanvasGroup(this.canvasGrp,"d3-nodes-links-group"),this.boundingRectsGrp=this.createBoundingRectanglesGrp(this.canvasGrp,"d3-bounding-rect-group"),this.resetCanvasSVGBehaviors(),this.displayCanvas(),this.dispUtils.isDisplayingFullPage()&&this.restoreZoom(),(this.dispUtils.isDisplayingSubFlowFullPage()||this.canvasLayout.alwaysDisplayBackToParentFlow)&&this.addBackToParentFlowArrow(this.canvasSVG),this.dispUtils.isDisplayingSubFlowFullPage()&&(!this.config.enableSaveZoom||"None"===this.config.enableSaveZoom||"LocalStorage"===this.config.enableSaveZoom&&!this.getSavedZoom()||"Pipelineflow"===this.config.enableSaveZoom&&!this.activePipeline.zoom)&&this.zoomToFit(),this.dispUtils.isDisplayingSubFlowInPlace()&&(this.supernodeInfo.d3Selection.selectAll(".d3-node-port-input").raise(),this.supernodeInfo.d3Selection.selectAll(".d3-node-port-output").raise()),this.logger.logEndTimer("constructor"+t.substring(0,5))}return t(n,[{key:"isCanvasEmptyOrBindingsOnly",value:function(){return(g(this.activePipeline.nodes)||this.containsOnlyBindingNodes(this.activePipeline))&&g(this.activePipeline.comments)}},{key:"containsOnlyBindingNodes",value:function(e){return!e.nodes.find((function(e){return!cl.isSuperBindingNode(e)}))}},{key:"getParentSupernodeDatum",value:function(){var e=this,t=null;return this.canvasInfo.pipelines.forEach((function(n){n.id===e.supernodeInfo.pipelineId&&(t||(t=n.nodes.find((function(t){return e.nodeUtils.isSupernode(t)&&t.id===e.supernodeInfo.id}))))})),t}},{key:"getSupernodes",value:function(e){var t=this;return e.nodes.filter((function(e){return t.nodeUtils.isSupernode(e)}))}},{key:"getZoomTransform",value:function(){return this.zoomTransform}},{key:"initializeZoomVariables",value:function(){this.zoomTransform=ml.zoomIdentity.translate(0,0).scale(1),this.zoomStartPoint={x:0,y:0,k:0}}},{key:"getActivePipeline",value:function(e){var t=this.canvasInfo.pipelines.find((function(t){return t.id===e}));return t||{id:e,nodes:[],comments:[],links:[]}}},{key:"setCanvasInfoRenderer",value:function(e){this.logger.logStartTimer("setCanvasInfoRenderer"+this.pipelineId.substring(0,5)),this.canvasInfo=e,this.activePipeline=this.getActivePipeline(this.pipelineId),this.activePipeline=cl.preProcessPipeline(this.activePipeline),this.canvasLayout=this.objectModel.getCanvasLayout(),this.dispUtils.setDisplayState(),this.logger.log(this.dispUtils.getDisplayStateMsg()),this.resetCanvasSVGBehaviors(),this.resetCanvasCursor(),this.superRenderers=this.cleanUpSuperRenderers(),this.displayCanvas(),this.logger.logEndTimer("setCanvasInfoRenderer"+this.pipelineId.substring(0,5))}},{key:"cleanUpSuperRenderers",value:function(){var e=this,t=[];return this.getSupernodes(this.activePipeline).forEach((function(n){var i=e.getRendererForSupernode(n);i&&t.push(i),e.getDiscardedRenderersForSupernode(n).forEach((function(e){return e.canvasSVG.remove()}))})),t}},{key:"clearCanvas",value:function(){this.initializeZoomVariables(),this.canvasSVG.remove()}},{key:"refreshOnSizeChange",value:function(){if(this.logger.log("refreshOnSizeChange"),this.dispUtils.isDisplayingSubFlowFullPage()&&this.displayBindingNodesToFitSVG(),this.config.enableBoundingRectangles&&this.displayBoundingRectangles(),this.config.enablePositionNodeOnRightFlyoutOpen&&this.canvasController.isRightFlyoutOpen()){var e=this.config.enablePositionNodeOnRightFlyoutOpen,t=e.x?e.x:50,n=e.y?e.y:50,i=this.canvasController.getSelectedNodes().map((function(e){return e.id})),o=this.getZoomToReveal(i,t,n);this.zoomTo(o)}}},{key:"hideCanvas",value:function(){this.canvasSVG.style("display","none")}},{key:"displayCanvas",value:function(){this.logger.logStartTimer("displayCanvas"),this.canvasSVG.style("display","inherit"),this.displayComments(),this.displayNodes(),this.displayLinks(),this.dispUtils.isDisplayingSubFlowInPlace()&&this.displaySVGToFitSupernode(),this.dispUtils.isDisplayingSubFlowFullPage()&&this.displayPortsForSubFlowFullPage(),this.config.enableBoundingRectangles&&this.displayBoundingRectangles(),"None"!==this.config.enableCanvasUnderlay&&this.dispUtils.isDisplayingPrimaryFlowFullPage()&&this.setCanvasUnderlaySize(),this.logger.logEndTimer("displayCanvas")}},{key:"displayPortsForSubFlowFullPage",value:function(){this.setPortPositionsForNode(this.getParentSupernodeDatum()),this.displayBindingNodesToFitSVG()}},{key:"displaySVGToFitSupernode",value:function(){this.logger.log("displaySVGToFitSupernode - start");var e=this.getParentSupernodeSVGDimensions();this.canvasSVG.attr("width",e.width),this.canvasSVG.attr("height",e.height),this.canvasSVG.attr("x",e.x),this.canvasSVG.attr("y",e.y);var t=this.canvasSVG.selectChildren(".d3-svg-background");t.attr("width",e.width),t.attr("height",e.height),this.zoomToFit(),this.displayBindingNodesToFitSVG(),this.logger.log("displaySVGToFitSupernode - end")}},{key:"displayBindingNodesToFitSVG",value:function(){this.logger.log("displayBindingNodesToFitSVG - start"),this.setPortPositionsAllNodes(),this.moveSuperBindingNodes(),this.movingBindingNodes=!0,this.displayNodes(),this.displayLinks(),this.movingBindingNodes=!1,this.logger.log("displayBindingNodesToFitSVG - end")}},{key:"getParentSupernodeSVGDimensions",value:function(){var e=this.getParentSupernodeDatum();return{width:e.width-2*this.canvasLayout.supernodeSVGAreaPadding,height:e.height-this.canvasLayout.supernodeTopAreaHeight-this.canvasLayout.supernodeSVGAreaPadding,x:this.canvasLayout.supernodeSVGAreaPadding,y:this.canvasLayout.supernodeTopAreaHeight,x_pos:e.x_pos+this.canvasLayout.supernodeSVGAreaPadding,y_pos:e.y_pos+this.canvasLayout.supernodeTopAreaHeight}}},{key:"moveSuperBindingNodes",value:function(){var e=this,t=this.getTransformedViewportDimensions(),n=this.getParentSupernodeDatum();if(this.canvasLayout.linkDirection===Z||this.canvasLayout.linkDirection===K){var i=n.width-2*this.canvasLayout.supernodeSVGAreaPadding;this.activePipeline.nodes.forEach((function(o){if(o.isSupernodeInputBinding){var a=e.nodeUtils.getSupernodePortXOffset(o.id,n.inputs);o.x_pos=t.width*(a/i)+t.x-o.outputs[0].cx,o.y_pos=e.canvasLayout.linkDirection===Z?t.y-o.height:t.y+t.height}if(o.isSupernodeOutputBinding){var r=e.nodeUtils.getSupernodePortXOffset(o.id,n.outputs);o.x_pos=t.width*(r/i)+t.x-o.inputs[0].cx,o.y_pos=e.canvasLayout.linkDirection===Z?o.y_pos=t.y+t.height:o.y_pos=t.y-o.height}}))}else{var o,a;this.nodeUtils.isExpanded(n)?(o=this.canvasLayout.supernodeTopAreaHeight,a=n.height-(this.canvasLayout.supernodeTopAreaHeight+this.canvasLayout.supernodeSVGAreaPadding)):(o=0,a=n.height),this.activePipeline.nodes.forEach((function(i){if(i.isSupernodeInputBinding){i.x_pos=t.x-i.width;var r=e.nodeUtils.getSupernodePortYOffset(i.id,n.inputs)-o;i.y_pos=t.height*(r/a)+t.y-i.outputs[0].cy}if(i.isSupernodeOutputBinding){i.x_pos=t.x+t.width;var s=e.nodeUtils.getSupernodePortYOffset(i.id,n.outputs)-o;i.y_pos=t.height*(s/a)+t.y-i.inputs[0].cy}}))}}},{key:"displayBoundingRectangles",value:function(){if(this.activePipeline){var e=this.getViewportDimensions(),t=this.getTransformedRect(e,1),n=this.getCanvasDimensionsAdjustedForScale(1),i=this.getCanvasDimensionsAdjustedForScale(1,this.getZoomToFitPadding());this.boundingRectsGrp.selectChildren(".d3-bounding").remove();var o=this.boundingRectsGrp.append("g").attr("class","d3-bounding");o.append("rect").attr("height",e.height).attr("width",e.width).attr("x",0).attr("y",0).style("fill","none").style("stroke","darkorange"),o.append("rect").attr("height",t.height).attr("width",t.width-2).attr("x",t.x).attr("y",t.y).style("fill","none").style("stroke","red"),n&&o.append("rect").attr("height",n.height).attr("width",n.width).attr("x",n.left).attr("y",n.top).style("fill","none").style("stroke","blue"),i&&o.append("rect").attr("height",i.height).attr("width",i.width).attr("x",i.left).attr("y",i.top).style("fill","none").style("stroke","green"),this.config.enableBoundingRectangles&&this.superRenderers.length>0&&this.superRenderers.forEach((function(e){return e.displayBoundingRectangles()}))}}},{key:"isEditingText",value:function(){if(this.editingText)return!0;var e=!1;return this.superRenderers.forEach((function(t){e||(e=t.isEditingText())})),e}},{key:"isDragging",value:function(){return this.dragging}},{key:"getAllNodeGroupsSelection",value:function(){return this.nodesLinksGrp.selectChildren(".d3-node-group")}},{key:"getAllLinkGroupsSelection",value:function(){return this.nodesLinksGrp.selectChildren(".d3-link-group")}},{key:"getAllCommentGroupsSelection",value:function(){return this.commentsGrp.selectChildren(".d3-comment-group")}},{key:"getNodeGroupSelectionById",value:function(e){var t=this.getSelectorForId("node_grp",e);return this.nodesLinksGrp.selectChildren(t)}},{key:"getLinkGroupSelectionById",value:function(e){var t=this.getSelectorForId("link_grp",e);return this.nodesLinksGrp.selectChildren(t)}},{key:"getSelectorForId",value:function(e,t,n){return"[data-id='".concat(this.getId(e,t,n),"']")}},{key:"getId",value:function(e,t,n){var i="".concat(e,"_").concat(this.instanceId);return t&&(i+="_".concat(t)),n&&(i+="_".concat(n)),i}},{key:"getMousePosSnapToGrid",value:function(e){var t=e;return this.config.enableSnapToGridType!==ie&&this.config.enableSnapToGridType!==oe||(t=this.snapToGridPosition(t)),t}},{key:"snapToGridObject",value:function(e){var t=e;return t.x_pos=cl.snapToGrid(t.x_pos,this.canvasLayout.snapToGridXPx),t.y_pos=cl.snapToGrid(t.y_pos,this.canvasLayout.snapToGridYPx),t.width=cl.snapToGrid(t.width,this.canvasLayout.snapToGridXPx),t.height=cl.snapToGrid(t.height,this.canvasLayout.snapToGridYPx),t}},{key:"getTransformedMousePos",value:function(e){return this.transformPos(this.getMousePos(e,this.canvasSVG))}},{key:"getMousePos",value:function(e,t){var n=ml.pointer(e,t.node());return{x:n[0],y:n[1]}}},{key:"convertPageCoordsToCanvasCoords",value:function(e,t){var n=this.canvasSVG.node().getBoundingClientRect();return this.transformPos({x:e-Math.round(n.left),y:t-Math.round(n.top)})}},{key:"transformPos",value:function(e){return{x:(e.x-this.zoomTransform.x)/this.zoomTransform.k,y:(e.y-this.zoomTransform.y)/this.zoomTransform.k}}},{key:"getTransformedRect",value:function(e,t){var n=t/this.zoomTransform.k;return{x:-this.zoomTransform.x/this.zoomTransform.k+n,y:-this.zoomTransform.y/this.zoomTransform.k+n,height:e.height/this.zoomTransform.k-2*n,width:e.width/this.zoomTransform.k-2*n}}},{key:"initializeGhostDiv",value:function(){this.dispUtils.isDisplayingFullPage()&&this.getGhostDivSel().empty()&&this.canvasDiv.append("div").attr("class","d3-ghost-div")}},{key:"getGhostDivSel",value:function(){return this.canvasDiv.selectAll(".d3-ghost-div")}},{key:"getGhostNode",value:function(e){var t=this,n=this.getGhostDimensions(),i=this.canvasController.convertNodeTemplate(e);i.layout=this.canvasController.getObjectModel().getNodeLayout(),i.width=i.is_expanded?i.expanded_width:n.width,i.height=i.is_expanded?i.expanded_height:n.height;var o=this.getNodeImage(i),a=this.getImageType(o),r=this.getGhostDivSel(),s=this.objectModel.getNodeLayout(),l=Math.max(s.labelWidth,i.width);r.selectAll(".d3-ghost-svg").remove();var c=r.append("svg").attr("width",l*this.zoomTransform.k).attr("height",(50+i.height)*this.zoomTransform.k).attr("x",0).attr("y",0).attr("class","d3-ghost-svg").append("g").attr("class","d3-node-group");c.append("rect").attr("class","d3-ghost-node").attr("x",0).attr("y",0).attr("width",i.width).attr("height",i.height),c.append(a).attr("class","d3-node-image").each((function(){t.setNodeImageContent(this,i)})).attr("x",this.nodeUtils.getNodeImagePosX(i)).attr("y",this.nodeUtils.getNodeImagePosY(i)).attr("width",this.nodeUtils.getNodeImageWidth(i)).attr("height",this.nodeUtils.getNodeImageHeight(i));var d=c.append("foreignObject").attr("x",this.nodeUtils.getNodeLabelPosX(i)).attr("y",this.nodeUtils.getNodeLabelPosY(i)).attr("width",this.nodeUtils.getNodeLabelWidth(i)).attr("height",this.nodeUtils.getNodeLabelHeight(i)).attr("class",this.nodeUtils.getNodeLabelForeignClass(i)),u=d.append("xhtml:div").attr("class",this.nodeUtils.getNodeLabelClass(i)),p=u.append("xhtml:span").html(i.label).node().getBoundingClientRect().width+4,h=this.nodeUtils.getNodeLabelWidth(i),f=Math.min(h,p),g=Math.max(0,(f-n.width)/2)*this.zoomTransform.k;if(c.attr("transform","translate(".concat(g,", 0) scale(").concat(this.zoomTransform.k,")")),"center"===i.layout.labelAlign){var y=Math.max(0,(h-f)/2);d.attr("width",f).attr("x",this.nodeUtils.getNodeLabelPosX(i)+y),u.attr("width",f)}var v=window.devicePixelRatio/2,m=(g+n.width/2*this.zoomTransform.k)*v,b=n.height/2*this.zoomTransform.k*v;return{element:r.node(),centerX:m,centerY:b}}},{key:"getGhostDimensions",value:function(){var e=this.objectModel.getNodeLayout();return{width:e.defaultNodeWidth,height:e.defaultNodeHeight}}},{key:"nodeTemplateDraggedOver",value:function(e,t,n){if(this.isNodeTemplateInsertableIntoLink(e)){var i=this.getLinkAtMousePos(t,n);i&&!this.isLinkFullyAttached(i)||this.setInsertNodeIntoLinkHighlighting(i)}if(this.isNodeTemplateAttachableToDetachedLinks(e)){var o=this.convertPageCoordsToCanvasCoords(t,n),a=this.getGhostDimensions(),r={x1:o.x-a.width/2,y1:o.y-a.height/2,x2:o.x+a.width/2,y2:o.y+a.height/2},s=this.canvasController.convertNodeTemplate(e),l=this.getAttachableLinksForNodeAtPos(s,r);this.setDetachedLinkHighlighting(l)}"None"!==this.config.enableCanvasUnderlay&&this.dispUtils.isDisplayingPrimaryFlowFullPage()&&this.setCanvasUnderlaySize(t,n)}},{key:"setInsertNodeIntoLinkHighlighting",value:function(e){e?this.dragOverLink?e.id!==this.dragOverLink.id&&(this.unsetInsertNodeIntoLinkHighlighting(),this.dragOverLink=e,this.setNodeDragOverLinkHighlighting(this.dragOverLink,!0)):(this.dragOverLink=e,this.setNodeDragOverLinkHighlighting(this.dragOverLink,!0)):this.unsetInsertNodeIntoLinkHighlighting()}},{key:"unsetInsertNodeIntoLinkHighlighting",value:function(e){this.dragOverLink&&(this.setNodeDragOverLinkHighlighting(this.dragOverLink,!1),this.dragOverLink=null)}},{key:"setDetachedLinkHighlighting",value:function(e){var t=this;e&&e.length>0?(this.unsetDetachedLinkHighlighting(),this.dragOverDetachedLinks=e,this.dragOverDetachedLinks.forEach((function(e){return t.setNodeDragOverLinkHighlighting(e,!0)}))):this.dragOverDetachedLinks.length>0&&this.unsetDetachedLinkHighlighting()}},{key:"unsetDetachedLinkHighlighting",value:function(){var e=this;this.dragOverDetachedLinks.forEach((function(t){return e.setNodeDragOverLinkHighlighting(t,!1)})),this.dragOverDetachedLinks=[]}},{key:"setNodeDragOverLinkHighlighting",value:function(e,t){this.getLinkGroupSelectionById(e.id).attr("data-drag-node-over",!!t||null)}},{key:"setNewLinkOverNode",value:function(e){var t=this.getNodeNearMousePos(e,this.canvasLayout.nodeProximity);t&&this.isConnectionAllowedToNearbyNode(e,t)?this.dragNewLinkOverNode?t.id!==this.dragNewLinkOverNode.id&&(this.setNewLinkOverNodeHighlighting(this.dragNewLinkOverNode,!1),this.dragNewLinkOverNode=t,this.setNewLinkOverNodeHighlighting(this.dragNewLinkOverNode,!0)):(this.dragNewLinkOverNode=t,this.setNewLinkOverNodeHighlighting(this.dragNewLinkOverNode,!0)):this.dragNewLinkOverNode&&(this.setNewLinkOverNodeHighlighting(this.dragNewLinkOverNode,!1),this.dragNewLinkOverNode=null)}},{key:"isConnectionAllowedToNearbyNode",value:function(e,t){if(this.drawingNewLinkData){if(this.drawingNewLinkData.action===F){var n=this.drawingNewLinkData.srcNode,i=t,o=this.drawingNewLinkData.srcNodePortId,a=cl.getDefaultInputPortId(i);return cl.isDataConnectionAllowed(o,a,n,i,this.activePipeline.links)}if(this.drawingNewLinkData.action===U){var r=this.drawingNewLinkData.srcNode,s=t;return cl.isAssocConnectionAllowed(r,s,this.activePipeline.links)}if(this.drawingNewLinkData.action===B){var l=this.drawingNewLinkData.srcObjId,c=t.id;return cl.isCommentLinkConnectionAllowed(l,c,this.activePipeline.links)}}else if(this.draggingLinkData){if(this.getNewLinkOnDrag(e,this.canvasLayout.nodeProximity))return!0}return!1}},{key:"setNewLinkOverNodeHighlighting",value:function(e,t){e&&this.getNodeGroupSelectionById(e.id).attr("data-new-link-over",t?"yes":"no")}},{key:"setNewLinkOverNodeCancel",value:function(){this.setNewLinkOverNodeHighlighting(this.dragNewLinkOverNode,!1),this.dragNewLinkOverNode=null}},{key:"nodeTemplateDropped",value:function(e,t,n){if(null!==e){var i=this.transformMousePosForNode(t,n);this.dragOverLink?(this.canvasController.createNodeFromTemplateOnLinkAt(e,this.dragOverLink,i,this.pipelineId),this.unsetInsertNodeIntoLinkHighlighting()):this.dragOverDetachedLinks.length>0?(this.canvasController.createNodeFromTemplateAttachLinks(e,this.dragOverDetachedLinks,i,this.pipelineId),this.unsetDetachedLinkHighlighting()):this.canvasController.createNodeFromTemplateAt(e,i,this.pipelineId)}}},{key:"externalObjectDropped",value:function(e,t,n){if(null!==e){var i=this.transformMousePosForNode(t,n);this.canvasController.createDroppedExternalObject(e,i,this.pipelineId)}}},{key:"transformMousePosForNode",value:function(e,t){var n=this.convertPageCoordsToCanvasCoords(e,t),i=this.getGhostDimensions();return n.x-=i.width/2,n.y-=i.height/2,this.getMousePosSnapToGrid(n)}},{key:"isNodeTemplateInsertableIntoLink",value:function(e){return this.config.enableInsertNodeDroppedOnLink&&this.isNonBindingNode(e)&&!this.isPortMaxCardinalityZero(e.inputs[0])&&!this.isPortMaxCardinalityZero(e.outputs[0])}},{key:"isExistingNodeInsertableIntoLink",value:function(){return this.config.enableInsertNodeDroppedOnLink&&1===this.dragObjects.length&&this.isNode(this.dragObjects[0])&&this.isNonBindingNode(this.dragObjects[0])&&!this.nodeUtils.isNodeDefaultPortsCardinalityAtMax(this.dragObjects[0],this.activePipeline.links)}},{key:"isExistingNodeAttachableToDetachedLinks",value:function(){return this.config.enableLinkSelection===ae&&1===this.dragObjects.length&&this.isNode(this.dragObjects[0])}},{key:"isNodeTemplateAttachableToDetachedLinks",value:function(e){return this.config.enableLinkSelection===ae}},{key:"getAttachableLinksForNodeAtPos",value:function(e,t){var n=this,i=e.inputs&&e.inputs.length>0,o=e.outputs&&e.outputs.length>0,a=this.activePipeline.links.filter((function(e){return e.srcPos&&o&&cl.isPosInArea(e.srcPos,t,n.canvasLayout.ghostAreaPadding)?(e.nodeOverSrcPos=!0,!0):e.trgPos&&i&&cl.isPosInArea(e.trgPos,t,n.canvasLayout.ghostAreaPadding)?(e.nodeOverTrgPos=!0,!0):(e.nodeOverSrcPos=!1,e.nodeOverTrgPos=!1,!1)}));a.length>0&&(a=cl.getDetachedLinksToUpdate(e,a,this.activePipeline.links).oldLinks);return a}},{key:"isLinkFullyAttached",value:function(e){return!!e&&(void 0!==e.srcNodeId&&void 0!==e.trgNodeId)}},{key:"getLink",value:function(e){var t=this.activePipeline.links.find((function(t){return t.id===e}));return void 0===t?null:t}},{key:"isNode",value:function(e){return e.type}},{key:"getNode",value:function(e){var t=this.activePipeline.nodes.find((function(t){return t.id===e}));return void 0===t?null:t}},{key:"getNodes",value:function(e){var t=this,n=[];return e.forEach((function(e){var i=t.getNode(e);i&&n.push(i)})),n}},{key:"getNodePort",value:function(e,t,n){var i=this.activePipeline.nodes.find((function(t){return t.id===e}));if(i){var o=("input"===n?i.inputs:i.outputs).find((function(e){return e.id===t}));return void 0===o?null:o}return null}},{key:"getComment",value:function(e){var t=this.activePipeline.comments.find((function(t){return t.id===e}));return void 0===t?null:t}},{key:"getNodeOrComment",value:function(e){var t=this.getNode(e);return null===t&&(t=this.getComment(e)),t}},{key:"setMaxZoomExtent",value:function(e){if(this.dispUtils.isDisplayingFullPage()){var t=this.maxScaleExtent*e;this.zoom.scaleExtent([this.minScaleExtent,t])}else{var n=1*Number(e)/this.zoomTransform.k;this.supernodeInfo.renderer.setMaxZoomExtent(n)}}},{key:"createCanvasSVG",value:function(){var e=this;this.logger.log("Create Canvas SVG.");var t=this.canvasDiv,n={width:"100%",height:"100%",x:0,y:0};this.dispUtils.isDisplayingSubFlowInPlace()&&(t=this.supernodeInfo.d3Selection,n=this.getParentSupernodeSVGDimensions());var i=t.append("svg").attr("class","svg-area").attr("data-pipeline-id",this.activePipeline.id).attr("width",n.width).attr("height",n.height).attr("x",n.x).attr("y",n.y).on("mouseenter",(function(t,n){e.supernodeInfo.renderer&&e.config.enableZoomIntoSubFlows&&e.supernodeInfo.renderer.setMaxZoomExtent(1/e.zoomTransform.k)})).on("mouseleave",(function(t,n){e.supernodeInfo.renderer&&e.config.enableZoomIntoSubFlows&&e.supernodeInfo.renderer.setMaxZoomExtent(1)}));if(i.append("rect").attr("x",0).attr("y",0).attr("width",n.width).attr("height",n.height).attr("data-pipeline-id",this.activePipeline.id).attr("class","d3-svg-background").attr("pointer-events","all").style("cursor",this.getCanvasCursor()),this.dispUtils.isDisplayingFullPage()){var o=i.append("defs");this.createDropShadow(o)}return i}},{key:"resetCanvasSVGBehaviors",value:function(){var e=this;this.canvasSVG.on(".zoom",null),!this.isCanvasEmptyOrBindingsOnly()&&this.dispUtils.isDisplayingFullPage()&&this.canvasSVG.call(this.zoom),this.canvasSVG.on("mousemove.zoom",(function(t){e.drawingNewLinkData&&e.drawNewLink(t),e.draggingLinkData&&e.dragLinkHandle(t)})).on("mousedown",(function(t){e.logger.log("Canvas - mousedown"),e.dispUtils.isDisplayingSubFlowInPlace()&&t.button===re&&t.stopPropagation()})).on("mouseup.zoom",(function(t){e.logger.log("Canvas - mouseup-zoom"),e.drawingNewLinkData&&e.completeNewLink(t),e.draggingLinkData&&e.completeDraggedLink(t)})).on("click.zoom",(function(t){e.logger.log("Canvas - click-zoom"),e.selecting=!0,e.dispUtils.isDisplayingCurrentPipeline()&&!e.contextMenuClosedOnZoom&&e.canvasController.clearSelections(),e.contextMenuClosedOnZoom=!1,e.selecting=!1,e.canvasController.clickActionHandler({clickType:"contextmenu"===t.type?"SINGLE_CLICK_CONTEXTMENU":"SINGLE_CLICK",objectType:"canvas",selectedObjectIds:e.objectModel.getSelectedObjectIds()})})).on("dblclick.zoom",(function(){e.logger.log("Zoom - double click"),e.canvasController.clickActionHandler({clickType:"DOUBLE_CLICK",objectType:"canvas",selectedObjectIds:e.objectModel.getSelectedObjectIds()})})).on("contextmenu.zoom",(function(t,n){e.logger.log("Zoom - context menu"),e.openContextMenu(t,"canvas")}))}},{key:"resetCanvasCursor",value:function(){var e=".d3-svg-background[data-pipeline-id='"+this.activePipeline.id+"']";this.canvasSVG.select(e).style("cursor",this.getCanvasCursor())}},{key:"getCanvasCursor",value:function(){return this.dispUtils.isDisplayingFullPage()?this.config.enableInteractionType===se||this.isCanvasEmptyOrBindingsOnly()?"default":"grab":"pointer"}},{key:"createCanvasGroup",value:function(e,t){return e.append("g").attr("class",t)}},{key:"createCanvasUnderlay",value:function(e,t){return"None"!==this.config.enableCanvasUnderlay&&this.dispUtils.isDisplayingPrimaryFlowFullPage()?e.append("rect").attr("class",t):null}},{key:"createBoundingRectanglesGrp",value:function(e,t){return this.config.enableBoundingRectangles?e.append("g").attr("class",t):null}},{key:"setCanvasUnderlaySize",value:function(){var e=this.getCanvasDimensionsAdjustedForScale(1,this.getZoomToFitPadding());e&&this.canvasUnderlay.attr("x",e.left-50).attr("y",e.top-50).attr("width",e.width+100).attr("height",e.height+100)}},{key:"addBackToParentFlowArrow",value:function(e){var t=this,n=e.append("g").attr("transform","translate(15, 15)").on("mouseenter",(function(e,t){ml.select(this).select("rect").attr("data-pointer-hover","yes")})).on("mouseleave",(function(e,t){ml.select(this).select("rect").attr("data-pointer-hover","no")})).on("click",(function(e){cl.stopPropagationAndPreventDefault(e),t.canvasController.displayPreviousPipeline()}));n.append("rect").attr("x",0).attr("y",0).attr("width",210).attr("height",40).attr("class","d3-back-to-previous-flow-box"),n.append("svg").attr("x",16).attr("y",11).attr("width",16).attr("height",16).html(le).attr("class","d3-back-to-previous-flow-text"),n.append("text").attr("x",40).attr("y",24).attr("class","d3-back-to-previous-flow-text").text("Return to previous flow")}},{key:"createDropShadow",value:function(e){var t=e.append("filter").attr("id",this.getId("node_drop_shadow")).attr("x","-20%").attr("y","-20%").attr("width","200%").attr("height","200%");t.append("feOffset").attr("in","SourceAlpha").attr("dx",1).attr("dy",1).attr("result","offOut"),t.append("feGaussianBlur").attr("in","offOut").attr("stdDeviation","3").attr("result","blurOut"),t.append("feBlend").attr("in","SourceGraphic").attr("in2","blurOut").attr("mode","normal"),t.append("feComponentTransfer").append("feFuncA").attr("type","linear").attr("slope","0.2");var n=t.append("feMerge");n.append("feMergeNode"),n.append("feMergeNode").attr("in","SourceGraphic")}},{key:"restoreZoom",value:function(){var e=null;if("Pipelineflow"===this.config.enableSaveZoom&&this.activePipeline.zoom)e=this.activePipeline.zoom;else if("LocalStorage"===this.config.enableSaveZoom){var t=this.getSavedZoom();t&&(e=t)}if(!e&&this.config.enablePanIntoViewOnOpen){var n=this.getCanvasDimensionsAdjustedForScale(1,this.getZoomToFitPadding());n&&(e={x:-n.left,y:-n.top,k:1})}!e&&this.canvasLayout.initialPanX&&this.canvasLayout.initialPanY&&(e={x:this.canvasLayout.initialPanX,y:this.canvasLayout.initialPanY,k:1}),!e||e.k===this.zoomTransform.k&&e.x===this.zoomTransform.x&&e.y===this.zoomTransform.y||this.zoomCanvasInvokeZoomBehavior(e)}},{key:"zoomCanvasInvokeZoomBehavior",value:function(e,t){if(isFinite(e.x)&&isFinite(e.y)&&isFinite(e.k)){var n=ml.zoomIdentity.translate(e.x,e.y).scale(e.k);t?this.canvasSVG.call(this.zoom).transition().duration(t).call(this.zoom.transform,n):this.canvasSVG.call(this.zoom.transform,n)}}},{key:"setSavedZoom",value:function(e){var t=rl.get("canvasSavedZoomValues"),n=t?JSON.parse(t):{};nt(n,[this.canvasInfo.id,this.pipelineId],e),rl.set("canvasSavedZoomValues",JSON.stringify(n))}},{key:"getSavedZoom",value:function(){var e=rl.get("canvasSavedZoomValues");if(e){var t=JSON.parse(e);return pt(t,[this.canvasInfo.id,this.pipelineId])}return null}},{key:"zoomToFit",value:function(){var e=this.getZoomToFitPadding(),t=this.getCanvasDimensionsAdjustedForScale(1,e),n=this.getViewportDimensions();if(t){var i=n.width/t.width,o=n.height/t.height,a=Math.min(i,o,1),r=(n.width-t.width*a)/2,s=(n.height-t.height*a)/2;r-=a*t.left,s-=a*t.top,this.zoomingToFit=!0,this.zoomCanvasInvokeZoomBehavior({x:r,y:s,k:a}),this.zoomingToFit=!1}}},{key:"getZoomToFitPadding",value:function(){var e=this.canvasLayout.zoomToFitPadding;if(this.dispUtils.isDisplayingSubFlow()){var t=this.getMaxZoomToFitPaddingForConnections()+2*this.canvasLayout.supernodeBindingPortRadius;e=Math.max(e,t)}return e}},{key:"zoomTo",value:function(e){this.zoomCanvasInvokeZoomBehavior(e,500)}},{key:"getZoom",value:function(){return{x:this.zoomTransform.x,y:this.zoomTransform.y,k:this.zoomTransform.k}}},{key:"translateBy",value:function(e,t,n){var i=this.getZoomTransform(),o=ml.zoomIdentity.translate(i.x+e,i.y+t).scale(i.k);this.zoomCanvasInvokeZoomBehavior(o,n)}},{key:"zoomIn",value:function(){if(this.zoomTransform.k<this.maxScaleExtent){var e=Math.min(1.1*this.zoomTransform.k,this.maxScaleExtent);this.canvasSVG.call(this.zoom.scaleTo,e)}}},{key:"zoomOut",value:function(){if(this.zoomTransform.k>this.minScaleExtent){var e=Math.max(this.zoomTransform.k/1.1,this.minScaleExtent);this.canvasSVG.call(this.zoom.scaleTo,e)}}},{key:"getZoomToReveal",value:function(e,t,n){var i,o,a=this.getTransformedViewportDimensions(),r=this.getNodes(e),s=cl.getCanvasDimensions(r,[],[],0),l=this.convertCanvasDimensionsAdjustedForScaleWithPadding(s,1,10),c=parseInt(t,10),d=void 0===n?c:parseInt(n,10);if(l&&(Number.isNaN(c)||Number.isNaN(d)?(l.right>a.x+a.width&&(i=a.x+a.width-l.right),l.left<a.x&&(i=a.x-l.left),l.bottom>a.y+a.height&&(o=a.y+a.height-l.bottom),l.top<a.y&&(o=a.y-l.top)):(i=a.x+a.width*(c/100)-(l.left+l.width/2),o=a.y+a.height*(d/100)-(l.top+l.height/2)),void 0!==i||void 0!==o))return{x:this.zoomTransform.x+(i||0)*this.zoomTransform.k||0,y:this.zoomTransform.y+(o||0)*this.zoomTransform.k||0,k:this.zoomTransform.k};return null}},{key:"getTransformedViewportDimensions",value:function(){var e=this.getViewportDimensions();return this.getTransformedRect(e,0)}},{key:"getViewportDimensions",value:function(){var e={};if(this.dispUtils.isDisplayingSubFlowInPlace()){var t=this.getParentSupernodeSVGDimensions();e.width=t.width,e.height=t.height}else e=this.canvasSVG&&this.canvasSVG.node()?this.canvasSVG.node().getBoundingClientRect():{x:0,y:0,width:1100,height:640};return e}},{key:"zoomStart",value:function(e){if(this.logger.log("zoomStart - "+JSON.stringify(e.transform)),this.canvasController.closeTip(),this.canvasController.isContextMenuDisplayed()&&!this.dispUtils.isDisplayingSubFlowInPlace()&&(this.canvasController.closeContextMenu(),this.contextMenuClosedOnZoom=!0),this.zoomingToFit?this.regionSelect=!1:this.config.enableInteractionType===se&&e.sourceEvent&&1===e.sourceEvent.buttons||this.config.enableInteractionType===ce&&e.sourceEvent&&e.sourceEvent.shiftKey?this.regionSelect=!0:this.regionSelect=!1,this.regionSelect){this.regionStartTransformX=e.transform.x,this.regionStartTransformY=e.transform.y;var t=this.getTransformedMousePos(e);this.region={startX:t.x,startY:t.y,width:0,height:0}}var n=".d3-svg-background[data-pipeline-id='"+this.activePipeline.id+"']";this.regionSelect?this.canvasSVG.select(n).style("cursor","crosshair"):this.canvasSVG.select(n).style("cursor","grabbing"),this.zoomStartPoint={x:e.transform.x,y:e.transform.y,k:e.transform.k},this.previousD3Event={x:e.transform.x,y:e.transform.y,k:e.transform.k},this.zoomCanvasDimensions=cl.getCanvasDimensions(this.activePipeline.nodes,this.activePipeline.comments,this.activePipeline.links,this.canvasLayout.commentHighlightGap)}},{key:"zoomAction",value:function(e){this.logger.log("zoomAction - "+JSON.stringify(e.transform)),e.transform.k===this.zoomStartPoint.k?this.regionSelect?(this.addTempCursorOverlay("crosshair"),this.drawRegionSelector(e)):(this.addTempCursorOverlay("grabbing"),this.zoomCanvasBackground(e)):this.zoomCanvasBackground(e)}},{key:"zoomEnd",value:function(e){if(this.logger.log("zoomEnd - "+JSON.stringify(e.transform)),this.drawingNewLinkData&&(this.stopDrawingNewLink(),this.drawingNewLinkData=null),this.draggingLinkData&&(this.stopDraggingLink(),this.draggingLinkData=null),e.transform.k===this.zoomStartPoint.k&&!0===this.regionSelect){this.removeRegionSelector(),e.transform.x=this.regionStartTransformX,e.transform.y=this.regionStartTransformY;var t=this.getRegionDimensions(),n=t.startX,i=t.startY,o=t.width,a=t.height;this.isSelecting=!0,this.buildLinksArray();var r={x1:n,y1:i,x2:n+o,y2:i+a},s=cl.selectInRegion(r,this.activePipeline,this.config.enableLinkSelection!==de,this.config.enableLinkType,this.config.enableAssocLinkType);this.canvasController.setSelections(s,this.activePipeline.id),this.regionSelect=!1}else if(this.dispUtils.isDisplayingFullPage())if(this.canvasSVG.property("__zoom",this.zoomTransform),"Pipelineflow"===this.config.enableSaveZoom){var l={editType:"setPipelineZoom",editSource:"canvas",zoom:this.zoomTransform,pipelineId:this.activePipeline.id};this.canvasController.editActionHandler(l)}else"LocalStorage"===this.config.enableSaveZoom&&this.setSavedZoom(this.zoomTransform);this.resetCanvasCursor(),this.removeTempCursorOverlay()}},{key:"zoomCanvasBackground",value:function(e){if(this.regionSelect=!1,this.dispUtils.isDisplayingPrimaryFlowFullPage()){var t=this.getTransformIncrement(e);this.zoomTransform=this.zoomConstrainRegular(t,this.getViewportDimensions(),this.zoomCanvasDimensions)}else this.zoomTransform=ml.zoomIdentity.translate(e.transform.x,e.transform.y).scale(e.transform.k);this.canvasGrp.attr("transform",this.zoomTransform),this.config.enableBoundingRectangles&&this.displayBoundingRectangles(),"None"!==this.config.enableCanvasUnderlay&&this.dispUtils.isDisplayingPrimaryFlowFullPage()&&this.setCanvasUnderlaySize(),this.dispUtils.isDisplayingSubFlowFullPage()&&this.displayPortsForSubFlowFullPage()}},{key:"getTransformIncrement",value:function(e){var t=e.transform.x-this.previousD3Event.x,n=e.transform.y-this.previousD3Event.y,i={x:this.zoomTransform.x+t,y:this.zoomTransform.y+n,k:e.transform.k};return this.previousD3Event={x:e.transform.x,y:e.transform.y,k:e.transform.k},i}},{key:"zoomConstrainRegular",value:function(e,t,n){if(!n)return this.zoomTransform;var i=e.k,o=e.x,a=e.y,r=this.convertCanvasDimensionsAdjustedForScaleWithPadding(n,i,this.getZoomToFitPadding()),s=t.width-Math.min(.25*t.width,.25*r.width),l=-Math.max(r.width-.25*t.width,.75*r.width),c=t.height-Math.min(.25*t.height,.25*r.height),d=-Math.max(r.height-.25*t.height,.75*r.height);return o>-r.left+s?o=-r.left+s:o<-r.left+l&&(o=-r.left+l),a>-r.top+c?a=-r.top+c:a<-r.top+d&&(a=-r.top+d),ml.zoomIdentity.translate(o,a).scale(i)}},{key:"getCanvasDimensionsAdjustedForScale",value:function(e,t){var n=cl.getCanvasDimensions(this.activePipeline.nodes,this.activePipeline.comments,this.activePipeline.links,this.canvasLayout.commentHighlightGap);return this.convertCanvasDimensionsAdjustedForScaleWithPadding(n,e,t)}},{key:"convertCanvasDimensionsAdjustedForScaleWithPadding",value:function(e,t,n){var i=n||0;return e?{left:e.left*t-i,top:e.top*t-i,right:e.right*t+i,bottom:e.bottom*t+i,width:e.width*t+2*i,height:e.height*t+2*i}:null}},{key:"drawRegionSelector",value:function(e){var t=this.getTransformedMousePos(e);this.region.width=t.x-this.region.startX,this.region.height=t.y-this.region.startY,this.removeRegionSelector();var n=this.getRegionDimensions(),i=n.startX,o=n.startY,a=n.width,r=n.height;this.canvasGrp.append("rect").attr("width",a).attr("height",r).attr("x",i).attr("y",o).attr("class","d3-region-selector")}},{key:"removeRegionSelector",value:function(){this.canvasGrp.selectAll(".d3-region-selector").remove()}},{key:"getRegionDimensions",value:function(){var e=this.region.startX,t=this.region.startY,n=this.region.width,i=this.region.height;return n<0&&(n=Math.abs(n),e=this.region.startX-n),i<0&&(i=Math.abs(i),t=this.region.startY-i),{startX:e,startY:t,width:n,height:i}}},{key:"initializeResizeVariables",value:function(e){this.resizeObjInitialInfo={x_pos:e.x_pos,y_pos:e.y_pos,width:e.width,height:e.height},this.notSnappedXPos=e.x_pos,this.notSnappedYPos=e.y_pos,this.notSnappedWidth=e.width,this.notSnappedHeight=e.height}},{key:"getDragObjects",value:function(e){var t=this.getSelectedNodesAndComments();return this.config.enableDragWithoutSelect&&-1===t.findIndex((function(t){return t.id===e.id}))?[e]:t}},{key:"dragStart",value:function(e,t){if(this.logger.logStartTimer("dragStart"),this.closeContextMenuIfOpen(),this.commentSizing)this.resizeObj=this.getComment(t.id),this.initializeResizeVariables(this.resizeObj);else if(this.nodeSizing)this.resizeObj=this.getNode(t.id),this.initializeResizeVariables(this.resizeObj);else if(this.dragging=!0,this.dragOffsetX=0,this.dragOffsetY=0,this.dragRunningX=0,this.dragRunningY=0,this.dragObjects=this.getDragObjects(t),this.dragObjects&&this.dragObjects.length>0&&(this.dragStartX=this.dragObjects[0].x_pos,this.dragStartY=this.dragObjects[0].y_pos),this.isExistingNodeInsertableIntoLink()&&this.setNodeTranslucentState(this.dragObjects[0].id,!0),this.isExistingNodeAttachableToDetachedLinks()){var n=this.getTransformedMousePos(e);this.dragPointerOffsetInNode={x:n.x-this.dragObjects[0].x_pos,y:n.y-this.dragObjects[0].y_pos},this.setNodeTranslucentState(this.dragObjects[0].id,!0)}this.logger.logEndTimer("dragStart",!0)}},{key:"dragMove",value:function(e){if(this.logger.logStartTimer("dragMove"),this.commentSizing)this.resizeComment(e);else if(this.nodeSizing)this.resizeNode(e);else{if(this.dragOffsetX+=e.dx,this.dragOffsetY+=e.dy,this.dispUtils.isDisplayingSubFlowInPlace()&&(this.dragOffsetX>1e3||this.dragOffsetX<-1e3||this.dragOffsetY>1e3||this.dragOffsetY<-1e3))this.dragOffsetX-=e.dx,this.dragOffsetY-=e.dy;else{var t={x:0,y:0};if(this.config.enableSnapToGridType===ie){var n=this.snapToGridDraggedNode();t={x:n.x-this.dragObjects[0].x_pos,y:n.y-this.dragObjects[0].y_pos}}else t={x:e.dx,y:e.dy};this.dragRunningX+=t.x,this.dragRunningY+=t.y,this.dragObjects.forEach((function(e){e.x_pos+=t.x,e.y_pos+=t.y})),this.config.enableLinkSelection===ae&&this.getSelectedLinks().forEach((function(e){e.srcPos&&(e.srcPos.x_pos+=t.x,e.srcPos.y_pos+=t.y),e.trgPos&&(e.trgPos.x_pos+=t.x,e.trgPos.y_pos+=t.y)}))}if(this.displayCanvas(),this.isExistingNodeInsertableIntoLink()){var i=this.getLinkAtMousePos(e.sourceEvent.clientX,e.sourceEvent.clientY);(!i||this.isLinkFullyAttached(i)&&this.dragObjects[0].id!==i.srcNodeId&&this.dragObjects[0].id!==i.trgNodeId)&&this.setInsertNodeIntoLinkHighlighting(i)}if(this.isExistingNodeAttachableToDetachedLinks()){var o=this.getTransformedMousePos(e),a=this.dragObjects[0],r={x1:o.x-this.dragPointerOffsetInNode.x,y1:o.y-this.dragPointerOffsetInNode.y,x2:o.x-this.dragPointerOffsetInNode.x+a.width,y2:o.y-this.dragPointerOffsetInNode.y+a.height},s=this.getAttachableLinksForNodeAtPos(a,r);this.setDetachedLinkHighlighting(s)}}this.logger.logEndTimer("dragMove",!0)}},{key:"dragEnd",value:function(e,t){if(this.logger.logStartTimer("dragEnd"),this.removeTempCursorOverlay(),this.commentSizing)this.endCommentSizing();else if(this.nodeSizing)this.endNodeSizing();else if(this.dragging){if(this.dragging=!1,0===this.dragOffsetX&&0===this.dragOffsetY&&this.config.enableDragWithoutSelect)this.selectObjectSourceEvent(e,t);else if(0!==this.dragRunningX||0!==this.dragRunningY){var n=null;if(this.config.enableSnapToGridType===oe){var i=this.snapToGridDraggedNode();n={x:i.x-this.dragStartX,y:i.y-this.dragStartY}}else n={x:this.dragRunningX,y:this.dragRunningY};this.isExistingNodeInsertableIntoLink()&&this.dragOverLink?this.canvasController.editActionHandler({editType:"insertNodeIntoLink",editSource:"canvas",node:this.dragObjects[0],link:this.dragOverLink,offsetX:n.x,offsetY:n.y,pipelineId:this.activePipeline.id}):this.isExistingNodeAttachableToDetachedLinks()&&this.dragOverDetachedLinks.length>0?this.canvasController.editActionHandler({editType:"attachNodeToLinks",editSource:"canvas",node:this.dragObjects[0],detachedLinks:this.dragOverDetachedLinks,offsetX:n.x,offsetY:n.y,pipelineId:this.activePipeline.id}):this.canvasController.editActionHandler({editType:"moveObjects",editSource:"canvas",nodes:this.dragObjects.map((function(e){return e.id})),links:this.getSelectedLinks().filter((function(e){return e.srcPos||e.trgPos})),offsetX:n.x,offsetY:n.y,pipelineId:this.activePipeline.id})}this.unsetNodeTranslucentState(),this.unsetInsertNodeIntoLinkHighlighting(),this.unsetDetachedLinkHighlighting()}this.logger.logEndTimer("dragEnd",!0)}},{key:"dragStartLinkHandle",value:function(e,t){this.logger.logStartTimer("dragStartLinkHandle"),this.closeContextMenuIfOpen(),this.draggingLinkHandle=!0;var n=ml.select(e.sourceEvent.currentTarget),i=this.getLink(t.id),o=ht(i),a=this.getLinkGroupSelectionById(t.id);if(this.draggingLinkData={lineInfo:t,link:i,oldLink:o,linkGrpSelection:ml.select(a)},n.attr("class").includes("d3-link-handle-end")?this.draggingLinkData.endBeingDragged="end":n.attr("class").includes("d3-link-handle-start")&&(this.draggingLinkData.endBeingDragged="start"),this.config.enableHighlightUnavailableNodes)if("end"===this.draggingLinkData.endBeingDragged){var r=this.activePipeline.links.filter((function(e){return e.id!==i.id}));this.setUnavailableTargetNodesHighlighting(this.getNode(this.draggingLinkData.link.srcNodeId),this.draggingLinkData.link.srcNodePortId,r)}else if("start"===this.draggingLinkData.endBeingDragged){var s=this.activePipeline.links.filter((function(e){return e.id!==i.id}));this.setUnavailableSourceNodesHighlighting(this.getNode(this.draggingLinkData.oldLink.trgNodeId),this.draggingLinkData.link.trgNodePortId,s)}this.dragLinkHandle(e),this.logger.logEndTimer("dragStartLinkHandle",!0)}},{key:"dragMoveLinkHandle",value:function(e){this.logger.logStartTimer("dragMoveLinkHandle"),this.dragLinkHandle(e),this.logger.logEndTimer("dragMoveLinkHandle",!0)}},{key:"dragEndLinkHandle",value:function(e){this.logger.logStartTimer("dragEndLinkHandle"),this.completeDraggedLink(e),this.draggingLinkHandle=!1,this.logger.logEndTimer("dragEndLinkHandle",!0)}},{key:"setNodeTranslucentState",value:function(e,t){this.getNodeGroupSelectionById(e).classed("d3-node-group-translucent",t)}},{key:"unsetNodeTranslucentState",value:function(){this.dragObjects&&this.dragObjects.length>0&&this.setNodeTranslucentState(this.dragObjects[0].id,!1)}},{key:"snapToGridDraggedNode",value:function(){var e=this.dragStartX+this.dragOffsetX,t=this.dragStartY+this.dragOffsetY;return this.snapToGridPosition({x:e,y:t})}},{key:"snapToGridPosition",value:function(e){return{x:cl.snapToGrid(e.x,this.canvasLayout.snapToGridXPx),y:cl.snapToGrid(e.y,this.canvasLayout.snapToGridYPx)}}},{key:"displayNodes",value:function(){this.logger.logStartTimer("displayNodes "+this.getFlags()),this.setPortPositionsAllNodes(),this.commentSizing||(this.dragging&&!this.nodeSizing&&!this.commentSizing||this.movingBindingNodes?this.displayMovedNodes():this.selecting||this.regionSelect?this.displayNodesSelectionStatus():this.displayAllNodes()),this.logger.logEndTimer("displayNodes "+this.getFlags())}},{key:"displayMovedNodes",value:function(){var e=this,t=this.getAllNodeGroupsSelection();t.datum((function(t){return e.getNode(t.id)})).attr("transform",(function(e){return"translate(".concat(e.x_pos,", ").concat(e.y_pos,")")})),this.dispUtils.isDisplayingSubFlow()&&t.each((function(t,n,i){t.isSupernodeInputBinding&&e.updatePortRadiusAndPos(i[n],t,"d3-node-port-output-main"),t.isSupernodeOutputBinding&&(e.updatePortRadiusAndPos(i[n],t,"d3-node-port-input-main"),e.updatePortArrowPath(i[n],"d3-node-port-input-arrow"))}))}},{key:"displayNodesSelectionStatus",value:function(e){var t=this;this.getAllNodeGroupsSelection().selectChildren(".d3-node-selection-highlight").attr("data-selected",(function(e){return t.objectModel.isSelected(e.id,t.activePipeline.id)?"yes":"no"})),this.superRenderers.forEach((function(e){e.selecting=!0,e.displayNodes(),e.selecting=!1}))}},{key:"displayAllNodes",value:function(){var e=this;this.getAllNodeGroupsSelection().data(this.activePipeline.nodes,(function(e){return e.id})).join((function(t){return e.createNodes(t)})).attr("transform",(function(e){return"translate(".concat(e.x_pos,", ").concat(e.y_pos,")")})).attr("class",(function(t){return e.getNodeGroupClass(t)})).attr("style",(function(t){return e.getNodeGrpStyle(t)})).call((function(t){return e.updateNodes(t)}))}},{key:"createNodes",value:function(e){var t=this,n=e.append("g").attr("data-id",(function(e){return t.getId("node_grp",e.id)})).call(this.attachNodeGroupListeners.bind(this));return this.config.enableDragToMoveSizeNodesComments&&n.call(this.drag),n.filter((function(e){return t.nodeUtils.isSupernode(e)})).append("path").attr("class","d3-node-sizing").call(this.attachNodeSizingListeners.bind(this)),n.filter((function(e){return!cl.isSuperBindingNode(e)})).append("path").attr("class","d3-node-selection-highlight"),n.filter((function(e){return!cl.isSuperBindingNode(e)})).append("path").attr("class","d3-node-body-outline"),n.filter((function(e){return!cl.isSuperBindingNode(e)&&e.layout.imageDisplay})).each((function(e,n,i){var o=t.getNodeImage(e),a=t.getImageType(o);ml.select(i[n]).append(a).attr("class",(function(e){return t.nodeUtils.getNodeImageClass(e)}))})),n.filter((function(e){return!cl.isSuperBindingNode(e)})).append("foreignObject").attr("class","d3-foreign-object").call(this.attachNodeLabelListeners.bind(this)).append("xhtml:div").append("xhtml:span").call(this.attachNodeLabelSpanListeners.bind(this)),n}},{key:"updateNodes",value:function(e){var t=this;e.selectChildren(".d3-node-sizing").datum((function(e){return t.getNode(e.id)})).attr("d",(function(e){return t.getNodeShapePathSizing(e)})),e.selectChildren(".d3-node-selection-highlight").datum((function(e){return t.getNode(e.id)})).attr("d",(function(e){return t.getNodeSelectionOutline(e)})).attr("data-selected",(function(e){return t.objectModel.isSelected(e.id,t.activePipeline.id)?"yes":"no"})).attr("style",(function(e){return t.getNodeSelectionOutlineStyle(e,"default")})),e.selectChildren(".d3-node-body-outline").datum((function(e){return t.getNode(e.id)})).attr("d",(function(e){return t.getNodeShapePath(e)})).attr("style",(function(e){return t.getNodeBodyStyle(e,"default")})),e.selectChildren(".d3-node-image").datum((function(e){return t.getNode(e.id)})).each((function(e,n,i){return t.setNodeImageContent(i[n],e)})).attr("x",(function(e){return t.nodeUtils.getNodeImagePosX(e)})).attr("y",(function(e){return t.nodeUtils.getNodeImagePosY(e)})).attr("width",(function(e){return t.nodeUtils.getNodeImageWidth(e)})).attr("height",(function(e){return t.nodeUtils.getNodeImageHeight(e)})).attr("style",(function(e){return t.getNodeImageStyle(e,"default")})),e.selectChildren(".d3-foreign-object").datum((function(e){return t.getNode(e.id)})).attr("x",(function(e){return t.nodeUtils.getNodeLabelPosX(e)})).attr("y",(function(e){return t.nodeUtils.getNodeLabelPosY(e)})).attr("width",(function(e){return t.nodeUtils.getNodeLabelWidth(e)})).attr("height",(function(e){return t.nodeUtils.getNodeLabelHeight(e)})).attr("class",(function(e){return t.nodeUtils.getNodeLabelForeignClass(e)})).select("div").attr("class",(function(e){return t.nodeUtils.getNodeLabelClass(e)})).attr("style",(function(e){return t.getNodeLabelStyle(e,"default")})).select("span").html((function(e){return e.label})),e.selectChildren(".d3-node-ellipsis-group").attr("transform",(function(e){return t.nodeUtils.getNodeEllipsisTranslate(e)})),e.selectChildren(".d3-node-super-expand-icon-group").attr("transform",(function(e){return t.nodeUtils.getNodeExpansionIconTranslate(e)})),e.each((function(e,n,i){var o=ml.select(i[n]);if(t.displayPorts(o,e),t.nodeUtils.isSupernode(e)&&t.displaySupernodeContents(e,ml.select(i[n])),!cl.isSuperBindingNode(e)){t.addErrorMarker(e,o);var a=cl.getCombinedDecorations(e.layout.decorations,e.decorations);t.displayDecorations(e,ue,o,a)}}))}},{key:"displaySupernodeContents",value:function(e,t){var n=this.getRendererForSupernode(e);this.nodeUtils.isExpanded(e)?n?n.setCanvasInfoRenderer(this.canvasInfo):(n=this.createSupernodeRenderer(e,t),this.superRenderers.push(n)):n&&n.hideCanvas(e)}},{key:"displayPorts",value:function(e,t){t.layout.inputPortDisplay&&Array.isArray(t.inputs)&&this.displayInputPorts(e,t),t.layout.outputPortDisplay&&Array.isArray(t.outputs)&&this.displayOutputPorts(e,t)}},{key:"displayInputPorts",value:function(e,t){var n=this,i="."+this.getNodeInputPortClassName();e.selectChildren(i).data(t.inputs,(function(e){return e.id})).join((function(e){return n.createInputPorts(e,t)})).attr("connected",(function(e){return e.isConnected?"yes":"no"})).attr("class",(function(e){return n.getNodeInputPortClassName()+(e.class_name?" "+e.class_name:"")})).call((function(e){return n.updateInputPorts(e,t)}))}},{key:"createInputPorts",value:function(e,t){var n=e.append("g").attr("data-port-id",(function(e){return e.id})).attr("isSupernodeBinding",cl.isSuperBindingNode(t)?"yes":"no").call(this.attachInputPortListeners.bind(this),t);return n.append(t.layout.inputPortObject).attr("class","d3-node-port-input-main"),this.config.enableAssocLinkCreation||"circle"!==t.layout.inputPortObject||cl.isSuperBindingNode(t)||n.append("path").attr("class","d3-node-port-input-arrow"),n}},{key:"updateInputPorts",value:function(e,t){var n=this;e.selectChildren(".d3-node-port-input-main").datum((function(e){return t.inputs.find((function(t){return e.id===t.id}))})).each((function(e,i,o){var a=ml.select(o[i]);t.layout.inputPortObject===pe?a.attr("xlink:href",t.layout.inputPortImage).attr("x",e.cx-t.layout.inputPortWidth/2).attr("y",e.cy-t.layout.inputPortHeight/2).attr("width",t.layout.inputPortWidth).attr("height",t.layout.inputPortHeight):a.attr("r",n.getPortRadius(t)).attr("cx",e.cx).attr("cy",e.cy)})),e.selectChildren(".d3-node-port-input-arrow").datum((function(e){return t.inputs.find((function(t){return e.id===t.id}))})).each((function(e,i,o){var a=ml.select(o[i]);t.layout.inputPortObject!==pe&&a.attr("d",n.getPortArrowPath(e)).attr("transform",n.getPortArrowPathTransform(e))}))}},{key:"displayOutputPorts",value:function(e,t){var n=this,i="."+this.getNodeOutputPortClassName(),o=this.config.enableSingleOutputPortDisplay&&t.outputs.length>1?[t.outputs[t.outputs.length-1]]:t.outputs;e.selectChildren(i).data(o,(function(e){return e.id})).join((function(e){return n.createOutputPorts(e,t)})).attr("connected",(function(e){return e.isConnected?"yes":"no"})).attr("class",(function(e){return n.getNodeOutputPortClassName()+(e.class_name?" "+e.class_name:"")})).call((function(e){return n.updateOutputPorts(e,t)}))}},{key:"createOutputPorts",value:function(e,t){var n=e.append("g").attr("data-port-id",(function(e){return e.id})).attr("isSupernodeBinding",cl.isSuperBindingNode(t)?"yes":"no").call(this.attachOutputPortListeners.bind(this),t);return n.append(t.layout.outputPortObject).attr("class","d3-node-port-output-main"),n}},{key:"updateOutputPorts",value:function(e,t){var n=this;e.selectChildren(".d3-node-port-output-main").datum((function(e){return t.outputs.find((function(t){return e.id===t.id}))})).each((function(e,i,o){var a=ml.select(o[i]);t.layout.outputPortObject===pe?a.attr("xlink:href",t.layout.outputPortImage).attr("x",e.cx-t.layout.outputPortWidth/2).attr("y",e.cy-t.layout.outputPortHeight/2).attr("width",t.layout.outputPortWidth).attr("height",t.layout.outputPortHeight):a.attr("r",n.getPortRadius(t)).attr("cx",e.cx).attr("cy",e.cy)}))}},{key:"attachNodeGroupListeners",value:function(e){var t=this;e.on("mouseenter",(function(e,n){var i=ml.select(e.currentTarget);t.raiseNodeToTop(i),t.setNodeStyles(n,"hover",i),t.addDynamicNodeIcons(n,i),t.canOpenTip(D)&&(t.canvasController.closeTip(),t.canvasController.openTip({id:t.getId("node_tip",n.id),type:D,targetObj:e.currentTarget,pipelineId:t.activePipeline.id,node:n}))})).on("mouseleave",(function(e,n){var i=ml.select(e.currentTarget);t.setNodeStyles(n,"default",i),t.removeDynamicNodeIcons(n,i),t.canvasController.closeTip()})).on("mousedown",(function(e,n){t.logger.log("Node Group - mouse down"),t.config.enableDragWithoutSelect||t.selectObjectD3Event(e,n),t.logger.log("Node Group - finished mouse down")})).on("mousemove",(function(e,t){})).on("mouseup",(function(e,n){e.stopPropagation(),t.logger.log("Node Group - mouse up"),t.drawingNewLinkData&&t.completeNewLink(e),t.draggingLinkData&&t.completeDraggedLink(e,n)})).on("click",(function(e,n){t.logger.log("Node Group - click"),e.stopPropagation()})).on("dblclick",(function(e,n){t.logger.log("Node Group - double click"),cl.stopPropagationAndPreventDefault(e);var i=t.objectModel.getSelectedObjectIds();t.canvasController.clickActionHandler({clickType:"DOUBLE_CLICK",objectType:"node",id:n.id,selectedObjectIds:i,pipelineId:t.activePipeline.id})})).on("contextmenu",(function(e,n){t.logger.log("Node Group - context menu"),cl.stopPropagationAndPreventDefault(e),cl.isSuperBindingNode(n)||(t.config.enableDragWithoutSelect&&t.selectObjectD3Event(e,n),t.openContextMenu(e,"node",n))}))}},{key:"attachNodeSizingListeners",value:function(e){var t=this;e.on("mousedown",(function(e,n){t.nodeUtils.isExpandedSupernode(n)&&(t.nodeSizing=!0,t.addTempCursorOverlay(t.nodeSizingCursor))})).on("mousemove mouseenter",(function(e,n){if(t.config.enableDragToMoveSizeNodesComments&&t.nodeUtils.isExpandedSupernode(n)&&!t.isRegionSelectOrSizingInProgress()){var i="pointer";t.isPointerCloseToBodyEdge(e,n)||(t.nodeSizingDirection=t.getSizingDirection(e,n,n.layout.nodeCornerResizeArea),t.nodeSizingCursor=t.getCursorBasedOnDirection(t.nodeSizingDirection),i=t.nodeSizingCursor),ml.select(e.currentTarget).style("cursor",i)}}))}},{key:"attachNodeLabelListeners",value:function(e){var t=this;e.on("mouseenter",(function(e,n){var i=ml.select(e.currentTarget);if(t.config.enableDisplayFullLabelOnHover&&!t.nodeUtils.isExpandedSupernode(n)){var o=i.selectAll("span");i.attr("x",t.nodeUtils.getNodeLabelHoverPosX(n)).attr("width",t.nodeUtils.getNodeLabelHoverWidth(n)).attr("height",t.nodeUtils.getNodeLabelHoverHeight(n,o.node(),t.zoomTransform.k)),o.classed("d3-label-full",!0)}})).on("mouseleave",(function(e,n){var i=ml.select(e.currentTarget);t.config.enableDisplayFullLabelOnHover&&!t.nodeUtils.isExpandedSupernode(n)&&(i.attr("x",t.nodeUtils.getNodeLabelPosX(n)).attr("width",t.nodeUtils.getNodeLabelWidth(n)).attr("height",t.nodeUtils.getNodeLabelHeight(n)),i.selectAll("span").classed("d3-label-full",!1))})).on("dblclick",(function(e,n){t.logger.log("Node Label - double click"),n.layout.labelEditable&&(cl.stopPropagationAndPreventDefault(e),t.displayNodeLabelTextArea(n,e.currentTarget.parentNode))}))}},{key:"attachNodeLabelSpanListeners",value:function(e){var t=this;e.on("mouseenter",(function(e,n){n.layout.labelEditable&&t.displayNodeLabelEditIcon(e.currentTarget,n)})).on("mouseleave",(function(e,n){n.layout.labelEditable&&(t.hideEditIconPending=setTimeout(t.hideEditIcon.bind(t),500,e.currentTarget,n))}))}},{key:"attachInputPortListeners",value:function(e,t){var n=this;e.on("mousedown",(function(e,i){if(n.config.enableAssocLinkCreation&&0===e.button){cl.stopPropagationAndPreventDefault(e);var o=n.getNode(t.id);n.drawingNewLinkData={srcObjId:t.id,srcPortId:i.id,action:n.config.enableAssocLinkCreation?U:F,srcNode:o,startPos:{x:o.x_pos+i.cx,y:o.y_pos+i.cy},portType:"input",portObject:t.layout.inputPortObject,portImage:t.layout.inputPortImage,portWidth:t.layout.inputPortWidth,portHeight:t.layout.inputPortHeight,portRadius:n.getPortRadius(o),minInitialLine:o.layout.minInitialLine,guideObject:t.layout.inputPortGuideObject,guideImage:t.layout.inputPortGuideImage,linkArray:[]},n.drawNewLink(e)}})).on("mouseenter",(function(e,i){cl.stopPropagationAndPreventDefault(e),n.canOpenTip(O)&&(n.canvasController.closeTip(),n.canvasController.openTip({id:n.getId("node_port_tip",i.id),type:O,targetObj:e.currentTarget,pipelineId:n.activePipeline.id,node:t,port:i}))})).on("mouseleave",(function(){n.canvasController.closeTip()})).on("contextmenu",(function(e,i){n.logger.log("Input Port Circle - context menu"),cl.stopPropagationAndPreventDefault(e),n.config.enableDragWithoutSelect&&n.selectObjectD3Event(e,t),n.openContextMenu(e,"input_port",t,i)}))}},{key:"attachOutputPortListeners",value:function(e,t){var n=this;e.on("mousedown",(function(e,i){if(0===e.button){cl.stopPropagationAndPreventDefault(e);var o=n.getNode(t.id);cl.isSrcCardinalityAtMax(i.id,o,n.activePipeline.links)||(n.drawingNewLinkData={srcObjId:t.id,srcPortId:i.id,action:n.config.enableAssocLinkCreation?U:F,srcNode:o,startPos:{x:o.x_pos+i.cx,y:o.y_pos+i.cy},portType:"output",portObject:t.layout.outputPortObject,portImage:t.layout.outputPortImage,portWidth:t.layout.outputPortWidth,portHeight:t.layout.outputPortHeight,portRadius:n.getPortRadius(o),minInitialLine:o.layout.minInitialLine,guideObject:t.layout.outputPortGuideObject,guideImage:t.layout.outputPortGuideImage,linkArray:[]},n.config.enableHighlightUnavailableNodes&&n.setUnavailableTargetNodesHighlighting(o,i.id,n.activePipeline.links),n.drawNewLink(e))}})).on("mouseenter",(function(e,i){cl.stopPropagationAndPreventDefault(e),n.canOpenTip(O)&&(n.canvasController.closeTip(),n.canvasController.openTip({id:n.getId("node_port_tip",i.id),type:O,targetObj:e.currentTarget,pipelineId:n.activePipeline.id,node:t,port:i}))})).on("mouseleave",(function(){n.canvasController.closeTip()})).on("contextmenu",(function(e,i){n.logger.log("Output Port Circle - context menu"),cl.stopPropagationAndPreventDefault(e),n.config.enableDragWithoutSelect&&n.selectObjectD3Event(e,t),n.openContextMenu(e,"output_port",t,i)}))}},{key:"setUnavailableTargetNodesHighlighting",value:function(e,t,n){this.getAllNodeGroupsSelection().filter((function(i){return!cl.isTrgNodeAvailable(i,e,t,n)})).classed("d3-node-unavailable",!0)}},{key:"setUnavailableSourceNodesHighlighting",value:function(e,t,n){this.getAllNodeGroupsSelection().filter((function(i){return!cl.isSrcNodeAvailable(i,e,t,n)})).classed("d3-node-unavailable",!0)}},{key:"unsetUnavailableNodesHighlighting",value:function(){this.getAllNodeGroupsSelection().classed("d3-node-unavailable",!1)}},{key:"displayNodeLabelEditIcon",value:function(e,t){var n=this,i=e.parentElement.parentElement.parentElement,o=ml.select(i),a=this.nodeUtils.getNodeLabelEditIconTranslate(t,e,this.zoomTransform.k,this.config.enableDisplayFullLabelOnHover);this.displayEditIcon(e,o,a,(function(e,t){return n.displayNodeLabelTextArea(t,e.currentTarget.parentNode)}))}},{key:"displayDecLabelEditIcon",value:function(e,t,n,i){var o=this,a=e.parentElement.parentElement.parentElement,r=ml.select(a),s=this.decUtils.getDecLabelEditIconTranslate(t,n,i,e,this.zoomTransform.k);this.displayEditIcon(e,r,s,(function(e,a){return o.displayDecLabelTextArea(t,n,i,e.currentTarget.parentNode)}))}},{key:"displayEditIcon",value:function(e,t,n,i){var o=this,a=t.append("g").attr("class","d3-label-edit-icon-group").attr("transform",n).on("mouseenter",(function(e,t){o.mouseOverLabelEditIcon=!0})).on("mouseleave",(function(e,t){o.mouseOverLabelEditIcon=!1,o.hideEditIcon(this)})).on("click",(function(e,t){i(e,t),o.mouseOverLabelEditIcon=!1,o.hideEditIcon(this)}));a.append("rect").attr("class","d3-label-edit-icon-background1").attr("width",29).attr("height",24).attr("x",0).attr("y",-4),a.append("rect").attr("class","d3-label-edit-icon-background2").attr("width",24).attr("height",24).attr("x",5).attr("y",-4),a.append("svg").attr("class","d3-node-edit-label-icon").html(he).attr("width",16).attr("height",16).attr("x",9).attr("y",0)}},{key:"hideEditIcon",value:function(e){if(!this.mouseOverLabelEditIcon){var t=e.parentElement.parentElement.parentElement;ml.select(t).selectAll(".d3-label-edit-icon-group").remove()}}},{key:"selectObjectD3Event",value:function(e,t){this.selectObject(t,e.type,e.shiftKey,cl.isCmndCtrlPressed(e))}},{key:"selectObjectSourceEvent",value:function(e,t){this.selectObject(t,e.type,e.sourceEvent.shiftKey,cl.isCmndCtrlPressed(e.sourceEvent))}},{key:"selectObject",value:function(e,t,n,i){this.selecting=!0,this.objectModel.isSelected(e.id,this.activePipeline.id)?i&&this.objectModel.toggleSelection(e.id,i,this.activePipeline.id):n?this.objectModel.selectSubGraph(e.id,this.activePipeline.id):this.objectModel.toggleSelection(e.id,i,this.activePipeline.id),this.selecting=!1;var o=this.getObjectTypeName(e);"node"!==o&&"link"!==o||(this.canvasController.clickActionHandler({clickType:"contextmenu"===t||this.ellipsisClicked?"SINGLE_CLICK_CONTEXTMENU":"SINGLE_CLICK",objectType:o,id:e.id,selectedObjectIds:this.objectModel.getSelectedObjectIds(),pipelineId:this.activePipeline.id}),this.ellipsisClicked=!1)}},{key:"getObjectTypeName",value:function(e){return this.getComment(e.id)?"comment":this.getNode(e.id)?"node":"link"}},{key:"displayDecorations",value:function(e,t,n,i){var o=this,a=this,r=i||[],s="d3-".concat(t,"-dec-group"),l="."+s;n.selectChildren(l).data(r,(function(e){return e.id})).join((function(e){return o.createDecorations(e,t,s)})).attr("transform",(function(n){return o.decUtils.getDecTransform(n,e,t)})).on("mousedown",(function(t,n){return n.hotspot?a.callDecoratorCallback(t,e,n):null})).each((function(n,i,a){return o.updateDecoration(n,ml.select(a[i]),t,e)}))}},{key:"createDecorations",value:function(e,t,n){var i=this;return e.append("g").attr("data-id",(function(e){return i.getId("".concat(t,"_dec_group"),e.id)})).attr("class",n).call(this.attachDecGroupListeners.bind(this))}},{key:"updateDecoration",value:function(e,t,n,i){this.updateDecOutlines(e,t,n,i),this.updateDecPaths(e,t,n),this.updateDecImages(e,t,n,i),this.updateDecLabels(e,t,n,i)}},{key:"updateDecOutlines",value:function(e,t,n,i){var o=t.selectChild("rect");e.label||e.path||!1===e.outline?o.remove():(o=o.empty()?t.append("rect"):o).attr("class",this.decUtils.getDecClass(e,"d3-".concat(n,"-dec-outline"))).attr("x",0).attr("y",0).attr("width",this.decUtils.getDecWidth(e,i,n)).attr("height",this.decUtils.getDecHeight(e,i,n)).lower()}},{key:"updateDecPaths",value:function(e,t,n){var i=t.selectChild("path");e.path?(i=i.empty()?t.append("path"):i).attr("class",this.decUtils.getDecClass(e,"d3-".concat(n,"-dec-path"))).attr("x",0).attr("y",0).attr("d",e.path):i.remove()}},{key:"updateDecImages",value:function(e,t,n,i){var o=this,a=t.selectChild("g");if(e.image){var r=this.getImageType(e.image);(a=a.empty()?t.append("g").append(r):a.select(r)).attr("class",this.decUtils.getDecClass(e,"d3-".concat(n,"-dec-image"))).attr("x",this.decUtils.getDecPadding(e,i,n)).attr("y",this.decUtils.getDecPadding(e,i,n)).attr("width",this.decUtils.getDecWidth(e,i,n)-2*this.decUtils.getDecPadding(e,i,n)).attr("height",this.decUtils.getDecHeight(e,i,n)-2*this.decUtils.getDecPadding(e,i,n)).each((function(){return o.setImageContent(a,e.image)}))}else a.remove()}},{key:"updateDecLabels",value:function(e,t,n,i){var o=t.selectChild("foreignObject");e.label?(o.empty()&&(o=t.append("foreignObject").attr("class",this.decUtils.getDecLabelForeignClass(e)).attr("x",0).attr("y",0).call(this.attachDecLabelListeners.bind(this,i,n))).append("xhtml:div").append("xhtml:span").call(this.attachDecLabelSpanListeners.bind(this,i,n)),o.attr("width",this.decUtils.getDecLabelWidth(e,i,n)).attr("height",this.decUtils.getDecLabelHeight(e,i,n)).select("div").attr("class",this.decUtils.getDecLabelClass(e,n)).select("span").html(e.label)):o.remove()}},{key:"attachDecLabelListeners",value:function(e,t,n){var i=this;n.on("dblclick",(function(n,o){i.logger.log("Decoration Label - double click"),o.label_editable&&(cl.stopPropagationAndPreventDefault(n),i.displayDecLabelTextArea(o,e,t,n.currentTarget.parentNode))}))}},{key:"attachDecLabelSpanListeners",value:function(e,t,n){var i=this;n.on("mouseenter",(function(n,o){o.label_editable&&i.displayDecLabelEditIcon(n.currentTarget,o,e,t)})).on("mouseleave",(function(e,t){t.label_editable&&(i.hideEditIconPending=setTimeout(i.hideEditIcon.bind(i),500,e.currentTarget,t))}))}},{key:"attachDecGroupListeners",value:function(e){var t=this;e.on("mouseenter",(function(e,n){t.canOpenTip(E)&&(t.canvasController.closeTip(),t.canvasController.openTip({id:t.getId("dec_tip",n.id),type:E,targetObj:e.currentTarget,pipelineId:t.activePipeline.id,decoration:n}))})).on("mouseleave",(function(e,n){t.canvasController.closeTip()}))}},{key:"addErrorMarker",value:function(e,t){var n=this,i=t.selectChildren(".node-error-marker");e.messages&&e.messages.length>0?(i.empty()&&t.append("svg").attr("class","node-error-marker"),t.selectChildren(".node-error-marker").attr("class",(function(){return"node-error-marker "+n.nodeUtils.getErrorMarkerClass(e.messages)})).html(this.nodeUtils.getErrorMarkerIcon(e)).attr("width",this.nodeUtils.getNodeErrorWidth(e)).attr("height",this.nodeUtils.getNodeErrorHeight(e)).attr("x",this.nodeUtils.getNodeErrorPosX(e)).attr("y",this.nodeUtils.getNodeErrorPosY(e))):i.empty()||i.remove()}},{key:"getNodeInputPortClassName",value:function(){return this.config.enableAssocLinkCreation?"d3-node-port-input-assoc":"d3-node-port-input"}},{key:"getNodeOutputPortClassName",value:function(){return this.config.enableAssocLinkCreation?"d3-node-port-output-assoc":"d3-node-port-output"}},{key:"setNodeImageContent",value:function(e,t){var n=this.getNodeImage(t),i=ml.select(e);this.setImageContent(i,n)}},{key:"setImageContent",value:function(e,t){if(t!==e.attr("data-image")){var n=this.getImageType(t);e.attr("data-image",t),"svg"===n?(e.selectChild("svg").remove(),ml.svg(t,{cache:"force-cache"}).then((function(t){e.node().append(t.documentElement)}))):e.attr("xlink:href",t)}}},{key:"getNodeImage",value:function(e){if(!e.image)return null;if(e.image===P){if(this.nodeUtils.isSupernode(e))return cn}else if(e.image===I&&this.nodeUtils.isSupernode(e))return dn;return e.image}},{key:"getImageType",value:function(e){return e&&e.endsWith(".svg")?"svg":"image"}},{key:"setNodeStyles",value:function(e,t,n){this.setNodeBodyStyles(e,t,n),this.setNodeSelectionOutlineStyles(e,t,n),this.setNodeImageStyles(e,t,n),this.setNodeLabelStyles(e,t,n)}},{key:"setNodeBodyStyles",value:function(e,t,n){var i=this.getNodeBodyStyle(e,t);n.selectChildren(".d3-node-body-outline").attr("style",i)}},{key:"setNodeSelectionOutlineStyles",value:function(e,t,n){var i=this.getNodeSelectionOutlineStyle(e,t);n.selectChildren(".d3-node-selection-highlight").attr("style",i)}},{key:"setNodeImageStyles",value:function(e,t,n){var i=this.getNodeImageStyle(e,t);n.selectChildren(".d3-node-image").attr("style",i)}},{key:"setNodeLabelStyles",value:function(e,t,n){var i=this.getNodeLabelStyle(e,t);n.selectChildren(".d3-node-label").attr("style",i)}},{key:"getNodeBodyStyle",value:function(e,t){var n=cl.getObjectStyle(e,"body",t);return null===n&&e.layout.dropShadow&&(n="filter:url(".concat(this.getId("#node_drop_shadow"),")")),n}},{key:"getNodeSelectionOutlineStyle",value:function(e,t){return cl.getObjectStyle(e,"selection_outline",t)}},{key:"getNodeImageStyle",value:function(e,t){return cl.getObjectStyle(e,"image",t)}},{key:"getNodeLabelStyle",value:function(e,t){return cl.getObjectStyle(e,"label",t)}},{key:"getNodeGrpStyle",value:function(e){return e.style_temp||e.style||!this.canvasInfo.subdueStyle||this.doesExpandedSupernodeHaveStyledNodes(e)?null:this.canvasInfo.subdueStyle}},{key:"getLinkGrpStyle",value:function(e){return e.style_temp||e.style||!this.canvasInfo.subdueStyle?null:this.canvasInfo.subdueStyle}},{key:"doesExpandedSupernodeHaveStyledNodes",value:function(e){var t=this,n=!1;this.nodeUtils.isExpandedSupernode(e)&&e.subflow_ref&&e.subflow_ref.pipeline_id_ref&&this.getActivePipeline(e.subflow_ref.pipeline_id_ref).nodes.forEach((function(e){e.style||e.style_temp?n=!0:!n&&t.nodeUtils.isExpandedSupernode(e)&&(n=t.doesExpandedSupernodeHaveStyledNodes(e))}));return n}},{key:"getMaxZoomToFitPaddingForConnections",value:function(){var e=this.getMaxPaddingForConnectionsFromInputBindingNodes(),t=this.getMaxPaddingForConnectionsToOutputBindingNodes();return Math.max(e,t)}},{key:"getMaxPaddingForConnectionsFromInputBindingNodes",value:function(){var e=this,t=0;return this.activePipeline.nodes.filter((function(e){return e.isSupernodeInputBinding})).forEach((function(n){var i=cl.getNodePaddingToTargetNodes(n,e.activePipeline.nodes,e.activePipeline.links,e.canvasLayout.linkType);t=Math.max(t,i)})),t}},{key:"getMaxPaddingForConnectionsToOutputBindingNodes",value:function(){var e=this,t=0,n=this.activePipeline.nodes.filter((function(e){return e.isSupernodeOutputBinding}));return this.activePipeline.nodes.forEach((function(i){var o=cl.getNodePaddingToTargetNodes(i,n,e.activePipeline.links,e.canvasLayout.linkType);t=Math.max(t,o)})),t}},{key:"getPortRadius",value:function(e){return cl.isSuperBindingNode(e)?this.getBindingPortRadius():e.layout.portRadius}},{key:"getBindingPortRadius",value:function(){return this.canvasLayout.supernodeBindingPortRadius/this.zoomTransform.k}},{key:"addDynamicNodeIcons",value:function(e,t){var n=this;if(!this.nodeSizing&&!cl.isSuperBindingNode(e)){var i=t.append("g").filter((function(){return e.layout.ellipsisDisplay})).attr("class","d3-node-ellipsis-group").attr("transform",(function(e){return n.nodeUtils.getNodeEllipsisTranslate(e)})).on("mousedown",(function(t){cl.stopPropagationAndPreventDefault(t),n.ellipsisClicked=!0,n.config.enableDragWithoutSelect||n.selectObjectD3Event(t,e),n.openContextMenu(t,"node",e)}));if(i.append("rect").attr("class","d3-node-ellipsis-background").attr("width",(function(e){return n.nodeUtils.getNodeEllipsisWidth(e)})).attr("height",(function(e){return n.nodeUtils.getNodeEllipsisHeight(e)})).attr("x",0).attr("y",0),i.append("svg").attr("class","d3-node-ellipsis").html(fe).attr("width",(function(e){return n.nodeUtils.getNodeEllipsisIconWidth(e)})).attr("height",(function(e){return n.nodeUtils.getNodeEllipsisIconHeight(e)})).attr("x",(function(e){return e.layout.ellipsisHoverAreaPadding})).attr("y",(function(e){return e.layout.ellipsisHoverAreaPadding})),this.nodeUtils.isExpandedSupernode(e)){var o=t.append("g").attr("transform",(function(e){return n.nodeUtils.getNodeExpansionIconTranslate(e)})).attr("class","d3-node-super-expand-icon-group").on("mousedown",(function(e){cl.stopPropagationAndPreventDefault(e);var t=n.getSupernodeBreadcrumbs(e.currentTarget);n.canvasController.displaySubPipelineForBreadcrumbs(t)})).on("mouseenter",(function(){ml.select(this).attr("data-pointer-hover","yes")})).on("mouseleave",(function(){ml.select(this).attr("data-pointer-hover","no")}));o.append("rect").attr("class","d3-node-super-expand-icon-background").attr("width",this.canvasLayout.supernodeExpansionIconWidth).attr("height",this.canvasLayout.supernodeExpansionIconHeight).attr("x",0).attr("y",0),o.append("svg").attr("class","d3-node-super-expand-icon").html(ge).attr("width",this.canvasLayout.supernodeExpansionIconWidth-2*this.canvasLayout.supernodeExpansionIconHoverAreaPadding).attr("height",this.canvasLayout.supernodeExpansionIconHeight-2*this.canvasLayout.supernodeExpansionIconHoverAreaPadding).attr("x",this.canvasLayout.supernodeExpansionIconHoverAreaPadding).attr("y",this.canvasLayout.supernodeExpansionIconHoverAreaPadding)}}}},{key:"getSupernodeBreadcrumbs",value:function(e){for(var t=[],n=e.closest(".d3-node-group");n;){var i=n.closest(".svg-area"),o=this.getD3DatumFromDomEl(n),a=i.getAttribute("data-pipeline-id");t.push(this.canvasController.getObjectModel().createBreadcrumb(o,a)),n=i.closest(".d3-node-group")}return t.reverse()}},{key:"getD3DatumFromDomEl",value:function(e){var t=ml.select(e);return t?t.datum():null}},{key:"updatePortRadiusAndPos",value:function(e,t,n){var i=this;ml.select(e).selectAll("."+n).attr("r",(function(){return i.getPortRadius(t)})).attr("cx",(function(e){return e.cx})).attr("cy",(function(e){return e.cy}))}},{key:"updatePortArrowPath",value:function(e,t){var n=this;ml.select(e).selectAll("."+t).attr("d",(function(e){return n.getPortArrowPath(e)})).attr("transform",(function(e){return n.getPortArrowPathTransform(e)}))}},{key:"isNonBindingNode",value:function(e){return this.isNode(e)&&"binding"!==e.type}},{key:"isPortMaxCardinalityZero",value:function(e){return 0===pt(e,"app_data.ui_data.cardinality.max",1)}},{key:"removeDynamicNodeIcons",value:function(e,t){e.layout.ellipsisDisplay&&t.selectChildren(".d3-node-ellipsis-group").remove(),t.selectChildren(".d3-node-super-expand-icon-group").remove()}},{key:"createSupernodeRenderer",value:function(e,t){return e.subflow_ref&&e.subflow_ref.pipeline_id_ref?new n(e.subflow_ref.pipeline_id_ref,this.canvasDiv,this.canvasController,this.canvasInfo,this.config,{id:e.id,pipelineId:this.activePipeline.id,renderer:this,d3Selection:t}):null}},{key:"getRendererForSupernode",value:function(e){return this.superRenderers.find((function(t){return t.supernodeInfo.id===e.id&&t.activePipeline.id===e.subflow_ref.pipeline_id_ref}))}},{key:"getDiscardedRenderersForSupernode",value:function(e){return this.superRenderers.filter((function(t){return t.supernodeInfo.id===e.id&&t.activePipeline.id!==e.subflow_ref.pipeline_id_ref}))}},{key:"openContextMenu",value:function(e,t,n,i){cl.stopPropagationAndPreventDefault(e),this.canvasController.contextMenuHandler({type:t,targetObject:"canvas"===t?null:n,id:"canvas"===t?null:n.id,pipelineId:this.activePipeline.id,cmPos:this.getMousePos(e,this.canvasDiv.selectAll("svg")),mousePos:this.getMousePosSnapToGrid(this.getTransformedMousePos(e)),selectedObjectIds:this.objectModel.getSelectedObjectIds(),addBreadcrumbs:n&&n.type===G?this.getSupernodeBreadcrumbs(e.currentTarget):null,port:i,zoom:this.zoomTransform.k})}},{key:"closeContextMenuIfOpen",value:function(){this.canvasController.isContextMenuDisplayed()&&this.canvasController.closeContextMenu()}},{key:"callDecoratorCallback",value:function(e,t,n){e.stopPropagation(),this.canvasController.decorationActionHandler&&this.canvasController.decorationActionHandler(t,n.id,this.activePipeline.id)}},{key:"drawNewLink",value:function(e){this.closeContextMenuIfOpen();var t=this.getTransformedMousePos(e);this.drawingNewLinkData.action===B?this.drawNewCommentLinkForPorts(t):this.drawNewNodeLinkForPorts(t),this.config.enableHighlightNodeOnNewLinkDrag&&this.setNewLinkOverNode(e)}},{key:"drawNewNodeLinkForPorts",value:function(e){var t,n=this,i=this,o=this.config.enableAssocLinkCreation?U:F;t=this.canvasLayout.linkType===z?this.linkUtils.getNewStraightNodeLinkStartPos(this.drawingNewLinkData.srcNode,e):{x:this.drawingNewLinkData.startPos.x,y:this.drawingNewLinkData.startPos.y},this.drawingNewLinkData.linkArray=[{x1:t.x,y1:t.y,x2:e.x,y2:e.y,type:o}],this.config.enableAssocLinkCreation&&(this.drawingNewLinkData.linkArray[0].assocLinkVariation=this.getNewLinkAssocVariation(this.drawingNewLinkData.linkArray[0].x1,this.drawingNewLinkData.linkArray[0].x2,this.drawingNewLinkData.portType));var a=this.linkUtils.getConnectorPathInfo(this.drawingNewLinkData.linkArray[0],this.drawingNewLinkData.minInitialLine),r=this.nodesLinksGrp.selectAll(".d3-new-connection-line"),s=this.nodesLinksGrp.selectAll(".d3-new-connection-start"),l=this.nodesLinksGrp.selectAll(".d3-new-connection-guide");r.data(this.drawingNewLinkData.linkArray).enter().append("path").attr("class","d3-new-connection-line").attr("linkType",o).merge(r).attr("d",a.path).attr("transform",a.transform),this.canvasLayout.linkType!==z&&s.data(this.drawingNewLinkData.linkArray).enter().append(this.drawingNewLinkData.portObject).attr("class","d3-new-connection-start").attr("linkType",o).merge(s).each((function(e){i.drawingNewLinkData.portObject===ye&&ml.select(this).attr("cx",e.x1).attr("cy",e.y1).attr("r",i.drawingNewLinkData.portRadius)})),l.data(this.drawingNewLinkData.linkArray).enter().append(this.drawingNewLinkData.guideObject).attr("class","d3-new-connection-guide").attr("linkType",o).on("mouseup",(function(e){cl.stopPropagationAndPreventDefault(e),n.completeNewLink(e)})).merge(l).each((function(e){i.drawingNewLinkData.guideObject===pe?ml.select(this).attr("xlink:href",i.drawingNewLinkData.guideImage).attr("x",e.x2-i.drawingNewLinkData.portWidth/2).attr("y",e.y2-i.drawingNewLinkData.portHeight/2).attr("width",i.drawingNewLinkData.portWidth).attr("height",i.drawingNewLinkData.portHeight).attr("transform",i.getLinkImageTransform(e)):ml.select(this).attr("cx",e.x2).attr("cy",e.y2).attr("r",i.drawingNewLinkData.portRadius)}))}},{key:"getLinkImageTransform",value:function(e){var t=0;if(this.canvasLayout.linkType===z){var n=e.x2-e.x1,i=e.y2-e.y1;return 0===n&&0===i?t=0:(t=Math.atan(i/n)*(180/Math.PI),t=n>=0?t:t+180,this.canvasLayout.linkDirection===Z?t-=90:this.canvasLayout.linkDirection===K&&(t+=90)),"rotate(".concat(t,",").concat(e.x2,",").concat(e.y2,")")}return null}},{key:"drawNewCommentLinkForPorts",value:function(e){var t=this,n=this,i=this.getComment(this.drawingNewLinkData.srcObjId),o=this.linkUtils.getNewStraightCommentLinkStartPos(i,e),a=B;this.drawingNewLinkData.linkArray=[{x1:o.x,y1:o.y,x2:e.x,y2:e.y,type:a}];var r=this.nodesLinksGrp.selectAll(".d3-new-connection-line"),s=this.nodesLinksGrp.selectAll(".d3-new-connection-guide");if(r.data(this.drawingNewLinkData.linkArray).enter().append("path").attr("class","d3-new-connection-line").attr("linkType",a).merge(r).attr("d",(function(e){return n.linkUtils.getConnectorPathInfo(e).path})),s.data(this.drawingNewLinkData.linkArray).enter().append("circle").attr("class","d3-new-connection-guide").attr("linkType",a).on("mouseup",(function(e){cl.stopPropagationAndPreventDefault(e),t.completeNewLink(e)})).merge(s).attr("cx",(function(e){return e.x2})).attr("cy",(function(e){return e.y2})).attr("r",this.canvasLayout.commentPortRadius),this.canvasLayout.commentLinkArrowHead){var l=this.nodesLinksGrp.selectAll(".d3-new-connection-arrow");l.data(this.drawingNewLinkData.linkArray).enter().append("path").attr("class","d3-new-connection-arrow").attr("linkType",a).on("mouseup",(function(e){cl.stopPropagationAndPreventDefault(e),t.completeNewLink(e)})).merge(l).attr("d",(function(e){return t.getArrowHead(e)})).attr("transform",(function(e){return t.getArrowHeadTransform(e)}))}}},{key:"completeNewLink",value:function(e){this.config.enableHighlightUnavailableNodes&&this.unsetUnavailableNodesHighlighting();var t=this.getNodeAtMousePos(e);null!==t?this.completeNewLinkOnNode(e,t):this.config.enableLinkSelection!==ae||this.drawingNewLinkData.action!==F||this.config.enableAssocLinkCreation?this.stopDrawingNewLink():this.completeNewDetachedLink(e)}},{key:"completeNewLinkOnNode",value:function(e,t){if(this.removeNewLink(),this.config.enableHighlightNodeOnNewLinkDrag&&this.setNewLinkOverNodeCancel(),null!==t){var n=this.drawingNewLinkData.action;if(n===F){var i=this.getNode(this.drawingNewLinkData.srcObjId),o=this.drawingNewLinkData.srcPortId,a=this.getInputNodePortId(e,t);if(cl.isDataConnectionAllowed(o,a,i,t,this.activePipeline.links))this.canvasController.editActionHandler({editType:"linkNodes",editSource:"canvas",nodes:[{id:this.drawingNewLinkData.srcObjId,portId:this.drawingNewLinkData.srcPortId}],targetNodes:[{id:t.id,portId:a}],type:n,linkType:"data",pipelineId:this.pipelineId});else if(this.config.enableLinkReplaceOnNewConnection&&cl.isDataLinkReplacementAllowed(o,a,i,t,this.activePipeline.links)){var r=cl.getDataLinksConnectedTo(a,t,this.activePipeline.links);1===r.length&&this.canvasController.editActionHandler({editType:"linkNodesAndReplace",editSource:"canvas",nodes:[{id:this.drawingNewLinkData.srcObjId,portId:this.drawingNewLinkData.srcPortId}],targetNodes:[{id:t.id,portId:a}],type:n,pipelineId:this.pipelineId,replaceLink:r[0]})}}else if(n===U){var s=this.getNode(this.drawingNewLinkData.srcObjId);cl.isAssocConnectionAllowed(s,t,this.activePipeline.links)&&this.canvasController.editActionHandler({editType:"linkNodes",editSource:"canvas",nodes:[{id:this.drawingNewLinkData.srcObjId}],targetNodes:[{id:t.id}],type:n,pipelineId:this.pipelineId})}else cl.isCommentLinkConnectionAllowed(this.drawingNewLinkData.srcObjId,t.id,this.activePipeline.links)&&this.canvasController.editActionHandler({editType:"linkComment",editSource:"canvas",nodes:[this.drawingNewLinkData.srcObjId],targetNodes:[t.id],type:B,linkType:"comment",pipelineId:this.pipelineId})}this.drawingNewLinkData=null}},{key:"completeNewDetachedLink",value:function(e){this.removeNewLink(),this.config.enableHighlightNodeOnNewLinkDrag&&this.setNewLinkOverNodeCancel();var t=this.getTransformedMousePos(e);this.canvasController.editActionHandler({editType:"createDetachedLink",editSource:"canvas",srcNodeId:this.drawingNewLinkData.srcObjId,srcNodePortId:this.drawingNewLinkData.srcPortId,trgPos:t,type:F,pipelineId:this.pipelineId}),this.drawingNewLinkData=null}},{key:"stopDrawingNewLink",value:function(){this.config.enableHighlightNodeOnNewLinkDrag&&this.setNewLinkOverNodeCancel(),this.stopDrawingNewLinkForPorts()}},{key:"stopDrawingNewLinkForPorts",value:function(){var e=this,t=this.drawingNewLinkData.linkArray[0].x1,n=this.drawingNewLinkData.linkArray[0].y1,i=this.drawingNewLinkData.linkArray[0].x2,o=this.drawingNewLinkData.linkArray[0].y2,a=Object.assign({},this.drawingNewLinkData);this.drawingNewLinkData=null;var r="",s=350;this.canvasLayout.linkType===W?r="M "+t+" "+n+"C "+i+" "+o+" "+i+" "+o+" "+i+" "+o:this.canvasLayout.linkType===z?(t<i&&(s=0),r="M "+t+" "+n+"L "+i+" "+o+" "+i+" "+o+" "+i+" "+o):r="M "+t+" "+n+"L "+i+" "+o+"Q "+i+" "+o+" "+i+" "+o+"L "+i+" "+o+"Q "+i+" "+o+" "+i+" "+o+"L "+i+" "+o+"Q "+i+" "+o+" "+i+" "+o+"L "+i+" "+o+"Q "+i+" "+o+" "+i+" "+o+"L "+i+" "+o,this.nodesLinksGrp.selectAll(".d3-new-connection-line").transition().duration(s).attr("d",r).on("end",(function(){e.nodesLinksGrp.selectAll(".d3-new-connection-arrow").remove(),e.nodesLinksGrp.selectAll(".d3-new-connection-guide").transition().duration(1e3).ease(ml.easeElastic).attr("x",t-a.portWidth/2).attr("y",n-a.portHeight/2).attr("cx",t).attr("cy",n).attr("transform",null),e.nodesLinksGrp.selectAll(".d3-new-connection-line").transition().duration(1e3).ease(ml.easeElastic).attr("d","M "+t+" "+n+"L "+t+" "+n).on("end",e.removeNewLink.bind(e))}))}},{key:"removeNewLink",value:function(){this.nodesLinksGrp.selectAll(".d3-new-connection-line").remove(),this.nodesLinksGrp.selectAll(".d3-new-connection-start").remove(),this.nodesLinksGrp.selectAll(".d3-new-connection-guide").remove(),this.nodesLinksGrp.selectAll(".d3-new-connection-arrow").remove()}},{key:"dragLinkHandle",value:function(e){var t=this.getTransformedMousePos(e),n=this.draggingLinkData.link;"start"===this.draggingLinkData.endBeingDragged?(n.srcPos={x_pos:t.x,y_pos:t.y},delete n.srcNodeId,delete n.srcNodePortId,delete n.srcObj):(n.trgPos={x_pos:t.x,y_pos:t.y},delete n.trgNodeId,delete n.trgNodePortId,delete n.trgNode),this.displayLinks(),this.config.enableHighlightNodeOnNewLinkDrag&&this.setNewLinkOverNode(e)}},{key:"completeDraggedLink",value:function(e){var t=this.getNewLinkOnDrag(e);t?this.canvasController.editActionHandler({editType:"updateLink",editSource:"canvas",newLink:t,pipelineId:this.pipelineId}):(this.restoreLink(this.draggingLinkData.oldLink),this.displayLinks()),this.config.enableHighlightNodeOnNewLinkDrag&&this.setNewLinkOverNodeCancel(),this.unsetUnavailableNodesHighlighting(),this.stopDraggingLink()}},{key:"getNewLinkOnDrag",value:function(e,t){var n=this.draggingLinkData.oldLink,i=ht(n);if("start"===this.draggingLinkData.endBeingDragged){delete i.srcNodeId,delete i.srcNodePortId,delete i.srcPos;var o=t?this.getNodeNearMousePos(e,t):this.getNodeAtMousePos(e);o?(i.srcNodeId=o.id,i.srcNodePortId=t?this.getNodePortIdNearMousePos(e,"output_type",o):this.getOutputNodePortId(e,o)):i.srcPos=this.draggingLinkData.link.srcPos}else{delete i.trgNodeId,delete i.trgNodePortId,delete i.trgPos;var a=t?this.getNodeNearMousePos(e,t):this.getNodeAtMousePos(e);a?(i.trgNodeId=a.id,i.trgNodePortId=t?this.getNodePortIdNearMousePos(e,"input_type",a):this.getInputNodePortId(e,a)):i.trgPos=this.draggingLinkData.link.trgPos}return this.config.enableLinkSelection!==ae&&(i.srcPos||i.trgPos)?null:this.canExecuteUpdateLinkCommand(i,n)?i:null}},{key:"restoreLink",value:function(e){var t=this.activePipeline.links.findIndex((function(t){return t.id===e.id}));this.activePipeline.links.splice(t,1,e)}},{key:"canExecuteUpdateLinkCommand",value:function(e,t){var n=this.getNode(e.srcNodeId),i=this.getNode(e.trgNodeId),o=this.hasLinkSrcChanged(e,t),a=this.hasLinkTrgChanged(e,t),r=this.activePipeline.links,s=!0;return o&&n&&!cl.isSrcConnectionAllowedWithDetachedLinks(e.srcNodePortId,n,r)&&(s=!1),a&&i&&!cl.isTrgConnectionAllowedWithDetachedLinks(e.trgNodePortId,i,r)&&(s=!1),n&&i&&!cl.isConnectionAllowedWithDetachedLinks(e.srcNodePortId,e.trgNodePortId,n,i,r)&&(s=!1),s}},{key:"hasLinkSrcChanged",value:function(e,t){var n=!1;return e.srcNodeId?(e.srcNodeId!==t.srcNodeId&&(n=!0),e.srcNodePortId!==t.srcNodePortId&&(n=!0)):t.srcPos&&e.srcPos.x_pos===t.srcPos.x_pos&&e.srcPos.y_pos===t.srcPos.y_pos||(n=!0),n}},{key:"hasLinkTrgChanged",value:function(e,t){var n=!1;return e.trgNodeId?(e.trgNodeId!==t.trgNodeId&&(n=!0),e.trgNodePortId!==t.trgNodePortId&&(n=!0)):t.trgPos&&e.trgPos.x_pos===t.trgPos.x_pos&&e.trgPos.y_pos===t.trgPos.y_pos||(n=!0),n}},{key:"stopDraggingLink",value:function(){this.draggingLinkData=null}},{key:"getLinkAtMousePos",value:function(e,t){var n=this.getLinkElementAtMousePos(e,t);return this.getNodeLinkForElement(n)}},{key:"getLinkElementAtMousePos",value:function(e,t){this.setDataLinkSelectionAreaWider(!0);var n=this.getElementWithClassAtPosition(e,t,"d3-data-link");return this.setDataLinkSelectionAreaWider(!1),n}},{key:"getNodeLinkForElement",value:function(e){if(e){var t=ml.select(e).datum();if(t){var n=this.getLink(t.id,this.pipelineId);if(n&&n.type===F)return n}}return null}},{key:"setDataLinkSelectionAreaWider",value:function(e){this.canvasSVG.selectAll(".d3-data-link-selection-area").classed("d3-extra-width",e)}},{key:"getNodeAtMousePos",value:function(e){var t=this.getElementWithClassAtMousePos(e,"d3-node-group");return this.getNodeForElement(t)}},{key:"getInputNodePortId",value:function(e,t){var n=this.getInputNodePortIdAtMousePos(e);return n||(n=cl.getDefaultInputPortId(t)),n}},{key:"getInputNodePortIdAtMousePos",value:function(e){var t=this.getElementWithClassAtMousePos(e,this.getNodeInputPortClassName());return this.getNodePortIdForElement(t)}},{key:"getOutputNodePortId",value:function(e,t){var n=this.getOutputNodePortIdAtMousePos(e);return n||(n=cl.getDefaultOutputPortId(t)),n}},{key:"getOutputNodePortIdAtMousePos",value:function(e){var t=this.getElementWithClassAtMousePos(e,this.getNodeOutputPortClassName());return this.getNodePortIdForElement(t)}},{key:"getElementAtPoint",value:function(e,t,n){var i=this;return document.elementsFromPoint(e,t).find((function(e){return i.isClassNameIncluded(e,n)}))}},{key:"getElementWithClassAtMousePos",value:function(e,t){var n=e.clientX?e.clientX:e.sourceEvent.clientX,i=e.clientY?e.clientY:e.sourceEvent.clientY;return this.getElementWithClassAtPosition(n,i,t)}},{key:"getElementWithClassAtPosition",value:function(e,t,n){for(var i=document.elementsFromPoint(e,t),o=null,a=0;!o&&a<i.length;)o=this.getParentElementWithClass(i[a],n),a++;return o}},{key:"getParentElementWithClass",value:function(e,t){for(var n=e,i=null;n;)this.isClassNameIncluded(n,"d3-new-connection-guide")||this.isClassNameIncluded(n,"svg-area")?n=null:this.isClassNameIncluded(n,t)?(i=n,n=null):n=n.parentNode;return i}},{key:"isClassNameIncluded",value:function(e,t){return e.classList&&e.classList.contains(t)}},{key:"getNodeForElement",value:function(e){if(e&&"g"===e.nodeName){var t=ml.select(e).datum();if(t)return this.getNode(t.id)}return null}},{key:"getNodePortIdForElement",value:function(e){return e?ml.select(e).attr("data-port-id"):null}},{key:"getNodeNearMousePos",value:function(e,t){var n=this,i=this.getTransformedMousePos(e),o=null,a=t||0;return this.getAllNodeGroupsSelection().each((function(e){var t=e.layout.portRadius;cl.isSuperBindingNode(e)&&(t=n.canvasLayout.supernodeBindingPortRadius/n.zoomTransform.k),i.x>=e.x_pos-t-a&&i.x<=e.x_pos+e.width+t+a&&i.y>=e.y_pos-a&&i.y<=e.y_pos+e.height+a&&(o=e)})),o}},{key:"getNodePortIdNearMousePos",value:function(e,t,n){var i=this.getTransformedMousePos(e),o=null,a=null;if(n)if("output_type"===t){var r=this.getAllNodeGroupsSelection().selectChildren("."+this.getNodeOutputPortClassName()).selectChildren(".d3-node-port-output-main");o=this.searchForPortNearMouse(n,i,r,n.layout.outputPortObject,n.width),a=cl.getDefaultOutputPortId(n)}else{var s=this.getAllNodeGroupsSelection().selectChildren("."+this.getNodeInputPortClassName()).selectChildren(".d3-node-port-input-main");o=this.searchForPortNearMouse(n,i,s,n.layout.inputPortObject,0),a=cl.getDefaultInputPortId(n)}return o||(o=a),o}},{key:"searchForPortNearMouse",value:function(e,t,n,i,o){var a=null;return n.each((function(n,r,s){var l=ml.select(s[r]);if(i===pe){var c=e.x_pos+Number(l.attr("x")),d=e.y_pos+Number(l.attr("y")),u=Number(l.attr("width")),p=Number(l.attr("height"));t.x>=c&&t.x<=c+o+u&&t.y>=d&&t.y<=d+p&&(a=s[r].getAttribute("data-port-id"))}else{var h=e.x_pos+Number(l.attr("cx")),f=e.y_pos+Number(l.attr("cy"));t.x>=h-e.layout.portRadius&&t.x<=h+e.layout.portRadius&&t.y>=f-e.layout.portRadius&&t.y<=f+e.layout.portRadius&&(a=s[r].getAttribute("data-port-id"))}})),a}},{key:"getNodeShapePathSizing",value:function(e){return this.getRectangleNodeShapePath(e,e.layout.nodeSizingArea)}},{key:"getNodeSelectionOutline",value:function(e){return e.layout.selectionPath&&!this.nodeUtils.isExpanded(e)?e.layout.selectionPath:"port-arcs"===e.layout.nodeShape?this.getPortArcsNodeShapePath(e):this.getRectangleNodeShapePath(e,e.layout.nodeHighlightGap)}},{key:"getNodeShapePath",value:function(e){return e.layout.bodyPath&&!this.nodeUtils.isExpanded(e)?e.layout.bodyPath:"port-arcs"===e.layout.nodeShape?this.getPortArcsNodeShapePath(e):this.getRectangleNodeShapePath(e)}},{key:"getRectangleNodeShapePath",value:function(e,t){var n=t||0,i=0-n,o=0-n,a=e.width+n,r=e.height+n,s="M "+i+" "+o+" L "+a+" "+o;return s+=" L "+a+" "+r,s+=" L "+i+" "+r,s+=" Z"}},{key:"getPortArcsNodeShapePath",value:function(e){return this.canvasLayout.linkDirection===Z?this.getPortArcsNodeShapePathVertical(e,e.inputs,e.inputPortsWidth,e.outputs,e.outputPortsWidth):this.canvasLayout.linkDirection===K?this.getPortArcsNodeShapePathVertical(e,e.outputs,e.outputPortsWidth,e.inputs,e.inputPortsWidth):this.getPortArcsNodeShapePathLeftRight(e)}},{key:"getPortArcsNodeShapePathLeftRight",value:function(e){var t="M 0 0 L "+e.width+" 0 ";if(e.outputs&&e.outputs.length>0){var n=e.layout.portArcOffset;e.outputPortsHeight<e.height&&(n=e.outputs[0].cy-e.layout.portArcRadius),t+=" L "+e.width+" "+n,e.outputs.forEach((function(i,o){n+=2*e.layout.portArcRadius,t+=" A "+e.layout.portArcRadius+" "+e.layout.portArcRadius+" 180 0 1 "+e.width+" "+n,o<e.outputs.length-1&&(n+=e.layout.portArcSpacing,t+=" L "+e.width+" "+n)})),t+=" L "+e.width+" "+e.height}else t+=" L "+e.width+" "+e.height;if(t+=" L 0 "+e.height,e.inputs&&e.inputs.length>0){var i=e.height-e.layout.portArcOffset;e.inputPortsHeight<e.height&&(i=e.inputs[e.inputs.length-1].cy+e.layout.portArcRadius),t+=" L 0 "+i,e.inputs.forEach((function(n,o){i-=2*e.layout.portArcRadius,t+=" A "+e.layout.portArcRadius+" "+e.layout.portArcRadius+" 180 0 1 0 "+i,o<e.inputs.length-1&&(i-=e.layout.portArcSpacing,t+=" L 0 "+i)})),t+=" Z"}else t+=" Z";return t}},{key:"getPortArcsNodeShapePathVertical",value:function(e,t,n,i,o){var a="M 0 0 L 0 "+e.height;if(i&&i.length>0){var r=e.layout.portArcOffset;o<e.width&&(r=i[0].cx-e.layout.portArcRadius),a+=" L "+r+" "+e.height,i.forEach((function(t,n){r+=2*e.layout.portArcRadius,a+=" A "+e.layout.portArcRadius+" "+e.layout.portArcRadius+" 180 0 0 "+r+" "+e.height,n<i.length-1&&(r+=e.layout.portArcSpacing,a+=" L "+r+" "+e.height)})),a+=" L "+e.width+" "+e.height}else a+=" L "+e.width+" "+e.height;if(a+=" L "+e.width+" 0 ",t&&t.length>0){var s=e.width-e.layout.portArcOffset;n<e.width&&(s=t[t.length-1].cx+e.layout.portArcRadius),a+=" L "+s+" 0 ",t.forEach((function(n,i){s-=2*e.layout.portArcRadius,a+=" A "+e.layout.portArcRadius+" "+e.layout.portArcRadius+" 180 0 0 "+s+" 0 ",i<t.length-1&&(s-=e.layout.portArcSpacing,a+=" L "+s+" 0 ")})),a+=" Z"}else a+=" Z";return a}},{key:"setPortPositionsAllNodes",value:function(){var e=this;this.activePipeline.nodes.forEach((function(t){e.setPortPositionsForNode(t)}))}},{key:"setPortPositionsForNode",value:function(e){this.canvasLayout.linkDirection===Z?(this.setPortPositionsVertical(e,e.inputs,e.inputPortsWidth,e.layout.inputPortTopPosX,e.layout.inputPortTopPosY),this.setPortPositionsVertical(e,e.outputs,e.outputPortsWidth,e.layout.outputPortBottomPosX,this.getOutputPortBottomPosY(e))):this.canvasLayout.linkDirection===K?(this.setPortPositionsVertical(e,e.inputs,e.inputPortsWidth,e.layout.inputPortBottomPosX,this.getInputPortBottomPosY(e)),this.setPortPositionsVertical(e,e.outputs,e.outputPortsWidth,e.layout.outputPortTopPosX,e.layout.outputPortTopPosY)):(this.setPortPositionsLeftRight(e,e.inputs,e.inputPortsHeight,e.layout.inputPortLeftPosX,e.layout.inputPortLeftPosY),this.setPortPositionsLeftRight(e,e.outputs,e.outputPortsHeight,this.getOutputPortRightPosX(e),e.layout.outputPortRightPosY,this.config.enableSingleOutputPortDisplay))}},{key:"getOutputPortRightPosX",value:function(e){return e.width+e.layout.outputPortRightPosX}},{key:"getOutputPortBottomPosY",value:function(e){return e.height+e.layout.outputPortBottomPosY}},{key:"getInputPortBottomPosY",value:function(e){return e.height+e.layout.inputPortBottomPosY}},{key:"setPortPositionsVertical",value:function(e,t,n,i,o){if(t&&t.length>0)if(e.width<=e.layout.defaultNodeWidth&&1===t.length)t[0].cx=i,t[0].cy=o;else{var a=0;if(this.nodeUtils.isExpandedSupernode(e)){var r=e.width-2*this.canvasLayout.supernodeSVGAreaPadding-n;a=2*this.canvasLayout.supernodeSVGAreaPadding+r/2}else n<e.width&&(a=(e.width-n)/2);a+=e.layout.portArcOffset;var s=1;cl.isSuperBindingNode(e)&&(s=1/this.zoomTransform.k),t.forEach((function(t){a+=e.layout.portArcRadius*s,t.cx=a,t.cy=o,a+=(e.layout.portArcRadius+e.layout.portArcSpacing)*s}))}}},{key:"setPortPositionsLeftRight",value:function(e,t,n,i,o){var a=arguments.length>5&&void 0!==arguments[5]&&arguments[5];t&&t.length>0&&(e.height<=e.layout.defaultNodeHeight&&1===t.length?(t[0].cx=i,t[0].cy=o):a?this.setPortPositionsLeftRightSinglePort(e,t,i,o):this.setPortPositionsLeftRightAllPorts(e,t,n,i,o))}},{key:"setPortPositionsLeftRightAllPorts",value:function(e,t,n,i,o){var a=0;if(this.nodeUtils.isExpandedSupernode(e)){var r=e.height-this.canvasLayout.supernodeTopAreaHeight-this.canvasLayout.supernodeSVGAreaPadding-n;a=this.canvasLayout.supernodeTopAreaHeight+this.canvasLayout.supernodeSVGAreaPadding+r/2}else n<e.height&&(a=(e.height-n)/2);a+=e.layout.portArcOffset;var s=1;cl.isSuperBindingNode(e)&&(s=1/this.zoomTransform.k),t.forEach((function(t){a+=e.layout.portArcRadius*s,t.cx=i,t.cy=a,a+=(e.layout.portArcRadius+e.layout.portArcSpacing)*s}))}},{key:"setPortPositionsLeftRightSinglePort",value:function(e,t,n,i){var o=0;if(this.nodeUtils.isExpandedSupernode(e)){var a=e.height-this.canvasLayout.supernodeTopAreaHeight-this.canvasLayout.supernodeSVGAreaPadding;o=this.canvasLayout.supernodeTopAreaHeight+a/2}else o=i;t.forEach((function(e){e.cx=n,e.cy=o}))}},{key:"displayComments",value:function(){this.logger.logStartTimer("displayComments "+this.getFlags()),!this.dragging||this.commentSizing||this.nodeSizing||this.isCommentBeingUpdated?this.selecting||this.regionSelect?this.displayCommentsSelectionStatus():this.displayAllComments():this.displayMovedComments(),this.logger.logEndTimer("displayComments "+this.getFlags())}},{key:"displayMovedComments",value:function(){var e=this;this.getAllCommentGroupsSelection().attr("transform",(function(e){return"translate(".concat(e.x_pos,", ").concat(e.y_pos,")")})).datum((function(t){return e.getComment(t.id)}))}},{key:"displayCommentsSelectionStatus",value:function(){var e=this;this.getAllCommentGroupsSelection().selectChildren(".d3-comment-selection-highlight").attr("data-selected",(function(t){return e.objectModel.isSelected(t.id,e.activePipeline.id)?"yes":"no"})),this.superRenderers.forEach((function(e){e.selecting=!0,e.displayComments(),e.selecting=!1}))}},{key:"displayAllComments",value:function(){var e=this;this.getAllCommentGroupsSelection().data(this.activePipeline.comments,(function(e){return e.id})).join((function(t){return e.createComments(t)})).attr("transform",(function(e){return"translate(".concat(e.x_pos,", ").concat(e.y_pos,")")})).attr("class",(function(t){return e.getCommentGroupClass(t)})).call((function(t){return e.updateComments(t)}))}},{key:"createComments",value:function(e){var t=this,n=e.append("g").attr("data-id",(function(e){return t.getId("comment_grp",e.id)})).call(this.attachCommentGroupListeners.bind(this));return this.config.enableDragToMoveSizeNodesComments&&n.call(this.drag),n.append("rect").attr("class","d3-comment-sizing").call(this.attachCommentSizingListeners.bind(this)),n.append("rect").attr("class","d3-comment-selection-highlight"),n.append("rect").attr("width",(function(e){return e.width})).attr("height",(function(e){return e.height})).attr("x",0).attr("y",0).attr("class","d3-comment-rect"),n.append("foreignObject").attr("class","d3-foreign-object").attr("x",0).attr("y",0).append("xhtml:div").attr("class","d3-comment-text"),n}},{key:"updateComments",value:function(e){var t=this;e.attr("transform",(function(e){return"translate(".concat(e.x_pos,", ").concat(e.y_pos,")")})).attr("class",(function(e){return t.getCommentGroupClass(e)})),e.selectChildren(".d3-comment-sizing").datum((function(e){return t.getComment(e.id)})).attr("x",-this.canvasLayout.commentSizingArea).attr("y",-this.canvasLayout.commentSizingArea).attr("height",(function(e){return e.height+2*t.canvasLayout.commentSizingArea})).attr("width",(function(e){return e.width+2*t.canvasLayout.commentSizingArea})).attr("class","d3-comment-sizing"),e.selectChildren(".d3-comment-selection-highlight").datum((function(e){return t.getComment(e.id)})).attr("x",-this.canvasLayout.commentHighlightGap).attr("y",-this.canvasLayout.commentHighlightGap).attr("height",(function(e){return e.height+2*t.canvasLayout.commentHighlightGap})).attr("width",(function(e){return e.width+2*t.canvasLayout.commentHighlightGap})).attr("data-selected",(function(e){return t.objectModel.isSelected(e.id,t.activePipeline.id)?"yes":"no"})).attr("style",(function(e){return t.getNodeSelectionOutlineStyle(e,"default")})),e.selectChildren(".d3-comment-rect").datum((function(e){return t.getComment(e.id)})).attr("height",(function(e){return e.height})).attr("width",(function(e){return e.width})).attr("class","d3-comment-rect").attr("style",(function(e){return t.getCommentBodyStyle(e,"default")})),e.selectChildren(".d3-foreign-object").datum((function(e){return t.getComment(e.id)})).attr("width",(function(e){return e.width})).attr("height",(function(e){return e.height})).select("div").attr("style",(function(e){return t.getNodeLabelStyle(e,"default")})).html((function(e){return e.content}))}},{key:"attachCommentGroupListeners",value:function(e){var t=this;e.on("mouseenter",(function(e,n){t.setCommentStyles(n,"hover",ml.select(e.currentTarget)),t.createCommentPort(e.currentTarget,n)})).on("mouseleave",(function(e,n){t.setCommentStyles(n,"default",ml.select(e.currentTarget)),t.deleteCommentPort(e.currentTarget)})).on("mousedown",(function(e,n){t.logger.log("Comment Group - mouse down"),t.config.enableDragWithoutSelect||t.selectObjectD3Event(e,n),t.logger.log("Comment Group - finished mouse down")})).on("click",(function(e,n){t.logger.log("Comment Group - click"),e.stopPropagation()})).on("dblclick",(function(e,n){t.logger.log("Comment Group - double click"),cl.stopPropagationAndPreventDefault(e),t.displayCommentTextArea(n,e.currentTarget),t.canvasController.clickActionHandler({clickType:"DOUBLE_CLICK",objectType:"comment",id:n.id,selectedObjectIds:t.objectModel.getSelectedObjectIds(),pipelineId:t.activePipeline.id})})).on("contextmenu",(function(e,n){t.logger.log("Comment Group - context menu"),t.config.enableDragWithoutSelect&&t.selectObjectD3Event(e,n),t.openContextMenu(e,"comment",n)}))}},{key:"attachCommentSizingListeners",value:function(e){var t=this;e.on("mousedown",(function(e,n){t.commentSizing=!0,t.addTempCursorOverlay(t.commentSizingCursor)})).on("mousemove mouseenter",(function(e,n){if(t.config.enableDragToMoveSizeNodesComments&&!t.isRegionSelectOrSizingInProgress()){var i="pointer";t.isPointerCloseToBodyEdge(e,n)||(t.commentSizingDirection=t.getSizingDirection(e,n,t.canvasLayout.commentCornerResizeArea),t.commentSizingCursor=t.getCursorBasedOnDirection(t.commentSizingDirection),i=t.commentSizingCursor),ml.select(e.currentTarget).style("cursor",i)}}))}},{key:"createCommentPort",value:function(e,t){var n=this;ml.select(e).append("circle").attr("cx",0-this.canvasLayout.commentHighlightGap).attr("cy",0-this.canvasLayout.commentHighlightGap).attr("r",this.canvasLayout.commentPortRadius).attr("class","d3-comment-port-circle").on("mousedown",(function(e,i){cl.stopPropagationAndPreventDefault(e),n.drawingNewLinkData={srcObjId:t.id,action:B,startPos:{x:t.x_pos-n.canvasLayout.commentHighlightGap,y:t.y_pos-n.canvasLayout.commentHighlightGap},linkArray:[]},n.drawNewLink(e)}))}},{key:"deleteCommentPort",value:function(e){ml.select(e).selectChildren(".d3-comment-port-circle").remove()}},{key:"setCommentStyles",value:function(e,t,n){this.setCommentSelectionOutlineStyles(e,t,n),this.setCommentBodyStyles(e,t,n),this.setCommentTextStyles(e,t,n)}},{key:"setCommentSelectionOutlineStyles",value:function(e,t,n){var i=this.getCommentSelectionOutlineStyle(e,t);n.selectChildren(".d3-comment-selection-highlight").attr("style",i)}},{key:"setCommentBodyStyles",value:function(e,t,n){var i=this.getCommentBodyStyle(e,t);n.selectChildren(".d3-comment-rect").attr("style",i)}},{key:"setCommentTextStyles",value:function(e,t,n){var i=this.getCommentTextStyle(e,t);n.selectChildren(".d3-foreign-object").select("div").attr("style",i)}},{key:"getCommentSelectionOutlineStyle",value:function(e,t){return cl.getObjectStyle(e,"selection_outline",t)}},{key:"getCommentBodyStyle",value:function(e,t){return cl.getObjectStyle(e,"body",t)}},{key:"getCommentTextStyle",value:function(e,t){return cl.getObjectStyle(e,"text",t)}},{key:"displayCommentTextArea",value:function(e,t){this.displayTextArea({id:e.id,text:e.content,singleLine:!1,maxCharacters:null,allowReturnKey:!0,textCanBeEmpty:!0,xPos:0,yPos:0,width:e.width,height:e.height,className:"d3-comment-entry",parentDomObj:t,autoSizeCallback:this.autoSizeComment.bind(this),saveTextChangesCallback:this.saveCommentChanges.bind(this),closeTextAreaCallback:null})}},{key:"autoSizeComment",value:function(e,t,n){this.logger.log("autoSizeComment - textAreaHt = "+this.textAreaHeight+" scroll ht = "+e.scrollHeight);var i=e.scrollHeight+12;this.textAreaHeight<i&&(this.textAreaHeight=i,t.style("height",this.textAreaHeight+"px"),this.getComment(n.id).height=this.textAreaHeight,this.displayComments(),this.displayLinks())}},{key:"saveCommentChanges",value:function(e,t,n){var i=this.getComment(e),o={editType:"editComment",editSource:"canvas",id:i.id,content:t,width:i.width,height:n,x_pos:i.x_pos,y_pos:i.y_pos,pipelineId:this.activePipeline.id};this.canvasController.editActionHandler(o)}},{key:"displayNodeLabelTextArea",value:function(e,t){ml.select(t).selectAll("div").attr("style","display:none;"),this.displayTextArea({id:e.id,text:e.label,singleLine:e.layout.labelSingleLine,maxCharacters:e.layout.labelMaxCharacters,allowReturnKey:e.layout.labelAllowReturnKey,textCanBeEmpty:!1,xPos:this.nodeUtils.getNodeLabelTextAreaPosX(e),yPos:this.nodeUtils.getNodeLabelTextAreaPosY(e),width:this.nodeUtils.getNodeLabelTextAreaWidth(e),height:this.nodeUtils.getNodeLabelTextAreaHeight(e),className:this.nodeUtils.getNodeLabelTextAreaClass(e),parentDomObj:t,autoSizeCallback:this.autoSizeMultiLineLabel.bind(this),saveTextChangesCallback:this.saveNodeLabelChanges.bind(this),closeTextAreaCallback:this.closeNodeLabelTextArea.bind(this)})}},{key:"autoSizeMultiLineLabel",value:function(e,t,n){this.logger.log("autoSizeNodeLabel - textAreaHt = "+this.textAreaHeight+" scroll ht = "+e.scrollHeight),n.maxCharacters&&e.value.length>n.maxCharacters&&(e.value=e.value.substring(0,n.maxCharacters)),t.style("height",0);var i=e.scrollHeight+12;this.textAreaHeight=i,t.style("height",this.textAreaHeight+"px")}},{key:"saveNodeLabelChanges",value:function(e,t,n,i){var o={editType:"setNodeLabel",editSource:"canvas",nodeId:e,label:t,pipelineId:this.activePipeline.id};this.canvasController.editActionHandler(o)}},{key:"closeNodeLabelTextArea",value:function(e){this.getNodeGroupSelectionById(e).selectAll("div").attr("style",null)}},{key:"displayDecLabelTextArea",value:function(e,t,n,i){this.displayTextArea({id:e.id,text:e.label,singleLine:e.label_single_line||!0,maxCharacters:e.label_max_characters||null,allowReturnKey:e.label_allow_return_key||!1,textCanBeEmpty:!1,xPos:this.decUtils.getDecLabelTextAreaPosX(),yPos:this.decUtils.getDecLabelTextAreaPosY(),width:this.decUtils.getDecLabelTextAreaWidth(e,t,n),height:this.decUtils.getDecLabelTextAreaHeight(e,t,n),className:this.decUtils.getDecLabelTextAreaClass(e),parentDomObj:i,objId:t.id,objType:n,autoSizeCallback:this.autoSizeMultiLineLabel.bind(this),saveTextChangesCallback:this.saveDecLabelChanges.bind(this),closeTextAreaCallback:null})}},{key:"saveDecLabelChanges",value:function(e,t,n,i){var o={editType:"editDecorationLabel",editSource:"canvas",decId:e,objId:i.objId,objType:i.objType,label:t,pipelineId:this.activePipeline.id};this.canvasController.editActionHandler(o)}},{key:"displayTextArea",value:function(e){var t=this;this.textAreaHeight=e.height,this.editingText=!0,this.editingTextId=e.id;var n=ml.select(e.parentDomObj).append("foreignObject").attr("class","d3-foreign-object").attr("width",e.width).attr("height",e.height).attr("x",e.xPos).attr("y",e.yPos),i=n.append("xhtml:textarea").attr("class",e.className).text(e.text).on("keydown",(function(i){!e.singleLine&&e.allowReturnKey||13!==i.keyCode||cl.stopPropagationAndPreventDefault(i),27===i.keyCode&&(cl.stopPropagationAndPreventDefault(i),t.textAreaEscKeyPressed=!0,t.closeTextArea(n,e)),e.maxCharacters&&this.value.length>=e.maxCharacters&&!t.textAreaAllowedKeys(i)&&cl.stopPropagationAndPreventDefault(i)})).on("keyup",(function(t){e.autoSizeCallback(this,n,e)})).on("paste",(function(){t.logger.log("Text area - Paste - Scroll Ht = "+this.scrollHeight),setTimeout(e.autoSizeCallback,500,this,n,e)})).on("blur",(function(i,o){if(t.logger.log("Text area - blur"),t.textAreaEscKeyPressed)t.textAreaEscKeyPressed=!1;else{if(!this.value&&!e.textCanBeEmpty)return cl.stopPropagationAndPreventDefault(i),void t.closeTextArea(n,e);var a=this.value;t.closeTextArea(n,e),e.text!==a&&(t.isCommentBeingUpdated=!0,e.saveTextChangesCallback(e.id,a,t.textAreaHeight,e),t.isCommentBeingUpdatd=!1)}})).on("focus",(function(i,o){t.logger.log("Text area - focus"),e.autoSizeCallback(this,n,e)})).on("mousedown click dblclick contextmenu",(function(e,t){e.stopPropagation()}));i.node().focus(),i.node().setSelectionRange(e.text.length,e.text.length)}},{key:"closeTextArea",value:function(e,t){t.closeTextAreaCallback&&t.closeTextAreaCallback(t.id),e.remove(),this.editingText=!1,this.editingTextId=""}},{key:"textAreaAllowedKeys",value:function(e){return 46===e.keyCode||8===e.keyCode||37===e.keyCode||39===e.keyCode||38===e.keyCode||40===e.keyCode||65===e.keyCode&&cl.isCmndCtrlPressed(e)}},{key:"addTempCursorOverlay",value:function(e){this.dispUtils.isDisplayingFullPage()&&(this.canvasDiv.selectAll(".d3-temp-cursor-overlay").size()>0&&this.removeTempCursorOverlay(),this.canvasSVG.append("rect").attr("x",0).attr("y",0).attr("width","100%").attr("height","100%").attr("data-pipeline-id",this.activePipeline.id).attr("class","d3-temp-cursor-overlay").attr("pointer-events","all").style("cursor",e))}},{key:"removeTempCursorOverlay",value:function(){this.dispUtils.isDisplayingFullPage()&&this.canvasDiv.selectAll(".d3-temp-cursor-overlay").remove()}},{key:"isRegionSelectOrSizingInProgress",value:function(){return!!(this.regionSelect||this.nodeSizing||this.commentSizing)||!(!this.supernodeInfo.renderer||!this.supernodeInfo.renderer.isRegionSelectOrSizingInProgress())}},{key:"isPointerCloseToBodyEdge",value:function(e,t){var n=this.getTransformedMousePos(e),i=t.x_pos+t.width,o=t.y_pos+t.height,a=n.x>=i&&n.x<=i+1&&n.y>=0&&n.y<=o,r=n.y>=o&&n.y<=o+1&&n.x>=0&&n.x<=i;return a||r}},{key:"getSizingDirection",value:function(e,t,n){var i="",o="",a=this.getTransformedMousePos(e);return a.x<t.x_pos+n?i="w":a.x>t.x_pos+t.width-n&&(i="e"),a.y<t.y_pos+n?o="n":a.y>t.y_pos+t.height-n&&(o="s"),o+i}},{key:"getCursorBasedOnDirection",value:function(e){var t;switch(e){case"n":case"s":t="ns-resize";break;case"e":case"w":t="ew-resize";break;case"nw":case"se":t="nwse-resize";break;case"ne":case"sw":t="nesw-resize";break;default:t=""}return t}},{key:"resizeNode",value:function(e){var t=Object.assign({},this.resizeObj),n=Math.max(this.resizeObj.inputPortsHeight,this.resizeObj.outputPortsHeight)+this.canvasLayout.supernodeTopAreaHeight+this.canvasLayout.supernodeSVGAreaPadding,i=this.resizeObject(e,this.resizeObj,this.nodeSizingDirection,this.canvasLayout.supernodeMinWidth,Math.max(this.canvasLayout.supernodeMinHeight,n));if(i&&(0!==i.x_pos||0!==i.y_pos||0!==i.width||0!==i.height)){if(this.config.enableMoveNodesOnSupernodeResize){var o=cl.moveSurroundingObjects(t,this.activePipeline.nodes.concat(this.activePipeline.comments),this.nodeSizingDirection,this.resizeObj.width,this.resizeObj.height,!0),a=cl.moveSurroundingDetachedLinks(t,this.activePipeline.links,this.nodeSizingDirection,this.resizeObj.width,this.resizeObj.height,!0);this.nodeSizingObjectsInfo=Object.assign(this.nodeSizingObjectsInfo,o),this.nodeSizingLinksInfo=Object.assign(this.nodeSizingLinksInfo,a)}this.displayComments(),this.displayNodes(),this.displayLinks(),this.dispUtils.isDisplayingSubFlow()&&this.displayBindingNodesToFitSVG(),this.superRenderers.forEach((function(e){return e.displaySVGToFitSupernode()}))}}},{key:"resizeComment",value:function(e){this.resizeObject(e,this.resizeObj,this.commentSizingDirection,20,20),this.displayComments(),this.displayLinks()}},{key:"resizeObject",value:function(e,t,n,i,o){var a=0,r=0,s=0,l=0;n.indexOf("e")>-1&&(s+=e.dx),n.indexOf("s")>-1&&(l+=e.dy),n.indexOf("n")>-1&&(r+=e.dy,l-=e.dy),n.indexOf("w")>-1&&(a+=e.dx,s-=e.dx);var c=0,d=0,u=0,p=0;if(this.config.enableSnapToGridType===ie?(this.notSnappedXPos+=a,this.notSnappedYPos+=r,this.notSnappedWidth+=s,this.notSnappedHeight+=l,c=cl.snapToGrid(this.notSnappedXPos,this.canvasLayout.snapToGridXPx),d=cl.snapToGrid(this.notSnappedYPos,this.canvasLayout.snapToGridYPx),u=cl.snapToGrid(this.notSnappedWidth,this.canvasLayout.snapToGridXPx),p=cl.snapToGrid(this.notSnappedHeight,this.canvasLayout.snapToGridYPx)):(c=t.x_pos+a,d=t.y_pos+r,u=t.width+s,p=t.height+l),u<i||p<o)return null;var h={width:u-t.width,height:p-t.height,x_pos:c-t.x_pos,y_pos:d-t.y_pos};return t.x_pos=c,t.y_pos=d,t.width=u,t.height=p,h}},{key:"endNodeSizing",value:function(){this.config.enableSnapToGridType===oe&&(this.resizeObj=this.snapToGridObject(this.resizeObj)),this.resizeObjInitialInfo.x_pos===this.resizeObj.x_pos&&this.resizeObjInitialInfo.y_pos===this.resizeObj.y_pos&&this.resizeObjInitialInfo.width===this.resizeObj.width&&this.resizeObjInitialInfo.height===this.resizeObj.height||(this.nodeSizingObjectsInfo[this.resizeObj.id]={width:this.resizeObj.width,height:this.resizeObj.height,x_pos:this.resizeObj.x_pos,y_pos:this.resizeObj.y_pos},this.canvasController.editActionHandler({editType:"resizeObjects",editSource:"canvas",objectsInfo:this.nodeSizingObjectsInfo,linksInfo:this.nodeSizingLinksInfo,pipelineId:this.pipelineId})),this.resizeObj=null,this.nodeSizing=!1,this.nodeSizingObjectsInfo=[],this.nodeSizingLinksInfo=[]}},{key:"endCommentSizing",value:function(){if(this.config.enableSnapToGridType===oe&&(this.resizeObj=this.snapToGridObject(this.resizeObj)),this.resizeObjInitialInfo.x_pos!==this.resizeObj.x_pos||this.resizeObjInitialInfo.y_pos!==this.resizeObj.y_pos||this.resizeObjInitialInfo.width!==this.resizeObj.width||this.resizeObjInitialInfo.height!==this.resizeObj.height){var e={editType:"editComment",editSource:"canvas",id:this.resizeObj.id,content:this.resizeObj.content,width:this.resizeObj.width,height:this.resizeObj.height,x_pos:this.resizeObj.x_pos,y_pos:this.resizeObj.y_pos,pipelineId:this.pipelineId};this.canvasController.editActionHandler(e)}this.commentSizing=!1}},{key:"displayLinks",value:function(){this.logger.logStartTimer("displayLinks "+this.getFlags()),this.selecting||this.regionSelect?this.displayLinksSelectionStatus():this.displayAllLinks(),this.logger.logEndTimer("displayLinks "+this.getFlags())}},{key:"displayLinksSelectionStatus",value:function(){var e=this;this.config.enableLinkSelection!==de&&(this.getAllLinkGroupsSelection().attr("data-selected",(function(t){return!!e.objectModel.isSelected(t.id,e.activePipeline.id)||null})),this.superRenderers.forEach((function(e){e.selecting=!0,e.displayLinks(),e.selecting=!1})))}},{key:"displayAllLinks",value:function(){var e=this,t=this.buildLinksArray();this.getAllLinkGroupsSelection().data(t,(function(e){return e.id})).join((function(t){return e.createLinks(t)})).attr("class",(function(t){return e.getLinkGroupClass(t)})).attr("style",(function(t){return e.getLinkGrpStyle(t)})).attr("data-selected",(function(t){return!!e.objectModel.isSelected(t.id,e.activePipeline.id)||null})).call((function(n){e.updateLinks(n,t)}))}},{key:"createLinks",value:function(e){var t=this,n=e.append("g").attr("data-id",(function(e){return t.getId("link_grp",e.id)})).call(this.attachLinkGroupListeners.bind(this));return n.append("path").attr("class",(function(e){return t.getLinkSelectionAreaClass(e)})),n.append("path").attr("class","d3-link-line"),n.filter((function(e){return e.type===F&&t.canvasLayout.dataLinkArrowHead||e.type===B&&t.canvasLayout.commentLinkArrowHead||e.type===F&&t.canvasLayout.linkType===z})).append("path").attr("class","d3-link-line-arrow-head"),n.append("g").attr("class","d3-link-decorations-group"),this.config.enableLinkSelection!==ve&&this.config.enableLinkSelection!==ae||n.append("g").attr("class","d3-link-handles-group").each((function(e,n,i){e.type===F&&t.createNewHandles(ml.select(i[n]))})),n}},{key:"updateLinks",value:function(e,t){var n=this;e.selectAll(".d3-link-selection-area").datum((function(e){return n.getLink(e.id)})).attr("d",(function(e){return e.pathInfo.path})),e.selectAll(".d3-link-line").datum((function(e){return n.getLink(e.id)})).attr("d",(function(e){return e.pathInfo.path})).attr("class","d3-link-line").attr("style",(function(e){return cl.getObjectStyle(e,"line","default")})),e.filter((function(e){return e.type===F&&n.canvasLayout.dataLinkArrowHead||e.type===B&&n.canvasLayout.commentLinkArrowHead||e.type===F&&n.canvasLayout.linkType===z})).selectAll(".d3-link-line-arrow-head").datum((function(e){return n.getLink(e.id)})).attr("d",(function(e){return n.getArrowHead(e)})).attr("transform",(function(e){return n.getArrowHeadTransform(e)})).attr("class","d3-link-line-arrow-head").attr("style",(function(e){return cl.getObjectStyle(e,"line","default")})),e.each((function(e,t,i){e.type!==F&&e.type!==U||n.displayDecorations(e,ne,ml.select(i[t]).selectAll(".d3-link-decorations-group"),e.decorations)})),this.config.enableLinkSelection!==ve&&this.config.enableLinkSelection!==ae||e.each((function(e,i,o){e.type===F&&n.updateHandles(ml.select(o[i]).selectAll(".d3-link-handles-group"),t)})),this.dragging||this.setDisplayOrder(e)}},{key:"attachLinkGroupListeners",value:function(e){var t=this;e.on("mousedown",(function(e,n,i,o){t.logger.log("Link Group - mouse down"),t.config.enableLinkSelection!==de&&t.selectObjectD3Event(e,n),e.stopPropagation()})).on("mouseup",(function(){t.logger.log("Link Group - mouse up")})).on("click",(function(e,n){t.logger.log("Link Group - click"),e.stopPropagation()})).on("contextmenu",(function(e,n){t.logger.log("Link Group - context menu"),t.config.enableLinkSelection!==de&&t.selectObjectD3Event(e,n),t.openContextMenu(e,"link",n)})).on("mouseenter",(function(e,n){var i=e.currentTarget;t.config.enableLinkSelection!==ve&&t.config.enableLinkSelection!==ae||t.raiseLinkToTop(i),t.setLinkLineStyles(i,n,"hover"),t.canOpenTip(T)&&!t.draggingLinkData&&t.canvasController.openTip({id:t.getId("link_tip",n.id),type:T,targetObj:i,mousePos:{x:e.clientX,y:e.clientY},pipelineId:t.activePipeline.id,link:n})})).on("mouseleave",(function(e,n){var i=e.currentTarget;i.getAttribute("data-selected")||t.lowerLinkToBottom(i),t.setLinkLineStyles(i,n,"default"),t.canvasController.closeTip()}))}},{key:"createNewHandles",value:function(e){var t=this;e.append(this.canvasLayout.linkStartHandleObject).attr("class",(function(e){return"d3-link-handle-start"})).on("mousedown",(function(e,n){t.logger.log("Link start handle - mouse down"),t.config.enableDragWithoutSelect||t.selectObjectD3Event(e,n),t.logger.log("Link end handle - finished mouse down")})).call(this.dragSelectionHandle),e.append(this.canvasLayout.linkEndHandleObject).attr("class",(function(e){return"d3-link-handle-end"})).on("mousedown",(function(e,n){t.logger.log("Link end handle - mouse down"),t.config.enableDragWithoutSelect||t.selectObjectD3Event(e,n),t.logger.log("Link end handle - finished mouse down")})).call(this.dragSelectionHandle)}},{key:"updateHandles",value:function(e,t){var n=this;e.selectAll(".d3-link-handle-start").datum((function(e){return n.getLink(e.id)})).each((function(e,t,i){var o=ml.select(i[t]);"image"===n.canvasLayout.linkStartHandleObject?o.attr("xlink:href",n.canvasLayout.linkStartHandleImage).attr("x",(function(e){return e.x1-n.canvasLayout.linkStartHandleWidth/2})).attr("y",(function(e){return e.y1-n.canvasLayout.linkStartHandleHeight/2})).attr("width",n.canvasLayout.linkStartHandleWidth).attr("height",n.canvasLayout.linkStartHandleHeight):"circle"===n.canvasLayout.linkStartHandleObject&&o.attr("r",n.canvasLayout.linkStartHandleRadius).attr("cx",(function(e){return e.x1})).attr("cy",(function(e){return e.y1}))})),e.selectAll(".d3-link-handle-end").datum((function(e){return n.getLink(e.id)})).each((function(e,t,i){var o=ml.select(i[t]);"image"===n.canvasLayout.linkEndHandleObject?o.attr("xlink:href",n.canvasLayout.linkEndHandleImage).attr("x",(function(e){return e.x2-n.canvasLayout.linkEndHandleWidth/2})).attr("y",(function(e){return e.y2-n.canvasLayout.linkEndHandleHeight/2})).attr("width",n.canvasLayout.linkEndHandleWidth).attr("height",n.canvasLayout.linkEndHandleHeight).attr("transform",(function(e){return n.getLinkImageTransform(e)})):"circle"===n.canvasLayout.linkEndHandleObject&&o.attr("r",n.canvasLayout.linkEndHandleRadius).attr("cx",(function(e){return e.x2})).attr("cy",(function(e){return e.y2}))}))}},{key:"setLinkLineStyles",value:function(e,t,n){var i=cl.getObjectStyle(t,"line",n),o=ml.select(e);o.select(".d3-link-line").attr("style",i),o.select(".d3-link-line-arrow-head").attr("style",i)}},{key:"getLinkSelectionAreaClass",value:function(e){return"d3-link-selection-area "+(e.type===U?"d3-association-link-selection-area":e.type===B?"d3-comment-link-selection-area":"d3-data-link-selection-area")}},{key:"getLinkGroupClass",value:function(e){return"d3-link-group "+this.getLinkTypeClass(e)+" "+this.getLinkCustomClass(e)}},{key:"getLinkCustomClass",value:function(e){return e.class_name&&"canvas-data-link"!==e.class_name&&"canvas-object-link"!==e.class_name&&"canvas-comment-link"!==e.class_name&&"d3-data-link"!==e.class_name&&"d3-association-link"!==e.class_name&&"d3-object-link"!==e.class_name&&"d3-comment-link"!==e.class_name?e.class_name:""}},{key:"getLinkTypeClass",value:function(e){return e.type===U?this.config.enableAssocLinkType===$?"d3-association-link":"d3-object-link":e.type===B?"d3-comment-link":"d3-data-link"}},{key:"getCommentGroupClass",value:function(e){var t="";return e.class_name&&"canvas-comment"!==e.class_name&&"d3-comment-rect"!==e.class_name&&(t=" "+e.class_name),"d3-comment-group"+(this.config.enableDragToMoveSizeNodesComments?" d3-draggable":" d3-non-draggable")+t}},{key:"getNodeGroupClass",value:function(e){var t="";return e.class_name&&"canvas-node"!==e.class_name&&"d3-node-body"!==e.class_name&&"d3-node-body-outline"!==e.class_name&&(t=" "+e.class_name),"d3-node-group"+(this.nodeUtils.isSupernode(e)&&this.nodeUtils.isExpanded(e)?" d3-node-supernode-expanded":"")+(this.config.enableDragToMoveSizeNodesComments?" d3-draggable":" d3-non-draggable")+t}},{key:"setDisplayOrder",value:function(e){var t=this;e.filter((function(e){return t.hasOneDecorationOrMore(e)})).lower(),e.filter((function(e){return!t.hasOneDecorationOrMore(e)})).lower(),this.config.enableLinkSelection!==ve&&this.config.enableLinkSelection!==ae||this.raiseSelectedLinksToTop()}},{key:"raiseNodeToTop",value:function(e){null!==this.drawingNewLinkData||this.dragging||0!==this.getSelectedLinks().length||e.raise()}},{key:"raiseSelectedLinksToTop",value:function(){this.nodesLinksGrp.selectAll(".d3-link-group[data-selected]").raise()}},{key:"raiseLinkToTop",value:function(e){ml.select(e).raise()}},{key:"lowerLinkToBottom",value:function(e){ml.select(e).lower()}},{key:"hasOneDecorationOrMore",value:function(e){return e.decorations&&e.decorations.length>0}},{key:"isLinkBeingDragged",value:function(e){return this.draggingLinkData&&this.draggingLinkData.link.id===e.id}},{key:"buildLinksArray",value:function(){var e=this,t=[];return this.activePipeline.links.forEach((function(n){var i=null;(i=!(e.config.enableLinkSelection===ve&&e.isLinkBeingDragged(n)||e.config.enableLinkSelection===ae)||n.srcObj&&n.trgNode?e.getAttachedLineObj(n):e.getDetachedLineObj(n))&&t.push(i)})),this.canvasLayout.linkType===X&&(t=this.addMinInitialLineForElbow(t)),t=this.linkUtils.addConnectionPaths(t)}},{key:"getAttachedLineObj",value:function(e){var t=e.srcObj,n=e.trgNode;if(t||this.logger.error("Common Canvas error trying to draw a link. A link was specified for source ID '"+e.srcNodeId+"' in the Canvas data that does not have a valid source node/comment."),n||this.logger.error("Common Canvas error trying to draw a link. A link was specified for target ID '"+e.trgNodeId+"' in the Canvas data that does not have a valid target node."),t&&n&&this.shouldDisplayLink(t,n,e.type)){var i=this.getSourcePortId(e,t),o=this.getTargetPortId(e,n),a=e.type===U&&this.config.enableAssocLinkType===$?this.getAssocLinkVariation(t,n):null,r=this.linkUtils.getLinkCoords(e.type,t,i,n,o,a);return e.assocLinkVariation=a,e.srcPortId=i,e.trgPortId=o,e.x1=r.x1,e.y1=r.y1,e.x2=r.x2,e.y2=r.y2,e}return null}},{key:"getDetachedLineObj",value:function(e){var t=e.srcObj,n=e.trgNode,i=null,o=null,a={};if(t)if(this.canvasLayout.linkType===z){var r={x:e.trgPos.x_pos,y:e.trgPos.y_pos},s=this.linkUtils.getNewStraightNodeLinkStartPos(t,r);a.x1=s.x,a.y1=s.y}else{i=this.getSourcePortId(e,t);var l=this.getOutputPort(t,i);l&&(a.x1=t.x_pos+l.cx,a.y1=t.y_pos+l.cy)}else a.x1=e.srcPos.x_pos,a.y1=e.srcPos.y_pos;if(n)if(this.canvasLayout.linkType===z){var c={x:e.srcPos.x_pos,y:e.srcPos.y_pos},d=this.linkUtils.getNewStraightNodeLinkStartPos(n,c);a.x2=d.x,a.y2=d.y}else{o=this.getTargetPortId(e,n);var u=this.getInputPort(n,o);u&&(a.x2=n.x_pos+u.cx,a.y2=n.y_pos+u.cy)}else a.x2=e.trgPos.x_pos,a.y2=e.trgPos.y_pos;return e.srcPortId=i,e.trgPortId=o,e.x1=a.x1,e.y1=a.y1,e.x2=a.x2,e.y2=a.y2,e}},{key:"getOutputPort",value:function(e,t){return e&&e.outputs?e.outputs.find((function(e){return e.id===t})):null}},{key:"getInputPort",value:function(e,t){return e&&e.inputs?e.inputs.find((function(e){return e.id===t})):null}},{key:"getSourcePortId",value:function(e,t){return e.srcNodePortId?e.srcNodePortId:t.outputs&&t.outputs.length>0?t.outputs[0].id:null}},{key:"getTargetPortId",value:function(e,t){return e.trgNodePortId?e.trgNodePortId:t.inputs&&t.inputs.length>0?t.inputs[0].id:null}},{key:"shouldDisplayLink",value:function(e,t,n){return!1!==this.canvasLayout.displayLinkOnOverlap||!this.areLinkedObjectsOverlapping(e,t,n)}},{key:"areLinkedObjectsOverlapping",value:function(e,t,n){var i=n===B?this.canvasLayout.commentHighlightGap:e.layout.nodeHighlightGap,o=t.layout.nodeHighlightGap,a=e.x_pos-i,r=e.x_pos+e.width+i,s=t.x_pos-o,l=t.x_pos+t.width+o,c=e.y_pos-i,d=e.y_pos+e.height+i,u=t.y_pos-o,p=t.y_pos+t.height+o;return r>=s&&l>=a&&d>=u&&p>=c}},{key:"addMinInitialLineForElbow",value:function(e){var t=this;return this.activePipeline.nodes.forEach((function(n){if(n.outputs&&n.outputs.length>1){var i=t.getNodeOutputLinks(n,e),o=t.sortNodeOutputLinks(i);t.applyMinInitialLine(n,o)}})),e}},{key:"getNodeOutputLinks",value:function(e,t){var n=[];return t.forEach((function(t){t.srcObj&&t.srcObj.id===e.id&&n.push(t)})),n}},{key:"sortNodeOutputLinks",value:function(e){var t=this;return e.sort((function(e,n){var i,o;return t.canvasLayout.linkDirection===me?(i=Math.abs(e.y1-e.y2),o=Math.abs(n.y1-n.y2)):(i=Math.abs(e.x1-e.x2),o=Math.abs(n.x1-n.x2)),i===o?t.canvasLayout.linkDirection===me?e.y1<e.y2?1:-1:e.x1<e.x2?1:-1:i<o?1:-1}))}},{key:"applyMinInitialLine",value:function(e,t){var n=e.layout.minInitialLine;t.forEach((function(e){e.minInitialLineForElbow=n,n+=e.srcObj.layout.minInitialLineIncrement}))}},{key:"getNewLinkAssocVariation",value:function(e,t,n){return"input"===n&&e>t?Q:"output"===n&&e<t?J:te}},{key:"getAssocLinkVariation",value:function(e,t){var n=e.layout.minInitialLine;return t.x_pos>=e.x_pos+e.width+n?J:e.x_pos>=t.x_pos+t.width+n?Q:te}},{key:"getPortArrowPath",value:function(e){return"M -2 3 L 2 0 -2 -3"}},{key:"getPortArrowPathTransform",value:function(e){var t=this.getAngleBasedOnLinkDirection();return"translate(".concat(e.cx,", ").concat(e.cy,") rotate(").concat(t,")")}},{key:"getArrowHead",value:function(e){return e.type===B?"string"==typeof this.canvasLayout.commentLinkArrowHead?this.canvasLayout.commentLinkArrowHead:"M -8 3 L 0 0 -8 -3":"string"==typeof this.canvasLayout.dataLinkArrowHead?this.canvasLayout.dataLinkArrowHead:"M -6 6 L 0 0 -6 -6"}},{key:"getArrowHeadTransform",value:function(e){var t=this.canvasLayout.linkType===X?this.getAngleBasedOnLinkDirection():Math.atan2(e.y2-e.y1,e.x2-e.x1)*(180/Math.PI);return"translate(".concat(e.x2,", ").concat(e.y2,") rotate(").concat(t,")")}},{key:"getAngleBasedOnLinkDirection",value:function(){return this.canvasLayout.linkDirection===Z?90:this.canvasLayout.linkDirection===K?-90:0}},{key:"getSelectedNodesAndComments",value:function(){var e=this,t=[];return this.activePipeline.nodes.forEach((function(n){e.objectModel.getSelectedObjectIds().includes(n.id)&&t.push(n)})),this.activePipeline.comments.forEach((function(n){e.objectModel.getSelectedObjectIds().includes(n.id)&&t.push(n)})),t}},{key:"getSelectedLinks",value:function(){var e=this,t=[];return this.activePipeline.links.forEach((function(n){e.objectModel.getSelectedObjectIds().includes(n.id)&&t.push(n)})),t}},{key:"canOpenTip",value:function(e){return this.canvasController.isTipEnabled(e)&&!this.selecting&&!this.regionSelect&&!this.dragging&&!this.commentSizing&&!this.nodeSizing&&!this.drawingNewLinkData}},{key:"getSvgViewportOffset",value:function(){var e=this.canvasLayout.addCommentOffset,t=this.canvasLayout.addCommentOffset;return this.zoomTransform&&(e=this.zoomTransform.x/this.zoomTransform.k,t=this.zoomTransform.y/this.zoomTransform.k,e=-e+this.canvasLayout.addCommentOffset,t=-t+this.canvasLayout.addCommentOffset),{x_pos:e,y_pos:t}}},{key:"getFlags",value:function(){var e="Flags:";return this.dragging&&(e+=" dragging = true"),this.nodeSizing&&(e+=" nodeSizing = true"),this.commentSizing&&(e+=" commentSizing = true"),this.movingBindingNodes&&(e+=" movingBindingNodes = true"),this.selecting&&(e+=" selecting = true"),this.regionSelect&&(e+=" regionSelect = true"),"Flags:"===e&&(e+=" None set to true"),e}}]),n}(),_l=ft,kl=gt;var Pl=function(e,t,n){return n="function"==typeof n?n:void 0,_l(e,t,kl(t),n)},Il=ft,Nl=gt;var wl=function(e,t){return e===t||Il(e,t,Nl(t))},Cl={nodeLayout:{defaultNodeWidth:160,defaultNodeHeight:40,nodeShape:"port-arcs",bodyPath:null,selectionPath:null,imageDisplay:!0,imageWidth:26,imageHeight:26,imagePosition:"topLeft",imagePosX:6,imagePosY:7,labelWidth:112,labelHeight:19,labelPosition:"topLeft",labelPosX:36,labelPosY:12,labelEditable:!1,labelAlign:"left",labelSingleLine:!0,labelOutline:!1,labelMaxCharacters:null,labelAllowReturnKey:!1,decorations:[],decoratorTopY:2,decoratorMiddleY:-8,decoratorBottomY:-18,decoratorLeftX:2,decoratorCenterX:-8,decoratorRightX:-30,decoratorWidth:16,decoratorHeight:16,decoratorPadding:2,decoratorLabelWidth:80,decoratorLabelHeight:15,dropShadow:!0,nodeHighlightGap:1,nodeSizingArea:10,errorPosition:"topLeft",errorXPos:24,errorYPos:5,errorWidth:10.5,errorHeight:10.5,nodeCornerResizeArea:10,drawNodeLinkLineFromTo:"node_center",drawCommentLinkLineTo:"node_center",minInitialLine:30,minInitialLineIncrement:8,minFinalLine:30,inputPortDisplay:!0,inputPortObject:"circle",inputPortImage:"",inputPortWidth:12,inputPortHeight:12,inputPortLeftPosX:0,inputPortLeftPosY:20,inputPortTopPosX:80,inputPortTopPosY:0,inputPortBottomPosX:80,inputPortBottomPosY:0,inputPortGuideObject:"circle",inputPortGuideImage:"",outputPortDisplay:!0,outputPortObject:"circle",outputPortImage:"",outputPortWidth:12,outputPortHeight:12,outputPortRightPosX:0,outputPortRightPosY:20,outputPortTopPosX:80,outputPortTopPosY:0,outputPortBottomPosX:80,outputPortBottomPosY:0,outputPortGuideObject:"circle",outputPortGuideImage:"",portRadius:3,portArcOffset:3,portArcRadius:6,portArcSpacing:3,ellipsisDisplay:!0,ellipsisPosition:"topLeft",ellipsisWidth:10,ellipsisHeight:22,ellipsisPosX:145,ellipsisPosY:9,ellipsisHoverAreaPadding:2},canvasLayout:{supernodeLabelPosX:30,supernodeLabelPosY:4,supernodeLabelWidth:50,supernodeLabelHeight:20,supernodeImageWidth:18,supernodeImageHeight:18,supernodeImagePosX:5,supernodeImagePosY:4,supernodeEllipsisPosX:-34,supernodeEllipsisPosY:2,supernodeEllipsisWidth:10,supernodeEllipsisHeight:20,supernodeExpansionIconPosX:-21,supernodeExpansionIconPosY:4,supernodeExpansionIconHeight:18,supernodeExpansionIconWidth:18,supernodeExpansionIconHoverAreaPadding:2,supernodeErrorPosX:-50,supernodeErrorPosY:5,supernodeErrorWidth:14,supernodeErrorHeight:14,supernodeDefaultWidth:300,supernodeDefaultHeight:200,supernodeMinWidth:100,supernodeMinHeight:80,supernodeTopAreaHeight:25,supernodeSVGAreaPadding:3,supernodeBindingPortRadius:6,linkDirection:"LeftRight",displayLinkOnOverlap:!0,linkGap:7,linkDecoratorHeight:20,linkDecoratorWidth:20,linkDecoratorPadding:2,linkDecoratorLabelWidth:80,linkDecoratorLabelHeight:15,elbowSize:10,wrapAroundSpacing:20,wrapAroundNodePadding:10,linkType:"Curve",commentLinkArrowHead:!1,dataLinkArrowHead:!1,linkStartHandleObject:"circle",linkStartHandleImage:"",linkStartHandleWidth:12,linkStartHandleHeight:12,linkStartHandleRadius:5,linkEndHandleObject:"circle",linkEndHandleImage:"",linkEndHandleWidth:12,linkEndHandleHeight:12,linkEndHandleRadius:5,commentCornerResizeArea:10,commentHighlightGap:1,commentSizingArea:10,addCommentOffset:30,commentPortRadius:5,alwaysDisplayBackToParentFlow:!1,zoomToFitPadding:10,snapToGridType:"None",snapToGridX:"20%",snapToGridY:"33.33%",nodeProximity:20,ghostAreaPadding:10,initialPanX:null,initialPanY:null,autoLayoutInitialMarginX:50,autoLayoutInitialMarginY:50,autoLayoutVerticalSpacing:80,autoLayoutHorizontalSpacing:80}},Sl={nodeLayout:{defaultNodeWidth:70,defaultNodeHeight:75,nodeShape:"rectangle",bodyPath:null,selectionPath:null,imageDisplay:!0,imageWidth:48,imageHeight:48,imagePosition:"topLeft",imagePosX:11,imagePosY:6,labelWidth:72,labelHeight:19,labelPosition:"topLeft",labelPosX:35,labelPosY:55,labelEditable:!1,labelAlign:"center",labelSingleLine:!0,labelOutline:!1,labelMaxCharacters:null,labelAllowReturnKey:!1,decorations:[],decoratorTopY:5,decoratorMiddleY:-8,decoratorBottomY:-34,decoratorLeftX:10,decoratorCenterX:-8,decoratorRightX:-24,decoratorWidth:16,decoratorHeight:16,decoratorPadding:2,decoratorLabelWidth:80,decoratorLabelHeight:15,dropShadow:!1,nodeHighlightGap:4,nodeSizingArea:10,errorPosition:"topLeft",errorXPos:45,errorYPos:5,errorWidth:14,errorHeight:14,nodeCornerResizeArea:10,drawNodeLinkLineFromTo:"node_center",drawCommentLinkLineTo:"node_center",minInitialLine:30,minInitialLineIncrement:8,minFinalLine:30,inputPortDisplay:!0,inputPortObject:"circle",inputPortImage:"",inputPortWidth:12,inputPortHeight:12,inputPortLeftPosX:0,inputPortLeftPosY:29,inputPortTopPosX:35,inputPortTopPosY:0,inputPortBottomPosX:35,inputPortBottomPosY:0,inputPortGuideObject:"circle",inputPortGuideImage:"",outputPortDisplay:!0,outputPortObject:"circle",outputPortImage:"",outputPortWidth:12,outputPortHeight:12,outputPortRightPosX:0,outputPortRightPosY:29,outputPortTopPosX:35,outputPortTopPosY:0,outputPortBottomPosX:35,outputPortBottomPosY:0,outputPortGuideObject:"circle",outputPortGuideImage:"",portRadius:6,portArcOffset:0,portArcRadius:10,portArcSpacing:0,ellipsisDisplay:!0,ellipsisPosition:"topLeft",ellipsisWidth:11,ellipsisHeight:21,ellipsisPosX:57,ellipsisPosY:4,ellipsisHoverAreaPadding:2},canvasLayout:{supernodeLabelPosX:30,supernodeLabelPosY:4,supernodeLabelWidth:50,supernodeLabelHeight:20,supernodeImageWidth:18,supernodeImageHeight:18,supernodeImagePosX:5,supernodeImagePosY:4,supernodeEllipsisPosX:-34,supernodeEllipsisPosY:2,supernodeEllipsisWidth:10,supernodeEllipsisHeight:20,supernodeExpansionIconPosX:-21,supernodeExpansionIconPosY:4,supernodeExpansionIconHeight:18,supernodeExpansionIconWidth:18,supernodeExpansionIconHoverAreaPadding:2,supernodeErrorPosX:-50,supernodeErrorPosY:5,supernodeErrorWidth:14,supernodeErrorHeight:14,supernodeDefaultWidth:200,supernodeDefaultHeight:200,supernodeMinWidth:100,supernodeMinHeight:80,supernodeTopAreaHeight:25,supernodeSVGAreaPadding:3,supernodeBindingPortRadius:10,linkDirection:"LeftRight",displayLinkOnOverlap:!0,linkGap:7,linkDecoratorHeight:20,linkDecoratorWidth:20,linkDecoratorPadding:2,linkDecoratorLabelWidth:80,linkDecoratorLabelHeight:15,elbowSize:10,wrapAroundSpacing:20,wrapAroundNodePadding:10,linkType:"Curve",commentLinkArrowHead:!1,dataLinkArrowHead:!1,linkStartHandleObject:"circle",linkStartHandleImage:"",linkStartHandleWidth:12,linkStartHandleHeight:12,linkStartHandleRadius:6,linkEndHandleObject:"circle",linkEndHandleImage:"",linkEndHandleWidth:12,linkEndHandleHeight:12,linkEndHandleRadius:6,commentCornerResizeArea:10,commentHighlightGap:4,commentSizingArea:10,addCommentOffset:30,commentPortRadius:5,alwaysDisplayBackToParentFlow:!1,zoomToFitPadding:10,snapToGridType:"None",snapToGridX:"25%",snapToGridY:"20%",nodeProximity:20,ghostAreaPadding:10,initialPanX:null,initialPanY:null,autoLayoutInitialMarginX:50,autoLayoutInitialMarginY:50,autoLayoutVerticalSpacing:80,autoLayoutHorizontalSpacing:80}},Ll=function(){function n(){e(this,n)}return t(n,null,[{key:"getLayout",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.getDefaultLayout(e);return e&&(n=this.overrideNodeLayout(n,t),n=this.overrideCanvasLayout(n,e,t),n=this.overrideLinkType(n,e),n=this.overrideSnapToGrid(n,e),n=this.overrideAutoLayout(n,e)),n}},{key:"getDefaultLayout",value:function(e){var t;return t=e&&"Vertical"===e.enableNodeFormatType?Sl:Cl,Object.assign({},t)}},{key:"overrideNodeLayout",value:function(e,t){return e.nodeLayout=Object.assign({},e.nodeLayout,t.nodeLayout||{}),e}},{key:"overrideCanvasLayout",value:function(e,t,n){return e.canvasLayout=Object.assign({},e.canvasLayout,{linkDirection:t.enableLinkDirection},n.canvasLayout||{}),e}},{key:"overrideLinkType",value:function(e,t){return e.canvasLayout.linkType=t.enableLinkType||e.canvasLayout.linkType||"Curve",e}},{key:"overrideSnapToGrid",value:function(e,t){return t.enableSnapToGridType&&(e.canvasLayout.snapToGridType=t.enableSnapToGridType),e.canvasLayout.snapToGridX=t.enableSnapToGridX||e.canvasLayout.snapToGridX||"25%",e.canvasLayout.snapToGridY=t.enableSnapToGridY||e.canvasLayout.snapToGridY||"20%",e.canvasLayout.snapToGridXPx=this.getSnapToGridSize(e.canvasLayout.snapToGridX,e.nodeLayout.defaultNodeWidth),e.canvasLayout.snapToGridYPx=this.getSnapToGridSize(e.canvasLayout.snapToGridY,e.nodeLayout.defaultNodeHeight),e}},{key:"overrideAutoLayout",value:function(e,t){return e.canvasLayout.autoLayoutVerticalSpacing=this.getAutoLayoutSpacing(t.enableAutoLayoutVerticalSpacing,e.canvasLayout.autoLayoutVerticalSpacing),e.canvasLayout.autoLayoutHorizontalSpacing=this.getAutoLayoutSpacing(t.enableAutoLayoutHorizontalSpacing,e.canvasLayout.autoLayoutHorizontalSpacing),e}},{key:"getAutoLayoutSpacing",value:function(e,t){var n=80;return null!=e?n=e:null!=t&&(n=t),n}},{key:"getSnapToGridSize",value:function(e,t){return e.endsWith("%")?Number.parseInt(e,10)/100*t:Number.parseInt(e,10)}}]),n}(),xl=function(){function n(){e(this,n)}return t(n,null,[{key:"mergeCanvasConfigs",value:function(e,t){var n=Object.assign({},e,t||{});if(t){var i=Ll.getLayout(n,{nodeLayout:t.enableNodeLayout,canvasLayout:t.enableCanvasLayout}),o=Object.assign({},e.tipConfig,t.tipConfig);n=Object.assign({},n,{enableNodeLayout:i.nodeLayout,enableCanvasLayout:i.canvasLayout,tipConfig:o})}return n}},{key:"getDefaultCanvasConfig",value:function(){var e={enableInteractionType:"Mouse",enableNodeFormatType:"Horizontal",enableLinkType:"Curve",enableLinkDirection:"LeftRight",enableLinkSelection:de,enableLinkReplaceOnNewConnection:!1,enableAssocLinkCreation:!1,enableAssocLinkType:H,enableDragWithoutSelect:!1,enableDragToMoveSizeNodesComments:!0,enableInternalObjectModel:!0,enablePaletteLayout:"Flyout",enableToolbarLayout:"Top",enableInsertNodeDroppedOnLink:!1,enableHighlightNodeOnNewLinkDrag:!1,enableHighlightUnavailableNodes:!1,enableMoveNodesOnSupernodeResize:!0,enableExternalPipelineFlows:!0,enableDisplayFullLabelOnHover:!1,enableDropZoneOnExternalDrag:!1,enableRightFlyoutUnderToolbar:!1,enablePanIntoViewOnOpen:!1,enableZoomIntoSubFlows:!1,enableBrowserEditMenu:!0,enableAutoLinkOnlyFromSelNodes:!1,enableSaveZoom:"None",enableSnapToGridType:"None",enableSnapToGridX:null,enableSnapToGridY:null,enableAutoLayoutVerticalSpacing:null,enableAutoLayoutHorizontalSpacing:null,enableSingleOutputPortDisplay:!1,enableNarrowPalette:!0,schemaValidation:!1,enableBoundingRectangles:!1,enableCanvasUnderlay:"None",enableParentClass:"",enablePositionNodeOnRightFlyoutOpen:!1,emptyCanvasContent:null,dropZoneCanvasContent:null,enableNodeLayout:{},enableCanvasLayout:{},tipConfig:{palette:!0,nodes:!0,ports:!0,decorations:!0,links:!0,stateTag:!0}},t=Ll.getLayout(e);return e.enableNodeLayout=t.nodeLayout,e.enableCanvasLayout=t.canvasLayout,e}},{key:"compareCanvasConfigs",value:function(e,t){var n=this,i=!1;return Object.keys(e).length===Object.keys(t).length&&(i=Pl(e,t,(function(e,t,i){switch(i){case"enablePositionNodeOnRightFlyoutOpen":return n.enableNodeRightFlyoutOpenExactlyMatches(e,t);case"enableCanvasLayout":return n.enableCanvasLayoutExactlyMatches(e,t);case"enableNodeLayout":return n.enableNodeLayoutExactlyMatches(e,t);case"tipConfig":return n.enableTipConfigExactlyMatches(e,t);default:return e===t}}))),i}},{key:"enableNodeRightFlyoutOpenExactlyMatches",value:function(e,t){return"boolean"==typeof e&&"boolean"==typeof t?e===t:"object"===r(e)&&"object"===r(t)&&e.x===t.x&&e.y===t.y}},{key:"enableCanvasLayoutExactlyMatches",value:function(e,t){return!e&&!t||!(!this.compareFieldCount(e,t)||!wl(e,t))}},{key:"enableNodeLayoutExactlyMatches",value:function(e,t){return!e&&!t||!!(this.compareFieldCount(e,t)&&wl(e,t)&&this.decorationsArraysExactlyMatches(e.decorations,t.decorations))}},{key:"decorationsArraysExactlyMatches",value:function(e,t){if(!e&&!t)return!0;if(!e||!t)return!1;var n=!0;return e.forEach((function(e,i){var o=t[i];o&&wl(e,o)&&wl(o,e)||(n=!1)})),n}},{key:"enableTipConfigExactlyMatches",value:function(e,t){return!e&&!t||!(!e||!t)&&(this.compareFieldCount(e,t)&&wl(e,t))}},{key:"compareFieldCount",value:function(e,t){return Object.keys(e).length===Object.keys(t).length}}]),n}(),Tl=function(){function n(t,i,o,a){e(this,n),this.logger=new Zn(["SVGCanvasD3","FlowId",t.id]),this.logger.logStartTimer("constructor"),this.mousePos={x:0,y:0},this.canvasController=a,this.canvasDiv=this.initializeCanvasDiv(i),this.logger.logEndTimer("constructor",!0),document.addEventListener("mousemove",this.onMouseUpdate.bind(this),!0)}return t(n,[{key:"close",value:function(){document.removeEventListener("mousemove",this.onMouseUpdate,!0)}},{key:"setCanvasInfo",value:function(e,t){if(this.logger=new Zn(["SVGCanvasD3","FlowId",e.id]),this.config&&this.renderer&&this.canvasInfo&&e.id===this.canvasInfo.id&&(!this.renderer||this.renderer.pipelineId===this.canvasController.getCurrentBreadcrumb().pipelineId)&&xl.compareCanvasConfigs(this.config,t))this.logger.logStartTimer("set canvas info"),this.canvasInfo=this.cloneCanvasInfo(e),this.renderer.setCanvasInfoRenderer(this.canvasInfo),this.logger.logEndTimer("set canvas info",!0);else{this.logger.logStartTimer("initializing"),this.canvasInfo=this.cloneCanvasInfo(e),this.config=this.cloneConfig(t),this.renderer&&(this.renderer.clearCanvas(),this.renderer=null);var n=this.canvasController.getCurrentBreadcrumb();this.renderer=new bl(n.pipelineId,this.canvasDiv,this.canvasController,this.canvasInfo,t,{id:n.supernodeId,pipelineId:n.supernodeParentPipelineId}),this.logger.logEndTimer("initializing",!0)}}},{key:"cloneConfig",value:function(e){return Object.assign({},e)}},{key:"cloneCanvasInfo",value:function(e){return ht(e)}},{key:"onMouseUpdate",value:function(e){"svg-area"===e.target.className.baseVal||"d3-svg-background"===e.target.className.baseVal?this.mousePos={x:e.clientX,y:e.clientY}:this.mousePos=null}},{key:"initializeCanvasDiv",value:function(e){var t=this;return jo(e).on("keydown",(function(e){t.canvasController.closeTip();var n=t.canvasController.getKeyboardConfig().actions;t.renderer.isEditingText()||t.renderer.isDragging()||(8!==e.keyCode&&46!==e.keyCode||!n.delete?cl.isCmndCtrlPressed(e)&&!e.shiftKey&&90===e.keyCode&&n.undo?(cl.stopPropagationAndPreventDefault(e),t.canvasController.keyboardActionHandler("undo")):cl.isCmndCtrlPressed(e)&&(e.shiftKey&&90===e.keyCode||89===e.keyCode&&n.redo)?(cl.stopPropagationAndPreventDefault(e),t.canvasController.keyboardActionHandler("redo")):cl.isCmndCtrlPressed(e)&&65===e.keyCode&&n.selectAll?(cl.stopPropagationAndPreventDefault(e),t.canvasController.keyboardActionHandler("selectAll")):cl.isCmndCtrlPressed(e)&&67===e.keyCode&&n.copyToClipboard?(cl.stopPropagationAndPreventDefault(e),t.canvasController.keyboardActionHandler("copy")):cl.isCmndCtrlPressed(e)&&88===e.keyCode&&n.cutToClipboard?(cl.stopPropagationAndPreventDefault(e),t.canvasController.keyboardActionHandler("cut")):cl.isCmndCtrlPressed(e)&&86===e.keyCode&&n.pasteFromClipboard?(cl.stopPropagationAndPreventDefault(e),t.mousePos?(t.mousePos=t.renderer.convertPageCoordsToCanvasCoords(t.mousePos.x,t.mousePos.y),t.mousePos=t.renderer.getMousePosSnapToGrid(t.mousePos),t.canvasController.keyboardActionHandler("paste",t.mousePos)):t.canvasController.keyboardActionHandler("paste")):cl.isCmndCtrlPressed(e)&&e.shiftKey&&e.altKey&&80===e.keyCode&&(cl.stopPropagationAndPreventDefault(e),Zn.switchLoggingState()):(cl.stopPropagationAndPreventDefault(e),t.canvasController.keyboardActionHandler("deleteSelectedObjects")))}))}},{key:"nodeTemplateDraggedOver",value:function(e,t,n){this.renderer.nodeTemplateDraggedOver(e,t,n)}},{key:"nodeTemplateDropped",value:function(e,t,n){this.renderer.nodeTemplateDropped(e,t,n)}},{key:"externalObjectDropped",value:function(e,t,n){this.renderer.externalObjectDropped(e,t,n)}},{key:"zoomTo",value:function(e){this.renderer.zoomTo(e)}},{key:"translateBy",value:function(e,t,n){this.renderer.translateBy(e,t,n)}},{key:"zoomIn",value:function(){this.renderer.zoomIn()}},{key:"zoomOut",value:function(){this.renderer.zoomOut()}},{key:"zoomToFit",value:function(){this.renderer.zoomToFit()}},{key:"getZoomToReveal",value:function(e,t,n){return this.renderer?this.renderer.getZoomToReveal(e,t,n):null}},{key:"getZoom",value:function(){return this.renderer?this.renderer.getZoom():null}},{key:"refreshOnSizeChange",value:function(){this.renderer&&this.renderer.refreshOnSizeChange()}},{key:"getSvgViewportOffset",value:function(){return this.renderer.getSvgViewportOffset()}},{key:"getTransformedViewportDimensions",value:function(){return this.renderer.getTransformedViewportDimensions()}},{key:"getGhostNode",value:function(e){return this.renderer.getGhostNode(e)}}]),n}();function El(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,a=i(e);if(t){var r=i(this).constructor;n=Reflect.construct(a,arguments,r)}else n=a.apply(this,arguments);return o(this,n)}}var Ol=function(i){n(r,i);var o=El(r);function r(t){var n;return e(this,r),(n=o.call(this,t)).state={isDropZoneDisplayed:!1},n.logger=new Zn("CC-Contents"),n.mainCanvasDivId="canvas-div-"+n.props.canvasController.getInstanceId(),n.svgCanvasDivId="d3-svg-canvas-div-"+n.props.canvasController.getInstanceId(),n.svgCanvasDivSelector="#"+n.svgCanvasDivId,n.dragX=null,n.dragY=null,n.eventListenersAdded=!1,n.drop=n.drop.bind(a(n)),n.focusOnCanvas=n.focusOnCanvas.bind(a(n)),n.setIsDropZoneDisplayed=n.setIsDropZoneDisplayed.bind(a(n)),n.dragOver=n.dragOver.bind(a(n)),n.dragEnter=n.dragEnter.bind(a(n)),n.dragLeave=n.dragLeave.bind(a(n)),n.refreshOnSizeChange=n.refreshOnSizeChange.bind(a(n)),n.getLabel=n.getLabel.bind(a(n)),n.onCut=n.onCut.bind(a(n)),n.onCopy=n.onCopy.bind(a(n)),n.onPaste=n.onPaste.bind(a(n)),n.first=!1,n.second=!1,n.afterUpdateCallbacks=[],t.canvasController.setCanvasContents(a(n)),n}return t(r,[{key:"componentDidMount",value:function(){this.logger.log("componentDidMount"),this.svgCanvasD3=new Tl(this.props.canvasInfo,this.svgCanvasDivSelector,this.props.canvasConfig,this.props.canvasController),this.svgCanvasD3.setCanvasInfo(this.props.canvasInfo,this.props.canvasConfig),this.props.canvasConfig.enableBrowserEditMenu&&this.addEventListeners(),this.focusOnCanvas()}},{key:"componentDidUpdate",value:function(){this.logger.log("componentDidUpdate"),this.svgCanvasD3&&!this.isDropZoneDisplayed()&&(this.svgCanvasD3.setCanvasInfo(this.props.canvasInfo,this.props.canvasConfig),this.afterUpdate()),this.props.canvasConfig.enableBrowserEditMenu?this.addEventListeners():this.removeEventListeners()}},{key:"componentWillUnmount",value:function(){this.removeEventListeners(),this.svgCanvasD3.close()}},{key:"onCut",value:function(e){e.currentTarget.activeElement.id===this.svgCanvasDivId&&(e.preventDefault(),this.props.canvasController.cutToClipboard())}},{key:"onCopy",value:function(e){e.currentTarget.activeElement.id===this.svgCanvasDivId&&(e.preventDefault(),this.props.canvasController.copyToClipboard())}},{key:"onPaste",value:function(e){e.currentTarget.activeElement.id===this.svgCanvasDivId&&(e.preventDefault(),this.props.canvasController.pasteFromClipboard())}},{key:"getLabel",value:function(e){return this.props.intl.formatMessage({id:e,defaultMessage:pi[e]})}},{key:"getDNDJson",value:function(e){try{return JSON.parse(e.dataTransfer.getData(_))}catch(e){return this.logger.warn("The dragged object's data does not conform to the expected internal format: "+e),null}}},{key:"getSVGCanvasD3",value:function(){return this.svgCanvasD3}},{key:"getStateTag",value:function(){var e=null;return this.props.canvasConfig.enableStateTag!==R&&this.props.canvasConfig.enableStateTag!==M||(e=s.createElement(mi,{stateTagType:this.props.canvasConfig.enableStateTag,canvasController:this.props.canvasController})),e}},{key:"getEmptyCanvas",value:function(){var e=null;return this.props.canvasController.isPrimaryPipelineEmpty()&&(e=this.props.canvasConfig.emptyCanvasContent?s.createElement("div",{className:"empty-canvas"},this.props.canvasConfig.emptyCanvasContent):s.createElement("div",{className:"empty-canvas"},s.createElement("div",{className:"empty-canvas-image"},s.createElement(Dt,null)),s.createElement("span",{className:"empty-canvas-text1"},this.getLabel("canvas.flowIsEmpty")),s.createElement("span",{className:"empty-canvas-text2"},this.getLabel("canvas.addNodeToStart")))),e}},{key:"getContextMenu",value:function(){return s.createElement(gi,{canvasController:this.props.canvasController,containingDivId:this.mainCanvasDivId})}},{key:"getDropZone",value:function(){var e=null;return this.isDropZoneDisplayed()&&(e=this.props.canvasConfig.dropZoneCanvasContent?this.props.canvasConfig.dropZoneCanvasContent:s.createElement("div",null,s.createElement("div",{className:"dropzone-canvas"}),s.createElement("div",{className:"dropzone-canvas-rect"}))),e}},{key:"getSVGCanvasDiv",value:function(){return s.createElement("div",{tabIndex:"-1",className:"d3-svg-canvas-div",id:this.svgCanvasDivId})}},{key:"setIsDropZoneDisplayed",value:function(e){e!==this.state.isDropZoneDisplayed&&this.setState({isDropZoneDisplayed:e})}},{key:"isDropZoneDisplayed",value:function(){return this.props.canvasConfig.enableDropZoneOnExternalDrag&&this.state.isDropZoneDisplayed}},{key:"isDataTypeBeingDraggedFile",value:function(e){return!(!e.dataTransfer||!Array.isArray(e.dataTransfer.types))&&e.dataTransfer.types.includes("Files")}},{key:"afterUpdate",value:function(){this.afterUpdateCallbacks.forEach((function(e){return e()}))}},{key:"addAfterUpdateCallback",value:function(e){-1===this.afterUpdateCallbacks.findIndex((function(t){return t===e}))&&this.afterUpdateCallbacks.push(e)}},{key:"removeAfterUpdateCallback",value:function(e){var t=this.afterUpdateCallbacks.findIndex((function(t){return t===e}));t>-1&&this.afterUpdateCallbacks.splice(t,1)}},{key:"addEventListeners",value:function(){this.eventListenersAdded||(document.addEventListener("cut",this.onCut,!0),document.addEventListener("copy",this.onCopy,!0),document.addEventListener("paste",this.onPaste,!0),this.eventListenersAdded=!0)}},{key:"removeEventListeners",value:function(){this.eventListenersAdded&&(document.removeEventListener("cut",this.onCut,!0),document.removeEventListener("copy",this.onCopy,!0),document.removeEventListener("paste",this.onPaste,!0),this.eventListenersAdded=!1)}},{key:"drop",value:function(e){e.preventDefault(),this.first=!1,this.second=!1,this.setIsDropZoneDisplayed(!1);var t=this.props.canvasController.getDragNodeTemplate();if(t)this.svgCanvasD3.nodeTemplateDropped(t,e.clientX,e.clientY);else{var n=this.getDNDJson(e);n||(n={operation:"addToCanvas",data:{dataTransfer:e.dataTransfer,editType:"createFromExternalObject"}}),this.svgCanvasD3.externalObjectDropped(n,e.clientX,e.clientY)}this.props.canvasController.setDragNodeTemplate(null),e.dataTransfer.clearData()}},{key:"dragOver",value:function(e){var t=this.props.canvasController.getDragNodeTemplate();!t||this.dragX===e.clientX&&this.dragY===e.clientY||(this.dragX=e.clientX,this.dragY=e.clientY,this.svgCanvasD3.nodeTemplateDraggedOver(t,e.clientX,e.clientY))}},{key:"dragEnter",value:function(e){this.dragX=null,this.dragY=null,this.isDataTypeBeingDraggedFile(e)&&(this.first?this.second=!0:(this.first=!0,this.setIsDropZoneDisplayed(!0))),e.preventDefault()}},{key:"dragLeave",value:function(e){this.isDataTypeBeingDraggedFile(e)&&(this.second?this.second=!1:this.first&&(this.first=!1),this.first||this.second||this.setIsDropZoneDisplayed(!1)),e.preventDefault()}},{key:"focusOnCanvas",value:function(){document.getElementById(this.svgCanvasDivId)&&document.getElementById(this.svgCanvasDivId).focus()}},{key:"refreshOnSizeChange",value:function(){this.svgCanvasD3&&this.svgCanvasD3.refreshOnSizeChange()}},{key:"render",value:function(){this.logger.log("render");var e=this.getStateTag(),t=this.getEmptyCanvas(),n=this.getContextMenu(),i=this.getDropZone(),o=this.getSVGCanvasDiv(),a=this.props.canvasConfig.enableRightFlyoutUnderToolbar?"common-canvas-main":null,r=this.props.canvasConfig.enableRightFlyoutUnderToolbar?"common-canvas-drop-div-under-toolbar":"common-canvas-drop-div";return r="None"===this.props.canvasConfig.enableToolbarLayout?r+" common-canvas-toolbar-none":r,r=this.props.bottomPanelIsOpen?r+" common-canvas-bottom-panel-is-open":r,s.createElement("main",{"aria-label":this.getLabel("canvas.label"),role:"main",className:a},s.createElement(xt,{handleWidth:!0,handleHeight:!0,onResize:this.refreshOnSizeChange},s.createElement("div",{id:this.mainCanvasDivId,className:r,onDrop:this.drop,onDragOver:this.dragOver,onDragEnter:this.dragEnter,onDragLeave:this.dragLeave},t,o,n,i,e)))}}]),r}(s.Component);Ol.propTypes={intl:u.object.isRequired,canvasController:u.object.isRequired,canvasConfig:u.object.isRequired,canvasInfo:u.object,bottomPanelIsOpen:u.bool};var Dl=l((function(e,t){return{canvasInfo:e.canvasinfo,canvasConfig:e.canvasconfig,bottomPanelIsOpen:e.bottompanel.isOpen,selectionInfo:e.selectioninfo,breadcrumbs:e.breadcrumbs}}))(d(Ol));function jl(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,a=i(e);if(t){var r=i(this).constructor;n=Reflect.construct(a,arguments,r)}else n=a.apply(this,arguments);return o(this,n)}}var Al=function(i){n(r,i);var o=jl(r);function r(t){var n;return e(this,r),(n=o.call(this,t)).getLabel=n.getLabel.bind(a(n)),n.toolbarActionHandler=n.toolbarActionHandler.bind(a(n)),n.logger=new Zn("CC-Toolbar"),n}return t(r,[{key:"getLabel",value:function(e){var t=pi[e]?pi[e]:ot[e];return this.props.intl.formatMessage({id:e,defaultMessage:t})}},{key:"getDefaultToolbar",value:function(){return{leftBar:[{action:"undo",label:this.getLabel("canvas.undo"),enable:!0},{action:"redo",label:this.getLabel("canvas.redo"),enable:!0},{action:"cut",label:this.getLabel("edit.cutSelection"),enable:!0},{action:"copy",label:this.getLabel("edit.copySelection"),enable:!0},{action:"paste",label:this.getLabel("edit.pasteSelection"),enable:!0},{action:"createAutoComment",label:this.getLabel("canvas.addComment"),enable:!0},{action:"deleteSelectedObjects",label:this.getLabel("canvas.deleteObject"),enable:!0}],rightBar:[{action:"zoomIn",label:this.getLabel("toolbar.zoomIn"),enable:!0},{action:"zoomOut",label:this.getLabel("toolbar.zoomOut"),enable:!0},{action:"zoomToFit",label:this.getLabel("toolbar.zoomToFit"),enable:!0}]}}},{key:"getConvertedLegacyToolbar",value:function(e){return{leftBar:e,rightBar:this.getDefaultRightBar()}}},{key:"getDefaultRightBar",value:function(){return[{action:"zoomIn",label:this.getLabel("toolbar.zoomIn"),enable:!0},{action:"zoomOut",label:this.getLabel("toolbar.zoomOut"),enable:!0},{action:"zoomToFit",label:this.getLabel("toolbar.zoomToFit"),enable:!0}]}},{key:"getNotificationClassName",value:function(){var e=this.props.canvasController.getNotificationMessagesMaxType(),t=Pe;return e===j?t+=" error":e===A?t+=" warning":e===Ie?t+=" success":e===Ne&&(t+=" info"),t}},{key:"generateToolbarConfig",value:function(){var e=this.copyConfig();return e?Array.isArray(e)?e=this.getConvertedLegacyToolbar(e):void 0===e.rightBar&&(e.rightBar=this.getDefaultRightBar()):e=this.getDefaultToolbar(),e=Object.assign({},e,{leftBar:this.optionallyAddPaletteTool(e.leftBar||[])},{rightBar:this.optionallyAddNotificationTool(e.rightBar||[])})}},{key:"copyConfig",value:function(){if(!this.props.config)return null;if(Array.isArray(this.props.config))return tt(this.props.config);var e={};return this.props.config.overrideAutoEnableDisable&&(e.overrideAutoEnableDisable=!0),this.props.config&&this.props.config.leftBar&&(e.leftBar=tt(this.props.config.leftBar)),this.props.config&&this.props.config.rightBar&&(e.rightBar=tt(this.props.config.rightBar)),e}},{key:"toolbarActionHandler",value:function(e){this.props.canvasController.toolbarActionHandler(e)}},{key:"optionallyAddPaletteTool",value:function(e){var t=this.getLabel("toolbar.palette"),n=e;return e&&e.length>0&&"palette"===e[0].action&&(t=e[0].label?e[0].label:t,n=e.slice(1),e.length>1&&e[1].divider&&(n=e.slice(2))),this.props.isPaletteEnabled?[{action:"togglePalette",label:t,enable:!0,iconTypeOverride:this.props.isPaletteOpen?"paletteClose":"paletteOpen"},{divider:!0}].concat(n):n}},{key:"optionallyAddNotificationTool",value:function(e){if(this.props.notificationConfig&&void 0!==this.props.notificationConfig.action&&void 0!==this.props.notificationConfig.enable){var t=this.props.notificationMessages.length,n=[{divider:!0},{action:be.TOOLBAR_TOGGLE_NOTIFICATION_PANEL,label:this.props.notificationConfig.label,enable:!0,className:this.getNotificationClassName(),textContent:t>9?"9+":t.toString()}];return e.concat(n)}return e}},{key:"configureToolbarButtonsState",value:function(e){return!this.props.enableInternalObjectModel||e.overrideAutoEnableDisable||void 0!==e&&(this.applyToolState("undo",e,this.props.canUndo),this.applyToolState("redo",e,this.props.canRedo),this.applyToolState("cut",e,this.props.canCutCopy),this.applyToolState("copy",e,this.props.canCutCopy),this.applyToolState("paste",e,this.props.canPaste),this.applyToolState("deleteSelectedObjects",e,this.props.canDelete)),e}},{key:"addUndoRedoCommandLabels",value:function(e){var t=this.props.undoLabel,n=this.props.redoLabel;if(t){var i=this.findTool("undo",e);i&&(i.label+=": "+t)}if(n){var o=this.findTool("redo",e);o&&(o.label+=": "+n)}return e}},{key:"applyToolState",value:function(e,t,n){var i=this.findTool(e,t);i?i.enable=n:this.logger.log("Toolbar tool "+e+" could not be found to set state to "+n)}},{key:"findTool",value:function(e,t){var n={};return t.leftBar&&(n=t.leftBar.find((function(t){return t.action===e}))),!n&&t.rightBar&&(n=t.rightBar.find((function(t){return t.action===e}))),n}},{key:"render",value:function(){this.logger.log("render");var e=this.generateToolbarConfig();e=this.configureToolbarButtonsState(e),e=this.addUndoRedoCommandLabels(e);var t=null;return this.props.enableToolbarLayout===_e&&(t=s.createElement(it,{config:e,instanceId:this.props.canvasController.getInstanceId(),toolbarActionHandler:this.toolbarActionHandler,additionalText:{overflowMenuLabel:this.getLabel("toolbar.overflowMenu")},isAssociatedPanelOpen:this.props.isNotificationOpen,associatedPanelAction:be.TOOLBAR_TOGGLE_NOTIFICATION_PANEL})),t}}]),r}(s.Component);Al.propTypes={intl:u.object.isRequired,canvasController:u.object.isRequired,enableToolbarLayout:u.string.isRequired,config:u.oneOfType([u.array.isRequired,u.object.isRequired]),isPaletteEnabled:u.bool,isPaletteOpen:u.bool,isNotificationOpen:u.bool,notificationMessages:u.array,notificationConfig:u.object,enableInternalObjectModel:u.bool,canUndo:u.bool,canRedo:u.bool,canCutCopy:u.bool,canPaste:u.bool,canDelete:u.bool,undoLabel:u.string,redoLabel:u.string};var Ml=l((function(e,t){return{enableToolbarLayout:e.canvasconfig.enableToolbarLayout,config:e.canvastoolbar.config,isPaletteEnabled:e.canvasconfig.enablePaletteLayout!==ke,isPaletteOpen:e.palette.isOpen,isNotificationOpen:e.notificationpanel.isOpen,notificationConfig:e.notificationpanel.config,notificationMessages:e.notifications,enableInternalObjectModel:e.canvasconfig.enableInternalObjectModel,canUndo:t.canvasController.canUndo(),canRedo:t.canvasController.canRedo(),canCutCopy:t.canvasController.canCutCopy(),canPaste:t.canvasController.canPaste(),canDelete:t.canvasController.canDelete(),undoLabel:t.canvasController.getUndoLabel(),redoLabel:t.canvasController.getRedoLabel()}}))(d(Al));function Rl(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,a=i(e);if(t){var r=i(this).constructor;n=Reflect.construct(a,arguments,r)}else n=a.apply(this,arguments);return o(this,n)}}var Ul=function(i){n(a,i);var o=Rl(a);function a(t){var n;return e(this,a),(n=o.call(this,t)).logger=new Zn("CC-RightFlyout"),n}return t(a,[{key:"render",value:function(){this.logger.log("render");var e=s.createElement("div",{className:"right-flyout-panel"});if(this.props.content&&this.props.isOpen){var t=this.props.enableRightFlyoutUnderToolbar?"right-flyout-panel under-toolbar":"right-flyout-panel";e=s.createElement("div",{className:t},this.props.content)}return e}}]),a}(s.Component);Ul.propTypes={isOpen:u.bool,content:u.object,enableRightFlyoutUnderToolbar:u.bool};var Fl=l((function(e,t){return{isOpen:e.rightflyout.isOpen,content:e.rightflyout.content,enableRightFlyoutUnderToolbar:e.canvasconfig.enableRightFlyoutUnderToolbar}}))(Ul);function zl(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,a=i(e);if(t){var r=i(this).constructor;n=Reflect.construct(a,arguments,r)}else n=a.apply(this,arguments);return o(this,n)}}var Bl=function(i){n(r,i);var o=zl(r);function r(t){var n;return e(this,r),(n=o.call(this,t)).state={panelHeight:393},n.resizing=!1,n.logger=new Zn("CC-Bottom-Panel"),n.startResize=n.startResize.bind(a(n)),n.stopResize=n.stopResize.bind(a(n)),n.resize=n.resize.bind(a(n)),n}return t(r,[{key:"componentDidMount",value:function(){}},{key:"componentWillUnmount",value:function(){}},{key:"startResize",value:function(e){this.resizing=!0}},{key:"stopResize",value:function(e){this.resizing=!1}},{key:"resize",value:function(e){this.resizing&&this.setState({panelHeight:this.state.panelHeight+e.movementY})}},{key:"render",value:function(){this.logger.log("render");var e=null,t={height:this.state.panelHeight+"px"};return this.props.bottomPanelIsOpen&&(e=s.createElement("div",{className:"bottom-panel",style:t},this.props.bottomPanelContent)),e}}]),r}(s.Component);Bl.propTypes={intl:u.object.isRequired,canvasController:u.object.isRequired,bottomPanelIsOpen:u.bool,bottomPanelContent:u.object};var Hl=l((function(e,t){return{bottomPanelIsOpen:e.bottompanel.isOpen,bottomPanelContent:e.bottompanel.content}}))(d(Bl));function Gl(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,a=i(e);if(t){var r=i(this).constructor;n=Reflect.construct(a,arguments,r)}else n=a.apply(this,arguments);return o(this,n)}}var ql=function(i){n(r,i);var o=Gl(r);function r(t){var n;return e(this,r),(n=o.call(this,t)).state={},n.logger=new Zn("NotificationPanel"),n.handleNotificationPanelClickOutside=n.handleNotificationPanelClickOutside.bind(a(n)),n.closeNotificationPanel=n.closeNotificationPanel.bind(a(n)),n}return t(r,[{key:"componentDidMount",value:function(){document.addEventListener("click",this.handleNotificationPanelClickOutside,!0)}},{key:"componentWillUnmount",value:function(){document.removeEventListener("click",this.handleNotificationPanelClickOutside,!0)}},{key:"getNotifications",value:function(){var e=[];if(!this.props.messages)return e;for(var t=0;t<this.props.messages.length;t++){var n=this.props.messages[t],i=n.callback?" clickable ":"",o=n.type,a=s.createElement("div",{className:"notification-message-type"},s.createElement(N,{type:o,className:"notification-message-icon-".concat(o)})),r=n.title?s.createElement("div",{className:"notification-message-title"},n.title):null,l=n.subtitle?s.createElement("div",{className:"notification-message-subtitle"},n.subtitle,s.createElement("hr",null)):null,c=n.closeMessage?s.createElement("div",{className:"notification-message-close",onClick:this.deleteNotification.bind(this,n.id)},n.closeMessage):null,d=n.timestamp?s.createElement("div",{className:"notification-message-timestamp"},s.createElement("div",{className:"notification-message-timestamp-icon"},s.createElement(N,{type:"time"})),s.createElement("div",{className:"notification-message-string"},n.timestamp)):null;e.push(s.createElement("div",{className:"notifications-button-container",key:t+"-"+n.id},s.createElement("div",{className:"notifications "+i+n.type,onClick:this.notificationCallback.bind(this,n.id,n.callback)},a,s.createElement("div",{className:"notification-message-details"},r,l,s.createElement("div",{className:"notification-message-content"},n.content),d,c))))}return e}},{key:"handleNotificationPanelClickOutside",value:function(e){if(this.props.isNotificationOpen&&this.props.notificationConfig&&!this.props.notificationConfig.keepOpen){var t=document.getElementsByClassName(Pe)[0],n=document.getElementsByClassName("notification-panel-header")[0],i=document.getElementsByClassName("notification-panel-messages-container")[0];t&&!t.contains(e.target)&&n&&!n.contains(e.target)&&i&&!i.contains(e.target)&&(this.props.canvasController.toolbarActionHandler("closeNotificationPanel"),e.stopPropagation())}}},{key:"notificationCallback",value:function(e,t){t&&t(e)}},{key:"deleteNotification",value:function(e){this.props.canvasController.deleteNotificationMessages(e)}},{key:"clearNotificationMessages",value:function(){this.props.canvasController.clearNotificationMessages(),"function"==typeof this.props.notificationConfig.clearAllCallback&&this.props.notificationConfig.clearAllCallback()}},{key:"closeNotificationPanel",value:function(){this.props.canvasController.toolbarActionHandler("closeNotificationPanel")}},{key:"render",value:function(){if(this.logger.log("render"),!this.props.notificationConfig)return null;var e=this.props.isNotificationOpen?"":"panel-hidden",t=this.props.notificationConfig&&this.props.notificationConfig.notificationHeader?this.props.notificationConfig.notificationHeader:we,n=this.props.notificationConfig&&this.props.notificationConfig.notificationSubtitle?s.createElement("div",{className:"notification-panel-subtitle"},this.props.notificationConfig.notificationSubtitle):null,i=this.props.messages.length>0?this.getNotifications():s.createElement("div",{className:"notification-panel-empty-message-container"},s.createElement("div",{className:"notification-panel-empty-message"},this.props.notificationConfig&&this.props.notificationConfig.emptyMessage?this.props.notificationConfig.emptyMessage:null)),o=this.props.notificationConfig&&this.props.notificationConfig.clearAllMessage?s.createElement("div",{className:"notification-panel-clear-all-container"},s.createElement(St,{className:"notification-panel-clear-all",onClick:this.clearNotificationMessages.bind(this),kind:"ghost",size:"small",disabled:0===this.props.messages.length},this.props.notificationConfig.clearAllMessage)):null;return s.createElement("div",{className:"notification-panel-container "+e},s.createElement("div",{className:"notification-panel"},s.createElement("div",{className:"notification-panel-header-container"},s.createElement("div",{className:"notification-panel-header"},t,s.createElement(jt,{className:"notification-panel-close-icon",onClick:this.closeNotificationPanel})),n),s.createElement("div",{className:"notification-panel-messages-container"},s.createElement("div",{className:"notification-panel-messages"},i),o)))}}],[{key:"getDerivedStateFromProps",value:function(e,t){return e.messages!==t.messages?{messages:e.messages}:{}}}]),r}(s.Component);ql.propTypes={canvasController:u.object,notificationConfig:u.shape({notificationHeader:u.oneOfType([u.string,u.object]),notificationSubtitle:u.oneOfType([u.string,u.object]),emptyMessage:u.oneOfType([u.string,u.object]),clearAllMessage:u.oneOfType([u.string,u.object]),clearAllCallback:u.func,keepOpen:u.bool}),isNotificationOpen:u.bool,messages:u.array};var Vl=l((function(e,t){return{notificationConfig:e.notificationpanel.config,isNotificationOpen:e.notificationpanel.isOpen,messages:e.notifications}}))(ql);function Yl(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,a=i(e);if(t){var r=i(this).constructor;n=Reflect.construct(a,arguments,r)}else n=a.apply(this,arguments);return o(this,n)}}var Wl=function(i){n(a,i);var o=Yl(a);function a(t){var n;return e(this,a),(n=o.call(this,t)).logger=new Zn("CC-CentralItems"),n}return t(a,[{key:"render",value:function(){this.logger.log("render");var e=s.createElement(Fl,null),t=s.createElement(Ml,{canvasController:this.props.canvasController}),n=s.createElement(Vl,{canvasController:this.props.canvasController}),i=s.createElement(Dl,{canvasController:this.props.canvasController}),o=s.createElement(Hl,{canvasController:this.props.canvasController});return this.props.enableRightFlyoutUnderToolbar?s.createElement("div",{className:"common-canvas-right-side-items-under-toolbar"},t,s.createElement("div",{id:this.props.containingDivId,className:"common-canvas-items-container-under-toolbar"},s.createElement("div",{className:"common-canvas-with-bottom-panel"},i,o),s.createElement("div",null,e),n)):s.createElement("div",{className:"common-canvas-right-side-items"},s.createElement("div",{id:this.props.containingDivId,className:"common-canvas-items-container"},t,i,o,n),e)}}]),a}(s.Component);Wl.propTypes={canvasController:u.object.isRequired,containingDivId:u.string.isRequired,enableRightFlyoutUnderToolbar:u.bool};var Xl=l((function(e,t){return{enableRightFlyoutUnderToolbar:e.canvasconfig.enableRightFlyoutUnderToolbar}}))(Wl);function $l(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,a=i(e);if(t){var r=i(this).constructor;n=Reflect.construct(a,arguments,r)}else n=a.apply(this,arguments);return o(this,n)}}var Zl=function(i){n(r,i);var o=$l(r);function r(t){var n;return e(this,r),(n=o.call(this,t)).logger=new Zn(["CommonCanvas"]),n.logger.log("constructor"),n.initializeController=n.initializeController.bind(a(n)),n.containingDivId="common-canvas-items-container-"+t.canvasController.getInstanceId(),t.canvasController.setIntl(t.intl),n.initializeController(t),n}return t(r,[{key:"componentDidUpdate",value:function(){this.logger.log("componentDidUpdate"),this.initializeController(this.props)}},{key:"onDragOver",value:function(e){e.preventDefault()}},{key:"onDrop",value:function(e){e.preventDefault()}},{key:"initializeController",value:function(e){this.logger.logStartTimer("initializeController"),e.canvasController.setCanvasConfig(e.config),e.canvasController.setContextMenuConfig(e.contextMenuConfig),e.canvasController.setKeyboardConfig(e.keyboardConfig),e.canvasController.setToolbarConfig(e.toolbarConfig),e.canvasController.setNotificationPanelConfig(e.notificationConfig),e.canvasController.setRightFlyoutConfig({content:e.rightFlyoutContent,isOpen:e.showRightFlyout}),e.canvasController.setBottomPanelConfig({content:e.bottomPanelContent,isOpen:e.showBottomPanel}),e.canvasController.setHandlers({contextMenuHandler:e.contextMenuHandler,beforeEditActionHandler:e.beforeEditActionHandler,editActionHandler:e.editActionHandler,clickActionHandler:e.clickActionHandler,decorationActionHandler:e.decorationActionHandler,tipHandler:e.tipHandler,layoutHandler:e.layoutHandler,idGeneratorHandler:e.idGeneratorHandler,selectionChangeHandler:e.selectionChangeHandler,actionLabelHandler:e.actionLabelHandler}),this.logger.logEndTimer("initializeController")}},{key:"render",value:function(){this.logger.log("render");var e=s.createElement(ui,{canvasController:this.props.canvasController}),t=s.createElement(li,{canvasController:this.props.canvasController,containingDivId:this.containingDivId}),n=s.createElement(Xl,{canvasController:this.props.canvasController,containingDivId:this.containingDivId}),i="common-canvas"+(this.props.config&&this.props.config.enableParentClass?" "+this.props.config.enableParentClass:"");return s.createElement(c,{store:this.props.canvasController.getStore()},s.createElement("div",{className:i,onDragOver:this.onDragOver,onDrop:this.onDrop},t,n,e))}}]),r}(s.Component);Zl.propTypes={intl:u.object.isRequired,canvasController:u.object.isRequired,config:u.object,toolbarConfig:u.oneOfType([u.array,u.object]),notificationConfig:u.object,contextMenuConfig:u.object,keyboardConfig:u.object,contextMenuHandler:u.func,beforeEditActionHandler:u.func,editActionHandler:u.func,clickActionHandler:u.func,decorationActionHandler:u.func,tipHandler:u.func,layoutHandler:u.func,idGeneratorHandler:u.func,selectionChangeHandler:u.func,rightFlyoutContent:u.object,showRightFlyout:u.bool,bottomPanelContent:u.object,showBottomPanel:u.bool};var Kl=d(Zl);function Jl(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,a=i(e);if(t){var r=i(this).constructor;n=Reflect.construct(a,arguments,r)}else n=a.apply(this,arguments);return o(this,n)}}var Ql=function(i){n(a,at);var o=Jl(a);function a(t,n,i,r){var s;return e(this,a),(s=o.call(this,r)).data=t,s.objectModel=n,s.labelUtil=i,s.layoutDirection=r,s.apiPipeline=s.objectModel.getAPIPipeline(),s.existingNodes=s.apiPipeline.getNodes().map((function(e){return Object.assign({},e)})),s}return t(a,[{key:"do",value:function(){this.apiPipeline.autoLayout(this.layoutDirection)}},{key:"undo",value:function(){this.apiPipeline.replaceNodes(this.existingNodes)}},{key:"redo",value:function(){this.apiPipeline.autoLayout(this.layoutDirection)}},{key:"getLabel",value:function(){return this.labelUtil.getActionLabel(this,"action.arrangeLayout")}}]),a}();function ec(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,a=i(e);if(t){var r=i(this).constructor;n=Reflect.construct(a,arguments,r)}else n=a.apply(this,arguments);return o(this,n)}}var tc=function(i){n(a,at);var o=ec(a);function a(t,n,i){var r;return e(this,a),(r=o.call(this,t)).data=t,r.objectModel=n,r.labelUtil=i,r.apiPipeline=r.objectModel.getAPIPipeline(t.pipelineId),r.node=t.node,r.linksToUpdateInfo=cl.getDetachedLinksToUpdate(r.node,r.data.detachedLinks,r.apiPipeline.getNodeDataLinks()),r}return t(a,[{key:"getData",value:function(){return this.data.linksToUpdateInfo=this.linksToUpdateInfo,this.data}},{key:"do",value:function(){this.apiPipeline.moveObjects({nodes:[this.node.id],offsetX:this.data.offsetX,offsetY:this.data.offsetY}),this.apiPipeline.updateLinks(this.linksToUpdateInfo.newLinks)}},{key:"undo",value:function(){this.apiPipeline.updateLinks(this.linksToUpdateInfo.oldLinks),this.apiPipeline.moveObjects({nodes:[this.node.id],offsetX:-this.data.offsetX,offsetY:-this.data.offsetY})}},{key:"redo",value:function(){this.do()}},{key:"getLabel",value:function(){return this.labelUtil.getActionLabel(this,"action.attachNodeToLinks",{node_label:this.node.label})}}]),a}();function nc(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,a=i(e);if(t){var r=i(this).constructor;n=Reflect.construct(a,arguments,r)}else n=a.apply(this,arguments);return o(this,n)}}var ic=function(i){n(a,at);var o=nc(a);function a(t,n,i){var r;e(this,a),(r=o.call(this,t)).data=t,r.objectModel=n,r.labelUtil=i,r.apiPipeline=r.objectModel.getAPIPipeline(t.pipelineId),r.pipelineFlowLoaded=r.objectModel.ensurePipelineIsLoaded(r.data),r.oldSupernode=r.apiPipeline.getNode(r.data.targetObject.id),r.oldPipelines=r.objectModel.getDescPipelinesToDelete([r.oldSupernode],r.data.pipelineId),r.oldPipelines=r.oldPipelines.filter((function(e){return e.parentUrl===r.data.externalUrl})),r.oldExtPipelineFlows=r.objectModel.getExternalPipelineFlowsForPipelines(r.oldPipelines),r.newSupernode=Object.assign({},r.oldSupernode,{subflow_ref:Object.assign({},r.oldSupernode.subflow_ref)}),r.newSupernode.image=r.newSupernode.image===I?P:r.newSupernode.image,delete r.newSupernode.subflow_ref.url;var s=r.objectModel.getDescendantPipelinesForSupernode(r.newSupernode).filter((function(e){return e.parentUrl===r.data.externalUrl}));return r.newPipelines=r.objectModel.cloneSupernodeContents(r.newSupernode,s),r.newPipelines=r.newPipelines.map((function(e){return delete e.parentUrl,e})),r}return t(a,[{key:"do",value:function(){this.objectModel.replaceSupernodeAndPipelines({pipelineId:this.data.pipelineId,topSupernode:this.newSupernode,pipelinesToAdd:this.newPipelines,pipelinesToRemove:this.oldPipelines,extPipelineFlowsToAdd:[],extPipelineFlowsToDelete:this.oldExtPipelineFlows})}},{key:"undo",value:function(){this.objectModel.replaceSupernodeAndPipelines({pipelineId:this.data.pipelineId,topSupernode:this.oldSupernode,pipelinesToAdd:this.oldPipelines,pipelinesToRemove:this.newPipelines,extPipelineFlowsToAdd:this.oldExtPipelineFlows,extPipelineFlowsToDelete:[]})}},{key:"redo",value:function(){this.do()}},{key:"getLabel",value:function(){return this.labelUtil.getActionLabel(this,"action.convertSuperNodeExternalToLocal",{node_label:this.oldSupernode.label})}}]),a}();function oc(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,a=i(e);if(t){var r=i(this).constructor;n=Reflect.construct(a,arguments,r)}else n=a.apply(this,arguments);return o(this,n)}}var ac=function(i){n(a,at);var o=oc(a);function a(t,n,i){var r;e(this,a),(r=o.call(this,t)).data=t,r.objectModel=n,r.labelUtil=i,r.apiPipeline=r.objectModel.getAPIPipeline(t.pipelineId),r.oldSupernode=r.apiPipeline.getNode(r.data.targetObject.id),r.newSupernode=Object.assign({},r.oldSupernode,{subflow_ref:Object.assign({},r.oldSupernode.subflow_ref)}),r.newSupernode.image=r.newSupernode.image===P?I:r.newSupernode.image,r.newSupernode.subflow_ref.url=r.data.externalUrl;var s=r.objectModel.getDescendantPipelinesForSupernode(r.oldSupernode);return r.oldPipelines=s.filter((function(e){return!e.parentUrl})),r.newPipelines=r.objectModel.cloneSupernodeContents(r.newSupernode,r.oldPipelines),r.newPipelines=r.newPipelines.map((function(e){return e.parentUrl=r.data.externalUrl,e})),r.newPipelineFlow=r.objectModel.createExternalPipelineFlowTemplate(r.data.pipelineFlowId,r.newSupernode.subflow_ref.pipeline_id_ref),r.newPipelineFlow.pipelines=[],r.newPipelineFlow.url=r.data.externalUrl,r}return t(a,[{key:"do",value:function(){this.objectModel.replaceSupernodeAndPipelines({pipelineId:this.data.pipelineId,topSupernode:this.newSupernode,pipelinesToAdd:this.newPipelines,pipelinesToRemove:this.oldPipelines,extPipelineFlowsToAdd:[this.newPipelineFlow],extPipelineFlowsToDelete:[]})}},{key:"undo",value:function(){this.objectModel.replaceSupernodeAndPipelines({pipelineId:this.data.pipelineId,topSupernode:this.oldSupernode,pipelinesToAdd:this.oldPipelines,pipelinesToRemove:this.newPipelines,extPipelineFlowsToAdd:[],extPipelineFlowsToDelete:[this.newPipelineFlow]})}},{key:"redo",value:function(){this.do()}},{key:"getLabel",value:function(){return this.labelUtil.getActionLabel(this,"action.convertSuperNodeLocalToExternal",{node_label:this.oldSupernode.label})}}]),a}();function rc(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,a=i(e);if(t){var r=i(this).constructor;n=Reflect.construct(a,arguments,r)}else n=a.apply(this,arguments);return o(this,n)}}var sc=function(i){n(a,at);var o=rc(a);function a(t,n,i,r){var s;return e(this,a),(s=o.call(this,t)).data=t,s.labelUtil=i,s.objectModel=n,s.apiPipeline=s.objectModel.getAPIPipeline(t.pipelineId),s.srcNode=s.apiPipeline.getAutoSourceNode(r),s.newNode=s.apiPipeline.createAutoNode(t,s.srcNode),s.newLink=null,s.apiPipeline.isLinkNeededWithAutoNode(s.newNode,s.srcNode)&&(s.newLink=s.apiPipeline.createLink(s.newNode,s.srcNode)),s}return t(a,[{key:"getData",value:function(){return this.data.sourceNode=this.srcNode,this.data.newNode=this.newNode,this.data.newLink=this.newLink,this.data.subPipeline=this.subPipelines,this.data}},{key:"do",value:function(){this.apiPipeline.addNode(this.newNode),this.newLink&&this.apiPipeline.addLink(this.newLink),this.objectModel.setSelections([this.newNode.id],this.data.pipelineId)}},{key:"undo",value:function(){this.apiPipeline.deleteNodes([this.newNode])}},{key:"redo",value:function(){this.do()}},{key:"getLabel",value:function(){return this.labelUtil.getActionLabel(this,"action.createNode",{node_label:this.newNode.label})}}]),a}();function lc(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,a=i(e);if(t){var r=i(this).constructor;n=Reflect.construct(a,arguments,r)}else n=a.apply(this,arguments);return o(this,n)}}var cc=function(i){n(a,at);var o=lc(a);function a(t,n,i,r){var s;if(e(this,a),(s=o.call(this,t)).data=t,s.objectModel=n,s.labelUtil=i,s.apiPipeline=s.objectModel.getAPIPipeline(t.pipelineId),r){var l=s.apiPipeline.getNewCommentPosition(r);s.data.mousePos={x:l.x_pos,y:l.y_pos}}return s.comment=s.apiPipeline.createComment(t),s}return t(a,[{key:"getData",value:function(){return this.data.commentId=this.comment.id,this.data}},{key:"do",value:function(){this.apiPipeline.addComment(this.comment)}},{key:"undo",value:function(){this.apiPipeline.deleteComment(this.comment.id)}},{key:"redo",value:function(){this.apiPipeline.addComment(this.comment)}},{key:"getLabel",value:function(){return this.labelUtil.getActionLabel(this,"action.createComment")}}]),a}();function dc(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,a=i(e);if(t){var r=i(this).constructor;n=Reflect.construct(a,arguments,r)}else n=a.apply(this,arguments);return o(this,n)}}var uc=function(i){n(a,at);var o=dc(a);function a(t,n,i){var r;return e(this,a),(r=o.call(this,t)).data=t,r.objectModel=n,r.labelUtil=i,r.apiPipeline=r.objectModel.getAPIPipeline(t.pipelineId),r.linkCommentList=r.apiPipeline.createCommentLinks(t),r}return t(a,[{key:"getData",value:function(){return this.data.linkIds=this.linkCommentList.map((function(e){return e.id})),this.data.linkType="comment",this.data}},{key:"do",value:function(){this.apiPipeline.addLinks(this.linkCommentList)}},{key:"undo",value:function(){var e=this;this.linkCommentList.forEach((function(t){e.apiPipeline.deleteLink(t)}))}},{key:"redo",value:function(){this.do()}},{key:"getLabel",value:function(){return this.labelUtil.getActionLabel(this,"action.createCommentLink")}}]),a}();function pc(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,a=i(e);if(t){var r=i(this).constructor;n=Reflect.construct(a,arguments,r)}else n=a.apply(this,arguments);return o(this,n)}}var hc=function(i){n(a,at);var o=pc(a);function a(t,n,i){var r;return e(this,a),(r=o.call(this,t)).data=t,r.objectModel=n,r.labelUtil=i,r.apiPipeline=r.objectModel.getAPIPipeline(t.pipelineId),r.newNode=r.apiPipeline.createNode(t),r}return t(a,[{key:"getData",value:function(){return this.data.newNode=this.newNode,this.data.subPipelines=this.subPipelines,this.data}},{key:"do",value:function(){this.apiPipeline.addNode(this.newNode)}},{key:"undo",value:function(){this.apiPipeline.deleteNodes([this.newNode])}},{key:"redo",value:function(){this.do()}},{key:"getLabel",value:function(){return this.labelUtil.getActionLabel(this,"action.createNode",{node_label:this.newNode.label})}}]),a}();function fc(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,a=i(e);if(t){var r=i(this).constructor;n=Reflect.construct(a,arguments,r)}else n=a.apply(this,arguments);return o(this,n)}}var gc=function(i){n(a,at);var o=fc(a);function a(t,n,i){var r;return e(this,a),(r=o.call(this,t)).data=t,r.objectModel=n,r.labelUtil=i,r.apiPipeline=r.objectModel.getAPIPipeline(t.pipelineId),r.actionLabel=r.createActionLabel(),r}return t(a,[{key:"getData",value:function(){return this.data.linkIds=this.linkNodeList.map((function(e){return e.id})),this.data.linkType="data",this.data}},{key:"do",value:function(){this.data.replaceLink&&this.apiPipeline.deleteLink(this.data.replaceLink),this.linkNodeList=this.apiPipeline.createNodeLinks(this.data),this.apiPipeline.addLinks(this.linkNodeList)}},{key:"undo",value:function(){var e=this;this.linkNodeList.forEach((function(t){e.apiPipeline.deleteLink(t)})),this.data.replaceLink&&this.apiPipeline.addLinks([this.data.replaceLink])}},{key:"redo",value:function(){this.data.replaceLink&&this.apiPipeline.deleteLink(this.data.replaceLink),this.apiPipeline.addLinks(this.linkNodeList)}},{key:"getLabel",value:function(){return this.actionLabel}},{key:"createActionLabel",value:function(){var e=this.getTargetNodeLabel();return this.data.replaceLink?this.labelUtil.getActionLabel(this,"action.replaceNodeLink",{node_label:e}):this.labelUtil.getActionLabel(this,"action.createNodeLink",{node_label:e})}},{key:"getTargetNodeLabel",value:function(){return(this.data.targetNodes&&this.data.targetNodes.length>0?this.apiPipeline.getNode(this.data.targetNodes[0].id):{}).label}}]),a}();function yc(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,a=i(e);if(t){var r=i(this).constructor;n=Reflect.construct(a,arguments,r)}else n=a.apply(this,arguments);return o(this,n)}}var vc=function(i){n(a,at);var o=yc(a);function a(t,n,i){var r;return e(this,a),(r=o.call(this,t)).data=t,r.objectModel=n,r.labelUtil=i,r.apiPipeline=r.objectModel.getAPIPipeline(t.pipelineId),r.detachedLink=r.apiPipeline.createNodeLinkDetached(t),r}return t(a,[{key:"getData",value:function(){return this.data}},{key:"do",value:function(){this.apiPipeline.addLinks([this.detachedLink])}},{key:"undo",value:function(){this.apiPipeline.deleteLink(this.detachedLink)}},{key:"redo",value:function(){this.do()}},{key:"getLabel",value:function(){return this.labelUtil.getActionLabel(this,"action.createNodeLinkDetached")}}]),a}();function mc(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,a=i(e);if(t){var r=i(this).constructor;n=Reflect.construct(a,arguments,r)}else n=a.apply(this,arguments);return o(this,n)}}var bc=function(i){n(a,at);var o=mc(a);function a(t,n,i){var r;return e(this,a),(r=o.call(this,t)).data=t,r.objectModel=n,r.labelUtil=i,r.apiPipeline=r.objectModel.getAPIPipeline(t.pipelineId),r.newNode=r.apiPipeline.createNode(t),r.firstLinkSrcInfo={id:t.link.srcNodeId,portId:t.link.srcNodePortId},r.firstLinkTrgInfo={id:r.newNode.id},r.secondLinkSrcInfo={id:r.newNode.id},r.secondLinkTrgInfo={id:t.link.trgNodeId,portId:t.link.trgNodePortId},r}return t(a,[{key:"getData",value:function(){return this.data.newNode=this.newNode,this.data.newFirstLink=this.firstLink,this.data.newSecondLink=this.secondLink,this.data}},{key:"do",value:function(){this.apiPipeline.deleteLink({id:this.data.link.id}),this.apiPipeline.addNode(this.newNode),this.firstLink=this.apiPipeline.createNodeLink(this.firstLinkSrcInfo,this.firstLinkTrgInfo,{type:"nodeLink"}),this.secondLink=this.apiPipeline.createNodeLink(this.secondLinkSrcInfo,this.secondLinkTrgInfo,{type:"nodeLink"}),this.apiPipeline.addLinks([this.firstLink,this.secondLink])}},{key:"undo",value:function(){this.apiPipeline.deleteLink({id:this.firstLink.id}),this.apiPipeline.deleteLink({id:this.secondLink.id}),this.apiPipeline.deleteNodes([this.newNode]),this.apiPipeline.addLinks([this.data.link])}},{key:"redo",value:function(){this.apiPipeline.deleteLink({id:this.data.link.id}),this.apiPipeline.addNode(this.newNode),this.apiPipeline.addLinks([this.firstLink,this.secondLink])}},{key:"getLabel",value:function(){return this.labelUtil.getActionLabel(this,"action.createNodeOnLink",{node_label:this.newNode.label})}}]),a}();function _c(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,a=i(e);if(t){var r=i(this).constructor;n=Reflect.construct(a,arguments,r)}else n=a.apply(this,arguments);return o(this,n)}}var kc=function(i){n(a,at);var o=_c(a);function a(t,n,i){var r;return e(this,a),(r=o.call(this,t)).data=t,r.objectModel=n,r.labelUtil=i,r.apiPipeline=r.objectModel.getAPIPipeline(t.pipelineId),r.newNode=r.apiPipeline.createNode(t),r.linksToUpdateInfo=cl.getDetachedLinksToUpdate(r.newNode,r.data.detachedLinks,r.apiPipeline.getNodeDataLinks()),r}return t(a,[{key:"getData",value:function(){return this.data.newNode=this.newNode,this.data.linksToUpdateInfo=this.linksToUpdateInfo,this.data}},{key:"do",value:function(){this.apiPipeline.addNode(this.newNode),this.apiPipeline.updateLinks(this.linksToUpdateInfo.newLinks)}},{key:"undo",value:function(){this.apiPipeline.updateLinks(this.linksToUpdateInfo.oldLinks),this.apiPipeline.deleteNodes([this.newNode])}},{key:"redo",value:function(){this.do()}},{key:"getLabel",value:function(){return this.labelUtil.getActionLabel(this,"action.createNodeAttachLinks",{node_label:this.newNode.label})}}]),a}();function Pc(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return Ic(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ic(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,r=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return r=e.done,e},e:function(e){s=!0,a=e},f:function(){try{r||null==n.return||n.return()}finally{if(s)throw a}}}}function Ic(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function Nc(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,a=i(e);if(t){var r=i(this).constructor;n=Reflect.construct(a,arguments,r)}else n=a.apply(this,arguments);return o(this,n)}}var wc=function(i){n(a,at);var o=Nc(a);function a(t,n,i){var r;e(this,a),(r=o.call(this,t)).labelUtil=i,r.data=t,r.objectModel=n,r.apiPipeline=r.objectModel.getAPIPipeline(t.pipelineId),r.subflowNodes=r.objectModel.getSelectedNodes(),r.subflowComments=r.objectModel.getSelectedComments(),r.subflowRect=r.apiPipeline.getBoundingRectForNodes(r.subflowNodes),r.subflowLinks=[],r.linksToDelete=[],r.commentLinks=[],r.data.selectedObjectIds.forEach((function(e){r.apiPipeline.getLinksContainingId(e).forEach((function(e){r.subflowLinks.find((function(t){return t.id===e.id}))||(e.type===F||e.type===U?r.subflowLinks.push(e):r.commentLinks.find((function(t){return t.id===e.id}))||e.type!==B||r.commentLinks.push(e))}))})),r.commentLinks.forEach((function(e){var t=r.apiPipeline.getComment(e.srcNodeId);r.apiPipeline.isObjectIdInObjects(t.id,r.subflowComments)?r.subflowLinks.push(e):r.apiPipeline.isCommentLinkedToNonSelectedNodes(t.id)?(r.linksToDelete.push(e),r.subflowLinks=r.subflowLinks.filter((function(t){return t.id!==e.id}))):(r.subflowLinks.push(e),r.subflowComments.push(t))})),r.commentsToUnlinkFromUnselectedNodes=[];var s,l=Pc(r.subflowComments);try{for(l.s();!(s=l.n()).done;){var c=s.value;r.apiPipeline.isCommentLinkedToNonSelectedNodes(c.id)&&r.commentsToUnlinkFromUnselectedNodes.push(c)}}catch(e){l.e(e)}finally{l.f()}r.commentsToUnlinkFromUnselectedNodes.forEach((function(e){r.apiPipeline.getLinksContainingId(e.id).forEach((function(e){r.apiPipeline.isObjectIdInObjects(e.trgNodeId,r.subflowNodes)||r.apiPipeline.isObjectIdInObjects(e.id,r.linksToDelete)||r.removeLinkFromSubflow(e,!0)}))})),r.supernodeInputLinks=[],r.supernodeOutputLinks=[],r.apiPipeline.getNodeLinks(r.subflowNodes).forEach((function(e){r.apiPipeline.isObjectIdInObjects(e.srcNodeId,r.subflowNodes)||r.supernodeInputLinks.find((function(t){return t.id===e.trgNodeId}))||(e.type===U?r.removeLinkFromSubflow(e,!0):r.supernodeInputLinks.push(e)),r.apiPipeline.isObjectIdInObjects(e.trgNodeId,r.subflowNodes)||r.supernodeOutputLinks.find((function(t){return t.id===e.srcNodeId}))||(e.type===U?r.removeLinkFromSubflow(e,!0):r.supernodeOutputLinks.push(e))})),r.supernodeInputLinksModified=r.reorderSupernodeLinks(r.supernodeInputLinks,"input"),r.supernodeOutputLinksModified=r.reorderSupernodeLinks(r.supernodeOutputLinks,"output"),r.supernodeInputLinksModified.forEach((function(e){r.removeLinkFromSubflow(e,!1)})),r.supernodeOutputLinksModified.forEach((function(e){r.removeLinkFromSubflow(e,!1)})),r.subPipeline=r.objectModel.createPipeline(r.subflowNodes,r.subflowComments,r.subflowLinks),r.subAPIPipeline=r.objectModel.getAPIPipeline(r.subPipeline.id),r.createBindingNodeData=[],r.supernode=r.createSupernode(),r.linkSrcDefs=[],r.linkTrgDefs=[],r.supernodeInputLinksModified.forEach((function(e){r.apiPipeline.isObjectIdInObjects(e.srcNodeId,r.subflowNodes)||(r.linkSrcDefs.push({id:e.srcNodeId,portId:e.srcNodePortId}),r.linkTrgDefs.push({id:r.supernode.id,portId:e.trgNodePortId?e.trgNodeId+"_"+e.trgNodePortId:e.trgNodePortId}))})),r.supernodeOutputLinksModified.forEach((function(e){r.apiPipeline.isObjectIdInObjects(e.trgNodeId,r.subflowNodes)||(r.linkSrcDefs.push({id:r.supernode.id,portId:e.srcNodePortId?e.srcNodeId+"_"+e.srcNodePortId:e.srcNodePortId}),r.linkTrgDefs.push({id:e.trgNodeId,portId:e.trgNodePortId}))})),r.supernodeBindingNodesMappedToParentFlowData=[],r.supernodeEntryBindingNodes=[],r.supernodeExitBindingNodes=[];var d=80,u=r.subflowRect.y-d,p=r.subflowRect.y-d;if(r.createBindingNodeData.forEach((function(e){var t=Object.assign({},e.port);if("entry"===e.type){var n={x:r.subflowRect.x-160,y:u+=d};t.id=t.id?"output_"+t.id:t.id;var i=r.createBindingNode(e.link,{outputs:[t]},n);r.supernodeBindingNodesMappedToParentFlowData[i.id]={portId:e.port.id,link:e.link},i.isSupernodeInputBinding=!0,r.supernodeEntryBindingNodes.push(i)}else{var o={x:r.subflowRect.x+r.subflowRect.width+d,y:p+=d};t.id=t.id?"input_"+t.id:t.id;var a=r.createBindingNode(e.link,{inputs:[t]},o);r.supernodeBindingNodesMappedToParentFlowData[a.id]={portId:e.port.id,link:e.link},a.isSupernodeOutputBinding=!0,r.supernodeExitBindingNodes.push(a)}})),r.bindingNodeLinkSrcDefs=[],r.bindingNodeLinkTrgDefs=[],r.supernodeEntryBindingNodes.forEach((function(e){var t=r.supernodeBindingNodesMappedToParentFlowData[e.id].link;r.bindingNodeLinkSrcDefs.push({id:e.id,portId:t.trgNodePortId?"output_"+t.trgNodeId+"_"+t.trgNodePortId:t.trgNodePortId}),r.bindingNodeLinkTrgDefs.push({id:t.trgNodeId,portId:t.trgNodePortId})})),r.supernodeExitBindingNodes.forEach((function(e){var t=r.supernodeBindingNodesMappedToParentFlowData[e.id].link;r.bindingNodeLinkSrcDefs.push({id:t.srcNodeId,portId:t.srcNodePortId}),r.bindingNodeLinkTrgDefs.push({id:e.id,portId:t.srcNodePortId?"input_"+t.srcNodeId+"_"+t.srcNodePortId:t.srcNodePortId})})),r.data.externalUrl){var h=cl.filterSupernodes(r.subflowNodes),f=r.objectModel.getDescendantPipelinesForSupernodes(h);r.descPipelines=f.filter((function(e){return!e.parentUrl})),r.newPipelineFlow=r.objectModel.createExternalPipelineFlowTemplate(r.data.externalPipelineFlowId,r.supernode.subflow_ref.pipeline_id_ref)}return r}return t(a,[{key:"createSupernode",value:function(){var e=this,t=[];this.supernodeInputLinksModified.forEach((function(n){var i=e.apiPipeline.getNode(n.trgNodeId);e.createSupernodePorts(i,n,t,"entry")}));var n=[];this.supernodeOutputLinksModified.forEach((function(t){var i=e.apiPipeline.getNode(t.srcNodeId);e.createSupernodePorts(i,t,n,"exit")}));var i={label:this.labelUtil.getLabel("supernode.template.label"),description:this.labelUtil.getLabel("supernode.template.description"),image:this.data.externalUrl?I:P,inputs:t,outputs:n,type:G,subflow_ref:{pipeline_id_ref:this.subPipeline.id}};this.data.externalUrl&&(i.subflow_ref.url=this.data.externalUrl);var o=this.getTopLeftNode(this.subflowNodes),a={nodeTemplate:i,offsetX:o.x_pos,offsetY:o.y_pos};return this.apiPipeline.createNode(a)}},{key:"reorderSupernodeLinks",value:function(e,t){var n=this;if(e.length>1){var i=tt(e),o="input"===t?"inputs":"outputs",a="input"===t?"trgNodeId":"srcNodeId",r="input"===t?"trgNodePortId":"srcNodePortId",s=[];i.forEach((function(e){s.find((function(t){return t.id===e[a]}))||s.push(n.apiPipeline.getNode(e[a]))})),s.sort((function(e,t){return e.y_pos<t.y_pos?-1:e.y_pos>t.y_pos?1:0}));var l=[];return s.forEach((function(e){var t=e[o],n=t[0];t.forEach((function(t){var o=i.filter((function(n){return(n[r]===t.id||void 0===n[r]||null===n[r])&&n[a]===e.id}));(o=o.map((function(e){var t=Object.assign({},e);return t[r]=t[r]?t[r]:n.id,t}))).forEach((function(e){l.find((function(t){return t.id===e.id}))||(l=l.concat(e))}))}))})),l}return e}},{key:"getTopLeftNode",value:function(e){var t=this,n=e[0],i=this.getDistanceFromPosition(this.subflowRect.x,this.subflowRect.y,e[0]);return e.forEach((function(e){var o=t.getDistanceFromPosition(t.subflowRect.x,t.subflowRect.y,e);o<i&&(i=o,n=e)})),n}},{key:"getDistanceFromPosition",value:function(e,t,n){var i=n.x_pos-e,o=n.y_pos-t;return Math.sqrt(Math.pow(i,2)+Math.pow(o,2))}},{key:"createSupernodePorts",value:function(e,t,n,i){var o=this,a="entry"===i?"inputs":"outputs",r="entry"===i?"trgNodePortId":"srcNodePortId";if(void 0!==t[r]&&null!==t[r])e[a].forEach((function(a){if(t[r]===a.id){var s=Object.assign({},a);s.id=a.id?e.id+"_"+a.id:a.id,s.label=o.labelUtil.getLabel("supernode.new.port.label"),o.addToCreateBindingNodeData(e.id,s,t,n,i)}}));else{var s=Object.assign({},e[a][0]);s.id=s.id?e.id+"_"+s.id:s.id,s.label=this.labelUtil.getLabel("supernode.new.port.label"),this.addToCreateBindingNodeData(e.id,s,t,n,i)}}},{key:"addToCreateBindingNodeData",value:function(e,t,n,i,o){i.find((function(e){return e.id===t.id}))||(i.push(t),this.createBindingNodeData.push({bindindNodeForNodeId:e,type:o,link:n,port:t}))}},{key:"createBindingNode",value:function(e,t,n){var i={description:this.labelUtil.getLabel("supernode.binding.node.description"),label:this.labelUtil.getLabel("supernode.binding.node.label"),type:"binding"},o={editType:"createNode",nodeTemplate:Object.assign(i,t),offsetX:n.x,offsetY:n.y};return this.subAPIPipeline.createNode(o)}},{key:"removeLinkFromSubflow",value:function(e,t){this.subflowLinks=this.subflowLinks.filter((function(t){return t.id!==e.id})),t&&this.linksToDelete.push(e)}},{key:"getData",value:function(){return this.data.newNode=this.supernode,this.data.newLinks=this.newLinks,this.data.subPipelineId=this.subPipeline.id,this.data}},{key:"do",value:function(){var e=this;this.apiPipeline.deleteNodes(this.subflowNodes,!1),this.apiPipeline.deleteComments(this.subflowComments),this.apiPipeline.deleteLinks(this.linksToDelete),this.apiPipeline.addSupernode(this.supernode,[this.subPipeline]),this.supernodeEntryBindingNodes.forEach((function(t){var n=e.supernodeBindingNodesMappedToParentFlowData[t.id].portId;e.apiPipeline.setInputPortSubflowNodeRef(e.supernode.id,n,t.id)})),this.supernodeExitBindingNodes.forEach((function(t){var n=e.supernodeBindingNodesMappedToParentFlowData[t.id].portId;e.apiPipeline.setOutputPortSubflowNodeRef(e.supernode.id,n,t.id)})),this.newLinks=[];for(var t=0;t<this.linkSrcDefs.length;t++){var n=this.apiPipeline.createNodeLink(this.linkSrcDefs[t],this.linkTrgDefs[t],{type:F});n&&this.newLinks.push(n)}this.apiPipeline.addLinks(this.newLinks),this.supernodeEntryBindingNodes.forEach((function(t){e.subAPIPipeline.addNode(t)})),this.supernodeExitBindingNodes.forEach((function(t){e.subAPIPipeline.addNode(t)})),this.supernodeNewLinks=[];for(var i=0;i<this.bindingNodeLinkSrcDefs.length;i++)this.supernodeNewLinks.push(this.subAPIPipeline.createNodeLink(this.bindingNodeLinkSrcDefs[i],this.bindingNodeLinkTrgDefs[i],{type:F}));if(this.subAPIPipeline.addLinks(this.supernodeNewLinks),this.data.externalUrl){this.objectModel.addExternalPipelineFlow(this.newPipelineFlow,this.data.externalUrl,null,!1);var o=[this.subPipeline].concat(this.descPipelines);this.objectModel.setParentUrl(o,this.data.externalUrl)}}},{key:"undo",value:function(){var e=this;this.data.externalUrl&&(this.objectModel.setParentUrl(this.descPipelines),this.objectModel.removeExternalPipelineFlow(this.data.externalUrl)),this.apiPipeline.deleteSupernodes([this.supernode],[this.subPipeline],[]),this.subflowNodes.forEach((function(t){e.apiPipeline.addNode(t)})),this.subflowComments.forEach((function(t){e.apiPipeline.addComment(t)})),this.apiPipeline.addLinks(this.subflowLinks),this.apiPipeline.addLinks(this.supernodeInputLinks),this.apiPipeline.addLinks(this.supernodeOutputLinks),this.apiPipeline.addLinks(this.linksToDelete)}},{key:"redo",value:function(){this.do()}},{key:"getLabel",value:function(){return this.labelUtil.getActionLabel(this,"action.createSuperNode",{node_label:this.supernode.label})}}]),a}();function Cc(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,a=i(e);if(t){var r=i(this).constructor;n=Reflect.construct(a,arguments,r)}else n=a.apply(this,arguments);return o(this,n)}}var Sc=function(i){n(a,at);var o=Cc(a);function a(t,n,i,r){var s;return e(this,a),(s=o.call(this,t)).data=t,s.objectModel=n,s.labelUtil=i,s.apiPipeline=s.objectModel.getAPIPipeline(t.pipelineId),s.oldObjectPositions=[],s.newObjectPositions=[],s.oldLinkPositions=[],s.newLinkPositions=[],s.enableMoveNodesOnSupernodeResize=r,s.apiPipeline=s.objectModel.getAPIPipeline(t.pipelineId),s.enableMoveNodesOnSupernodeResize&&(s.supernode=s.apiPipeline.getNode(s.data.id),s.oldObjectPositions=cl.getObjectPositions(s.apiPipeline.getObjects()),s.oldLinkPositions=cl.getLinkPositions(s.apiPipeline.getLinks()),s.newObjectPositions=cl.moveSurroundingObjects(s.supernode,s.apiPipeline.getObjects(),"se",s.supernode.layout.defaultNodeWidth,s.supernode.layout.defaultNodeHeight,!1),s.newLinkPositions=cl.moveSurroundingDetachedLinks(s.supernode,s.apiPipeline.getLinks(),"se",s.supernode.layout.defaultNodeWidth,s.supernode.layout.defaultNodeHeight,!1)),s}return t(a,[{key:"do",value:function(){this.apiPipeline.collapseSuperNodeInPlace(this.data.id,this.newObjectPositions,this.newLinkPositions)}},{key:"undo",value:function(){this.apiPipeline.expandSuperNodeInPlace(this.data.id,this.oldObjectPositions,this.oldLinkPositions)}},{key:"redo",value:function(){this.do()}},{key:"getLabel",value:function(){return this.labelUtil.getActionLabel(this,"action.collapseSuperNodeInPlace")}}]),a}();function Lc(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,a=i(e);if(t){var r=i(this).constructor;n=Reflect.construct(a,arguments,r)}else n=a.apply(this,arguments);return o(this,n)}}var xc=function(i){n(a,at);var o=Lc(a);function a(t,n,i,r){var s;e(this,a),(s=o.call(this,t)).data=t,s.objectModel=n,s.labelUtil=i,s.apiPipeline=s.objectModel.getAPIPipeline(t.pipelineId),s.enableMoveNodesOnSupernodeResize=r,s.supernode=s.data.targetObject,s.oldObjectPositions=[],s.newObjectPositions=[],s.oldLinkPositions=[],s.newLinkPositions=[],s.objectModel.ensurePipelineIsLoaded(s.data),s.targetApiPipeline=s.objectModel.getAPIPipeline(s.supernode.subflow_ref.pipeline_id_ref),s.targetPipeline=s.targetApiPipeline.getPipeline(),s.extPipelineFlowToDelete=s.targetPipeline.parentUrl?s.objectModel.getExternalPipelineFlow(s.targetPipeline.parentUrl):[];var l=s.getLinksToRemove(),c=s.getBindingNodes(),d=s.getNonBindingNodes(c),u=s.getCommentsToAdd(),p=s.getLinksToAdd(c,l),h={left:0,top:0};return s.enableMoveNodesOnSupernodeResize&&(s.oldObjectPositions=cl.getObjectPositions(s.apiPipeline.getObjects()),s.oldLinkPositions=cl.getLinkPositions(s.apiPipeline.getLinks()),h=cl.getCanvasDimensions(d,u,p,0,0),s.newObjectPositions=cl.moveSurroundingObjects(s.data.targetObject,s.apiPipeline.getObjects(),"se",h.width,h.height,!1),s.newLinkPositions=cl.moveSurroundingDetachedLinks(s.data.targetObject,s.apiPipeline.getLinks(),"se",h.width,h.height,!1)),d.forEach((function(e){s.newObjectPositions[e.id]={x_pos:s.supernode.x_pos+e.x_pos-h.left,y_pos:s.supernode.y_pos+e.y_pos-h.top}})),u.forEach((function(e){s.newObjectPositions[e.id]={x_pos:s.supernode.x_pos+e.x_pos-h.left,y_pos:s.supernode.y_pos+e.y_pos-h.top}})),s.info={pipelineId:s.data.pipelineId,supernodeToDelete:s.supernode,nodesToAdd:d,linksToAdd:p,linksToRemove:l,commentsToAdd:u,oldObjectPositions:s.oldObjectPositions,newObjectPositions:s.newObjectPositions,oldLinkPositions:s.oldLinkPositions,newLinkPositions:s.newLinkPositions,pipelineToDelete:s.targetPipeline,extPipelineFlowToDelete:s.extPipelineFlowToDelete},s}return t(a,[{key:"getNonBindingNodes",value:function(e){return this.targetApiPipeline.getNodes().filter((function(t){return!e.some((function(e){return e.id===t.id}))}))}},{key:"getBindingNodes",value:function(){var e=this,t=[];return this.data.targetObject.inputs&&this.data.targetObject.inputs.forEach((function(n){var i=e.targetApiPipeline.getNode(n.subflow_node_ref);i&&t.push(i)})),this.data.targetObject.outputs&&this.data.targetObject.outputs.forEach((function(n){var i=e.targetApiPipeline.getNode(n.subflow_node_ref);i&&t.push(i)})),t}},{key:"getLinksToFromBindingNodes",value:function(e){return this.targetApiPipeline.getLinksContainingIds(e.map((function(e){return e.id})))}},{key:"getLinksNotToFromBindingNodes",value:function(e){var t=this.getLinksToFromBindingNodes(e);return this.targetApiPipeline.getLinks().filter((function(e){return!t.some((function(t){return t.id===e.id}))}))}},{key:"getCommentsToAdd",value:function(){return this.targetApiPipeline.getComments()}},{key:"getLinksToRemove",value:function(){return this.apiPipeline.getLinksContainingId(this.supernode.id)}},{key:"getLinksToAdd",value:function(e,t){var n=this.getLinksNotToFromBindingNodes(e),i=this.getNewLinks(t);return n.concat(i)}},{key:"getNewLinks",value:function(e){var t=this,n=[],i=e.filter((function(e){return e.type===F}));return this.supernode.inputs&&this.supernode.inputs.forEach((function(e){n=n.concat(t.getNewLinksForInput(e,i))})),this.supernode.outputs&&this.supernode.outputs.forEach((function(e){n=n.concat(t.getNewLinksForOutput(e,i))})),n}},{key:"getNewLinksForInput",value:function(e,t){var n=this,i=[],o=this.getSupernodeInputLinks(this.supernode,e.id,t),a=this.getInputBindingNode(e);if(a){var r=this.getInputBindingLinks(a);o.forEach((function(e){r.forEach((function(t){var o={};e.srcPos?o.srcPos=e.srcPos:(o.srcNodeId=e.srcNodeId,o.srcNodePortId=e.srcNodePortId),t.trgPos?o.trgPos=t.trgPos:(o.trgNodeId=t.trgNodeId,o.trgNodePortId=t.trgNodePortId);var a=n.apiPipeline.createLinkFromInfo(o);i.push(a)}))}))}return i}},{key:"getNewLinksForOutput",value:function(e,t){var n=this,i=[],o=this.getSupernodeOutputLinks(this.supernode,e.id,t),a=this.getOutputBindingNode(e);if(a){var r=this.getOutputBindingLinks(a);o.forEach((function(e){r.forEach((function(t){var o={};t.srcPos?o.srcPos=t.srcPos:(o.srcNodeId=t.srcNodeId,o.srcNodePortId=t.srcNodePortId),e.trgPos?o.trgPos=e.trgPos:(o.trgNodeId=e.trgNodeId,o.trgNodePortId=e.trgNodePortId);var a=n.apiPipeline.createLinkFromInfo(o);i.push(a)}))}))}return i}},{key:"getSupernodeInputLinks",value:function(e,t,n){return n.filter((function(n){var i=n.trgNodePortId||cl.getDefaultInputPortId(e);return n.trgNodeId===e.id&&i===t}))}},{key:"getInputBindingNode",value:function(e){return this.targetApiPipeline.getNodes().find((function(t){return t.id===e.subflow_node_ref}))}},{key:"getInputBindingLinks",value:function(e){return this.targetApiPipeline.getLinksContainingSourceId(e.id).filter((function(e){return e.type===F}))}},{key:"getSupernodeOutputLinks",value:function(e,t,n){return n.filter((function(n){var i=n.srcNodePortId||cl.getDefaultOutputPortId(e);return n.srcNodeId===e.id&&i===t}))}},{key:"getOutputBindingNode",value:function(e){return this.targetApiPipeline.getNodes().find((function(t){return t.id===e.subflow_node_ref}))}},{key:"getOutputBindingLinks",value:function(e){return this.targetApiPipeline.getLinksContainingTargetId(e.id).filter((function(e){return e.type===F}))}},{key:"do",value:function(){this.apiPipeline.deconstructSupernode(this.info)}},{key:"undo",value:function(){this.apiPipeline.reconstructSupernode(this.info)}},{key:"redo",value:function(){this.do()}},{key:"getLabel",value:function(){return this.labelUtil.getActionLabel(this,"action.deconstructSuperNode",{node_label:this.supernode.label})}}]),a}();function Tc(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,a=i(e);if(t){var r=i(this).constructor;n=Reflect.construct(a,arguments,r)}else n=a.apply(this,arguments);return o(this,n)}}var Ec=function(i){n(a,at);var o=Tc(a);function a(t,n,i){var r;return e(this,a),(r=o.call(this,t)).data=t,r.linkInfo=[],r.objectModel=n,r.labelUtil=i,r.apiPipeline=r.objectModel.getAPIPipeline(t.pipelineId),r}return t(a,[{key:"do",value:function(){this.linkInfo=this.apiPipeline.getLink(this.data.id),this.apiPipeline.deleteLink(this.data)}},{key:"undo",value:function(){this.apiPipeline.addLinks([this.linkInfo])}},{key:"redo",value:function(){this.apiPipeline.deleteLink(this.data)}},{key:"getLabel",value:function(){return this.labelUtil.getActionLabel(this,"action.deleteLink")}}]),a}();function Oc(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,a=i(e);if(t){var r=i(this).constructor;n=Reflect.construct(a,arguments,r)}else n=a.apply(this,arguments);return o(this,n)}}var Dc=function(i){n(a,at);var o=Oc(a);function a(t,n,i,r){var s;return e(this,a),(s=o.call(this,t)).data=t,s.objectModel=n,s.labelUtil=i,s.areDetachableLinksSupported=r,s.objectsInfo=[],s.apiPipeline=s.objectModel.getAPIPipeline(t.pipelineId),s.nodesToDelete=s.objectModel.getSelectedNodes(),s.commentsToDelete=s.objectModel.getSelectedComments(),s.linksToDelete=s.objectModel.getSelectedLinks(),s.linksToUpdateInfo={},s.supernodesToDelete=[],s.nodeAndCommentsToDelete=s.nodesToDelete.concat(s.commentsToDelete),r?(s.linksToDelete=s.getConnectedLinksToDelete(s.linksToDelete,"nodeLink"),s.linksToUpdateInfo=s.getLinksToUpdateInfo()):s.linksToDelete=s.getConnectedLinksToDelete(s.linksToDelete),s.supernodesToDelete=cl.filterSupernodes(s.nodesToDelete),s.pipelinesToDelete=s.objectModel.getDescPipelinesToDelete(s.supernodesToDelete,s.data.pipelineId),s.extPipelineFlowsToDelete=s.objectModel.getExternalPipelineFlowsForPipelines(s.pipelinesToDelete),s.nodesToDelete=s.nodesToDelete.filter((function(e){return!s.isSupernodeToBeDeleted(e)})),s.actionLabel=s.createActionLabel(),s}return t(a,[{key:"getConnectedLinksToDelete",value:function(e,t){var n=this;return this.nodeAndCommentsToDelete.forEach((function(i){n.apiPipeline.getLinksContainingId(i.id).forEach((function(i){n.isLinkToBeDeleted(i,e)||i.type===t||e.push(i)}))})),e}},{key:"getLinksToUpdateInfo",value:function(){var e=this,t=[],n=[];return this.apiPipeline.getLinks().forEach((function(i){if(!e.isLinkToBeDeleted(i,e.linksToDelete)){var o=e.isSourceToBeDeleted(i),a=e.isTargetToBeDeleted(i);if(o||a){var r=Object.assign({},i);o&&(delete r.srcNodeId,delete r.srcNodePortId,r.srcPos=cl.getSrcPos(i,e.apiPipeline)),a&&(delete r.trgNodeId,delete r.trgNodePortId,r.trgPos=cl.getTrgPos(i,e.apiPipeline)),t.push(r),n.push(i)}}})),{newLinks:t,oldLinks:n}}},{key:"isLinkToBeDeleted",value:function(e,t){return-1!==t.findIndex((function(t){return t.id===e.id}))}},{key:"isSupernodeToBeDeleted",value:function(e){return-1!==this.supernodesToDelete.findIndex((function(t){return e.id===t.id}))}},{key:"isSourceToBeDeleted",value:function(e){return-1!==this.nodeAndCommentsToDelete.findIndex((function(t){return t.id===e.srcNodeId}))}},{key:"isTargetToBeDeleted",value:function(e){return-1!==this.nodesToDelete.findIndex((function(t){return t.id===e.trgNodeId}))}},{key:"do",value:function(){this.apiPipeline.deleteAndUpdateObjects({linksToUpdate:this.linksToUpdateInfo.newLinks,linksToDelete:this.linksToDelete,supernodesToDelete:this.supernodesToDelete,pipelinesToDelete:this.pipelinesToDelete,extPipelineFlowsToDelete:this.extPipelineFlowsToDelete,nodesToDelete:this.nodesToDelete,commentsToDelete:this.commentsToDelete})}},{key:"undo",value:function(){this.apiPipeline.addAndUpdateObjects({linksToUpdate:this.linksToUpdateInfo.oldLinks,linksToAdd:this.linksToDelete,supernodesToAdd:this.supernodesToDelete,pipelinesToAdd:this.pipelinesToDelete,extPipelineFlowsToAdd:this.extPipelineFlowsToDelete,nodesToAdd:this.nodesToDelete,commentsToAdd:this.commentsToDelete})}},{key:"redo",value:function(){this.do()}},{key:"getLabel",value:function(){return this.actionLabel}},{key:"createActionLabel",value:function(){return this.areDetachableLinksSupported?this.labelUtil.getActionLabel(this,"action.deleteNodesCommentsLinks",{nodes_count:this.nodesToDelete.length+this.supernodesToDelete.length,comments_count:this.commentsToDelete.length,links_count:this.linksToDelete.length}):this.labelUtil.getActionLabel(this,"action.deleteNodesComments",{nodes_count:this.nodesToDelete.length+this.supernodesToDelete.length,comments_count:this.commentsToDelete.length})}}]),a}();function jc(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,a=i(e);if(t){var r=i(this).constructor;n=Reflect.construct(a,arguments,r)}else n=a.apply(this,arguments);return o(this,n)}}var Ac=function(i){n(a,at);var o=jc(a);function a(t,n,i){var r;return e(this,a),(r=o.call(this,t)).data=t,r.objectModel=n,r.labelUtil=i,r.apiPipeline=r.objectModel.getAPIPipeline(t.pipelineId),r.links=[],r}return t(a,[{key:"do",value:function(){this.links=this.apiPipeline.disconnectObjects(this.data.selectedObjectIds)}},{key:"undo",value:function(){this.apiPipeline.addLinks(this.links)}},{key:"redo",value:function(){this.do()}},{key:"getLabel",value:function(){return this.labelUtil.getActionLabel(this,"action.disconnectObjects")}}]),a}();function Mc(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,a=i(e);if(t){var r=i(this).constructor;n=Reflect.construct(a,arguments,r)}else n=a.apply(this,arguments);return o(this,n)}}var Rc=function(i){n(a,at);var o=Mc(a);function a(t,n,i){var r;return e(this,a),(r=o.call(this,t)).data=t,r.objectModel=n,r.labelUtil=i,r.oldBreadcrumbs=r.objectModel.getBreadcrumbs(),r}return t(a,[{key:"do",value:function(){this.objectModel.setPreviousBreadcrumb()}},{key:"undo",value:function(){this.objectModel.setBreadcrumbs(this.oldBreadcrumbs)}},{key:"redo",value:function(){this.do()}},{key:"getLabel",value:function(){return this.labelUtil.getActionLabel(this,"action.displayPreviousPipeline")}}]),a}();function Uc(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,a=i(e);if(t){var r=i(this).constructor;n=Reflect.construct(a,arguments,r)}else n=a.apply(this,arguments);return o(this,n)}}var Fc=function(i){n(a,at);var o=Uc(a);function a(t,n,i){var r;return e(this,a),(r=o.call(this,t)).data=t,r.objectModel=n,r.labelUtil=i,r.oldBreadcrumbs=r.objectModel.getBreadcrumbs(),r}return t(a,[{key:"do",value:function(){this.data.addBreadcrumbs?(this.objectModel.ensurePipelineIsLoaded(this.data),this.objectModel.addBreadcrumbs(this.data)):0===this.data.breadcrumbIndex?this.objectModel.setIndexedBreadcrumb(this.data):this.data.breadcrumbIndex&&(this.objectModel.ensurePipelineIsLoaded(this.data),this.objectModel.setIndexedBreadcrumb(this.data))}},{key:"undo",value:function(){this.objectModel.setBreadcrumbs(this.oldBreadcrumbs)}},{key:"redo",value:function(){this.do()}},{key:"getLabel",value:function(){return this.labelUtil.getActionLabel(this,"action.displaySubPipeline")}}]),a}();function zc(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,a=i(e);if(t){var r=i(this).constructor;n=Reflect.construct(a,arguments,r)}else n=a.apply(this,arguments);return o(this,n)}}var Bc=function(i){n(a,at);var o=zc(a);function a(t,n,i){var r;return e(this,a),(r=o.call(this,t)).data=t,r.objectModel=n,r.labelUtil=i,r.apiPipeline=r.objectModel.getAPIPipeline(t.pipelineId),r.previousComment=r.apiPipeline.getComment(r.data.id),r}return t(a,[{key:"do",value:function(){this.apiPipeline.editComment(this.data)}},{key:"undo",value:function(){this.apiPipeline.editComment(this.previousComment)}},{key:"redo",value:function(){this.apiPipeline.editComment(this.data)}},{key:"getLabel",value:function(){return this.labelUtil.getActionLabel(this,"action.editComment")}}]),a}();function Hc(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,a=i(e);if(t){var r=i(this).constructor;n=Reflect.construct(a,arguments,r)}else n=a.apply(this,arguments);return o(this,n)}}var Gc=function(i){n(a,at);var o=Hc(a);function a(t,n,i){var r;return e(this,a),(r=o.call(this,t)).data=t,r.objectModel=n,r.labelUtil=i,r.apiPipeline=r.objectModel.getAPIPipeline(r.data.pipelineId),r.data.objType===ne?r.previousDecorations=r.apiPipeline.getLinkDecorations(r.data.objId)||[]:r.data.objType===ue&&(r.previousDecorations=r.apiPipeline.getNodeDecorations(r.data.objId)||[]),r.newDecorations=r.previousDecorations.map((function(e){return e.id===r.data.decId?Object.assign({},e,{label:r.data.label}):e})),r}return t(a,[{key:"do",value:function(){this.data.objType===ne?this.apiPipeline.setLinkDecorations(this.data.objId,this.newDecorations):this.data.objType===ue&&this.apiPipeline.setNodeDecorations(this.data.objId,this.newDecorations)}},{key:"undo",value:function(){this.data.objType===ne?this.apiPipeline.setLinkDecorations(this.data.objId,this.previousDecorations):this.data.objType===ue&&this.apiPipeline.setNodeDecorations(this.data.objId,this.previousDecorations)}},{key:"redo",value:function(){this.do()}},{key:"getLabel",value:function(){return this.data.objType===ne?this.labelUtil.getActionLabel(this,"action.editLinkDecorationLabel"):this.labelUtil.getActionLabel(this,"action.editNodeDecorationLabel")}}]),a}();function qc(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,a=i(e);if(t){var r=i(this).constructor;n=Reflect.construct(a,arguments,r)}else n=a.apply(this,arguments);return o(this,n)}}var Vc=function(i){n(a,at);var o=qc(a);function a(t,n,i){var r;return e(this,a),(r=o.call(this,t)).data=t,r.objectModel=n,r.labelUtil=i,r.apiPipeline=r.objectModel.getAPIPipeline(t.pipelineId),r.previousLabel=r.apiPipeline.getNode(t.nodeId).label,r}return t(a,[{key:"do",value:function(){this.apiPipeline.setNodeLabel(this.data.nodeId,this.data.label)}},{key:"undo",value:function(){this.apiPipeline.setNodeLabel(this.data.nodeId,this.previousLabel)}},{key:"redo",value:function(){this.apiPipeline.setNodeLabel(this.data.nodeId,this.data.label)}},{key:"getLabel",value:function(){return this.labelUtil.getActionLabel(this,"action.setNodeLabel")}}]),a}();function Yc(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,a=i(e);if(t){var r=i(this).constructor;n=Reflect.construct(a,arguments,r)}else n=a.apply(this,arguments);return o(this,n)}}var Wc=function(i){n(a,at);var o=Yc(a);function a(t,n,i,r){var s;return e(this,a),(s=o.call(this,t)).data=t,s.objectModel=n,s.labelUtil=i,s.oldObjectPositions=[],s.newObjectPositions=[],s.oldLinkPositions=[],s.newLinkPositions=[],s.enableMoveNodesOnSupernodeResize=r,s.apiPipeline=s.objectModel.getAPIPipeline(t.pipelineId),s.supernode=s.apiPipeline.getNode(s.data.id),s.enableMoveNodesOnSupernodeResize&&(s.oldObjectPositions=cl.getObjectPositions(s.apiPipeline.getObjects()),s.oldLinkPositions=cl.getLinkPositions(s.apiPipeline.getLinks()),s.newObjectPositions=cl.moveSurroundingObjects(s.supernode,s.apiPipeline.getObjects(),"se",cl.getSupernodeExpandedWidth(s.supernode,s.objectModel.getCanvasLayout()),cl.getSupernodeExpandedHeight(s.supernode,s.objectModel.getCanvasLayout()),!1),s.newLinkPositions=cl.moveSurroundingDetachedLinks(s.supernode,s.apiPipeline.getLinks(),"se",cl.getSupernodeExpandedWidth(s.supernode,s.objectModel.getCanvasLayout()),cl.getSupernodeExpandedHeight(s.supernode,s.objectModel.getCanvasLayout()),!1)),s}return t(a,[{key:"do",value:function(){this.objectModel.ensurePipelineIsLoaded(this.data),this.apiPipeline.expandSuperNodeInPlace(this.data.id,this.newObjectPositions,this.newLinkPositions)}},{key:"undo",value:function(){this.apiPipeline.collapseSuperNodeInPlace(this.data.id,this.oldObjectPositions,this.oldLinkPositions)}},{key:"redo",value:function(){this.do()}},{key:"getLabel",value:function(){return this.labelUtil.getActionLabel(this,"action.expandSuperNodeInPlace",{node_label:this.supernode.label})}}]),a}();function Xc(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,a=i(e);if(t){var r=i(this).constructor;n=Reflect.construct(a,arguments,r)}else n=a.apply(this,arguments);return o(this,n)}}var $c=function(i){n(a,at);var o=Xc(a);function a(t,n,i){var r;return e(this,a),(r=o.call(this,t)).data=t,r.objectModel=n,r.labelUtil=i,r.apiPipeline=r.objectModel.getAPIPipeline(t.pipelineId),r.node=t.node,r.firstLinkSrcInfo={id:t.link.srcNodeId,portId:t.link.srcNodePortId},r.firstLinkTrgInfo={id:r.node.id},r.secondLinkSrcInfo={id:r.node.id},r.secondLinkTrgInfo={id:t.link.trgNodeId,portId:t.link.trgNodePortId},r}return t(a,[{key:"getData",value:function(){return this.data.newFirstLink=this.firstLink,this.data.newSecondLink=this.secondLink,this.data}},{key:"do",value:function(){this.apiPipeline.deleteLink({id:this.data.link.id}),this.apiPipeline.moveObjects({nodes:[this.node.id],offsetX:this.data.offsetX,offsetY:this.data.offsetY}),this.firstLink=this.apiPipeline.createNodeLink(this.firstLinkSrcInfo,this.firstLinkTrgInfo,{type:"nodeLink"}),this.secondLink=this.apiPipeline.createNodeLink(this.secondLinkSrcInfo,this.secondLinkTrgInfo,{type:"nodeLink"}),this.apiPipeline.addLinks([this.firstLink,this.secondLink])}},{key:"undo",value:function(){this.apiPipeline.deleteLink({id:this.firstLink.id}),this.apiPipeline.deleteLink({id:this.secondLink.id}),this.apiPipeline.moveObjects({nodes:[this.node.id],offsetX:-this.data.offsetX,offsetY:-this.data.offsetY}),this.apiPipeline.addLinks([this.data.link])}},{key:"redo",value:function(){this.do()}},{key:"getLabel",value:function(){return this.labelUtil.getActionLabel(this,"action.insertNodeIntoLink",{node_label:this.node.label})}}]),a}();function Zc(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,a=i(e);if(t){var r=i(this).constructor;n=Reflect.construct(a,arguments,r)}else n=a.apply(this,arguments);return o(this,n)}}var Kc=function(i){n(a,at);var o=Zc(a);function a(t,n,i){var r;return e(this,a),(r=o.call(this,t)).data=t,r.objectModel=n,r.labelUtil=i,r.apiPipeline=r.objectModel.getAPIPipeline(t.pipelineId),r}return t(a,[{key:"do",value:function(){this.apiPipeline.moveObjects(this.data)}},{key:"undo",value:function(){this.data.offsetX=-this.data.offsetX,this.data.offsetY=-this.data.offsetY,this.apiPipeline.moveObjects(this.data)}},{key:"redo",value:function(){this.data.offsetX=-this.data.offsetX,this.data.offsetY=-this.data.offsetY,this.apiPipeline.moveObjects(this.data)}},{key:"getLabel",value:function(){return 1===this.data.nodes.length?this.labelUtil.getActionLabel(this,"action.moveObject"):this.labelUtil.getActionLabel(this,"action.moveObjects")}}]),a}();function Jc(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,a=i(e);if(t){var r=i(this).constructor;n=Reflect.construct(a,arguments,r)}else n=a.apply(this,arguments);return o(this,n)}}var Qc=function(i){n(a,at);var o=Jc(a);function a(t,n,i,r,s,l){var c;return e(this,a),(c=o.call(this,t)).data=t,c.objectModel=n,c.labelUtil=i,c.viewportDimensions=r,c.areDetachableLinksInUse=s,c.isSnapToGridInUse=l,c.apiPipeline=c.objectModel.getAPIPipeline(t.pipelineId),c.adjustObjectsPositions(),c.clones=c.objectModel.cloneObjectsToPaste(t.objects.nodes,t.objects.comments,t.objects.links),c}return t(a,[{key:"adjustObjectsPositions",value:function(){var e=this.data.objects,t=cl.getCanvasDimensions(e.nodes,e.comments,e.links,0,0);if(t)if(this.data.mousePos&&this.data.mousePos.x&&this.data.mousePos.y){var n=this.data.mousePos.x-t.left,i=this.data.mousePos.y-t.top;this.moveObjectsPositions(e,n,i)}else{var o=this.viewportDimensions;if(o.x<t.left&&o.y<t.top&&o.x+o.width>t.left&&o.y+o.height>t.top)this.ensureNoOverlap(e);else{var a=o.x+o.width/2-t.width/2-t.left,r=o.y+o.height/2-t.height/2-t.top;this.moveObjectsPositions(e,a,r),this.ensureNoOverlap(e)}}}},{key:"ensureNoOverlap",value:function(e){var t=10,n=10;if(this.isSnapToGridInUse){var i=this.objectModel.getCanvasLayout();t=i.snapToGridXPx,n=i.snapToGridYPx}for(;this.apiPipeline.exactlyOverlaps(e.nodes,e.comments,e.links);)this.moveObjectsPositions(e,t,n)}},{key:"moveObjectsPositions",value:function(e,t,n){e.nodes&&e.nodes.forEach((function(e){e.x_pos+=t,e.y_pos+=n})),e.comments&&e.comments.forEach((function(e){e.x_pos+=t,e.y_pos+=n,e.selectedObjectIds=[]})),e.links&&e.links.forEach((function(e){e.srcPos&&(e.srcPos.x_pos+=t,e.srcPos.y_pos+=n),e.trgPos&&(e.trgPos.x_pos+=t,e.trgPos.y_pos+=n)}))}},{key:"getData",value:function(){return this.data.clonedNodes=this.clones.clonedNodes,this.data.clonedComments=this.clones.clonedComments,this.data.clonedLinks=this.clones.clonedLinks,this.data}},{key:"do",value:function(){var e=this,t=[];this.clones.clonedNodes.forEach((function(n){e.apiPipeline.addNode(n),t.push(n.id)})),this.clones.clonedComments.forEach((function(n){e.apiPipeline.addComment(n),t.push(n.id)})),this.apiPipeline.addLinks(this.clones.clonedLinks),this.areDetachableLinksInUse&&this.clones.clonedLinks.forEach((function(e){return t.push(e.id)})),this.objectModel.setSelections(t,this.apiPipeline.pipelineId)}},{key:"undo",value:function(){this.apiPipeline.deleteNodes(this.clones.clonedNodes),this.apiPipeline.deleteComments(this.clones.clonedComments),this.apiPipeline.deleteLinks(this.clones.clonedLinks)}},{key:"redo",value:function(){this.do()}},{key:"getLabel",value:function(){return this.labelUtil.getActionLabel(this,"action.pasteObjects")}}]),a}();function ed(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,a=i(e);if(t){var r=i(this).constructor;n=Reflect.construct(a,arguments,r)}else n=a.apply(this,arguments);return o(this,n)}}var td=function(i){n(a,at);var o=ed(a);function a(t,n,i){var r;return e(this,a),(r=o.call(this,t)).data=t,r.objectModel=n,r.labelUtil=i,r.apiPipeline=r.objectModel.getAPIPipeline(t.pipelineId),r.data.addedNodeTypes=r.apiPipeline.createNodesForPalette(r.data.selectedObjectIds),r}return t(a,[{key:"do",value:function(){this.objectModel.addNodeTypesToPalette(this.data.addedNodeTypes,Ce,this.labelUtil.getLabel("palette.saved.nodes.label"),this.labelUtil.getLabel("palette.saved.nodes.description"),Se)}},{key:"undo",value:function(){var e=this.data.addedNodeTypes.map((function(e){return e.id}));this.objectModel.removeNodesFromPalette(e,Ce)}},{key:"redo",value:function(){this.do()}},{key:"getLabel",value:function(){return this.labelUtil.getActionLabel(this,"action.saveToPalette")}}]),a}(),nd=yt;var id=vt,od=function(e){return"function"==typeof e?e:nd},ad=mt;var rd=function(e,t){return null==e?e:id(e,od(t),ad)};function sd(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,a=i(e);if(t){var r=i(this).constructor;n=Reflect.construct(a,arguments,r)}else n=a.apply(this,arguments);return o(this,n)}}var ld=function(i){n(a,at);var o=sd(a);function a(t,n,i){var r;return e(this,a),(r=o.call(this,t)).data=t,r.objectModel=n,r.labelUtil=i,r.oldPipelineObjStyles=[],rd(r.data.pipelineObjectIds,(function(e,t){var n=r.objectModel.getAPIPipeline(t);r.oldPipelineObjStyles=[],e.forEach((function(e){r.oldPipelineObjStyles.push({pipelineId:t,objId:e,style:n.getObjectStyle(e,r.data.temporary)})}))})),r}return t(a,[{key:"do",value:function(){this.objectModel.setObjectsStyle(this.data.pipelineObjectIds,this.data.style,this.data.temporary)}},{key:"undo",value:function(){this.objectModel.setObjectsMultiStyle(this.oldPipelineObjStyles,this.data.temporary)}},{key:"redo",value:function(){this.do()}},{key:"getLabel",value:function(){return this.labelUtil.getActionLabel(this,"action.setObjectsStyle")}}]),a}();function cd(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,a=i(e);if(t){var r=i(this).constructor;n=Reflect.construct(a,arguments,r)}else n=a.apply(this,arguments);return o(this,n)}}var dd=function(i){n(a,at);var o=cd(a);function a(t,n,i){var r;return e(this,a),(r=o.call(this,t)).data=t,r.objectModel=n,r.labelUtil=i,r.oldPipelineLinkStyles=[],rd(r.data.pipelineLinkIds,(function(e,t){var n=r.objectModel.getAPIPipeline(t);r.oldPipelineLinkStyles=[],e.forEach((function(e){r.oldPipelineLinkStyles.push({pipelineId:t,objId:e,style:n.getLinkStyle(e,r.data.temporary)})}))})),r}return t(a,[{key:"do",value:function(){this.objectModel.setLinksStyle(this.data.pipelineLinkIds,this.data.style,this.data.temporary)}},{key:"undo",value:function(){this.objectModel.setLinksMultiStyle(this.oldPipelineLinkStyles,this.data.temporary)}},{key:"redo",value:function(){this.do()}},{key:"getLabel",value:function(){return this.labelUtil.getActionLabel(this,"action.setLinksStyle")}}]),a}();function ud(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,a=i(e);if(t){var r=i(this).constructor;n=Reflect.construct(a,arguments,r)}else n=a.apply(this,arguments);return o(this,n)}}var pd=function(i){n(a,at);var o=ud(a);function a(t,n,i){var r;return e(this,a),(r=o.call(this,t)).data=t,r.objectModel=n,r.labelUtil=i,r.apiPipeline=r.objectModel.getAPIPipeline(t.pipelineId),r.oldLink=r.apiPipeline.getLink(t.newLink.id),r}return t(a,[{key:"do",value:function(){this.apiPipeline.updateLink(this.data.newLink)}},{key:"undo",value:function(){this.apiPipeline.updateLink(this.oldLink)}},{key:"redo",value:function(){this.do()}},{key:"getLabel",value:function(){return this.labelUtil.getActionLabel(this,"action.updateLink")}}]),a}();function hd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function fd(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?hd(Object(n),!0).forEach((function(t){bt(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hd(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var gd=function(){function n(){e(this,n),this.intl=null,this.actionLabelHandler=null,this.defaultMessages=fd(fd({},pi),_t)}return t(n,[{key:"setIntl",value:function(e){this.intl=e}},{key:"setActionLabelHandler",value:function(e){this.actionLabelHandler=e}},{key:"getActionLabel",value:function(e,t,n){if(this.actionLabelHandler){var i=this.actionLabelHandler(e);if(i)return i}return this.getLabel(t,n)}},{key:"getLabel",value:function(e,t){return void 0!==this.intl&&null!==this.intl?this.intl.formatMessage({id:e,defaultMessage:this.defaultMessages[e]},t):this.defaultMessages[e]}}]),n}(),yd=kt,vd=rt,md=st,bd=y,_d=v,kd=Pt;var Pd=function(e,t,n,i){var o=-1,a=vd,r=!0,s=e.length,l=[],c=t.length;if(!s)return l;n&&(t=bd(t,_d(n))),i?(a=md,r=!1):t.length>=200&&(a=kd,r=!1,t=new yd(t));e:for(;++o<s;){var d=e[o],u=null==n?d:n(d);if(d=i||0!==d?d:0,r&&u==u){for(var p=c;p--;)if(t[p]===u)continue e;l.push(d)}else a(t,u,i)||l.push(d)}return l},Id=Pd,Nd=It,wd=lt,Cd=ct,Sd=Nt((function(e,t){var n=Cd(t);return wd(n)&&(n=void 0),wd(e)?Id(e,Nd(t,1,wd,!0),void 0,n):[]})),Ld=Sd,xd=function(){function n(){e(this,n)}return t(n,null,[{key:"convertCanvasToCanvasInfo",value:function(e){var t={id:e.diagram.id,nodes:this.getNodes(e.diagram.nodes),comments:this.getComments(e.diagram.comments),links:this.getLinks(e.diagram.links,e.diagram.nodes,e.diagram.comments),runtime_ref:""};return e.zoom&&"number"==typeof e.zoom&&100!==e.zoom&&(t.zoom={k:e.zoom/100,x:0,y:0}),{doc_type:"pipeline",version:"3.0",json_schema:"https://api.dataplatform.ibm.com/schemas/common-pipeline/pipeline-flow/pipeline-flow-v3-schema.json",id:e.id,primary_pipeline:e.diagram.id,pipelines:[t]}}},{key:"getNodes",value:function(e){var t=this;return e.map((function(e){var n=t.getType(e),i={id:e.id,image:e.image,x_pos:void 0!==e.x_pos?e.x_pos:e.xPos,y_pos:void 0!==e.y_pos?e.y_pos:e.yPos,class_name:e.className,label:e.objectData.label,type:n};return e.objectData&&e.objectData.description&&(i.description=e.objectData.description),e.inputPorts&&(i.inputs=t.getInputPorts(e.inputPorts,1)),e.outputPorts&&(i.outputs=t.getOutputPorts(e.outputPorts,-1)),e.decorations&&(i.decorations=t.getDecorations(e.decorations)),n===G&&(i.subflow_ref={pipeline_id_ref:e.subDiagramId,url:"app_defined"},i.open_with_tool="canvas",i.is_expanded=!1,i.expanded_width=200,i.expanded_height=200),n===Le&&(i.model_ref=""),n!==xe&&n!==Te&&n!==Le||(e.userData&&e.userData.typeId?i.op=e.userData.typeId:i.op=""),i}))}},{key:"getType",value:function(e){return e.userData&&!0===e.userData.containsModel?Le:e.inputPorts&&e.inputPorts.length>0&&e.outputPorts&&e.outputPorts.length>0?e.subDiagramId?G:xe:Te}},{key:"getInputPorts",value:function(e,t){var n=this;return e.map((function(e){return{id:e.name,label:e.label,cardinality:{min:n.getMinCard(e.cardinality),max:n.getMaxCard(e.cardinality,t)}}}))}},{key:"getOutputPorts",value:function(e,t){var n=this;return e.map((function(e){return{id:e.name,label:e.label,cardinality:{min:n.getMinCard(e.cardinality),max:n.getMaxCard(e.cardinality,t)}}}))}},{key:"getMinCard",value:function(e){return e?Number(e.split(":")[0]):0}},{key:"getMaxCard",value:function(e,t){return e?Number(e.split(":")[1]):t}},{key:"getDecorations",value:function(e){return e.map((function(e){return{position:e.position,class_name:e.className,hotspot:e.hotspot,id:e.id,image:e.image,outline:e.outline,x_pos:e.x_pos,y_pos:e.y_pos,width:e.width,height:e.height}}))}},{key:"getComments",value:function(e){return e.map((function(e){return{id:e.id,class_name:e.className,content:e.content,x_pos:void 0!==e.x_pos?e.x_pos:e.xPos,y_pos:void 0!==e.y_pos?e.y_pos:e.yPos,height:e.height,width:e.width}}))}},{key:"getLinks",value:function(e,t,n){var i=this,o=[];return e.forEach((function(e){if(i.isValidLink(e,t,n)){var a={id:e.id,class_name:e.className,srcNodeId:e.source,trgNodeId:e.target,type:i.getLinkType(e)};e.sourcePort&&(a.srcNodePortId=e.sourcePort),e.targetPort&&(a.trgNodePortId=e.targetPort),o.push(a)}})),o}},{key:"isValidLink",value:function(e,t,n){var i=!1;return("nodeLink"===this.getLinkType(e)||"associationLink"===this.getLinkType(e))&&t.findIndex((function(t){return t.id===e.source}))>-1&&t.findIndex((function(t){return t.id===e.target}))>-1&&(i=!0),"commentLink"===this.getLinkType(e)&&n.findIndex((function(t){return t.id===e.source}))>-1&&t.findIndex((function(t){return t.id===e.target}))>-1&&(i=!0),i}},{key:"getLinkType",value:function(e){if(p(e,"userData.linkType"))switch(e.userData.linkType){case"comment":return"commentLink";case"object":return"associationLink";default:return"nodeLink"}return"nodeLink"}},{key:"convertPaletteToPipelineFlowPalette",value:function(e){return{version:"1.0",categories:this.getCategories(e.categories)}}},{key:"getCategories",value:function(e){var t=this;return e.map((function(e){return{category:e.category,label:e.label,description:e.description,image:e.image,nodetypes:t.convertNodeTypes(e.nodetypes)}}))}},{key:"convertNodeTypes",value:function(e){var t=this;return e.map((function(e){var n={type:t.getType(e),label:e.label,description:e.description,operator_id_ref:e.typeId,image:e.image};return e.inputPorts&&(n.input_ports=t.convertPalettePorts(e.inputPorts,1)),e.outputPorts&&(n.output_ports=t.convertPalettePorts(e.outputPorts,-1)),n}))}},{key:"convertPalettePorts",value:function(e,t){var n=this;return e.map((function(e){return{id:e.name,label:e.label,cardinality:n.convertPaletteCardinality(e.cardinality,t)}}))}},{key:"convertPaletteCardinality",value:function(e,t){return{min:this.getMinCard(e),max:this.getMaxCard(e,t)}}},{key:"isVersion0Palette",value:function(e){for(var t=!1,n=0;n<e.categories.length;n++)if(this.isVersion0Category(e.categories[n])){t=!0;break}return t}},{key:"isVersion0Category",value:function(e){var t=!1;if(e.nodetypes)for(var n=0;n<e.nodetypes.length;n++)if(e.nodetypes[n].typeId){t=!0;break}return t}}]),n}(),Td=function(){function n(){e(this,n)}return t(n,null,[{key:"getCanvasBasedOnCanvasInfo",value:function(e,t){return Object.assign({},e,{diagram:this.getDiagram(e,t.pipelines[0])})}},{key:"getDiagram",value:function(e,t){return{id:t.id,nodes:this.getCanvasNodes(t.nodes,e),comments:this.getCanvasComments(t.comments),links:this.getCanvasLinks(t.links)}}},{key:"getCanvasNodes",value:function(e,t){var n=this;return e.map((function(e){var i={id:e.id};e.inputs&&(i.inputPorts=n.getCanvasPorts(e.inputs)),e.outputs&&(i.outputPorts=n.getCanvasPorts(e.outputs)),i.image=e.image,i.x_pos=e.x_pos,i.y_pos=e.y_pos,i.className=e.class_name,i.objectData={label:e.label,description:e.description||""},i.userData={typeId:e.op},e.decorations&&(i.decorations=n.getCanvasDecorations(e.decorations));var o=n.getOldNode(e.id,t);return o&&o.userData&&(i.userData=o.userData),i}))}},{key:"getCanvasPorts",value:function(e){return e.map((function(e){var t={name:e.id,label:e.label};return e.cardinality&&(t.cardinality=e.cardinality.min+":"+e.cardinality.max),t}))}},{key:"getCanvasDecorations",value:function(e){return e.map((function(e){var t={};return e.position&&(t.position=e.position),e.class_name&&(t.className=e.class_name),e.image&&(t.image=e.image),e.hotspot&&(t.hotspot=e.hotspot),e.id&&(t.id=e.id),t}))}},{key:"getOldNode",value:function(e,t){if(t&&t.diagram&&t.diagram.nodes){var n=t.diagram.nodes.findIndex((function(t){return t.id===e}));if(n>-1)return t.diagram.nodes[n]}return null}},{key:"getCanvasComments",value:function(e){return e.map((function(e){return{id:e.id,className:e.class_name,content:e.content,height:e.height,width:e.width,x_pos:e.x_pos,y_pos:e.y_pos}}))}},{key:"getCanvasLinks",value:function(e){return e.map((function(e){var t={id:e.id,className:e.class_name,source:e.srcNodeId};e.srcNodePortId&&(t.sourcePort=e.srcNodePortId),t.target=e.trgNodeId,e.trgNodePortId&&(t.targetPort=e.trgNodePortId);var n="";switch(e.type){case"commentLink":n="comment";break;case"associationLink":n="object";break;default:n="data"}return t.userData={linkType:n},t}))}}]),n}(),Ed=function(){function n(){e(this,n)}return t(n,null,[{key:"convertPipelineFlowToCanvasInfo",value:function(e,t){var n=this.convertPipelinesToCanvasInfoPipelines(e.pipelines,t);return Object.assign({},e,{pipelines:n})}},{key:"convertPipelinesToCanvasInfoPipelines",value:function(e,t){var n=this,i=[];return e&&(i=e.map((function(e){return n.convertPipelineToCanvasInfoPipeline(e,t)}))),i}},{key:"convertPipelineToCanvasInfoPipeline",value:function(e,t){var n=p(e,"nodes")?e.nodes:[],i=p(e,"app_data.ui_data.comments")?e.app_data.ui_data.comments:[],o=p(e,"app_data.ui_data.detached_links")?e.app_data.ui_data.detached_links:[],a={id:e.id,name:e.name,nodes:this.convertNodes(n,t),comments:this.convertComments(i),links:this.convertLinks(n,i,o),runtime_ref:e.runtime_ref,app_data:e.app_data,parameters:e.parameters};return p(e,"app_data.ui_data.zoom")&&("number"==typeof e.app_data.ui_data.zoom?a.zoom={x:0,y:0,k:e.app_data.ui_data.zoom/100}:a.zoom=e.app_data.ui_data.zoom),p(a,"app_data.ui_data.comments")&&delete a.app_data.ui_data.comments,p(a,"app_data.ui_data.detached_links")&&delete a.app_data.ui_data.detached_links,a}},{key:"convertNodes",value:function(e,t){var n=this;return e.map((function(e){return n.convertNode(e,t)}))}},{key:"convertNode",value:function(e,t){var n={id:e.id,type:e.type,outputs:this.convertOutputs(e),inputs:this.convertInputs(e),label:this.convertLabel(e),x_pos:p(e,"app_data.ui_data.x_pos")?e.app_data.ui_data.x_pos:10,y_pos:p(e,"app_data.ui_data.y_pos")?e.app_data.ui_data.y_pos:10,decorations:p(e,"app_data.ui_data.decorations")?this.convertDecorations(e.app_data.ui_data.decorations):[],parameters:p(e,"parameters")?e.parameters:[],messages:p(e,"app_data.ui_data.messages")?e.app_data.ui_data.messages:[],ui_parameters:p(e,"app_data.ui_data.ui_parameters")?e.app_data.ui_data.ui_parameters:[],app_data:p(e,"app_data")?this.removeUiDataFromAppData(e.app_data):[]};return e.type!==xe&&e.type!==Te&&e.type!==Le||(n.op=e.op),e.type===G&&(p(e,"open_with_tool")&&(n.open_with_tool=e.open_with_tool),n.subflow_ref=p(e,"subflow_ref")?this.convertSubFlowRef(e.subflow_ref):{},n.is_expanded=!!p(e,"app_data.ui_data.is_expanded")&&e.app_data.ui_data.is_expanded,n.expanded_width=p(e,"app_data.ui_data.expanded_width")?e.app_data.ui_data.expanded_width:t.supernodeDefaultWidth,n.expanded_height=p(e,"app_data.ui_data.expanded_height")?e.app_data.ui_data.expanded_height:t.supernodeDefaultHeight),e.type===Le&&(n.model_ref=p(e,"model_ref")?e.model_ref:""),p(e,"app_data.ui_data.description")&&(n.description=e.app_data.ui_data.description),p(e,"app_data.ui_data.image")&&(n.image=e.app_data.ui_data.image),p(e,"app_data.ui_data.class_name")&&(n.class_name=e.app_data.ui_data.class_name),p(e,"app_data.ui_data.style")&&(n.style=e.app_data.ui_data.style),p(e,"isSupernodeInputBinding")&&(n.isSupernodeInputBinding=!0),p(e,"isSupernodeOutputBinding")&&(n.isSupernodeOutputBinding=!0),p(e,"connection")&&(n.connection=e.connection),p(e,"data_asset")&&(n.data_asset=e.data_asset),n}},{key:"convertSubFlowRef",value:function(e){var t={pipeline_id_ref:e.pipeline_id_ref};return e.url&&(t.url=e.url),t}},{key:"convertLabel",value:function(e){var t=p(e,"app_data.ui_data.label")?e.app_data.ui_data.label:"";return f(t)&&t.default?t.default:t}},{key:"convertOutputs",value:function(e){var t=this;return e.outputs?e.outputs.map((function(e){return t.convertPortObject(e)})):e.outputs}},{key:"convertInputs",value:function(e){var t=this;return e.inputs?e.inputs.map((function(e){return t.convertPortObject(e)})):e.inputs}},{key:"convertPortObject",value:function(e){var t={id:e.id,label:this.convertLabel(e)};return p(e,"subflow_node_ref")&&(t.subflow_node_ref=e.subflow_node_ref),p(e,"schema_ref")&&(t.schema_ref=e.schema_ref),p(e,"app_data.ui_data.cardinality")&&(t.cardinality={min:e.app_data.ui_data.cardinality.min,max:e.app_data.ui_data.cardinality.max}),p(e,"app_data.ui_data.class_name")&&(t.class_name=e.app_data.ui_data.class_name),p(e,"parameters")&&(t.parameters=e.parameters),e.app_data&&(t.app_data=this.removeUiDataFromAppData(e.app_data)),t}},{key:"convertDecorations",value:function(e){var t=this,n=[];return e&&e.forEach((function(e){var i=Object.assign({},e,{id:e.id||t.getUUID()});n.push(i)})),n}},{key:"convertComments",value:function(e){return e.map((function(e){var t={id:e.id,content:e.content,height:e.height,width:e.width,x_pos:e.x_pos,y_pos:e.y_pos};return p(e,"class_name")&&(t.class_name=e.class_name),p(e,"style")&&(t.style=e.style),t}))}},{key:"convertLinks",value:function(e,t,n){var i=this,o=[];return e.forEach((function(t){t.inputs&&t.inputs.forEach((function(n){n.links&&n.links.forEach((function(a){if(i.isNode(e,a.node_id_ref)){var r=i.createDataLink(a,a.node_id_ref,a.port_id_ref,t.id,n.id);o.push(r)}}))})),p(t,"app_data.ui_data.associations")&&!g(t.app_data.ui_data.associations)&&t.app_data.ui_data.associations.forEach((function(n){if(i.isNode(e,n.node_ref)){var a={id:n.id?n.id:i.getUUID(),srcNodeId:t.id,trgNodeId:n.node_ref,type:"associationLink",decorations:n.decorations};p(n,"class_name")&&(a.class_name=n.class_name),o.push(a)}}))})),t.forEach((function(t){t.associated_id_refs&&t.associated_id_refs.forEach((function(n){if(i.isNode(e,n.node_ref)){var a={id:n.id?n.id:i.getUUID(),srcNodeId:t.id,trgNodeId:n.node_ref,type:"commentLink"};p(n,"class_name")&&(a.class_name=n.class_name),n.style&&(a.style=n.style),o.push(a)}}))})),n.forEach((function(e){var t=i.createDataLink(e,e.src_node_id,e.src_node_port_id,e.trg_node_id,e.trg_node_port_id);e.src_pos&&(t.srcPos=e.src_pos),e.trg_pos&&(t.trgPos=e.trg_pos),o.push(t)})),o}},{key:"isNode",value:function(e,t){return-1!==e.findIndex((function(e){return e.id===t}))}},{key:"getUUID",value:function(){return Mt()}},{key:"createDataLink",value:function(e,t,n,i,o){var a={id:p(e,"id")?e.id:this.getUUID(),srcNodeId:t,trgNodeId:i,trgNodePortId:o,type:"nodeLink"};return p(e,"app_data.ui_data.class_name")&&(a.class_name=e.app_data.ui_data.class_name),p(e,"app_data.ui_data.style")&&(a.style=e.app_data.ui_data.style),p(e,"app_data.ui_data.decorations")&&(a.decorations=e.app_data.ui_data.decorations),e.app_data&&(a.app_data=this.removeUiDataFromAppData(e.app_data)),n&&(a.srcNodePortId=n),e.link_name&&(a.linkName=e.link_name),e.type_attr&&(a.typeAttr=e.type_attr),e.description&&(a.description=e.description),a}},{key:"removeUiDataFromAppData",value:function(e){var t;return e&&delete(t=ht(e)).ui_data,t}}]),n}(),Od=function(){function n(){e(this,n)}return t(n,null,[{key:"createPipelineFlow",value:function(e){var t=ht(e);return delete t.subdueStyle,Object.assign({},t,{pipelines:this.createPipelinesFromCanvasInfo(t)})}},{key:"createPipelinesFromCanvasInfo",value:function(e){var t=this;return e?this.filterOutExternalPipelines(e.pipelines).map((function(e){return t.createPipeline(e)})):{}}},{key:"filterOutExternalPipelines",value:function(e){return e.filter((function(e){return!e.parentUrl}))}},{key:"createPipeline",value:function(e){var t={id:e.id};return e.name&&(t.name=e.name),t.nodes=this.createNodes(e),t.app_data=this.createPipelineAppData(e),t.runtime_ref=e.runtime_ref,e.parameters&&(t.parameters=e.parameters),t}},{key:"createNodes",value:function(e){var t=this;return e.nodes.map((function(n){return t.createSchemaNode(n,e.links)}))}},{key:"createSchemaNode",value:function(e,t){var n={id:e.id,type:e.type};e.type!==xe&&e.type!==Te&&e.type!==Le||(e.op||""===e.op)&&(n.op=e.op),e.type===G&&(e.open_with_tool&&(n.open_with_tool=e.open_with_tool),n.subflow_ref=e.subflow_ref),e.type===Le&&(n.model_ref=e.model_ref),n.app_data=Object.assign({},e.app_data,{ui_data:this.createNodeUiData(e)}),e.inputs&&(n.inputs=this.createInputs(e,t)),e.outputs&&(n.outputs=this.createOutputs(e)),e.parameters&&!g(e.parameters)&&(n.parameters=e.parameters),e.connection&&(n.connection=e.connection),e.data_asset&&(n.data_asset=e.data_asset);var i=this.createAssociationLinks(e,t);return g(i)||(n.app_data.ui_data.associations=i),n}},{key:"createNodeUiData",value:function(e){var t={label:e.label,image:e.image,x_pos:e.x_pos,y_pos:e.y_pos};if(e.class_name&&(t.class_name=e.class_name),e.style&&(t.style=e.style),e.description&&(t.description=e.description),e.type===G&&(t.is_expanded=e.is_expanded,t.expanded_width=e.expanded_width,t.expanded_height=e.expanded_height),e.messages&&!g(e.messages)&&(t.messages=e.messages),e.ui_parameters&&!g(e.ui_parameters)&&(t.ui_parameters=e.ui_parameters),e.decorations){var n=this.createDecorations(e.decorations);n.length>0&&(t.decorations=n)}return t}},{key:"createDecorations",value:function(e){var t=[];return e&&e.forEach((function(e){if(!e.temporary){var n=Object.assign({},e);t.push(n)}})),t}},{key:"createInputs",value:function(e,t){var n=this,i=[];return e.inputs.forEach((function(o,a){var r={id:o.id};e.type===G&&o.subflow_node_ref&&(r.subflow_node_ref=o.subflow_node_ref),o.schema_ref&&(r.schema_ref=o.schema_ref),r.app_data=Object.assign({},o.app_data,{ui_data:n.createPortUiData(o)});var s=n.createLinks(t,e.id,o.id,a);s.length>0&&(r.links=s),o.parameters&&(r.parameters=o.parameters),i.push(r)})),i}},{key:"createOutputs",value:function(e){var t=this,n=[];return e.outputs.forEach((function(i){var o={id:i.id};e.type===G&&i.subflow_node_ref&&(o.subflow_node_ref=i.subflow_node_ref),i.schema_ref&&(o.schema_ref=i.schema_ref),o.app_data=Object.assign({},i.app_data,{ui_data:t.createPortUiData(i)}),i.parameters&&(o.parameters=i.parameters),n.push(o)})),n}},{key:"createPortUiData",value:function(e){var t={};return e.cardinality&&(t.cardinality=e.cardinality),e.class_name&&(t.class_name=e.class_name),t.label=e.label,t}},{key:"createLinks",value:function(e,t,n,i){var o=this,a=[];e&&this.getFilteredCanvasLinks(e,t,n,i).forEach((function(e){if(void 0!==e.srcNodeId){var t={id:e.id,node_id_ref:e.srcNodeId};e.srcNodePortId&&(t.port_id_ref=e.srcNodePortId),t=o.addNodeLinkCommonAttrs(t,e),a.push(t)}}));return a}},{key:"getFilteredCanvasLinks",value:function(e,t,n,i){return e.filter((function(e){if("nodeLink"===e.type&&e.trgNodeId===t)if(e.trgNodePortId){if(e.trgNodePortId===n)return!0}else if(0===i)return!0;return!1}))}},{key:"createPipelineAppData",value:function(e){return e.app_data?Object.assign({},e.app_data,{ui_data:this.createPipelineUiData(e)}):{ui_data:this.createPipelineUiData(e)}}},{key:"createPipelineUiData",value:function(e){var t=null;t=e.app_data&&e.app_data.ui_data?Object.assign({},e.app_data.ui_data,{comments:this.createComments(e.comments,e.links)}):{comments:this.createComments(e.comments,e.links)};var n=this.createDetachedLinks(e.links);return n.length>0&&(t.detached_links=n),e.zoom&&(t.zoom=e.zoom),t}},{key:"createComments",value:function(e,t){var n=this;return e.map((function(e){var i={id:e.id,x_pos:e.x_pos,y_pos:e.y_pos,width:e.width,height:e.height};return e.class_name&&(i.class_name=e.class_name),i.content=e.content,i.associated_id_refs=n.createCommentLinks(t,e.id),e.style&&(i.style=e.style),i}))}},{key:"createCommentLinks",value:function(e,t){var n=[];return e.forEach((function(e){if("commentLink"===e.type&&e.srcNodeId===t){var i={node_ref:e.trgNodeId};e.class_name&&(i.class_name=e.class_name),e.style&&(i.style=e.style),n.push(i)}})),n}},{key:"createAssociationLinks",value:function(e,t){var n=this,i=[];return t.forEach((function(t){if("associationLink"===t.type&&t.srcNodeId===e.id){var o={id:t.id,node_ref:t.trgNodeId};if(t.class_name&&(o.class_name=t.class_name),t.style&&(o.style=t.style),t.decorations){var a=n.createDecorations(t.decorations);a.length>0&&(o.decorations=a)}i.push(o)}})),i}},{key:"createDetachedLinks",value:function(e){var t=this,n=[];return e.forEach((function(e){if(!e.srcNodeId||!e.trgNodeId){var i={id:e.id};e.srcNodeId?(i.src_node_id=e.srcNodeId,e.srcNodePortId&&(i.src_node_port_id=e.srcNodePortId)):e.srcPos&&(i.src_pos=e.srcPos),e.trgNodeId?(i.trg_node_id=e.trgNodeId,e.trgNodePortId&&(i.trg_node_port_id=e.trgNodePortId)):e.trgPos&&(i.trg_pos=e.trgPos),i=t.addNodeLinkCommonAttrs(i,e),n.push(i)}})),n}},{key:"addNodeLinkCommonAttrs",value:function(e,t){if(t.app_data&&nt(e,"app_data",t.app_data),t.class_name&&nt(e,"app_data.ui_data.class_name",t.class_name),t.style&&nt(e,"app_data.ui_data.style",t.style),t.decorations){var n=this.createDecorations(t.decorations);n.length>0&&nt(e,"app_data.ui_data.decorations",n)}return t.linkName&&(e.link_name=t.linkName),t.typeAttr&&(e.type_attr=t.typeAttr),t.description&&(e.description=t.description),e}}]),n}(),Dd={exports:{}},jd=Dd.exports=function(){function e(t,n,i){function o(r,s){if(!n[r]){if(!t[r]){var l="function"==typeof b&&b;if(!s&&l)return l(r,!0);if(a)return a(r,!0);var c=new Error("Cannot find module '"+r+"'");throw c.code="MODULE_NOT_FOUND",c}var d=n[r]={exports:{}};t[r][0].call(d.exports,(function(e){return o(t[r][1][e]||e)}),d,d.exports,e,t,n,i)}return n[r].exports}for(var a="function"==typeof b&&b,r=0;r<i.length;r++)o(i[r]);return o}return e}()({1:[function(e,t,n){t.exports={graphlib:e("./lib/graphlib"),layout:e("./lib/layout"),debug:e("./lib/debug"),util:{time:e("./lib/util").time,notime:e("./lib/util").notime},version:e("./lib/version")}},{"./lib/debug":6,"./lib/graphlib":7,"./lib/layout":9,"./lib/util":29,"./lib/version":30}],2:[function(e,t,n){var i=e("./lodash"),o=e("./greedy-fas");function a(e){var t="greedy"===e.graph().acyclicer?o(e,n(e)):r(e);function n(e){return function(t){return e.edge(t).weight}}i.forEach(t,(function(t){var n=e.edge(t);e.removeEdge(t),n.forwardName=t.name,n.reversed=!0,e.setEdge(t.w,t.v,n,i.uniqueId("rev"))}))}function r(e){var t=[],n={},o={};function a(r){i.has(o,r)||(o[r]=!0,n[r]=!0,i.forEach(e.outEdges(r),(function(e){i.has(n,e.w)?t.push(e):a(e.w)})),delete n[r])}return i.forEach(e.nodes(),a),t}function s(e){i.forEach(e.edges(),(function(t){var n=e.edge(t);if(n.reversed){e.removeEdge(t);var i=n.forwardName;delete n.reversed,delete n.forwardName,e.setEdge(t.w,t.v,n,i)}}))}t.exports={run:a,undo:s}},{"./greedy-fas":8,"./lodash":10}],3:[function(e,t,n){var i=e("./lodash"),o=e("./util");function a(e){function t(n){var o=e.children(n),a=e.node(n);if(o.length&&i.forEach(o,t),i.has(a,"minRank")){a.borderLeft=[],a.borderRight=[];for(var s=a.minRank,l=a.maxRank+1;s<l;++s)r(e,"borderLeft","_bl",n,a,s),r(e,"borderRight","_br",n,a,s)}}i.forEach(e.children(),t)}function r(e,t,n,i,a,r){var s={width:0,height:0,rank:r,borderType:t},l=a[t][r-1],c=o.addDummyNode(e,"border",s,n);a[t][r]=c,e.setParent(c,i),l&&e.setEdge(l,c,{weight:1})}t.exports=a},{"./lodash":10,"./util":29}],4:[function(e,t,n){var i=e("./lodash");function o(e){var t=e.graph().rankdir.toLowerCase();"lr"!==t&&"rl"!==t||r(e)}function a(e){var t=e.graph().rankdir.toLowerCase();"bt"!==t&&"rl"!==t||l(e),"lr"!==t&&"rl"!==t||(d(e),r(e))}function r(e){i.forEach(e.nodes(),(function(t){s(e.node(t))})),i.forEach(e.edges(),(function(t){s(e.edge(t))}))}function s(e){var t=e.width;e.width=e.height,e.height=t}function l(e){i.forEach(e.nodes(),(function(t){c(e.node(t))})),i.forEach(e.edges(),(function(t){var n=e.edge(t);i.forEach(n.points,c),i.has(n,"y")&&c(n)}))}function c(e){e.y=-e.y}function d(e){i.forEach(e.nodes(),(function(t){u(e.node(t))})),i.forEach(e.edges(),(function(t){var n=e.edge(t);i.forEach(n.points,u),i.has(n,"x")&&u(n)}))}function u(e){var t=e.x;e.x=e.y,e.y=t}t.exports={adjust:o,undo:a}},{"./lodash":10}],5:[function(e,t,n){function i(){var e={};e._next=e._prev=e,this._sentinel=e}function o(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function a(e,t){if("_next"!==e&&"_prev"!==e)return t}t.exports=i,i.prototype.dequeue=function(){var e=this._sentinel,t=e._prev;if(t!==e)return o(t),t},i.prototype.enqueue=function(e){var t=this._sentinel;e._prev&&e._next&&o(e),e._next=t._next,t._next._prev=e,t._next=e,e._prev=t},i.prototype.toString=function(){for(var e=[],t=this._sentinel,n=t._prev;n!==t;)e.push(JSON.stringify(n,a)),n=n._prev;return"["+e.join(", ")+"]"}},{}],6:[function(e,t,n){var i=e("./lodash"),o=e("./util"),a=e("./graphlib").Graph;function r(e){var t=o.buildLayerMatrix(e),n=new a({compound:!0,multigraph:!0}).setGraph({});return i.forEach(e.nodes(),(function(t){n.setNode(t,{label:t}),n.setParent(t,"layer"+e.node(t).rank)})),i.forEach(e.edges(),(function(e){n.setEdge(e.v,e.w,{},e.name)})),i.forEach(t,(function(e,t){var o="layer"+t;n.setNode(o,{rank:"same"}),i.reduce(e,(function(e,t){return n.setEdge(e,t,{style:"invis"}),t}))})),n}t.exports={debugOrdering:r}},{"./graphlib":7,"./lodash":10,"./util":29}],7:[function(e,t,n){var i;if("function"==typeof e)try{i=e("graphlib")}catch(e){}i||(i=window.graphlib),t.exports=i},{graphlib:31}],8:[function(e,t,n){var i=e("./lodash"),o=e("./graphlib").Graph,a=e("./data/list");t.exports=s;var r=i.constant(1);function s(e,t){if(e.nodeCount()<=1)return[];var n=d(e,t||r),o=l(n.graph,n.buckets,n.zeroIdx);return i.flatten(i.map(o,(function(t){return e.outEdges(t.v,t.w)})),!0)}function l(e,t,n){for(var i,o=[],a=t[t.length-1],r=t[0];e.nodeCount();){for(;i=r.dequeue();)c(e,t,n,i);for(;i=a.dequeue();)c(e,t,n,i);if(e.nodeCount())for(var s=t.length-2;s>0;--s)if(i=t[s].dequeue()){o=o.concat(c(e,t,n,i,!0));break}}return o}function c(e,t,n,o,a){var r=a?[]:void 0;return i.forEach(e.inEdges(o.v),(function(i){var o=e.edge(i),s=e.node(i.v);a&&r.push({v:i.v,w:i.w}),s.out-=o,u(t,n,s)})),i.forEach(e.outEdges(o.v),(function(i){var o=e.edge(i),a=i.w,r=e.node(a);r.in-=o,u(t,n,r)})),e.removeNode(o.v),r}function d(e,t){var n=new o,r=0,s=0;i.forEach(e.nodes(),(function(e){n.setNode(e,{v:e,in:0,out:0})})),i.forEach(e.edges(),(function(e){var i=n.edge(e.v,e.w)||0,o=t(e),a=i+o;n.setEdge(e.v,e.w,a),s=Math.max(s,n.node(e.v).out+=o),r=Math.max(r,n.node(e.w).in+=o)}));var l=i.range(s+r+3).map((function(){return new a})),c=r+1;return i.forEach(n.nodes(),(function(e){u(l,c,n.node(e))})),{graph:n,buckets:l,zeroIdx:c}}function u(e,t,n){n.out?n.in?e[n.out-n.in+t].enqueue(n):e[e.length-1].enqueue(n):e[0].enqueue(n)}},{"./data/list":5,"./graphlib":7,"./lodash":10}],9:[function(e,t,n){var i=e("./lodash"),o=e("./acyclic"),a=e("./normalize"),r=e("./rank"),s=e("./util").normalizeRanks,l=e("./parent-dummy-chains"),c=e("./util").removeEmptyRanks,d=e("./nesting-graph"),u=e("./add-border-segments"),p=e("./coordinate-system"),h=e("./order"),f=e("./position"),g=e("./util"),y=e("./graphlib").Graph;function v(e,t){var n=t&&t.debugTiming?g.time:g.notime;n("layout",(function(){var t=n(" buildLayoutGraph",(function(){return L(e)}));n(" runLayout",(function(){m(t,n)})),n(" updateInputGraph",(function(){b(e,t)}))}))}function m(e,t){t(" makeSpaceForEdgeLabels",(function(){x(e)})),t(" removeSelfEdges",(function(){U(e)})),t(" acyclic",(function(){o.run(e)})),t(" nestingGraph.run",(function(){d.run(e)})),t(" rank",(function(){r(g.asNonCompoundGraph(e))})),t(" injectEdgeLabelProxies",(function(){T(e)})),t(" removeEmptyRanks",(function(){c(e)})),t(" nestingGraph.cleanup",(function(){d.cleanup(e)})),t(" normalizeRanks",(function(){s(e)})),t(" assignRankMinMax",(function(){E(e)})),t(" removeEdgeLabelProxies",(function(){O(e)})),t(" normalize.run",(function(){a.run(e)})),t(" parentDummyChains",(function(){l(e)})),t(" addBorderSegments",(function(){u(e)})),t(" order",(function(){h(e)})),t(" insertSelfEdges",(function(){F(e)})),t(" adjustCoordinateSystem",(function(){p.adjust(e)})),t(" position",(function(){f(e)})),t(" positionSelfEdges",(function(){z(e)})),t(" removeBorderNodes",(function(){R(e)})),t(" normalize.undo",(function(){a.undo(e)})),t(" fixupEdgeLabelCoords",(function(){A(e)})),t(" undoCoordinateSystem",(function(){p.undo(e)})),t(" translateGraph",(function(){D(e)})),t(" assignNodeIntersects",(function(){j(e)})),t(" reversePoints",(function(){M(e)})),t(" acyclic.undo",(function(){o.undo(e)}))}function b(e,t){i.forEach(e.nodes(),(function(n){var i=e.node(n),o=t.node(n);i&&(i.x=o.x,i.y=o.y,t.children(n).length&&(i.width=o.width,i.height=o.height))})),i.forEach(e.edges(),(function(n){var o=e.edge(n),a=t.edge(n);o.points=a.points,i.has(a,"x")&&(o.x=a.x,o.y=a.y)})),e.graph().width=t.graph().width,e.graph().height=t.graph().height}t.exports=v;var _=["nodesep","edgesep","ranksep","marginx","marginy"],k={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},P=["acyclicer","ranker","rankdir","align"],I=["width","height"],N={width:0,height:0},w=["minlen","weight","width","height","labeloffset"],C={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},S=["labelpos"];function L(e){var t=new y({multigraph:!0,compound:!0}),n=H(e.graph());return t.setGraph(i.merge({},k,B(n,_),i.pick(n,P))),i.forEach(e.nodes(),(function(n){var o=H(e.node(n));t.setNode(n,i.defaults(B(o,I),N)),t.setParent(n,e.parent(n))})),i.forEach(e.edges(),(function(n){var o=H(e.edge(n));t.setEdge(n,i.merge({},C,B(o,w),i.pick(o,S)))})),t}function x(e){var t=e.graph();t.ranksep/=2,i.forEach(e.edges(),(function(n){var i=e.edge(n);i.minlen*=2,"c"!==i.labelpos.toLowerCase()&&("TB"===t.rankdir||"BT"===t.rankdir?i.width+=i.labeloffset:i.height+=i.labeloffset)}))}function T(e){i.forEach(e.edges(),(function(t){var n=e.edge(t);if(n.width&&n.height){var i=e.node(t.v),o={rank:(e.node(t.w).rank-i.rank)/2+i.rank,e:t};g.addDummyNode(e,"edge-proxy",o,"_ep")}}))}function E(e){var t=0;i.forEach(e.nodes(),(function(n){var o=e.node(n);o.borderTop&&(o.minRank=e.node(o.borderTop).rank,o.maxRank=e.node(o.borderBottom).rank,t=i.max(t,o.maxRank))})),e.graph().maxRank=t}function O(e){i.forEach(e.nodes(),(function(t){var n=e.node(t);"edge-proxy"===n.dummy&&(e.edge(n.e).labelRank=n.rank,e.removeNode(t))}))}function D(e){var t=Number.POSITIVE_INFINITY,n=0,o=Number.POSITIVE_INFINITY,a=0,r=e.graph(),s=r.marginx||0,l=r.marginy||0;function c(e){var i=e.x,r=e.y,s=e.width,l=e.height;t=Math.min(t,i-s/2),n=Math.max(n,i+s/2),o=Math.min(o,r-l/2),a=Math.max(a,r+l/2)}i.forEach(e.nodes(),(function(t){c(e.node(t))})),i.forEach(e.edges(),(function(t){var n=e.edge(t);i.has(n,"x")&&c(n)})),t-=s,o-=l,i.forEach(e.nodes(),(function(n){var i=e.node(n);i.x-=t,i.y-=o})),i.forEach(e.edges(),(function(n){var a=e.edge(n);i.forEach(a.points,(function(e){e.x-=t,e.y-=o})),i.has(a,"x")&&(a.x-=t),i.has(a,"y")&&(a.y-=o)})),r.width=n-t+s,r.height=a-o+l}function j(e){i.forEach(e.edges(),(function(t){var n,i,o=e.edge(t),a=e.node(t.v),r=e.node(t.w);o.points?(n=o.points[0],i=o.points[o.points.length-1]):(o.points=[],n=r,i=a),o.points.unshift(g.intersectRect(a,n)),o.points.push(g.intersectRect(r,i))}))}function A(e){i.forEach(e.edges(),(function(t){var n=e.edge(t);if(i.has(n,"x"))switch("l"!==n.labelpos&&"r"!==n.labelpos||(n.width-=n.labeloffset),n.labelpos){case"l":n.x-=n.width/2+n.labeloffset;break;case"r":n.x+=n.width/2+n.labeloffset}}))}function M(e){i.forEach(e.edges(),(function(t){var n=e.edge(t);n.reversed&&n.points.reverse()}))}function R(e){i.forEach(e.nodes(),(function(t){if(e.children(t).length){var n=e.node(t),o=e.node(n.borderTop),a=e.node(n.borderBottom),r=e.node(i.last(n.borderLeft)),s=e.node(i.last(n.borderRight));n.width=Math.abs(s.x-r.x),n.height=Math.abs(a.y-o.y),n.x=r.x+n.width/2,n.y=o.y+n.height/2}})),i.forEach(e.nodes(),(function(t){"border"===e.node(t).dummy&&e.removeNode(t)}))}function U(e){i.forEach(e.edges(),(function(t){if(t.v===t.w){var n=e.node(t.v);n.selfEdges||(n.selfEdges=[]),n.selfEdges.push({e:t,label:e.edge(t)}),e.removeEdge(t)}}))}function F(e){var t=g.buildLayerMatrix(e);i.forEach(t,(function(t){var n=0;i.forEach(t,(function(t,o){var a=e.node(t);a.order=o+n,i.forEach(a.selfEdges,(function(t){g.addDummyNode(e,"selfedge",{width:t.label.width,height:t.label.height,rank:a.rank,order:o+ ++n,e:t.e,label:t.label},"_se")})),delete a.selfEdges}))}))}function z(e){i.forEach(e.nodes(),(function(t){var n=e.node(t);if("selfedge"===n.dummy){var i=e.node(n.e.v),o=i.x+i.width/2,a=i.y,r=n.x-o,s=i.height/2;e.setEdge(n.e,n.label),e.removeNode(t),n.label.points=[{x:o+2*r/3,y:a-s},{x:o+5*r/6,y:a-s},{x:o+r,y:a},{x:o+5*r/6,y:a+s},{x:o+2*r/3,y:a+s}],n.label.x=n.x,n.label.y=n.y}}))}function B(e,t){return i.mapValues(i.pick(e,t),Number)}function H(e){var t={};return i.forEach(e,(function(e,n){t[n.toLowerCase()]=e})),t}},{"./acyclic":2,"./add-border-segments":3,"./coordinate-system":4,"./graphlib":7,"./lodash":10,"./nesting-graph":11,"./normalize":12,"./order":17,"./parent-dummy-chains":22,"./position":24,"./rank":26,"./util":29}],10:[function(e,t,n){var i;if("function"==typeof e)try{i={cloneDeep:e("lodash/cloneDeep"),constant:e("lodash/constant"),defaults:e("lodash/defaults"),each:e("lodash/each"),filter:e("lodash/filter"),find:e("lodash/find"),flatten:e("lodash/flatten"),forEach:e("lodash/forEach"),forIn:e("lodash/forIn"),has:e("lodash/has"),isUndefined:e("lodash/isUndefined"),last:e("lodash/last"),map:e("lodash/map"),mapValues:e("lodash/mapValues"),max:e("lodash/max"),merge:e("lodash/merge"),min:e("lodash/min"),minBy:e("lodash/minBy"),now:e("lodash/now"),pick:e("lodash/pick"),range:e("lodash/range"),reduce:e("lodash/reduce"),sortBy:e("lodash/sortBy"),uniqueId:e("lodash/uniqueId"),values:e("lodash/values"),zipObject:e("lodash/zipObject")}}catch(e){}i||(i=window._),t.exports=i},{"lodash/cloneDeep":227,"lodash/constant":228,"lodash/defaults":229,"lodash/each":230,"lodash/filter":232,"lodash/find":233,"lodash/flatten":235,"lodash/forEach":236,"lodash/forIn":237,"lodash/has":239,"lodash/isUndefined":258,"lodash/last":261,"lodash/map":262,"lodash/mapValues":263,"lodash/max":264,"lodash/merge":266,"lodash/min":267,"lodash/minBy":268,"lodash/now":270,"lodash/pick":271,"lodash/range":273,"lodash/reduce":274,"lodash/sortBy":276,"lodash/uniqueId":286,"lodash/values":287,"lodash/zipObject":288}],11:[function(e,t,n){var i=e("./lodash"),o=e("./util");function a(e){var t=o.addDummyNode(e,"root",{},"_root"),n=s(e),a=i.max(i.values(n))-1,c=2*a+1;e.graph().nestingRoot=t,i.forEach(e.edges(),(function(t){e.edge(t).minlen*=c}));var d=l(e)+1;i.forEach(e.children(),(function(i){r(e,t,c,d,a,n,i)})),e.graph().nodeRankFactor=c}function r(e,t,n,a,s,l,c){var d=e.children(c);if(d.length){var u=o.addBorderNode(e,"_bt"),p=o.addBorderNode(e,"_bb"),h=e.node(c);e.setParent(u,c),h.borderTop=u,e.setParent(p,c),h.borderBottom=p,i.forEach(d,(function(i){r(e,t,n,a,s,l,i);var o=e.node(i),d=o.borderTop?o.borderTop:i,h=o.borderBottom?o.borderBottom:i,f=o.borderTop?a:2*a,g=d!==h?1:s-l[c]+1;e.setEdge(u,d,{weight:f,minlen:g,nestingEdge:!0}),e.setEdge(h,p,{weight:f,minlen:g,nestingEdge:!0})})),e.parent(c)||e.setEdge(t,u,{weight:0,minlen:s+l[c]})}else c!==t&&e.setEdge(t,c,{weight:0,minlen:n})}function s(e){var t={};function n(o,a){var r=e.children(o);r&&r.length&&i.forEach(r,(function(e){n(e,a+1)})),t[o]=a}return i.forEach(e.children(),(function(e){n(e,1)})),t}function l(e){return i.reduce(e.edges(),(function(t,n){return t+e.edge(n).weight}),0)}function c(e){var t=e.graph();e.removeNode(t.nestingRoot),delete t.nestingRoot,i.forEach(e.edges(),(function(t){e.edge(t).nestingEdge&&e.removeEdge(t)}))}t.exports={run:a,cleanup:c}},{"./lodash":10,"./util":29}],12:[function(e,t,n){var i=e("./lodash"),o=e("./util");function a(e){e.graph().dummyChains=[],i.forEach(e.edges(),(function(t){r(e,t)}))}function r(e,t){var n=t.v,i=e.node(n).rank,a=t.w,r=e.node(a).rank,s=t.name,l=e.edge(t),c=l.labelRank;if(r!==i+1){var d,u,p;for(e.removeEdge(t),p=0,++i;i<r;++p,++i)l.points=[],u={width:0,height:0,edgeLabel:l,edgeObj:t,rank:i},d=o.addDummyNode(e,"edge",u,"_d"),i===c&&(u.width=l.width,u.height=l.height,u.dummy="edge-label",u.labelpos=l.labelpos),e.setEdge(n,d,{weight:l.weight},s),0===p&&e.graph().dummyChains.push(d),n=d;e.setEdge(n,a,{weight:l.weight},s)}}function s(e){i.forEach(e.graph().dummyChains,(function(t){var n,i=e.node(t),o=i.edgeLabel;for(e.setEdge(i.edgeObj,o);i.dummy;)n=e.successors(t)[0],e.removeNode(t),o.points.push({x:i.x,y:i.y}),"edge-label"===i.dummy&&(o.x=i.x,o.y=i.y,o.width=i.width,o.height=i.height),t=n,i=e.node(t)}))}t.exports={run:a,undo:s}},{"./lodash":10,"./util":29}],13:[function(e,t,n){var i=e("../lodash");function o(e,t,n){var o,a={};i.forEach(n,(function(n){for(var i,r,s=e.parent(n);s;){if((i=e.parent(s))?(r=a[i],a[i]=s):(r=o,o=s),r&&r!==s)return void t.setEdge(r,s);s=i}}))}t.exports=o},{"../lodash":10}],14:[function(e,t,n){var i=e("../lodash");function o(e,t){return i.map(t,(function(t){var n=e.inEdges(t);if(n.length){var o=i.reduce(n,(function(t,n){var i=e.edge(n),o=e.node(n.v);return{sum:t.sum+i.weight*o.order,weight:t.weight+i.weight}}),{sum:0,weight:0});return{v:t,barycenter:o.sum/o.weight,weight:o.weight}}return{v:t}}))}t.exports=o},{"../lodash":10}],15:[function(e,t,n){var i=e("../lodash"),o=e("../graphlib").Graph;function a(e,t,n){var a=r(e),s=new o({compound:!0}).setGraph({root:a}).setDefaultNodeLabel((function(t){return e.node(t)}));return i.forEach(e.nodes(),(function(o){var r=e.node(o),l=e.parent(o);(r.rank===t||r.minRank<=t&&t<=r.maxRank)&&(s.setNode(o),s.setParent(o,l||a),i.forEach(e[n](o),(function(t){var n=t.v===o?t.w:t.v,a=s.edge(n,o),r=i.isUndefined(a)?0:a.weight;s.setEdge(n,o,{weight:e.edge(t).weight+r})})),i.has(r,"minRank")&&s.setNode(o,{borderLeft:r.borderLeft[t],borderRight:r.borderRight[t]}))})),s}function r(e){for(var t;e.hasNode(t=i.uniqueId("_root")););return t}t.exports=a},{"../graphlib":7,"../lodash":10}],16:[function(e,t,n){var i=e("../lodash");function o(e,t){for(var n=0,i=1;i<t.length;++i)n+=a(e,t[i-1],t[i]);return n}function a(e,t,n){for(var o=i.zipObject(n,i.map(n,(function(e,t){return t}))),a=i.flatten(i.map(t,(function(t){return i.sortBy(i.map(e.outEdges(t),(function(t){return{pos:o[t.w],weight:e.edge(t).weight}})),"pos")})),!0),r=1;r<n.length;)r<<=1;var s=2*r-1;r-=1;var l=i.map(new Array(s),(function(){return 0})),c=0;return i.forEach(a.forEach((function(e){var t=e.pos+r;l[t]+=e.weight;for(var n=0;t>0;)t%2&&(n+=l[t+1]),l[t=t-1>>1]+=e.weight;c+=e.weight*n}))),c}t.exports=o},{"../lodash":10}],17:[function(e,t,n){var i=e("../lodash"),o=e("./init-order"),a=e("./cross-count"),r=e("./sort-subgraph"),s=e("./build-layer-graph"),l=e("./add-subgraph-constraints"),c=e("../graphlib").Graph,d=e("../util");function u(e){var t=d.maxRank(e),n=p(e,i.range(1,t+1),"inEdges"),r=p(e,i.range(t-1,-1,-1),"outEdges"),s=o(e);f(e,s);for(var l,c=Number.POSITIVE_INFINITY,u=0,g=0;g<4;++u,++g){h(u%2?n:r,u%4>=2),s=d.buildLayerMatrix(e);var y=a(e,s);y<c&&(g=0,l=i.cloneDeep(s),c=y)}f(e,l)}function p(e,t,n){return i.map(t,(function(t){return s(e,t,n)}))}function h(e,t){var n=new c;i.forEach(e,(function(e){var o=e.graph().root,a=r(e,o,n,t);i.forEach(a.vs,(function(t,n){e.node(t).order=n})),l(e,n,a.vs)}))}function f(e,t){i.forEach(t,(function(t){i.forEach(t,(function(t,n){e.node(t).order=n}))}))}t.exports=u},{"../graphlib":7,"../lodash":10,"../util":29,"./add-subgraph-constraints":13,"./build-layer-graph":15,"./cross-count":16,"./init-order":18,"./sort-subgraph":20}],18:[function(e,t,n){var i=e("../lodash");function o(e){var t={},n=i.filter(e.nodes(),(function(t){return!e.children(t).length})),o=i.max(i.map(n,(function(t){return e.node(t).rank}))),a=i.map(i.range(o+1),(function(){return[]}));function r(n){if(!i.has(t,n)){t[n]=!0;var o=e.node(n);a[o.rank].push(n),i.forEach(e.successors(n),r)}}var s=i.sortBy(n,(function(t){return e.node(t).rank}));return i.forEach(s,r),a}t.exports=o},{"../lodash":10}],19:[function(e,t,n){var i=e("../lodash");function o(e,t){var n={};return i.forEach(e,(function(e,t){var o=n[e.v]={indegree:0,in:[],out:[],vs:[e.v],i:t};i.isUndefined(e.barycenter)||(o.barycenter=e.barycenter,o.weight=e.weight)})),i.forEach(t.edges(),(function(e){var t=n[e.v],o=n[e.w];i.isUndefined(t)||i.isUndefined(o)||(o.indegree++,t.out.push(n[e.w]))})),a(i.filter(n,(function(e){return!e.indegree})))}function a(e){var t=[];function n(e){return function(t){t.merged||(i.isUndefined(t.barycenter)||i.isUndefined(e.barycenter)||t.barycenter>=e.barycenter)&&r(e,t)}}function o(t){return function(n){n.in.push(t),0==--n.indegree&&e.push(n)}}for(;e.length;){var a=e.pop();t.push(a),i.forEach(a.in.reverse(),n(a)),i.forEach(a.out,o(a))}return i.map(i.filter(t,(function(e){return!e.merged})),(function(e){return i.pick(e,["vs","i","barycenter","weight"])}))}function r(e,t){var n=0,i=0;e.weight&&(n+=e.barycenter*e.weight,i+=e.weight),t.weight&&(n+=t.barycenter*t.weight,i+=t.weight),e.vs=t.vs.concat(e.vs),e.barycenter=n/i,e.weight=i,e.i=Math.min(t.i,e.i),t.merged=!0}t.exports=o},{"../lodash":10}],20:[function(e,t,n){var i=e("../lodash"),o=e("./barycenter"),a=e("./resolve-conflicts"),r=e("./sort");function s(e,t,n,d){var u=e.children(t),p=e.node(t),h=p?p.borderLeft:void 0,f=p?p.borderRight:void 0,g={};h&&(u=i.filter(u,(function(e){return e!==h&&e!==f})));var y=o(e,u);i.forEach(y,(function(t){if(e.children(t.v).length){var o=s(e,t.v,n,d);g[t.v]=o,i.has(o,"barycenter")&&c(t,o)}}));var v=a(y,n);l(v,g);var m=r(v,d);if(h&&(m.vs=i.flatten([h,m.vs,f],!0),e.predecessors(h).length)){var b=e.node(e.predecessors(h)[0]),_=e.node(e.predecessors(f)[0]);i.has(m,"barycenter")||(m.barycenter=0,m.weight=0),m.barycenter=(m.barycenter*m.weight+b.order+_.order)/(m.weight+2),m.weight+=2}return m}function l(e,t){i.forEach(e,(function(e){e.vs=i.flatten(e.vs.map((function(e){return t[e]?t[e].vs:e})),!0)}))}function c(e,t){i.isUndefined(e.barycenter)?(e.barycenter=t.barycenter,e.weight=t.weight):(e.barycenter=(e.barycenter*e.weight+t.barycenter*t.weight)/(e.weight+t.weight),e.weight+=t.weight)}t.exports=s},{"../lodash":10,"./barycenter":14,"./resolve-conflicts":19,"./sort":21}],21:[function(e,t,n){var i=e("../lodash"),o=e("../util");function a(e,t){var n=o.partition(e,(function(e){return i.has(e,"barycenter")})),a=n.lhs,l=i.sortBy(n.rhs,(function(e){return-e.i})),c=[],d=0,u=0,p=0;a.sort(s(!!t)),p=r(c,l,p),i.forEach(a,(function(e){p+=e.vs.length,c.push(e.vs),d+=e.barycenter*e.weight,u+=e.weight,p=r(c,l,p)}));var h={vs:i.flatten(c,!0)};return u&&(h.barycenter=d/u,h.weight=u),h}function r(e,t,n){for(var o;t.length&&(o=i.last(t)).i<=n;)t.pop(),e.push(o.vs),n++;return n}function s(e){return function(t,n){return t.barycenter<n.barycenter?-1:t.barycenter>n.barycenter?1:e?n.i-t.i:t.i-n.i}}t.exports=a},{"../lodash":10,"../util":29}],22:[function(e,t,n){var i=e("./lodash");function o(e){var t=r(e);i.forEach(e.graph().dummyChains,(function(n){for(var i=e.node(n),o=i.edgeObj,r=a(e,t,o.v,o.w),s=r.path,l=r.lca,c=0,d=s[c],u=!0;n!==o.w;){if(i=e.node(n),u){for(;(d=s[c])!==l&&e.node(d).maxRank<i.rank;)c++;d===l&&(u=!1)}if(!u){for(;c<s.length-1&&e.node(d=s[c+1]).minRank<=i.rank;)c++;d=s[c]}e.setParent(n,d),n=e.successors(n)[0]}}))}function a(e,t,n,i){var o,a,r=[],s=[],l=Math.min(t[n].low,t[i].low),c=Math.max(t[n].lim,t[i].lim);o=n;do{o=e.parent(o),r.push(o)}while(o&&(t[o].low>l||c>t[o].lim));for(a=o,o=i;(o=e.parent(o))!==a;)s.push(o);return{path:r.concat(s.reverse()),lca:a}}function r(e){var t={},n=0;function o(a){var r=n;i.forEach(e.children(a),o),t[a]={low:r,lim:n++}}return i.forEach(e.children(),o),t}t.exports=o},{"./lodash":10}],23:[function(e,t,n){var i=e("../lodash"),o=e("../graphlib").Graph,a=e("../util");function r(e,t){var n={};function o(t,o){var a=0,r=0,s=t.length,d=i.last(o);return i.forEach(o,(function(t,u){var p=l(e,t),h=p?e.node(p).order:s;(p||t===d)&&(i.forEach(o.slice(r,u+1),(function(t){i.forEach(e.predecessors(t),(function(i){var o=e.node(i),r=o.order;!(r<a||h<r)||o.dummy&&e.node(t).dummy||c(n,i,t)}))})),r=u+1,a=h)})),o}return i.reduce(t,o),n}function s(e,t){var n={};function o(t,o,a,r,s){var l;i.forEach(i.range(o,a),(function(o){l=t[o],e.node(l).dummy&&i.forEach(e.predecessors(l),(function(t){var i=e.node(t);i.dummy&&(i.order<r||i.order>s)&&c(n,t,l)}))}))}function a(t,n){var a,r=-1,s=0;return i.forEach(n,(function(i,l){if("border"===e.node(i).dummy){var c=e.predecessors(i);c.length&&(a=e.node(c[0]).order,o(n,s,l,r,a),s=l,r=a)}o(n,s,n.length,a,t.length)})),n}return i.reduce(t,a),n}function l(e,t){if(e.node(t).dummy)return i.find(e.predecessors(t),(function(t){return e.node(t).dummy}))}function c(e,t,n){if(t>n){var i=t;t=n,n=i}var o=e[t];o||(e[t]=o={}),o[n]=!0}function d(e,t,n){if(t>n){var o=t;t=n,n=o}return i.has(e[t],n)}function u(e,t,n,o){var a={},r={},s={};return i.forEach(t,(function(e){i.forEach(e,(function(e,t){a[e]=e,r[e]=e,s[e]=t}))})),i.forEach(t,(function(e){var t=-1;i.forEach(e,(function(e){var l=o(e);if(l.length){l=i.sortBy(l,(function(e){return s[e]}));for(var c=(l.length-1)/2,u=Math.floor(c),p=Math.ceil(c);u<=p;++u){var h=l[u];r[e]===e&&t<s[h]&&!d(n,e,h)&&(r[h]=e,r[e]=a[e]=a[h],t=s[h])}}}))})),{root:a,align:r}}function p(e,t,n,o,a){var r={},s=h(e,t,n,a),l=a?"borderLeft":"borderRight";function c(e,t){for(var n=s.nodes(),i=n.pop(),o={};i;)o[i]?e(i):(o[i]=!0,n.push(i),n=n.concat(t(i))),i=n.pop()}function d(e){r[e]=s.inEdges(e).reduce((function(e,t){return Math.max(e,r[t.v]+s.edge(t))}),0)}function u(t){var n=s.outEdges(t).reduce((function(e,t){return Math.min(e,r[t.w]-s.edge(t))}),Number.POSITIVE_INFINITY),i=e.node(t);n!==Number.POSITIVE_INFINITY&&i.borderType!==l&&(r[t]=Math.max(r[t],n))}return c(d,s.predecessors.bind(s)),c(u,s.successors.bind(s)),i.forEach(o,(function(e){r[e]=r[n[e]]})),r}function h(e,t,n,a){var r=new o,s=e.graph(),l=m(s.nodesep,s.edgesep,a);return i.forEach(t,(function(t){var o;i.forEach(t,(function(t){var i=n[t];if(r.setNode(i),o){var a=n[o],s=r.edge(a,i);r.setEdge(a,i,Math.max(l(e,t,o),s||0))}o=t}))})),r}function f(e,t){return i.minBy(i.values(t),(function(t){var n=Number.NEGATIVE_INFINITY,o=Number.POSITIVE_INFINITY;return i.forIn(t,(function(t,i){var a=b(e,i)/2;n=Math.max(t+a,n),o=Math.min(t-a,o)})),n-o}))}function g(e,t){var n=i.values(t),o=i.min(n),a=i.max(n);i.forEach(["u","d"],(function(n){i.forEach(["l","r"],(function(r){var s,l=n+r,c=e[l];if(c!==t){var d=i.values(c);(s="l"===r?o-i.min(d):a-i.max(d))&&(e[l]=i.mapValues(c,(function(e){return e+s})))}}))}))}function y(e,t){return i.mapValues(e.ul,(function(n,o){if(t)return e[t.toLowerCase()][o];var a=i.sortBy(i.map(e,o));return(a[1]+a[2])/2}))}function v(e){var t,n=a.buildLayerMatrix(e),o=i.merge(r(e,n),s(e,n)),l={};i.forEach(["u","d"],(function(a){t="u"===a?n:i.values(n).reverse(),i.forEach(["l","r"],(function(n){"r"===n&&(t=i.map(t,(function(e){return i.values(e).reverse()})));var r=("u"===a?e.predecessors:e.successors).bind(e),s=u(e,t,o,r),c=p(e,t,s.root,s.align,"r"===n);"r"===n&&(c=i.mapValues(c,(function(e){return-e}))),l[a+n]=c}))}));var c=f(e,l);return g(l,c),y(l,e.graph().align)}function m(e,t,n){return function(o,a,r){var s,l=o.node(a),c=o.node(r),d=0;if(d+=l.width/2,i.has(l,"labelpos"))switch(l.labelpos.toLowerCase()){case"l":s=-l.width/2;break;case"r":s=l.width/2}if(s&&(d+=n?s:-s),s=0,d+=(l.dummy?t:e)/2,d+=(c.dummy?t:e)/2,d+=c.width/2,i.has(c,"labelpos"))switch(c.labelpos.toLowerCase()){case"l":s=c.width/2;break;case"r":s=-c.width/2}return s&&(d+=n?s:-s),s=0,d}}function b(e,t){return e.node(t).width}t.exports={positionX:v,findType1Conflicts:r,findType2Conflicts:s,addConflict:c,hasConflict:d,verticalAlignment:u,horizontalCompaction:p,alignCoordinates:g,findSmallestWidthAlignment:f,balance:y}},{"../graphlib":7,"../lodash":10,"../util":29}],24:[function(e,t,n){var i=e("../lodash"),o=e("../util"),a=e("./bk").positionX;function r(e){s(e=o.asNonCompoundGraph(e)),i.forEach(a(e),(function(t,n){e.node(n).x=t}))}function s(e){var t=o.buildLayerMatrix(e),n=e.graph().ranksep,a=0;i.forEach(t,(function(t){var o=i.max(i.map(t,(function(t){return e.node(t).height})));i.forEach(t,(function(t){e.node(t).y=a+o/2})),a+=o+n}))}t.exports=r},{"../lodash":10,"../util":29,"./bk":23}],25:[function(e,t,n){var i=e("../lodash"),o=e("../graphlib").Graph,a=e("./util").slack;function r(e){var t,n,i=new o({directed:!1}),r=e.nodes()[0],d=e.nodeCount();for(i.setNode(r,{});s(i,e)<d;)t=l(i,e),n=i.hasNode(t.v)?a(e,t):-a(e,t),c(i,e,n);return i}function s(e,t){function n(o){i.forEach(t.nodeEdges(o),(function(i){var r=i.v,s=o===r?i.w:r;e.hasNode(s)||a(t,i)||(e.setNode(s,{}),e.setEdge(o,s,{}),n(s))}))}return i.forEach(e.nodes(),n),e.nodeCount()}function l(e,t){return i.minBy(t.edges(),(function(n){if(e.hasNode(n.v)!==e.hasNode(n.w))return a(t,n)}))}function c(e,t,n){i.forEach(e.nodes(),(function(e){t.node(e).rank+=n}))}t.exports=r},{"../graphlib":7,"../lodash":10,"./util":28}],26:[function(e,t,n){var i=e("./util").longestPath,o=e("./feasible-tree"),a=e("./network-simplex");function r(e){switch(e.graph().ranker){case"network-simplex":default:c(e);break;case"tight-tree":l(e);break;case"longest-path":s(e)}}t.exports=r;var s=i;function l(e){i(e),o(e)}function c(e){a(e)}},{"./feasible-tree":25,"./network-simplex":27,"./util":28}],27:[function(e,t,n){var i=e("../lodash"),o=e("./feasible-tree"),a=e("./util").slack,r=e("./util").longestPath,s=e("../graphlib").alg.preorder,l=e("../graphlib").alg.postorder,c=e("../util").simplify;function d(e){e=c(e),r(e);var t,n=o(e);for(f(n),u(n,e);t=y(n);)m(n,e,t,v(n,e,t))}function u(e,t){var n=l(e,e.nodes());n=n.slice(0,n.length-1),i.forEach(n,(function(n){p(e,t,n)}))}function p(e,t,n){var i=e.node(n).parent;e.edge(n,i).cutvalue=h(e,t,n)}function h(e,t,n){var o=e.node(n).parent,a=!0,r=t.edge(n,o),s=0;return r||(a=!1,r=t.edge(o,n)),s=r.weight,i.forEach(t.nodeEdges(n),(function(i){var r=i.v===n,l=r?i.w:i.v;if(l!==o){var c=r===a,d=t.edge(i).weight;if(s+=c?d:-d,_(e,n,l)){var u=e.edge(n,l).cutvalue;s+=c?-u:u}}})),s}function f(e,t){arguments.length<2&&(t=e.nodes()[0]),g(e,{},1,t)}function g(e,t,n,o,a){var r=n,s=e.node(o);return t[o]=!0,i.forEach(e.neighbors(o),(function(a){i.has(t,a)||(n=g(e,t,n,a,o))})),s.low=r,s.lim=n++,a?s.parent=a:delete s.parent,n}function y(e){return i.find(e.edges(),(function(t){return e.edge(t).cutvalue<0}))}function v(e,t,n){var o=n.v,r=n.w;t.hasEdge(o,r)||(o=n.w,r=n.v);var s=e.node(o),l=e.node(r),c=s,d=!1;s.lim>l.lim&&(c=l,d=!0);var u=i.filter(t.edges(),(function(t){return d===k(e,e.node(t.v),c)&&d!==k(e,e.node(t.w),c)}));return i.minBy(u,(function(e){return a(t,e)}))}function m(e,t,n,i){var o=n.v,a=n.w;e.removeEdge(o,a),e.setEdge(i.v,i.w,{}),f(e),u(e,t),b(e,t)}function b(e,t){var n=i.find(e.nodes(),(function(e){return!t.node(e).parent})),o=s(e,n);o=o.slice(1),i.forEach(o,(function(n){var i=e.node(n).parent,o=t.edge(n,i),a=!1;o||(o=t.edge(i,n),a=!0),t.node(n).rank=t.node(i).rank+(a?o.minlen:-o.minlen)}))}function _(e,t,n){return e.hasEdge(t,n)}function k(e,t,n){return n.low<=t.lim&&t.lim<=n.lim}t.exports=d,d.initLowLimValues=f,d.initCutValues=u,d.calcCutValue=h,d.leaveEdge=y,d.enterEdge=v,d.exchangeEdges=m},{"../graphlib":7,"../lodash":10,"../util":29,"./feasible-tree":25,"./util":28}],28:[function(e,t,n){var i=e("../lodash");function o(e){var t={};function n(o){var a=e.node(o);if(i.has(t,o))return a.rank;t[o]=!0;var r=i.min(i.map(e.outEdges(o),(function(t){return n(t.w)-e.edge(t).minlen})));return r!==Number.POSITIVE_INFINITY&&null!=r||(r=0),a.rank=r}i.forEach(e.sources(),n)}function a(e,t){return e.node(t.w).rank-e.node(t.v).rank-e.edge(t).minlen}t.exports={longestPath:o,slack:a}},{"../lodash":10}],29:[function(e,t,n){var i=e("./lodash"),o=e("./graphlib").Graph;function a(e,t,n,o){var a;do{a=i.uniqueId(o)}while(e.hasNode(a));return n.dummy=t,e.setNode(a,n),a}function r(e){var t=(new o).setGraph(e.graph());return i.forEach(e.nodes(),(function(n){t.setNode(n,e.node(n))})),i.forEach(e.edges(),(function(n){var i=t.edge(n.v,n.w)||{weight:0,minlen:1},o=e.edge(n);t.setEdge(n.v,n.w,{weight:i.weight+o.weight,minlen:Math.max(i.minlen,o.minlen)})})),t}function s(e){var t=new o({multigraph:e.isMultigraph()}).setGraph(e.graph());return i.forEach(e.nodes(),(function(n){e.children(n).length||t.setNode(n,e.node(n))})),i.forEach(e.edges(),(function(n){t.setEdge(n,e.edge(n))})),t}function l(e){var t=i.map(e.nodes(),(function(t){var n={};return i.forEach(e.outEdges(t),(function(t){n[t.w]=(n[t.w]||0)+e.edge(t).weight})),n}));return i.zipObject(e.nodes(),t)}function c(e){var t=i.map(e.nodes(),(function(t){var n={};return i.forEach(e.inEdges(t),(function(t){n[t.v]=(n[t.v]||0)+e.edge(t).weight})),n}));return i.zipObject(e.nodes(),t)}function d(e,t){var n,i,o=e.x,a=e.y,r=t.x-o,s=t.y-a,l=e.width/2,c=e.height/2;if(!r&&!s)throw new Error("Not possible to find intersection inside of the rectangle");return Math.abs(s)*l>Math.abs(r)*c?(s<0&&(c=-c),n=c*r/s,i=c):(r<0&&(l=-l),n=l,i=l*s/r),{x:o+n,y:a+i}}function u(e){var t=i.map(i.range(g(e)+1),(function(){return[]}));return i.forEach(e.nodes(),(function(n){var o=e.node(n),a=o.rank;i.isUndefined(a)||(t[a][o.order]=n)})),t}function p(e){var t=i.min(i.map(e.nodes(),(function(t){return e.node(t).rank})));i.forEach(e.nodes(),(function(n){var o=e.node(n);i.has(o,"rank")&&(o.rank-=t)}))}function h(e){var t=i.min(i.map(e.nodes(),(function(t){return e.node(t).rank}))),n=[];i.forEach(e.nodes(),(function(i){var o=e.node(i).rank-t;n[o]||(n[o]=[]),n[o].push(i)}));var o=0,a=e.graph().nodeRankFactor;i.forEach(n,(function(t,n){i.isUndefined(t)&&n%a!=0?--o:o&&i.forEach(t,(function(t){e.node(t).rank+=o}))}))}function f(e,t,n,i){var o={width:0,height:0};return arguments.length>=4&&(o.rank=n,o.order=i),a(e,"border",o,t)}function g(e){return i.max(i.map(e.nodes(),(function(t){var n=e.node(t).rank;if(!i.isUndefined(n))return n})))}function y(e,t){var n={lhs:[],rhs:[]};return i.forEach(e,(function(e){t(e)?n.lhs.push(e):n.rhs.push(e)})),n}function v(e,t){var n=i.now();try{return t()}finally{console.log(e+" time: "+(i.now()-n)+"ms")}}function m(e,t){return t()}t.exports={addDummyNode:a,simplify:r,asNonCompoundGraph:s,successorWeights:l,predecessorWeights:c,intersectRect:d,buildLayerMatrix:u,normalizeRanks:p,removeEmptyRanks:h,addBorderNode:f,maxRank:g,partition:y,time:v,notime:m}},{"./graphlib":7,"./lodash":10}],30:[function(e,t,n){t.exports="0.8.5"},{}],31:[function(e,t,n){var i=e("./lib");t.exports={Graph:i.Graph,json:e("./lib/json"),alg:e("./lib/alg"),version:i.version}},{"./lib":47,"./lib/alg":38,"./lib/json":48}],32:[function(e,t,n){var i=e("../lodash");function o(e){var t,n={},o=[];function a(o){i.has(n,o)||(n[o]=!0,t.push(o),i.each(e.successors(o),a),i.each(e.predecessors(o),a))}return i.each(e.nodes(),(function(e){t=[],a(e),t.length&&o.push(t)})),o}t.exports=o},{"../lodash":49}],33:[function(e,t,n){var i=e("../lodash");function o(e,t,n){i.isArray(t)||(t=[t]);var o=(e.isDirected()?e.successors:e.neighbors).bind(e),r=[],s={};return i.each(t,(function(t){if(!e.hasNode(t))throw new Error("Graph does not have node: "+t);a(e,t,"post"===n,s,o,r)})),r}function a(e,t,n,o,r,s){i.has(o,t)||(o[t]=!0,n||s.push(t),i.each(r(t),(function(t){a(e,t,n,o,r,s)})),n&&s.push(t))}t.exports=o},{"../lodash":49}],34:[function(e,t,n){var i=e("./dijkstra"),o=e("../lodash");function a(e,t,n){return o.transform(e.nodes(),(function(o,a){o[a]=i(e,a,t,n)}),{})}t.exports=a},{"../lodash":49,"./dijkstra":35}],35:[function(e,t,n){var i=e("../lodash"),o=e("../data/priority-queue");t.exports=r;var a=i.constant(1);function r(e,t,n,i){return s(e,String(t),n||a,i||function(t){return e.outEdges(t)})}function s(e,t,n,i){var a,r,s={},l=new o,c=function(e){var t=e.v!==a?e.v:e.w,i=s[t],o=n(e),c=r.distance+o;if(o<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+e+" Weight: "+o);c<i.distance&&(i.distance=c,i.predecessor=a,l.decrease(t,c))};for(e.nodes().forEach((function(e){var n=e===t?0:Number.POSITIVE_INFINITY;s[e]={distance:n},l.add(e,n)}));l.size()>0&&(a=l.removeMin(),(r=s[a]).distance!==Number.POSITIVE_INFINITY);)i(a).forEach(c);return s}},{"../data/priority-queue":45,"../lodash":49}],36:[function(e,t,n){var i=e("../lodash"),o=e("./tarjan");function a(e){return i.filter(o(e),(function(t){return t.length>1||1===t.length&&e.hasEdge(t[0],t[0])}))}t.exports=a},{"../lodash":49,"./tarjan":43}],37:[function(e,t,n){var i=e("../lodash");t.exports=a;var o=i.constant(1);function a(e,t,n){return r(e,t||o,n||function(t){return e.outEdges(t)})}function r(e,t,n){var i={},o=e.nodes();return o.forEach((function(e){i[e]={},i[e][e]={distance:0},o.forEach((function(t){e!==t&&(i[e][t]={distance:Number.POSITIVE_INFINITY})})),n(e).forEach((function(n){var o=n.v===e?n.w:n.v,a=t(n);i[e][o]={distance:a,predecessor:e}}))})),o.forEach((function(e){var t=i[e];o.forEach((function(n){var a=i[n];o.forEach((function(n){var i=a[e],o=t[n],r=a[n],s=i.distance+o.distance;s<r.distance&&(r.distance=s,r.predecessor=o.predecessor)}))}))})),i}},{"../lodash":49}],38:[function(e,t,n){t.exports={components:e("./components"),dijkstra:e("./dijkstra"),dijkstraAll:e("./dijkstra-all"),findCycles:e("./find-cycles"),floydWarshall:e("./floyd-warshall"),isAcyclic:e("./is-acyclic"),postorder:e("./postorder"),preorder:e("./preorder"),prim:e("./prim"),tarjan:e("./tarjan"),topsort:e("./topsort")}},{"./components":32,"./dijkstra":35,"./dijkstra-all":34,"./find-cycles":36,"./floyd-warshall":37,"./is-acyclic":39,"./postorder":40,"./preorder":41,"./prim":42,"./tarjan":43,"./topsort":44}],39:[function(e,t,n){var i=e("./topsort");function o(e){try{i(e)}catch(e){if(e instanceof i.CycleException)return!1;throw e}return!0}t.exports=o},{"./topsort":44}],40:[function(e,t,n){var i=e("./dfs");function o(e,t){return i(e,t,"post")}t.exports=o},{"./dfs":33}],41:[function(e,t,n){var i=e("./dfs");function o(e,t){return i(e,t,"pre")}t.exports=o},{"./dfs":33}],42:[function(e,t,n){var i=e("../lodash"),o=e("../graph"),a=e("../data/priority-queue");function r(e,t){var n,r=new o,s={},l=new a;function c(e){var i=e.v===n?e.w:e.v,o=l.priority(i);if(void 0!==o){var a=t(e);a<o&&(s[i]=n,l.decrease(i,a))}}if(0===e.nodeCount())return r;i.each(e.nodes(),(function(e){l.add(e,Number.POSITIVE_INFINITY),r.setNode(e)})),l.decrease(e.nodes()[0],0);for(var d=!1;l.size()>0;){if(n=l.removeMin(),i.has(s,n))r.setEdge(n,s[n]);else{if(d)throw new Error("Input graph is not connected: "+e);d=!0}e.nodeEdges(n).forEach(c)}return r}t.exports=r},{"../data/priority-queue":45,"../graph":46,"../lodash":49}],43:[function(e,t,n){var i=e("../lodash");function o(e){var t=0,n=[],o={},a=[];function r(s){var l=o[s]={onStack:!0,lowlink:t,index:t++};if(n.push(s),e.successors(s).forEach((function(e){i.has(o,e)?o[e].onStack&&(l.lowlink=Math.min(l.lowlink,o[e].index)):(r(e),l.lowlink=Math.min(l.lowlink,o[e].lowlink))})),l.lowlink===l.index){var c,d=[];do{c=n.pop(),o[c].onStack=!1,d.push(c)}while(s!==c);a.push(d)}}return e.nodes().forEach((function(e){i.has(o,e)||r(e)})),a}t.exports=o},{"../lodash":49}],44:[function(e,t,n){var i=e("../lodash");function o(e){var t={},n={},o=[];function r(s){if(i.has(n,s))throw new a;i.has(t,s)||(n[s]=!0,t[s]=!0,i.each(e.predecessors(s),r),delete n[s],o.push(s))}if(i.each(e.sinks(),r),i.size(t)!==e.nodeCount())throw new a;return o}function a(){}t.exports=o,o.CycleException=a,a.prototype=new Error},{"../lodash":49}],45:[function(e,t,n){var i=e("../lodash");function o(){this._arr=[],this._keyIndices={}}t.exports=o,o.prototype.size=function(){return this._arr.length},o.prototype.keys=function(){return this._arr.map((function(e){return e.key}))},o.prototype.has=function(e){return i.has(this._keyIndices,e)},o.prototype.priority=function(e){var t=this._keyIndices[e];if(void 0!==t)return this._arr[t].priority},o.prototype.min=function(){if(0===this.size())throw new Error("Queue underflow");return this._arr[0].key},o.prototype.add=function(e,t){var n=this._keyIndices;if(e=String(e),!i.has(n,e)){var o=this._arr,a=o.length;return n[e]=a,o.push({key:e,priority:t}),this._decrease(a),!0}return!1},o.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var e=this._arr.pop();return delete this._keyIndices[e.key],this._heapify(0),e.key},o.prototype.decrease=function(e,t){var n=this._keyIndices[e];if(t>this._arr[n].priority)throw new Error("New priority is greater than current priority. Key: "+e+" Old: "+this._arr[n].priority+" New: "+t);this._arr[n].priority=t,this._decrease(n)},o.prototype._heapify=function(e){var t=this._arr,n=2*e,i=n+1,o=e;n<t.length&&(o=t[n].priority<t[o].priority?n:o,i<t.length&&(o=t[i].priority<t[o].priority?i:o),o!==e&&(this._swap(e,o),this._heapify(o)))},o.prototype._decrease=function(e){for(var t,n=this._arr,i=n[e].priority;0!==e&&!(n[t=e>>1].priority<i);)this._swap(e,t),e=t},o.prototype._swap=function(e,t){var n=this._arr,i=this._keyIndices,o=n[e],a=n[t];n[e]=a,n[t]=o,i[a.key]=e,i[o.key]=t}},{"../lodash":49}],46:[function(e,t,n){var i=e("./lodash");t.exports=s;var o="\0",a="\0",r="";function s(e){this._isDirected=!i.has(e,"directed")||e.directed,this._isMultigraph=!!i.has(e,"multigraph")&&e.multigraph,this._isCompound=!!i.has(e,"compound")&&e.compound,this._label=void 0,this._defaultNodeLabelFn=i.constant(void 0),this._defaultEdgeLabelFn=i.constant(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[a]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}function l(e,t){e[t]?e[t]++:e[t]=1}function c(e,t){--e[t]||delete e[t]}function d(e,t,n,a){var s=""+t,l=""+n;if(!e&&s>l){var c=s;s=l,l=c}return s+r+l+r+(i.isUndefined(a)?o:a)}function u(e,t,n,i){var o=""+t,a=""+n;if(!e&&o>a){var r=o;o=a,a=r}var s={v:o,w:a};return i&&(s.name=i),s}function p(e,t){return d(e,t.v,t.w,t.name)}s.prototype._nodeCount=0,s.prototype._edgeCount=0,s.prototype.isDirected=function(){return this._isDirected},s.prototype.isMultigraph=function(){return this._isMultigraph},s.prototype.isCompound=function(){return this._isCompound},s.prototype.setGraph=function(e){return this._label=e,this},s.prototype.graph=function(){return this._label},s.prototype.setDefaultNodeLabel=function(e){return i.isFunction(e)||(e=i.constant(e)),this._defaultNodeLabelFn=e,this},s.prototype.nodeCount=function(){return this._nodeCount},s.prototype.nodes=function(){return i.keys(this._nodes)},s.prototype.sources=function(){var e=this;return i.filter(this.nodes(),(function(t){return i.isEmpty(e._in[t])}))},s.prototype.sinks=function(){var e=this;return i.filter(this.nodes(),(function(t){return i.isEmpty(e._out[t])}))},s.prototype.setNodes=function(e,t){var n=arguments,o=this;return i.each(e,(function(e){n.length>1?o.setNode(e,t):o.setNode(e)})),this},s.prototype.setNode=function(e,t){return i.has(this._nodes,e)?(arguments.length>1&&(this._nodes[e]=t),this):(this._nodes[e]=arguments.length>1?t:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]=a,this._children[e]={},this._children[a][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this)},s.prototype.node=function(e){return this._nodes[e]},s.prototype.hasNode=function(e){return i.has(this._nodes,e)},s.prototype.removeNode=function(e){var t=this;if(i.has(this._nodes,e)){var n=function(e){t.removeEdge(t._edgeObjs[e])};delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],i.each(this.children(e),(function(e){t.setParent(e)})),delete this._children[e]),i.each(i.keys(this._in[e]),n),delete this._in[e],delete this._preds[e],i.each(i.keys(this._out[e]),n),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this},s.prototype.setParent=function(e,t){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(i.isUndefined(t))t=a;else{for(var n=t+="";!i.isUndefined(n);n=this.parent(n))if(n===e)throw new Error("Setting "+t+" as parent of "+e+" would create a cycle");this.setNode(t)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=t,this._children[t][e]=!0,this},s.prototype._removeFromParentsChildList=function(e){delete this._children[this._parent[e]][e]},s.prototype.parent=function(e){if(this._isCompound){var t=this._parent[e];if(t!==a)return t}},s.prototype.children=function(e){if(i.isUndefined(e)&&(e=a),this._isCompound){var t=this._children[e];if(t)return i.keys(t)}else{if(e===a)return this.nodes();if(this.hasNode(e))return[]}},s.prototype.predecessors=function(e){var t=this._preds[e];if(t)return i.keys(t)},s.prototype.successors=function(e){var t=this._sucs[e];if(t)return i.keys(t)},s.prototype.neighbors=function(e){var t=this.predecessors(e);if(t)return i.union(t,this.successors(e))},s.prototype.isLeaf=function(e){return 0===(this.isDirected()?this.successors(e):this.neighbors(e)).length},s.prototype.filterNodes=function(e){var t=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});t.setGraph(this.graph());var n=this;i.each(this._nodes,(function(n,i){e(i)&&t.setNode(i,n)})),i.each(this._edgeObjs,(function(e){t.hasNode(e.v)&&t.hasNode(e.w)&&t.setEdge(e,n.edge(e))}));var o={};function a(e){var i=n.parent(e);return void 0===i||t.hasNode(i)?(o[e]=i,i):i in o?o[i]:a(i)}return this._isCompound&&i.each(t.nodes(),(function(e){t.setParent(e,a(e))})),t},s.prototype.setDefaultEdgeLabel=function(e){return i.isFunction(e)||(e=i.constant(e)),this._defaultEdgeLabelFn=e,this},s.prototype.edgeCount=function(){return this._edgeCount},s.prototype.edges=function(){return i.values(this._edgeObjs)},s.prototype.setPath=function(e,t){var n=this,o=arguments;return i.reduce(e,(function(e,i){return o.length>1?n.setEdge(e,i,t):n.setEdge(e,i),i})),this},s.prototype.setEdge=function(){var e,t,n,o,a=!1,r=arguments[0];"object"==typeof r&&null!==r&&"v"in r?(e=r.v,t=r.w,n=r.name,2===arguments.length&&(o=arguments[1],a=!0)):(e=r,t=arguments[1],n=arguments[3],arguments.length>2&&(o=arguments[2],a=!0)),e=""+e,t=""+t,i.isUndefined(n)||(n=""+n);var s=d(this._isDirected,e,t,n);if(i.has(this._edgeLabels,s))return a&&(this._edgeLabels[s]=o),this;if(!i.isUndefined(n)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(e),this.setNode(t),this._edgeLabels[s]=a?o:this._defaultEdgeLabelFn(e,t,n);var c=u(this._isDirected,e,t,n);return e=c.v,t=c.w,Object.freeze(c),this._edgeObjs[s]=c,l(this._preds[t],e),l(this._sucs[e],t),this._in[t][s]=c,this._out[e][s]=c,this._edgeCount++,this},s.prototype.edge=function(e,t,n){var i=1===arguments.length?p(this._isDirected,arguments[0]):d(this._isDirected,e,t,n);return this._edgeLabels[i]},s.prototype.hasEdge=function(e,t,n){var o=1===arguments.length?p(this._isDirected,arguments[0]):d(this._isDirected,e,t,n);return i.has(this._edgeLabels,o)},s.prototype.removeEdge=function(e,t,n){var i=1===arguments.length?p(this._isDirected,arguments[0]):d(this._isDirected,e,t,n),o=this._edgeObjs[i];return o&&(e=o.v,t=o.w,delete this._edgeLabels[i],delete this._edgeObjs[i],c(this._preds[t],e),c(this._sucs[e],t),delete this._in[t][i],delete this._out[e][i],this._edgeCount--),this},s.prototype.inEdges=function(e,t){var n=this._in[e];if(n){var o=i.values(n);return t?i.filter(o,(function(e){return e.v===t})):o}},s.prototype.outEdges=function(e,t){var n=this._out[e];if(n){var o=i.values(n);return t?i.filter(o,(function(e){return e.w===t})):o}},s.prototype.nodeEdges=function(e,t){var n=this.inEdges(e,t);if(n)return n.concat(this.outEdges(e,t))}},{"./lodash":49}],47:[function(e,t,n){t.exports={Graph:e("./graph"),version:e("./version")}},{"./graph":46,"./version":50}],48:[function(e,t,n){var i=e("./lodash"),o=e("./graph");function a(e){var t={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:r(e),edges:s(e)};return i.isUndefined(e.graph())||(t.value=i.clone(e.graph())),t}function r(e){return i.map(e.nodes(),(function(t){var n=e.node(t),o=e.parent(t),a={v:t};return i.isUndefined(n)||(a.value=n),i.isUndefined(o)||(a.parent=o),a}))}function s(e){return i.map(e.edges(),(function(t){var n=e.edge(t),o={v:t.v,w:t.w};return i.isUndefined(t.name)||(o.name=t.name),i.isUndefined(n)||(o.value=n),o}))}function l(e){var t=new o(e.options).setGraph(e.value);return i.each(e.nodes,(function(e){t.setNode(e.v,e.value),e.parent&&t.setParent(e.v,e.parent)})),i.each(e.edges,(function(e){t.setEdge({v:e.v,w:e.w,name:e.name},e.value)})),t}t.exports={write:a,read:l}},{"./graph":46,"./lodash":49}],49:[function(e,t,n){var i;if("function"==typeof e)try{i={clone:e("lodash/clone"),constant:e("lodash/constant"),each:e("lodash/each"),filter:e("lodash/filter"),has:e("lodash/has"),isArray:e("lodash/isArray"),isEmpty:e("lodash/isEmpty"),isFunction:e("lodash/isFunction"),isUndefined:e("lodash/isUndefined"),keys:e("lodash/keys"),map:e("lodash/map"),reduce:e("lodash/reduce"),size:e("lodash/size"),transform:e("lodash/transform"),union:e("lodash/union"),values:e("lodash/values")}}catch(e){}i||(i=window._),t.exports=i},{"lodash/clone":226,"lodash/constant":228,"lodash/each":230,"lodash/filter":232,"lodash/has":239,"lodash/isArray":243,"lodash/isEmpty":247,"lodash/isFunction":248,"lodash/isUndefined":258,"lodash/keys":259,"lodash/map":262,"lodash/reduce":274,"lodash/size":275,"lodash/transform":284,"lodash/union":285,"lodash/values":287}],50:[function(e,t,n){t.exports="2.1.8"},{}],51:[function(e,t,n){var i=e("./_getNative")(e("./_root"),"DataView");t.exports=i},{"./_getNative":163,"./_root":208}],52:[function(e,t,n){var i=e("./_hashClear"),o=e("./_hashDelete"),a=e("./_hashGet"),r=e("./_hashHas"),s=e("./_hashSet");function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}l.prototype.clear=i,l.prototype.delete=o,l.prototype.get=a,l.prototype.has=r,l.prototype.set=s,t.exports=l},{"./_hashClear":172,"./_hashDelete":173,"./_hashGet":174,"./_hashHas":175,"./_hashSet":176}],53:[function(e,t,n){var i=e("./_listCacheClear"),o=e("./_listCacheDelete"),a=e("./_listCacheGet"),r=e("./_listCacheHas"),s=e("./_listCacheSet");function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}l.prototype.clear=i,l.prototype.delete=o,l.prototype.get=a,l.prototype.has=r,l.prototype.set=s,t.exports=l},{"./_listCacheClear":188,"./_listCacheDelete":189,"./_listCacheGet":190,"./_listCacheHas":191,"./_listCacheSet":192}],54:[function(e,t,n){var i=e("./_getNative")(e("./_root"),"Map");t.exports=i},{"./_getNative":163,"./_root":208}],55:[function(e,t,n){var i=e("./_mapCacheClear"),o=e("./_mapCacheDelete"),a=e("./_mapCacheGet"),r=e("./_mapCacheHas"),s=e("./_mapCacheSet");function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}l.prototype.clear=i,l.prototype.delete=o,l.prototype.get=a,l.prototype.has=r,l.prototype.set=s,t.exports=l},{"./_mapCacheClear":193,"./_mapCacheDelete":194,"./_mapCacheGet":195,"./_mapCacheHas":196,"./_mapCacheSet":197}],56:[function(e,t,n){var i=e("./_getNative")(e("./_root"),"Promise");t.exports=i},{"./_getNative":163,"./_root":208}],57:[function(e,t,n){var i=e("./_getNative")(e("./_root"),"Set");t.exports=i},{"./_getNative":163,"./_root":208}],58:[function(e,t,n){var i=e("./_MapCache"),o=e("./_setCacheAdd"),a=e("./_setCacheHas");function r(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new i;++t<n;)this.add(e[t])}r.prototype.add=r.prototype.push=o,r.prototype.has=a,t.exports=r},{"./_MapCache":55,"./_setCacheAdd":210,"./_setCacheHas":211}],59:[function(e,t,n){var i=e("./_ListCache"),o=e("./_stackClear"),a=e("./_stackDelete"),r=e("./_stackGet"),s=e("./_stackHas"),l=e("./_stackSet");function c(e){var t=this.__data__=new i(e);this.size=t.size}c.prototype.clear=o,c.prototype.delete=a,c.prototype.get=r,c.prototype.has=s,c.prototype.set=l,t.exports=c},{"./_ListCache":53,"./_stackClear":215,"./_stackDelete":216,"./_stackGet":217,"./_stackHas":218,"./_stackSet":219}],60:[function(e,t,n){var i=e("./_root").Symbol;t.exports=i},{"./_root":208}],61:[function(e,t,n){var i=e("./_root").Uint8Array;t.exports=i},{"./_root":208}],62:[function(e,t,n){var i=e("./_getNative")(e("./_root"),"WeakMap");t.exports=i},{"./_getNative":163,"./_root":208}],63:[function(e,t,n){function i(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}t.exports=i},{}],64:[function(e,t,n){function i(e,t){for(var n=-1,i=null==e?0:e.length;++n<i&&!1!==t(e[n],n,e););return e}t.exports=i},{}],65:[function(e,t,n){function i(e,t){for(var n=-1,i=null==e?0:e.length,o=0,a=[];++n<i;){var r=e[n];t(r,n,e)&&(a[o++]=r)}return a}t.exports=i},{}],66:[function(e,t,n){var i=e("./_baseIndexOf");function o(e,t){return!(null==e||!e.length)&&i(e,t,0)>-1}t.exports=o},{"./_baseIndexOf":95}],67:[function(e,t,n){function i(e,t,n){for(var i=-1,o=null==e?0:e.length;++i<o;)if(n(t,e[i]))return!0;return!1}t.exports=i},{}],68:[function(e,t,n){var i=e("./_baseTimes"),o=e("./isArguments"),a=e("./isArray"),r=e("./isBuffer"),s=e("./_isIndex"),l=e("./isTypedArray"),c=Object.prototype.hasOwnProperty;function d(e,t){var n=a(e),d=!n&&o(e),u=!n&&!d&&r(e),p=!n&&!d&&!u&&l(e),h=n||d||u||p,f=h?i(e.length,String):[],g=f.length;for(var y in e)!t&&!c.call(e,y)||h&&("length"==y||u&&("offset"==y||"parent"==y)||p&&("buffer"==y||"byteLength"==y||"byteOffset"==y)||s(y,g))||f.push(y);return f}t.exports=d},{"./_baseTimes":125,"./_isIndex":181,"./isArguments":242,"./isArray":243,"./isBuffer":246,"./isTypedArray":257}],69:[function(e,t,n){function i(e,t){for(var n=-1,i=null==e?0:e.length,o=Array(i);++n<i;)o[n]=t(e[n],n,e);return o}t.exports=i},{}],70:[function(e,t,n){function i(e,t){for(var n=-1,i=t.length,o=e.length;++n<i;)e[o+n]=t[n];return e}t.exports=i},{}],71:[function(e,t,n){function i(e,t,n,i){var o=-1,a=null==e?0:e.length;for(i&&a&&(n=e[++o]);++o<a;)n=t(n,e[o],o,e);return n}t.exports=i},{}],72:[function(e,t,n){function i(e,t){for(var n=-1,i=null==e?0:e.length;++n<i;)if(t(e[n],n,e))return!0;return!1}t.exports=i},{}],73:[function(e,t,n){var i=e("./_baseProperty")("length");t.exports=i},{"./_baseProperty":117}],74:[function(e,t,n){var i=e("./_baseAssignValue"),o=e("./eq");function a(e,t,n){(void 0!==n&&!o(e[t],n)||void 0===n&&!(t in e))&&i(e,t,n)}t.exports=a},{"./_baseAssignValue":79,"./eq":231}],75:[function(e,t,n){var i=e("./_baseAssignValue"),o=e("./eq"),a=Object.prototype.hasOwnProperty;function r(e,t,n){var r=e[t];a.call(e,t)&&o(r,n)&&(void 0!==n||t in e)||i(e,t,n)}t.exports=r},{"./_baseAssignValue":79,"./eq":231}],76:[function(e,t,n){var i=e("./eq");function o(e,t){for(var n=e.length;n--;)if(i(e[n][0],t))return n;return-1}t.exports=o},{"./eq":231}],77:[function(e,t,n){var i=e("./_copyObject"),o=e("./keys");function a(e,t){return e&&i(t,o(t),e)}t.exports=a},{"./_copyObject":143,"./keys":259}],78:[function(e,t,n){var i=e("./_copyObject"),o=e("./keysIn");function a(e,t){return e&&i(t,o(t),e)}t.exports=a},{"./_copyObject":143,"./keysIn":260}],79:[function(e,t,n){var i=e("./_defineProperty");function o(e,t,n){"__proto__"==t&&i?i(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}t.exports=o},{"./_defineProperty":153}],80:[function(e,t,n){var i=e("./_Stack"),o=e("./_arrayEach"),a=e("./_assignValue"),r=e("./_baseAssign"),s=e("./_baseAssignIn"),l=e("./_cloneBuffer"),c=e("./_copyArray"),d=e("./_copySymbols"),u=e("./_copySymbolsIn"),p=e("./_getAllKeys"),h=e("./_getAllKeysIn"),f=e("./_getTag"),g=e("./_initCloneArray"),y=e("./_initCloneByTag"),v=e("./_initCloneObject"),m=e("./isArray"),b=e("./isBuffer"),_=e("./isMap"),k=e("./isObject"),P=e("./isSet"),I=e("./keys"),N=1,w=2,C=4,S="[object Arguments]",L="[object Array]",x="[object Boolean]",T="[object Date]",E="[object Error]",O="[object Function]",D="[object GeneratorFunction]",j="[object Map]",A="[object Number]",M="[object Object]",R="[object RegExp]",U="[object Set]",F="[object String]",z="[object Symbol]",B="[object WeakMap]",H="[object ArrayBuffer]",G="[object DataView]",q="[object Float32Array]",V="[object Float64Array]",Y="[object Int8Array]",W="[object Int16Array]",X="[object Int32Array]",$="[object Uint8Array]",Z="[object Uint8ClampedArray]",K="[object Uint16Array]",J="[object Uint32Array]",Q={};function ee(e,t,n,L,x,T){var E,j=t&N,A=t&w,R=t&C;if(n&&(E=x?n(e,L,x,T):n(e)),void 0!==E)return E;if(!k(e))return e;var U=m(e);if(U){if(E=g(e),!j)return c(e,E)}else{var F=f(e),z=F==O||F==D;if(b(e))return l(e,j);if(F==M||F==S||z&&!x){if(E=A||z?{}:v(e),!j)return A?u(e,s(E,e)):d(e,r(E,e))}else{if(!Q[F])return x?e:{};E=y(e,F,j)}}T||(T=new i);var B=T.get(e);if(B)return B;T.set(e,E),P(e)?e.forEach((function(i){E.add(ee(i,t,n,i,e,T))})):_(e)&&e.forEach((function(i,o){E.set(o,ee(i,t,n,o,e,T))}));var H=R?A?h:p:A?keysIn:I,G=U?void 0:H(e);return o(G||e,(function(i,o){G&&(i=e[o=i]),a(E,o,ee(i,t,n,o,e,T))})),E}Q[S]=Q[L]=Q[H]=Q[G]=Q[x]=Q[T]=Q[q]=Q[V]=Q[Y]=Q[W]=Q[X]=Q[j]=Q[A]=Q[M]=Q[R]=Q[U]=Q[F]=Q[z]=Q[$]=Q[Z]=Q[K]=Q[J]=!0,Q[E]=Q[O]=Q[B]=!1,t.exports=ee},{"./_Stack":59,"./_arrayEach":64,"./_assignValue":75,"./_baseAssign":77,"./_baseAssignIn":78,"./_cloneBuffer":135,"./_copyArray":142,"./_copySymbols":144,"./_copySymbolsIn":145,"./_getAllKeys":159,"./_getAllKeysIn":160,"./_getTag":168,"./_initCloneArray":177,"./_initCloneByTag":178,"./_initCloneObject":179,"./isArray":243,"./isBuffer":246,"./isMap":250,"./isObject":251,"./isSet":254,"./keys":259}],81:[function(e,t,n){var i=e("./isObject"),o=Object.create,a=function(){function e(){}return function(t){if(!i(t))return{};if(o)return o(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();t.exports=a},{"./isObject":251}],82:[function(e,t,n){var i=e("./_baseForOwn"),o=e("./_createBaseEach")(i);t.exports=o},{"./_baseForOwn":88,"./_createBaseEach":148}],83:[function(e,t,n){var i=e("./isSymbol");function o(e,t,n){for(var o=-1,a=e.length;++o<a;){var r=e[o],s=t(r);if(null!=s&&(void 0===l?s==s&&!i(s):n(s,l)))var l=s,c=r}return c}t.exports=o},{"./isSymbol":256}],84:[function(e,t,n){var i=e("./_baseEach");function o(e,t){var n=[];return i(e,(function(e,i,o){t(e,i,o)&&n.push(e)})),n}t.exports=o},{"./_baseEach":82}],85:[function(e,t,n){function i(e,t,n,i){for(var o=e.length,a=n+(i?1:-1);i?a--:++a<o;)if(t(e[a],a,e))return a;return-1}t.exports=i},{}],86:[function(e,t,n){var i=e("./_arrayPush"),o=e("./_isFlattenable");function a(e,t,n,r,s){var l=-1,c=e.length;for(n||(n=o),s||(s=[]);++l<c;){var d=e[l];t>0&&n(d)?t>1?a(d,t-1,n,r,s):i(s,d):r||(s[s.length]=d)}return s}t.exports=a},{"./_arrayPush":70,"./_isFlattenable":180}],87:[function(e,t,n){var i=e("./_createBaseFor")();t.exports=i},{"./_createBaseFor":149}],88:[function(e,t,n){var i=e("./_baseFor"),o=e("./keys");function a(e,t){return e&&i(e,t,o)}t.exports=a},{"./_baseFor":87,"./keys":259}],89:[function(e,t,n){var i=e("./_castPath"),o=e("./_toKey");function a(e,t){for(var n=0,a=(t=i(t,e)).length;null!=e&&n<a;)e=e[o(t[n++])];return n&&n==a?e:void 0}t.exports=a},{"./_castPath":133,"./_toKey":223}],90:[function(e,t,n){var i=e("./_arrayPush"),o=e("./isArray");function a(e,t,n){var a=t(e);return o(e)?a:i(a,n(e))}t.exports=a},{"./_arrayPush":70,"./isArray":243}],91:[function(e,t,n){var i=e("./_Symbol"),o=e("./_getRawTag"),a=e("./_objectToString"),r="[object Null]",s="[object Undefined]",l=i?i.toStringTag:void 0;function c(e){return null==e?void 0===e?s:r:l&&l in Object(e)?o(e):a(e)}t.exports=c},{"./_Symbol":60,"./_getRawTag":165,"./_objectToString":205}],92:[function(e,t,n){function i(e,t){return e>t}t.exports=i},{}],93:[function(e,t,n){var i=Object.prototype.hasOwnProperty;function o(e,t){return null!=e&&i.call(e,t)}t.exports=o},{}],94:[function(e,t,n){function i(e,t){return null!=e&&t in Object(e)}t.exports=i},{}],95:[function(e,t,n){var i=e("./_baseFindIndex"),o=e("./_baseIsNaN"),a=e("./_strictIndexOf");function r(e,t,n){return t==t?a(e,t,n):i(e,o,n)}t.exports=r},{"./_baseFindIndex":85,"./_baseIsNaN":101,"./_strictIndexOf":220}],96:[function(e,t,n){var i=e("./_baseGetTag"),o=e("./isObjectLike"),a="[object Arguments]";function r(e){return o(e)&&i(e)==a}t.exports=r},{"./_baseGetTag":91,"./isObjectLike":252}],97:[function(e,t,n){var i=e("./_baseIsEqualDeep"),o=e("./isObjectLike");function a(e,t,n,r,s){return e===t||(null==e||null==t||!o(e)&&!o(t)?e!=e&&t!=t:i(e,t,n,r,a,s))}t.exports=a},{"./_baseIsEqualDeep":98,"./isObjectLike":252}],98:[function(e,t,n){var i=e("./_Stack"),o=e("./_equalArrays"),a=e("./_equalByTag"),r=e("./_equalObjects"),s=e("./_getTag"),l=e("./isArray"),c=e("./isBuffer"),d=e("./isTypedArray"),u=1,p="[object Arguments]",h="[object Array]",f="[object Object]",g=Object.prototype.hasOwnProperty;function y(e,t,n,y,v,m){var b=l(e),_=l(t),k=b?h:s(e),P=_?h:s(t),I=(k=k==p?f:k)==f,N=(P=P==p?f:P)==f,w=k==P;if(w&&c(e)){if(!c(t))return!1;b=!0,I=!1}if(w&&!I)return m||(m=new i),b||d(e)?o(e,t,n,y,v,m):a(e,t,k,n,y,v,m);if(!(n&u)){var C=I&&g.call(e,"__wrapped__"),S=N&&g.call(t,"__wrapped__");if(C||S){var L=C?e.value():e,x=S?t.value():t;return m||(m=new i),v(L,x,n,y,m)}}return!!w&&(m||(m=new i),r(e,t,n,y,v,m))}t.exports=y},{"./_Stack":59,"./_equalArrays":154,"./_equalByTag":155,"./_equalObjects":156,"./_getTag":168,"./isArray":243,"./isBuffer":246,"./isTypedArray":257}],99:[function(e,t,n){var i=e("./_getTag"),o=e("./isObjectLike"),a="[object Map]";function r(e){return o(e)&&i(e)==a}t.exports=r},{"./_getTag":168,"./isObjectLike":252}],100:[function(e,t,n){var i=e("./_Stack"),o=e("./_baseIsEqual"),a=1,r=2;function s(e,t,n,s){var l=n.length,c=l,d=!s;if(null==e)return!c;for(e=Object(e);l--;){var u=n[l];if(d&&u[2]?u[1]!==e[u[0]]:!(u[0]in e))return!1}for(;++l<c;){var p=(u=n[l])[0],h=e[p],f=u[1];if(d&&u[2]){if(void 0===h&&!(p in e))return!1}else{var g=new i;if(s)var y=s(h,f,p,e,t,g);if(!(void 0===y?o(f,h,a|r,s,g):y))return!1}}return!0}t.exports=s},{"./_Stack":59,"./_baseIsEqual":97}],101:[function(e,t,n){function i(e){return e!=e}t.exports=i},{}],102:[function(e,t,n){var i=e("./isFunction"),o=e("./_isMasked"),a=e("./isObject"),r=e("./_toSource"),s=/[\\^$.*+?()[\]{}|]/g,l=/^\[object .+?Constructor\]$/,c=Function.prototype,d=Object.prototype,u=c.toString,p=d.hasOwnProperty,h=RegExp("^"+u.call(p).replace(s,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function f(e){return!(!a(e)||o(e))&&(i(e)?h:l).test(r(e))}t.exports=f},{"./_isMasked":185,"./_toSource":224,"./isFunction":248,"./isObject":251}],103:[function(e,t,n){var i=e("./_getTag"),o=e("./isObjectLike"),a="[object Set]";function r(e){return o(e)&&i(e)==a}t.exports=r},{"./_getTag":168,"./isObjectLike":252}],104:[function(e,t,n){var i=e("./_baseGetTag"),o=e("./isLength"),a=e("./isObjectLike"),r="[object Arguments]",s="[object Array]",l="[object Boolean]",c="[object Date]",d="[object Error]",u="[object Function]",p="[object Map]",h="[object Number]",f="[object Object]",g="[object RegExp]",y="[object Set]",v="[object String]",m="[object WeakMap]",b="[object ArrayBuffer]",_="[object DataView]",k="[object Float64Array]",P="[object Int8Array]",I="[object Int16Array]",N="[object Int32Array]",w="[object Uint8Array]",C="[object Uint8ClampedArray]",S="[object Uint16Array]",L="[object Uint32Array]",x={};function T(e){return a(e)&&o(e.length)&&!!x[i(e)]}x["[object Float32Array]"]=x[k]=x[P]=x[I]=x[N]=x[w]=x[C]=x[S]=x[L]=!0,x[r]=x[s]=x[b]=x[l]=x[_]=x[c]=x[d]=x[u]=x[p]=x[h]=x[f]=x[g]=x[y]=x[v]=x[m]=!1,t.exports=T},{"./_baseGetTag":91,"./isLength":249,"./isObjectLike":252}],105:[function(e,t,n){var i=e("./_baseMatches"),o=e("./_baseMatchesProperty"),a=e("./identity"),r=e("./isArray"),s=e("./property");function l(e){return"function"==typeof e?e:null==e?a:"object"==typeof e?r(e)?o(e[0],e[1]):i(e):s(e)}t.exports=l},{"./_baseMatches":110,"./_baseMatchesProperty":111,"./identity":241,"./isArray":243,"./property":272}],106:[function(e,t,n){var i=e("./_isPrototype"),o=e("./_nativeKeys"),a=Object.prototype.hasOwnProperty;function r(e){if(!i(e))return o(e);var t=[];for(var n in Object(e))a.call(e,n)&&"constructor"!=n&&t.push(n);return t}t.exports=r},{"./_isPrototype":186,"./_nativeKeys":202}],107:[function(e,t,n){var i=e("./isObject"),o=e("./_isPrototype"),a=e("./_nativeKeysIn"),r=Object.prototype.hasOwnProperty;function s(e){if(!i(e))return a(e);var t=o(e),n=[];for(var s in e)("constructor"!=s||!t&&r.call(e,s))&&n.push(s);return n}t.exports=s},{"./_isPrototype":186,"./_nativeKeysIn":203,"./isObject":251}],108:[function(e,t,n){function i(e,t){return e<t}t.exports=i},{}],109:[function(e,t,n){var i=e("./_baseEach"),o=e("./isArrayLike");function a(e,t){var n=-1,a=o(e)?Array(e.length):[];return i(e,(function(e,i,o){a[++n]=t(e,i,o)})),a}t.exports=a},{"./_baseEach":82,"./isArrayLike":244}],110:[function(e,t,n){var i=e("./_baseIsMatch"),o=e("./_getMatchData"),a=e("./_matchesStrictComparable");function r(e){var t=o(e);return 1==t.length&&t[0][2]?a(t[0][0],t[0][1]):function(n){return n===e||i(n,e,t)}}t.exports=r},{"./_baseIsMatch":100,"./_getMatchData":162,"./_matchesStrictComparable":199}],111:[function(e,t,n){var i=e("./_baseIsEqual"),o=e("./get"),a=e("./hasIn"),r=e("./_isKey"),s=e("./_isStrictComparable"),l=e("./_matchesStrictComparable"),c=e("./_toKey"),d=1,u=2;function p(e,t){return r(e)&&s(t)?l(c(e),t):function(n){var r=o(n,e);return void 0===r&&r===t?a(n,e):i(t,r,d|u)}}t.exports=p},{"./_baseIsEqual":97,"./_isKey":183,"./_isStrictComparable":187,"./_matchesStrictComparable":199,"./_toKey":223,"./get":238,"./hasIn":240}],112:[function(e,t,n){var i=e("./_Stack"),o=e("./_assignMergeValue"),a=e("./_baseFor"),r=e("./_baseMergeDeep"),s=e("./isObject"),l=e("./keysIn"),c=e("./_safeGet");function d(e,t,n,u,p){e!==t&&a(t,(function(a,l){if(p||(p=new i),s(a))r(e,t,l,n,d,u,p);else{var h=u?u(c(e,l),a,l+"",e,t,p):void 0;void 0===h&&(h=a),o(e,l,h)}}),l)}t.exports=d},{"./_Stack":59,"./_assignMergeValue":74,"./_baseFor":87,"./_baseMergeDeep":113,"./_safeGet":209,"./isObject":251,"./keysIn":260}],113:[function(e,t,n){var i=e("./_assignMergeValue"),o=e("./_cloneBuffer"),a=e("./_cloneTypedArray"),r=e("./_copyArray"),s=e("./_initCloneObject"),l=e("./isArguments"),c=e("./isArray"),d=e("./isArrayLikeObject"),u=e("./isBuffer"),p=e("./isFunction"),h=e("./isObject"),f=e("./isPlainObject"),g=e("./isTypedArray"),y=e("./_safeGet"),v=e("./toPlainObject");function m(e,t,n,m,b,_,k){var P=y(e,n),I=y(t,n),N=k.get(I);if(N)i(e,n,N);else{var w=_?_(P,I,n+"",e,t,k):void 0,C=void 0===w;if(C){var S=c(I),L=!S&&u(I),x=!S&&!L&&g(I);w=I,S||L||x?c(P)?w=P:d(P)?w=r(P):L?(C=!1,w=o(I,!0)):x?(C=!1,w=a(I,!0)):w=[]:f(I)||l(I)?(w=P,l(P)?w=v(P):h(P)&&!p(P)||(w=s(I))):C=!1}C&&(k.set(I,w),b(w,I,m,_,k),k.delete(I)),i(e,n,w)}}t.exports=m},{"./_assignMergeValue":74,"./_cloneBuffer":135,"./_cloneTypedArray":139,"./_copyArray":142,"./_initCloneObject":179,"./_safeGet":209,"./isArguments":242,"./isArray":243,"./isArrayLikeObject":245,"./isBuffer":246,"./isFunction":248,"./isObject":251,"./isPlainObject":253,"./isTypedArray":257,"./toPlainObject":282}],114:[function(e,t,n){var i=e("./_arrayMap"),o=e("./_baseIteratee"),a=e("./_baseMap"),r=e("./_baseSortBy"),s=e("./_baseUnary"),l=e("./_compareMultiple"),c=e("./identity");function d(e,t,n){var d=-1;t=i(t.length?t:[c],s(o));var u=a(e,(function(e,n,o){return{criteria:i(t,(function(t){return t(e)})),index:++d,value:e}}));return r(u,(function(e,t){return l(e,t,n)}))}t.exports=d},{"./_arrayMap":69,"./_baseIteratee":105,"./_baseMap":109,"./_baseSortBy":124,"./_baseUnary":127,"./_compareMultiple":141,"./identity":241}],115:[function(e,t,n){var i=e("./_basePickBy"),o=e("./hasIn");function a(e,t){return i(e,t,(function(t,n){return o(e,n)}))}t.exports=a},{"./_basePickBy":116,"./hasIn":240}],116:[function(e,t,n){var i=e("./_baseGet"),o=e("./_baseSet"),a=e("./_castPath");function r(e,t,n){for(var r=-1,s=t.length,l={};++r<s;){var c=t[r],d=i(e,c);n(d,c)&&o(l,a(c,e),d)}return l}t.exports=r},{"./_baseGet":89,"./_baseSet":122,"./_castPath":133}],117:[function(e,t,n){function i(e){return function(t){return null==t?void 0:t[e]}}t.exports=i},{}],118:[function(e,t,n){var i=e("./_baseGet");function o(e){return function(t){return i(t,e)}}t.exports=o},{"./_baseGet":89}],119:[function(e,t,n){var i=Math.ceil,o=Math.max;function a(e,t,n,a){for(var r=-1,s=o(i((t-e)/(n||1)),0),l=Array(s);s--;)l[a?s:++r]=e,e+=n;return l}t.exports=a},{}],120:[function(e,t,n){function i(e,t,n,i,o){return o(e,(function(e,o,a){n=i?(i=!1,e):t(n,e,o,a)})),n}t.exports=i},{}],121:[function(e,t,n){var i=e("./identity"),o=e("./_overRest"),a=e("./_setToString");function r(e,t){return a(o(e,t,i),e+"")}t.exports=r},{"./_overRest":207,"./_setToString":213,"./identity":241}],122:[function(e,t,n){var i=e("./_assignValue"),o=e("./_castPath"),a=e("./_isIndex"),r=e("./isObject"),s=e("./_toKey");function l(e,t,n,l){if(!r(e))return e;for(var c=-1,d=(t=o(t,e)).length,u=d-1,p=e;null!=p&&++c<d;){var h=s(t[c]),f=n;if(c!=u){var g=p[h];void 0===(f=l?l(g,h,p):void 0)&&(f=r(g)?g:a(t[c+1])?[]:{})}i(p,h,f),p=p[h]}return e}t.exports=l},{"./_assignValue":75,"./_castPath":133,"./_isIndex":181,"./_toKey":223,"./isObject":251}],123:[function(e,t,n){var i=e("./constant"),o=e("./_defineProperty"),a=e("./identity"),r=o?function(e,t){return o(e,"toString",{configurable:!0,enumerable:!1,value:i(t),writable:!0})}:a;t.exports=r},{"./_defineProperty":153,"./constant":228,"./identity":241}],124:[function(e,t,n){function i(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}t.exports=i},{}],125:[function(e,t,n){function i(e,t){for(var n=-1,i=Array(e);++n<e;)i[n]=t(n);return i}t.exports=i},{}],126:[function(e,t,n){var i=e("./_Symbol"),o=e("./_arrayMap"),a=e("./isArray"),r=e("./isSymbol"),s=1/0,l=i?i.prototype:void 0,c=l?l.toString:void 0;function d(e){if("string"==typeof e)return e;if(a(e))return o(e,d)+"";if(r(e))return c?c.call(e):"";var t=e+"";return"0"==t&&1/e==-s?"-0":t}t.exports=d},{"./_Symbol":60,"./_arrayMap":69,"./isArray":243,"./isSymbol":256}],127:[function(e,t,n){function i(e){return function(t){return e(t)}}t.exports=i},{}],128:[function(e,t,n){var i=e("./_SetCache"),o=e("./_arrayIncludes"),a=e("./_arrayIncludesWith"),r=e("./_cacheHas"),s=e("./_createSet"),l=e("./_setToArray"),c=200;function d(e,t,n){var d=-1,u=o,p=e.length,h=!0,f=[],g=f;if(n)h=!1,u=a;else if(p>=c){var y=t?null:s(e);if(y)return l(y);h=!1,u=r,g=new i}else g=t?[]:f;e:for(;++d<p;){var v=e[d],m=t?t(v):v;if(v=n||0!==v?v:0,h&&m==m){for(var b=g.length;b--;)if(g[b]===m)continue e;t&&g.push(m),f.push(v)}else u(g,m,n)||(g!==f&&g.push(m),f.push(v))}return f}t.exports=d},{"./_SetCache":58,"./_arrayIncludes":66,"./_arrayIncludesWith":67,"./_cacheHas":131,"./_createSet":152,"./_setToArray":212}],129:[function(e,t,n){var i=e("./_arrayMap");function o(e,t){return i(t,(function(t){return e[t]}))}t.exports=o},{"./_arrayMap":69}],130:[function(e,t,n){function i(e,t,n){for(var i=-1,o=e.length,a=t.length,r={};++i<o;){var s=i<a?t[i]:void 0;n(r,e[i],s)}return r}t.exports=i},{}],131:[function(e,t,n){function i(e,t){return e.has(t)}t.exports=i},{}],132:[function(e,t,n){var i=e("./identity");function o(e){return"function"==typeof e?e:i}t.exports=o},{"./identity":241}],133:[function(e,t,n){var i=e("./isArray"),o=e("./_isKey"),a=e("./_stringToPath"),r=e("./toString");function s(e,t){return i(e)?e:o(e,t)?[e]:a(r(e))}t.exports=s},{"./_isKey":183,"./_stringToPath":222,"./isArray":243,"./toString":283}],134:[function(e,t,n){var i=e("./_Uint8Array");function o(e){var t=new e.constructor(e.byteLength);return new i(t).set(new i(e)),t}t.exports=o},{"./_Uint8Array":61}],135:[function(e,t,n){var i=e("./_root"),o="object"==typeof n&&n&&!n.nodeType&&n,a=o&&"object"==typeof t&&t&&!t.nodeType&&t,r=a&&a.exports===o?i.Buffer:void 0,s=r?r.allocUnsafe:void 0;function l(e,t){if(t)return e.slice();var n=e.length,i=s?s(n):new e.constructor(n);return e.copy(i),i}t.exports=l},{"./_root":208}],136:[function(e,t,n){var i=e("./_cloneArrayBuffer");function o(e,t){var n=t?i(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}t.exports=o},{"./_cloneArrayBuffer":134}],137:[function(e,t,n){var i=/\w*$/;function o(e){var t=new e.constructor(e.source,i.exec(e));return t.lastIndex=e.lastIndex,t}t.exports=o},{}],138:[function(e,t,n){var i=e("./_Symbol"),o=i?i.prototype:void 0,a=o?o.valueOf:void 0;function r(e){return a?Object(a.call(e)):{}}t.exports=r},{"./_Symbol":60}],139:[function(e,t,n){var i=e("./_cloneArrayBuffer");function o(e,t){var n=t?i(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}t.exports=o},{"./_cloneArrayBuffer":134}],140:[function(e,t,n){var i=e("./isSymbol");function o(e,t){if(e!==t){var n=void 0!==e,o=null===e,a=e==e,r=i(e),s=void 0!==t,l=null===t,c=t==t,d=i(t);if(!l&&!d&&!r&&e>t||r&&s&&c&&!l&&!d||o&&s&&c||!n&&c||!a)return 1;if(!o&&!r&&!d&&e<t||d&&n&&a&&!o&&!r||l&&n&&a||!s&&a||!c)return-1}return 0}t.exports=o},{"./isSymbol":256}],141:[function(e,t,n){var i=e("./_compareAscending");function o(e,t,n){for(var o=-1,a=e.criteria,r=t.criteria,s=a.length,l=n.length;++o<s;){var c=i(a[o],r[o]);if(c)return o>=l?c:c*("desc"==n[o]?-1:1)}return e.index-t.index}t.exports=o},{"./_compareAscending":140}],142:[function(e,t,n){function i(e,t){var n=-1,i=e.length;for(t||(t=Array(i));++n<i;)t[n]=e[n];return t}t.exports=i},{}],143:[function(e,t,n){var i=e("./_assignValue"),o=e("./_baseAssignValue");function a(e,t,n,a){var r=!n;n||(n={});for(var s=-1,l=t.length;++s<l;){var c=t[s],d=a?a(n[c],e[c],c,n,e):void 0;void 0===d&&(d=e[c]),r?o(n,c,d):i(n,c,d)}return n}t.exports=a},{"./_assignValue":75,"./_baseAssignValue":79}],144:[function(e,t,n){var i=e("./_copyObject"),o=e("./_getSymbols");function a(e,t){return i(e,o(e),t)}t.exports=a},{"./_copyObject":143,"./_getSymbols":166}],145:[function(e,t,n){var i=e("./_copyObject"),o=e("./_getSymbolsIn");function a(e,t){return i(e,o(e),t)}t.exports=a},{"./_copyObject":143,"./_getSymbolsIn":167}],146:[function(e,t,n){var i=e("./_root")["__core-js_shared__"];t.exports=i},{"./_root":208}],147:[function(e,t,n){var i=e("./_baseRest"),o=e("./_isIterateeCall");function a(e){return i((function(t,n){var i=-1,a=n.length,r=a>1?n[a-1]:void 0,s=a>2?n[2]:void 0;for(r=e.length>3&&"function"==typeof r?(a--,r):void 0,s&&o(n[0],n[1],s)&&(r=a<3?void 0:r,a=1),t=Object(t);++i<a;){var l=n[i];l&&e(t,l,i,r)}return t}))}t.exports=a},{"./_baseRest":121,"./_isIterateeCall":182}],148:[function(e,t,n){var i=e("./isArrayLike");function o(e,t){return function(n,o){if(null==n)return n;if(!i(n))return e(n,o);for(var a=n.length,r=t?a:-1,s=Object(n);(t?r--:++r<a)&&!1!==o(s[r],r,s););return n}}t.exports=o},{"./isArrayLike":244}],149:[function(e,t,n){function i(e){return function(t,n,i){for(var o=-1,a=Object(t),r=i(t),s=r.length;s--;){var l=r[e?s:++o];if(!1===n(a[l],l,a))break}return t}}t.exports=i},{}],150:[function(e,t,n){var i=e("./_baseIteratee"),o=e("./isArrayLike"),a=e("./keys");function r(e){return function(t,n,r){var s=Object(t);if(!o(t)){var l=i(n,3);t=a(t),n=function(e){return l(s[e],e,s)}}var c=e(t,n,r);return c>-1?s[l?t[c]:c]:void 0}}t.exports=r},{"./_baseIteratee":105,"./isArrayLike":244,"./keys":259}],151:[function(e,t,n){var i=e("./_baseRange"),o=e("./_isIterateeCall"),a=e("./toFinite");function r(e){return function(t,n,r){return r&&"number"!=typeof r&&o(t,n,r)&&(n=r=void 0),t=a(t),void 0===n?(n=t,t=0):n=a(n),r=void 0===r?t<n?1:-1:a(r),i(t,n,r,e)}}t.exports=r},{"./_baseRange":119,"./_isIterateeCall":182,"./toFinite":279}],152:[function(e,t,n){var i=e("./_Set"),o=e("./noop"),a=e("./_setToArray"),r=1/0,s=i&&1/a(new i([,-0]))[1]==r?function(e){return new i(e)}:o;t.exports=s},{"./_Set":57,"./_setToArray":212,"./noop":269}],153:[function(e,t,n){var i=e("./_getNative"),o=function(){try{var e=i(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();t.exports=o},{"./_getNative":163}],154:[function(e,t,n){var i=e("./_SetCache"),o=e("./_arraySome"),a=e("./_cacheHas"),r=1,s=2;function l(e,t,n,l,c,d){var u=n&r,p=e.length,h=t.length;if(p!=h&&!(u&&h>p))return!1;var f=d.get(e);if(f&&d.get(t))return f==t;var g=-1,y=!0,v=n&s?new i:void 0;for(d.set(e,t),d.set(t,e);++g<p;){var m=e[g],b=t[g];if(l)var _=u?l(b,m,g,t,e,d):l(m,b,g,e,t,d);if(void 0!==_){if(_)continue;y=!1;break}if(v){if(!o(t,(function(e,t){if(!a(v,t)&&(m===e||c(m,e,n,l,d)))return v.push(t)}))){y=!1;break}}else if(m!==b&&!c(m,b,n,l,d)){y=!1;break}}return d.delete(e),d.delete(t),y}t.exports=l},{"./_SetCache":58,"./_arraySome":72,"./_cacheHas":131}],155:[function(e,t,n){var i=e("./_Symbol"),o=e("./_Uint8Array"),a=e("./eq"),r=e("./_equalArrays"),s=e("./_mapToArray"),l=e("./_setToArray"),c=1,d=2,u="[object Boolean]",p="[object Date]",h="[object Error]",f="[object Map]",g="[object Number]",y="[object RegExp]",v="[object Set]",m="[object String]",b="[object Symbol]",_="[object ArrayBuffer]",k="[object DataView]",P=i?i.prototype:void 0,I=P?P.valueOf:void 0;function N(e,t,n,i,P,N,w){switch(n){case k:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case _:return!(e.byteLength!=t.byteLength||!N(new o(e),new o(t)));case u:case p:case g:return a(+e,+t);case h:return e.name==t.name&&e.message==t.message;case y:case m:return e==t+"";case f:var C=s;case v:var S=i&c;if(C||(C=l),e.size!=t.size&&!S)return!1;var L=w.get(e);if(L)return L==t;i|=d,w.set(e,t);var x=r(C(e),C(t),i,P,N,w);return w.delete(e),x;case b:if(I)return I.call(e)==I.call(t)}return!1}t.exports=N},{"./_Symbol":60,"./_Uint8Array":61,"./_equalArrays":154,"./_mapToArray":198,"./_setToArray":212,"./eq":231}],156:[function(e,t,n){var i=e("./_getAllKeys"),o=1,a=Object.prototype.hasOwnProperty;function r(e,t,n,r,s,l){var c=n&o,d=i(e),u=d.length;if(u!=i(t).length&&!c)return!1;for(var p=u;p--;){var h=d[p];if(!(c?h in t:a.call(t,h)))return!1}var f=l.get(e);if(f&&l.get(t))return f==t;var g=!0;l.set(e,t),l.set(t,e);for(var y=c;++p<u;){var v=e[h=d[p]],m=t[h];if(r)var b=c?r(m,v,h,t,e,l):r(v,m,h,e,t,l);if(!(void 0===b?v===m||s(v,m,n,r,l):b)){g=!1;break}y||(y="constructor"==h)}if(g&&!y){var _=e.constructor,k=t.constructor;_==k||!("constructor"in e)||!("constructor"in t)||"function"==typeof _&&_ instanceof _&&"function"==typeof k&&k instanceof k||(g=!1)}return l.delete(e),l.delete(t),g}t.exports=r},{"./_getAllKeys":159}],157:[function(e,t,n){var i=e("./flatten"),o=e("./_overRest"),a=e("./_setToString");function r(e){return a(o(e,void 0,i),e+"")}t.exports=r},{"./_overRest":207,"./_setToString":213,"./flatten":235}],158:[function(e,t,n){(function(e){var n="object"==typeof e&&e&&e.Object===Object&&e;t.exports=n}).call(this,void 0!==m?m:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],159:[function(e,t,n){var i=e("./_baseGetAllKeys"),o=e("./_getSymbols"),a=e("./keys");function r(e){return i(e,a,o)}t.exports=r},{"./_baseGetAllKeys":90,"./_getSymbols":166,"./keys":259}],160:[function(e,t,n){var i=e("./_baseGetAllKeys"),o=e("./_getSymbolsIn"),a=e("./keysIn");function r(e){return i(e,a,o)}t.exports=r},{"./_baseGetAllKeys":90,"./_getSymbolsIn":167,"./keysIn":260}],161:[function(e,t,n){var i=e("./_isKeyable");function o(e,t){var n=e.__data__;return i(t)?n["string"==typeof t?"string":"hash"]:n.map}t.exports=o},{"./_isKeyable":184}],162:[function(e,t,n){var i=e("./_isStrictComparable"),o=e("./keys");function a(e){for(var t=o(e),n=t.length;n--;){var a=t[n],r=e[a];t[n]=[a,r,i(r)]}return t}t.exports=a},{"./_isStrictComparable":187,"./keys":259}],163:[function(e,t,n){var i=e("./_baseIsNative"),o=e("./_getValue");function a(e,t){var n=o(e,t);return i(n)?n:void 0}t.exports=a},{"./_baseIsNative":102,"./_getValue":169}],164:[function(e,t,n){var i=e("./_overArg")(Object.getPrototypeOf,Object);t.exports=i},{"./_overArg":206}],165:[function(e,t,n){var i=e("./_Symbol"),o=Object.prototype,a=o.hasOwnProperty,r=o.toString,s=i?i.toStringTag:void 0;function l(e){var t=a.call(e,s),n=e[s];try{e[s]=void 0;var i=!0}catch(e){}var o=r.call(e);return i&&(t?e[s]=n:delete e[s]),o}t.exports=l},{"./_Symbol":60}],166:[function(e,t,n){var i=e("./_arrayFilter"),o=e("./stubArray"),a=Object.prototype.propertyIsEnumerable,r=Object.getOwnPropertySymbols,s=r?function(e){return null==e?[]:(e=Object(e),i(r(e),(function(t){return a.call(e,t)})))}:o;t.exports=s},{"./_arrayFilter":65,"./stubArray":277}],167:[function(e,t,n){var i=e("./_arrayPush"),o=e("./_getPrototype"),a=e("./_getSymbols"),r=e("./stubArray"),s=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)i(t,a(e)),e=o(e);return t}:r;t.exports=s},{"./_arrayPush":70,"./_getPrototype":164,"./_getSymbols":166,"./stubArray":277}],168:[function(e,t,n){var i=e("./_DataView"),o=e("./_Map"),a=e("./_Promise"),r=e("./_Set"),s=e("./_WeakMap"),l=e("./_baseGetTag"),c=e("./_toSource"),d="[object Map]",u="[object Object]",p="[object Promise]",h="[object Set]",f="[object WeakMap]",g="[object DataView]",y=c(i),v=c(o),m=c(a),b=c(r),_=c(s),k=l;(i&&k(new i(new ArrayBuffer(1)))!=g||o&&k(new o)!=d||a&&k(a.resolve())!=p||r&&k(new r)!=h||s&&k(new s)!=f)&&(k=function(e){var t=l(e),n=t==u?e.constructor:void 0,i=n?c(n):"";if(i)switch(i){case y:return g;case v:return d;case m:return p;case b:return h;case _:return f}return t}),t.exports=k},{"./_DataView":51,"./_Map":54,"./_Promise":56,"./_Set":57,"./_WeakMap":62,"./_baseGetTag":91,"./_toSource":224}],169:[function(e,t,n){function i(e,t){return null==e?void 0:e[t]}t.exports=i},{}],170:[function(e,t,n){var i=e("./_castPath"),o=e("./isArguments"),a=e("./isArray"),r=e("./_isIndex"),s=e("./isLength"),l=e("./_toKey");function c(e,t,n){for(var c=-1,d=(t=i(t,e)).length,u=!1;++c<d;){var p=l(t[c]);if(!(u=null!=e&&n(e,p)))break;e=e[p]}return u||++c!=d?u:!!(d=null==e?0:e.length)&&s(d)&&r(p,d)&&(a(e)||o(e))}t.exports=c},{"./_castPath":133,"./_isIndex":181,"./_toKey":223,"./isArguments":242,"./isArray":243,"./isLength":249}],171:[function(e,t,n){var i=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");function o(e){return i.test(e)}t.exports=o},{}],172:[function(e,t,n){var i=e("./_nativeCreate");function o(){this.__data__=i?i(null):{},this.size=0}t.exports=o},{"./_nativeCreate":201}],173:[function(e,t,n){function i(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}t.exports=i},{}],174:[function(e,t,n){var i=e("./_nativeCreate"),o="__lodash_hash_undefined__",a=Object.prototype.hasOwnProperty;function r(e){var t=this.__data__;if(i){var n=t[e];return n===o?void 0:n}return a.call(t,e)?t[e]:void 0}t.exports=r},{"./_nativeCreate":201}],175:[function(e,t,n){var i=e("./_nativeCreate"),o=Object.prototype.hasOwnProperty;function a(e){var t=this.__data__;return i?void 0!==t[e]:o.call(t,e)}t.exports=a},{"./_nativeCreate":201}],176:[function(e,t,n){var i=e("./_nativeCreate"),o="__lodash_hash_undefined__";function a(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=i&&void 0===t?o:t,this}t.exports=a},{"./_nativeCreate":201}],177:[function(e,t,n){var i=Object.prototype.hasOwnProperty;function o(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&i.call(e,"index")&&(n.index=e.index,n.input=e.input),n}t.exports=o},{}],178:[function(e,t,n){var i=e("./_cloneArrayBuffer"),o=e("./_cloneDataView"),a=e("./_cloneRegExp"),r=e("./_cloneSymbol"),s=e("./_cloneTypedArray"),l="[object Boolean]",c="[object Date]",d="[object Map]",u="[object Number]",p="[object RegExp]",h="[object Set]",f="[object String]",g="[object Symbol]",y="[object ArrayBuffer]",v="[object DataView]",m="[object Float32Array]",b="[object Float64Array]",_="[object Int8Array]",k="[object Int16Array]",P="[object Int32Array]",I="[object Uint8Array]",N="[object Uint8ClampedArray]",w="[object Uint16Array]",C="[object Uint32Array]";function S(e,t,n){var S=e.constructor;switch(t){case y:return i(e);case l:case c:return new S(+e);case v:return o(e,n);case m:case b:case _:case k:case P:case I:case N:case w:case C:return s(e,n);case d:return new S;case u:case f:return new S(e);case p:return a(e);case h:return new S;case g:return r(e)}}t.exports=S},{"./_cloneArrayBuffer":134,"./_cloneDataView":136,"./_cloneRegExp":137,"./_cloneSymbol":138,"./_cloneTypedArray":139}],179:[function(e,t,n){var i=e("./_baseCreate"),o=e("./_getPrototype"),a=e("./_isPrototype");function r(e){return"function"!=typeof e.constructor||a(e)?{}:i(o(e))}t.exports=r},{"./_baseCreate":81,"./_getPrototype":164,"./_isPrototype":186}],180:[function(e,t,n){var i=e("./_Symbol"),o=e("./isArguments"),a=e("./isArray"),r=i?i.isConcatSpreadable:void 0;function s(e){return a(e)||o(e)||!!(r&&e&&e[r])}t.exports=s},{"./_Symbol":60,"./isArguments":242,"./isArray":243}],181:[function(e,t,n){var i=9007199254740991,o=/^(?:0|[1-9]\d*)$/;function a(e,t){var n=typeof e;return!!(t=null==t?i:t)&&("number"==n||"symbol"!=n&&o.test(e))&&e>-1&&e%1==0&&e<t}t.exports=a},{}],182:[function(e,t,n){var i=e("./eq"),o=e("./isArrayLike"),a=e("./_isIndex"),r=e("./isObject");function s(e,t,n){if(!r(n))return!1;var s=typeof t;return!!("number"==s?o(n)&&a(t,n.length):"string"==s&&t in n)&&i(n[t],e)}t.exports=s},{"./_isIndex":181,"./eq":231,"./isArrayLike":244,"./isObject":251}],183:[function(e,t,n){var i=e("./isArray"),o=e("./isSymbol"),a=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,r=/^\w*$/;function s(e,t){if(i(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!o(e))||r.test(e)||!a.test(e)||null!=t&&e in Object(t)}t.exports=s},{"./isArray":243,"./isSymbol":256}],184:[function(e,t,n){function i(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}t.exports=i},{}],185:[function(e,t,n){var i,o=e("./_coreJsData"),a=(i=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+i:"";function r(e){return!!a&&a in e}t.exports=r},{"./_coreJsData":146}],186:[function(e,t,n){var i=Object.prototype;function o(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||i)}t.exports=o},{}],187:[function(e,t,n){var i=e("./isObject");function o(e){return e==e&&!i(e)}t.exports=o},{"./isObject":251}],188:[function(e,t,n){function i(){this.__data__=[],this.size=0}t.exports=i},{}],189:[function(e,t,n){var i=e("./_assocIndexOf"),o=Array.prototype.splice;function a(e){var t=this.__data__,n=i(t,e);return!(n<0||(n==t.length-1?t.pop():o.call(t,n,1),--this.size,0))}t.exports=a},{"./_assocIndexOf":76}],190:[function(e,t,n){var i=e("./_assocIndexOf");function o(e){var t=this.__data__,n=i(t,e);return n<0?void 0:t[n][1]}t.exports=o},{"./_assocIndexOf":76}],191:[function(e,t,n){var i=e("./_assocIndexOf");function o(e){return i(this.__data__,e)>-1}t.exports=o},{"./_assocIndexOf":76}],192:[function(e,t,n){var i=e("./_assocIndexOf");function o(e,t){var n=this.__data__,o=i(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this}t.exports=o},{"./_assocIndexOf":76}],193:[function(e,t,n){var i=e("./_Hash"),o=e("./_ListCache"),a=e("./_Map");function r(){this.size=0,this.__data__={hash:new i,map:new(a||o),string:new i}}t.exports=r},{"./_Hash":52,"./_ListCache":53,"./_Map":54}],194:[function(e,t,n){var i=e("./_getMapData");function o(e){var t=i(this,e).delete(e);return this.size-=t?1:0,t}t.exports=o},{"./_getMapData":161}],195:[function(e,t,n){var i=e("./_getMapData");function o(e){return i(this,e).get(e)}t.exports=o},{"./_getMapData":161}],196:[function(e,t,n){var i=e("./_getMapData");function o(e){return i(this,e).has(e)}t.exports=o},{"./_getMapData":161}],197:[function(e,t,n){var i=e("./_getMapData");function o(e,t){var n=i(this,e),o=n.size;return n.set(e,t),this.size+=n.size==o?0:1,this}t.exports=o},{"./_getMapData":161}],198:[function(e,t,n){function i(e){var t=-1,n=Array(e.size);return e.forEach((function(e,i){n[++t]=[i,e]})),n}t.exports=i},{}],199:[function(e,t,n){function i(e,t){return function(n){return null!=n&&n[e]===t&&(void 0!==t||e in Object(n))}}t.exports=i},{}],200:[function(e,t,n){var i=e("./memoize"),o=500;function a(e){var t=i(e,(function(e){return n.size===o&&n.clear(),e})),n=t.cache;return t}t.exports=a},{"./memoize":265}],201:[function(e,t,n){var i=e("./_getNative")(Object,"create");t.exports=i},{"./_getNative":163}],202:[function(e,t,n){var i=e("./_overArg")(Object.keys,Object);t.exports=i},{"./_overArg":206}],203:[function(e,t,n){function i(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}t.exports=i},{}],204:[function(e,t,n){var i=e("./_freeGlobal"),o="object"==typeof n&&n&&!n.nodeType&&n,a=o&&"object"==typeof t&&t&&!t.nodeType&&t,r=a&&a.exports===o&&i.process,s=function(){try{var e=a&&a.require&&a.require("util").types;return e||r&&r.binding&&r.binding("util")}catch(e){}}();t.exports=s},{"./_freeGlobal":158}],205:[function(e,t,n){var i=Object.prototype.toString;function o(e){return i.call(e)}t.exports=o},{}],206:[function(e,t,n){function i(e,t){return function(n){return e(t(n))}}t.exports=i},{}],207:[function(e,t,n){var i=e("./_apply"),o=Math.max;function a(e,t,n){return t=o(void 0===t?e.length-1:t,0),function(){for(var a=arguments,r=-1,s=o(a.length-t,0),l=Array(s);++r<s;)l[r]=a[t+r];r=-1;for(var c=Array(t+1);++r<t;)c[r]=a[r];return c[t]=n(l),i(e,this,c)}}t.exports=a},{"./_apply":63}],208:[function(e,t,n){var i=e("./_freeGlobal"),o="object"==typeof self&&self&&self.Object===Object&&self,a=i||o||Function("return this")();t.exports=a},{"./_freeGlobal":158}],209:[function(e,t,n){function i(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}t.exports=i},{}],210:[function(e,t,n){var i="__lodash_hash_undefined__";function o(e){return this.__data__.set(e,i),this}t.exports=o},{}],211:[function(e,t,n){function i(e){return this.__data__.has(e)}t.exports=i},{}],212:[function(e,t,n){function i(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}t.exports=i},{}],213:[function(e,t,n){var i=e("./_baseSetToString"),o=e("./_shortOut")(i);t.exports=o},{"./_baseSetToString":123,"./_shortOut":214}],214:[function(e,t,n){var i=800,o=16,a=Date.now;function r(e){var t=0,n=0;return function(){var r=a(),s=o-(r-n);if(n=r,s>0){if(++t>=i)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}t.exports=r},{}],215:[function(e,t,n){var i=e("./_ListCache");function o(){this.__data__=new i,this.size=0}t.exports=o},{"./_ListCache":53}],216:[function(e,t,n){function i(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}t.exports=i},{}],217:[function(e,t,n){function i(e){return this.__data__.get(e)}t.exports=i},{}],218:[function(e,t,n){function i(e){return this.__data__.has(e)}t.exports=i},{}],219:[function(e,t,n){var i=e("./_ListCache"),o=e("./_Map"),a=e("./_MapCache"),r=200;function s(e,t){var n=this.__data__;if(n instanceof i){var s=n.__data__;if(!o||s.length<r-1)return s.push([e,t]),this.size=++n.size,this;n=this.__data__=new a(s)}return n.set(e,t),this.size=n.size,this}t.exports=s},{"./_ListCache":53,"./_Map":54,"./_MapCache":55}],220:[function(e,t,n){function i(e,t,n){for(var i=n-1,o=e.length;++i<o;)if(e[i]===t)return i;return-1}t.exports=i},{}],221:[function(e,t,n){var i=e("./_asciiSize"),o=e("./_hasUnicode"),a=e("./_unicodeSize");function r(e){return o(e)?a(e):i(e)}t.exports=r},{"./_asciiSize":73,"./_hasUnicode":171,"./_unicodeSize":225}],222:[function(e,t,n){var i=e("./_memoizeCapped"),o=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,a=/\\(\\)?/g,r=i((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(o,(function(e,n,i,o){t.push(i?o.replace(a,"$1"):n||e)})),t}));t.exports=r},{"./_memoizeCapped":200}],223:[function(e,t,n){var i=e("./isSymbol"),o=1/0;function a(e){if("string"==typeof e||i(e))return e;var t=e+"";return"0"==t&&1/e==-o?"-0":t}t.exports=a},{"./isSymbol":256}],224:[function(e,t,n){var i=Function.prototype.toString;function o(e){if(null!=e){try{return i.call(e)}catch(e){}try{return e+""}catch(e){}}return""}t.exports=o},{}],225:[function(e,t,n){var i="\\ud800-\\udfff",o="["+i+"]",a="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",r="\\ud83c[\\udffb-\\udfff]",s="[^"+i+"]",l="(?:\\ud83c[\\udde6-\\uddff]){2}",c="[\\ud800-\\udbff][\\udc00-\\udfff]",d="(?:"+a+"|"+r+")?",u="[\\ufe0e\\ufe0f]?",p=u+d+"(?:\\u200d(?:"+[s,l,c].join("|")+")"+u+d+")*",h="(?:"+[s+a+"?",a,l,c,o].join("|")+")",f=RegExp(r+"(?="+r+")|"+h+p,"g");function g(e){for(var t=f.lastIndex=0;f.test(e);)++t;return t}t.exports=g},{}],226:[function(e,t,n){var i=e("./_baseClone"),o=4;function a(e){return i(e,o)}t.exports=a},{"./_baseClone":80}],227:[function(e,t,n){var i=e("./_baseClone"),o=1,a=4;function r(e){return i(e,o|a)}t.exports=r},{"./_baseClone":80}],228:[function(e,t,n){function i(e){return function(){return e}}t.exports=i},{}],229:[function(e,t,n){var i=e("./_baseRest"),o=e("./eq"),a=e("./_isIterateeCall"),r=e("./keysIn"),s=Object.prototype,l=s.hasOwnProperty,c=i((function(e,t){e=Object(e);var n=-1,i=t.length,c=i>2?t[2]:void 0;for(c&&a(t[0],t[1],c)&&(i=1);++n<i;)for(var d=t[n],u=r(d),p=-1,h=u.length;++p<h;){var f=u[p],g=e[f];(void 0===g||o(g,s[f])&&!l.call(e,f))&&(e[f]=d[f])}return e}));t.exports=c},{"./_baseRest":121,"./_isIterateeCall":182,"./eq":231,"./keysIn":260}],230:[function(e,t,n){t.exports=e("./forEach")},{"./forEach":236}],231:[function(e,t,n){function i(e,t){return e===t||e!=e&&t!=t}t.exports=i},{}],232:[function(e,t,n){var i=e("./_arrayFilter"),o=e("./_baseFilter"),a=e("./_baseIteratee"),r=e("./isArray");function s(e,t){return(r(e)?i:o)(e,a(t,3))}t.exports=s},{"./_arrayFilter":65,"./_baseFilter":84,"./_baseIteratee":105,"./isArray":243}],233:[function(e,t,n){var i=e("./_createFind")(e("./findIndex"));t.exports=i},{"./_createFind":150,"./findIndex":234}],234:[function(e,t,n){var i=e("./_baseFindIndex"),o=e("./_baseIteratee"),a=e("./toInteger"),r=Math.max;function s(e,t,n){var s=null==e?0:e.length;if(!s)return-1;var l=null==n?0:a(n);return l<0&&(l=r(s+l,0)),i(e,o(t,3),l)}t.exports=s},{"./_baseFindIndex":85,"./_baseIteratee":105,"./toInteger":280}],235:[function(e,t,n){var i=e("./_baseFlatten");function o(e){return null!=e&&e.length?i(e,1):[]}t.exports=o},{"./_baseFlatten":86}],236:[function(e,t,n){var i=e("./_arrayEach"),o=e("./_baseEach"),a=e("./_castFunction"),r=e("./isArray");function s(e,t){return(r(e)?i:o)(e,a(t))}t.exports=s},{"./_arrayEach":64,"./_baseEach":82,"./_castFunction":132,"./isArray":243}],237:[function(e,t,n){var i=e("./_baseFor"),o=e("./_castFunction"),a=e("./keysIn");function r(e,t){return null==e?e:i(e,o(t),a)}t.exports=r},{"./_baseFor":87,"./_castFunction":132,"./keysIn":260}],238:[function(e,t,n){var i=e("./_baseGet");function o(e,t,n){var o=null==e?void 0:i(e,t);return void 0===o?n:o}t.exports=o},{"./_baseGet":89}],239:[function(e,t,n){var i=e("./_baseHas"),o=e("./_hasPath");function a(e,t){return null!=e&&o(e,t,i)}t.exports=a},{"./_baseHas":93,"./_hasPath":170}],240:[function(e,t,n){var i=e("./_baseHasIn"),o=e("./_hasPath");function a(e,t){return null!=e&&o(e,t,i)}t.exports=a},{"./_baseHasIn":94,"./_hasPath":170}],241:[function(e,t,n){function i(e){return e}t.exports=i},{}],242:[function(e,t,n){var i=e("./_baseIsArguments"),o=e("./isObjectLike"),a=Object.prototype,r=a.hasOwnProperty,s=a.propertyIsEnumerable,l=i(function(){return arguments}())?i:function(e){return o(e)&&r.call(e,"callee")&&!s.call(e,"callee")};t.exports=l},{"./_baseIsArguments":96,"./isObjectLike":252}],243:[function(e,t,n){var i=Array.isArray;t.exports=i},{}],244:[function(e,t,n){var i=e("./isFunction"),o=e("./isLength");function a(e){return null!=e&&o(e.length)&&!i(e)}t.exports=a},{"./isFunction":248,"./isLength":249}],245:[function(e,t,n){var i=e("./isArrayLike"),o=e("./isObjectLike");function a(e){return o(e)&&i(e)}t.exports=a},{"./isArrayLike":244,"./isObjectLike":252}],246:[function(e,t,n){var i=e("./_root"),o=e("./stubFalse"),a="object"==typeof n&&n&&!n.nodeType&&n,r=a&&"object"==typeof t&&t&&!t.nodeType&&t,s=r&&r.exports===a?i.Buffer:void 0,l=(s?s.isBuffer:void 0)||o;t.exports=l},{"./_root":208,"./stubFalse":278}],247:[function(e,t,n){var i=e("./_baseKeys"),o=e("./_getTag"),a=e("./isArguments"),r=e("./isArray"),s=e("./isArrayLike"),l=e("./isBuffer"),c=e("./_isPrototype"),d=e("./isTypedArray"),u="[object Map]",p="[object Set]",h=Object.prototype.hasOwnProperty;function f(e){if(null==e)return!0;if(s(e)&&(r(e)||"string"==typeof e||"function"==typeof e.splice||l(e)||d(e)||a(e)))return!e.length;var t=o(e);if(t==u||t==p)return!e.size;if(c(e))return!i(e).length;for(var n in e)if(h.call(e,n))return!1;return!0}t.exports=f},{"./_baseKeys":106,"./_getTag":168,"./_isPrototype":186,"./isArguments":242,"./isArray":243,"./isArrayLike":244,"./isBuffer":246,"./isTypedArray":257}],248:[function(e,t,n){var i=e("./_baseGetTag"),o=e("./isObject"),a="[object AsyncFunction]",r="[object Function]",s="[object GeneratorFunction]",l="[object Proxy]";function c(e){if(!o(e))return!1;var t=i(e);return t==r||t==s||t==a||t==l}t.exports=c},{"./_baseGetTag":91,"./isObject":251}],249:[function(e,t,n){var i=9007199254740991;function o(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=i}t.exports=o},{}],250:[function(e,t,n){var i=e("./_baseIsMap"),o=e("./_baseUnary"),a=e("./_nodeUtil"),r=a&&a.isMap,s=r?o(r):i;t.exports=s},{"./_baseIsMap":99,"./_baseUnary":127,"./_nodeUtil":204}],251:[function(e,t,n){function i(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}t.exports=i},{}],252:[function(e,t,n){function i(e){return null!=e&&"object"==typeof e}t.exports=i},{}],253:[function(e,t,n){var i=e("./_baseGetTag"),o=e("./_getPrototype"),a=e("./isObjectLike"),r="[object Object]",s=Function.prototype,l=Object.prototype,c=s.toString,d=l.hasOwnProperty,u=c.call(Object);function p(e){if(!a(e)||i(e)!=r)return!1;var t=o(e);if(null===t)return!0;var n=d.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&c.call(n)==u}t.exports=p},{"./_baseGetTag":91,"./_getPrototype":164,"./isObjectLike":252}],254:[function(e,t,n){var i=e("./_baseIsSet"),o=e("./_baseUnary"),a=e("./_nodeUtil"),r=a&&a.isSet,s=r?o(r):i;t.exports=s},{"./_baseIsSet":103,"./_baseUnary":127,"./_nodeUtil":204}],255:[function(e,t,n){var i=e("./_baseGetTag"),o=e("./isArray"),a=e("./isObjectLike"),r="[object String]";function s(e){return"string"==typeof e||!o(e)&&a(e)&&i(e)==r}t.exports=s},{"./_baseGetTag":91,"./isArray":243,"./isObjectLike":252}],256:[function(e,t,n){var i=e("./_baseGetTag"),o=e("./isObjectLike"),a="[object Symbol]";function r(e){return"symbol"==typeof e||o(e)&&i(e)==a}t.exports=r},{"./_baseGetTag":91,"./isObjectLike":252}],257:[function(e,t,n){var i=e("./_baseIsTypedArray"),o=e("./_baseUnary"),a=e("./_nodeUtil"),r=a&&a.isTypedArray,s=r?o(r):i;t.exports=s},{"./_baseIsTypedArray":104,"./_baseUnary":127,"./_nodeUtil":204}],258:[function(e,t,n){function i(e){return void 0===e}t.exports=i},{}],259:[function(e,t,n){var i=e("./_arrayLikeKeys"),o=e("./_baseKeys"),a=e("./isArrayLike");function r(e){return a(e)?i(e):o(e)}t.exports=r},{"./_arrayLikeKeys":68,"./_baseKeys":106,"./isArrayLike":244}],260:[function(e,t,n){var i=e("./_arrayLikeKeys"),o=e("./_baseKeysIn"),a=e("./isArrayLike");function r(e){return a(e)?i(e,!0):o(e)}t.exports=r},{"./_arrayLikeKeys":68,"./_baseKeysIn":107,"./isArrayLike":244}],261:[function(e,t,n){function i(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}t.exports=i},{}],262:[function(e,t,n){var i=e("./_arrayMap"),o=e("./_baseIteratee"),a=e("./_baseMap"),r=e("./isArray");function s(e,t){return(r(e)?i:a)(e,o(t,3))}t.exports=s},{"./_arrayMap":69,"./_baseIteratee":105,"./_baseMap":109,"./isArray":243}],263:[function(e,t,n){var i=e("./_baseAssignValue"),o=e("./_baseForOwn"),a=e("./_baseIteratee");function r(e,t){var n={};return t=a(t,3),o(e,(function(e,o,a){i(n,o,t(e,o,a))})),n}t.exports=r},{"./_baseAssignValue":79,"./_baseForOwn":88,"./_baseIteratee":105}],264:[function(e,t,n){var i=e("./_baseExtremum"),o=e("./_baseGt"),a=e("./identity");function r(e){return e&&e.length?i(e,a,o):void 0}t.exports=r},{"./_baseExtremum":83,"./_baseGt":92,"./identity":241}],265:[function(e,t,n){var i=e("./_MapCache"),o="Expected a function";function a(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError(o);var n=function(){var i=arguments,o=t?t.apply(this,i):i[0],a=n.cache;if(a.has(o))return a.get(o);var r=e.apply(this,i);return n.cache=a.set(o,r)||a,r};return n.cache=new(a.Cache||i),n}a.Cache=i,t.exports=a},{"./_MapCache":55}],266:[function(e,t,n){var i=e("./_baseMerge"),o=e("./_createAssigner")((function(e,t,n){i(e,t,n)}));t.exports=o},{"./_baseMerge":112,"./_createAssigner":147}],267:[function(e,t,n){var i=e("./_baseExtremum"),o=e("./_baseLt"),a=e("./identity");function r(e){return e&&e.length?i(e,a,o):void 0}t.exports=r},{"./_baseExtremum":83,"./_baseLt":108,"./identity":241}],268:[function(e,t,n){var i=e("./_baseExtremum"),o=e("./_baseIteratee"),a=e("./_baseLt");function r(e,t){return e&&e.length?i(e,o(t,2),a):void 0}t.exports=r},{"./_baseExtremum":83,"./_baseIteratee":105,"./_baseLt":108}],269:[function(e,t,n){function i(){}t.exports=i},{}],270:[function(e,t,n){var i=e("./_root"),o=function(){return i.Date.now()};t.exports=o},{"./_root":208}],271:[function(e,t,n){var i=e("./_basePick"),o=e("./_flatRest")((function(e,t){return null==e?{}:i(e,t)}));t.exports=o},{"./_basePick":115,"./_flatRest":157}],272:[function(e,t,n){var i=e("./_baseProperty"),o=e("./_basePropertyDeep"),a=e("./_isKey"),r=e("./_toKey");function s(e){return a(e)?i(r(e)):o(e)}t.exports=s},{"./_baseProperty":117,"./_basePropertyDeep":118,"./_isKey":183,"./_toKey":223}],273:[function(e,t,n){var i=e("./_createRange")();t.exports=i},{"./_createRange":151}],274:[function(e,t,n){var i=e("./_arrayReduce"),o=e("./_baseEach"),a=e("./_baseIteratee"),r=e("./_baseReduce"),s=e("./isArray");function l(e,t,n){var l=s(e)?i:r,c=arguments.length<3;return l(e,a(t,4),n,c,o)}t.exports=l},{"./_arrayReduce":71,"./_baseEach":82,"./_baseIteratee":105,"./_baseReduce":120,"./isArray":243}],275:[function(e,t,n){var i=e("./_baseKeys"),o=e("./_getTag"),a=e("./isArrayLike"),r=e("./isString"),s=e("./_stringSize"),l="[object Map]",c="[object Set]";function d(e){if(null==e)return 0;if(a(e))return r(e)?s(e):e.length;var t=o(e);return t==l||t==c?e.size:i(e).length}t.exports=d},{"./_baseKeys":106,"./_getTag":168,"./_stringSize":221,"./isArrayLike":244,"./isString":255}],276:[function(e,t,n){var i=e("./_baseFlatten"),o=e("./_baseOrderBy"),a=e("./_baseRest"),r=e("./_isIterateeCall"),s=a((function(e,t){if(null==e)return[];var n=t.length;return n>1&&r(e,t[0],t[1])?t=[]:n>2&&r(t[0],t[1],t[2])&&(t=[t[0]]),o(e,i(t,1),[])}));t.exports=s},{"./_baseFlatten":86,"./_baseOrderBy":114,"./_baseRest":121,"./_isIterateeCall":182}],277:[function(e,t,n){function i(){return[]}t.exports=i},{}],278:[function(e,t,n){function i(){return!1}t.exports=i},{}],279:[function(e,t,n){var i=e("./toNumber"),o=1/0,a=17976931348623157e292;function r(e){return e?(e=i(e))===o||e===-o?(e<0?-1:1)*a:e==e?e:0:0===e?e:0}t.exports=r},{"./toNumber":281}],280:[function(e,t,n){var i=e("./toFinite");function o(e){var t=i(e),n=t%1;return t==t?n?t-n:t:0}t.exports=o},{"./toFinite":279}],281:[function(e,t,n){var i=e("./isObject"),o=e("./isSymbol"),a=NaN,r=/^\s+|\s+$/g,s=/^[-+]0x[0-9a-f]+$/i,l=/^0b[01]+$/i,c=/^0o[0-7]+$/i,d=parseInt;function u(e){if("number"==typeof e)return e;if(o(e))return a;if(i(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=i(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(r,"");var n=l.test(e);return n||c.test(e)?d(e.slice(2),n?2:8):s.test(e)?a:+e}t.exports=u},{"./isObject":251,"./isSymbol":256}],282:[function(e,t,n){var i=e("./_copyObject"),o=e("./keysIn");function a(e){return i(e,o(e))}t.exports=a},{"./_copyObject":143,"./keysIn":260}],283:[function(e,t,n){var i=e("./_baseToString");function o(e){return null==e?"":i(e)}t.exports=o},{"./_baseToString":126}],284:[function(e,t,n){var i=e("./_arrayEach"),o=e("./_baseCreate"),a=e("./_baseForOwn"),r=e("./_baseIteratee"),s=e("./_getPrototype"),l=e("./isArray"),c=e("./isBuffer"),d=e("./isFunction"),u=e("./isObject"),p=e("./isTypedArray");function h(e,t,n){var h=l(e),f=h||c(e)||p(e);if(t=r(t,4),null==n){var g=e&&e.constructor;n=f?h?new g:[]:u(e)&&d(g)?o(s(e)):{}}return(f?i:a)(e,(function(e,i,o){return t(n,e,i,o)})),n}t.exports=h},{"./_arrayEach":64,"./_baseCreate":81,"./_baseForOwn":88,"./_baseIteratee":105,"./_getPrototype":164,"./isArray":243,"./isBuffer":246,"./isFunction":248,"./isObject":251,"./isTypedArray":257}],285:[function(e,t,n){var i=e("./_baseFlatten"),o=e("./_baseRest"),a=e("./_baseUniq"),r=e("./isArrayLikeObject"),s=o((function(e){return a(i(e,1,r,!0))}));t.exports=s},{"./_baseFlatten":86,"./_baseRest":121,"./_baseUniq":128,"./isArrayLikeObject":245}],286:[function(e,t,n){var i=e("./toString"),o=0;function a(e){var t=++o;return i(e)+t}t.exports=a},{"./toString":283}],287:[function(e,t,n){var i=e("./_baseValues"),o=e("./keys");function a(e){return null==e?[]:i(e,o(e))}t.exports=a},{"./_baseValues":129,"./keys":259}],288:[function(e,t,n){var i=e("./_assignValue"),o=e("./_baseZipObject");function a(e,t){return o(e||[],t||[],i)}t.exports=a},{"./_assignValue":75,"./_baseZipObject":130}]},{},[1])(1);function Ad(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return Md(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Md(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,r=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return r=e.done,e},e:function(e){s=!0,a=e},f:function(){try{r||null==n.return||n.return()}finally{if(s)throw a}}}}function Md(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}var Rd=function(){function n(t,i){e(this,n),this.pipelineId=t,this.objectModel=i,this.store=i.store}return t(n,[{key:"getPipeline",value:function(){return this.objectModel.getCanvasInfoPipeline(this.pipelineId)}},{key:"isPipelineExternal",value:function(){return this.objectModel.getCanvasInfoPipeline(this.pipelineId).parentUrl}},{key:"setPipelineZoom",value:function(e,t){this.store.dispatch({type:"SET_PIPELINE_ZOOM",data:{zoom:e},pipelineId:this.pipelineId})}},{key:"getObjects",value:function(){var e=this.objectModel.getCanvasInfoPipeline(this.pipelineId);return e?e.nodes.concat(e.comments):[]}},{key:"moveObjects",value:function(e){this.store.dispatch({type:"MOVE_OBJECTS",data:e,pipelineId:this.pipelineId})}},{key:"deleteObject",value:function(e){this.deleteObjects([e])}},{key:"deleteObjects",value:function(e){var t=this;this.objectModel.executeWithSelectionChange((function(e){var n=t.filterNodesAndComments(e),i=n.nodes,o=n.comments;t.deleteNodesInternal(i),t.deleteCommentsInternal(o)}),e)}},{key:"addAndUpdateObjects",value:function(e){var t=this;this.objectModel.executeWithSelectionChange((function(e){t.store.dispatch({type:"ADD_AND_UPDATE_OBJECTS",data:e,pipelineId:t.pipelineId})}),e)}},{key:"deleteAndUpdateObjects",value:function(e){var t=this;this.objectModel.executeWithSelectionChange((function(e){t.store.dispatch({type:"DELETE_AND_UPDATE_OBJECTS",data:e,pipelineId:t.pipelineId})}),e)}},{key:"filterNodesAndComments",value:function(e){var t=this,n=[],i=[];return e.forEach((function(e){var o=t.getComment(e);o?i.push(o):n.push(t.getNode(e))})),{nodes:n,comments:i}}},{key:"getObjectStyle",value:function(e,t){var n=this.getObject(e);return t?n&&n.style_temp?n.style_temp:null:n&&n.style?n.style:null}},{key:"setObjectsClassName",value:function(e,t){this.store.dispatch({type:"SET_OBJECTS_CLASS_NAME",data:{objIds:e,newClassName:t},pipelineId:this.pipelineId})}},{key:"disconnectObjects",value:function(e){var t=this,n=[];return e.forEach((function(e){t.getLinksContainingId(e).forEach((function(e){n=t.pushUniqueLinks(e,n)}))})),this.store.dispatch({type:"DELETE_LINKS",data:{linksToDelete:n},pipelineId:this.pipelineId}),n}},{key:"isEmpty",value:function(){return!!(this.getNodes()&&0===this.getNodes().length&&this.getComments()&&0===this.getComments().length&&this.getLinks()&&0===this.getLinks().length)}},{key:"getObject",value:function(e){var t=this.getNode(e);if(t)return t;var n=this.getComment(e);return n||null}},{key:"exactlyOverlaps",value:function(e,t,n){var i=this,o=!1;e&&e.length>0&&(e.findIndex((function(e){return i.exactlyOverlapsNodes(e)}))>-1&&(o=!0));!1===o&&t&&t.length>0&&(t.findIndex((function(e){return i.exactlyOverlapsComments(e)}))>-1&&(o=!0));!1===o&&n&&n.length>0&&(n.findIndex((function(e){return i.exactlyOverlapsLinks(e)}))>-1&&(o=!0));return o}},{key:"exactlyOverlapsNodes",value:function(e){var t=!1;return this.getNodes().forEach((function(n){n.x_pos===e.x_pos&&n.y_pos===e.y_pos&&(t=!0)})),t}},{key:"overlapsNodes",value:function(e,t){var n=!1;return(t||this.getNodes()).forEach((function(t){var i=t.x_pos+t.width,o=t.y_pos+t.height;e.id!==t.id&&(e.x_pos===t.x_pos&&e.y_pos===t.y_pos||e.x_pos>=t.x_pos&&e.x_pos<=i&&e.y_pos>=t.y_pos&&e.y_pos<=o||e.x_pos+e.width>t.x_pos&&e.x_pos+e.width<i&&e.y_pos>t.y_pos&&e.y_pos<o||e.x_pos>t.x_pos&&e.x_pos<i&&e.y_pos+e.height>t.y_pos&&e.y_pos+e.height<o||e.x_pos+e.width>t.x_pos&&e.x_pos+e.width<i&&e.y_pos+e.height>t.y_pos&&e.y_pos+e.height<o)&&(n=!0)})),n}},{key:"exactlyOverlapsComments",value:function(e){var t=!1;return this.getComments().forEach((function(n){n.x_pos===e.x_pos&&n.y_pos===e.y_pos&&(t=!0)})),t}},{key:"exactlyOverlapsLinks",value:function(e){var t=!1;return this.getLinks().forEach((function(n){n.srcPos&&e.srcPos&&n.srcPos.x_pos===e.srcPos.x_pos&&n.srcPos.y_pos===e.srcPos.y_pos&&(t=!0),n.trgPos&&e.trgPos&&n.trgPos.x_pos===e.trgPos.x_pos&&n.trgPos.y_pos===e.trgPos.y_pos&&(t=!0)})),t}},{key:"isObjectIdInObjects",value:function(e,t){return!!t&&t.findIndex((function(t){return t.id===e}))>-1}},{key:"createNode",value:function(e){var t=e.nodeTemplate;p(e.nodeTemplate,"app_data.ui_data")&&(t=this.objectModel.convertNodeTemplate(t));var n={};return null!==t&&(n=Object.assign({},t,{id:this.objectModel.getUniqueId(Ee,{nodeType:t,pipelineId:this.pipelineId}),x_pos:e.offsetX,y_pos:e.offsetY}),n=this.objectModel.setNodeAttributes(n)),n}},{key:"getAutoSourceNode",value:function(e){var t=null,n=this.objectModel.getSelectedNodes();if(1===n.length&&this.isViableAutoSourceNode(n[0]))t=n[0];else if(!e){var i=this.getNodes();if(i.length>0){var o=i[i.length-1];if(o.outputs)t=o;else if(i.length>1){var a=i[i.length-2];a.outputs&&(t=a)}}}return t}},{key:"isViableAutoSourceNode",value:function(e){return e.outputs&&e.outputs.length>0&&!cl.isSrcCardinalityAtMax(e.outputs[0].id,e,this.getLinks())}},{key:"createAutoNode",value:function(e,t){var n=this.objectModel.getCanvasLayout().autoLayoutInitialMarginX,i=this.objectModel.getCanvasLayout().autoLayoutInitialMarginY,o=this.objectModel.getCanvasLayout().autoLayoutHorizontalSpacing,a=this.objectModel.getCanvasLayout().autoLayoutVerticalSpacing,r=0,s=0;null===t?(r=n,s=i):(r=t.x_pos+t.width+o,s=t.y_pos),e.offsetX=r,e.offsetY=s;var l=this.createNode(e);this.getNodes().length>0&&this.isEntryBindingNode(l)&&(l.x_pos=n,l.y_pos+=l.height+a);for(var c=!0;c;)(c=this.isNodeOverlappingOthers(l))&&(l.y_pos+=l.height+a);return l}},{key:"createNodesForPalette",value:function(e){var t=this,n=[];return e.forEach((function(e){var i=t.getNode(e);i&&((i=ht(i)).id=t.objectModel.getUUID(),i.x_pos=0,i.y_pos=0,(i=Od.createSchemaNode(i,[])).type===G&&(i.app_data||(i.app_data={}),i.app_data.pipeline_data=t.objectModel.getSchemaPipelinesForSupernode(i)),n.push(i))})),n}},{key:"replaceNodes",value:function(e){this.store.dispatch({type:"REPLACE_NODES",data:e,pipelineId:this.pipelineId})}},{key:"isLinkNeededWithAutoNode",value:function(e,t){var n=!1;return e&&t&&e.inputs&&t.outputs&&1===e.inputs.length&&1===t.outputs.length&&!cl.isCardinalityAtMax(t.outputs[0].id,e.inputs[0].id,t,e,this.getLinks())&&(n=!0),n}},{key:"isEntryBindingNode",value:function(e){return!(e.type!==Te||e.inputs&&0!==e.inputs.length)}},{key:"isExitBindingNode",value:function(e){return!!(e.type===Te&&e.inputs&&e.inputs.length>0)}},{key:"isNodeOverlappingOthers",value:function(e){var t=this;return-1!==this.getNodes().findIndex((function(n){return t.isSourceOverlappingTarget(n,e)}))}},{key:"isSourceOverlappingTarget",value:function(e,t){var n=e.layout.nodeHighlightGap,i=t.layout.nodeHighlightGap;return e.x_pos+e.width+n>=t.x_pos-i&&t.x_pos+t.width+i>=e.x_pos-n&&e.y_pos+e.height+n>=t.y_pos-i&&t.y_pos+t.height+i>=e.y_pos-n}},{key:"addNode",value:function(e){e&&(e.type===G?this.addSupernode(e,pt(e,"app_data.pipeline_data")):this.store.dispatch({type:"ADD_NODE",data:{newNode:e},pipelineId:this.pipelineId}))}},{key:"addSupernodes",value:function(e,t,n){this.store.dispatch({type:"ADD_SUPERNODES",data:{supernodesToAdd:e,pipelinesToAdd:t,extPipelineFlowsToAdd:n,pipelineId:this.pipelineId}})}},{key:"addSupernode",value:function(e,t){var n=this,i=this.objectModel.getCanvasInfo(),o=this.objectModel.getCanvasInfo().pipelines.concat(t||[]);o=o.map((function(t){if(t.id===n.pipelineId){var i=[].concat(tt(t.nodes),[n.cloneSupernodeRemovePipelineData(e)]);return Object.assign({},t,{nodes:i})}return t}));var a=Object.assign({},i,{pipelines:o});this.objectModel.setCanvasInfo(a)}},{key:"cloneSupernodeRemovePipelineData",value:function(e){var t=Object.assign({},e);return t.app_data&&(t.app_data=Object.assign({},t.app_data),delete t.app_data.pipeline_data),t}},{key:"deleteNode",value:function(e){var t=this.getNode(e);t&&this.deleteNodes([t])}},{key:"deleteNodes",value:function(e){var t=this,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];e&&e.length>0&&this.objectModel.executeWithSelectionChange((function(e){t.deleteNodesInternal(e.nodes,e.removePipelines)}),{nodes:e,removePipelines:n})}},{key:"deleteNodesInternal",value:function(e,t){var n=this;e.filter((function(e){return e.type!==G})).forEach((function(e){n.store.dispatch({type:"DELETE_OBJECT",data:{id:e.id},pipelineId:n.pipelineId})}));var i=e.filter((function(e){return e.type===G}));t?this.deleteSupernodesAndDescPipelines(i):this.deleteSupernodes(i,[],[])}},{key:"deleteSupernodesAndDescPipelines",value:function(e){var t=this.objectModel.getDescPipelinesToDelete(e,this.pipelineId),n=this.objectModel.getExternalPipelineFlowsForPipelines(t);this.deleteSupernodes(e,t,n)}},{key:"deleteSupernodes",value:function(e,t,n){this.store.dispatch({type:"DELETE_SUPERNODES",data:{supernodesToDelete:e,pipelinesToDelete:t,extPipelineFlowsToDelete:n,pipelineId:this.pipelineId}})}},{key:"deconstructSupernode",value:function(e){this.store.dispatch({type:"DECONSTRUCT_SUPERNODE",data:e})}},{key:"reconstructSupernode",value:function(e){this.store.dispatch({type:"RECONSTRUCT_SUPERNODE",data:e})}},{key:"getNodes",value:function(){var e=this.objectModel.getCanvasInfoPipeline(this.pipelineId);return e?e.nodes:[]}},{key:"getNodeIds",value:function(){var e=this.objectModel.getCanvasInfoPipeline(this.pipelineId);return e?e.nodes.map((function(e){return e.id})):[]}},{key:"getNode",value:function(e){return this.getNodes().find((function(t){return t.id===e}))}},{key:"getSupernodes",value:function(){return cl.filterSupernodes(this.getNodes())}},{key:"isDataNode",value:function(e){return void 0!==this.getNode(e)}},{key:"sizeAndPositionObjects",value:function(e,t){this.store.dispatch({type:"SIZE_AND_POSITION_OBJECTS",data:{objectsInfo:e,linksInfo:t},pipelineId:this.pipelineId})}},{key:"filterDataNodes",value:function(e){var t=this;return e.filter((function(e){return t.isDataNode(e)}))}},{key:"expandSuperNodeInPlace",value:function(e,t,n){var i=Object.assign({},this.getNode(e),{is_expanded:!0});i=this.objectModel.setNodeAttributes(i),this.store.dispatch({type:"SET_SUPERNODE_EXPAND_STATE",data:{node:i,objectPositions:t,linkPositions:n},pipelineId:this.pipelineId})}},{key:"collapseSuperNodeInPlace",value:function(e,t,n){var i=Object.assign({},this.getNode(e),{is_expanded:!1});i=this.objectModel.setNodeAttributes(i),this.store.dispatch({type:"SET_SUPERNODE_EXPAND_STATE",data:{node:i,objectPositions:t,linkPositions:n},pipelineId:this.pipelineId})}},{key:"isSuperNodeExpandedInPlace",value:function(e){return!0===this.getNode(e).is_expanded}},{key:"isSupernode",value:function(e){return this.getNode(e).type===G}},{key:"getNodeParameters",value:function(e){var t=this.getNode(e);return t?t.parameters:null}},{key:"getNodeUiParameters",value:function(e){var t=this.getNode(e);return t?t.ui_parameters:null}},{key:"setNodeLabel",value:function(e,t){this.store.dispatch({type:"SET_NODE_LABEL",data:{nodeId:e,label:t},pipelineId:this.pipelineId})}},{key:"setNodeDecorations",value:function(e,t){this.store.dispatch({type:"SET_NODE_DECORATIONS",data:{nodeId:e,decorations:this.ensureDecorationsHaveIds(t)},pipelineId:this.pipelineId})}},{key:"setInputPortLabel",value:function(e,t,n){this.store.dispatch({type:"SET_INPUT_PORT_LABEL",data:{nodeId:e,portId:t,label:n},pipelineId:this.pipelineId})}},{key:"setOutputPortLabel",value:function(e,t,n){this.store.dispatch({type:"SET_OUTPUT_PORT_LABEL",data:{nodeId:e,portId:t,label:n},pipelineId:this.pipelineId})}},{key:"setInputPortSubflowNodeRef",value:function(e,t,n){this.store.dispatch({type:"SET_INPUT_PORT_SUBFLOW_NODE_REF",data:{nodeId:e,portId:t,subflowNodeRef:n},pipelineId:this.pipelineId})}},{key:"setOutputPortSubflowNodeRef",value:function(e,t,n){this.store.dispatch({type:"SET_OUTPUT_PORT_SUBFLOW_NODE_REF",data:{nodeId:e,portId:t,subflowNodeRef:n},pipelineId:this.pipelineId})}},{key:"setNodeProperties",value:function(e,t){this.store.dispatch({type:"SET_NODE_PROPERTIES",data:{nodeId:e,properties:t},pipelineId:this.pipelineId})}},{key:"setNodeMessage",value:function(e,t){this.store.dispatch({type:"SET_NODE_MESSAGE",data:{nodeId:e,message:t},pipelineId:this.pipelineId})}},{key:"setNodeMessages",value:function(e,t){this.store.dispatch({type:"SET_NODE_MESSAGES",data:{nodeId:e,messages:t},pipelineId:this.pipelineId})}},{key:"setNodeUiParameters",value:function(e,t){this.store.dispatch({type:"SET_NODE_UI_PARAMETERS",data:{nodeId:e,ui_parameters:t},pipelineId:this.pipelineId})}},{key:"setNodeParameters",value:function(e,t){this.store.dispatch({type:"SET_NODE_PARAMETERS",data:{nodeId:e,parameters:t},pipelineId:this.pipelineId})}},{key:"setNodeInputPorts",value:function(e,t){var n=this.getNode(e);n.inputs=t;var i=this.objectModel.setNodeAttributes(n);this.store.dispatch({type:"REPLACE_NODE",data:{node:i},pipelineId:this.pipelineId})}},{key:"setNodeOutputPorts",value:function(e,t){var n=this.getNode(e);n.outputs=t;var i=this.objectModel.setNodeAttributes(n);this.store.dispatch({type:"REPLACE_NODE",data:{node:i},pipelineId:this.pipelineId})}},{key:"addCustomAttrToNodes",value:function(e,t,n){this.store.dispatch({type:"ADD_NODE_ATTR",data:{objIds:e,attrName:t,attrValue:n},pipelineId:this.pipelineId})}},{key:"removeCustomAttrFromNodes",value:function(e,t,n){this.store.dispatch({type:"REMOVE_NODE_ATTR",data:{objIds:e,attrName:t},pipelineId:this.pipelineId})}},{key:"getNodeDecorations",value:function(e){var t=this.getNode(e);return t?t.decorations:null}},{key:"getNodeMessages",value:function(e){var t=this.getNode(e);return t?t.messages:null}},{key:"getNodeMessage",value:function(e,t){var n=this.getNodeMessages(e);if(n){var i,o=Ad(n);try{for(o.s();!(i=o.n()).done;){var a=i.value;if(a.id_ref===t)return a}}catch(e){o.e(e)}finally{o.f()}}return null}},{key:"getNodeInputPorts",value:function(e){var t=this.getNode(e);return t?t.inputs:null}},{key:"getNodeOutputPorts",value:function(e){var t=this.getNode(e);return t?t.outputs:null}},{key:"getNodeClassName",value:function(e){var t=this.getNode(e);return t?t.class_name:null}},{key:"getNodeStyle",value:function(e,t){var n=this.getNode(e);return t?n?n.style_temp:null:n?n.style:null}},{key:"hasErrorMessage",value:function(e){var t=this.getNode(e);return this.objectModel.hasErrorMessage(t)}},{key:"hasWarningMessage",value:function(e){var t=this.getNode(e);return this.objectModel.hasWarningMessage(t)}},{key:"isFlowValid",value:function(e){var t,n=!0,i=Ad(this.getNodes());try{for(i.s();!(t=i.n()).done;){var o=t.value;n&&(n=this.isNodeValid(o,e))}}catch(e){i.e(e)}finally{i.f()}return n}},{key:"isNodeValid",value:function(e,t){var n=!0;if(t&&Array.isArray(t)&&t.length>0){var i,o=Ad(e.messages);try{for(o.s();!(i=o.n()).done;){var a=i.value;-1!==t.indexOf(a.type)&&(n=!1)}}catch(e){o.e(e)}finally{o.f()}}else e.messages&&e.messages.length>0&&(n=!1);return n}},{key:"getFlowMessages",value:function(){var e=this.getNodes(),t={};return e.forEach((function(e){e.messages&&e.messages.length>0&&(t[e.id]=e.messages)})),t}},{key:"autoLayout",value:function(e){var t=this.objectModel.getCanvasInfoPipeline(this.pipelineId),n={};n=e===Oe?this.dagreAutolayout(De,t):this.dagreAutolayout(je,t),this.sizeAndPositionObjects(n)}},{key:"dagreAutolayout",value:function(e,t){var n=this,i=this.objectModel.getCanvasLayout(),o=t.links.filter((function(e){return e.type===F||e.type===U})).map((function(e){return{v:e.srcNodeId,w:e.trgNodeId,value:{points:[]}}})),a=t.nodes.map((function(o){var a=o.width;return e===je&&(a=o.width+Math.max(n.getPaddingForNode(o,i,t),i.autoLayoutHorizontalSpacing)),{v:o.id,value:{width:a,height:o.height}}})),r={};["TB","BT","LR","RL"].indexOf(e)>=0&&(r={rankDir:e});var s={nodes:a,edges:o,value:r},l=i.autoLayoutInitialMarginX,c=i.autoLayoutInitialMarginY,d=i.autoLayoutVerticalSpacing,u=i.autoLayoutHorizontalSpacing;e===je&&(u=0);var p=jd.graphlib.json.read(s);p.graph().marginx=l,p.graph().marginy=c,"TB"===e?(p.graph().nodesep=u,p.graph().ranksep=d):(p.graph().nodesep=d,p.graph().ranksep=u),jd.layout(p);var h=jd.graphlib.json.write(p);return this.convertGraphToMovedNodes(h,t.nodes)}},{key:"convertGraphToMovedNodes",value:function(e,t){for(var n=[],i={},o=0,a=e.nodes.length;o<a;o++)i[e.nodes[o].v]=e.nodes[o];return t.forEach((function(e){n[e.id]={id:e.id,x_pos:i[e.id].value.x-i[e.id].value.width/2,y_pos:i[e.id].value.y-i[e.id].value.height/2,width:e.width,height:e.height}})),n}},{key:"getPaddingForNode",value:function(e,t,n){return cl.getNodePaddingToTargetNodes(e,n.nodes,n.links,t.linkType)}},{key:"getBoundingRectForNodes",value:function(e){var t=e[0].x_pos,n=e[0].y_pos,i=e[0].width+t,o=e[0].height+n;return e.forEach((function(e){t=Math.min(t,e.x_pos),n=Math.min(n,e.y_pos),i=Math.max(i,e.x_pos+e.width),o=Math.max(o,e.y_pos+e.height)})),{x:t,y:n,width:i-t,height:o-n}}},{key:"ensureDecorationsHaveIds",value:function(e){var t=this;return e?e.map((function(e){return Object.assign({},e,{id:e.id||t.objectModel.getUUID()})})):e}},{key:"createComment",value:function(e){var t=this,n={id:this.objectModel.getUniqueId(Ae),class_name:"d3-comment-rect",content:"",height:42,width:175,x_pos:e.mousePos.x,y_pos:e.mousePos.y,linkIds:[],selectedObjectIds:[]};return n=this.objectModel.setCommentAttributes(n),e.selectedObjectIds.forEach((function(e){t.isDataNode(e)&&(n.selectedObjectIds.push(e),n.linkIds.push(t.objectModel.getUniqueId(Me,{comment:n,targetNode:t.getNode(e)})))})),n}},{key:"addComment",value:function(e){void 0===e.selectedObjectIds&&(e.selectedObjectIds=[]),this.store.dispatch({type:"ADD_COMMENT",data:e,pipelineId:this.pipelineId})}},{key:"getNewCommentPosition",value:function(e){for(var t={x_pos:e.x_pos,y_pos:e.y_pos};this.exactlyOverlaps(null,[t],null);)t.x_pos+=10,t.y_pos+=10;return t}},{key:"deleteComment",value:function(e){var t=this.getComment(e);t&&this.deleteComments([t])}},{key:"deleteComments",value:function(e){var t=this;e&&e.length>0&&this.objectModel.executeWithSelectionChange((function(e){t.deleteCommentsInternal(e)}),e)}},{key:"deleteCommentsInternal",value:function(e){var t=this;e.forEach((function(e){t.store.dispatch({type:"DELETE_OBJECT",data:{id:e.id},pipelineId:t.pipelineId})}))}},{key:"getComments",value:function(){var e=this.objectModel.getCanvasInfoPipeline(this.pipelineId);return e?e.comments:[]}},{key:"getComment",value:function(e){return this.getComments().find((function(t){return t.id===e}))}},{key:"editComment",value:function(e){this.store.dispatch({type:"EDIT_COMMENT",data:e,pipelineId:this.pipelineId})}},{key:"addCustomAttrToComments",value:function(e,t,n){this.store.dispatch({type:"ADD_COMMENT_ATTR",data:{objIds:e,attrName:t,attrValue:n},pipelineId:this.pipelineId})}},{key:"removeCustomAttrFromComments",value:function(e,t){this.store.dispatch({type:"REMOVE_COMMENT_ATTR",data:{objIds:e,attrName:t},pipelineId:this.pipelineId})}},{key:"getCommentClassName",value:function(e){var t=this.getComment(e);return t?t.class_name:null}},{key:"getCommentStyle",value:function(e,t){var n=this.getComment(e);return t?n?n.style_temp:null:n?n.style:null}},{key:"createLink",value:function(e,t){var n={id:this.objectModel.getUniqueId(Re,{sourceNode:t,targetNode:e}),srcNodeId:t.id,trgNodeId:e.id,type:F};return t.outputs&&t.outputs.length>0&&(n=Object.assign(n,{srcNodePortId:t.outputs[0].id})),e.inputs&&e.inputs.length>0&&(n=Object.assign(n,{trgNodePortId:e.inputs[0].id})),n}},{key:"createLinkFromInfo",value:function(e){var t=this.objectModel.getUniqueId(Re,{sourceNodeId:e.srcNodeId,targetNodeId:e.trgNodeId});return Object.assign({id:t,type:F},e)}},{key:"deleteLink",value:function(e){this.store.dispatch({type:"DELETE_LINK",data:e,pipelineId:this.pipelineId})}},{key:"deleteLinks",value:function(e){this.store.dispatch({type:"DELETE_LINKS",data:{linksToDelete:e},pipelineId:this.pipelineId})}},{key:"updateLinks",value:function(e){this.store.dispatch({type:"UPDATE_LINKS",data:{linksToUpdate:e},pipelineId:this.pipelineId})}},{key:"updateLink",value:function(e){this.updateLinks([e])}},{key:"createNodeLinks",value:function(e){var t=this,n=[];return e.nodes.forEach((function(i){e.targetNodes.forEach((function(o){var a=t.createNodeLink(i,o,e);a&&n.push(a)}))})),n}},{key:"createNodeLink",value:function(e,t,n){var i=this.getNode(e.id),o=this.getNode(t.id),a=this.getLinks();if(cl.isConnectionAllowed(e.portId,t.portId,i,o,a,n.type)){var r={};return r.id=n.id?n.id:this.objectModel.getUniqueId(Re,{sourceNode:this.getNode(e.id),targetNode:this.getNode(t.id)}),r.type=n.type,r.srcNodeId=e.id,r.srcNodePortId=e.portId,r.trgNodeId=t.id,r.trgNodePortId=t.portId,n.class_name&&(r.class_name=n.class_name),n.linkName&&(r.linkName=n.linkName),r}return null}},{key:"createNodeLinkDetached",value:function(e){var t={};return t.id=e.id?e.id:this.objectModel.getUniqueId(Re,{sourceNode:this.getNode(e.srcNodeId)}),t.type=e.type,t.srcNodeId=e.srcNodeId,t.srcNodePortId=e.srcNodePortId,t.trgPos={x_pos:e.trgPos.x,y_pos:e.trgPos.y},e.class_name&&(t.class_name=e.class_name),e.linkName&&(t.linkName=e.linkName),e.typeAttr&&(t.typeAttr=e.typeAttr),e.description&&(t.description=e.description),t}},{key:"createCommentLinks",value:function(e){var t=this,n=[];return e.nodes.forEach((function(i){e.targetNodes.forEach((function(o){if(cl.isCommentLinkConnectionAllowed(i,o,t.getLinks())){var a={};a.id=t.objectModel.getUniqueId(Me,{comment:t.getComment(i),targetNode:t.getNode(o)}),a.type=e.type,a.srcNodeId=i,a.trgNodeId=o,n.push(a)}}))})),n}},{key:"addLinks",value:function(e){var t=this;e.forEach((function(e){t.addLink(e)}))}},{key:"addLink",value:function(e){this.store.dispatch({type:"ADD_LINK",data:e,pipelineId:this.pipelineId})}},{key:"getLinks",value:function(){var e=this.objectModel.getCanvasInfoPipeline(this.pipelineId);return e?e.links:[]}},{key:"getLinkIds",value:function(){var e=this.objectModel.getCanvasInfoPipeline(this.pipelineId);return e?e.links.map((function(e){return e.id})):[]}},{key:"getLinksBetween",value:function(e,t){var n=this;return this.getLinks().filter((function(i){return!(!n.isObjectIdInObjects(i.trgNodeId,e)||!n.isObjectIdInObjects(i.srcNodeId,e)&&!n.isObjectIdInObjects(i.srcNodeId,t))}))}},{key:"getLinksContainingId",value:function(e){return this.getLinks().filter((function(t){return t.srcNodeId===e||t.trgNodeId===e})).map((function(e){return Object.assign({},e)}))}},{key:"getLinksContainingIds",value:function(e){var t=this,n=[];return e.forEach((function(e){var i=t.getLinksContainingId(e);i.length>0&&(n=cl.concatUniqueBasedOnId(i,n))})),n}},{key:"getNodeDataLinksContainingIds",value:function(e){return this.getLinksContainingIds(e).filter((function(e){return e.type===F}))}},{key:"getLinksContainingSourceId",value:function(e){return this.getLinks().filter((function(t){return t.srcNodeId===e}))}},{key:"getLinksContainingTargetId",value:function(e){return this.getLinks().filter((function(t){return t.trgNodeId===e}))}},{key:"getAttachedLinksContainingSourceId",value:function(e){return this.getLinks().filter((function(t){return t.srcNodeId===e&&t.trgNodeId}))}},{key:"getAttachedLinksContainingTargetId",value:function(e){return this.getLinks().filter((function(t){return t.trgNodeId===e&&t.srcNodeId}))}},{key:"getNodeLinks",value:function(e){var t=this,n=[];return e.forEach((function(e){t.getLinksContainingId(e.id).forEach((function(e){e.type!==F&&e.type!==U||n.push(e)}))})),n}},{key:"getNodeDataLinks",value:function(){return this.getLinks().filter((function(e){return e.type===F}))}},{key:"getNodeDataLinkFromInfo",value:function(e,t,n,i){var o=this,a=this.getDefaultSrcPortId(e,t),r=this.getDefaultTrgPortId(n,i);return a&&r?this.getLinks().find((function(t){if(t.type===F){var i=o.getDefaultSrcPortId(t.srcNodeId,t.srcNodePortId),s=o.getDefaultTrgPortId(t.trgNodeId,t.trgNodePortId);return t.srcNodeId===e&&i===a&&t.trgNodeId===n&&s===r}return!1})):null}},{key:"getCommentLinkFromInfo",value:function(e,t){return this.getLinks().find((function(n){return n.type===B&&(n.srcNodeId===e&&n.trgNodeId===t||n.srcNodeId===t&&n.trgNodeId===e)}))}},{key:"setCommentProperties",value:function(e,t){this.store.dispatch({type:"SET_COMMENT_PROPERTIES",data:{commentId:e,commentProperties:t},pipelineId:this.pipelineId})}},{key:"getNodeAssocLinkFromInfo",value:function(e,t){return this.getLinks().find((function(n){return n.type===U&&(n.srcNodeId===e&&n.trgNodeId===t||n.srcNodeId===t&&n.trgNodeId===e)}))}},{key:"getDefaultSrcPortId",value:function(e,t){if(!t){var n=this.getNode(e);if(n&&n.outputs&&n.outputs.length>0)return n.outputs[0].id}return t}},{key:"getDefaultTrgPortId",value:function(e,t){if(!t){var n=this.getNode(e);if(n&&n.inputs&&n.inputs.length>0)return n.inputs[0].id}return t}},{key:"getLink",value:function(e){return this.getLinks().find((function(t){return t.id===e}))}},{key:"setLinkProperties",value:function(e,t){this.store.dispatch({type:"SET_LINK_PROPERTIES",data:{linkId:e,linkProperties:t},pipelineId:this.pipelineId})}},{key:"setNodeDataLinkSrcInfo",value:function(e,t,n){this.store.dispatch({type:"SET_LINK_SRC_INFO",data:{linkId:e,srcNodeId:t,srcNodePortId:n},pipelineId:this.pipelineId})}},{key:"setNodeDataLinkTrgInfo",value:function(e,t,n){this.store.dispatch({type:"SET_LINK_TRG_INFO",data:{linkId:e,trgNodeId:t,trgNodePortId:n},pipelineId:this.pipelineId})}},{key:"getLinkClassName",value:function(e){var t=this.getLink(e);return t&&t.class_name?t.class_name:null}},{key:"getLinkStyle",value:function(e,t){var n=this.getLink(e);return t?n&&n.style_temp?n.style_temp:null:n&&n.style?n.style:null}},{key:"setLinksClassName",value:function(e,t){this.store.dispatch({type:"SET_LINKS_CLASS_NAME",data:{linkIds:e,newClassName:t},pipelineId:this.pipelineId})}},{key:"setLinkDecorations",value:function(e,t){this.store.dispatch({type:"SET_LINK_DECORATIONS",data:{linkId:e,decorations:this.ensureDecorationsHaveIds(t)},pipelineId:this.pipelineId})}},{key:"getLinkDecorations",value:function(e){var t=this.getLink(e);return t?t.decorations:null}},{key:"isCommentLinkedToNonSelectedNodes",value:function(e){var t,n=this.getLinksContainingId(e),i=this.objectModel.getSelectedObjectIds(),o=!1,a=Ad(n);try{for(a.s();!(t=a.n()).done;){var r=t.value;if(o=!i.includes(r.trgNodeId))return o}}catch(e){a.e(e)}finally{a.f()}return o}},{key:"pushUniqueLinks",value:function(e,t){return-1===t.findIndex((function(t){return t.id===e.id}))&&t.push(e),t}}]),n}(),Ud=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return"SET_TOOLTIP_DEF"===t.type&&t.data.tooltipDef?t.data.tooltipDef:e},Fd=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"ADD_NODE_TYPES_TO_PALETTE":return t.data.nodeTypes?[].concat(tt(e),tt(t.data.nodeTypes)):e;case"REMOVE_NODE_TYPES_FROM_PALETTE":return e.filter((function(e){return-1===t.data.selObjectIds.findIndex((function(t){return t===e.id}))}));default:return e}},zd=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"ADD_NODE_TYPES_TO_PALETTE":var n=e.find((function(e){return e.id===t.data.categoryId}));return n?e.map((function(e){return t.data.categoryId===e.id?Object.assign({},e,{node_types:Fd(e.node_types,t)}):e})):(n={id:t.data.categoryId,label:t.data.categoryLabel?t.data.categoryLabel:t.data.categoryId},t.data.categoryDescription&&(n.description=t.data.categoryDescription),t.data.categoryImage&&(n.image=t.data.categoryImage),n.node_types=[],[].concat(tt(e),[Object.assign({},n,{node_types:Fd(n.node_types,t)})]));case"REMOVE_NODE_TYPES_FROM_PALETTE":return e.map((function(e){return e.id===t.data.categoryId?Object.assign({},e,{node_types:Fd(e.node_types,t)}):e}));case"SET_CATEGORY_LOADING_TEXT":return e.map((function(e){return e.id===t.data.categoryId?Object.assign({},e,{loading_text:t.data.loadingText}):e}));case"SET_CATEGORY_EMPTY_TEXT":return e.map((function(e){return e.id===t.data.categoryId?Object.assign({},e,{empty_text:t.data.emptyText}):e}));default:return e}},Bd=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"CLEAR_PALETTE_DATA":return{content:{}};case"SET_PALETTE_DATA":var n=Object.assign({},t.data.content);return Object.assign({},e,{content:n});case"ADD_NODE_TYPES_TO_PALETTE":case"REMOVE_NODE_TYPES_FROM_PALETTE":case"SET_CATEGORY_LOADING_TEXT":case"SET_CATEGORY_EMPTY_TEXT":var i=Object.assign({},e.content,{categories:zd(e.content.categories,t)});return Object.assign({},e,{content:i,version:"3.0"});case"SET_PALETTE_OPEN_STATE":return Object.assign({},e,{isOpen:t.data.isOpen});default:return e}},Hd=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_INPUT_PORT_LABEL":case"SET_OUTPUT_PORT_LABEL":return e.map((function(e,n){if(t.data.portId===e.id){var i=Object.assign({},e);return i.label=t.data.label,i}return e}));case"SET_INPUT_PORT_SUBFLOW_NODE_REF":case"SET_OUTPUT_PORT_SUBFLOW_NODE_REF":return e.map((function(e,n){if(t.data.portId===e.id){var i=Object.assign({},e);return i.subflow_node_ref=t.data.subflowNodeRef,i}return e}));default:return e}},Gd=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"ADD_NODE":return[].concat(tt(e),[Object.assign({},t.data.newNode)]);case"ADD_NODES":return[].concat(tt(e),tt(t.data.nodesToAdd));case"REPLACE_NODES":return t.data;case"REPLACE_NODE":return e.map((function(e,n){return t.data.node.id===e.id?t.data.node:e}));case"MOVE_OBJECTS":return t.data.nodes?e.map((function(e,n){if(t.data.nodes.indexOf(e.id)>-1){var i=e.x_pos+t.data.offsetX,o=e.y_pos+t.data.offsetY;return Object.assign({},e,{x_pos:i,y_pos:o})}return e})):e;case"SIZE_AND_POSITION_OBJECTS":return e.map((function(e,n){var i=t.data.objectsInfo[e.id];if(void 0!==i){var o=Object.assign({},e,{height:i.height,width:i.width,x_pos:i.x_pos,y_pos:i.y_pos});return o.type===G&&o.is_expanded&&(o.expanded_width=i.width,o.expanded_height=i.height),o}return e}));case"SET_NODE_POSITIONS":return e.map((function(e,n){if(t.data.nodePositions&&void 0!==t.data.nodePositions[e.id]){var i=t.data.nodePositions[e.id];return Object.assign({},e,{x_pos:i.x_pos,y_pos:i.y_pos})}return e}));case"ADD_SUPERNODES":return[].concat(tt(e),tt(t.data.supernodesToAdd));case"DELETE_SUPERNODES":return e.filter((function(e){return!t.data.supernodesToDelete.some((function(t){return t.id===e.id}))}));case"DELETE_OBJECT":return e.filter((function(e){return e.id!==t.data.id}));case"DELETE_NODES":return e.filter((function(e){return!t.data.nodesToDelete.some((function(t){return t.id===e.id}))}));case"SET_NODE_PROPERTIES":return e.map((function(e,n){return t.data.nodeId===e.id?Object.assign({},e,t.data.properties):e}));case"SET_NODE_PARAMETERS":return e.map((function(e,n){if(t.data.nodeId===e.id){var i=Object.assign({},e);return i.parameters=t.data.parameters,i}return e}));case"SET_NODE_UI_PARAMETERS":return e.map((function(e,n){if(t.data.nodeId===e.id){var i=Object.assign({},e);return i.ui_parameters=t.data.ui_parameters,i}return e}));case"SET_NODE_MESSAGE":return e.map((function(e,n){if(t.data.nodeId===e.id){var i=Object.assign({},e);if(i.messages){var o=i.messages.findIndex((function(e){return e.id_ref===t.data.message.id_ref}));o>-1?i.messages[o]=t.data.message:i.messages.push(t.data.message)}else i.messages=[t.data.message];return i}return e}));case"SET_NODE_MESSAGES":return e.map((function(e,n){if(t.data.nodeId===e.id){var i=Object.assign({},e);return i.messages=t.data.messages,i}return e}));case"ADD_NODE_ATTR":return e.map((function(e,n){if(t.data.objIds.indexOf(e.id)>-1){var i=Object.assign({},e);return i.customAttrs=i.customAttrs||[],i.customAttrs.push(t.data.attrName),i}return e}));case"REMOVE_NODE_ATTR":return e.map((function(e,n){if(t.data.objIds.indexOf(e.id)>-1){var i=Object.assign({},e);return i.customAttrs&&(i.customAttrs=i.customAttrs.filter((function(e){return e!==t.data.attrName}))),i}return e}));case"SET_NODE_LABEL":return e.map((function(e,n){if(t.data.nodeId===e.id){var i=Object.assign({},e);return i.label=t.data.label,i}return e}));case"SET_NODE_DECORATIONS":return e.map((function(e,n){if(t.data.nodeId===e.id){var i=Object.assign({},e);return i.decorations=t.data.decorations,i}return e}));case"SET_NODES_MULTI_DECORATIONS":return e.map((function(e){var n=t.data.pipelineNodeDecorations.find((function(n){return n.pipelineId===t.data.pipelineId&&n.nodeId===e.id}));return n?Object.assign({},e,{decorations:n.decorations}):e}));case"SET_OBJECTS_CLASS_NAME":return e.map((function(e){var n=t.data.objIds.indexOf(e.id);if(n>-1){var i=Object.assign({},e);return i.class_name=Array.isArray(t.data.newClassName)?t.data.newClassName[n]||null:t.data.newClassName,i}return e}));case"SET_OBJECTS_STYLE":return e.map((function(e){if(t.data.objIds.indexOf(e.id)>-1){var n=Object.assign({},e);return t.data.temporary?n.style_temp=t.data.newStyle:n.style=t.data.newStyle,n}return e}));case"SET_OBJECTS_MULTI_STYLE":return e.map((function(e){var n=t.data.pipelineObjStyles.find((function(n){return n.pipelineId===t.data.pipelineId&&n.objId===e.id}));if(n){var i=Object.assign({},e),o=n&&n.style?n.style:null;return t.data.temporary?i.style_temp=o:i.style=o,i}return e}));case"REMOVE_ALL_STYLES":return e.map((function(e){if(t.data.temporary&&e.style_temp){var n=Object.assign({},e);return delete n.style_temp,n}if(!t.data.temporary&&e.style){var i=Object.assign({},e);return delete i.style,i}return e}));case"SET_INPUT_PORT_LABEL":case"SET_INPUT_PORT_SUBFLOW_NODE_REF":return e.map((function(e,n){return t.data.nodeId===e.id?Object.assign({},e,{inputs:Hd(e.inputs,t)}):e}));case"SET_OUTPUT_PORT_LABEL":case"SET_OUTPUT_PORT_SUBFLOW_NODE_REF":return e.map((function(e,n){return t.data.nodeId===e.id?Object.assign({},e,{outputs:Hd(e.outputs,t)}):e}));case"SET_SUPERNODE_EXPAND_STATE":return e.map((function(e){return t.data.node.id===e.id?t.data.node:e}));case"REPLACE_SN_AND_PIPELINES":return e.map((function(e,n){return e.id===t.data.topSupernode.id?Object.assign({},t.data.topSupernode):e}));default:return e}},qd=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"MOVE_OBJECTS":return t.data.nodes?e.map((function(e,n){if(t.data.nodes.indexOf(e.id)>-1){var i=e.x_pos+t.data.offsetX,o=e.y_pos+t.data.offsetY;return Object.assign({},e,{x_pos:i,y_pos:o})}return e})):e;case"SET_COMMENT_POSITIONS":return e.map((function(e,n){if(t.data.commentPositions&&void 0!==t.data.commentPositions[e.id]){var i=t.data.commentPositions[e.id];return Object.assign({},e,{x_pos:i.x_pos,y_pos:i.y_pos})}return e}));case"DELETE_OBJECT":return e.filter((function(e){return e.id!==t.data.id}));case"DELETE_COMMENTS":return e.filter((function(e){return!t.data.commentsToDelete.some((function(t){return t.id===e.id}))}));case"ADD_COMMENT":var n={id:t.data.id,class_name:t.data.class_name,content:t.data.content,height:t.data.height,width:t.data.width,x_pos:t.data.x_pos,y_pos:t.data.y_pos};return[].concat(tt(e),[n]);case"ADD_COMMENTS":return[].concat(tt(e),tt(t.data.commentsToAdd));case"EDIT_COMMENT":return e.map((function(e,n){return t.data.id===e.id?Object.assign({},e,{content:t.data.content,height:t.data.height,width:t.data.width,x_pos:t.data.x_pos?t.data.x_pos:e.x_pos,y_pos:t.data.y_pos?t.data.y_pos:e.y_pos}):e}));case"SET_COMMENT_PROPERTIES":return e.map((function(e){return e.id===t.data.commentId?Object.assign({},e,t.data.commentProperties):e}));case"SIZE_AND_POSITION_OBJECTS":return e.map((function(e,n){var i=t.data.objectsInfo[e.id];return void 0!==i?Object.assign({},e,{height:i.height,width:i.width,x_pos:i.x_pos,y_pos:i.y_pos}):e}));case"ADD_COMMENT_ATTR":return e.map((function(e,n){if(t.data.objIds.indexOf(e.id)>-1){var i=Object.assign({},e);return i.customAttrs=i.customAttrs||[],i.customAttrs.push(t.data.attrName),i}return e}));case"REMOVE_COMMENT_ATTR":return e.map((function(e,n){if(t.data.objIds.indexOf(e.id)>-1){var i=Object.assign({},e);return i.customAttrs&&(i.customAttrs=i.customAttrs.filter((function(e){return e!==t.data.attrName}))),i}return e}));case"SET_OBJECTS_CLASS_NAME":return e.map((function(e){var n=t.data.objIds.indexOf(e.id);if(n>-1){var i=Object.assign({},e);return i.class_name=Array.isArray(t.data.newClassName)?t.data.newClassName[n]||null:t.data.newClassName,i}return e}));case"SET_OBJECTS_STYLE":return e.map((function(e){if(t.data.objIds.indexOf(e.id)>-1){var n=Object.assign({},e);return t.data.temporary?n.style_temp=t.data.newStyle:n.style=t.data.newStyle,n}return e}));case"SET_OBJECTS_MULTI_STYLE":return e.map((function(e){var n=t.data.pipelineObjStyles.find((function(n){return n.pipelineId===t.data.pipelineId&&n.objId===e.id}));if(n){var i=Object.assign({},e),o=n&&n.style?n.style:null;return t.data.temporary?i.style_temp=o:i.style=o,i}return e}));case"REMOVE_ALL_STYLES":return e.map((function(e){if(t.data.temporary&&e.style_temp){var n=Object.assign({},e);return delete n.style_temp,n}if(!t.data.temporary&&e.style){var i=Object.assign({},e);return delete i.style,i}return e}));default:return e}},Vd=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"DELETE_SUPERNODES":return e.filter((function(e){return!t.data.supernodesToDelete.some((function(t){return e.srcNodeId===t.id||e.trgNodeId===t.id}))}));case"DELETE_OBJECT":return e.filter((function(e){return e.srcNodeId!==t.data.id&&e.trgNodeId!==t.data.id}));case"REMOVE_LINKS":return e.filter((function(e){return!t.data.linksToDelete.some((function(t){return t.id===e.id}))}));case"ADD_LINK":var n={id:t.data.id};return Yd(n,"type",t.data.type),Yd(n,"class_name",t.data.class_name),Yd(n,"srcPos",t.data.srcPos),Yd(n,"srcNodeId",t.data.srcNodeId),Yd(n,"srcNodePortId",t.data.srcNodePortId),Yd(n,"trgPos",t.data.trgPos),Yd(n,"trgNodeId",t.data.trgNodeId),Yd(n,"trgNodePortId",t.data.trgNodePortId),Yd(n,"decorations",t.data.decorations),Yd(n,"style",t.data.style),Yd(n,"style_temp",t.data.style_temp),Yd(n,"linkName",t.data.linkName),Yd(n,"typeAttr",t.data.typeAttr),Yd(n,"description",t.data.description),Yd(n,"app_data",t.data.app_data),[].concat(tt(e),[n]);case"ADD_LINKS":return[].concat(tt(e),tt(t.data.linksToAdd));case"MOVE_OBJECTS":return e.map((function(e){if(t.data.links&&t.data.links.findIndex((function(t){return t.id===e.id}))>-1){var n=Object.assign({},e);n.srcPos&&(n.srcPos.x_pos+=t.data.offsetX,n.srcPos.y_pos+=t.data.offsetY),n.trgPos&&(n.trgPos.x_pos+=t.data.offsetX,n.trgPos.y_pos+=t.data.offsetY)}return e}));case"SET_LINK_POSITIONS":return e.map((function(e,n){if(t.data.linkPositions&&void 0!==t.data.linkPositions[e.id]){var i=Object.assign({},e);return t.data.linkPositions[e.id].srcPos&&(i=Object.assign(i,{srcPos:t.data.linkPositions[e.id].srcPos})),t.data.linkPositions[e.id].trgPos&&(i=Object.assign(i,{trgPos:t.data.linkPositions[e.id].trgPos})),i}return e}));case"SIZE_AND_POSITION_OBJECTS":return e.map((function(e,n){if(t.data.linksInfo&&void 0!==t.data.linksInfo[e.id]){var i=Object.assign({},e);return t.data.linksInfo[e.id].srcPos&&(i=Object.assign(i,{srcPos:t.data.linksInfo[e.id].srcPos})),t.data.linksInfo[e.id].trgPos&&(i=Object.assign(i,{trgPos:t.data.linksInfo[e.id].trgPos})),i}return e}));case"SET_LINK_PROPERTIES":return e.map((function(e){return e.id===t.data.linkId?Object.assign({},e,t.data.linkProperties):e}));case"SET_LINK_SRC_INFO":return e.map((function(e){if(e.id===t.data.linkId){var n=Object.assign({},e);return delete n.srcNodeId,delete n.srcNodePortId,delete n.srcPos,n.srcNodeId=t.data.srcNodeId,t.data.srcNodePortId&&(n.srcNodePortId=t.data.srcNodePortId),n}return e}));case"SET_LINK_TRG_INFO":return e.map((function(e){if(e.id===t.data.linkId){var n=Object.assign({},e);return delete n.trgNodeId,delete n.trgNodePortId,delete n.trgPos,n.trgNodeId=t.data.trgNodeId,t.data.trgNodePortId&&(n.trgNodePortId=t.data.trgNodePortId),n}return e}));case"DELETE_LINK":return e.filter((function(e){return e.id!==t.data.id}));case"DELETE_LINKS":return e.filter((function(e){return-1===t.data.linksToDelete.findIndex((function(t){return e.id===t.id}))}));case"UPDATE_LINKS":return t.data.linksToUpdate?e.map((function(e){var n=t.data.linksToUpdate.find((function(t){return t.id===e.id}));if(n){var i=Object.assign({},e,n);return n.srcPos?(delete i.srcNodeId,delete i.srcNodePortId):n.srcNodeId&&delete i.srcPos,n.trgPos?(delete i.trgNodeId,delete i.trgNodePortId):n.trgNodeId&&delete i.trgPos,i}return e})):e;case"SET_LINKS_CLASS_NAME":return e.map((function(e){var n=t.data.linkIds.indexOf(e.id);if(n>-1){var i=Object.assign({},e);return i.class_name=Array.isArray(t.data.newClassName)?t.data.newClassName[n]:t.data.newClassName,i}return e}));case"SET_LINKS_STYLE":return e.map((function(e){if(t.data.objIds.indexOf(e.id)>-1){var n=Object.assign({},e);return t.data.temporary?n.style_temp=t.data.newStyle:n.style=t.data.newStyle,n}return e}));case"SET_LINKS_MULTI_STYLE":return e.map((function(e){var n=t.data.pipelineObjStyles.find((function(n){return n.pipelineId===t.data.pipelineId&&n.objId===e.id}));if(n){var i=Object.assign({},e),o=n&&n.style?n.style:null;return t.data.temporary?i.style_temp=o:i.style=o,i}return e}));case"SET_LINK_DECORATIONS":return e.map((function(e,n){if(t.data.linkId===e.id){var i=Object.assign({},e);return i.decorations=t.data.decorations,i}return e}));case"SET_LINKS_MULTI_DECORATIONS":return e.map((function(e){var n=t.data.pipelineLinkDecorations.find((function(n){return n.pipelineId===t.data.pipelineId&&n.linkId===e.id}));return n?Object.assign({},e,{decorations:n.decorations}):e}));case"REMOVE_ALL_STYLES":return e.map((function(e){if(t.data.temporary&&e.style_temp){var n=Object.assign({},e);return delete n.style_temp,n}if(!t.data.temporary&&e.style){var i=Object.assign({},e);return delete i.style,i}return e}));case"ADD_COMMENT":var i=[];return t.data.selectedObjectIds.forEach((function(e,n){i.push({id:t.data.linkIds[n],srcNodeId:t.data.id,trgNodeId:t.data.selectedObjectIds[n],type:B})})),[].concat(tt(e),i);default:return e}};function Yd(e,t,n){void 0!==n&&(e[t]=n)}var Wd=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_CANVAS_INFO":return t.canvasInfo?Object.assign({},t.canvasInfo):e;case"SET_CANVAS_CONFIG_INFO":case"REPLACE_PIPELINES":return Object.assign({},e,{pipelines:t.data.pipelines});case"ADD_EXTERNAL_PIPELINE_FLOW":var n=t.newPipelines.map((function(e){return Object.assign({},e)})),i=e.pipelines.concat(n);return Object.assign({},e,{pipelines:i});case"REMOVE_EXTERNAL_PIPELINE_FLOW":var o=e.pipelines.filter((function(e){return!e.parentUrl||e.parentUrl!==t.externalUrl}));return Object.assign({},e,{pipelines:o});case"REPLACE_SN_AND_PIPELINES":var a=e.pipelines.filter((function(e){return!t.data.pipelinesToRemove.some((function(t){return t.id===e.id}))}));return a=(a=a.map((function(e){return e.id===t.data.pipelineId?Object.assign({},e,{nodes:Gd(e.nodes,t)}):e}))).concat(t.data.pipelinesToAdd),Object.assign({},e,{pipelines:a});case"SET_PIPELINE_PARENT_URL":var r=e.pipelines.map((function(e){if(t.data.pipelines.some((function(t){return t.id===e.id}))){var n=Object.assign({},e);return t.data.url?n.parentUrl=t.data.url:delete n.parentUrl,n}return e}));return Object.assign({},e,{pipelines:r});case"DELETE_PIPELINE":var s=e.pipelines.filter((function(e){return e.id!==t.data.id}));return Object.assign({},e,{pipelines:s});case"SET_PIPELINE_ZOOM":var l=e.pipelines.map((function(e){return e.id===t.pipelineId?Object.assign({},e,{zoom:{k:t.data.zoom.k,x:t.data.zoom.x,y:t.data.zoom.y}}):e}));return Object.assign({},e,{pipelines:l});case"ADD_SUPERNODES":var c=[].concat(tt(e.pipelines),tt(t.data.pipelinesToAdd));return c=c.map((function(e){return e.id===t.data.pipelineId?Object.assign({},e,{nodes:Gd(e.nodes,t)}):e})),Object.assign({},e,{pipelines:c});case"DELETE_SUPERNODES":var d=e.pipelines.filter((function(e){return!t.data.pipelinesToDelete.some((function(t){return t.id===e.id}))}));return d=d.map((function(e){return e.id===t.data.pipelineId?Object.assign({},e,{nodes:Gd(e.nodes,t),links:Vd(e.links,t)}):e})),Object.assign({},e,{pipelines:d});case"SET_SUBDUE_STYLE":return Object.assign({},e,{subdueStyle:t.data.subdueStyle});case"ADD_NODE":case"REPLACE_NODES":case"REPLACE_NODE":case"SIZE_AND_POSITION_OBJECTS":case"SET_NODE_PROPERTIES":case"SET_NODE_PARAMETERS":case"SET_NODE_UI_PARAMETERS":case"SET_NODE_MESSAGE":case"SET_NODE_MESSAGES":case"SET_NODE_DECORATIONS":case"SET_LINK_DECORATIONS":case"ADD_NODE_ATTR":case"REMOVE_NODE_ATTR":case"SET_NODE_LABEL":case"SET_OBJECTS_CLASS_NAME":case"SET_INPUT_PORT_LABEL":case"SET_OUTPUT_PORT_LABEL":case"SET_INPUT_PORT_SUBFLOW_NODE_REF":case"SET_OUTPUT_PORT_SUBFLOW_NODE_REF":case"MOVE_OBJECTS":case"DELETE_OBJECT":case"ADD_LINK":case"SET_LINK_PROPERTIES":case"SET_LINK_SRC_INFO":case"SET_LINK_TRG_INFO":case"SET_LINKS_CLASS_NAME":case"DELETE_LINK":case"DELETE_LINKS":case"UPDATE_LINKS":case"ADD_COMMENT":case"EDIT_COMMENT":case"SET_COMMENT_PROPERTIES":case"ADD_COMMENT_ATTR":case"REMOVE_COMMENT_ATTR":var u=e.pipelines.map((function(e){return e.id===t.pipelineId?Object.assign({},e,{nodes:Gd(e.nodes,t),comments:qd(e.comments,t),links:Vd(e.links,t)}):e}));return Object.assign({},e,{pipelines:u});case"DELETE_AND_UPDATE_OBJECTS":var p=e.pipelines.map((function(e){if(e.id===t.pipelineId){var n=Vd(e.links,{type:"UPDATE_LINKS",data:{linksToUpdate:t.data.linksToUpdate||[]}});n=Vd(n,{type:"DELETE_LINKS",data:{linksToDelete:t.data.linksToDelete||[]}});var i=Gd(e.nodes,{type:"DELETE_SUPERNODES",data:{supernodesToDelete:t.data.supernodesToDelete||[]}});n=Vd(n,{type:"DELETE_SUPERNODES",data:{supernodesToDelete:t.data.supernodesToDelete||[]}}),i=Gd(i,{type:"DELETE_NODES",data:{nodesToDelete:t.data.nodesToDelete||[]}});var o=qd(e.comments,{type:"DELETE_COMMENTS",data:{commentsToDelete:t.data.commentsToDelete||[]}});return Object.assign({},e,{nodes:i,comments:o,links:n})}return e}));return p=p.filter((function(e){return!t.data.pipelinesToDelete.some((function(t){return t.id===e.id}))})),Object.assign({},e,{pipelines:p});case"ADD_AND_UPDATE_OBJECTS":var h=e.pipelines.map((function(e){if(e.id===t.pipelineId){var n=Gd(e.nodes,{type:"ADD_SUPERNODES",data:{supernodesToAdd:t.data.supernodesToAdd||[]}});n=Gd(n,{type:"ADD_NODES",data:{nodesToAdd:t.data.nodesToAdd||[]}});var i=qd(e.comments,{type:"ADD_COMMENTS",data:{commentsToAdd:t.data.commentsToAdd||[]}}),o=Vd(e.links,{type:"ADD_LINKS",data:{linksToAdd:t.data.linksToAdd||[]}});return o=Vd(o,{type:"UPDATE_LINKS",data:{linksToUpdate:t.data.linksToUpdate||[]}}),Object.assign({},e,{nodes:n,comments:i,links:o})}return e}));return h=[].concat(tt(h),tt(t.data.pipelinesToAdd)),Object.assign({},e,{pipelines:h});case"SET_SUPERNODE_EXPAND_STATE":var f=e.pipelines.map((function(e){if(e.id===t.pipelineId){var n=Gd(e.nodes,{type:"SET_SUPERNODE_EXPAND_STATE",data:t.data});n=Gd(n,{type:"SET_NODE_POSITIONS",data:{nodePositions:t.data.objectPositions}});var i=qd(e.comments,{type:"SET_COMMENT_POSITIONS",data:{commentPositions:t.data.objectPositions}}),o=Vd(e.links,{type:"SET_LINK_POSITIONS",data:t.data});return Object.assign({},e,{nodes:n,comments:i,links:o})}return e}));return Object.assign({},e,{pipelines:f});case"DECONSTRUCT_SUPERNODE":var g=e.pipelines.filter((function(e){return e.id!==t.data.pipelineToDelete.id})).map((function(e){if(e.id===t.data.pipelineId){var n=Gd(e.nodes,{type:"ADD_NODES",data:t.data}),i=qd(e.comments,{type:"ADD_COMMENTS",data:t.data}),o=Vd(e.links,{type:"ADD_LINKS",data:t.data});return n=Gd(n,{type:"DELETE_SUPERNODES",data:{supernodesToDelete:[t.data.supernodeToDelete]}}),o=Vd(o,{type:"DELETE_SUPERNODES",data:{supernodesToDelete:[t.data.supernodeToDelete]}}),n=Gd(n,{type:"SET_NODE_POSITIONS",data:{nodePositions:t.data.newObjectPositions}}),i=qd(i,{type:"SET_COMMENT_POSITIONS",data:{commentPositions:t.data.newObjectPositions}}),o=Vd(o,{type:"SET_LINK_POSITIONS",data:{linkPositions:t.data.newLinkPositions}}),Object.assign({},e,{nodes:n,comments:i,links:o})}return e}));return Object.assign({},e,{pipelines:g});case"RECONSTRUCT_SUPERNODE":var y=[].concat(tt(e.pipelines),[t.data.pipelineToDelete]);return y=y.map((function(e){if(e.id===t.data.pipelineId){var n=Gd(e.nodes,{type:"DELETE_NODES",data:{nodesToDelete:t.data.nodesToAdd}}),i=qd(e.comments,{type:"DELETE_COMMENTS",data:{commentsToDelete:t.data.commentsToAdd}}),o=Vd(e.links,{type:"REMOVE_LINKS",data:{linksToDelete:t.data.linksToAdd}});return n=Gd(n,{type:"ADD_SUPERNODES",data:{supernodesToAdd:[t.data.supernodeToDelete]}}),o=Vd(o,{type:"ADD_LINKS",data:{linksToAdd:t.data.linksToRemove}}),n=Gd(n,{type:"SET_NODE_POSITIONS",data:{nodePositions:t.data.oldObjectPositions}}),i=qd(i,{type:"SET_COMMENT_POSITIONS",data:{commentPositions:t.data.oldObjectPositions}}),o=Vd(o,{type:"SET_LINK_POSITIONS",data:{linkPositions:t.data.oldLinkPositions}}),Object.assign({},e,{nodes:n,comments:i,links:o})}return e})),Object.assign({},e,{pipelines:y});case"SET_OBJECTS_STYLE":case"SET_LINKS_STYLE":var v=Object.keys(t.data.pipelineObjIds),m=e.pipelines.map((function(e){return v.indexOf(e.id)>-1?(t.data.objIds=t.data.pipelineObjIds[e.id],t.data.pipelineId=e.id,Object.assign({},e,{nodes:Gd(e.nodes,t),comments:qd(e.comments,t),links:Vd(e.links,t)})):e}));return Object.assign({},e,{pipelines:m});case"SET_OBJECTS_MULTI_STYLE":case"SET_LINKS_MULTI_STYLE":var b=e.pipelines.map((function(e){return t.data.pipelineObjStyles.findIndex((function(t){return t.pipelineId===e.id}))>-1?(t.data.pipelineId=e.id,Object.assign({},e,{nodes:Gd(e.nodes,t),comments:qd(e.comments,t),links:Vd(e.links,t)})):e}));return Object.assign({},e,{pipelines:b});case"SET_NODES_MULTI_DECORATIONS":var _=e.pipelines.map((function(e){return t.data.pipelineNodeDecorations.findIndex((function(t){return t.pipelineId===e.id}))>-1?(t.data.pipelineId=e.id,Object.assign({},e,{nodes:Gd(e.nodes,t),comments:e.comments,links:e.links})):e}));return Object.assign({},e,{pipelines:_});case"SET_LINKS_MULTI_DECORATIONS":var k=e.pipelines.map((function(e){return t.data.pipelineLinkDecorations.findIndex((function(t){return t.pipelineId===e.id}))>-1?(t.data.pipelineId=e.id,Object.assign({},e,{nodes:e.nodes,comments:e.comments,links:Vd(e.links,t)})):e}));return Object.assign({},e,{pipelines:k});case"REMOVE_ALL_STYLES":var P=e.pipelines.map((function(e){return Object.assign({},e,{nodes:Gd(e.nodes,t),comments:qd(e.comments,t),links:Vd(e.links,t)})}));return Object.assign({},e,{pipelines:P});default:return e}},Xd=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;if("SET_CONTEXT_MENU_DEF"===t.type){var n=t.data.menuDef.map((function(e){return Object.assign({},e)}));return Object.assign({},e,{menuDef:n})}return e},$d=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return"SET_RIGHT_FLYOUT_CONFIG"===t.type&&t.data.config?{content:t.data.config.content,isOpen:t.data.config.isOpen}:e},Zd=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return"SET_BOTTOM_PANEL_CONFIG"===t.type&&t.data.config?{content:t.data.config.content,isOpen:t.data.config.isOpen}:e},Kd=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_CANVAS_INFO":return t.canvasInfoIdChanged||!Jd(e,t.canvasInfo)?[{pipelineId:t.canvasInfo.primary_pipeline,pipelineFlowId:t.canvasInfo.id}]:e;case"SET_BREADCRUMBS":return t.data.breadcrumbs.map((function(e){return Object.assign({},e)}));case"ADD_BREADCRUMB":return[].concat(tt(e),[{pipelineId:t.data.pipelineId,supernodeId:t.data.supernodeId,supernodeParentPipelineId:t.data.supernodeParentPipelineId,externalUrl:t.data.externalUrl,label:t.data.label}]);case"ADD_BREADCRUMBS":return[].concat(tt(e),tt(t.data.addBreadcrumbs));case"SET_TO_INDEXED_BREADCRUMB":return t.data.breadcrumbIndex>=0&&t.data.breadcrumbIndex<e.length?e.slice(0,t.data.breadcrumbIndex+1):e;case"SET_TO_PREVIOUS_BREADCRUMB":return e.length>1?e.slice(0,e.length-1):e;case"RESET_BREADCRUMB":return[{pipelineId:t.data.pipelineId}];default:return e}},Jd=function(e,t){if(t&&t.pipelines&&Array.isArray(e)&&e.length>0&&e[e.length-1].pipelineId){var n=e[e.length-1].pipelineId;return t.pipelines.findIndex((function(e){return e.id===n}))>-1}return!1},Qd=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;return"SET_CANVAS_CONFIG_INFO"===t.type?t.data.canvasConfig:e},eu=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return"SET_TOOLBAR_CONFIG"===t.type?Object.assign({},e,{config:t.data.toolbarConfig}):e},tu=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"CLEAR_NOTIFICATION_MESSAGES":return[];case"SET_NOTIFICATION_MESSAGES":return t.data.messages.forEach((function(e){return nu(e)})),t.data.messages;case"DELETE_NOTIFICATION_MESSAGES":var n=Array.isArray(t.data.ids)?t.data.ids:[t.data.ids],i=e.filter((function(e){return!n.includes(e.id)}));return i;default:return e}};function nu(e){return null!==e.type&&""!==e.type&&void 0!==e.type||(e.type="unspecified"),e}var iu=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_CANVAS_INFO":return t.canvasInfoIdChanged?{}:e;case"CLEAR_SELECTIONS":case"SET_BREADCRUMBS":case"ADD_BREADCRUMB":case"ADD_BREADCRUMBS":case"SET_TO_INDEXED_BREADCRUMB":case"SET_TO_PREVIOUS_BREADCRUMB":case"RESET_BREADCRUMB":return{};case"SET_SELECTIONS":return{pipelineId:t.data.pipelineId,selections:tt(t.data.selections)};case"DELETE_OBJECT":if(e.selections){var n=e.selections.filter((function(e){return t.data.id!==e}));return{pipelineId:e.pipelineId,selections:n}}return e;case"DELETE_AND_UPDATE_OBJECTS":if(e.selections){var i=[].concat(tt(t.data.linksToDelete),tt(t.data.supernodesToDelete),tt(t.data.nodesToDelete),tt(t.data.commentsToDelete)),o=e.selections.filter((function(e){return!i.some((function(t){return t.id===e}))}));return{pipelineId:e.pipelineId,selections:o}}return e;default:return e}},ou=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_NOTIFICATION_PANEL_CONFIG":return Object.assign({},e,{config:t.data.notificationPanelConfig});case"SET_NOTIFICATION_PANEL_OPEN_STATE":return Object.assign({},e,{isOpen:t.data.isOpen});default:return e}},au=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"ADD_EXTERNAL_PIPELINE_FLOW":var n=Object.assign({},t.newPipelineFlow);return[].concat(tt(e),[n]);case"REMOVE_EXTERNAL_PIPELINE_FLOW":return e.filter((function(e){return e.url!==t.externalUrl}));case"REPLACE_SN_AND_PIPELINES":var i=e.filter((function(e){return!t.data.extPipelineFlowsToDelete.some((function(t){return t.url===e.url}))})),o=[].concat(tt(i),tt(t.data.extPipelineFlowsToAdd));return o;case"ADD_OBJECTS_AND_UPDATE":case"ADD_SUPERNODES":return[].concat(tt(e),tt(t.data.extPipelineFlowsToAdd));case"DELETE_OBJECTS_AND_UPDATE":case"DELETE_SUPERNODES":return e.filter((function(e){return!t.data.extPipelineFlowsToDelete.some((function(t){return e.url===t.url}))}));case"DECONSTRUCT_SUPERNODE":return e.filter((function(e){return e.id!==t.data.extPipelineFlowToDelete.id}));case"RECONSTRUCT_SUPERNODE":return[].concat(tt(e),[t.data.extPipelineFlowToDelete]);case"SET_CANVAS_INFO":return t.canvasInfoIdChanged?[]:e;default:return e}},ru=function(){function n(t){e(this,n);var i=Rt({selectioninfo:iu,canvasconfig:Qd,canvasinfo:Wd,breadcrumbs:Kd,palette:Bd,notifications:tu,notificationpanel:ou,externalpipelineflows:au,tooltip:Ud,canvastoolbar:eu,contextmenu:Xd,rightflyout:$d,bottompanel:Zd}),o={selectioninfo:{},canvasinfo:t,canvasconfig:xl.getDefaultCanvasConfig(),breadcrumbs:[{pipelineId:t.primary_pipeline,pipelineFlowId:t.id}],palette:{content:{}},notifications:[],notificationpanel:{isOpen:!1,config:{}},externalpipelineflows:[],tooltip:{},canvastoolbar:{},contextmenu:{menuDef:[]},rightflyout:{},bottompanel:{}},a=!1;"undefined"!=typeof window&&(a=window.__REDUX_DEVTOOLS_EXTENSION__&&window.__REDUX_DEVTOOLS_EXTENSION__()),this.store=Ut(i,o,a),this.dispatch=this.dispatch.bind(this)}return t(n,[{key:"dispatch",value:function(e){this.store.dispatch(e)}},{key:"subscribe",value:function(e){return this.store.subscribe(e)}},{key:"getStore",value:function(){return this.store}},{key:"getPalette",value:function(){return ht(this.store.getState().palette)}},{key:"getPaletteData",value:function(){return ht(this.store.getState().palette.content)}},{key:"getCanvasInfo",value:function(){return ht(this.store.getState().canvasinfo)}},{key:"getBreadcrumbs",value:function(){return ht(this.store.getState().breadcrumbs)}},{key:"getCanvasConfig",value:function(){return Object.assign({},this.store.getState().canvasconfig)}},{key:"getNodeLayout",value:function(){return this.cloneData(this.store.getState().canvasconfig.enableNodeLayout)}},{key:"getCanvasLayout",value:function(){return this.cloneData(this.store.getState().canvasconfig.enableCanvasLayout)}},{key:"isTooltipOpen",value:function(){return!g(this.store.getState().tooltip)}},{key:"getTooltip",value:function(){return this.cloneData(this.store.getState().tooltip)}},{key:"isRightFlyoutOpen",value:function(){return this.store.getState().rightflyout.isOpen}},{key:"isBottomPanelOpen",value:function(){return this.store.getState().bottompanel.isOpen}},{key:"getNotificationPanel",value:function(){return this.cloneData(this.store.getState().notificationpanel)}},{key:"getNotifications",value:function(){return this.store.getState().notifications.map((function(e,t){return Object.assign({},e)}))}},{key:"isNotificationPanelOpen",value:function(){return this.getNotificationPanel().isOpen}},{key:"getContextMenu",value:function(){return this.cloneData(this.store.getState().contextmenu)}},{key:"isContextMenuDisplayed",value:function(){return!g(this.store.getState().contextmenu.menuDef)}},{key:"getSelectionInfo",value:function(){return this.cloneData(this.store.getState().selectioninfo)}},{key:"getExternalPipelineFlows",value:function(){return this.cloneData(this.store.getState().externalpipelineflows)}},{key:"getExternalPipelineFlow",value:function(e){var t=this.store.getState().externalpipelineflows.find((function(t){return t.url===e}));return t?this.cloneData(t):null}},{key:"cloneData",value:function(e){return ht(e)}}]),n}(),su={$schema:"https://json-schema.org/draft-04/schema#",description:"WDP Pipeline Flow Schema",type:"object",id:"https://api.dataplatform.ibm.com/schemas/common-pipeline/pipeline-flow/pipeline-flow-v1-schema.json",properties:{doc_type:{description:"Document type",type:"string"},version:{description:"Pipeline-flow schema version",enum:["1.0"]},json_schema:{description:"Refers to the JSON schema used to validate documents of this type",enum:["https://api.dataplatform.ibm.com/schemas/common-pipeline/pipeline-flow/pipeline-flow-v1-schema.json"]},open_with_tool:{description:"Preferred authoring application",type:"string"},id:{description:"Document identifier, GUID recommended",type:"string"},primary_pipeline:{description:"Reference to the primary (main) pipeline flow within the document",type:"string"},pipelines:{description:"Array of pipelines",type:"array",minItems:1,items:{$ref:"#/definitions/pipeline_def"},uniqueItems:!0},schemas:{description:"Array of data record schemas used in the document",type:"array",minItems:0,items:{$ref:"https://api.dataplatform.ibm.com/schemas/common-pipeline/datarecord-metadata/datarecord-metadata-v1-schema.json#/definitions/record_schema"},uniqueItems:!0},app_data:{$ref:"#/definitions/app_data_def"}},required:["doc_type","version","primary_pipeline","pipelines"],additionalProperties:!1,definitions:{pipeline_def:{description:"Definition of a single pipeline flow",type:"object",properties:{id:{description:"Unique identifier",type:"string"},runtime:{description:"Runtime associated with the operations in the current pipeline",type:"string"},nodes:{description:"Array of pipeline nodes",type:"array",minItems:0,items:{oneOf:[{$ref:"#/definitions/node_def"},{$ref:"#/definitions/supernode_def"},{$ref:"#/definitions/binding_entry_node_def"},{$ref:"#/definitions/binding_exit_node_def"},{$ref:"#/definitions/model_node_def"}]},uniqueItems:!0},app_data:{$ref:"#/definitions/app_data_def"}},required:["id","runtime","nodes"],additionalProperties:!1},node_def:{description:"Definition of a single pipeline node",type:"object",properties:{id:{description:"Unique identifier for node within the current pipeline",type:"string"},type:{description:"Node type - always 'execution_node' for non-model pipeline elements",enum:["execution_node"]},op:{description:"Operator type identifier",type:"string"},inputs:{$ref:"#/definitions/ports_def"},outputs:{$ref:"#/definitions/ports_def"},parameters:{description:"Input parameters for the operator",type:"object",properties:{},additionalProperties:!0},app_data:{$ref:"#/definitions/app_data_def"}},required:["id","type","op"],additionalProperties:!1},supernode_def:{description:"Definition of a supernode which serves as the entry point for a sub-pipeline",type:"object",properties:{id:{description:"Unique identifier for the supernode within the current pipeline",type:"string"},type:{description:"Node type - always 'super_node' for supernode elements",enum:["super_node"]},subflow_ref:{description:"Refers to the sub-flow associated with this supernode",type:"object",properties:{url:{description:"Reference to an external sub-flow. When not present the sub-flow is assumed to be in the current document. A value of 'app_defined' indicates a sub-flow identifier is present, but the controlling application will serve up the sub-pipeline in the form of a new pipeline-flow document (no sub-flow is present in the document).",type:"string"},pipeline_id_ref:{description:"Sub-flow identifier reference",type:"string"}},required:["pipeline_id_ref"]},inputs:{$ref:"#/definitions/bound_ports_def"},outputs:{$ref:"#/definitions/bound_ports_def"},app_data:{$ref:"#/definitions/app_data_def"}},required:["id","type","subflow_ref","inputs"],additionalProperties:!1},binding_entry_node_def:{description:"Defines an entry point (source) for a pipeline. Bindings can be concrete: the concrete_binding element is present on the port; or bindings can be abstract: bindings are performed externally via configuration or a wrapper document.",type:"object",properties:{id:{description:"Unique identifier for the binding within the current pipeline",type:"string"},type:{description:"Node type - always 'binding' for binding elements",enum:["binding"]},output:{$ref:"#/definitions/port_binding_def"},app_data:{$ref:"#/definitions/app_data_def"},connection:{$ref:"https://api.dataplatform.ibm.com/schemas/common-pipeline/pipeline-connection/pipeline-connection-v1-schema.json#/definitions/common_pipeline_connection_def"},data_asset:{$ref:"https://api.dataplatform.ibm.com/schemas/common-pipeline/pipeline-connection/pipeline-connection-v1-schema.json#/definitions/common_pipeline_data_asset_def"}},required:["id","type"],additionalProperties:!1},binding_exit_node_def:{description:"Defines an exit point (sink) for a pipeline. Bindings can be concrete: the concrete_binding element is present on the port; or bindings can be abstract: bindings are performed externally via configuration or a wrapper document.",type:"object",properties:{id:{description:"Unique identifier for the binding",type:"string"},type:{description:"Node type - always 'binding' for binding elements",enum:["binding"]},input:{$ref:"#/definitions/port_binding_def"},app_data:{$ref:"#/definitions/app_data_def"},connection:{$ref:"https://api.dataplatform.ibm.com/schemas/common-pipeline/pipeline-connection/pipeline-connection-v1-schema.json#/definitions/common_pipeline_connection_def"},data_asset:{$ref:"https://api.dataplatform.ibm.com/schemas/common-pipeline/pipeline-connection/pipeline-connection-v1-schema.json#/definitions/common_pipeline_data_asset_def"}},required:["id","type"],additionalProperties:!1},model_node_def:{description:"Definition of a single predictive model node",type:"object",properties:{id:{description:"Unique identifier for the model within the current pipeline",type:"string"},type:{description:"Node type - always 'model_node' for model pipeline elements",enum:["model_node"]},model_ref:{description:"Reference to the binary model",type:"string"},inputs:{$ref:"#/definitions/ports_def"},outputs:{$ref:"#/definitions/ports_def"},parameters:{description:"Input parameters for the operator",type:"object",properties:{},additionalProperties:!0},app_data:{$ref:"#/definitions/app_data_def"}},required:["id","type","inputs"],additionalProperties:!1},port_def:{description:"Port definition (input/output) on a node",type:"object",properties:{id:{description:"Unique identifier",type:"string"},schema_ref:{description:"Optional data record schema reference associated with the port",type:"string"},links:{description:"Array of links going into the node. Applies to input ports and exit bindings only.",type:"array",minItems:0,items:{$ref:"#/definitions/link_def"},uniqueItems:!0},app_data:{$ref:"#/definitions/app_data_def"}},required:["id"],additionalProperties:!1},port_binding_def:{description:"Definition (input/output) of a binding port on a node (bound or unbound). If no binding is present the port is bound at runtime via a configuration object or wrapper document.",type:"object",properties:{id:{description:"Unique identifier",type:"string"},schema_ref:{description:"Optional data record schema associated with the port",type:"string"},link:{$ref:"#/definitions/link_def"},app_data:{$ref:"#/definitions/app_data_def"}},required:["id"],additionalProperties:!1},ports_def:{type:"array",minItems:1,items:{$ref:"#/definitions/port_def"},uniqueItems:!0},bound_ports_def:{type:"array",minItems:1,items:{$ref:"#/definitions/bound_port_def"},uniqueItems:!0},bound_port_def:{description:"Port definition (input/output) on a node with optional pipeline port binding for supernodes",type:"object",properties:{id:{description:"Unique identifier",type:"string"},schema_ref:{description:"Optional data record schema associated with the port",type:"string"},links:{description:"Array of links going into the node. Applies to input ports and exit bindings only.",type:"array",minItems:1,items:{$ref:"#/definitions/link_def"},uniqueItems:!0},subflow_node_ref:{description:"Optional node id binding within the current document.",type:"string"},app_data:{$ref:"#/definitions/app_data_def"}},required:["id"],additionalProperties:!1},link_def:{description:"Node link definition",type:"object",properties:{pipeline_id_ref:{description:"id of the pipeline this link connects to",type:"string"},node_id_ref:{description:"id of a node this link connects to",type:"string"},port_id_ref:{description:"optional port id of a node this link connects to",type:"string"},app_data:{$ref:"#/definitions/app_data_def"}},required:["node_id_ref"],additionalProperties:!1},app_data_def:{description:"Object containing app-specific data",type:"object",properties:{ui_data:{anyOf:[{$ref:"https://api.dataplatform.ibm.com/schemas/common-pipeline/pipeline-flow/pipeline-flow-ui-v1-schema.json#/definitions/pipeline_overview_def"},{$ref:"https://api.dataplatform.ibm.com/schemas/common-pipeline/pipeline-flow/pipeline-flow-ui-v1-schema.json#/definitions/pipeline_def"},{$ref:"https://api.dataplatform.ibm.com/schemas/common-pipeline/pipeline-flow/pipeline-flow-ui-v1-schema.json#/definitions/port_info_def"},{$ref:"https://api.dataplatform.ibm.com/schemas/common-pipeline/pipeline-flow/pipeline-flow-ui-v1-schema.json#/definitions/node_info_def"}]}},additionalProperties:!0}}},lu={$schema:"https://json-schema.org/draft-04/schema#",description:"WDP Pipeline Flow UI Schema. Defines UI-only constructs for pipeline flow documents.",type:"object",id:"https://api.dataplatform.ibm.com/schemas/common-pipeline/pipeline-flow/pipeline-flow-ui-v1-schema.json#",properties:{},additionalProperties:!0,definitions:{pipeline_overview_def:{description:"Top level UI information",type:"object",properties:{name:{description:"User-defined name",type:"string"},description:{description:"User-defined description",type:"string"},class_name:{description:"CSS class name",type:"string"}},additionalProperties:!0},pipeline_def:{description:"Pipeline level UI information",type:"object",properties:{zoom:{description:"Zoom factor",type:"integer"},comments:{description:"Array of Comments, optionally associated with nodes",type:"array",minItems:0,items:{$ref:"#/definitions/comment_def"},uniqueItems:!0}},additionalProperties:!0},port_info_def:{description:"Additional UI info for ports",type:"object",properties:{cardinality:{description:"Property to capture how many data assets are allowed for this port, e.g., min: 1, max:1 implies you must supply 1 and only 1; min:0, max:1 implies it is optional and a max of one, min:0, max:-1 means it is optional and you can may have any number of data assets. The default value is 1:1 for inputs and 1:-1 for outputs.",type:"object",properties:{min:{description:"Minimum data sets that are required for this port",type:"integer",default:1},max:{description:"Maximum data sets that are allowed on this port. A negative value indicates unlimited. The default value is 1 for inputs and -1 for outputs.",type:"integer"}},additionalProperties:!1},class_name:{description:"CSS class name",type:"string"},label:{description:"Port name",type:"string"}},additionalProperties:!0},node_info_def:{description:"object with app-specific UI-information",type:"object",properties:{label:{description:"User-defined label",type:"string"},description:{description:"User-defined description",type:"string"},class_name:{description:"CSS class name",type:"string"},image:{description:"Image name (do not embed images inline!)",type:"string"},x_pos:{description:"x-position",type:"integer"},y_pos:{description:"y-position",type:"integer"},attributes:{description:"additional attributes",type:"string"},associations:{description:"Array of non-data node linkage",type:"array",minItems:0,items:{$ref:"#/definitions/association_def"}},messages:{descriptions:"An array of messages for the node",type:"array",minItems:0,items:{$ref:"#/definitions/message_def"},uniqueItems:!0},decorations:{description:"Array of decorations used to decorate nodes",type:"array",minItems:0,items:{$ref:"#/definitions/decoration_def"},uniqueItems:!0}},additionalProperties:!0},association_def:{description:"Non-data link",type:"object",properties:{id:{description:"Association identifier",type:"string"},node_ref:{description:"Target node id",type:"string"},class_name:{description:"CSS class name for link styling",type:"string"}},required:["id","node_ref"],additionalProperties:!1},decoration_def:{description:"Decoration used to decorate a node",type:"object",properties:{id:{description:"An identifier used as a token when a hotspot is used",type:"string"},hotspot:{description:"Indicates whether teh decorator is a hotspot or not. ie does it send an event to consuming app. when clicked",type:"boolean"},class_name:{description:"CSS class name for decoration styling",type:"string"},positions:{description:"Shows where the decoration is displayed with respect to the node",enum:["topLeft","topRight","bottomLeft","bottomRight"]},image:{description:"Image displayed at the decoration position",type:"string"}}},message_def:{description:"Node message definition",type:"object",properties:{id_ref:{description:"Name of the parameter that has the message",type:"string"},validation_id:{description:"Validation identifier from the fail_message validation section.",type:"string"},type:{description:"Type of message",enum:["info","error","warning"]},text:{description:"Message string",type:"string"}}},comment_def:{type:"object",properties:{id:{description:"Comment identifier. Must be unique.",type:"string"},x_pos:{description:"Horizontal comment position",type:"integer",minimum:0},y_pos:{description:"Vertical comment position",type:"integer",minimum:0},width:{description:"Comment width",type:"integer",minimum:10},height:{description:"Comment height",type:"integer",minimum:10},class_name:{description:"CSS class(es) to apply to the comment",type:"string"},attributes:{description:"Optional attributes to be added to this element. For example: \"attributes\": \"attr1='value1'; attr2='value2'\"",type:"string"},content:{description:"Comment content",type:"string"},associated_id_refs:{description:"Optional array of associated node id references",type:"array",minItems:0,items:{$ref:"#/definitions/comment_link_def"},uniqueItems:!0}},required:["id","x_pos","y_pos","width","height"],additionalProperties:!0},comment_link_def:{description:"Comment link definition",type:"object",properties:{node_ref:{description:"Node reference",type:"string"},class_name:{description:"CSS class name for link styling",type:"string"}},required:["node_ref"],additionalProperties:!0}}},cu={$schema:"https://json-schema.org/draft-04/schema#",id:"https://api.dataplatform.ibm.com/schemas/common-pipeline/pipeline-connection/pipeline-connection-v1-schema.json#",title:"Watson Data Platform Pipeline Connection Schema",description:"Connection schema for pipelines in the Watson Data Platform",definitions:{common_pipeline_connection_def:{description:"Details of the connection to use for a pipeline binding node.",properties:{app_data:{$ref:"https://api.dataplatform.ibm.com/schemas/common-pipeline/pipeline-flow/pipeline-flow-v1-schema.json#/definitions/app_data_def"},ref:{description:"A reference to a connection by ID.",type:"string"},catalog_ref:{description:"If ref is set, this refers to the ID of the catalog which contains the connection. If neither this attribute nor project_ref are specified, the connection will be assumed to exist in the project or catalog which contains the pipeline.",type:"string"},project_ref:{description:"If ref is set, this refers to the ID of the project which contains the connection. If neither this attribute nor catalog_ref are specified, the connection will be assumed to exist in the project or catalog which contains the pipeline.",type:"string"},properties:{description:"The properties for the connection. The specific properties allowed depend on the type of connection referenced.",additionalProperties:{type:"object"},type:"object"}},required:["ref"],type:"object"},common_pipeline_data_asset_def:{description:"Details of the data asset contained in a catalog or project to use for a pipeline binding node.",properties:{app_data:{$ref:"https://api.dataplatform.ibm.com/schemas/common-pipeline/pipeline-flow/pipeline-flow-v1-schema.json#/definitions/app_data_def"},ref:{description:"A reference to a data asset by ID.",type:"string"},catalog_ref:{description:"If ref is set, this refers to the ID of the catalog which contains the data asset. If neither this attribute nor project_ref are specified, the data asset will be assumed to exist in the project or catalog which contains the pipeline.",type:"string"},project_ref:{description:"If ref is set, this refers to the ID of the project which contains the data asset. If neither this attribute nor catalog_ref are specified, the data asset will be assumed to exist in the project or catalog which contains the pipeline.",type:"string"},properties:{description:"Properties controlling how the data asset is used.",type:"object",additionalProperties:{type:"object"},properties:{attachment_ref:{description:"The ID of the data asset attachment to use. If not specified and used as a source, the first suitable attachment found will be used. If not specified and used as a target, a new attachment will be created.",type:"string"},name:{description:"Specifies the name of the data asset to read, create or update if ref is unset.",type:"string",default:!1},no_write_schema:{description:"When used as a target, whether to update the data asset with the schema when a run completes or not (will be automatically updated if not supplied by caller).",type:"boolean",default:!1},no_write_status:{description:"When used as a target, whether to update the data asset with the status when a run completes or not (will be automatically updated if not supplied by caller).",type:"boolean",default:!1}}}},type:"object"}}},du={$schema:"https://json-schema.org/draft-04/schema#",id:"https://api.dataplatform.ibm.com/schemas/common-pipeline/datarecord-metadata/datarecord-metadata-v1-schema.json#",title:"Watson Data Platform Datarecord Metadata Schema",description:"Metadata schema for datarecords in the Watson Data Platform",definitions:{record_schema:{description:"Description of a datarecord including column types and metadata",type:"object",properties:{id:{description:"Unique identifier",type:"string"},name:{description:"Name of datarecord",type:"string"},json_schema:{description:"Refers to the JSON schema used to validate documents of this type",enum:["https://api.dataplatform.ibm.com/schemas/common-pipeline/datarecord-metadata/datarecord-metadata-v1-schema.json"],type:"string"},type:{description:"Always 'struct' for datarecord schema",type:"string"},fields:{description:"Array of field definitions",type:"array",minItems:0,items:{$ref:"#/definitions/field"},uniqueItems:!0}},required:["fields"]},field:{description:"Definition of a datarecord field",type:"object",properties:{name:{description:"Field name. Must be unique within the datarecord",type:"string"},type:{description:"Field type. Can be a primitive type (string, integer, double, date, time, timestamp, binary, boolean, or other)",type:"string"},nullable:{description:"Whether or not one can place null values into the field",type:"boolean",default:!1},metadata:{$ref:"#/definitions/metadata"}},required:["name","type"]},metadata:{description:"Additional field metadata",type:"object",properties:{description:{description:"Field description",type:"string"},measure:{description:"Field measurement level",enum:["range","discrete","flag","set","ordered-set","typeless","collection","geospatial","default"]},modeling_role:{description:"Field role for modeling",enum:["input","target","both","none","partition","split","frequency","record-id"]},max_length:{description:"Maximum length for fields. Length is unlimited when not present",type:"number"},decimal_precision:{description:"Precision for decimal types",type:"number"},decimal_scale:{description:"Scale for decimal types",type:"number"},values:{description:"Array of unique categorical values for the column",type:"array",minItems:0,items:{description:"A value discovered in the data",type:"string"},uniqueItems:!0},range:{description:"Minimum and maximum discovered values for scalar data",type:"object",properties:{min:{description:"Lowest value discovered in the data",type:"number"},max:{description:"Highest value discovered in the data",type:"number"}},required:["min","max"]}},required:[]}}},uu={$schema:"http://json-schema.org/draft-04/schema#",type:"object",description:"Abstract Canvas diagram schema",id:"http://api.dataplatform.ibm.com/schemas/common-canvas/palette/palette-v1-schema.json",properties:{categories:{description:"Array of palette categories",type:"array",minItems:0,items:{type:"object",properties:{category:{description:"The palette category that the items belong within",type:"string"},label:{description:"Category label",type:"string"},image:{description:"Encoded image or image reference for the category",type:"string"},nodetypes:{description:"Array of nodes within the current category",type:"array",items:{type:"object",properties:{label:{description:"Node label",type:"string"},description:{description:"Node description",type:"string"},type:{description:"Node classification type",enum:["binding","execution_node","super_node","model_node"]},operator_id_ref:{description:"Unique node type identifier",type:"string"},image:{description:"Encoded image or image reference for the node",type:"string"},subDiagramId:{description:"Optional sub diagram identifier.",type:"string"},input_ports:{description:"Array of node input ports",type:"array",minItems:0,items:{$ref:"#/definitions/port"}},output_ports:{description:"Array of node output ports",type:"array",minItems:0,items:{$ref:"#/definitions/port"}}},required:["label","image"]}}},required:["category","label"]}}},definitions:{port:{description:"Defines a node port for links",type:"object",properties:{id:{description:"Port identifier",type:"string"},label:{description:"Port long label",type:"string"},cardinality:{description:"Property to capture how many connections are allowed for this port, e.g., min: 1, max:1 implies you must supply 1 and only 1; min:0, max:1 implies it is optional and a max of one, min:0, max:-1 means it is optional and you can may have any number of connections. The default value is 1:1 for inputs and 1:-1 for outputs.",type:"object",properties:{min:{description:"Minimum data sets that are required for this port",type:"integer",default:1},max:{description:"Maximum data sets that are allowed on this port. A negative value indicates unlimited. The default value is 1 for inputs and -1 for outputs.",type:"integer"}},additionalProperties:!1}},required:["id"]}}},pu={$schema:"https://json-schema.org/draft-04/schema#",description:"WDP Pipeline Flow Schema",type:"object",id:"https://api.dataplatform.ibm.com/schemas/common-pipeline/pipeline-flow/pipeline-flow-v2-schema.json",properties:{doc_type:{description:"Document type",type:"string"},version:{description:"Pipeline-flow schema version",enum:["2.0"]},json_schema:{description:"Refers to the JSON schema used to validate documents of this type",enum:["https://api.dataplatform.ibm.com/schemas/common-pipeline/pipeline-flow/pipeline-flow-v2-schema.json"]},open_with_tool:{description:"Preferred authoring application",type:"string"},id:{description:"Document identifier, GUID recommended",type:"string"},parameters:{description:"Parameters for the flow document",type:"object",properties:{},additionalProperties:!0},primary_pipeline:{description:"Reference to the primary (main) pipeline flow within the document",type:"string"},pipelines:{description:"Array of pipelines",type:"array",minItems:1,items:{$ref:"#/definitions/pipeline_def"},uniqueItems:!0},schemas:{description:"Array of data record schemas used in the document",type:"array",minItems:0,items:{$ref:"https://api.dataplatform.ibm.com/schemas/common-pipeline/datarecord-metadata/datarecord-metadata-v2-schema.json#/definitions/record_schema"},uniqueItems:!0},runtimes:{description:"Array of runtime objects referred to in the document",type:"array",minItems:0,items:{$ref:"#/definitions/runtime_def"},uniqueItems:!0},external_parameters:{description:"Array of parameterized property references",type:"array",minItems:0,items:{$ref:"https://api.dataplatform.ibm.com/schemas/common-pipeline/parameters/parameters-v2-schema.json#/definitions/param_property_ref"},uniqueItems:!0},app_data:{$ref:"#/definitions/app_data_def"}},required:["doc_type","version","primary_pipeline","pipelines"],additionalProperties:!1,definitions:{pipeline_def:{description:"Definition of a single pipeline flow",type:"object",properties:{id:{description:"Unique identifier",type:"string"},name:{description:"User-readable name",type:"string"},runtime_ref:{description:"Reference to the id of the runtime associated with the operations in the current pipeline",type:"string"},nodes:{description:"Array of pipeline nodes",type:"array",minItems:0,items:{oneOf:[{$ref:"#/definitions/node_def"},{$ref:"#/definitions/supernode_def"},{$ref:"#/definitions/binding_entry_node_def"},{$ref:"#/definitions/binding_exit_node_def"},{$ref:"#/definitions/model_node_def"}]},uniqueItems:!0},parameters:{description:"Parameters for the pipeline",type:"object",properties:{},additionalProperties:!0},app_data:{$ref:"#/definitions/app_data_def"}},required:["id","runtime_ref","nodes"],additionalProperties:!1},node_def:{description:"Definition of a single pipeline node",type:"object",properties:{id:{description:"Unique identifier for node within the current pipeline",type:"string"},type:{description:"Node type - always 'execution_node' for non-model pipeline elements",enum:["execution_node"]},op:{description:"Operator type identifier",type:"string"},inputs:{$ref:"#/definitions/ports_def"},outputs:{$ref:"#/definitions/ports_def"},parameters:{description:"Input parameters for the operator",type:"object",properties:{},additionalProperties:!0},runtime_ref:{description:"Optional reference to the id of the runtime associated with the current node",type:"string"},app_data:{$ref:"#/definitions/app_data_def"}},required:["id","type","op"],additionalProperties:!1},supernode_def:{description:"Definition of a supernode which serves as the entry point for a sub-pipeline",type:"object",properties:{id:{description:"Unique identifier for the supernode within the current pipeline",type:"string"},type:{description:"Node type - always 'super_node' for supernode elements",enum:["super_node"]},open_with_tool:{description:"Name of the tool which can be used to view or edit the sub-flow for this supernode. The default is 'canvas'",type:"string"},subflow_ref:{description:"Refers to the sub-flow associated with this supernode",type:"object",properties:{url:{description:"Reference to an external sub-flow. When not present the sub-flow is assumed to be in the current document. A value of 'app_defined' indicates a sub-flow identifier is present, but the controlling application will serve up the sub-pipeline in the form of a new pipeline-flow document (no sub-flow is present in the document).",type:"string"},pipeline_id_ref:{description:"Sub-flow identifier reference",type:"string"}},required:["pipeline_id_ref"]},inputs:{$ref:"#/definitions/bound_ports_def"},outputs:{$ref:"#/definitions/bound_ports_def"},parameters:{description:"Input parameters for the supernode",type:"object",properties:{},additionalProperties:!0},app_data:{$ref:"#/definitions/app_data_def"}},required:["id","type","subflow_ref","inputs"],additionalProperties:!1},binding_entry_node_def:{description:"Defines an entry point (source) for a pipeline. Bindings can be concrete: the concrete_binding element is present on the port; or bindings can be abstract: bindings are performed externally via configuration or a wrapper document.",type:"object",properties:{id:{description:"Unique identifier for the binding within the current pipeline",type:"string"},type:{description:"Node type - always 'binding' for binding elements",enum:["binding"]},outputs:{$ref:"#/definitions/ports_def"},app_data:{$ref:"#/definitions/app_data_def"},connection:{$ref:"https://api.dataplatform.ibm.com/schemas/common-pipeline/pipeline-connection/pipeline-connection-v2-schema.json#/definitions/common_pipeline_connection_def"},data_asset:{$ref:"https://api.dataplatform.ibm.com/schemas/common-pipeline/pipeline-connection/pipeline-connection-v2-schema.json#/definitions/common_pipeline_data_asset_def"},op:{description:"Binding node type identifier",type:"string"},parameters:{description:"Parameters for the entry binding node",type:"object",properties:{},additionalProperties:!0}},required:["id","type"],additionalProperties:!1},binding_exit_node_def:{description:"Defines an exit point (sink) for a pipeline. Bindings can be concrete: the concrete_binding element is present on the port; or bindings can be abstract: bindings are performed externally via configuration or a wrapper document.",type:"object",properties:{id:{description:"Unique identifier for the binding within the current pipeline",type:"string"},type:{description:"Node type - always 'binding' for binding elements",enum:["binding"]},inputs:{$ref:"#/definitions/ports_def"},app_data:{$ref:"#/definitions/app_data_def"},connection:{$ref:"https://api.dataplatform.ibm.com/schemas/common-pipeline/pipeline-connection/pipeline-connection-v2-schema.json#/definitions/common_pipeline_connection_def"},data_asset:{$ref:"https://api.dataplatform.ibm.com/schemas/common-pipeline/pipeline-connection/pipeline-connection-v2-schema.json#/definitions/common_pipeline_data_asset_def"},op:{description:"Binding node type identifier",type:"string"},parameters:{description:"Parameters for the binding exit node",type:"object",properties:{},additionalProperties:!0}},required:["id","type"],additionalProperties:!1},model_node_def:{description:"Definition of a single predictive model node",type:"object",properties:{id:{description:"Unique identifier for the model within the current pipeline",type:"string"},type:{description:"Node type - always 'model_node' for model pipeline elements",enum:["model_node"]},model_ref:{description:"Reference to the binary model",type:"string"},inputs:{$ref:"#/definitions/ports_def"},outputs:{$ref:"#/definitions/ports_def"},parameters:{description:"Input parameters for the operator",type:"object",properties:{},additionalProperties:!0},runtime_ref:{description:"Reference to the runtime associated with the current node",type:"string"},app_data:{$ref:"#/definitions/app_data_def"}},required:["id","type","inputs"],additionalProperties:!1},port_def:{description:"Port definition (input/output) on a node",type:"object",properties:{id:{description:"Unique identifier",type:"string"},schema_ref:{description:"Optional data record schema reference associated with the port",type:"string"},links:{description:"Array of links going into the node. Applies to input ports and exit bindings only.",type:"array",minItems:0,items:{$ref:"#/definitions/link_def"},uniqueItems:!0},parameters:{description:"Parameters for the port",type:"object",properties:{},additionalProperties:!0},app_data:{$ref:"#/definitions/app_data_def"}},required:["id"],additionalProperties:!1},ports_def:{type:"array",minItems:1,items:{$ref:"#/definitions/port_def"},uniqueItems:!0},bound_ports_def:{type:"array",minItems:1,items:{$ref:"#/definitions/bound_port_def"},uniqueItems:!0},bound_port_def:{description:"Port definition (input/output) on a node with optional pipeline port binding for supernodes",type:"object",properties:{id:{description:"Unique identifier",type:"string"},schema_ref:{description:"Optional data record schema associated with the port",type:"string"},links:{description:"Array of links going into the node. Applies to input ports and exit bindings only.",type:"array",minItems:1,items:{$ref:"#/definitions/link_def"},uniqueItems:!0},subflow_node_ref:{description:"Optional node id binding within the current document.",type:"string"},parameters:{description:"Parameters for the binding port",type:"object",properties:{},additionalProperties:!0},app_data:{$ref:"#/definitions/app_data_def"}},required:["id"],additionalProperties:!1},link_def:{description:"Node link definition",type:"object",properties:{node_id_ref:{description:"id of a node this link connects to",type:"string"},port_id_ref:{description:"optional port id of a node this link connects to",type:"string"},link_name:{description:"optional link name (used in parameter sets when there are multiple input sources)",type:"string"},app_data:{$ref:"#/definitions/app_data_def"}},required:["node_id_ref"],additionalProperties:!1},app_data_def:{description:"Object containing app-specific data",type:"object",properties:{ui_data:{anyOf:[{$ref:"https://api.dataplatform.ibm.com/schemas/common-pipeline/pipeline-flow/pipeline-flow-ui-v2-schema.json#/definitions/pipeline_overview_def"},{$ref:"https://api.dataplatform.ibm.com/schemas/common-pipeline/pipeline-flow/pipeline-flow-ui-v2-schema.json#/definitions/pipeline_def"},{$ref:"https://api.dataplatform.ibm.com/schemas/common-pipeline/pipeline-flow/pipeline-flow-ui-v2-schema.json#/definitions/port_info_def"},{$ref:"https://api.dataplatform.ibm.com/schemas/common-pipeline/pipeline-flow/pipeline-flow-ui-v2-schema.json#/definitions/node_info_def"},{$ref:"https://api.dataplatform.ibm.com/schemas/common-pipeline/pipeline-flow/pipeline-flow-ui-v2-schema.json#/definitions/runtime_info_def"}]}},additionalProperties:!0},runtime_def:{description:"Runtime associated with the operations in the current pipeline",type:"object",properties:{id:{description:"Unique internal runtime identifier",type:"string"},name:{description:"The runtime name",type:"string"},version:{description:"The runtime version. When not present the latest version is assumed",type:"string"},app_data:{$ref:"#/definitions/app_data_def"}},required:["id","name"]}}},hu={$schema:"https://json-schema.org/draft-04/schema#",description:"WDP Pipeline Flow UI Schema. Defines UI-only constructs for pipeline flow documents.",type:"object",id:"https://api.dataplatform.ibm.com/schemas/common-pipeline/pipeline-flow/pipeline-flow-ui-v2-schema.json#",properties:{},additionalProperties:!0,definitions:{pipeline_overview_def:{description:"Top level UI information",type:"object",properties:{name:{description:"User-defined name",type:"string"},description:{description:"User-defined description",type:"string"},class_name:{description:"CSS class name",type:"string"}},additionalProperties:!0},pipeline_def:{description:"Pipeline level UI information",type:"object",properties:{zoom:{description:"Zoom factor",type:"integer"},comments:{description:"Array of Comments, optionally associated with nodes",type:"array",minItems:0,items:{$ref:"#/definitions/comment_def"},uniqueItems:!0}},additionalProperties:!0},port_info_def:{description:"Additional UI info for ports",type:"object",properties:{cardinality:{description:"Property to capture how many data assets are allowed for this port, e.g., min: 1, max:1 implies you must supply 1 and only 1; min:0, max:1 implies it is optional and a max of one, min:0, max:-1 means it is optional and you can may have any number of data assets. The default value is 1:1 for inputs and 1:-1 for outputs.",type:"object",properties:{min:{description:"Minimum data sets that are required for this port",type:"integer",default:1},max:{description:"Maximum data sets that are allowed on this port. A negative value indicates unlimited. The default value is 1 for inputs and -1 for outputs.",type:"integer"}},additionalProperties:!1},class_name:{description:"CSS class name",type:"string"},label:{description:"Port name",type:"string"}},additionalProperties:!0},node_info_def:{description:"object with app-specific UI-information",type:"object",properties:{label:{description:"User-defined label",type:"string"},description:{description:"User-defined description",type:"string"},class_name:{description:"CSS class name",type:"string"},image:{description:"Image name (do not embed images inline!)",type:"string"},x_pos:{description:"x-position",type:"integer"},y_pos:{description:"y-position",type:"integer"},is_expanded:{description:"Indicates whether a supernode is shown in expanded state or as a regular node.",type:"boolean"},expanded_height:{description:"Height of expanded supernode. If not provided an appropriate height is calculated.",type:"string"},expanded_width:{description:"Width of expanded supernode. If not provided an appropriate width is calculated.",type:"string"},attributes:{description:"additional attributes",type:"string"},associations:{description:"Array of non-data node linkage",type:"array",minItems:0,items:{$ref:"#/definitions/association_def"}},messages:{descriptions:"An array of messages for the node",type:"array",minItems:0,items:{$ref:"#/definitions/message_def"},uniqueItems:!0},ui_parameters:{description:"UI only parameter values for the node",type:"object",properties:{},additionalProperties:!0},decorations:{description:"Array of decorations used to decorate nodes",type:"array",minItems:0,items:{$ref:"#/definitions/decoration_def"},uniqueItems:!0}},additionalProperties:!0},runtime_info_def:{description:"Runtime information",type:"object",properties:{},required:[],additionalProperties:!0},association_def:{description:"Non-data link",type:"object",properties:{id:{description:"Association identifier",type:"string"},node_ref:{description:"Target node id",type:"string"},class_name:{description:"CSS class name for link styling",type:"string"}},required:["id","node_ref"],additionalProperties:!1},decoration_def:{description:"Decoration used to decorate a node",type:"object",properties:{id:{description:"An identifier used to identify the decoration",type:"string"},hotspot:{description:"Indicates whether the decorator is a hotspot or not. ie does it send an event to consuming app. when clicked",type:"boolean"},class_name:{description:"CSS class name for decoration styling",type:"string"},position:{description:"Shows where the decoration is displayed with respect to the node",enum:["topLeft","topRight","bottomLeft","bottomRight"]},x_pos:{description:"X position of the decorator relative to the node's top left corner. If provided, this is used in preference to the position field.",type:"integer"},y_pos:{description:"Y position of the decorator relative to the node's top left corner. If provided, this is used in preference to the position field.",type:"integer"},image:{description:"Image displayed at the decoration position. Provide either this or a label.",type:"string"},label:{description:"Label displayed at the decoration position. Provide either this or an image.",type:"string"}}},message_def:{description:"Node message definition",type:"object",properties:{id_ref:{description:"Name of the parameter that has the message",type:"string"},validation_id:{description:"Validation identifier from the fail_message validation section.",type:"string"},type:{description:"Type of message",enum:["info","error","warning"]},text:{description:"Message string",type:"string"}},required:["id_ref","type","text"]},comment_def:{type:"object",properties:{id:{description:"Comment identifier. Must be unique.",type:"string"},x_pos:{description:"Horizontal comment position",type:"integer",minimum:0},y_pos:{description:"Vertical comment position",type:"integer",minimum:0},width:{description:"Comment width",type:"integer",minimum:10},height:{description:"Comment height",type:"integer",minimum:10},class_name:{description:"CSS class(es) to apply to the comment",type:"string"},attributes:{description:"Optional attributes to be added to this element. For example: \"attributes\": \"attr1='value1'; attr2='value2'\"",type:"string"},content:{description:"Comment content",type:"string"},associated_id_refs:{description:"Optional array of associated node id references",type:"array",minItems:0,items:{$ref:"#/definitions/comment_link_def"},uniqueItems:!0}},required:["id","x_pos","y_pos","width","height"],additionalProperties:!0},comment_link_def:{description:"Comment link definition",type:"object",properties:{node_ref:{description:"Node reference",type:"string"},class_name:{description:"CSS class name for link styling",type:"string"}},required:["node_ref"],additionalProperties:!0}}},fu={$schema:"https://json-schema.org/draft-04/schema#",id:"https://api.dataplatform.ibm.com/schemas/common-pipeline/pipeline-connection/pipeline-connection-v2-schema.json",title:"Watson Data Platform Pipeline Connection Schema",description:"Connection schema for pipelines in the Watson Data Platform",definitions:{common_pipeline_connection_def:{description:"Details of the connection to use for a pipeline binding node.",properties:{name:{description:"A name tag for disambiguating connections",type:"string"},app_data:{$ref:"https://api.dataplatform.ibm.com/schemas/common-pipeline/pipeline-flow/pipeline-flow-v2-schema.json#/definitions/app_data_def"},ref:{description:"A reference to a connection by ID.",type:"string"},catalog_ref:{description:"If ref is set, this refers to the ID of the catalog which contains the connection. If neither this attribute nor project_ref are specified, the connection will be assumed to exist in the project or catalog which contains the pipeline.",type:"string"},project_ref:{description:"If ref is set, this refers to the ID of the project which contains the connection. If neither this attribute nor catalog_ref are specified, the connection will be assumed to exist in the project or catalog which contains the pipeline.",type:"string"},properties:{description:"The properties for the connection. The specific properties allowed depend on the type of connection referenced.",additionalProperties:{type:"object"},type:"object"}},required:["ref"],type:"object"},common_pipeline_data_asset_def:{description:"Details of the data asset contained in a catalog or project to use for a pipeline binding node.",properties:{app_data:{$ref:"https://api.dataplatform.ibm.com/schemas/common-pipeline/pipeline-flow/pipeline-flow-v2-schema.json#/definitions/app_data_def"},ref:{description:"A reference to a data asset by ID.",type:"string"},catalog_ref:{description:"If ref is set, this refers to the ID of the catalog which contains the data asset. If neither this attribute nor project_ref are specified, the data asset will be assumed to exist in the project or catalog which contains the pipeline.",type:"string"},project_ref:{description:"If ref is set, this refers to the ID of the project which contains the data asset. If neither this attribute nor catalog_ref are specified, the data asset will be assumed to exist in the project or catalog which contains the pipeline.",type:"string"},properties:{description:"Properties controlling how the data asset is used.",type:"object",additionalProperties:{type:"object"},properties:{attachment_ref:{description:"The ID of the data asset attachment to use. If not specified and used as a source, the first suitable attachment found will be used. If not specified and used as a target, a new attachment will be created.",type:"string"},name:{description:"Specifies the name of the data asset to read, create or update if ref is unset.",type:"string",default:!1},no_write_schema:{description:"When used as a target, whether to update the data asset with the schema when a run completes or not (will be automatically updated if not supplied by caller).",type:"boolean",default:!1},no_write_status:{description:"When used as a target, whether to update the data asset with the status when a run completes or not (will be automatically updated if not supplied by caller).",type:"boolean",default:!1}}}},type:"object"}}},gu={$schema:"https://json-schema.org/draft-04/schema#",id:"https://api.dataplatform.ibm.com/schemas/common-pipeline/datarecord-metadata/datarecord-metadata-v2-schema.json",title:"Watson Data Platform Datarecord Metadata Schema",description:"Metadata schema for datarecords in the Watson Data Platform",definitions:{record_schema:{description:"Description of a datarecord including column types and metadata",type:"object",properties:{id:{description:"Unique identifier",type:"string"},name:{description:"Name of datarecord",type:"string"},json_schema:{description:"Refers to the JSON schema used to validate documents of this type",enum:["https://api.dataplatform.ibm.com/schemas/common-pipeline/datarecord-metadata/datarecord-metadata-v2-schema.json"],type:"string"},type:{description:"Always 'struct' for datarecord schema",type:"string"},fields:{description:"Array of field definitions",type:"array",minItems:0,items:{$ref:"#/definitions/field"},uniqueItems:!0},struct_types:{description:"The list of custom struct types to be used as field types",type:"object",patternProperties:{".":{type:"object",properties:{fields:{description:"Array of field definitions",type:"array",minItems:0,items:{$ref:"#/definitions/field"},uniqueItems:!0}}}}}},required:["id","fields"]},field:{description:"Definition of a datarecord field",type:"object",properties:{name:{description:"Field name. Must be unique within the datarecord",type:"string"},type:{description:"Field type. Can be a primitive type (string, integer, double, date, time, timestamp, binary, boolean, array[type], map[type, type]. The type can also be a reference to a struct_type declaration.)",type:"string"},nullable:{description:"Whether or not one can place null values into the field",type:"boolean",default:!1},metadata:{$ref:"#/definitions/metadata"}},required:["name","type"]},metadata:{description:"Additional field metadata",type:"object",properties:{description:{description:"Field description",type:"string"},measure:{description:"Field measurement level",enum:["range","discrete","flag","set","ordered-set","typeless","collection","geospatial","default"]},modeling_role:{description:"Field role for modeling",enum:["input","target","both","none","partition","split","frequency","record-id"]},max_length:{description:"Maximum length for fields. Length is unlimited when not present",type:"number"},decimal_precision:{description:"Precision for decimal types",type:"number"},decimal_scale:{description:"Scale for decimal types",type:"number"},values:{description:"Array of unique categorical values for the column",type:"array",minItems:0,items:{description:"A value discovered in the data",type:"string"},uniqueItems:!0},range:{description:"Minimum and maximum discovered values for scalar data",type:"object",properties:{min:{description:"Lowest value discovered in the data",type:"number"},max:{description:"Highest value discovered in the data",type:"number"}},required:["min","max"]},runtime_type:{description:"Type of runtime",type:"string"}},required:[]}}},yu={$schema:"http://json-schema.org/draft-04/schema#",type:"object",description:"Common Canvas palette schema",id:"http://api.dataplatform.ibm.com/schemas/common-canvas/palette/palette-v2-schema.json",version:{description:"Palette schema version",enum:["2.0"]},properties:{categories:{description:"Array of palette categories",type:"array",minItems:0,items:{type:"object",properties:{category:{description:"The palette category that the items belong within",type:"string"},label:{description:"Category label",type:"string"},image:{description:"Encoded image or image reference for the category",type:"string"},nodetypes:{description:"Array of nodes within the current category",type:"array",items:{type:"object",properties:{label:{description:"Node label",type:"string"},description:{description:"Node description",type:"string"},type:{description:"Node classification type",enum:["binding","execution_node","super_node","model_node"]},operator_id_ref:{description:"Unique node type identifier",type:"string"},image:{description:"Encoded image or image reference for the node",type:"string"},subDiagramId:{description:"Optional sub diagram identifier.",type:"string"},input_ports:{description:"Array of node input ports",type:"array",minItems:0,items:{$ref:"#/definitions/port"}},output_ports:{description:"Array of node output ports",type:"array",minItems:0,items:{$ref:"#/definitions/port"}}},required:["label","image"]}}},required:["category","label"]}}},definitions:{port:{description:"Defines a node port for links",type:"object",properties:{id:{description:"Port identifier",type:"string"},label:{description:"Port long label",type:"string"},cardinality:{description:"Property to capture how many connections are allowed for this port, e.g., min: 1, max:1 implies you must supply 1 and only 1; min:0, max:1 implies it is optional and a max of one, min:0, max:-1 means it is optional and you can may have any number of connections. The default value is 1:1 for inputs and 1:-1 for outputs.",type:"object",properties:{min:{description:"Minimum data sets that are required for this port",type:"integer",default:1},max:{description:"Maximum data sets that are allowed on this port. A negative value indicates unlimited. The default value is 1 for inputs and -1 for outputs.",type:"integer"}},additionalProperties:!1}},required:["id"]}}},vu={$schema:"https://json-schema.org/draft-04/schema#",description:"WDP Pipeline Flow Schema",type:"object",id:"https://api.dataplatform.ibm.com/schemas/common-pipeline/pipeline-flow/pipeline-flow-v3-schema.json",properties:{doc_type:{description:"Document type",type:"string"},version:{description:"Pipeline-flow schema version",enum:["3.0"]},json_schema:{description:"Refers to the JSON schema used to validate documents of this type",enum:["http://api.dataplatform.ibm.com/schemas/common-pipeline/pipeline-flow/pipeline-flow-v3-schema.json","https://api.dataplatform.ibm.com/schemas/common-pipeline/pipeline-flow/pipeline-flow-v3-schema.json"]},open_with_tool:{description:"Preferred authoring application",type:"string"},id:{description:"Document identifier, GUID recommended",type:"string"},parameters:{description:"Parameters for the flow document",type:"object",properties:{},additionalProperties:!0},primary_pipeline:{description:"Reference to the primary (main) pipeline flow within the document",type:"string"},pipelines:{description:"Array of pipelines",type:"array",minItems:1,items:{$ref:"#/definitions/pipeline_def"},uniqueItems:!0},schemas:{description:"Array of data record schemas used in the document",type:"array",minItems:0,items:{$ref:"https://api.dataplatform.ibm.com/schemas/common-pipeline/datarecord-metadata/datarecord-metadata-v3-schema.json#/definitions/record_schema"},uniqueItems:!0},runtimes:{description:"Array of runtime objects referred to in the document",type:"array",minItems:0,items:{$ref:"#/definitions/runtime_def"},uniqueItems:!0},external_paramsets:{description:"Array of parameter set references",type:"array",minItems:0,items:{$ref:"https://api.dataplatform.ibm.com/schemas/common-pipeline/parameters/parametersets-v3-schema.json#/definitions/paramset_ref"},uniqueItems:!0},app_data:{description:"Object containing app-specific data",type:"object",properties:{ui_data:{$ref:"https://api.dataplatform.ibm.com/schemas/common-pipeline/pipeline-flow/pipeline-flow-ui-v3-schema.json#/definitions/pipeline_overview_def"}},additionalProperties:!0}},required:["doc_type","version","primary_pipeline","pipelines"],additionalProperties:!1,definitions:{pipeline_def:{description:"Definition of a single pipeline flow",type:"object",properties:{id:{description:"Unique identifier",type:"string"},description:{description:"Deprecated - use description in pipeline-flow-ui-v3-schema.json#/definitions/pipeline_def instead.",type:"string",deprecated:!0},name:{description:"User-readable name",type:"string"},runtime_ref:{description:"Reference to the id of the runtime associated with the operations in the current pipeline",type:"string"},nodes:{description:"Array of pipeline nodes",type:"array",minItems:0,items:{$ref:"#/definitions/node_type_def"},uniqueItems:!0},parameters:{description:"Parameters for the pipeline",type:"object",properties:{},additionalProperties:!0},app_data:{description:"Object containing app-specific data",type:"object",properties:{ui_data:{$ref:"https://api.dataplatform.ibm.com/schemas/common-pipeline/pipeline-flow/pipeline-flow-ui-v3-schema.json#/definitions/pipeline_def"}},additionalProperties:!0}},required:["id","runtime_ref","nodes"],additionalProperties:!1},node_type_def:{oneOf:[{$ref:"#/definitions/execution_node_def"},{$ref:"#/definitions/supernode_def"},{$ref:"#/definitions/binding_entry_node_def"},{$ref:"#/definitions/binding_exit_node_def"},{$ref:"#/definitions/model_node_def"}]},execution_node_def:{description:"Definition of a single execution pipeline node",type:"object",properties:{id:{description:"Unique identifier for node within the current pipeline",type:"string"},description:{description:"Deprecated - use description in pipeline-flow-ui-v3-schema.json#/definitions/node_info_def instead.",type:"string",deprecated:!0},type:{description:"Node type - always 'execution_node' for non-model pipeline elements",enum:["execution_node"]},op:{description:"Operator type identifier",type:"string"},inputs:{$ref:"#/definitions/ports_def"},outputs:{$ref:"#/definitions/ports_def"},parameters:{description:"Input parameters for the operator",type:"object",properties:{},additionalProperties:!0},runtime_ref:{description:"Optional reference to the id of the runtime associated with the current node",type:"string"},app_data:{description:"Object containing app-specific data",type:"object",properties:{ui_data:{$ref:"https://api.dataplatform.ibm.com/schemas/common-pipeline/pipeline-flow/pipeline-flow-ui-v3-schema.json#/definitions/node_info_def"}},additionalProperties:!0}},required:["id","type","op"],additionalProperties:!1},supernode_def:{description:"Definition of a supernode which serves as the entry point for a sub-pipeline",type:"object",properties:{id:{description:"Unique identifier for the supernode within the current pipeline",type:"string"},description:{description:"Deprecated - use description in pipeline-flow-ui-v3-schema.json#/definitions/node_info_def instead.",type:"string",deprecated:!0},type:{description:"Node type - always 'super_node' for supernode elements",enum:["super_node"]},open_with_tool:{description:"Name of the tool which can be used to view or edit the sub-flow for this supernode. The default is 'canvas'",type:"string"},subflow_ref:{description:"Refers to the sub-flow associated with this supernode",type:"object",properties:{url:{description:"Reference to an external sub-flow. When not present the sub-flow is assumed to be in the current document. A value of 'app_defined' indicates a sub-flow identifier is present, but the controlling application will serve up the sub-pipeline in the form of a new pipeline-flow document (no sub-flow is present in the document).",type:"string"},pipeline_id_ref:{description:"Sub-flow identifier reference",type:"string"}},required:["pipeline_id_ref"]},inputs:{$ref:"#/definitions/bound_ports_def"},outputs:{$ref:"#/definitions/bound_ports_def"},parameters:{description:"Input parameters for the supernode",type:"object",properties:{},additionalProperties:!0},app_data:{description:"Object containing app-specific data",type:"object",properties:{ui_data:{$ref:"https://api.dataplatform.ibm.com/schemas/common-pipeline/pipeline-flow/pipeline-flow-ui-v3-schema.json#/definitions/node_info_def"}},additionalProperties:!0}},required:["id","type","subflow_ref"],additionalProperties:!1},binding_entry_node_def:{description:"Defines an entry point (source) for a pipeline. Bindings can be concrete: the concrete_binding element is present on the port; or bindings can be abstract: bindings are performed externally via configuration or a wrapper document.",type:"object",properties:{id:{description:"Unique identifier for the binding within the current pipeline",type:"string"},description:{description:"Deprecated - use description in pipeline-flow-ui-v3-schema.json#/definitions/node_info_def instead.",type:"string",deprecated:!0},type:{description:"Node type - always 'binding' for binding elements",enum:["binding"]},outputs:{$ref:"#/definitions/ports_def"},app_data:{description:"Object containing app-specific data",type:"object",properties:{ui_data:{$ref:"https://api.dataplatform.ibm.com/schemas/common-pipeline/pipeline-flow/pipeline-flow-ui-v3-schema.json#/definitions/node_info_def"}},additionalProperties:!0},connection:{$ref:"https://api.dataplatform.ibm.com/schemas/common-pipeline/pipeline-connection/pipeline-connection-v3-schema.json#/definitions/common_pipeline_connection_def"},data_asset:{$ref:"https://api.dataplatform.ibm.com/schemas/common-pipeline/pipeline-connection/pipeline-connection-v3-schema.json#/definitions/common_pipeline_data_asset_def"},op:{description:"Binding node type identifier",type:"string"},parameters:{description:"Parameters for the binding entry node",type:"object",properties:{},additionalProperties:!0}},required:["id","type","outputs"],additionalProperties:!1},binding_exit_node_def:{description:"Defines an exit point (sink) for a pipeline. Bindings can be concrete: the concrete_binding element is present on the port; or bindings can be abstract: bindings are performed externally via configuration or a wrapper document.",type:"object",properties:{id:{description:"Unique identifier for the binding within the current pipeline",type:"string"},description:{description:"Deprecated - use description in pipeline-flow-ui-v3-schema.json#/definitions/node_info_def instead.",type:"string",deprecated:!0},type:{description:"Node type - always 'binding' for binding elements",enum:["binding"]},inputs:{$ref:"#/definitions/ports_def"},outputs:{description:"An optional set of output ports, typically used for directing error information out of the binding node.",$ref:"#/definitions/ports_def"},app_data:{description:"Object containing app-specific data",type:"object",properties:{ui_data:{$ref:"https://api.dataplatform.ibm.com/schemas/common-pipeline/pipeline-flow/pipeline-flow-ui-v3-schema.json#/definitions/node_info_def"}},additionalProperties:!0},connection:{$ref:"https://api.dataplatform.ibm.com/schemas/common-pipeline/pipeline-connection/pipeline-connection-v3-schema.json#/definitions/common_pipeline_connection_def"},data_asset:{$ref:"https://api.dataplatform.ibm.com/schemas/common-pipeline/pipeline-connection/pipeline-connection-v3-schema.json#/definitions/common_pipeline_data_asset_def"},op:{description:"Binding node type identifier",type:"string"},parameters:{description:"Parameters for the binding exit node",type:"object",properties:{},additionalProperties:!0}},required:["id","type","inputs"],additionalProperties:!1},model_node_def:{description:"Definition of a single predictive model node",type:"object",properties:{id:{description:"Unique identifier for the model within the current pipeline",type:"string"},description:{description:"Deprecated - use description in pipeline-flow-ui-v3-schema.json#/definitions/node_info_def instead.",type:"string",deprecated:!0},type:{description:"Node type - always 'model_node' for model pipeline elements",enum:["model_node"]},model_ref:{description:"Reference to the binary model",type:"string"},inputs:{$ref:"#/definitions/ports_def"},outputs:{$ref:"#/definitions/ports_def"},op:{description:"Node type identifier of modeling node that created this model.",type:"string"},parameters:{description:"Input parameters for the operator",type:"object",properties:{},additionalProperties:!0},runtime_ref:{description:"Reference to the runtime associated with the current node",type:"string"},app_data:{description:"Object containing app-specific data",type:"object",properties:{ui_data:{$ref:"https://api.dataplatform.ibm.com/schemas/common-pipeline/pipeline-flow/pipeline-flow-ui-v3-schema.json#/definitions/node_info_def"}},additionalProperties:!0}},required:["id","type","inputs"],additionalProperties:!1},port_def:{description:"Port definition (input/output) on a node",type:"object",properties:{id:{description:"Unique identifier",type:"string"},schema_ref:{description:"Optional data record schema reference associated with the port",type:"string"},links:{description:"Array of links going into the node. Applies to input ports and exit bindings only.",type:"array",minItems:0,items:{$ref:"#/definitions/link_def"},uniqueItems:!0},parameters:{description:"Parameters for the port",type:"object",properties:{},additionalProperties:!0},app_data:{description:"Object containing app-specific data",type:"object",properties:{ui_data:{$ref:"https://api.dataplatform.ibm.com/schemas/common-pipeline/pipeline-flow/pipeline-flow-ui-v3-schema.json#/definitions/port_info_def"}},additionalProperties:!0}},required:["id"],additionalProperties:!1},ports_def:{type:"array",minItems:0,items:{$ref:"#/definitions/port_def"},uniqueItems:!0},bound_ports_def:{type:"array",minItems:0,items:{$ref:"#/definitions/bound_port_def"},uniqueItems:!0},bound_port_def:{description:"Port definition (input/output) on a node with optional pipeline port binding for supernodes",type:"object",properties:{id:{description:"Unique identifier",type:"string"},schema_ref:{description:"Optional data record schema associated with the port",type:"string"},links:{description:"Array of links going into the node. Applies to input ports and exit bindings only.",type:"array",minItems:1,items:{$ref:"#/definitions/link_def"},uniqueItems:!0},subflow_node_ref:{description:"Optional node id binding within the current document.",type:"string"},parameters:{description:"Parameters for the binding port",type:"object",properties:{},additionalProperties:!0},app_data:{description:"Object containing app-specific data",type:"object",properties:{ui_data:{$ref:"https://api.dataplatform.ibm.com/schemas/common-pipeline/pipeline-flow/pipeline-flow-ui-v3-schema.json#/definitions/port_info_def"}},additionalProperties:!0}},required:["id"],additionalProperties:!1},link_def:{description:"Node link definition",type:"object",properties:{id:{description:"Unique id of this link within the pipelineFlow. If omitted a new link id will be generated.",type:"string"},node_id_ref:{description:"id of a node this link connects to",type:"string"},port_id_ref:{description:"optional port id of a node this link connects to",type:"string"},link_name:{description:"optional link name (used in parameter sets when there are multiple input sources)",type:"string"},type_attr:{description:"Link type attribute",type:"string"},description:{description:"Deprecated - use description in pipeline-flow-ui-v3-schema.json#/definitions/node_link_info_def instead.",type:"string"},app_data:{description:"Object containing app-specific data",type:"object",properties:{ui_data:{$ref:"https://api.dataplatform.ibm.com/schemas/common-pipeline/pipeline-flow/pipeline-flow-ui-v3-schema.json#/definitions/node_link_info_def"}},additionalProperties:!0}},required:["node_id_ref"],additionalProperties:!1},runtime_def:{description:"Runtime associated with the operations in the current pipeline",type:"object",properties:{id:{description:"Unique internal runtime identifier",type:"string"},name:{description:"The runtime name",type:"string"},version:{description:"The runtime version. When not present the latest version is assumed",type:"string"},app_data:{description:"Object containing app-specific data",type:"object",properties:{ui_data:{$ref:"https://api.dataplatform.ibm.com/schemas/common-pipeline/pipeline-flow/pipeline-flow-ui-v3-schema.json#/definitions/runtime_info_def"}},additionalProperties:!0}},required:["id","name"]}}},mu={$schema:"https://json-schema.org/draft-04/schema#",description:"WDP Pipeline Flow UI Schema. Defines UI-only constructs for pipeline flow documents.",type:"object",id:"https://api.dataplatform.ibm.com/schemas/common-pipeline/pipeline-flow/pipeline-flow-ui-v3-schema.json",properties:{},additionalProperties:!0,definitions:{pipeline_overview_def:{description:"Top level UI information",type:"object",properties:{name:{description:"User-defined name",type:"string"},description:{description:"User-defined description",type:"string"},class_name:{description:"CSS class name",type:"string"}},additionalProperties:!0},pipeline_def:{description:"Pipeline level UI information",type:"object",properties:{description:{description:"User-defined description",type:"string"},zoom:{oneOf:[{description:"Deprecated - use zoom object instead. Scale factor as a percentage. 100% is standard scale amount. Smaller values zoom out. Larger values zoom in.",type:"integer",deprecated:!0},{description:"A zoom object containing translation and scale amounts.",type:"object",properties:{x:{description:"Horizontal translation amount. Positive value moves right, negative to the left.",type:"number"},y:{description:"Vertical translation amount. Positive value moves down, negative moves up.",type:"number"},k:{description:"Scale amount. 1.0 is the standard scale amount. Smaller values zoom out. Larger values zoom in.",type:"number",minimum:.2,maximum:1.8}},required:["x","y","k"],additionalProperties:!1}]},comments:{description:"Array of Comments, optionally associated with nodes",type:"array",minItems:0,items:{$ref:"#/definitions/comment_def"},uniqueItems:!0}},additionalProperties:!0},port_info_def:{description:"Additional UI info for ports",type:"object",properties:{cardinality:{description:"Property to capture how many data assets are allowed for this port, e.g., min: 1, max:1 implies you must supply 1 and only 1; min:0, max:1 implies it is optional and a max of one, min:0, max:-1 means it is optional and you can may have any number of data assets. The default value is 1:1 for inputs and 1:-1 for outputs.",type:"object",properties:{min:{description:"Minimum data sets that are required for this port",type:"integer",default:1},max:{description:"Maximum data sets that are allowed on this port. A negative value indicates unlimited. The default value is 1 for inputs and -1 for outputs.",type:"integer"}},additionalProperties:!1},class_name:{description:"CSS class name",type:"string"},style:{description:"A 'style spec' object containing CSS strings to be applied to the SVG objects of the port.",type:["string","object"]},label:{description:"Port name",type:"string"}},additionalProperties:!0},node_info_def:{description:"object with app-specific UI-information",type:"object",properties:{label:{description:"User-defined label",type:"string"},description:{description:"User-defined description",type:"string"},class_name:{description:"CSS class name",type:"string"},style:{description:"A 'style spec' object containing CSS strings to be applied to the SVG objects of the node.",type:["string","object"]},image:{description:"Image name (do not embed images inline!)",type:"string"},x_pos:{description:"x-position",type:"number"},y_pos:{description:"y-position",type:"number"},is_expanded:{description:"Indicates whether a supernode is shown in expanded state or as a regular node.",type:"boolean"},expanded_height:{description:"Height of expanded supernode. If not provided an appropriate height is calculated.",type:"number"},expanded_width:{description:"Width of expanded supernode. If not provided an appropriate width is calculated.",type:"number"},attributes:{description:"additional attributes",type:"string"},associations:{description:"Array of non-data node linkage",type:"array",minItems:0,items:{$ref:"#/definitions/association_def"}},messages:{description:"An array of messages for the node",type:"array",minItems:0,items:{$ref:"#/definitions/message_def"},uniqueItems:!0},ui_parameters:{description:"UI only parameter values for the node",type:"object",properties:{},additionalProperties:!0},decorations:{description:"Array of decorations used to decorate nodes",type:"array",minItems:0,items:{$ref:"#/definitions/decoration_def"},uniqueItems:!0}},additionalProperties:!0},node_link_info_def:{description:"object with app-specific UI-information",type:"object",properties:{description:{description:"User-defined description",type:"string"},class_name:{description:"CSS class name",type:"string"},style:{description:"A 'style spec' object containing CSS strings to be applied to the SVG objects of the node to node link.",type:["string","object"]},decorations:{description:"Array of decorations used to decorate node links",type:"array",minItems:0,items:{$ref:"#/definitions/decoration_def"},uniqueItems:!0}},additionalProperties:!0},runtime_info_def:{description:"Runtime information",type:"object",properties:{},additionalProperties:!0},association_def:{description:"Non-data link",type:"object",properties:{id:{description:"Association identifier",type:"string"},node_ref:{description:"Target node id",type:"string"},class_name:{description:"CSS class name for link styling",type:"string"},style:{description:"A 'style spec' object containing CSS strings to be applied to the SVG objects of the association link.",type:["string","object"]},decorations:{description:"Array of decorations used to decorate association links",type:"array",minItems:0,items:{$ref:"#/definitions/decoration_def"},uniqueItems:!0}},required:["id","node_ref"],additionalProperties:!1},decoration_def:{description:"Decoration used to decorate a node",type:"object",properties:{id:{description:"An identifier used to identify the decoration",type:"string"},hotspot:{description:"Indicates whether the decorator is a hotspot or not. ie does it send an event to consuming app. when clicked",type:"boolean"},class_name:{description:"CSS class name for decoration styling",type:"string"},position:{description:"Indicates an anchor point on the node or link from which the decoration will be displayed. If x_pos and y_pos are not provided the decoration is displayed with a default offset from this position.",enum:["topLeft","topCenter","topRight","middleLeft","middleCenter","middleRight","bottomLeft","bottomCenter","bottomRight","source","middle","target"]},x_pos:{description:"X position of the decorator relative to the node's position field. If position is not provided it is relative to the 'topLeft' position",type:"integer"},y_pos:{description:"Y position of the decorator relative to the node's position field. If position is not provided it is relative to the 'topLeft' position",type:"integer"},image:{description:"Image displayed at the decoration position. Provide either this or a label.",type:"string"},label:{description:"Label displayed at the decoration position. Provide either this or an image.",type:"string"}}},message_def:{description:"Node message definition",type:"object",properties:{id_ref:{description:"Name of the parameter that has the message",type:"string"},validation_id:{description:"Validation identifier from the fail_message validation section.",type:"string"},type:{description:"Type of message",enum:["info","error","warning"]},text:{description:"Message string",type:"string"}},required:["id_ref","type","text"]},comment_def:{type:"object",properties:{id:{description:"Comment identifier. Must be unique.",type:"string"},x_pos:{description:"Horizontal comment position",type:"number"},y_pos:{description:"Vertical comment position",type:"number"},width:{description:"Comment width",type:"number",minimum:10},height:{description:"Comment height",type:"number",minimum:10},class_name:{description:"CSS class(es) to apply to the comment",type:"string"},style:{description:"A 'style spec' object containing CSS strings to be applied to the SVG objects of the comment.",type:["string","object"]},attributes:{description:"Optional attributes to be added to this element. For example: \"attributes\": \"attr1='value1'; attr2='value2'\"",type:"string"},content:{description:"Comment content",type:"string"},associated_id_refs:{description:"Optional array of associated node id references",type:"array",minItems:0,items:{$ref:"#/definitions/comment_link_def"},uniqueItems:!0}},required:["id","x_pos","y_pos","width","height"],additionalProperties:!0},comment_link_def:{description:"Comment link definition",type:"object",properties:{node_ref:{description:"Node reference",type:"string"},class_name:{description:"CSS class name for link styling",type:"string"},style:{description:"A 'style spec' object containing CSS strings to be applied to the SVG objects of the comment link.",type:["string","object"]}},required:["node_ref"],additionalProperties:!0}}},bu={$schema:"https://json-schema.org/draft-04/schema#",id:"https://api.dataplatform.ibm.com/schemas/common-pipeline/pipeline-connection/pipeline-connection-v3-schema.json",title:"Watson Data Platform Pipeline Connection Schema",description:"Connection schema for pipelines in the Watson Data Platform",definitions:{common_pipeline_connection_def:{description:"Details of the connection to use for a pipeline binding node.",properties:{name:{description:"A name tag for disambiguating connections",type:"string"},app_data:{$ref:"#/definitions/app_data_def"},ref:{description:"A reference to a connection by ID.",type:"string"},catalog_ref:{description:"If ref is set, this refers to the ID of the catalog which contains the connection. If neither this attribute nor project_ref are specified, the connection will be assumed to exist in the project or catalog which contains the pipeline.",type:"string"},project_ref:{description:"If ref is set, this refers to the ID of the project which contains the connection. If neither this attribute nor catalog_ref are specified, the connection will be assumed to exist in the project or catalog which contains the pipeline.",type:"string"},properties:{description:"The properties for the connection. The specific properties allowed depend on the type of connection referenced.",type:"object"}},required:["ref"],type:"object"},common_pipeline_data_asset_def:{description:"Details of the data asset contained in a catalog or project to use for a pipeline binding node.",properties:{app_data:{$ref:"#/definitions/app_data_def"},ref:{description:"A reference to a data asset by ID.",type:"string"},catalog_ref:{description:"If ref is set, this refers to the ID of the catalog which contains the data asset. If neither this attribute nor project_ref are specified, the data asset will be assumed to exist in the project or catalog which contains the pipeline.",type:"string"},project_ref:{description:"If ref is set, this refers to the ID of the project which contains the data asset. If neither this attribute nor catalog_ref are specified, the data asset will be assumed to exist in the project or catalog which contains the pipeline.",type:"string"},properties:{description:"Properties controlling how the data asset is used.",type:"object",additionalProperties:{type:"object"},properties:{attachment_ref:{description:"The ID of the data asset attachment to use. If not specified and used as a source, the first suitable attachment found will be used. If not specified and used as a target, a new attachment will be created.",type:"string"},name:{description:"Specifies the name of the data asset to read, create or update if ref is unset.",type:"string",default:!1},no_write_schema:{description:"When used as a target, whether to update the data asset with the schema when a run completes or not (will be automatically updated if not supplied by caller).",type:"boolean",default:!1},no_write_status:{description:"When used as a target, whether to update the data asset with the status when a run completes or not (will be automatically updated if not supplied by caller).",type:"boolean",default:!1}}}},type:"object"},app_data_def:{description:"Object containing app-specific data",type:"object",properties:{},additionalProperties:!0}}},_u={$schema:"https://json-schema.org/draft-04/schema#",type:"object",description:"Common Canvas palette schema",id:"https://api.dataplatform.ibm.com/schemas/common-canvas/palette/palette-v3-schema.json",properties:{version:{description:"Palette schema version",enum:["3.0"]},categories:{description:"Array of palette categories",type:"array",minItems:0,items:{$ref:"#/definitions/category_def"},uniqueItems:!0}},additionalProperties:!1,definitions:{category_def:{description:"Palette Category",type:"object",properties:{id:{description:"ID of the category",type:"string"},label:{description:"Category label",type:"string"},description:{description:"Category description",type:"string"},empty_text:{description:"When set to a non-empty string and node_types is empty, is used to indicate that no nodes exist",type:"string"},loading_text:{description:"When set to a non-empty string, causes a loading indicator to appear with this text as a label",type:"string"},image:{description:"Encoded image or image reference for the category",type:"string"},node_types:{description:"Array of pipeline node types",type:"array",minItems:0,items:{$ref:"https://api.dataplatform.ibm.com/schemas/common-pipeline/pipeline-flow/pipeline-flow-v3-schema.json#/definitions/node_type_def"},uniqueItems:!0}},required:["id","label"],additionalProperties:!1}}},ku=new Zn("SchemaValidator"),Pu=require("jsonschema").Validator;function Iu(e,t){switch(t){case 1:var n=function(){var e=new Pu,t="http://api.dataplatform.ibm.com/schemas/common-pipeline/";return e.addSchema(lu,t+"pipeline-flow/pipeline-flow-ui-schema.json#/definitions/pipeline_overview_def"),e.addSchema(lu,t+"pipeline-flow/pipeline-flow-ui-schema.json#/definitions/pipeline_def"),e.addSchema(lu,t+"pipeline-flow/pipeline-flow-ui-schema.json#/definitions/port_info_def"),e.addSchema(lu,t+"pipeline-flow/pipeline-flow-ui-schema.json#/definitions/node_info_def"),e.addSchema(cu,t+"pipeline-connection/pipeline-connection-v1-schema.json#/definitions/common_pipeline_connection_def"),e.addSchema(cu,t+"pipeline-connection/pipeline-connection-v1-schema.json#/definitions/common_pipeline_data_asset_def"),e.addSchema(du,t+"datarecord-metadata/datarecord-metadata-v1-schema.json#/definitions/record_schema"),e}();wu(e,su,"pipelineFlow",n);break;case 2:var i=function(){var e=new Pu,t="http://api.dataplatform.ibm.com/schemas/common-pipeline/";return e.addSchema(pu,t+"pipeline-flow/pipeline-flow-v2-schema.json"),e.addSchema(hu,t+"pipeline-flow/pipeline-flow-ui-v2-schema.json"),e.addSchema(fu,t+"pipeline-connection/pipeline-connection-v2-schema.json"),e.addSchema(gu,t+"datarecord-metadata/datarecord-metadata-v2-schema.json"),e}();wu(e,pu,"pipelineFlow",i);break;default:var o=Cu();wu(e,vu,"pipelineFlow",o)}}function Nu(e,t){switch(t){case 1:wu(e,uu,"palette",new Pu);break;case 2:wu(e,yu,"palette",new Pu);break;default:var n=Cu();wu(e,_u,"palette",n)}}function wu(e,t,n,i){ku.logStartTimer("Schema validation");var o=i.validate(e,t,{nestedErrors:!0});if(ku.logEndTimer("Schema validation"),ku.log("Schema "+n+" - validation result:"),ku.log(o),o&&o.errors&&o.errors.length>0)throw ku.error(o),o}function Cu(){var e=new Pu,t="http://api.dataplatform.ibm.com/schemas/common-pipeline/";return e.addSchema(vu,t+"pipeline-flow/pipeline-flow-v3-schema.json"),e.addSchema(mu,t+"pipeline-flow/pipeline-flow-ui-v3-schema.json"),e.addSchema(bu,t+"pipeline-connection/pipeline-connection-v3-schema.json"),e.addSchema(dt,t+"datarecord-metadata/datarecord-metadata-v3-schema.json"),e}function Su(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return Lu(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Lu(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,r=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return r=e.done,e},e:function(e){s=!0,a=e},f:function(){try{r||null==n.return||n.return()}finally{if(s)throw a}}}}function Lu(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}var xu=[function(e){return e},function(e){return Object.assign({},{version:"2.0"},e)},function(e){e.version="3.0";var t,n=Su(e.categories);try{for(n.s();!(t=n.n()).done;){var i=t.value;i.id=i.category,delete i.category,i.node_types=[];for(var o=0;o<i.nodetypes.length;o++){var a=i.nodetypes[o],r={id:""};r.type=a.type,"execution_node"===a.type||"binding"===a.type?r.op=a.operator_id_ref:"super_node"===a.type&&(a.open_with_tool&&(r.open_with_tool=a.open_with_tool),r.subflow_ref={pipeline_id_ref:a.subDiagramId}),a.input_ports&&a.input_ports.length>0&&(r.inputs=Eu(a.input_ports)),a.output_ports&&a.output_ports.length>0&&(r.outputs=Eu(a.output_ports)),r.parameters={},r.app_data={},r.app_data.ui_data={},r.app_data.ui_data.label=a.label,r.app_data.ui_data.description=a.description,r.app_data.ui_data.image=a.image,r.app_data.ui_data.x_pos=0,r.app_data.ui_data.y_pos=0,i.node_types.push(r)}delete i.nodetypes}}catch(e){n.e(e)}finally{n.f()}return e}];function Tu(e){var t;if(!e)throw new Error("Invalid palette document");if(e.version){if("string"!=typeof e.version||0===e.version.length)throw new Error("Invalid palette document: The 'version' attribute is missing or invalid");if(!(t=parseInt(e.version,10)))throw new Error("Invalid palette document: The 'version' attribute cannot be parsed")}else t=1;return t}function Eu(e){var t,n=[],i=Su(e);try{for(i.s();!(t=i.n()).done;){var o=t.value,a={};a.id=o.id,a.app_data={},a.app_data.ui_data={},o.cardinality&&(a.app_data.ui_data.cardinality=o.cardinality),a.app_data.ui_data.label=o.label,n.push(a)}}catch(e){i.e(e)}finally{i.f()}return n}function Ou(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return Du(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Du(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,r=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return r=e.done,e},e:function(e){s=!0,a=e},f:function(){try{r||null==n.return||n.return()}finally{if(s)throw a}}}}function Du(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}var ju=function(){function n(){e(this,n),this.logger=new Zn("Object Model");var t=this.getEmptyCanvasInfo();this.store=new ru(t),this.oldCanvas=null,this.idGeneratorHandler=null,this.selectionChangeHandler=null,this.layoutHandler=null}return t(n,[{key:"dispatch",value:function(e){this.store.dispatch(e)}},{key:"subscribe",value:function(e){return this.store.subscribe(e)}},{key:"setSchemaValidation",value:function(e){this.setCanvasConfig({schemaValidation:e})}},{key:"setSelectionChangeHandler",value:function(e){this.selectionChangeHandler=e}},{key:"setLayoutHandler",value:function(e){if(e!==this.layoutHandler){this.layoutHandler=e;var t=this.prepareNodes(this.getCanvasInfo().pipelines,this.getNodeLayout(),this.getCanvasLayout());this.store.dispatch({type:"REPLACE_PIPELINES",data:{pipelines:t}})}}},{key:"getStore",value:function(){return this.store.getStore()}},{key:"getUUID",value:function(){return Mt()}},{key:"setIdGeneratorHandler",value:function(e){this.idGeneratorHandler=e}},{key:"getUniqueId",value:function(e,t){var n;return this.idGeneratorHandler&&(n=this.idGeneratorHandler(e,t)),n||this.getUUID()}},{key:"clearPaletteData",value:function(){this.store.dispatch({type:"CLEAR_PALETTE_DATA"})}},{key:"setPaletteData",value:function(e){var t=xd.convertPaletteToPipelineFlowPalette(e);this.setPipelineFlowPalette(t)}},{key:"setPipelineFlowPalette",value:function(e){if(e&&!g(e)){var t=e;xd.isVersion0Palette(t)&&(t=xd.convertPaletteToPipelineFlowPalette(t));var n=this.validateAndUpgradePalette(t);this.store.dispatch({type:"SET_PALETTE_DATA",data:{content:n}})}else this.clearPaletteData()}},{key:"getPaletteData",value:function(){return this.store.getPaletteData()}},{key:"togglePalette",value:function(){this.isPaletteOpen()?this.closePalette():this.openPalette()}},{key:"openPalette",value:function(){this.store.dispatch({type:"SET_PALETTE_OPEN_STATE",data:{isOpen:!0}})}},{key:"openPaletteIfNecessary",value:function(e){e&&void 0===this.store.getPalette().isOpen&&void 0!==e.paletteInitialState&&(e.paletteInitialState?this.openPalette():this.closePalette())}},{key:"closePalette",value:function(){this.store.dispatch({type:"SET_PALETTE_OPEN_STATE",data:{isOpen:!1}})}},{key:"isPaletteOpen",value:function(){var e=this.store.getPalette().isOpen;return void 0!==e&&e}},{key:"setCategoryLoadingText",value:function(e,t){this.store.dispatch({type:"SET_CATEGORY_LOADING_TEXT",data:{categoryId:e,loadingText:t}})}},{key:"setCategoryEmptyText",value:function(e,t){this.store.dispatch({type:"SET_CATEGORY_EMPTY_TEXT",data:{categoryId:e,emptyText:t}})}},{key:"addNodeTypeToPalette",value:function(e,t,n,i,o){this.addNodeTypesToPalette([e],t,n,i,o)}},{key:"addNodeTypesToPalette",value:function(e,t,n,i,o){var a={nodeTypes:e,categoryId:t,categoryLabel:n,categoryDescription:i,categoryImage:o};this.store.dispatch({type:"ADD_NODE_TYPES_TO_PALETTE",data:a}),this.store.getCanvasConfig().schemaValidation&&Nu(this.getPaletteData(),3)}},{key:"removeNodesFromPalette",value:function(e,t){this.store.dispatch({type:"REMOVE_NODE_TYPES_FROM_PALETTE",data:{selObjectIds:e,categoryId:t}})}},{key:"convertNodeTemplate",value:function(e){var t=null;return e?((t=Ed.convertNode(e,this.getCanvasLayout())).type===G&&(t=this.convertPipelineData(t)),t):null}},{key:"convertPipelineData",value:function(e){var t,n=pt(e,"app_data.pipeline_data");if(n)t=e.subflow_ref.url?[]:Ed.convertPipelinesToCanvasInfoPipelines(n,this.getCanvasLayout()),t=this.cloneSupernodeContents(e,t);else{var i=this.createEmptyPipeline();t=[i],nt(e,"subflow_ref.pipeline_id_ref",i.id)}return nt(e,"app_data.pipeline_data",t),e}},{key:"getPaletteNode",value:function(e){var t=null;return e&&!g(this.getPaletteData())&&this.getPaletteData().categories.forEach((function(n){n.node_types.forEach((function(n){n.op===e&&(t=n)}))})),t}},{key:"getPaletteNodeById",value:function(e){var t=null;return g(this.getPaletteData())||this.getPaletteData().categories.forEach((function(n){n.node_types.forEach((function(n){n.id===e&&(t=n)}))})),t}},{key:"getCategoryForNode",value:function(e){var t=null;return this.getPaletteData().categories.forEach((function(n){n.node_types.forEach((function(i){i.op===e&&(t=n)}))})),t}},{key:"validateAndUpgradePalette",value:function(e){var t=ht(e),n=Tu(t);return this.store.getCanvasConfig().schemaValidation&&Nu(t,n),3!==n&&(t=function(e){for(var t=Math.max(Tu(e),1),n=ht(e),i=t;i<3;i++)n=xu[i](n);return n}(t),this.store.getCanvasConfig().schemaValidation&&Nu(t,3)),t}},{key:"getAPIPipeline",value:function(e){return new Rd(e||this.getCurrentBreadcrumb().pipelineId,this)}},{key:"getSelectionAPIPipeline",value:function(){var e=this.getSelectedPipelineId();return e?this.getAPIPipeline(e):null}},{key:"clearPipelineFlow",value:function(){this.setCanvasInfo(this.getEmptyCanvasInfo())}},{key:"setCanvas",value:function(e){this.oldCanvas=e;var t=xd.convertCanvasToCanvasInfo(e);this.setCanvasInfo(t)}},{key:"getCanvas",value:function(){return this.oldCanvas?Td.getCanvasBasedOnCanvasInfo(this.oldCanvas,this.getCanvasInfo()):{}}},{key:"getEmptyCanvasInfo",value:function(){var e=this.getUUID(),t=this.getUUID();return{doc_type:"pipeline",version:"3.0",json_schema:"http://api.dataplatform.ibm.com/schemas/common-pipeline/pipeline-flow/pipeline-flow-v3-schema.json",id:e,primary_pipeline:t,pipelines:[{id:t,runtime_ref:"",nodes:[],comments:[],links:[]}],schemas:[]}}},{key:"setPipelineFlow",value:function(e){if(e.objectData)this.setCanvas(e);else{var t=this.preparePipelineFlow(e);this.executeWithSelectionChange(this.store.dispatch,{type:"SET_CANVAS_INFO",canvasInfo:t,canvasInfoIdChanged:this.hasCanvasInfoIdChanged(t)})}}},{key:"ensurePipelineIsLoaded",value:function(e){var t=this.getSupernodePipelineUrl(e.targetObject),n=this.getSupernodePipelineId(e.targetObject);if(!this.isPipelineLoaded(n,t)){if(!e.externalPipelineFlow){var i="The external pipeline flow at '"+e.externalUrl+"' was not provided. Make sure you have implemented beforeEditActionHandler to support external pipeline flows.";throw this.logger.error(i),i}if(!this.flowContainsPipeline(e.externalPipelineFlow,n)){var o="The external pipeline flow '"+e.externalPipelineFlow.id+"' does not contain a pipeline with ID: "+n;throw this.logger.error(o),o}return this.addExternalPipelineFlow(e.externalPipelineFlow,t,e.targetObject,!0),!0}return!1}},{key:"getVisibleExpandedExternalSupernodes",value:function(){var e=this.getCurrentPipeline();return this.getVisibleExpandedExternalSupernodesForPipeline(e,this.getPipelines())}},{key:"getVisibleExpandedExternalSupernodesForPipeline",value:function(e,t){var n=this,i=[];return e.nodes.forEach((function(e){if(e.type===G&&e.is_expanded){var o=t.find((function(t){return t.id===n.getSupernodePipelineId(e)}));if(e.subflow_ref.url&&!o&&i.push(e),o){var a=n.getVisibleExpandedExternalSupernodesForPipeline(o,t);i=i.concat(a)}}})),i}},{key:"flowContainsPipeline",value:function(e,t){return!!e.pipelines&&e.pipelines.some((function(e){return e.id===t}))}},{key:"addExternalPipelineFlow",value:function(e,t,n){var i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o=this.preparePipelineFlow(e,n);o.pipelines.forEach((function(e){return e.parentUrl=t}));var a=Object.assign({},o);a.pipelines=[],a.url=t,this.store.dispatch({type:"ADD_EXTERNAL_PIPELINE_FLOW",newPipelineFlow:a,newPipelines:i?o.pipelines:[]})}},{key:"removeExternalPipelineFlow",value:function(e){this.store.dispatch({type:"REMOVE_EXTERNAL_PIPELINE_FLOW",externalUrl:e})}},{key:"createExternalPipelineFlowTemplate",value:function(e,t){return{doc_type:"pipeline",version:"3.0",json_schema:"https://api.dataplatform.ibm.com/schemas/common-pipeline/pipeline-flow/pipeline-flow-v3-schema.json",id:e,primary_pipeline:t,pipelines:[{id:"",runtime_ref:"",nodes:[]}],schemas:[],runtimes:[]}}},{key:"getExternalPipelineFlows",value:function(){return this.store.getExternalPipelineFlows()}},{key:"getExternalPipelineFlowsForPipelines",value:function(e){var t=this.getUniqueUrls(e);return this.getExternalPipelineFlowsForUrls(t)}},{key:"getUniqueUrls",value:function(e){var t=[];return e.forEach((function(e){e.parentUrl&&!t.includes(e.parentUrl)&&t.push(e.parentUrl)})),t}},{key:"getExternalPipelineFlowsForUrls",value:function(e){var t=this,n=[];return e.forEach((function(e){var i=t.getExternalPipelineFlow(e);i.url=e,n.push(i)})),n}},{key:"getExternalPipelineFlow",value:function(e){var t=this.store.getExternalPipelineFlow(e);if(t){delete t.url;var n=this.getCanvasInfo();t.pipelines=n.pipelines.filter((function(t){return t.parentUrl===e})),t.pipelines.forEach((function(e){return delete e.parentUrl})),t=Od.createPipelineFlow(t),this.store.getCanvasConfig().schemaValidation&&Iu(t)}return t}},{key:"setParentUrl",value:function(e,t){this.store.dispatch({type:"SET_PIPELINE_PARENT_URL",data:{pipelines:e,url:t}})}},{key:"replaceSupernodeAndPipelines",value:function(e){this.store.dispatch({type:"REPLACE_SN_AND_PIPELINES",data:e})}},{key:"preparePipelineFlow",value:function(e,t){var n=this.validateAndUpgrade(e),i=Ed.convertPipelineFlowToCanvasInfo(n,this.getCanvasLayout());return i.pipelines=this.prepareNodes(i.pipelines,this.getNodeLayout(),this.getCanvasLayout(),t),i}},{key:"prepareNodes",value:function(e,t,n,i){var o=this;return this.setSupernodesBindingStatus(e,i).map((function(e){return o.setPipelineObjectAttributes(e,t,n)}))}},{key:"setSupernodesBindingStatus",value:function(e,t){var n=this;return e.forEach((function(e){e.nodes&&e.nodes.forEach((function(e){delete e.isSupernodeInputBinding,delete e.isSupernodeOutputBinding}))})),t&&this.setSupernodesBindingStatusForNode(t,e),e.forEach((function(t){t.nodes&&cl.filterSupernodes(t.nodes).forEach((function(t){n.setSupernodesBindingStatusForNode(t,e)}))})),e}},{key:"setSupernodesBindingStatusForNode",value:function(e,t){var n=this,i=this.getSupernodePipelineId(e);i&&(e.inputs&&e.inputs.forEach((function(e){if(e.subflow_node_ref){var o=n.findNode(e.subflow_node_ref,i,t);o&&(o.isSupernodeInputBinding=!0)}})),e.outputs&&e.outputs.forEach((function(e){if(e.subflow_node_ref){var o=n.findNode(e.subflow_node_ref,i,t);o&&(o.isSupernodeOutputBinding=!0)}})))}},{key:"setPipelineObjectAttributes",value:function(e,t,n){var i=this,o=Object.assign({},e);return o.nodes?o.nodes=o.nodes.map((function(e){return i.setNodeAttributesWithLayout(e,t,n)})):o.nodes=[],o.comments?o.comments=o.comments.map((function(e){return i.setCommentAttributesWithLayout(e,n)})):o.comments=[],o}},{key:"setNodeAttributes",value:function(e){return this.setNodeAttributesWithLayout(e,this.getNodeLayout(),this.getCanvasLayout())}},{key:"setCommentAttributes",value:function(e){return this.setCommentAttributesWithLayout(e,this.getCanvasLayout())}},{key:"setNodeAttributesWithLayout",value:function(e,t,n){var i=Object.assign({},e);return i=this.setNodeLayoutAttributes(i,t),i="TopBottom"===n.linkDirection||"BottomTop"===n.linkDirection?this.setNodeDimensionAttributesVertical(i,n):this.setNodeDimensionAttributesLeftRight(i,n),n.snapToGridType!==ie&&n.snapToGridType!==oe||(i.x_pos=cl.snapToGrid(i.x_pos,n.snapToGridXPx),i.y_pos=cl.snapToGrid(i.y_pos,n.snapToGridYPx)),i}},{key:"setCommentAttributesWithLayout",value:function(e,t){var n=Object.assign({},e);return t.snapToGridType!==ie&&t.snapToGridType!==oe||(n.x_pos=cl.snapToGrid(n.x_pos,t.snapToGridXPx),n.y_pos=cl.snapToGrid(n.y_pos,t.snapToGridYPx)),n}},{key:"setNodeLayoutAttributes",value:function(e,t){if(e.layout=t,this.layoutHandler){var n=this.layoutHandler(e);if(n&&!g(n)){var i=cl.getCombinedDecorations(e.layout.decorations,n.decorations);e.layout=Object.assign({},e.layout,n,{decorations:i})}}return e}},{key:"setNodeDimensionAttributesLeftRight",value:function(e,t){return e.inputPortsHeight=e.inputs?e.inputs.length*(2*e.layout.portArcRadius)+(e.inputs.length-1)*e.layout.portArcSpacing+2*e.layout.portArcOffset:0,e.outputPortsHeight=e.outputs?e.outputs.length*(2*e.layout.portArcRadius)+(e.outputs.length-1)*e.layout.portArcSpacing+2*e.layout.portArcOffset:0,e.height=Math.max(e.inputPortsHeight,e.outputPortsHeight,e.layout.defaultNodeHeight),e.type===G&&e.is_expanded&&(e.height+=t.supernodeTopAreaHeight+t.supernodeSVGAreaPadding,e.expanded_height&&(e.expanded_height=Math.max(e.expanded_height,e.height))),e.width=e.layout.defaultNodeWidth,e.type===G&&e.is_expanded&&(e.width=cl.getSupernodeExpandedWidth(e,t),e.height=cl.getSupernodeExpandedHeight(e,t)),e}},{key:"setNodeDimensionAttributesVertical",value:function(e,t){return e.inputPortsWidth=e.inputs?e.inputs.length*(2*e.layout.portArcRadius)+(e.inputs.length-1)*e.layout.portArcSpacing+2*e.layout.portArcOffset:0,e.outputPortsWidth=e.outputs?e.outputs.length*(2*e.layout.portArcRadius)+(e.outputs.length-1)*e.layout.portArcSpacing+2*e.layout.portArcOffset:0,e.width=Math.max(e.inputPortsWidth,e.outputPortsWidth,e.layout.defaultNodeWidth),e.type===G&&e.is_expanded&&(e.width+=2*t.supernodeSVGAreaPadding,e.expanded_width&&(e.expanded_width=Math.max(e.expanded_width,e.width))),e.height=e.layout.defaultNodeHeight,e.type===G&&e.is_expanded&&(e.width=cl.getSupernodeExpandedWidth(e,t),e.height=cl.getSupernodeExpandedHeight(e,t)),e}},{key:"validateAndUpgrade",value:function(e){var t=ht(e),n=Ft(t);return this.store.getCanvasConfig().schemaValidation&&Iu(t,n),n!==zt&&(t=Bt(t),this.store.getCanvasConfig().schemaValidation&&Iu(t,zt)),t}},{key:"getCanvasInfoPipeline",value:function(e){var t=this.getCanvasInfo();if(!t)return null;var n=e;n||(n=this.getPrimaryPipelineId());var i=t.pipelines.find((function(e){return e.id===n}));return void 0===i?null:i}},{key:"getDescendantPipelineIds",value:function(e){var t=this,n=[];return this.getAPIPipeline(e).getSupernodes().forEach((function(e){var i=t.getSupernodePipelineId(e);i&&(n.push(i),n=n.concat(t.getDescendantPipelineIds(i)))})),n}},{key:"getDescendantPipelinesForSupernodes",value:function(e){var t=this,n=[];return e.forEach((function(e){n=n.concat(t.getDescendantPipelinesForSupernode(e))})),n}},{key:"getDescendantPipelinesForSupernode",value:function(e){var t=this,n=[],i=this.getSupernodePipelineId(e);if(i){var o=this.getCanvasInfoPipeline(i);o&&(n.push(o),this.getAPIPipeline(i).getSupernodes().forEach((function(e){n=n.concat(t.getDescendantPipelinesForSupernode(e))})))}return n}},{key:"getSchemaPipelinesForSupernode",value:function(e){return this.getDescendantPipelinesForSupernode(e).filter((function(e){return!e.parentUrl})).map((function(e){return Od.createPipeline(e)}))}},{key:"getDescPipelinesToDelete",value:function(e,t){var n=this,i=this.getDescendantSupernodeInfos(e,t),o=this.getOtherSupernodeInfos(e,t),a=[];return i.forEach((function(e){if(n.shouldBeDeleted(e,o)){var t=n.getCanvasInfoPipeline(e.pipelineId);a.push(t)}})),a}},{key:"shouldBeDeleted",value:function(e,t){var n=!0;return t.forEach((function(t){t.pipelineId===e.pipelineId&&(n=!1)})),n}},{key:"getOtherSupernodeInfos",value:function(e,t){var n=this.getPrimaryPipelineId(),i=this.getCanvasInfoPipeline(n),o=cl.filterSupernodes(i.nodes);return this.getDescendantSupernodeInfos(o,n,{supernodesToIgnore:e,parentPipelineId:t})}},{key:"getDescendantSupernodeInfos",value:function(e,t,n){var i=this,o=[];return e.forEach((function(e){i.getDescendantSupernodeInfosForSupernode(e,t,n).forEach((function(e){i.isSupernodeInfoInArray(e,o)||o.push(e)}))})),o}},{key:"getDescendantSupernodeInfosForSupernode",value:function(e,t,n){var i=this,o=[];if(this.continueNavigation(e,t,n)){var a=this.getSupernodePipelineId(e),r=this.getCanvasInfoPipeline(a);if(r)o.push({pipelineId:a,supernode:e,parentPipelineId:t}),cl.filterSupernodes(r.nodes).forEach((function(e){o=o.concat(i.getDescendantSupernodeInfosForSupernode(e,a,n))}))}return o}},{key:"continueNavigation",value:function(e,t,n){return!n||n.parentPipelineId!==t||!n.supernodesToIgnore.some((function(t){return t.id===e.id}))}},{key:"isSupernodeInfoInArray",value:function(e,t){var n=this,i=!1;return t.forEach((function(t){n.isSupernodeInfoEqual(t,e)&&(i=!0)})),i}},{key:"isSupernodeInfoEqual",value:function(e,t){return e.supernode.id===t.supernode.id&&e.parentPipelineId===t.parentPipelineId}},{key:"getAncestorPipelineIds",value:function(e){var t=this.getPrimaryPipelineId();return t===e?[{pipelineId:t}]:[{pipelineId:t}].concat(this.getAncestorsBetween(t,e))}},{key:"getAncestorsBetween",value:function(e,t){var n=this,i=[];return this.getAPIPipeline(e).getSupernodes().forEach((function(o){var a=n.getSupernodePipelineId(o);a&&((n.isAncestorOfPipeline(a,t)||a===t)&&i.push({pipelineId:a,label:o.label,supernodeId:o.id,parentPipelineId:e}),i=i.concat(n.getAncestorsBetween(a,t)))})),i}},{key:"isAncestorOfPipeline",value:function(e,t){return this.getDescendantPipelineIds(e).includes(t)}},{key:"getSupernodePipelineId",value:function(e){return e.type===G&&p(e,"subflow_ref.pipeline_id_ref")?e.subflow_ref.pipeline_id_ref:null}},{key:"getSupernodePipelineUrl",value:function(e){return e.type===G&&p(e,"subflow_ref.url")?e.subflow_ref.url:null}},{key:"getSupernodeObjReferencing",value:function(e){var t,n=this;e===this.getPrimaryPipelineId()?t=this.getAPIPipeline(e).getSupernodes().find((function(t){return n.getSupernodePipelineId(t)===e})).id:t=this.getAncestorPipelineIds(e).find((function(t){return t.pipelineId===e&&p(t,"supernodeId")}));return t}},{key:"setCanvasInfo",value:function(e){var t=Object.assign({},e);t.pipelines=this.prepareNodes(t.pipelines,this.getNodeLayout(),this.getCanvasLayout()),this.store.dispatch({type:"SET_CANVAS_INFO",canvasInfo:t,canvasInfoIdChanged:this.hasCanvasInfoIdChanged(t)})}},{key:"getPipelineFlow",value:function(){var e=Od.createPipelineFlow(this.getCanvasInfo());return this.store.getCanvasConfig().schemaValidation&&Iu(e),e}},{key:"getPipelines",value:function(){return this.getCanvasInfo().pipelines}},{key:"getPipelineFlowId",value:function(){return this.getCanvasInfo().id}},{key:"getPrimaryPipelineId",value:function(){return this.getCanvasInfo().primary_pipeline}},{key:"getPrimaryPipeline",value:function(){return this.getCanvasInfoPipeline(this.getPrimaryPipelineId())}},{key:"getCurrentPipeline",value:function(){return this.getCanvasInfoPipeline(this.getCurrentPipelineId())}},{key:"getCurrentPipelineId",value:function(){return this.getCurrentBreadcrumb().pipelineId}},{key:"isPrimaryPipelineEmpty",value:function(){return this.getAPIPipeline(this.getPrimaryPipelineId()).isEmpty()}},{key:"deletePipeline",value:function(e){this.store.dispatch({type:"DELETE_PIPELINE",data:{id:e}})}},{key:"isPipelineLoaded",value:function(e,t){var n=this,i=this.getCanvasInfo();return!!i&&i.pipelines.some((function(i){return n.isPipeline(i,e,t)}))}},{key:"isPipeline",value:function(e,t,n){return e.id===t&&(!e.parentUrl&&!n||e.parentUrl===n)}},{key:"cloneSupernodeContents",value:function(e,t){var n=this,i=[],o=this.getSupernodePipelineId(e);if(o){var a=t.find((function(e){return e.id===o}));if(a){var r=this.clonePipelineWithNewId(a);e.subflow_ref.pipeline_id_ref=r.id,i.push(r),r.nodes.forEach((function(e){if(e.type===G){var o=n.cloneSupernodeContents(e,t);i=i.concat(o)}}))}}return i}},{key:"clonePipelineWithNewId",value:function(e){var t=ht(e);return Object.assign({},t,{id:this.getUniqueId(Ue,{pipeline:t})})}},{key:"createCanvasInfoPipeline",value:function(e){var t=this.getUniqueId(Fe,{pipeline:e});return Object.assign({},e,{id:t})}},{key:"getCanvasInfo",value:function(){return this.store.getCanvasInfo()}},{key:"hasCanvasInfoIdChanged",value:function(e){return e.id!==this.getCanvasInfo().id}},{key:"setSubdueStyle",value:function(e){this.store.dispatch({type:"SET_SUBDUE_STYLE",data:{subdueStyle:e}})}},{key:"removeAllStyles",value:function(e){this.store.dispatch({type:"REMOVE_ALL_STYLES",data:{temporary:e}})}},{key:"findNode",value:function(e,t,n){var i=n.find((function(e){return e.id===t}));return i&&i.nodes?i.nodes.find((function(t){return t.id===e})):null}},{key:"createBreadcrumb",value:function(e,t){return{pipelineId:e.subflow_ref.pipeline_id_ref,supernodeId:e.id,supernodeParentPipelineId:t,externalUrl:e.subflow_ref.url,label:e.label}}},{key:"addBreadcrumb",value:function(e){e&&e.pipelineId!==this.getPrimaryPipelineId()?this.store.dispatch({type:"ADD_BREADCRUMB",data:e}):this.resetBreadcrumb()}},{key:"addBreadcrumbs",value:function(e){this.store.dispatch({type:"ADD_BREADCRUMBS",data:e})}},{key:"setIndexedBreadcrumb",value:function(e){this.store.dispatch({type:"SET_TO_INDEXED_BREADCRUMB",data:e})}},{key:"setBreadcrumbs",value:function(e){this.store.dispatch({type:"SET_BREADCRUMBS",data:{breadcrumbs:e}})}},{key:"setPreviousBreadcrumb",value:function(){this.store.dispatch({type:"SET_TO_PREVIOUS_BREADCRUMB"})}},{key:"resetBreadcrumb",value:function(){this.store.dispatch({type:"RESET_BREADCRUMB",data:{pipelineId:this.getPrimaryPipelineId()}})}},{key:"getBreadcrumbs",value:function(){return this.store.getBreadcrumbs()}},{key:"getCurrentBreadcrumb",value:function(){var e=this.getBreadcrumbs();return e[e.length-1]}},{key:"getPreviousBreadcrumb",value:function(){var e=this.getBreadcrumbs();return e.length<2?null:e[e.length-2]}},{key:"isInSubFlowBreadcrumb",value:function(e){return this.getBreadcrumbs().findIndex((function(t){return t.pipelineId===e}))>0}},{key:"setCanvasConfig",value:function(e){var t=this.getCanvasConfig(),n=xl.mergeCanvasConfigs(t,e);if(!xl.compareCanvasConfigs(t,n)){var i=this.prepareNodes(this.getCanvasInfo().pipelines,n.enableNodeLayout,n.enableCanvasLayout);this.store.dispatch({type:"SET_CANVAS_CONFIG_INFO",data:{canvasConfig:n,pipelines:i}})}}},{key:"setToolbarConfig",value:function(e){this.store.dispatch({type:"SET_TOOLBAR_CONFIG",data:{toolbarConfig:e}})}},{key:"setNotificationPanelConfig",value:function(e){this.store.dispatch({type:"SET_NOTIFICATION_PANEL_CONFIG",data:{notificationPanelConfig:e}})}},{key:"getCanvasConfig",value:function(){return this.store.getCanvasConfig()}},{key:"getNodeLayout",value:function(){return this.store.getNodeLayout()}},{key:"getCanvasLayout",value:function(){return this.store.getCanvasLayout()}},{key:"clearNotificationMessages",value:function(){this.store.dispatch({type:"CLEAR_NOTIFICATION_MESSAGES"})}},{key:"setNotificationMessages",value:function(e){this.store.dispatch({type:"SET_NOTIFICATION_MESSAGES",data:{messages:e}})}},{key:"getNotificationMessages",value:function(e){var t=this.store.getNotifications();return e?t.filter((function(t){return t.type===e})):t}},{key:"deleteNotificationMessages",value:function(e){this.store.dispatch({type:"DELETE_NOTIFICATION_MESSAGES",data:{ids:e}})}},{key:"toggleNotificationPanel",value:function(){this.isNotificationPanelOpen()?this.closeNotificationPanel():this.openNotificationPanel()}},{key:"openNotificationPanel",value:function(){this.store.dispatch({type:"SET_NOTIFICATION_PANEL_OPEN_STATE",data:{isOpen:!0}})}},{key:"closeNotificationPanel",value:function(){this.store.dispatch({type:"SET_NOTIFICATION_PANEL_OPEN_STATE",data:{isOpen:!1}})}},{key:"isNotificationPanelOpen",value:function(){return this.store.isNotificationPanelOpen()}},{key:"openContextMenu",value:function(e){this.store.dispatch({type:"SET_CONTEXT_MENU_DEF",data:{menuDef:e}})}},{key:"closeContextMenu",value:function(){this.store.dispatch({type:"SET_CONTEXT_MENU_DEF",data:{menuDef:[]}})}},{key:"isContextMenuDisplayed",value:function(){return this.store.isContextMenuDisplayed()}},{key:"setRightFlyoutConfig",value:function(e){this.store.dispatch({type:"SET_RIGHT_FLYOUT_CONFIG",data:{config:e}})}},{key:"isRightFlyoutOpen",value:function(){return this.store.isRightFlyoutOpen()}},{key:"setBottomPanelConfig",value:function(e){this.store.dispatch({type:"SET_BOTTOM_PANEL_CONFIG",data:{config:e}})}},{key:"isBottomPanelOpen",value:function(){return this.store.isBottomPanelOpen()}},{key:"cloneObjectsToPaste",value:function(e,t,n){var i=this,o=[],a=[],r=[];return e&&e.forEach((function(e){var t=i.cloneNode(e);t.type===G&&(t=i.convertPipelineData(t)),o.push({originalId:e.id,node:t})})),t&&t.forEach((function(e){a.push({originalId:e.id,comment:i.cloneComment(e)})})),n&&n.forEach((function(e){if("nodeLink"===e.type||"associationLink"===e.type){var t=i.findClonedNode(e.srcNodeId,o),n=i.findClonedNode(e.trgNodeId,o),s=i.cloneNodeLink(e,t,n);r.push(s)}else{var l=i.findClonedComment(e.srcNodeId,a),c=i.findClonedNode(e.trgNodeId,o);if(l&&c){var d=i.cloneCommentLink(e,l.id,c.id);r.push(d)}}})),{clonedNodes:o.map((function(e){return e.node})),clonedComments:a.map((function(e){return e.comment})),clonedLinks:r}}},{key:"findClonedNode",value:function(e,t){var n=t.find((function(t){return t.originalId===e}));return n?n.node:null}},{key:"findClonedComment",value:function(e,t){var n=t.find((function(t){return t.originalId===e}));return n?n.comment:null}},{key:"cloneNode",value:function(e){var t=Object.assign({},e,{id:this.getUniqueId(ze,{node:e})});return t=this.setNodeAttributes(t)}},{key:"cloneComment",value:function(e){var t=this.setCommentAttributes(e);return Object.assign({},t,{id:this.getUniqueId(Be,{comment:t})})}},{key:"cloneNodeLink",value:function(e,t,n){var i=this.getUniqueId(He,{link:e,sourceNodeId:t?t.id:null,targetNodeId:n?n.id:null}),o=Object.assign({},e,{id:i});return t?(o.srcNodeId=t.id,o.srcNodePortId=e.srcNodePortId):o.srcPos=e.srcPos,n?(o.trgNodeId=n.id,o.trgNodePortId=e.trgNodePortId):o.trgPos=e.trgPos,o}},{key:"cloneCommentLink",value:function(e,t,n){return{id:this.getUniqueId(Ge,{link:e,commentId:t,targetNodeId:n}),type:e.type,class_name:e.class_name,srcNodeId:t,trgNodeId:n}}},{key:"getSelectedObjectIds",value:function(){return this.getSelectionInfo().selections||[]}},{key:"getSelectedNodesIds",value:function(){var e=this,t=[];return this.getSelectedPipeline().getNodes().forEach((function(n){e.getSelectedObjectIds().includes(n.id)&&t.push(n.id)})),t}},{key:"getSelectedNodes",value:function(){var e=this,t=[];return this.getSelectedPipeline().getNodes().forEach((function(n){e.getSelectedObjectIds().includes(n.id)&&t.push(n)})),t}},{key:"getSelectedComments",value:function(){var e=this,t=[];return this.getSelectedPipeline().getComments().forEach((function(n){e.getSelectedObjectIds().includes(n.id)&&t.push(n)})),t}},{key:"getSelectedLinks",value:function(){var e=this,t=[];return this.getSelectedPipeline().getLinks().forEach((function(n){e.getSelectedObjectIds().includes(n.id)&&t.push(n)})),t}},{key:"getSelectedObjects",value:function(){return this.getSelectedNodes().concat(this.getSelectedComments()).concat(this.getSelectedLinks())}},{key:"getSelectionInfo",value:function(){return this.store.getSelectionInfo()}},{key:"getSelectedPipeline",value:function(){return this.getAPIPipeline(this.getSelectedPipelineId())}},{key:"getSelectedPipelineId",value:function(){return this.getSelectionInfo().pipelineId}},{key:"clearSelections",value:function(){this.executeWithSelectionChange(this.store.dispatch,{type:"CLEAR_SELECTIONS"})}},{key:"isSelected",value:function(e,t){return t===this.getSelectedPipelineId()&&this.getSelectedObjectIds().indexOf(e)>=0}},{key:"toggleSelection",value:function(e,t,n){var i=[e];if(n===this.getSelectedPipelineId()&&t)if(this.isSelected(e,n)){var o=(i=this.getSelectedObjectIds().slice()).indexOf(e);i.splice(o,1)}else i=this.getSelectedObjectIds().concat(e);this.setSelections(i,n)}},{key:"setSelections",value:function(e,t){var n=this.getAPIPipeline(t).pipelineId;this.executeWithSelectionChange(this.store.dispatch,{type:"SET_SELECTIONS",data:{pipelineId:n,selections:e}})}},{key:"deleteSelectedObjects",value:function(){this.getSelectedPipeline().deleteObjects(this.getSelectedObjectIds())}},{key:"selectAll",value:function(e,t){var n,i=[],o=this.getAPIPipeline(t),a=Ou(o.getNodes());try{for(a.s();!(n=a.n()).done;){var r=n.value;cl.isSuperBindingNode(r)||i.push(r.id)}}catch(e){a.e(e)}finally{a.f()}var s,l=Ou(o.getComments());try{for(l.s();!(s=l.n()).done;){var c=s.value;i.push(c.id)}}catch(e){l.e(e)}finally{l.f()}if(e){var d,u=Ou(o.getLinks());try{for(u.s();!(d=u.n()).done;){var p=d.value;i.push(p.id)}}catch(e){u.e(e)}finally{u.f()}}this.setSelections(i,o.pipelineId)}},{key:"findNodesInSubGraph",value:function(e,t,n,i){var o=this.getAPIPipeline(i),a=!1;if(n.push(e),e===t)a=!0;else{var r,s=Ou(o.getLinks());try{for(s.s();!(r=s.n()).done;){var l=r.value;if(l.srcNodeId===e){var c=this.findNodesInSubGraph(l.trgNodeId,t,n,i);!0!==c&&n.pop(),a=a||c}}}catch(e){s.e(e)}finally{s.f()}}return a}},{key:"selectSubGraph",value:function(e,t){var n=[],i=[e];if(t===this.getSelectedPipelineId()){var o,a=!1,r=Ou(this.getSelectedObjectIds());try{for(r.s();!(o=r.n()).done;){var s=o.value;a=a||this.findNodesInSubGraph(s,e,n,t)}}catch(e){r.e(e)}finally{r.f()}a||n.push(e),i=this.getSelectedObjectIds().slice();var l,c=Ou(n);try{for(c.s();!(l=c.n()).done;){var d=l.value;this.isSelected(d,t)||i.push(d)}}catch(e){c.e(e)}finally{c.f()}}this.setSelections(i,t)}},{key:"areSelectedNodesContiguous",value:function(){var e,t=this.getSelectedNodesIds(),n=[t[0]],i=this.getSelectedPipeline(),o=Ou(t);try{for(o.s();!(e=o.n()).done;){var a=e.value;this.addConnectedNodeIdToGroup(a,n,t,i)}}catch(e){o.e(e)}finally{o.f()}return n.length===t.length}},{key:"areAllSelectedObjectsLinks",value:function(){var e=this;return-1===this.getSelectedObjects().findIndex((function(t){return!e.isLink(t)}))}},{key:"addConnectedNodeIdToGroup",value:function(e,t,n,i){if(t.includes(e)){var o,a=i.getLinksContainingId(e).filter((function(e){return e.type===F||e.type===U})),r=Ou(a);try{for(r.s();!(o=r.n()).done;){var s=o.value;n.includes(s.trgNodeId)&&n.includes(s.srcNodeId)&&(t.includes(s.trgNodeId)||(t.push(s.trgNodeId),this.addConnectedNodeIdToGroup(s.trgNodeId,t,n,i)),t.includes(s.srcNodeId)||(t.push(s.srcNodeId),this.addConnectedNodeIdToGroup(s.srcNodeId,t,n,i)))}}catch(e){r.e(e)}finally{r.f()}}}},{key:"createEmptyPipeline",value:function(){var e={runtime_ref:this.getCanvasInfoPipeline(this.getPrimaryPipelineId()).runtime_ref,nodes:[],comments:[],links:[]};return this.createCanvasInfoPipeline(e)}},{key:"createPipeline",value:function(e,t,n){var i={runtime_ref:this.getCanvasInfoPipeline(this.getPrimaryPipelineId()).runtime_ref,nodes:e,comments:t,links:n};return this.createCanvasInfoPipeline(i)}},{key:"executeWithSelectionChange",value:function(e,t){var n={nodes:[],comments:[],pipelineId:""};if(this.selectionChangeHandler&&(n={links:this.getSelectedLinks(),nodes:this.getSelectedNodes(),comments:this.getSelectedComments(),pipelineId:this.getSelectedPipelineId()}),e(t),this.selectionChangeHandler){var i=this.getSelectedLinks(),o=this.getSelectedNodes(),a=this.getSelectedComments(),r={selection:this.getSelectedObjectIds(),selectedLinks:i,selectedNodes:o,selectedComments:a,addedLinks:Ld(i,n.links,(function(e,t){return e.id===t.id})),addedNodes:Ld(o,n.nodes,(function(e,t){return e.id===t.id})),addedComments:Ld(a,n.comments,(function(e,t){return e.id===t.id})),deselectedLinks:Ld(n.links,i,(function(e,t){return e.id===t.id})),deselectedNodes:Ld(n.nodes,o,(function(e,t){return e.id===t.id})),deselectedComments:Ld(n.comments,a,(function(e,t){return e.id===t.id})),previousPipelineId:n.pipelineId,selectedPipelineId:this.getSelectedPipelineId()};g(r.addedLinks)&&g(r.addedNodes)&&g(r.addedComments)&&g(r.deselectedLinks)&&g(r.deselectedNodes)&&g(r.deselectedComments)||this.selectionChangeHandler(r)}}},{key:"hasErrorMessage",value:function(e){var t=this.getNodeMessages(e);return!!t&&t.some((function(e){return e.type===j}))}},{key:"hasWarningMessage",value:function(e){var t=this.getNodeMessages(e);return!!t&&t.some((function(e){return e.type===A}))}},{key:"getNodeMessages",value:function(e){return e?e.messages:null}},{key:"getNotificationMessagesMaxType",value:function(){var e=this.getNotificationMessages(),t=this.getNotificationMessages(j),n=this.getNotificationMessages(A),i=this.getNotificationMessages(Ie),o=this.getNotificationMessages(Ne),a=null;return e.length>0&&(t.length>0?a=j:n.length>0?a=A:i.length>0?a=Ie:o.length>0&&(a=Ne)),a}},{key:"isLink",value:function(e){return e.type===F||e.type===B||e.type===U}},{key:"clearSavedZoomValues",value:function(){rl.delete("canvasSavedZoomValues")}},{key:"setNodesMultiDecorations",value:function(e){this.store.dispatch({type:"SET_NODES_MULTI_DECORATIONS",data:{pipelineNodeDecorations:e}})}},{key:"setLinksMultiDecorations",value:function(e){this.store.dispatch({type:"SET_LINKS_MULTI_DECORATIONS",data:{pipelineLinkDecorations:e}})}},{key:"setObjectsStyle",value:function(e,t,n){this.store.dispatch({type:"SET_OBJECTS_STYLE",data:{pipelineObjIds:e,newStyle:t,temporary:n}})}},{key:"setObjectsMultiStyle",value:function(e,t){this.store.dispatch({type:"SET_OBJECTS_MULTI_STYLE",data:{pipelineObjStyles:e,temporary:t}})}},{key:"setLinksStyle",value:function(e,t,n){this.store.dispatch({type:"SET_LINKS_STYLE",data:{pipelineObjIds:e,newStyle:t,temporary:n}})}},{key:"setLinksMultiStyle",value:function(e,t){this.store.dispatch({type:"SET_LINKS_MULTI_STYLE",data:{pipelineObjStyles:e,temporary:t}})}},{key:"getObjectStyle",value:function(e,t){var n=this.getObject(e);return t?n&&n.style_temp?n.style_temp:null:n&&n.style?n.style:null}},{key:"getHighlightObjectIds",value:function(e,t,n){var i=this,o={},a={};return o[e]=[],a[e]=[],t.forEach((function(t){switch(o[e].push(t),n){case Ye:i.getUpstreamObjIdsFrom(t,e,o,a),i.getDownstreamObjIdsFrom(t,e,o,a);break;case Ve:i.getUpstreamObjIdsFrom(t,e,o,a);break;case qe:i.getDownstreamObjIdsFrom(t,e,o,a)}i.getAPIPipeline(e).isSupernode(t)&&i.getSupernodeNodeIds(t,e,o,a)})),{nodes:o,links:a}}},{key:"getSupernodeNodeIds",value:function(e,t,n,i){var o=this,a=this.getAPIPipeline(t).getNode(e);if(a.type===G){var r=this.getSupernodePipelineId(a);n[r]=n[r]||[],i[r]=i[r]||[];var s=this.getAPIPipeline(r).getNodeIds(),l=this.getAPIPipeline(r).getLinkIds();n[r]=ut(n[r],s),i[r]=ut(i[r],l),s.forEach((function(e){o.getSupernodeNodeIds(e,r,n,i)}))}}},{key:"getUpstreamObjIdsFrom",value:function(e,t,n,i){var o=this;n[t]=n[t]||[],i[t]=i[t]||[];var a=this.getAPIPipeline(t),r=a.getNode(e),s=a.getAttachedLinksContainingTargetId(e).filter((function(e){return e.type===F}));if(s.length>0)s.forEach((function(e){if(!i[t].includes(e.id)){var r=a.getNode(e.srcNodeId);i[t]=ut(i[t],[e.id]),n[t]=ut(n[t],[e.srcNodeId]);var s=o.getSupernodeOutputPortForLink(r,e);if(s){var l=o.getSupernodePipelineId(r),c=o.getAPIPipeline(l).getNode(s.subflow_node_ref);c&&(i[l]=i[l]||[],n[l]=n[l]||[],n[l]=ut(n[l],[c.id]),o.getUpstreamObjIdsFrom(c.id,l,n,i))}else o.getUpstreamObjIdsFrom(e.srcNodeId,t,n,i)}}));else if(a.isEntryBindingNode(r)&&cl.isSuperBindingNode(r)){var l=this.getSupernodeObjReferencing(t),c=l.parentPipelineId,d=this.getAPIPipeline(c),u=d.getNode(l.supernodeId);u.inputs.forEach((function(t){t.subflow_node_ref===e&&d.getAttachedLinksContainingTargetId(u.id).forEach((function(e){if(e.trgNodePortId===t.id)if(n[c]=n[c]||[],i[c]=i[c]||[],n[c]=ut(n[c],[e.srcNodeId]),i[c]=ut(i[c],[e.id]),d.isSupernode(e.srcNodeId)){var a=d.getNode(e.srcNodeId),r=o.getSupernodeOutputPortForLink(a,e);if(r){var s=r.subflow_node_ref;o.getUpstreamObjIdsFrom(s,o.getSupernodePipelineId(a),n,i)}}else o.getUpstreamObjIdsFrom(e.srcNodeId,c,n,i)}))}))}}},{key:"getDownstreamObjIdsFrom",value:function(e,t,n,i){var o=this;n[t]=n[t]||[],i[t]=i[t]||[];var a=this.getAPIPipeline(t),r=a.getNode(e),s=a.getAttachedLinksContainingSourceId(e).filter((function(e){return e.type===F}));if(s.length>0)s.forEach((function(e){if(!i[t].includes(e.id)){var r=a.getNode(e.trgNodeId);i[t]=ut(i[t],[e.id]),n[t]=ut(n[t],[e.trgNodeId]);var s=o.getSupernodeInputPortForLink(r,e);if(s){var l=o.getSupernodePipelineId(r),c=o.getAPIPipeline(l).getNode(s.subflow_node_ref);c&&(i[l]=i[l]||[],n[l]=n[l]||[],n[l]=ut(n[l],[c.id]),o.getDownstreamObjIdsFrom(c.id,l,n,i))}else o.getDownstreamObjIdsFrom(e.trgNodeId,t,n,i)}}));else if(a.isExitBindingNode(r)&&cl.isSuperBindingNode(r)){var l=this.getSupernodeObjReferencing(t),c=l.parentPipelineId,d=this.getAPIPipeline(c),u=d.getNode(l.supernodeId);u.outputs.forEach((function(t){t.subflow_node_ref===e&&d.getAttachedLinksContainingSourceId(u.id).forEach((function(e){if(e.srcNodePortId===t.id)if(n[c]=n[c]||[],i[c]=i[c]||[],n[c]=ut(n[c],[e.trgNodeId]),i[c]=ut(i[c],[e.id]),d.isSupernode(e.trgNodeId)){var a=d.getNode(e.trgNodeId),r=o.getSupernodeInputPortForLink(a,e);if(r){var s=r.subflow_node_ref;o.getDownstreamObjIdsFrom(s,o.getSupernodePipelineId(a),n,i)}}else o.getDownstreamObjIdsFrom(e.trgNodeId,c,n,i)}))}))}}},{key:"getSupernodeInputPortForLink",value:function(e,t){var n=null;return this.getSupernodePipelineId(e)&&t.trgNodePortId&&e.inputs.forEach((function(e){e.id!==t.trgNodePortId||(n=e)})),n}},{key:"getSupernodeOutputPortForLink",value:function(e,t){var n=null;return this.getSupernodePipelineId(e)&&t.srcNodePortId&&e.outputs.forEach((function(e){e.id!==t.srcNodePortId||(n=e)})),n}},{key:"copyToClipboard",value:function(e){var t=this,n={},i=this.getSelectionAPIPipeline();if(!i)return!1;var o=this.getSelectedNodes(),a=this.getSelectedComments(),r=i.getLinksBetween(o,a);if(e){var s=i.getNodeDataLinksContainingIds(o.map((function(e){return e.id})));r=cl.concatUniqueBasedOnId(s,r),r=cl.concatUniqueBasedOnId(this.getSelectedLinks(),r)}if(0===o.length&&0===a.length&&0===r.length)return!1;if(o&&o.length>0){n.nodes=o;var l=[];cl.filterSupernodes(o).forEach((function(e){l=l.concat(t.getSchemaPipelinesForSupernode(e)),nt(e,"app_data.pipeline_data",l)}))}a&&a.length>0&&(n.comments=a),r&&r.length>0&&(n.links=r.map((function(e){var t=Object.assign({},e);return e.type===F&&e.srcNodeId&&-1===o.findIndex((function(t){return t.id===e.srcNodeId}))&&(delete t.srcNodeId,delete t.srcNodePortId,t.srcPos=cl.getSrcPos(e,i)),e.type===F&&e.trgNodeId&&-1===o.findIndex((function(t){return t.id===e.trgNodeId}))&&(delete t.trgNodeId,delete t.trgNodePortId,t.trgPos=cl.getTrgPos(e,i)),t})));var c=JSON.stringify(n);return rl.set("canvasClipboard",c),!0}},{key:"isClipboardEmpty",value:function(){var e=rl.get("canvasClipboard");return!e||""===e}},{key:"getObjectsToPaste",value:function(){var e=rl.get("canvasClipboard");if(!e)return{};var t=JSON.parse(e);return t.nodes||t.comments||t.links?t:null}},{key:"setTooltipDef",value:function(e){this.store.dispatch({type:"SET_TOOLTIP_DEF",data:{tooltipDef:e}})}},{key:"isTooltipOpen",value:function(){return this.store.isTooltipOpen()}}]),n}();function Au(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,a=i(e);if(t){var r=i(this).constructor;n=Reflect.construct(a,arguments,r)}else n=a.apply(this,arguments);return o(this,n)}}var Mu=function(i){n(a,at);var o=Au(a);function a(t,n,i){var r;return e(this,a),(r=o.call(this,t)).data=t,r.objectModel=n,r.labelUtil=i,r.apiPipeline=r.objectModel.getAPIPipeline(t.pipelineId),r.previousObjectsInfo=r.getPreviousObjectsInfo(t),r.previousLinksInfo=r.getPreviousLinksInfo(t),r}return t(a,[{key:"do",value:function(){this.apiPipeline.sizeAndPositionObjects(this.data.objectsInfo,this.data.linksInfo)}},{key:"undo",value:function(){this.apiPipeline.sizeAndPositionObjects(this.previousObjectsInfo,this.previousLinksInfo)}},{key:"redo",value:function(){this.do()}},{key:"getLabel",value:function(){return this.labelUtil.getActionLabel(this,"action.sizeAndPositionObjects")}},{key:"getPreviousObjectsInfo",value:function(e){var t=this,n=[];return Object.keys(e.objectsInfo).forEach((function(e){var i=t.apiPipeline.getObject(e);i&&(n[e]={id:i.id,x_pos:i.x_pos,y_pos:i.y_pos,width:i.width,height:i.height})})),n}},{key:"getPreviousLinksInfo",value:function(e){var t=this,n=[];return Object.keys(e.linksInfo).forEach((function(e){var i=t.apiPipeline.getLink(e);i&&(i.srcPos||i.trgPos)&&(n[e]={},i.srcPos&&(n[e].srcPos={x_pos:i.srcPos.x_pos,y_pos:i.srcPos.y_pos}),i.trgPos&&(n[e].trgPos={x_pos:i.trgPos.x_pos,y_pos:i.trgPos.y_pos}))})),n}}]),a}(),Ru=0,Uu=function(){function n(){e(this,n),this.logger=new Zn("CanvasController"),this.contextMenuConfig={enableCreateSupernodeNonContiguous:!1,defaultMenuEntries:{saveToPalette:!1,createSupernode:!0}},this.keyboardConfig={actions:{delete:!0,undo:!0,redo:!0,selectAll:!0,copyToClipboard:!0,cutToClipboard:!0,pasteFromClipboard:!0}},this.handlers={contextMenuHandler:null,beforeEditActionHandler:null,editActionHandler:null,clickActionHandler:null,decorationActionHandler:null,tipHandler:null,layoutHandler:null,idGeneratorHandler:null,selectionChangeHandler:null,actionLabelHandler:null},this.contextMenuSource=null,this.objectModel=new ju,this.commandStack=new At,this.labelUtil=new gd,this.contextMenuActionHandler=this.contextMenuActionHandler.bind(this),this.closeContextMenu=this.closeContextMenu.bind(this),this.instanceId=Ru++,this.highlight=!1}return t(n,[{key:"setCanvasConfig",value:function(e){this.logger.log("Setting Canvas Config");var t=this.correctTypo(e);this.objectModel.openPaletteIfNecessary(e),this.objectModel.setCanvasConfig(t)}},{key:"correctTypo",value:function(e){return g(e)||"boolean"!=typeof e.enableHightlightNodeOnNewLinkDrag||(e.enableHighlightNodeOnNewLinkDrag=e.enableHightlightNodeOnNewLinkDrag,delete e.enableHightlightNodeOnNewLinkDrag),e}},{key:"getCanvasConfig",value:function(){return this.objectModel.getCanvasConfig()}},{key:"setIntl",value:function(e){this.labelUtil.setIntl(e)}},{key:"setToolbarConfig",value:function(e){this.logger.log("Setting Toolbar Config"),this.objectModel.setToolbarConfig(e)}},{key:"setNotificationPanelConfig",value:function(e){this.logger.log("Setting Notif Panel Config"),this.objectModel.setNotificationPanelConfig(e)}},{key:"setRightFlyoutConfig",value:function(e){this.logger.log("Setting Right Flyout Config"),this.objectModel.setRightFlyoutConfig(e)}},{key:"setBottomPanelConfig",value:function(e){this.logger.log("Setting Bottom Panel Config"),this.objectModel.setBottomPanelConfig(e)}},{key:"setContextMenuConfig",value:function(e){this.logger.log("Setting Context Menu Config"),this.contextMenuConfig=Object.assign(this.contextMenuConfig,e)}},{key:"setKeyboardConfig",value:function(e){this.logger.log("Setting Keyboard Config"),e&&e.actions&&(this.keyboardConfig.actions=Object.assign({},this.keyboardConfig.actions,e.actions))}},{key:"getKeyboardConfig",value:function(){return this.keyboardConfig}},{key:"setHandlers",value:function(e){this.logger.log("Setting Handlers"),this.handlers=Object.assign(this.handlers,e),this.objectModel.setIdGeneratorHandler(e.idGeneratorHandler),this.objectModel.setSelectionChangeHandler(e.selectionChangeHandler),this.objectModel.setLayoutHandler(e.layoutHandler),this.labelUtil.setActionLabelHandler(e.actionLabelHandler)}},{key:"setCanvasContents",value:function(e){this.canvasContents=e}},{key:"getSVGCanvasD3",value:function(){return this.canvasContents.getSVGCanvasD3()}},{key:"setInstanceId",value:function(e){this.instanceId=e}},{key:"getInstanceId",value:function(){return this.instanceId}},{key:"getObjectModel",value:function(){return this.objectModel}},{key:"isInternalObjectModelEnabled",value:function(){return this.getCanvasConfig().enableInternalObjectModel}},{key:"getStore",value:function(){return this.getObjectModel().getStore()}},{key:"setPipelineFlow",value:function(e){this.objectModel.setPipelineFlow(e),this.ensureVisibleExpandedPipelinesAreLoaded()}},{key:"clearPipelineFlow",value:function(){this.objectModel.clearPipelineFlow()}},{key:"getPipelineFlow",value:function(){return this.objectModel.getPipelineFlow()}},{key:"getPipelineFlowId",value:function(){return this.objectModel.getPipelineFlowId()}},{key:"getPrimaryPipelineId",value:function(){return this.objectModel.getPrimaryPipelineId()}},{key:"getExternalPipelineFlow",value:function(e){return this.objectModel.getExternalPipelineFlow(e)}},{key:"getCanvasInfo",value:function(){return this.objectModel.getCanvasInfo()}},{key:"getAncestorPipelineIds",value:function(e){return this.objectModel.getAncestorPipelineIds(e)}},{key:"removeAllStyles",value:function(e){this.objectModel.removeAllStyles(e)}},{key:"setSubdueStyle",value:function(e){this.objectModel.setSubdueStyle(e)}},{key:"getPipeline",value:function(e){return this.objectModel.getCanvasInfoPipeline(e)}},{key:"getCurrentPipelineId",value:function(){return this.objectModel.getCurrentBreadcrumb().pipelineId}},{key:"isPipelineExternal",value:function(e){return this.objectModel.getAPIPipeline(e).isPipelineExternal()}},{key:"getFlowMessages",value:function(e){return this.objectModel.getAPIPipeline(e).getFlowMessages()}},{key:"isFlowValid",value:function(e,t){return this.objectModel.getAPIPipeline(t).isFlowValid(e)}},{key:"autoLayout",value:function(e,t){this.objectModel.getAPIPipeline(t).autoLayout(e)}},{key:"setCanvas",value:function(e){this.objectModel.setCanvas(e)}},{key:"setPaletteData",value:function(e){this.objectModel.setPaletteData(e)}},{key:"getCanvas",value:function(){return this.objectModel.getCanvas()}},{key:"setPipelineFlowPalette",value:function(e){this.objectModel.setPipelineFlowPalette(e)}},{key:"clearPaletteData",value:function(){this.objectModel.clearPaletteData()}},{key:"setCategoryLoadingText",value:function(e,t){this.objectModel.setCategoryLoadingText(e,t)}},{key:"setCategoryEmptyText",value:function(e,t){this.objectModel.setCategoryEmptyText(e,t)}},{key:"addNodeTypeToPalette",value:function(e,t,n,i,o){this.objectModel.addNodeTypeToPalette(e,t,n,i,o)}},{key:"addNodeTypesToPalette",value:function(e,t,n,i,o){this.objectModel.addNodeTypesToPalette(e,t,n,i,o)}},{key:"removeNodesFromPalette",value:function(e,t){this.objectModel.addNodeTypesToPalette(e,t)}},{key:"getPaletteData",value:function(){return this.objectModel.getPaletteData()}},{key:"getPaletteNode",value:function(e){return this.objectModel.getPaletteNode(e)}},{key:"getPaletteNodeById",value:function(e){return this.objectModel.getPaletteNodeById(e)}},{key:"getCategoryForNode",value:function(e){return this.objectModel.getCategoryForNode(e)}},{key:"convertNodeTemplate",value:function(e){return this.objectModel.convertNodeTemplate(e)}},{key:"setSelections",value:function(e,t){this.objectModel.setSelections(e,t)}},{key:"clearSelections",value:function(){this.objectModel.clearSelections()}},{key:"selectAll",value:function(e){var t=this.getCanvasConfig().enableLinkSelection!==de;this.objectModel.selectAll(t,e)}},{key:"isPrimaryPipelineEmpty",value:function(){return this.objectModel.isPrimaryPipelineEmpty()}},{key:"getSelectedObjectIds",value:function(){return this.objectModel.getSelectedObjectIds()}},{key:"getSelectedNodes",value:function(){return this.objectModel.getSelectedNodes()}},{key:"getSelectedComments",value:function(){return this.objectModel.getSelectedComments()}},{key:"getSelectedLinks",value:function(){return this.objectModel.getSelectedLinks()}},{key:"getSelectedObjects",value:function(){return this.objectModel.getSelectedObjects()}},{key:"getSelectedPipelineId",value:function(){return this.objectModel.getSelectedPipelineId()}},{key:"deleteSelectedObjects",value:function(){this.objectModel.deleteSelectedObjects()}},{key:"areSelectedNodesContiguous",value:function(){return this.objectModel.areSelectedNodesContiguous()}},{key:"areAllSelectedObjectsLinks",value:function(){return this.objectModel.areAllSelectedObjectsLinks()}},{key:"areDetachableLinksInUse",value:function(){return this.getCanvasConfig().enableLinkSelection===ae}},{key:"isSnapToGridInUse",value:function(){return this.getCanvasConfig().enableSnapToGridType!==We}},{key:"setNotificationMessages",value:function(e){this.objectModel.setNotificationMessages(e)}},{key:"clearNotificationMessages",value:function(){this.objectModel.clearNotificationMessages()}},{key:"deleteNotificationMessages",value:function(e){this.objectModel.deleteNotificationMessages(e)}},{key:"getNotificationMessages",value:function(e){return this.objectModel.getNotificationMessages(e)}},{key:"getNotificationMessagesMaxType",value:function(){return this.objectModel.getNotificationMessagesMaxType()}},{key:"moveObjects",value:function(e,t){this.objectModel.getAPIPipeline(t).moveObjects(e)}},{key:"deleteObjects",value:function(e,t){this.objectModel.getAPIPipeline(t).deleteObjects(e)}},{key:"disconnectObjects",value:function(e,t){this.objectModel.getAPIPipeline(t).disconnectObjects(e)}},{key:"deleteObject",value:function(e,t){this.objectModel.getAPIPipeline(t).deleteObject(e)}},{key:"setObjectsStyle",value:function(e,t,n){this.objectModel.setObjectsStyle(e,t,n)}},{key:"setObjectsMultiStyle",value:function(e,t){this.objectModel.setObjectsMultiStyle(e,t)}},{key:"getNodes",value:function(e){return this.objectModel.getAPIPipeline(e).getNodes()}},{key:"createNode",value:function(e,t){return this.objectModel.getAPIPipeline(t).createNode(e)}},{key:"addNode",value:function(e,t){this.objectModel.getAPIPipeline(t).addNode(e)}},{key:"createNodeCommand",value:function(e,t){var n=t||this.getCurrentPipelineId();this.createNodeFromTemplateAt(e.nodeTemplate,{x:e.offsetX,y:e.offsetY},n)}},{key:"deleteNode",value:function(e,t){this.objectModel.getAPIPipeline(t).deleteNode(e)}},{key:"setNodeProperties",value:function(e,t,n){this.objectModel.getAPIPipeline(n).setNodeProperties(e,t)}},{key:"setNodeParameters",value:function(e,t,n){this.objectModel.getAPIPipeline(n).setNodeParameters(e,t)}},{key:"setNodeUiParameters",value:function(e,t,n){this.objectModel.getAPIPipeline(n).setNodeUiParameters(e,t)}},{key:"setNodeMessages",value:function(e,t,n){this.objectModel.getAPIPipeline(n).setNodeMessages(e,t)}},{key:"setNodeMessage",value:function(e,t,n){this.objectModel.getAPIPipeline(n).setNodeMessage(e,t)}},{key:"setNodeLabel",value:function(e,t,n){this.objectModel.getAPIPipeline(n).setNodeLabel(e,t)}},{key:"setNodesClassName",value:function(e,t,n){this.objectModel.getAPIPipeline(n).setObjectsClassName(e,t)}},{key:"setNodeDecorations",value:function(e,t,n){this.objectModel.getAPIPipeline(n).setNodeDecorations(e,t)}},{key:"setNodeInputPorts",value:function(e,t,n){this.objectModel.getAPIPipeline(n).setNodeInputPorts(e,t)}},{key:"setNodeOutputPorts",value:function(e,t,n){this.objectModel.getAPIPipeline(n).setNodeOutputPorts(e,t)}},{key:"setNodesMultiDecorations",value:function(e){this.objectModel.setNodesMultiDecorations(e)}},{key:"setInputPortLabel",value:function(e,t,n,i){this.objectModel.getAPIPipeline(i).setInputPortLabel(e,t,n)}},{key:"setOutputPortLabel",value:function(e,t,n,i){this.objectModel.getAPIPipeline(i).setOutputPortLabel(e,t,n)}},{key:"getNode",value:function(e,t){return this.objectModel.getAPIPipeline(t).getNode(e)}},{key:"getNodeUiParameters",value:function(e,t){return this.objectModel.getAPIPipeline(t).getNodeUiParameters(e)}},{key:"getSupernodes",value:function(e){return this.objectModel.getAPIPipeline(e).getSupernodes()}},{key:"getSupernodeObjReferencing",value:function(e){return this.objectModel.getSupernodeObjReferencing(e)}},{key:"getNodeMessages",value:function(e,t){return this.objectModel.getAPIPipeline(t).getNodeMessages(e)}},{key:"getNodeMessage",value:function(e,t,n){return this.objectModel.getAPIPipeline(n).getNodeMessage(e,t)}},{key:"getNodeInputPorts",value:function(e,t){return this.objectModel.getAPIPipeline(t).getNodeInputPorts(e)}},{key:"getNodeOutputPorts",value:function(e,t){return this.objectModel.getAPIPipeline(t).getNodeOutputPorts(e)}},{key:"getNodeDecorations",value:function(e,t){return this.objectModel.getAPIPipeline(t).getNodeDecorations(e)}},{key:"getNodeClassName",value:function(e,t){return this.objectModel.getAPIPipeline(t).getNodeClassName(e)}},{key:"getNodeStyle",value:function(e,t,n){return this.objectModel.getAPIPipeline(n).getNodeStyle(e,t)}},{key:"getBranchNodes",value:function(e,t){var n=t||this.objectModel.getCurrentPipelineId();return this.objectModel.getHighlightObjectIds(n,e,Ye)}},{key:"getUpstreamNodes",value:function(e,t){var n=t||this.objectModel.getCurrentPipelineId();return this.objectModel.getHighlightObjectIds(n,e,Ve)}},{key:"getDownstreamNodes",value:function(e,t){var n=t||this.objectModel.getCurrentPipelineId();return this.objectModel.getHighlightObjectIds(n,e,qe)}},{key:"addCustomAttrToNodes",value:function(e,t,n){this.objectModel.getAPIPipeline(n).addCustomAttrToNodes(e,t)}},{key:"removeCustomAttrFromNodes",value:function(e,t,n){this.objectModel.getAPIPipeline(n).removeCustomAttrFromNodes(e,t)}},{key:"isSuperNodeExpandedInPlace",value:function(e,t){return this.objectModel.getAPIPipeline(t).isSuperNodeExpandedInPlace(e)}},{key:"getComments",value:function(e){return this.objectModel.getAPIPipeline(e).getComments()}},{key:"getComment",value:function(e,t){return this.objectModel.getAPIPipeline(t).getComment(e)}},{key:"createComment",value:function(e,t){this.objectModel.getAPIPipeline(t).createComment(e)}},{key:"addComment",value:function(e,t){this.objectModel.getAPIPipeline(t).addComment(e)}},{key:"editComment",value:function(e,t){this.objectModel.getAPIPipeline(t).editComment(e)}},{key:"setCommentProperties",value:function(e,t,n){this.objectModel.getAPIPipeline(n).setCommentProperties(e,t)}},{key:"setCommentsClassName",value:function(e,t,n){this.objectModel.getAPIPipeline(n).setObjectsClassName(e,t)}},{key:"deleteComment",value:function(e,t){this.objectModel.getAPIPipeline(t).deleteComment(e)}},{key:"addCustomAttrToComments",value:function(e,t,n){this.objectModel.getAPIPipeline(n).addCustomAttrToComments(e,t)}},{key:"removeCustomAttrFromComments",value:function(e,t,n){this.objectModel.getAPIPipeline(n).removeCustomAttrFromComments(e,t)}},{key:"getCommentClassName",value:function(e,t){return this.objectModel.getAPIPipeline(t).getCommentClassName(e)}},{key:"getCommentStyle",value:function(e,t,n){return this.objectModel.getAPIPipeline(n).getCommentStyle(e,t)}},{key:"getLink",value:function(e,t){return this.objectModel.getAPIPipeline(t).getLink(e)}},{key:"getLinks",value:function(e){return this.objectModel.getAPIPipeline(e).getLinks()}},{key:"setLinkProperties",value:function(e,t,n){this.objectModel.getAPIPipeline(n).setLinkProperties(e,t)}},{key:"setNodeDataLinkSrcInfo",value:function(e,t,n,i){this.objectModel.getAPIPipeline(i).setNodeDataLinkSrcInfo(e,t,n)}},{key:"setNodeDataLinkTrgInfo",value:function(e,t,n,i){this.objectModel.getAPIPipeline(i).setNodeDataLinkTrgInfo(e,t,n)}},{key:"getNodeDataLinkFromInfo",value:function(e,t,n,i,o){return this.objectModel.getAPIPipeline(o).getNodeDataLinkFromInfo(e,t,n,i)}},{key:"getCommentLinkFromInfo",value:function(e,t,n){return this.objectModel.getAPIPipeline(n).getCommentLinkFromInfo(e,t)}},{key:"getNodeAssocLinkFromInfo",value:function(e,t,n){return this.objectModel.getAPIPipeline(n).getNodeAssocLinkFromInfo(e,t)}},{key:"addLinks",value:function(e,t){this.objectModel.getAPIPipeline(t).addLinks(e)}},{key:"deleteLink",value:function(e,t){this.objectModel.getAPIPipeline(t).deleteLink(e)}},{key:"createNodeLinks",value:function(e,t){return this.objectModel.getAPIPipeline(t).createNodeLinks(e)}},{key:"createCommentLinks",value:function(e,t){return this.objectModel.getAPIPipeline(t).createCommentLinks(e)}},{key:"setLinksClassName",value:function(e,t,n){this.objectModel.getAPIPipeline(n).setLinksClassName(e,t)}},{key:"setLinksStyle",value:function(e,t,n){this.objectModel.setLinksStyle(e,t,n)}},{key:"setLinksMultiStyle",value:function(e,t){this.objectModel.setLinksMultiStyle(e,t)}},{key:"getLinkClassName",value:function(e,t){return this.objectModel.getAPIPipeline(t).getLinkClassName(e)}},{key:"getLinkStyle",value:function(e,t,n){return this.objectModel.getAPIPipeline(n).getLinkStyle(e,t)}},{key:"setLinkDecorations",value:function(e,t,n){this.objectModel.getAPIPipeline(n).setLinkDecorations(e,t)}},{key:"setLinksMultiDecorations",value:function(e){this.objectModel.setLinksMultiDecorations(e)}},{key:"getLinkDecorations",value:function(e,t){return this.objectModel.getAPIPipeline(t).getLinkDecorations(e)}},{key:"getCommandStack",value:function(){return this.commandStack}},{key:"undo",value:function(){this.canUndo()&&this.getCommandStack().undo()}},{key:"redo",value:function(){this.canRedo()&&this.getCommandStack().redo()}},{key:"canUndo",value:function(){return this.getCommandStack().canUndo()}},{key:"canRedo",value:function(){return this.getCommandStack().canRedo()}},{key:"getUndoLabel",value:function(){if(this.canUndo()){var e=this.getCommandStack().getUndoCommand();if(e&&e.getLabel)return e.getLabel()}return""}},{key:"getRedoLabel",value:function(){if(this.canRedo()){var e=this.getCommandStack().getRedoCommand();if(e&&e.getLabel)return e.getLabel()}return""}},{key:"getBreadcrumbs",value:function(){return this.objectModel.getBreadcrumbs()}},{key:"getCurrentBreadcrumb",value:function(){return this.objectModel.getCurrentBreadcrumb()}},{key:"setHighlightStyle",value:function(e,t){this.removeAllStyles(!0);var n={body:{default:"fill: ".concat($e," ;stroke: ").concat(Ze,";"),hover:"fill: ".concat(Ke,";")}},i={line:{default:"stroke: ".concat(Ze,";"),hover:"stroke-width: ".concat(Je)}};this.setObjectsStyle(e.nodes,n,!0,!1),this.setLinksStyle(e.links,i,!0,!1),this.highlight=!0}},{key:"highlightBranch",value:function(e,t){var n=this.objectModel.getHighlightObjectIds(t,e,Ye);return this.setHighlightStyle(n,t),n}},{key:"highlightUpstream",value:function(e,t){var n=this.objectModel.getHighlightObjectIds(t,e,Ve);return this.setHighlightStyle(n,t),n}},{key:"highlightDownstream",value:function(e,t){var n=this.objectModel.getHighlightObjectIds(t,e,qe);return this.setHighlightStyle(n,t),n}},{key:"getLoggingState",value:function(){return Zn.getLoggingState()}},{key:"setLoggingState",value:function(e){Zn.setLoggingState(e)}},{key:"log",value:function(e){new Zn("Host App").log(e)}},{key:"addAfterUpdateCallback",value:function(e){this.canvasContents&&this.canvasContents.addAfterUpdateCallback(e)}},{key:"removeAfterUpdateCallback",value:function(e){this.canvasContents&&this.canvasContents.removeAfterUpdateCallback(e)}},{key:"togglePalette",value:function(){this.getObjectModel().togglePalette()}},{key:"openPalette",value:function(){this.getObjectModel().openPalette()}},{key:"closePalette",value:function(){this.getObjectModel().closePalette()}},{key:"isPaletteOpen",value:function(){return this.getObjectModel().isPaletteOpen()}},{key:"openContextMenu",value:function(e){this.objectModel.openContextMenu(e)}},{key:"isBottomPanelOpen",value:function(){return this.getObjectModel().isBottomPanelOpen()}},{key:"closeContextMenu",value:function(){this.objectModel.closeContextMenu()}},{key:"isContextMenuDisplayed",value:function(){return this.objectModel.isContextMenuDisplayed()}},{key:"openNotificationPanel",value:function(){this.objectModel.openNotificationPanel()}},{key:"closeNotificationPanel",value:function(){this.objectModel.closeNotificationPanel()}},{key:"toggleNotificationPanel",value:function(){this.objectModel.toggleNotificationPanel()}},{key:"isRightFlyoutOpen",value:function(){return this.objectModel.isRightFlyoutOpen()}},{key:"displaySubPipeline",value:function(e){var t=this.objectModel.getBreadcrumbs(),n=t.findIndex((function(t){return t.pipelineId===e}));if(n>-1){var i={editType:"displaySubPipeline",editSource:"canvas",targetObject:this.getSupernodeFromBreadcrumb(t[n]),breadcrumbIndex:n};this.editActionHandler(i)}}},{key:"displaySubPipelineForSupernode",value:function(e,t){var n=this.getNode(e,t);if(n&&n.type===G){var i=this.objectModel.getCurrentBreadcrumb(),o=this.objectModel.createBreadcrumb(n,i.pipelineId);this.displaySubPipelineForBreadcrumbs([o])}}},{key:"displaySubPipelineForBreadcrumbs",value:function(e){var t=e[e.length-1],n={editType:"displaySubPipeline",editSource:"canvas",targetObject:this.getSupernodeFromBreadcrumb(t),addBreadcrumbs:e};this.editActionHandler(n)}},{key:"getSupernodeFromBreadcrumb",value:function(e){return e.supernodeParentPipelineId?this.objectModel.getAPIPipeline(e.supernodeParentPipelineId).getNode(e.supernodeId):null}},{key:"displayPreviousPipeline",value:function(){var e={editType:"displayPreviousPipeline",pipelineInfo:this.objectModel.getPreviousBreadcrumb(),editSource:"canvas"};this.editActionHandler(e)}},{key:"zoomIn",value:function(){this.canvasContents&&this.getSVGCanvasD3().zoomIn()}},{key:"zoomOut",value:function(){this.canvasContents&&this.getSVGCanvasD3().zoomOut()}},{key:"zoomToFit",value:function(){this.canvasContents&&this.getSVGCanvasD3().zoomToFit()}},{key:"zoomTo",value:function(e){this.canvasContents&&this.getSVGCanvasD3().zoomTo(e)}},{key:"translateBy",value:function(e,t,n){this.canvasContents&&this.getSVGCanvasD3().translateBy(e,t,n)}},{key:"getZoom",value:function(){return this.getSVGCanvasD3().getZoom()}},{key:"getZoomToReveal",value:function(e,t,n){return this.canvasContents?this.getSVGCanvasD3().getZoomToReveal(e,t,n):null}},{key:"clearSavedZoomValues",value:function(){this.objectModel.clearSavedZoomValues()}},{key:"getGhostNode",value:function(e){return this.canvasContents?this.getSVGCanvasD3().getGhostNode(e):null}},{key:"setDragNodeTemplate",value:function(e){n.dragNodeTemplate=e}},{key:"getDragNodeTemplate",value:function(){return n.dragNodeTemplate}},{key:"cutToClipboard",value:function(){this.editActionHandler({editType:"cut",editSource:"api"})}},{key:"copyToClipboard",value:function(){this.editActionHandler({editType:"copy",editSource:"api"})}},{key:"pasteFromClipboard",value:function(e){this.editActionHandler({editType:"paste",editSource:"api",pipelineId:e})}},{key:"isClipboardEmpty",value:function(){return this.objectModel.isClipboardEmpty()}},{key:"canPaste",value:function(){return!this.isClipboardEmpty()}},{key:"canCutCopy",value:function(){return this.getSelectedObjectIds().length>0&&!(this.areAllSelectedObjectsLinks()&&!this.areDetachableLinksInUse())}},{key:"canDelete",value:function(){return this.getSelectedObjectIds().length>0}},{key:"openTip",value:function(e){if(!this.isTipOpen()&&this.isTipEnabled(e.type)){if(this.handlers.tipHandler){var t={};switch(e.type){case k:t.nodeTemplate=e.nodeTemplate;break;case C:t.category=e.category;break;case D:t.pipelineId=e.pipelineId,t.node=e.node;break;case O:t.pipelineId=e.pipelineId,t.node=e.node,t.port=e.port;break;case E:t.pipelineId=e.pipelineId,t.decoration=e.decoration;break;case T:t.pipelineId=e.pipelineId,t.link=e.link;break;case x:t.stateTagText=e.stateTagText,t.stateTagType=e.stateTagType}e.customContent=this.handlers.tipHandler(e.type,t)}var n=this;this.pendingTooltip&&clearTimeout(this.pendingTooltip),this.pendingTooltip=setTimeout((function(){n.objectModel.setTooltipDef(e)}),e.delay?e.delay:200)}}},{key:"closeTip",value:function(){this.pendingTooltip&&clearTimeout(this.pendingTooltip),this.isTipOpen()&&this.objectModel.setTooltipDef({})}},{key:"isTipOpen",value:function(){return this.objectModel.isTooltipOpen()}},{key:"isTipEnabled",value:function(e){var t=this.getCanvasConfig();switch(e){case k:case C:return t.tipConfig.palette;case D:return t.tipConfig.nodes;case O:return t.tipConfig.ports;case E:return t.tipConfig.decorations;case T:return t.tipConfig.links;case x:return t.tipConfig.stateTag;default:return!1}}},{key:"createDroppedExternalObject",value:function(e,t,n){e&&("createFromObject"===e.operation?this.createNodeFromObjectAt(e.sourceId,e.sourceObjectTypeId,e.label,t.x,t.y,n):this.createNodeFromDataAt(t.x,t.y,e,n))}},{key:"createAutoNode",value:function(e){var t=this.objectModel.getSelectionAPIPipeline(),n=t||this.objectModel.getAPIPipeline(),i={editType:"createAutoNode",editSource:"canvas",nodeTemplate:this.convertNodeTemplate(e),pipelineId:n.pipelineId};this.editActionHandler(i)}},{key:"createNodeFromTemplateAt",value:function(e,t,n){var i={editType:"createNode",editSource:"canvas",nodeTemplate:this.convertNodeTemplate(e),offsetX:t.x,offsetY:t.y,pipelineId:n};this.editActionHandler(i)}},{key:"createNodeFromTemplateOnLinkAt",value:function(e,t,n,i){var o=this.convertNodeTemplate(e);if(this.canNewNodeBeDroppedOnLink(o)){var a={editType:"createNodeOnLink",editSource:"canvas",nodeTemplate:o,offsetX:n.x,offsetY:n.y,link:t,pipelineId:i};this.editActionHandler(a)}}},{key:"createNodeFromTemplateAttachLinks",value:function(e,t,n,i){var o=this.convertNodeTemplate(e);if(t&&this.canNewNodeBeAttachedToLinks(o)){var a={editType:"createNodeAttachLinks",editSource:"canvas",nodeTemplate:o,offsetX:n.x,offsetY:n.y,detachedLinks:t,pipelineId:i};this.editActionHandler(a)}}},{key:"createNodeFromObjectAt",value:function(e,t,n,i,o,a){var r={editType:"createNode",editSource:"canvas",label:n,offsetX:i,offsetY:o,sourceObjectId:e,sourceObjectTypeId:t,pipelineId:a};this.editActionHandler(r)}},{key:"createNodeFromDataAt",value:function(e,t,n,i){var o=n.data;o.offsetX=e,o.offsetY=t,o.pipelineId=i,o.editSource="canvas",this.editActionHandler(o)}},{key:"canNewNodeBeDroppedOnLink",value:function(e){return!!(e.inputs&&e.inputs.length>0&&e.outputs&&e.outputs.length>0)}},{key:"canNewNodeBeAttachedToLinks",value:function(e){return!!(e.inputs&&e.inputs.length>0||e.outputs&&e.outputs.length>0)}},{key:"createEditMenu",value:function(e,t){var n=[{action:"cut",label:this.labelUtil.getLabel("edit.cutSelection"),enable:e.selectedObjectIds.length>0},{action:"copy",label:this.labelUtil.getLabel("edit.copySelection"),enable:e.selectedObjectIds.length>0}];return t&&n.push({action:"paste",label:this.labelUtil.getLabel("edit.pasteSelection"),enable:!this.isClipboardEmpty()}),n}},{key:"createHighlightMenu",value:function(e){return[{action:"highlightBranch",label:this.labelUtil.getLabel("menu.highlightBranch")},{action:"highlightUpstream",label:this.labelUtil.getLabel("menu.highlightUpstream")},{action:"highlightDownstream",label:this.labelUtil.getLabel("menu.highlightDownstream")}]}},{key:"createUnhighlightMenu",value:function(e){return[{action:"unhighlight",label:this.labelUtil.getLabel("menu.unhighlight"),enable:this.highlight}]}},{key:"createDefaultMenu",value:function(e){var t=[];("canvas"===e.type&&(t=t.concat([{action:"createComment",label:this.labelUtil.getLabel("canvas.addComment")},{action:"selectAll",label:this.labelUtil.getLabel("canvas.selectAll")},{divider:!0}])),"node"===e.type||"comment"===e.type)&&(this.objectModel.getAPIPipeline(e.pipelineId).getLinksContainingIds(e.selectedObjectIds).length>0&&(t=(t=t.concat({action:"disconnectNode",label:this.labelUtil.getLabel("node.disconnectNode")})).concat({divider:!0})));if("node"===e.type||"comment"===e.type||"link"===e.type&&this.areDetachableLinksInUse()||"canvas"===e.type){var n=this.createEditMenu(e,"canvas"===e.type);t=(t=t.concat({submenu:!0,menu:n,label:this.labelUtil.getLabel("node.editMenu")})).concat({divider:!0})}if("canvas"===e.type&&(t=t.concat([{action:"undo",label:this.labelUtil.getLabel("canvas.undo"),enable:this.canUndo()},{action:"redo",label:this.labelUtil.getLabel("canvas.redo"),enable:this.canRedo()},{divider:!0}])),("node"===e.type||"comment"===e.type||this.getCanvasConfig().enableLinkSelection!==de&&"link"===e.type)&&(t=t.concat([{action:"deleteSelectedObjects",label:this.labelUtil.getLabel("canvas.deleteObject")},{divider:!0}])),"node"!==e.type&&"comment"!==e.type||this.isCreateSupernodeCMOptionRequired()&&(p(this,"contextMenuConfig.enableCreateSupernodeNonContiguous")&&this.contextMenuConfig.enableCreateSupernodeNonContiguous||this.areSelectedNodesContiguous())&&(t=t.concat([{action:"createSuperNode",label:this.labelUtil.getLabel("node.createSupernode")}]),this.getCanvasConfig().enableExternalPipelineFlows&&(t=t.concat([{action:"createSuperNodeExternal",label:this.labelUtil.getLabel("node.createSupernodeExternal")}])),t=t.concat([{divider:!0}])),"node"!==e.type||1!==e.selectedObjectIds.length||e.targetObject.type!==G||"canvas"!==e.targetObject.open_with_tool&&void 0!==e.targetObject.open_with_tool||(t=(t=t.concat({action:"deconstructSuperNode",label:this.labelUtil.getLabel("node.deconstructSupernode")})).concat({divider:!0}),t=this.isSuperNodeExpandedInPlace(e.targetObject.id,e.pipelineId)?t.concat({action:"collapseSuperNodeInPlace",label:this.labelUtil.getLabel("node.collapseSupernodeInPlace")}):t.concat({action:"expandSuperNodeInPlace",label:this.labelUtil.getLabel("node.expandSupernode")}),pt(this,"contextMenuConfig.defaultMenuEntries.displaySupernodeFullPage")&&(t=t.concat({action:"displaySubPipeline",label:this.labelUtil.getLabel("node.displaySupernodeFullPage")})),t=t.concat({divider:!0}),this.getCanvasConfig().enableExternalPipelineFlows&&(e.targetObject.subflow_ref.url?this.isPipelineExternal(e.pipelineId)||(t=t.concat({action:"convertSuperNodeExternalToLocal",label:this.labelUtil.getLabel("node.convertSupernodeExternalToLocal")},{divider:!0})):t=t.concat({action:"convertSuperNodeLocalToExternal",label:this.labelUtil.getLabel("node.convertSupernodeLocalToExternal")},{divider:!0}))),this.getCanvasConfig().enableLinkSelection===de&&"link"===e.type&&(t=t.concat([{action:"deleteLink",label:this.labelUtil.getLabel("canvas.deleteObject")}])),"node"===e.type){var i=this.createHighlightMenu(e);i.push({divider:!0}),i=i.concat(this.createUnhighlightMenu(e)),t=t.concat({submenu:!0,menu:i,label:this.labelUtil.getLabel("menu.highlight")})}return"canvas"===e.type&&(t=t.concat({action:"unhighlight",label:this.labelUtil.getLabel("menu.unhighlight"),enable:this.highlight})),"node"===e.type&&p(this,"contextMenuConfig.defaultMenuEntries.saveToPalette")&&this.contextMenuConfig.defaultMenuEntries.saveToPalette&&(t=t.concat({divider:!0},{action:"saveToPalette",label:this.labelUtil.getLabel("node.saveToPalette")})),t}},{key:"isCreateSupernodeCMOptionRequired",value:function(){var e=!0;return p(this,"contextMenuConfig.defaultMenuEntries.createSupernode")&&!1===this.contextMenuConfig.defaultMenuEntries.createSupernode&&(e=!1),e}},{key:"contextMenuHandler",value:function(e){var t=this.createDefaultMenu(e);if(this.contextMenuSource=e,"function"==typeof this.handlers.contextMenuHandler){var n=this.handlers.contextMenuHandler(e,t);n&&n.length>0&&this.openContextMenu(n)}else this.openContextMenu(t)}},{key:"getContextMenuPos",value:function(){return this.contextMenuSource?this.contextMenuSource.cmPos:{x:0,y:0}}},{key:"contextMenuActionHandler",value:function(e){this.logger.log("contextMenuActionHandler - action: "+e),this.logger.log(this.contextMenuSource);var t=Object.assign({},this.contextMenuSource,{editType:e,editSource:"contextmenu"});this.editActionHandler(t),this.canvasContents.focusOnCanvas(),this.closeContextMenu()}},{key:"toolbarActionHandler",value:function(e){this.logger.log("toolbarActionHandler - action: "+e),this.editActionHandler({editType:e,editSource:"toolbar",pipelineId:this.objectModel.getSelectedPipelineId()})}},{key:"keyboardActionHandler",value:function(e,t){this.logger.log("keyboardActionHandler - action: "+e),this.editActionHandler({editType:e,editSource:"keyboard",pipelineId:this.objectModel.getSelectedPipelineId(),mousePos:t})}},{key:"clickActionHandler",value:function(e){this.logger.log("clickActionHandler - "+e.clickType+" on "+e.objectType),this.handlers.clickActionHandler&&this.handlers.clickActionHandler(e)}},{key:"decorationActionHandler",value:function(e,t,n){this.logger.log("decorationActionHandler - node: "+e.id+" id: "+t),this.handlers.decorationActionHandler&&this.handlers.decorationActionHandler(e,t,n)}},{key:"editActionHandler",value:function(e){this.logger.log("editActionHandler - "+e.editType),this.logger.log(e);var t=e;if(t.selectedObjectIds=this.getSelectedObjectIds(),t.selectedObjects=this.getSelectedObjects(),"createSuperNodeExternal"===t.editType||"convertSuperNodeLocalToExternal"===t.editType?(t.externalUrl="",t.externalPipelineFlowId=""):"loadPipelineFlow"!==t.editType&&"expandSuperNodeInPlace"!==t.editType&&"displaySubPipeline"!==t.editType&&"deconstructSuperNode"!==t.editType&&"convertSuperNodeExternalToLocal"!==t.editType||(t=this.preProcessForExternalPipelines(t)),this.handlers.beforeEditActionHandler){var n=null;if("undo"===t.editType?n=this.getCommandStack().getUndoCommand():"redo"===t.editType&&(n=this.getCommandStack().getRedoCommand()),!(t=this.handlers.beforeEditActionHandler(t,n)))return;if(!this.wasExtPipelineFlowLoadSuccessful(t))return}this.editAction(t)}},{key:"editAction",value:function(e){var t=e;if("deleteSelectedObjects"!==t.editType||0!==t.selectedObjectIds.length){switch(t.editType){case"selectAll":this.selectAll(t.pipelineId);break;case"zoomIn":this.zoomIn();break;case"zoomOut":this.zoomOut();break;case"zoomToFit":this.zoomToFit();break;case"togglePalette":this.togglePalette();break;case"toggleNotificationPanel":this.toggleNotificationPanel();break;case"loadPipelineFlow":this.objectModel.ensurePipelineIsLoaded(t)}var n=null;if(this.getCanvasConfig().enableInternalObjectModel)switch(t.editType){case"createNode":n=new hc(t,this.objectModel,this.labelUtil),this.commandStack.do(n),t=n.getData();break;case"createNodeOnLink":n=new bc(t,this.objectModel,this.labelUtil),this.commandStack.do(n),t=n.getData();break;case"createNodeAttachLinks":n=new kc(t,this.objectModel,this.labelUtil),this.commandStack.do(n),t=n.getData();break;case"createAutoNode":var i=this.getCanvasConfig().enableAutoLinkOnlyFromSelNodes;n=new sc(t,this.objectModel,this.labelUtil,i),this.commandStack.do(n),this.panToReveal(t),t=n.getData();break;case"createComment":n=new cc(t,this.objectModel,this.labelUtil),this.commandStack.do(n);break;case"createAutoComment":var o=this.getSVGCanvasD3().getSvgViewportOffset();n=new cc(t,this.objectModel,this.labelUtil,o),this.commandStack.do(n),t=n.getData();break;case"insertNodeIntoLink":n=new $c(t,this.objectModel,this.labelUtil),this.commandStack.do(n);break;case"attachNodeToLinks":n=new tc(t,this.objectModel,this.labelUtil),this.commandStack.do(n);break;case"moveObjects":n=new Kc(t,this.objectModel,this.labelUtil),this.commandStack.do(n);break;case"resizeObjects":n=new Mu(t,this.objectModel,this.labelUtil),this.commandStack.do(n);break;case"setObjectsStyle":n=new ld(t,this.objectModel,this.labelUtil),this.commandStack.do(n);break;case"setLinksStyle":n=new dd(t,this.objectModel,this.labelUtil),this.commandStack.do(n);break;case"updateLink":n=new pd(t,this.objectModel,this.labelUtil),this.commandStack.do(n);break;case"setNodeLabel":n=new Vc(t,this.objectModel,this.labelUtil),this.commandStack.do(n);break;case"editComment":n=new Bc(t,this.objectModel,this.labelUtil),this.commandStack.do(n);break;case"editDecorationLabel":n=new Gc(t,this.objectModel,this.labelUtil),this.commandStack.do(n);break;case"linkNodes":n=new gc(t,this.objectModel,this.labelUtil),this.commandStack.do(n),t=n.getData();break;case"linkNodesAndReplace":n=new gc(t,this.objectModel,this.labelUtil),this.commandStack.do(n);break;case"linkComment":n=new uc(t,this.objectModel,this.labelUtil),this.commandStack.do(n),t=n.getData();break;case"createDetachedLink":n=new vc(t,this.objectModel,this.labelUtil),this.commandStack.do(n),t=n.getData();break;case"deleteSelectedObjects":n=new Dc(t,this.objectModel,this.labelUtil,this.areDetachableLinksInUse()),this.commandStack.do(n);break;case"displaySubPipeline":n=new Fc(t,this.objectModel,this.labelUtil),this.commandStack.do(n);break;case"displayPreviousPipeline":n=new Rc(t,this.objectModel,this.labelUtil),this.commandStack.do(n);break;case"arrangeHorizontally":n=new Ql(t,this.objectModel,this.labelUtil,Xe),this.commandStack.do(n);break;case"arrangeVertically":n=new Ql(t,this.objectModel,this.labelUtil,Oe),this.commandStack.do(n);break;case"createSuperNode":case"createSuperNodeExternal":n=new wc(t,this.objectModel,this.labelUtil),this.commandStack.do(n);break;case"deconstructSuperNode":n=new xc(t,this.objectModel,this.labelUtil,this.getCanvasConfig().enableMoveNodesOnSupernodeResize),this.commandStack.do(n);break;case"expandSuperNodeInPlace":n=new Wc(t,this.objectModel,this.labelUtil,this.getCanvasConfig().enableMoveNodesOnSupernodeResize),this.commandStack.do(n);break;case"collapseSuperNodeInPlace":n=new Sc(t,this.objectModel,this.labelUtil,this.getCanvasConfig().enableMoveNodesOnSupernodeResize),this.commandStack.do(n);break;case"convertSuperNodeExternalToLocal":n=new ic(t,this.objectModel,this.labelUtil),this.commandStack.do(n);break;case"convertSuperNodeLocalToExternal":n=new ac(t,this.objectModel,this.labelUtil),this.commandStack.do(n);break;case"deleteLink":n=new Ec(t,this.objectModel,this.labelUtil),this.commandStack.do(n);break;case"disconnectNode":n=new Ac(t,this.objectModel,this.labelUtil),this.commandStack.do(n);break;case"saveToPalette":n=new td(t,this.objectModel,this.labelUtil,this.labelUtil),this.commandStack.do(n);break;case"cut":this.objectModel.copyToClipboard(this.areDetachableLinksInUse()),n=new Dc(t,this.objectModel,this.labelUtil,this.areDetachableLinksInUse()),this.commandStack.do(n);break;case"copy":this.objectModel.copyToClipboard(this.areDetachableLinksInUse());break;case"paste":var a=this.objectModel.getObjectsToPaste();if(a){t.objects=a;var r=this.getSVGCanvasD3().getTransformedViewportDimensions();n=new Qc(t,this.objectModel,this.labelUtil,r,this.areDetachableLinksInUse(),this.isSnapToGridInUse()),this.commandStack.do(n),t=n.getData()}break;case"undo":n=this.getCommandStack().getUndoCommand(),this.commandStack.undo();break;case"redo":n=this.getCommandStack().getRedoCommand(),this.commandStack.redo();break;case"setPipelineZoom":this.objectModel.getAPIPipeline(t.pipelineId).setPipelineZoom(t.zoom);break;case"highlightBranch":t.highlightedObjectIds=this.highlightBranch(this.objectModel.getSelectedNodesIds(),t.pipelineId);break;case"highlightDownstream":t.highlightedObjectIds=this.highlightDownstream(this.objectModel.getSelectedNodesIds(),t.pipelineId);break;case"highlightUpstream":t.highlightedObjectIds=this.highlightUpstream(this.objectModel.getSelectedNodesIds(),t.pipelineId);break;case"unhighlight":this.removeAllStyles(!0),this.highlight=!1;break;case"openNotificationPanel":this.openNotificationPanel();break;case"closeNotificationPanel":this.closeNotificationPanel()}this.handlers.editActionHandler&&this.handlers.editActionHandler(t,n),this.ensureVisibleExpandedPipelinesAreLoaded()}}},{key:"preProcessForExternalPipelines",value:function(e){if(e.externalPipelineFlowLoad=!1,e.targetObject){var t=pt(e,"targetObject.subflow_ref.url");t&&(e.externalUrl=t,e.externalPipelineFlow=this.objectModel.getExternalPipelineFlow(t),e.externalPipelineFlow||(e.externalPipelineFlowLoad=!0))}return e}},{key:"ensureVisibleExpandedPipelinesAreLoaded",value:function(){var e=this.objectModel.getVisibleExpandedExternalSupernodes();e&&e.length>0&&this.editActionHandler({editType:"loadPipelineFlow",targetObject:e[0]})}},{key:"wasExtPipelineFlowLoadSuccessful",value:function(e){if(e.externalPipelineFlowLoad&&!e.externalPipelineFlow){var t="The host app did not provide a pipeline flow when requested for action "+e.editType+" in beforeEditActionHandler, for URL: "+e.externalUrl;return this.logger.error(t),!1}return!0}},{key:"panToReveal",value:function(e){var t=this;this.addAfterUpdateCallback((function n(){var i=t.getZoomToReveal([e.newNode.id]);i&&t.zoomTo(i),t.removeAfterUpdateCallback(n)}))}}]),n}();Uu.dragNodeTemplate=null;export{Uu as C,Kl as c};
|
|
2
|
-
//# sourceMappingURL=canvas-controller-bf6c2800.js.map
|